EDIT: corrected text.
The partition table files are in CSV format, not .bin
. It’s a text / table like
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x140000,
app1, app, ota_1, 0x150000,0x140000,
spiffs, data, spiffs, 0x290000,0x170000,
The compilation process will then use the layout described in the partition table to build the final firmware files (in .elf and .bin format). This includes converting the partition table into the format that is used in flash, using the gen_32part.py
tool. This already goes into the final firmware.
Example
“c:\users\max\appdata\local\programs\python\python38\python.exe” “C:\Users\Max.platformio\packages\framework-arduinoespressif32\tools\gen_esp32part.py” -q partitions.csv .pio\build\esp32dev_root\partitions.bin
The build process will search in the Arduino core package for the partition table. PlatformIO has a copy of the Arduino-ESP32 github content (with all the partition tables ofc) locally, in e.g. C:\Users\<user>\.platformio\packages\framework-arduinoespressif32
on Windows. So it will first look there. It never contacts the Github page. If the file is not found there, it will be looked for in your project folder.
So, if I write
board_build.partitions = my_partitions.csv
in my platformio.ini
, I should have the my_partitions.csv
file in the project folder, at the same level as the platformio.ini
file (not in src/
or wherever).