esp:esp32:partitions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| esp:esp32:partitions [2026/08/29 13:50] – oscar | esp:esp32:partitions [2026/09/12 10:28] (current) – oscar | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | # Partitions |
| - | ===== Partition table ===== | + | ## Partition table |
| - | A file called **partitions.csv** is located in the root of the esp-idf project folder. | + | A file called **partitions.csv** is located in the root of the esp-idf project folder. With content similar to: |
| - | With content similar to: | + | ``` |
| - | < | + | |
| # Name, | # Name, | ||
| nvs, data, nvs, | nvs, data, nvs, | ||
| Line 12: | Line 11: | ||
| config, | config, | ||
| logging, | logging, | ||
| - | </ | + | ``` |
| - | ===== Updating a partition table ===== | + | ## Updating a partition table |
| - | === Switch to custom partitions | + | ### Switch to custom partitions |
| - | You must tell ESP-IDF to stop using the default layout and look at your new CSV file instead. | + | You must tell ESP-IDF to stop using the default layout and look at your new CSV file instead. In **idf.py menuconfig** navigate to Partition Table.Change Partition Table Type from " |
| - | In **idf.py menuconfig** navigate to Partition Table.Change Partition Table Type from " | + | ### Build partition table |
| - | === Build partition table === | + | |
| Edit the contents of the partitions.csv file and run the following commands: | Edit the contents of the partitions.csv file and run the following commands: | ||
| - | < | + | ``` |
| idf.py menuconfig | idf.py menuconfig | ||
| idf.py partition-table | idf.py partition-table | ||
| idf.py build | idf.py build | ||
| - | </ | + | ``` |
| - | ===== Write Partition Table to ESP32 ===== | + | ### Write Partition Table to ESP32 |
| Flash the partition table by: | Flash the partition table by: | ||
| - | | + | ``` |
| - | After that do a full flash or flash the individual partitions to their new locations | + | idf.py -p / |
| - | < | + | ``` |
| + | Or you can do a full flash which will also write the table. | ||
| + | ``` | ||
| idf.py -p / | idf.py -p / | ||
| - | </ | + | ``` |
| - | + | ### Read Partition Table from ESP32 | |
| - | ===== Read Partition Table from ESP32 ===== | + | |
| Read the Partition Table Flashed on a Connected ESP32If you want to pull the partition table off a physical ESP32 board to see what is currently flashed on it, you can use the target partition-table-dump. | Read the Partition Table Flashed on a Connected ESP32If you want to pull the partition table off a physical ESP32 board to see what is currently flashed on it, you can use the target partition-table-dump. | ||
| - | | + | ``` |
| + | idf.py -p [PORT] partition-table-dump | ||
| + | ``` | ||
| It invokes esptool.py in the background to read the binary partition data directly from the chip's flash memory (always located at offset 0x8000 or 0x9000 depending on your SDK configuration) and prints the structure to your terminal. | It invokes esptool.py in the background to read the binary partition data directly from the chip's flash memory (always located at offset 0x8000 or 0x9000 depending on your SDK configuration) and prints the structure to your terminal. | ||
| + | ## Erase a partition area | ||
| + | ``` | ||
| + | esptool --port / | ||
| + | ``` | ||
| + | ## Full Flash | ||
| + | ``` | ||
| + | idf.py -p / | ||
| + | python -m esptool --chip esp32c3 -p / | ||
| + | ``` | ||
| + | ### Write Application to partition | ||
| + | ``` | ||
| + | python -m esptool --chip esp32c3 -p / | ||
| + | ``` | ||
| + | ### Read from partition | ||
| + | ``` | ||
| + | esptool --port / | ||
| + | ``` | ||
| + | ### Write Config to partition | ||
| + | ``` | ||
| + | esptool --port / | ||
| + | ``` | ||
| + | ### Read CONFIG from partition | ||
| + | ``` | ||
| + | esptool --port / | ||
| + | ``` | ||
| - | ===== Erase a partition area ===== | ||
| - | esptool_py/ | ||
| - | |||
| - | ===== Full Flash ===== | ||
| - | idf.py -p / | ||
| - | python -m esptool --chip esp32c3 -p / | ||
| - | |||
| - | ===== Write Application to partition ===== | ||
| - | python -m esptool --chip esp32c3 -p / | ||
| - | |||
| - | |||
| - | ===== Read/Write config partition ===== | ||
| - | === Write Config to partition === | ||
| - | esptool.py --port / | ||
| - | === Read CONFIG from partition === | ||
| - | esptool.py --port / | ||
esp/esp32/partitions.1788011452.txt.gz · Last modified: by oscar
