From e3c347296722d2137b4bbd7a27a898676e9061a8 Mon Sep 17 00:00:00 2001 From: cjkas Date: Sat, 17 Oct 2026 22:55:31 +0200 Subject: [PATCH] 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 --- docs/LOOP_QUEUE_PLAN.md | 2 ++ esp32_huge_app.csv | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/LOOP_QUEUE_PLAN.md b/docs/LOOP_QUEUE_PLAN.md index c3518a4..75fe46f 100644 --- a/docs/LOOP_QUEUE_PLAN.md +++ b/docs/LOOP_QUEUE_PLAN.md @@ -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`. diff --git a/esp32_huge_app.csv b/esp32_huge_app.csv index 9070da5..a8a8bfb 100644 --- a/esp32_huge_app.csv +++ b/esp32_huge_app.csv @@ -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, \ No newline at end of file +spiffs, data, spiffs, 0x310000, 0xE0000, +coredump, data, coredump, 0x3F0000, 0x10000, \ No newline at end of file