Page 1 of 1

Whats in the Flash first 32KB before partition table.

Posted: Fri Oct 12, 2018 5:27 am
by Strontium
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.

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

Posted: Fri Oct 12, 2018 5:28 am
by ESP_Angus
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.

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

Posted: Fri Oct 12, 2018 5:38 am
by Strontium
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?

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

Posted: Sat Oct 13, 2018 4:10 am
by ESP_Sprite
Yes, you're free to modify it however you want (but if it breaks, you get to keep both pieces).

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

Posted: Sat Oct 13, 2018 11:48 am
by Strontium
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 ]