ESP32: Ask for advice regarding Flash partition

Good Evening

I’d like to ask your advice to set a good partition table for my demand now.

The app I’m writing uses 800kb and the Web Page uses 1.4Mb.

I’d like to be able to update the app via OTA.

Does the partition table bellow look suitable for this demand?

Is it really necessary to set that “phy_init” partition? What is it supposed to store?

Thank you.
Regards, Ciro.

# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,0x4000
otadata,data,ota,0xD000,0x2000
phy_init,data,phy,0xF000,0x1000
ota_0,app,ota_0,0x10000,0x120000
ota_1,app,ota_1,0x130000,0x120000
WebPage,data,spiffs,0x250000,0x1B0000

As per ESP-IDF docs, the PHY (physical layer, here meaning the WiFi modem) initialization data. This is needed.

Compared to known-good partition tables your NVS is 0x1000 bytes smaller. It also uses non-standard names, the app partitions are usually called app0 and app1, the SPIFFS partition is called spiffs. But that should all be okay.

Have you tried it?

Not yet.

Ok, I’ll keep it.

Should it cause any trouble?

Ok. I guess I won’t risk “app0” and “app1”, but I’ll keep “WebPage” just to know.

And what if I add a small partition to store a .CSV log file? Like this:

# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,0x4000,
otadata,data,ota,0xD000,0x2000,
phy_init,data,phy,0xF000,0x1000,
app0,app|ota_0,0x10000,0x120000,
app1,app|ota_1,0x130000,0x120000,
WebPage,data,spiffs,0x250000,0x1A0000,
log,data,spiffs,0x3F0000,0x10000,

Adding another SPIFFS partition for that is overkill and requires custom code. Just make one SPIFFS partition big enough and create a new file in it via code.

Should not.

Ok, done.

I’ve just uploaded. At least the main app partition is resized. I can see it when I compile the code. It says:
“Flash: [======= ] 68.0% (used 801710 bytes from 1179648 bytes)”

1179648 bytes = 0x120000. Looks fine.

Thank you very much.
Regards