diff --git a/ports/stm32/boardctrl.h b/ports/stm32/boardctrl.h index 05bade305c..6f79dfb890 100644 --- a/ports/stm32/boardctrl.h +++ b/ports/stm32/boardctrl.h @@ -28,6 +28,10 @@ #include "py/mpconfig.h" +#ifndef MICROPY_BOARD_EARLY_INIT +#define MICROPY_BOARD_EARLY_INIT() +#endif + #ifndef MICROPY_BOARD_BEFORE_SOFT_RESET_LOOP #define MICROPY_BOARD_BEFORE_SOFT_RESET_LOOP boardctrl_before_soft_reset_loop #endif diff --git a/ports/stm32/main.c b/ports/stm32/main.c index c749cac978..db8222479b 100644 --- a/ports/stm32/main.c +++ b/ports/stm32/main.c @@ -385,10 +385,7 @@ void stm32_main(uint32_t reset_mode) { __HAL_RCC_D2SRAM3_CLK_ENABLE(); #endif - - #if defined(MICROPY_BOARD_EARLY_INIT) MICROPY_BOARD_EARLY_INIT(); - #endif // basic sub-system init #if defined(STM32WB)