Chapter 4. API Guides
4.22.4 Generating Binary Partition Table
The partition table which is flashed to the ESP32-S2 is in a binary format, not CSV. The tool
tion_table/gen_esp32part.py
If you configure the partition table CSV name in the project configuration (idf.py menuconfig) and then build
the project or run idf.py partition-table, this conversion is done as part of the build process.
To convert CSV to Binary manually:
python gen_esp32part.py input_partitions.csv binary_partitions.bin
To convert binary format back to CSV manually:
python gen_esp32part.py binary_partitions.bin input_partitions.csv
To display the contents of a binary partition table on stdout (this is how the summaries displayed when running
idf.py partition-table are generated:
python gen_esp32part.py binary_partitions.bin
4.22.5 Partition Size Checks
The ESP-IDF build system will automatically check if generated binaries fit in the available partition space, and will
fail with an error if a binary is too large.
Currently these checks are performed for the following binaries:
• Bootloader binary must fit in space before partition table (see
• App binary should fit in at least one partition of type"app" . If the app binary doesn' t fit in any app partition,
the build will fail. If it only fits in some of the app partitions, a warning is printed about this.
Note: Although the build process will fail if the size check returns an error, the binary files are still generated and
can be flashed (although they may not work if they are too large for the available space.)
Note: Build system binary size checks are only performed when using the CMake build system. When using the
legacy GNU Make build system, file sizes can be checked manually or an error will be logged during boot.
MD5 checksum
The binary format of the partition table contains an MD5 checksum computed based on the partition table. This
checksum is used for checking the integrity of the partition table during the boot.
The MD5 checksum generation can be disabled by the --disable-md5sum option of gen_esp32part.py
or by the
CONFIG_PARTITION_TABLE_MD5
4.22.6 Flashing the partition table
• idf.py partition-table-flash: will flash the partition table with esptool.py.
• idf.py flash: Will flash everything including the partition table.
A manual flashing command is also printed as part of idf.py partition-table output.
Espressif Systems
is used to convert between CSV and binary formats.
option.
1437
Submit Document Feedback
Bootloader
Size).
parti-
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?