build: give the debug build the release file system size

esp32_huge_app.csv had a 0xD0000 file system where the release table has
0xE0000 at the same offset. LittleFS can grow but not shrink, so flashing
the debug build onto a device formatted by a release build failed the
lfs_fs_grow assert on every boot. The debug table now uses 0xE0000 and
moves the coredump into the 64 KB that was unused at the end of flash,
so both builds share one data layout. Devices formatted at 0xD0000 (debug,
esp32c6) grow on their next mount.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-17 22:55:31 +02:00
parent bee6a6d60b
commit e3c3472967
2 changed files with 4 additions and 2 deletions

View file

@ -185,6 +185,8 @@ Code moved unchanged; only files and names changed.
The subscribe and unsubscribe lists, which repeated `groups/+/direction/set`, became the one `MQTT_COMMAND_TOPICS` list, and a native test checks that the parser takes every topic in it. Flash: `esp32devdbg` 1,536,533 → 1,539,645 bytes (+3.1 KB, since the routes are a second file that uses ArduinoJson, as SOMFY_SPLIT_PLAN.md warned), `esp32dev` 1,393,449 → 1,391,113 bytes (−2.3 KB, where `-Os` inlines less).
### Step 0 on a device
**No longer needed:** `esp32_huge_app.csv` now has the release file system (`0xE0000` at `0x310000`) and puts the coredump in the 64 KB that was unused at the end, so the debug and release builds share one data layout and either can be flashed over the other. A device formatted at `0xD0000` grows to `0xE0000` on its next mount, which LittleFS can do. What follows was the procedure while the debug table had the smaller file system.
NVS stays at `0x9000`, so the rolling codes survive. The file system partition shrinks from `0xE0000` to `0xD0000`, and the existing LittleFS won't mount, because `LittleFS.begin()` doesn't format. So:
1. Take a backup through `/backup`.
2. Flash the partition table, firmware and file system over USB: `pio run -e esp32devdbg -t upload -t uploadfs`.

View file

@ -2,5 +2,5 @@
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xE000, 0x2000,
app0, app, factory, 0x10000, 0x300000,
spiffs, data, spiffs, 0x310000, 0xD0000,
coredump, data, coredump, 0x3E0000, 0x10000,
spiffs, data, spiffs, 0x310000, 0xE0000,
coredump, data, coredump, 0x3F0000, 0x10000,
1 # Name, Type, SubType, Offset, Size
2 nvs, data, nvs, 0x9000, 0x5000,
3 otadata, data, ota, 0xE000, 0x2000,
4 app0, app, factory, 0x10000, 0x300000,
5 spiffs, data, spiffs, 0x310000, 0xD0000, spiffs, data, spiffs, 0x310000, 0xE0000,
6 coredump, data, coredump, 0x3E0000, 0x10000, coredump, data, coredump, 0x3F0000, 0x10000,