What is the boot sequence of esp_wrover_kit?

benvinkorea
Posts: 8
Joined: Mon Jan 28, 2019 8:06 am

What is the boot sequence of esp_wrover_kit?

Postby benvinkorea » Mon Jan 28, 2019 8:13 am

I see a bootloader binary with esptool.py and it should be the secondary bootloader apart from ROM boot loader.
Now, I just want to know which address the primary(ROM boot loader) jumps to after execution?
If I want to put my own secondary bootloader where should I place it and which address?

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: What is the boot sequence of esp_wrover_kit?

Postby ESP_igrr » Mon Jan 28, 2019 11:53 am

Please see if the following section of the docs answers your question: https://docs.espressif.com/projects/esp ... bootloader

benvinkorea
Posts: 8
Joined: Mon Jan 28, 2019 8:06 am

Re: What is the boot sequence of esp_wrover_kit?

Postby benvinkorea » Wed Jan 30, 2019 5:39 am

Hi ESP,

Thanks for the reply. The link seems to be work in progress and specific to IDF.
The link says, First stage bootloader in ROM loads the second stage bootloader from FLASH (from offset 0x1000) into RAM and execute.
First 4kB sector of flash is used to store secure boot IV and signature of the application image. Please check secure boot documentation for details about this.

Now, I am interested in knowing the following;
a. How ROM bootloader decides how many bytes to copy from FLASH (from offset 0x1000 to iRAM) ?
b. After copying into iRAM, how it decides the entry point in RAM?
c. If secure boot is NOT used, then can the first 4KB used for other application?

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: What is the boot sequence of esp_wrover_kit?

Postby ESP_igrr » Wed Jan 30, 2019 11:15 am

The bootloader expects to find firmware in the format shown in https://github.com/espressif/esptool/wi ... age-Format at address 0x1000. Note that the link describes the format used in ESP8266. You can see the structure of ESP32 image format (which is very similar) at https://github.com/espressif/esp-idf/bl ... e_format.h. This format defines a number of loadable sections, entry point, and a few other fields.

If you don't use secure boot, you can place something into the first sector, but the bootloader will still expect to find the binary image header at 0x1000.

Who is online

Users browsing this forum: No registered users and 102 guests