ESP32 Partition Table @ 0xe000

ankgt11
Posts: 6
Joined: Sat May 19, 2018 11:37 am

ESP32 Partition Table @ 0xe000

Postby ankgt11 » Wed Nov 21, 2018 5:00 am

I have been experimenting with various partition tables on my 4MB ESP32-WROOM-32 device, and had some confusion. I am using PlatformIO for development.

My original partition table looked like this:
[Codebox]
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1C0000,
app1, app, ota_1, 0x1D0000,0x1C0000,
eeprom, data, 0x99, 0x390000,0x1000,
spiffs, data, spiffs, 0x391000,0x6F000,
[/Codebox]

For this when I study the esptool command generated by PlatformIO it looks correct and the flashing is happening at the following locations:

[Codebox]
0x1000 bootloader_dio_40m.bin
0x8000 partitions.bin
0xe000 boot_app0.bin
0x10000 firmware.bin
[/Codebox]

However, when I try the default factory partition like this:

[Codebox]
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x6000
phy_init, data, phy, 0xf000, 0x1000
factory, app, factory, 0x10000, 1M
[/Codebox]

The esptool command is still the same. The part I dont understand is that why is it still uploading "boot_app0.bin" @ offset 0xe000? Now my nvs partition should be occupying this space.

Can somebody please help me understand? Is this is an error or normal behaviour?

Thanks!
AnkGT

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

Re: ESP32 Partition Table @ 0xe000

Postby ESP_igrr » Wed Nov 21, 2018 3:49 pm

Are you sure that sdkconfig file is pointing to the partition table file which you are modifying, and not some other one?
If you run "make V=1" (or idf.py -v build, if using CMake build system), you should get all the compilation commands printed out. This should include the call to the partition generation tool. Check if the command has the correct CSV file in it.

ankgt11
Posts: 6
Joined: Sat May 19, 2018 11:37 am

Re: ESP32 Partition Table @ 0xe000

Postby ankgt11 » Wed Nov 21, 2018 6:54 pm

Thanks for the reply.

I am using PlatformIO which has its own build system, but yes I am sure it is using the correct partitions.cav file.

To check this, I added both BLE and Wifi to my applications which took the size of my app to about 1.8M. This failed to flash due to lack of space. But updating the partition table (factory app) to 2M solves the problem, which would not be the case if it was using some other csv file.

Am I correct in understanding that the program should not be flashing anything to 0xe000 when using the second partitions.csv example I have shown (non-ota one), and that only 3 bin files should be flashed in this case?

Thanks.

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

Re: ESP32 Partition Table @ 0xe000

Postby ESP_igrr » Wed Nov 21, 2018 11:00 pm

Yes, your understanding is correct, sorry i've missed the fact you are using platformio.

ankgt11
Posts: 6
Joined: Sat May 19, 2018 11:37 am

Re: ESP32 Partition Table @ 0xe000

Postby ankgt11 » Thu Nov 22, 2018 6:07 pm

Thanks. In that case I guess I will take it up in the PlatformIO forums.

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 Partition Table @ 0xe000

Postby chegewara » Thu Nov 22, 2018 8:12 pm

boot_app0.bin have to be some special partition in platformIO, because like you said, it is created with standard partition file. In esp-idf all you need are 3 partitions that are build during compilation:
- bootloader,
- partition_table,
- application

and additional partitions like:
- nvs,
- ota_data (optional)
- phy_init (optional)

Who is online

Users browsing this forum: No registered users and 103 guests