diff options
| author | Damien George <damien@micropython.org> | 2021-06-18 14:13:18 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-06-18 14:13:18 +1000 |
| commit | eb7ae538f91b5041c92887290756c9526bf38df8 (patch) | |
| tree | 733b5b2cf4b9fae1018da79a0130c826f3b2664f | |
| parent | 4eb13c50cd87eff8374b9bffc3d7c15b1bf5e35f (diff) | |
esp8266/boards/GENERIC_512K: Add custom minimal _boot.py.
Commit 0abf6f830cd390e2e5dbd4a2c68f611f5c9507dc removed _boot.py from the
manifest for the GENERIC_512K board because the build does not include a
filesystem. But the main code expects _boot.py to be there and prints an
error if it's not. So add a custom _boot.py, which just sets the
gc.threshold().
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/esp8266/boards/GENERIC_512K/_boot.py | 3 | ||||
| -rw-r--r-- | ports/esp8266/boards/GENERIC_512K/manifest.py | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/ports/esp8266/boards/GENERIC_512K/_boot.py b/ports/esp8266/boards/GENERIC_512K/_boot.py new file mode 100644 index 000000000..1a55cfd36 --- /dev/null +++ b/ports/esp8266/boards/GENERIC_512K/_boot.py @@ -0,0 +1,3 @@ +import gc + +gc.threshold((gc.mem_free() + gc.mem_alloc()) // 4) diff --git a/ports/esp8266/boards/GENERIC_512K/manifest.py b/ports/esp8266/boards/GENERIC_512K/manifest.py index e7ab8ad53..5674f280b 100644 --- a/ports/esp8266/boards/GENERIC_512K/manifest.py +++ b/ports/esp8266/boards/GENERIC_512K/manifest.py @@ -1,3 +1,4 @@ +freeze("$(BOARD_DIR)", "_boot.py", opt=3) freeze("$(PORT_DIR)/modules", ("apa102.py", "neopixel.py", "ntptime.py", "port_diag.py")) freeze("$(MPY_DIR)/drivers/dht", "dht.py") freeze("$(MPY_DIR)/drivers/onewire") |
