fix(platformio): match partition table to already-deployed field devices

Pre-OTA sanity check ahead of pushing this firmware to 6-7 units still
running the pre-restructure firmware. All four PlatformIO environments
were building against min_spiffs.csv, but field devices were originally
flashed via Arduino IDE with PartitionScheme=no_fs — the two tables
disagree on app1's offset (0x200000 vs 0x1F0000) and both app slot
sizes, because min_spiffs.csv carves out an unused 128KB spiffs
partition this firmware never touches (SD-card only, zero SPIFFS/
LittleFS references anywhere in the codebase).

OTA cannot migrate a device from one partition table to another — the
bootloader and running app both resolve offsets from a boot-time
snapshot of the table at flash 0x8000, which OTA never reads or
writes. A device still on the old no_fs table has no partition entry
at 0x1F0000, so a min_spiffs-built OTA image can never land where it
needs to be; forcibly rewriting that sector via OTA is an unsupported,
unrecoverable-on-power-loss operation Espressif explicitly warns
against.

Added no_fs.csv (copied verbatim from the Arduino ESP32 core) and
switched every environment to it. Verified the built partitions.bin
decodes to a byte-for-byte match of what's already burned into field
devices. No functionality lost — each app slot actually gained ~64KB
by dropping the unused spiffs partition. OTA to existing field devices
is now safe without any USB/serial reflash.

Catalog entry: docs/features/feature-catalog.md F-059.
This commit is contained in:
2026-07-20 10:33:19 +03:00
parent 99ca468b54
commit 28b175b4fc
3 changed files with 44 additions and 6 deletions
+6
View File
@@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1F0000,
app1, app, ota_1, 0x200000,0x1F0000,
coredump, data, coredump,0x3F0000,0x10000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x1F0000
5 app1 app ota_1 0x200000 0x1F0000
6 coredump data coredump 0x3F0000 0x10000