← index #5010Issue #3139
Related · high · value 1.029
QUERY · ISSUE

Pyboard D: space in flash for frozen bytecode

openby peterhinchopened 2019-08-15updated 2019-10-05
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

closedby peterhinchopened 2017-06-11updated 2017-06-15

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

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied