انتقل إلى المحتوى الرئيسي

Partition Table Reference

The exact contents of partitions.csv for the 16 MB ESP32-S3-N16R8. The reasoning behind every entry: flash partitions.

NameTypeSubTypeOffsetSizeHolds
nvsdatanvs0x900064 KBSettings, favorites, cards, schedules, resume record, API token
phy_initdataphy0x190004 KBRadio calibration data
otadatadataota0x1A0008 KBBoot slot selection, two redundant copies
ota_0appota_00x200004.5 MBOTA slot A (USB flashes land here)
ota_1appota_10x4A00004.5 MBOTA slot B
storagedatalittlefs (0x82)0x9200002 MBDashboard files, TLS certificate and key
coredumpdatacoredump0xB2000064 KBCrash post-mortems
nvs_keydatanvs_keys0xB300004 KBNVS encryption key material (production)

Production builds use partitions_production.csv instead of this table: it sits at offset 0x10000 (Secure Boot V2 bootloader headroom) and moves nvs_key to 0xB50000. The 0xB30000 row above, including its (production) annotation, is the development and legacy layout.

There is deliberately no factory partition: A/B OTA never rewrites it, so it only wasted 3 MB. With otadata blank the bootloader logs "No factory image, trying OTA 0" and boots ota_0; a failed OTA falls back to the other slot. All data partitions keep the offsets of the previous table, so encrypted NVS and the dashboard image survive the upgrade; the one-time move from the three-slot layout requires a full USB flash.

Flash offsets used when writing a full image over USB (always include ota_data_initial.bin so a stale slot selection cannot point at an empty partition):

python -m esptool --chip esp32s3 write_flash \
0x0 bootloader.bin \
0x8000 partition-table.bin \
0x1a000 ota_data_initial.bin \
0x20000 Safi.bin \
0x920000 storage.bin

Rules for edits (alignment, immovable entries, the full-flash requirement after changes) are in the partitions chapter.