espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.79k stars 7.31k forks source link

about Partition Table (IDFGH-11158) #12326

Closed franz-ms-muc closed 1 week ago

franz-ms-muc commented 1 year ago

Answers checklist.

doc

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html

General issue report

https://github.com/espressif/esp-idf/blob/master/examples/storage/spiffs/partitions_example.csv

https://github.com/espressif/esp-idf/blob/master/components/partition_table/partitions_singleapp_large.csv

https://github.com/espressif/esp-idf/blob/master/components/partition_table/partitions_singleapp.csv

in the first Example we see the Offsets. in the 2. and 3. no Offsets.

what is the reason, and what is the recommended practice ?

KaeLL commented 1 year ago

The “Offset” field for each partition is empty. The gen_esp32part.py tool fills in each blank offset, starting after the partition table and making sure each partition is aligned correctly.

adokitkat commented 1 week ago

To expand upon previous answer, the preference is up to you, but I think it is easier to just leave the offset blank as it is automatically calculated - e.g. if you set your partition size to 1M and your program exceeds his value, you only need to make the partition bigger and you don't have to meddle and manually also update all other offsets in the csv. If you for some reason need to have a partition on certain offset, then you can use it.