So, with led counts confirmed after ignoring a first quick blink, I get 7 flashes for my case:
Code: Select all
#if USE_FROZEN_BOOT_AND_MAIN
int ret = pyexec_frozen_module(main_py);
if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit;
}
if (!ret) {
flash_error(7);
}
Looking at the stm32 Makefile:
Code: Select all
ifneq ($(FROZEN_DIR),)
# To use frozen source modules, put your .py files in a subdirectory (eg scripts/)
# and then invoke make with FROZEN_DIR=scripts (be sure to build from scratch).
CFLAGS += -DMICROPY_MODULE_FROZEN_STR
endif
ifneq ($(FROZEN_MPY_DIR),)
# To use frozen bytecode, put your .py files in a subdirectory (eg frozen/) and
# then invoke make with FROZEN_MPY_DIR=frozen (be sure to build from scratch).
CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
endif
viewtopic.php?f=12&t=4596&p=27084#p27012
plus changing the flash_error() function until I could confirm it with my active low board.
frozen_mpy.c:
Code: Select all
const char mp_frozen_mpy_names[] = {
"main.py\0"
"boot.py\0"
"\0"};
const mp_raw_code_t *const mp_frozen_mpy_content[] = {
&raw_code_main__lt_module_gt_,
&raw_code_boot__lt_module_gt_,
};
Code: Select all
int ret = pyexec_frozen_module(main_py);
https://github.com/micropython/micropyt ... #L502-L524
frozen_mpy.c has bytecode after this comment:
// frozen bytecode for file main.py, scope main_<module>
What's missing?