From b99300b53ecc8db1ced8d96953ba4eaf2026f069 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 11 Nov 2020 18:14:50 +1100 Subject: [PATCH] stm32/boardctrl: Define MICROPY_BOARD_EARLY_INIT alongside others. Signed-off-by: Damien George --- ports/stm32/boardctrl.h | 4 ++++ ports/stm32/main.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) 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)