Update partition layout to 4MB factory/ota_0/ota_1 partitions for larger firmware images. Add a 60-second validation timer that starts after the hello message is sent on boot from an OTA partition. The partition is only marked valid (via esp_ota_mark_app_valid_cancel_rollback) after receiving a role message from the mothership. If the timer expires without role receipt, the partition stays unconfirmed and the bootloader rolls back to the previous firmware on next reset. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
544 B
544 B
| 1 | # Name, Type, SubType, Offset, Size, Flags |
|---|---|
| 2 | # NVS, PHY init, and OTA data in standard low-flash locations |
| 3 | nvs, data, nvs, 0x9000, 0x6000, |
| 4 | phy_init, data, phy, 0xf000, 0x1000, |
| 5 | # Factory app at standard 0x10000 offset (4 MB) |
| 6 | factory, app, factory, 0x10000, 0x400000, |
| 7 | # Dual OTA partitions for A/B updates with rollback |
| 8 | ota_0, app, ota_0, 0x410000,0x400000, |
| 9 | ota_1, app, ota_1, 0x810000,0x400000, |
| 10 | # OTA data partition — bootloader uses this to track which OTA slot to boot |
| 11 | otadata, data, ota, 0xc10000,0x2000, |