stm32/main: Run optional frozen module at boot.
If a board specifies a filename via MICROPY_BOARD_FROZEN_BOOT_FILE then that will be run on start up, before the usual boot.py.
This commit is contained in:
parent
123dcdb8e5
commit
e83aa252f7
|
@ -564,6 +564,11 @@ soft_reset:
|
|||
// reset config variables; they should be set by boot.py
|
||||
MP_STATE_PORT(pyb_config_main) = MP_OBJ_NULL;
|
||||
|
||||
// Run optional frozen boot code.
|
||||
#ifdef MICROPY_BOARD_FROZEN_BOOT_FILE
|
||||
pyexec_frozen_module(MICROPY_BOARD_FROZEN_BOOT_FILE);
|
||||
#endif
|
||||
|
||||
// Run boot.py (or whatever else a board configures at this stage).
|
||||
if (MICROPY_BOARD_RUN_BOOT_PY(&state) == BOARDCTRL_GOTO_SOFT_RESET_EXIT) {
|
||||
goto soft_reset_exit;
|
||||
|
|
Loading…
Reference in New Issue