Bootloader offset

DexterM
Posts: 9
Joined: Mon Oct 27, 2025 2:44 pm

Bootloader offset

Postby DexterM » Tue May 12, 2026 2:43 pm

I'm using ESP32-S3, ESP-IDF v.6.0.1 and batch file for compilation and flash esp-idf project.
I'm confused what offset value shoul be used for programming bootloader.bin with esptool.
Offset 0x1000 doesn't work

Code: Select all

esptool --chip esp32s3 --port=COM%1 --before=default-reset --after=no-reset write-flash --flash-mode dio --flash-freq 40m --flash-size 8MB 0x1000 build/bootloader/bootloader.bin
Offset 0x0 works and idf.py flash command use this.

Code: Select all

esptool --chip esp32s3 --port=COM%1 --before=default-reset --after=no-reset write-flash --flash-mode dio --flash-freq 40m --flash-size 8MB 0x0 build/bootloader/bootloader.bin
I have old project on ESP32 and ESP-IDF v4.4 where used 0x1000 offset and it works.
Is it depndend from 'secure boot' function or 'encryption' enabled/disabled?
I'm very confused because can't find information in docs and AI on GitHub is talking today that 0x1000 should be used, but yesterday told that 0x0 :roll:

lbernstone
Posts: 1131
Joined: Mon Jul 22, 2019 3:20 pm

Re: Bootloader offset

Postby lbernstone » Tue May 12, 2026 4:57 pm

The location of the second stage bootloader varies depending on the variant (from boards.txt)
esp32c2.build.bootloader_addr=0x0
esp32c5.build.bootloader_addr=0x2000
esp32p4.build.bootloader_addr=0x2000
esp32h2.build.bootloader_addr=0x0
esp32c6.build.bootloader_addr=0x0
esp32c61.build.bootloader_addr=0x0
esp32s3.build.bootloader_addr=0x0
esp32c3.build.bootloader_addr=0x0
esp32s2.build.bootloader_addr=0x1000
esp32.build.bootloader_addr=0x1000

Who is online

Users browsing this forum: Bing [Bot], ChatGPT-User, PerplexityBot and 6 guests