I have a ‘weird’ problem regarding the partition configuration for my custom board. Here’s my project folder:
project_root
|-.pio
|-boards
| |-myboard.json
| |-mypartition.csv
|-...
|-platformio.ini
Board:
{
"build": {
"arduino": {
"ldscript": "esp32_out.ld",
"partitions": "boards/mypartition.csv"
},
"core": "esp32",
"extra_flags": "-DARDUINO_ESP32_DEV",
"f_cpu": "240000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"mcu": "esp32",
"variant": "esp32"
},
"connectivity": [
"wifi",
"bluetooth"
],
"debug": {
"openocd_board": "esp-wroom-32.cfg"
},
"frameworks": "arduino",
"name": "MY BOARD",
"upload": {
"flash_size": "16MB",
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 921600
},
"url": "-",
"vendor": "-"
}
Partition:
#name, type, subtype, offset, size, flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xE000, 0x2000,
factory, app, factory, 0x10000, 0x200000,
app0, app, ota_0, 0x210000, 0x200000,
app1, app, ota_1, 0x410000, 0x200000,
spiffs, data, spiffs, 0x610000, 0x9E4000,
I’ve set "partitions": "boards/mypartition.csv"
inside myboard.json
and set board = myboard
on platformio.ini
. When it built, the terminal showing the app flash size (total) is 1310720 bytes which if I’m not mistaken is the default partition size. But if I add an additional line board_build.partitions = boards/mypartition.csv
on the ini file it will be built in the correct size (~2MB).
Is this behavior expected? Why the compiler doesn’t register the partition configuration that I’ve already put on my board file?