QUERY · ISSUE
Pyboard D: space in flash for frozen bytecode
port-stm32
This is limited compared to the Pyboard 1.x. In order to compile for the SF2W I had to minimise the number of files in the modules directory otherwise (after ensuring a clean build) I get
... successful output omitted ...
LINK build-PYBD_SF2/firmware.elf
arm-none-eabi-ld: build-PYBD_SF2/firmware.elf section `.text' will not fit in region `FLASH_APP'
arm-none-eabi-ld: region `FLASH_APP' overflowed by 15724 bytes
Makefile:538: recipe for target 'build-PYBD_SF2/firmware.elf' failed
make: *** [build-PYBD_SF2/firmware.elf] Error 1
Build failure
Is this a hardware limitation or is there a way to specify more space for frozen bytecode?
CANDIDATE · ISSUE
esp8266 makefile Add support for per-project frozen module directory
Given the limited space for frozen bytecode this is useful. The following seems to work. Suggested comments included.
# 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).
# The following files must be included or symlinked:
# _boot.py flashbdev.py inisetup.py
FROZEN_MPY_DIR ?= modules