It appears to me that loading with dfu-util the partition table is never reset. Loading a sketch into the Nano ESP32 just loads into the next OTA partition without rewriting the partition table.
I am unable to change the partitions on an Arduino Nano ESP32 (ESP32) board. This is not Arduino Nano ESP32 (Arduino ESP32 Boards). The same partition table, boards.txt modification, etc., works on UM Tiny S3. I cannot get anything but the default partitions even if I copy my csv file into the sketch directory as partitions.csv. This same csv file works on the UM Tiny S3 and if I introduce an error just to see if anyone actually reads it, it does generate errors.
====================================================
What I have found:
I get the same result if I copy my partition table into the sketch directory as partitions.csv
If I look in ~/AppData/Local/Temp/arduino/sketches/[UUID] at partitions.csv, the contents of mypartitions.csv are there.
The following command line argument is passed to all of the xtensa-esp32s3-elf-g++
-DARDUINO_PARTITION_mypartitions
The ~/AppData/Local/Temp/arduino/sketches/[UUID]/partitions.csv is passed to gen_esp32part.exe
and I do not see that the file has ever been copied over. Even after the build is complete
that partitions.csv file still contains the contents of mypartitions.csv
gen_esp32part.exe then generates the Mysketch.ino.partitions.bin that contains the output that indicates that it used my partition table.
xtensa-esp32s3-elf-size reports the appropriate sizes from the values in boards.txt
Sketch uses 289597 bytes (16%) of program storage space. Maximum is 1703936 bytes.
Global variables use 30732 bytes (9%) of dynamic memory, leaving 296948 bytes for local variables. Maximum is 327680 bytes.
Arduino15\packages\arduino\tools\dfu-util\0.11.0-arduino5/dfu-util uploads the sketch if I am doing an upload
====================================================
The Sketch:
Just a dumb little sketch that iterates through the partition table and outputs the results through Serial.printf
It uses iterator = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, NULL);
then partition = esp_partition_get(iterator);
====================================================
Setup:
Connect my board
Select the board Arduino Nano ESP32 (Esp32)
Note: This is NOT Arduino Nano ESP32 (Arduino ESP32 Boards)
Delete AppData/Local/Temp/arduino* directories
Delete AppData/Roaming/arduino* directories
Delete build/esp32.esp32.nano_nora directory
Start the Arduino 2.3.2 IDE (The problem occurs with VSCode too)
====================================================
Build 1:
Select With Spiffs partition (advanced) which is the default
The csv file in tools/partitions:
app3M_spiffs9M_fact512k_16MB.csv:
Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
app1, app, ota_1, 0x310000, 0x300000,
spiffs, data, spiffs, 0x610000, 0x960000,
factory, app, factory, 0xF70000, 0x80000,
coredump, data, coredump, 0xFF0000, 0x10000,
As reported by gen_esp32part.py after Export Compiled Binary:
Parsing binary partition input...
Verifying table...
ESP-IDF Partition Table
Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,20K,
otadata,data,ota,0xe000,8K,
app0,app,ota_0,0x10000,3M,
app1,app,ota_1,0x310000,3M,
spiffs,data,spiffs,0x610000,9600K,
factory,app,factory,0xf70000,512K,
coredump,data,coredump,0xff0000,64K,
As reported by the uploaded software iterating through the partition table:
Partition List
Name Type Subtype Address Size Encrypted
nvs data nvs 00009000 00005000 No
otadata data ota sel 0000e000 00002000 No
app0 app ota 0 00010000 00300000 No
app1* app ota 1 00310000 00300000 No
ffat data fat 00610000 00960000 No
factory app factory 00f70000 00080000 No
coredump data coredump 00ff0000 00010000 No
====================================================
Between Builds:
Delete AppData/Local/Temp/arduino* directories
Delete AppData/Roaming/arduino* directories
Delete build/esp32.esp32.nano_nora directory
====================================================
Build 2:
Select My partition scheme
The mypartitions.CSV file:
Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1A0000,
app1, app, ota_1, , 0x1A0000,
app2, app, ota_2, , 0x1A0000,
app3, app, ota_3, , 0x1A0000,
spiffs, data, spiffs, , 0x20000,
coredump, data, coredump, , 0x10000,
As reported by gen_esp32part.py after Export Compiled Binary:
Parsing binary partition input...
Verifying table...
ESP-IDF Partition Table
Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,20K,
otadata,data,ota,0xe000,8K,
app0,app,ota_0,0x10000,1664K,
app1,app,ota_1,0x1b0000,1664K,
app2,app,ota_2,0x350000,1664K,
app3,app,ota_3,0x4f0000,1664K,
spiffs,data,spiffs,0x690000,128K,
coredump,data,coredump,0x6b0000,64K,
As reported by the uploaded software iterating through the partition table:
Partition List
Name Type Subtype Address Size Encrypted
nvs data nvs 00009000 00005000 No
otadata data ota sel 0000e000 00002000 No
app0 app ota 0 00010000 00300000 No
app1* app ota 1 00310000 00300000 No
ffat data fat 00610000 00960000 No
factory app factory 00f70000 00080000 No
coredump data coredump 00ff0000 00010000 No
The software reports the same partition table as the default.
1 post - 1 participant