← index #5394PR #4348
Related · medium · value 0.107
QUERY · ISSUE

Freezing resources that are not Python scripts

openby RJSDevelopened 2019-12-07updated 2020-01-08
enhancement

I want to flash modules with html files together, but I can't read them.
e.g list
_boot.py
public/index.html

I modified makemanifest.py to pass other files types as path, I cheked existing it in the firmware.elf, and it exist, but I cant read it for send by http

May be exist way for read those files or what sorces can I modify for get this possibility?

CANDIDATE · PULL REQUEST

stm32/main: Allow freezing boot.py and main.py into firmware image

closedby andrewleechopened 2018-12-13updated 2019-07-09

If boot.py and/or main.py are in frozen scripts, use them rather than the static copy in code for creating initial files on filesystem.

This was originally inspired by #4248, however taking a different direction.

Currently, the template for main.py and boot.py is just contained in char string in code. When a new filesystem is being created the initial files are created from these templates.

The PR allows a firmware board developer to use their own copies of boot.py or main.py instead of the code templates by putting those files into a separate folder for frozen scripts, eg:

make FROZEN_DIR=src/boot_scripts all

Doing it this way allows the end user to still make modifications to those files during development, etc and the modified copies will be used. However if something goes wrong they can erase the filesystem and go back to the frozen templates.

This PR combined with the existing FROZEN_DIR / FROZEN_MPY_DIR system allows us to have our entire micropython application frozen into the rom dfu image for easy deployment without needing to manually copy any files onto the filesystem afterwards.

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