partition.csv in sketch folder being ignored

Serverguy
Posts: 8
Joined: Fri Apr 30, 2021 11:02 am

partition.csv in sketch folder being ignored

Postby Serverguy » Fri Mar 21, 2025 6:02 am

I placed a partition.csv in my sketch folder as per the instructions on the Espressif site. It is being ignored. I tried partition.csv and partitions.csv. It makes no difference. Using the Arduino IDE version 1.8.19. Version 2.x has too many problems to be able to use it.

I am on board definitions 3.1.3

Here's the partition.csv file:

Code: Select all

# Name,   Type, SubType,  Offset,   Size,    Flags
nvs,      data, nvs,      0x9000,   0x5000,
otadata,  data, ota,      0xe000,   0x2000,
app0,     app,  ota_0,    0x10000,  0x300000,
pix,      data, spiffs,   0x310000, 0x9E0000,
coredump, data, coredump, 0xcf0000, 0x10000,
When I compile, I get a smaller app partition. It is still honoring the selection from the Tools menu instead of using the custom file in the sketch folder.
Sketch uses 1130168 bytes (86%) of program storage space. Maximum is 1310720 bytes.
Global variables use 58164 bytes (17%) of dynamic memory, leaving 269516 bytes for local variables. Maximum is 327680 bytes.

lbernstone
Posts: 1132
Joined: Mon Jul 22, 2019 3:20 pm

Re: partition.csv in sketch folder being ignored

Postby lbernstone » Fri Mar 21, 2025 4:58 pm

The override file should be partitions.csv
The IDE is only looking at the partitions.csv during compilation, so it doesn't know the actual app size. That maximum size is just used as a sanity check; it has no effect on the firmware. Set your partition scheme to "custom" and don't expect a warning if you exceed the partition size. If you do want to have a warning, you could set up your own partition scheme with a couple lines in boards.local.txt.

Serverguy
Posts: 8
Joined: Fri Apr 30, 2021 11:02 am

Re: partition.csv in sketch folder being ignored

Postby Serverguy » Sun Apr 27, 2025 3:49 pm

This used to work. Using Custom or modifying the internal files is a loser because any upgrade loses those updates. The documentation says it works. It used to work. It now does NOT work and needs to be fixed. I tried this on 3.1.3 and 3.2.0 and it fails on both. I don't remember exactly when it work properly last. I went from boards version 2 to 3.1.3 without using any intermediate versions. The linker is ignoring the correct partitions.csv that is being copied from the sketch folder to the build temp folder and using whatever the Tools menu option is pointint to. That's wrong! This has been tested on Windows (2 machines) on both Arduino IDE v1 and v2 and a Mac. Fails everywhere. There are other documentation or implementation problems that need to be addressed but, first, let's get this being honored again like the documentation says, then work on the formatting and documentation issues.

dCan someone please make this work again? When I modify a file in the partitions folder and then point to it, it does work but if I use the file in the sketch folder and point the Tools partitions size to something else, it uses that something else and I lose my 3M for app and my 12M for LittleFS.

Please don't say that the file is simply advisory. It is not. It is THE partitions table that should be used. I have a separate forum entry telling about this failure, too.

Serverguy
Posts: 8
Joined: Fri Apr 30, 2021 11:02 am

Re: partition.csv in sketch folder being ignored

Postby Serverguy » Sun Apr 27, 2025 3:52 pm

partitions.csv is not only being looked at during compilation. It is also honored during uploading to LittleFS. Now what is being look at, at that time, is probably the loaded .bin image but I am not sure of that. I have not testing changing the partitions.csv between compilation and uploading files to LittleFS. Either way, it is THE file that controls everything about memory layout. It is important and controls it all.

Serverguy
Posts: 8
Joined: Fri Apr 30, 2021 11:02 am

Re: partition.csv in sketch folder being ignored

Postby Serverguy » Sun Apr 27, 2025 3:54 pm

No, the partitions layout is also being used, either in the original but probably in the .bin format, during loading data to spiffs, LittleFS or FAT. It is THE controlling file for memory layout.

Who is online

Users browsing this forum: No registered users and 3 guests