Whats in the Flash first 32KB before partition table.

Strontium
Posts: 20
Joined: Sat Dec 26, 2015 11:33 pm

Whats in the Flash first 32KB before partition table.

Postby Strontium » Fri Oct 12, 2018 5:27 am

Is the first 32KB of flash before the partition table safe to use?

And if not, whats stored there?, whats it's purpose? I can't find anything documented about it so any pointers would be appreciated.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Whats in the Flash first 32KB before partition table.

Postby ESP_Angus » Fri Oct 12, 2018 5:28 am

There's a software bootloader at offset 0x1000. This is the first non-ROM program that the ESP32 runs after reset.

The first 4096 byte sector at 0x0 is used if the secure boot feature is enabled. If you don't need secure boot, you can safely use this sector for another purpose.

Strontium
Posts: 20
Joined: Sat Dec 26, 2015 11:33 pm

Re: Whats in the Flash first 32KB before partition table.

Postby Strontium » Fri Oct 12, 2018 5:38 am

ESP_Angus wrote:There's a software bootloader at offset 0x1000. This is the first non-ROM program that the ESP32 runs after reset.
Ok, so this is it?
https://github.com/espressif/esp-idf/bl ... er_start.c

So, it can in theory be customized, provided it does not exceed its 28K of available space?

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Whats in the Flash first 32KB before partition table.

Postby ESP_Sprite » Sat Oct 13, 2018 4:10 am

Yes, you're free to modify it however you want (but if it breaks, you get to keep both pieces).

Strontium
Posts: 20
Joined: Sat Dec 26, 2015 11:33 pm

Re: Whats in the Flash first 32KB before partition table.

Postby Strontium » Sat Oct 13, 2018 11:48 am

ESP_Sprite wrote:Yes, you're free to modify it however you want (but if it breaks, you get to keep both pieces).
I was pretty sure that was correct, however the confirmation is helpful. Thank you. [Breaking it, That's the fun part :D ]

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], HighVoltage and 110 guests