Problem
partitions.csv reserves only 0x50000 (320 KB, minus LittleFS overhead) for the littlefs partition:
littlefs, data, spiffs, 0x3B0000, 0x50000,
data/index.html alone is currently 234 KB and has grown steadily over recent commits (~218 KB → 234 KB). The upload pipeline (scripts/pre_uploadfs.py) also generates a gzip sibling, index.html.gz (~56 KB), which is legitimately needed alongside the raw file — WebServer.h reads /index.html directly for SPA route fallbacks, while serveStatic uses the .gz sibling for bandwidth savings on normal requests. So index.html + index.html.gz alone already sit around 290 KB, before data/sc/*.json, wifi.json, and wifi.json.gz are added.
This already caused a lfs_write error(-28): File system is full. build failure once, triggered by a related bug where pre_uploadfs.py left stale .gz files in data/ across builds (fixed in commit 1ab7999). Even with that fix, the remaining headroom is only ~30 KB, and any further growth of index.html will overflow the partition again.
Proposed fix
Increase the littlefs partition size in partitions.csv, most likely by shrinking app0/app1 (currently 0x1D0000 / ~1.85 MB each for OTA dual-bank). Needs to be sized against actual current firmware binary size to make sure OTA still has enough room in both app slots.
Open questions
- How much slack do the current
app0/app1 firmware binaries have before this becomes a real constraint?
- Should we also revisit whether the raw
index.html needs to ship on top of index.html.gz, to reduce pressure independent of partition size?
Problem
partitions.csvreserves only0x50000(320 KB, minus LittleFS overhead) for thelittlefspartition:data/index.htmlalone is currently 234 KB and has grown steadily over recent commits (~218 KB → 234 KB). The upload pipeline (scripts/pre_uploadfs.py) also generates a gzip sibling,index.html.gz(~56 KB), which is legitimately needed alongside the raw file —WebServer.hreads/index.htmldirectly for SPA route fallbacks, whileserveStaticuses the.gzsibling for bandwidth savings on normal requests. Soindex.html+index.html.gzalone already sit around 290 KB, beforedata/sc/*.json,wifi.json, andwifi.json.gzare added.This already caused a
lfs_write error(-28): File system is full.build failure once, triggered by a related bug wherepre_uploadfs.pyleft stale.gzfiles indata/across builds (fixed in commit 1ab7999). Even with that fix, the remaining headroom is only ~30 KB, and any further growth ofindex.htmlwill overflow the partition again.Proposed fix
Increase the
littlefspartition size inpartitions.csv, most likely by shrinkingapp0/app1(currently0x1D0000/ ~1.85 MB each for OTA dual-bank). Needs to be sized against actual current firmware binary size to make sure OTA still has enough room in both app slots.Open questions
app0/app1firmware binaries have before this becomes a real constraint?index.htmlneeds to ship on top ofindex.html.gz, to reduce pressure independent of partition size?