# Two app slots, so the device can write the one it is not running from.
#
# `nvs` keeps the offset AND size it had under espflash's default table
# (0x9000, 0x6000): changing either invalidates the stored blob, and this
# firmware keeps its wifi credentials and pin config there. The one-time USB
# migration onto this table is therefore not a reprovisioning.
#
# `otadata` fills the gap to 0x11000. App partitions must start on a 64KB
# boundary, hence ota_0 at 0x20000 rather than immediately after — the 60KB
# that leaves is the price of not touching nvs. That alignment is also what
# keeps the MMU-page rule satisfied (see CLAUDE.md, "Flash size is
# load-bearing"): with 4MB flash the pages are 64KB, and both slots are
# 64KB-aligned, so `vaddr % page == offset % page` holds for either.
#
# 0x1F0000 = 1984KB per slot, against a ~1.51MB image (TLS and the certificate
# bundle are most of the difference from the pre-OTA 1.10MB). ota_1 ends at
# 0x400000, exactly the 4MB part: there is nothing else to spend the rest on,
# and a bigger slot is worth more than a spare region nothing addresses.
#
# Watch this number. `espflash save-image` prints the image against the slot on
# every build and CI fails the build if it stops fitting.
#
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000,
otadata, data, ota, 0xf000, 0x2000,
ota_0, app, ota_0, 0x20000, 0x1F0000,
ota_1, app, ota_1, 0x210000, 0x1F0000,
neiam
/lambent-flex-c6
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
1.5 KiB · text
History
9d79b3d