File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828
2929#include "py/mpconfig.h"
3030
31+ #ifndef MICROPY_BOARD_STARTUP
32+ #define MICROPY_BOARD_STARTUP powerctrl_check_enter_bootloader
33+ #endif
34+
3135#ifndef MICROPY_BOARD_EARLY_INIT
3236#define MICROPY_BOARD_EARLY_INIT ()
3337#endif
Original file line number Diff line number Diff line change @@ -313,8 +313,9 @@ void stm32_main(uint32_t reset_mode) {
313313 // Enable 8-byte stack alignment for IRQ handlers, in accord with EABI
314314 SCB -> CCR |= SCB_CCR_STKALIGN_Msk ;
315315
316- // Check if bootloader should be entered instead of main application
317- powerctrl_check_enter_bootloader ();
316+ // Hook for a board to run code at start up, for example check if a
317+ // bootloader should be entered instead of the main application.
318+ MICROPY_BOARD_STARTUP ();
318319
319320 // Enable caches and prefetch buffers
320321
You can’t perform that action at this time.
0 commit comments