The partitions for the two Gateway boards are based on the 16MB variant using the partition table esp32_partition_16M.csv
. The structure is:
3.6.5 :
Name | Type | SubType | Offset | Size | Notes | File |
---|---|---|---|---|---|---|
bootloader | 0x0000/0x1000 | 0x8000 (32 KB) | ESP32-S3=0x1000, ESP32=0x1000 | bootloader*.bin | ||
partitions | 0x8000 | 0x1000 (4 KB) | same for each board | partitions*.bin | ||
- | ||||||
nvs | data | nvs | 0x9000 | 0x5000 (20 KB) | reserved for ESP32 | |
otadata | data | ota | 0xE000 | 0x2000 (8 KB) | same for each board | boot_app0*.bin |
boot | app | factory | 0x10000 | 0x280000 (2.5 MB) | default boot partition | EMS-ESP firmware *.bin/loader |
app0 | app | ota_0 | 0x290000 | 0x590000 (5.56 MB) | OTA cycle 1 | EMS-ESP firmware *.bin |
app1 | app | ota_1 | 0x510000 | 0x590000 (5.56 MB) | OTA cycle 2 | EMS-ESP firmware *.bin |
nvs1 | data | nvs | 0xAA0000 | 0x040000 (256 KB) | custom for EMS-ESP | (generated by script) |
spiffs | data | spiffs | 0xAA0000 | 0x200000 (2 MB) | for LittleFS/EMS-ESP filesystem | (not used) |
coredump | data | coredump | 0xCE0000 | 0x010000 (64 KB) |
3.7.0 :
Name | Type | SubType | Offset | Size | Notes | File |
---|---|---|---|---|---|---|
bootloader | 0x0000/0x1000 | 0x8000 (32 KB) | ESP32-S3=0x1000, ESP32=0x1000 | bootloader*.bin | ||
partitions | 0x8000 | 0x1000 (4 KB) | same for each board | partitions*.bin | ||
- | ||||||
nvs | data | nvs | 0x9000 | 0x5000 (20 KB) | reserved for ESP32 | |
otadata | data | ota | 0xE000 | 0x2000 (8 KB) | same for each board | boot_app0*.bin |
boot | app | factory | 0x10000 | 0x480000 (4.5 MB) | default boot partition | EMS-ESP firmware *.bin/loader |
app0 | app | ota_0 | 0x290000 | 0x490000 (4.56 MB) | OTA cycle 1 | EMS-ESP firmware *.bin |
app1 | app | ota_1 | 0x510000 | 0x490000 (4.56 MB) | OTA cycle 2 | EMS-ESP firmware *.bin |
nvs1 | data | nvs | 0xAA0000 | 0x040000 (256 KB) | custom for EMS-ESP | (generated by script) |
spiffs | data | spiffs | 0xAA0000 | 0x200000 (2 MB) | for LittleFS/EMS-ESP filesystem | (not used) |
coredump | data | coredump | 0xCE0000 | 0x010000 (64 KB) |
- Reference: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html
- There are 3 places where the EMS-ESP firmware is stored:
boot
is the default used on fresh installs.app0
andapp1
are the firmware partitions used during OTA updates, and cycles between the two. The firmware is loaded into one of these non-active partitions, and then the device is rebooted.
- The bootloader (called second stage) is the
bootloader_dio_80m.bin
executable and is used to read the partition table at offset 0x8000 and determine which partitions are available. Note the bootloader's offset is different per chip type. ESP32 is 0x1000 and ESP32-S3 is 0x0000. This is handled in our scriptupload.sh
for each Model type in the parameterbootloader_address
. - The partition
otadata
is used to hold a small application used to determine which partition (boot, app0, app1) to use. It will query the data stored inpartitions
block. - EMS-ESP can be restarted to other partitions using the command
restart <boot|app0|app1>
. - The EMS-ESP Console/API command
show system
will show the current partition and the partition that will be booted after a restart. - With all the board/chip types, the
boot_app0.bin
andpartitions.bin
are the same file for each board. Only thebootloader.bin
is different. But we keep local copies to keep things tidy in a single folder.