Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem with custom partitions (Read 1974 times)
My Screen Name
Junior Member
**
Offline


Posts: 13
Joined: Nov 7th, 2023
Problem with custom partitions
Apr 16th, 2024 at 5:27am
Print Post  
Working on a project with an ESP32-S3 N16R8.

If I compile and upload my sketch using the default partition scheme of 'Default 4MB with spiffs' all is well.

When I add a partitions.csv file to my project folder (where the *.ino lives) with the following content (which is a slightly changed version of the default.csv):

Code
Select All
# Name,     Type, SubType,  Offset,  Size, Flags
nvs,        data, nvs,      0x9000,  0x5000,
otadata,    data, ota,      0xE000,  0x2000,
app0,       app,  ota_0,    0x10000, 0x80000,
app1,       app,  ota_1,    0x90000, 0x80000,
spiffs,     data, spiffs,   0x110000,0x80000,
sensordata, data, undefined,0x190000,0x270000, 



Then the build shows the correct new size for app0 ('Used X% of a 524288 byte maximum', which is the 0x8000) so the build process has noticed the partitions.csv file but when I try to upload the sketch esptool fails with

No such file or directory Quote:
Try.ino.partitions.bin


That FlashTry.ino.partitions.bin is preceeded by a path but whatever I try I can't get that path to be displayed here in this post.

What am I missing? From the documentation I understood that just having the partitions.csv file (in the correct place) should be enough. Right?
« Last Edit: Apr 16th, 2024 at 5:34am by My Screen Name »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Problem with custom partitions
Reply #1 - Apr 16th, 2024 at 9:33am
Print Post  
Can you confirm your file is just called "partitions.csv"?

It should be in the below location:
[url]C:\Users\Edwin Oude Vrielink\Documents\Arduino\FlashTry\FlashTry\partitions.csv[/url]
  
Back to top
IP Logged
 
My Screen Name
Junior Member
**
Offline


Posts: 13
Joined: Nov 7th, 2023
Re: Problem with custom partitions
Reply #2 - Apr 16th, 2024 at 10:34am
Print Post  
Yes, I confirm that exactly as I said in my opening post the file is called partitions.csv and it's in the very same directory as my .ino file.

I also got an email telling me to enable the options at the top of the page and attach that as output but I had already done that by emailing it.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Problem with custom partitions
Reply #3 - Apr 16th, 2024 at 12:12pm
Print Post  
Thanks for confirming.

In the logfile it seems there must be something different as the recipe.hooks.prebuild.1.pattern doesn't seem to copy the partitions.csv from the project folder to the build folder as expected.  But....

The root cause of the upload issue is related to the error towards the end of the log for the "recipe.objcopy.partitions.bin.pattern" pattern:
Error at line 7*: Value undefined is not valid. Known keywords: esphttpd, phy, efuse, nvs, fat, spiffs, ota, coredump, nvs_keys

So it does seem to be using your custom partitions, just that the "undefined" partition is not allowed by the gen_esp32part.exe tool, so that needs correcting in the partitions.csv (or the tool used to generate it):
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/partition...
  
Back to top
IP Logged
 
My Screen Name
Junior Member
**
Offline


Posts: 13
Joined: Nov 7th, 2023
Re: Problem with custom partitions
Reply #4 - Apr 16th, 2024 at 12:26pm
Print Post  
That's odd because the very page you link to - and which I had read before of course - mentions that

"When type is data, the subtytpe can be specified as..." and 1 of the listed predefined data subtypes is

"undefined" (0x06)

But if that for whatever reason doesn't work, what else would be a good subtype to store sensordata to? All the other listed ones have a specific meaning that is not applicable to my sensordata which will be a lot of binary data.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Problem with custom partitions
Reply #5 - Apr 16th, 2024 at 12:35pm
Print Post  
From the documentation it seems that "undefined" can be used in theory, though it is implied if the sub type is not present.

A quick test here it seems happier with the blank subtype than with the undefined one.
« Last Edit: Apr 16th, 2024 at 12:39pm by Simon@Visual Micro »  
Back to top
IP Logged
 
My Screen Name
Junior Member
**
Offline


Posts: 13
Joined: Nov 7th, 2023
Re: Problem with custom partitions
Reply #6 - Apr 16th, 2024 at 9:51pm
Print Post  
I can confirm that leaving subtype blank, or using nvs does work and solves my problem. Thanks for your help.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint