Partion Scheme No OTA with PlatformIO

Hello
I can I do that with Platform IO
Partion Scheme No OTA with PlatformIO

Are we talking ESP8266 or ESP32?

Oh Sorry both would be perfect, ESP32 in this case.
Check this out for Information

Thx Stay healthy guys

I downloaded PlatformIO Documentation Release 4.3.1 2244 pages but not one word about this.
Wherever helps me please post your source

But doesn’t the doc say how to specify the partition table?

https://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables

What happens when you choose a CSV file which has no OTA partition?

So if we’re talking about the Arduino framework e.g., the default one is default.csv

But then try and use no_ota.csv

2 Likes

Thank you stay healthy

I don’t understand the solution.
Exactly where in the platform io IDE do you specify an alternative partition table?

The platformio.ini file. All documentation refering to instructions like

[env:some_environment_name]
some_option = some_value

refer to the platformio.ini, as this is PlatformIOs main configuration file. Adding a directive like

board_build.partitions = default_8MB.csv

to the platformio.ini will declare that partition table usage.

Thanks… the fact that you used .csv does that mean platform io converts it to bin automatically?
And finally (for now) where should the custom/aternative .csv file be located -or does it grab it from github.

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).