← index #5394PR #5084
Related · high · value 2.775
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

Introduce a mechanism for specifying a "manifest" for frozen files

mergedby dpgeorgeopened 2019-09-09updated 2019-10-15

This is an initial attempt to improve how frozen modules are specified. Instead of using symlinks (which can be unreliable on Windows, and not that powerful) the approach presented here uses a manifest file (a Python script) to specify what scripts to freeze. Some of the advantages of doing it this way are (not all are currently implemented):

  • can specify arbitrary file locations for the scripts to be frozen
  • can specify a different frozen name vs the actual file name
  • can specify different mpy-cross options (eg optimisations) per file
  • can specify to freeze via a string or compiled mpy file (currently FROZEN_DIR vs FROZEN_MPY_DIR)
  • can eventually include resources/data in the manifest
  • can eventually include read-only/memzip/initial filesystem in the manifest

Included in this PR is an example of how it would work for the unix port (freezing upip).

There could eventually be a hierarchy of manifests: one for the port, one for the particular board, and one for the user application (each could override the defaults if necessary).

The idea would be that this mechanism completely replaces the existing way to specify frozen files.

The implementation here is a bit rough (eg it unconditionally rebuilds each time), comments/discussion/etc are welcome.

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