From c551169bd8221a8c750ab0d0ca0eb3e9bde58530 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 15 Feb 2019 15:34:05 +1100 Subject: [PATCH] stm32/mboot: Add hook to run board-specific code early on startup. --- ports/stm32/mboot/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/stm32/mboot/main.c b/ports/stm32/mboot/main.c index aaad61cf54..838c5fe08a 100644 --- a/ports/stm32/mboot/main.c +++ b/ports/stm32/mboot/main.c @@ -1211,6 +1211,10 @@ void stm32_main(int initial_r0) { SCB_EnableDCache(); #endif + #if defined(MBOOT_BOARD_EARLY_INIT) + MBOOT_BOARD_EARLY_INIT(); + #endif + #ifdef MBOOT_BOOTPIN_PIN mp_hal_pin_config(MBOOT_BOOTPIN_PIN, MP_HAL_PIN_MODE_INPUT, MBOOT_BOOTPIN_PULL, 0); if (mp_hal_pin_read(MBOOT_BOOTPIN_PIN) == MBOOT_BOOTPIN_ACTIVE) {