kopia lustrzana https://github.com/micropython/micropython
esp8266: Implement multistage bootstrap sequence.
Upon start-up, _boot module is executed from frozen files to do early initialization, e.g. create and mount the flash filesystem. Then "boot.py" is executed if it exists in the filesystem. Finally, "main.py" is executed if exists to allow start-on-boot user applications. This allows a user to make a custom boot file or startup application without recompiling the firmware, while letting to do early initialization in Python code. Based on RFC https://github.com/micropython/micropython/issues/1955.pull/1899/merge
rodzic
b69f798c92
commit
6e87aeb841
|
@ -54,7 +54,9 @@ STATIC void mp_reset(void) {
|
|||
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
|
||||
MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
|
||||
#if MICROPY_MODULE_FROZEN
|
||||
pyexec_frozen_module("boot");
|
||||
pyexec_frozen_module("_boot");
|
||||
pyexec_file("boot.py");
|
||||
pyexec_file("main.py");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue