diff --git a/partitions.csv b/partitions.csv index 131f3fd..73026ac 100644 --- a/partitions.csv +++ b/partitions.csv @@ -1,12 +1,16 @@ # ESP-IDF partition table: A/B OTA app slots + LittleFS storage. # -# Sized for a 4MB flash module (TODO: adjust once real flash size and -# firmware image size are known). +# Sized for the real 8MB flash module -- confirmed against actual +# hardware via `esptool flash_id` (2026-07-12), not assumed from docs; +# the previous 4MB layout left half the chip's flash unallocated. Extra +# space went mostly to the OTA slots (headroom for future sensor +# drivers and Blockly-generated Lua growing the app image), with +# `storage` absorbing the remainder rather than leaving flash unused. # # Name, Type, SubType, Offset, Size, Flags nvs, data, nvs, 0x9000, 0x6000, otadata, data, ota, 0xf000, 0x2000, phy_init, data, phy, 0x11000, 0x1000, -ota_0, app, ota_0, 0x20000, 0x180000, -ota_1, app, ota_1, 0x1A0000, 0x180000, -storage, data, littlefs, 0x320000, 0xE0000, +ota_0, app, ota_0, 0x20000, 0x300000, +ota_1, app, ota_1, 0x320000, 0x300000, +storage, data, littlefs, 0x620000, 0x1E0000, diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 08bac24..a4d2bab 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -5,9 +5,10 @@ CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -# Matches the 4MB layout assumed in partitions.csv (TODO: adjust both -# together once real hardware's actual flash size is confirmed). -CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +# Matches the real 8MB flash (confirmed via `esptool flash_id` against +# actual hardware, 2026-07-12) and partitions.csv's layout -- keep both +# in sync if either changes. +CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y # IPv6 is required (not just the ESP-IDF default) -- transport/commissioning # requests a link-local IPv6 address once Wi-Fi STA connects. Explicit here