Tagged: esp32 partition spi_flash
August 10, 2017 at 16:27 #11987
How can I set up custom flash partitions for an ESP32 MSBuild project?
Specifically, I want some partitions reserved for some data (Type = data, SubType = nvs?). I’d give it a unique name so I know what it’s used for in my program when I call the
Do I need to run the esp-idf tool to first generate a partitions.bin file before creating a new project? (see http://esp-idf.readthedocs.io/en/latest/api-guides/partition-tables.html and partition_table/gen_esp32part.py).August 10, 2017 at 20:57 #11989
Yes, please run the esp-idf tool, generate a new partitions.bin file and specify a path to it on the first page of VisualGDB Project Properties.August 14, 2017 at 21:01 #12020
Thanks! I was able to get something that seems to work.
It seems I had to make a custom partition type in the range 0x40-0xFE. Otherwise, if I make it general NVS data, the WiFi will try to store wifi configuration data in that space. (I was using your WiFi server example/tutorial as the starting point for the project). The subtype then has to be O (instead of nvs) or the gen_esp32part.py doesn’t like it.
I left the other partitions alone so hopefully the WiFi portion will continue to work, correctly. (It seems to be working so far).C++1234567891011121314151617181920212223242526272829# Name, Type, SubType, Offset, Size, Flagsfactory, app, factory, 0x010000, 1M,rfdata, data, phy, 0x110000, 0x40000,wifidata, data, nvs, 0x150000, 0x40000,--------------- App Partitions-------------- App Partition 1 ---pPartition->type 0pPartition->subtype 0pPartition->address 0x00010000pPartition->size 0x00100000pPartition->label factorypPartition->encrypt 0--------------- Data Partitions-------------- Data Partition 1 ---pPartition->type 1pPartition->subtype 2pPartition->address 0x00150000pPartition->size 0x00040000pPartition->label wifidatapPartition->encrypt 0--- Data Partition 2 ---pPartition->type 1pPartition->subtype 1pPartition->address 0x00110000pPartition->size 0x00040000pPartition->label rfdatapPartition->encrypt 0
So, my new partition.csv table looked something like thisC++123456# Name, Type, SubType, Offset, Size, Flags# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuildfactory, app, factory, 0x010000, 1M,rfdata, data, phy, 0x110000, 0x40000,wifidata, data, nvs, 0x150000, 0x40000,my_data, 0x40, 0, 0x190000, 0x10000August 15, 2017 at 05:17 #12027
Thanks for sharing this, good to know that it works.
You must be logged in to reply to this topic.