diff options
| author | Damien George <damien.p.george@gmail.com> | 2019-02-15 15:34:05 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2019-02-15 15:34:05 +1100 |
| commit | c551169bd8221a8c750ab0d0ca0eb3e9bde58530 (patch) | |
| tree | 6800f6409224e7f4d6221efdd1c74bf849d9c316 | |
| parent | 65b1fefa317e147084418a0443641f0218159ce9 (diff) | |
stm32/mboot: Add hook to run board-specific code early on startup.
| -rw-r--r-- | ports/stm32/mboot/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/mboot/main.c b/ports/stm32/mboot/main.c index aaad61cf5..838c5fe08 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) { |
