Page 1 of 1
esp-idf flash layout - space before bootloader
Posted: Tue Jan 13, 2026 10:39 am
by nasq86
Hey,
According to the ESP-IDF documentation, the esp-idf bootloader is loaded from the following flash offsets:
0x1000 - ESP32, ESP32-S2
0x0 - ESP32-S3, ESP32-H2, ESP32-C61, ESP32-C6
0x2000 - ESP32-C5, ESP32-P4
On those MCUs which do not load the bootloader from the beginning of the flash: what is from 0x0-0x1000 or 0x0-0x2000 respectively?
Does anyone know? I'm just curious.
Re: esp-idf flash layout - space before bootloader
Posted: Wed Jan 14, 2026 12:21 am
by Sprite
It's for SecureBoot key information; it contains key material for when that is enabled.
Re: esp-idf flash layout - space before bootloader
Posted: Sun Jan 18, 2026 7:04 am
by dmitrij999
As I remember, every ESP32x MCU actually starts execution from 0x1000, because every executive binary (application or bootloader) must have metadata (such as magic, app version, sha hashsum, etc.) that fit into 4096 bytes (in case of bootloader, meta starts from 0x0), the flash page size.
Re: esp-idf flash layout - space before bootloader
Posted: Wed Jan 21, 2026 11:27 am
by ESP_igrr
That's not the case; image metadata is part of the binary image itself. You can find out more about the binary image format over here:
https://docs.espressif.com/projects/esp ... ormat.html.
As Sprite wrote, in the original ESP32, the first 4k region of Flash was reserved for Secure Boot v1 digest. See point 5 in this section for more details:
https://docs.espressif.com/projects/esp ... s-overview.
On the ESP32-P4 and C5, the first 8k of Flash is reserved for the Key Manager recovery data. The documentation for that feature is in progress, unfortunately I don't have any pointers for you yet.