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
Hot Topic (More than 8 Replies) ESP32 - Program too big - Custom partition file (Read 2591 times)
Acuario
Full Member
***
Offline


Posts: 233
Location: Spain
Joined: Aug 28th, 2015
ESP32 - Program too big - Custom partition file
Nov 29th, 2022 at 7:19am
Print Post  
Hi,
I upgraded to V2.0 (deleted the .vcproj files) and re-ran the build on my project, ESP32, (which is quite big).
I now get a build failure (program too big).
I have a custom partitions file that I use to partition the build.

The output from the 'old' format is:
Quote:
## recipe.objcopy.partitions.bin.pattern
s/gen_esp32part.exe" -q ons.csv" r32.ino.partitions.bin"

Program Inverter32 size: 1,351,625 bytes (used 40% of a 3,342,336 byte maximum) (326.15 secs)
Minimum Memory Usage: 63720 bytes (19% of a 327680 byte maximum)


And the V2.0 is:
Quote:
## recipe.objcopy.partitions.bin.pattern
s/gen_esp32part.exe" -q ons.csv" r32.ino.partitions.bin"
Program too big. The size is 1351465 bytes (of a 1310720 byte maximum). Ensure debugging is OFF and/or see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Build failed for project 'Inverter32'


Any idea why it's failing - nothing else has changed. If I revert back to the 'old' vm everything is ok.
« Last Edit: Nov 29th, 2022 at 7:25pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Acuario
Full Member
***
Offline


Posts: 233
Location: Spain
Joined: Aug 28th, 2015
Re: VM V2.0 build failure - program too big
Reply #1 - Nov 29th, 2022 at 7:46am
Print Post  
A bit more testing - I found the settings in VM for the partition scheme was different between the 2 builds - changing this to the same partition scheme as the 'old' VM allowed the build to complete.

But the question is - when I supply my own partition scheme shouldn't this take preference and override any default setting?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: VM V2.0 build failure - program too big
Reply #2 - Nov 29th, 2022 at 10:07am
Print Post  
Thanks for the report.

Can you supply the full build log with the verbose and show build properties set as shown at the top of the page, if possible in the old and new vMicro versions?

Also, is your custom partitions.csv in the project folder?
  
Back to top
 
IP Logged
 
Acuario
Full Member
***
Offline


Posts: 233
Location: Spain
Joined: Aug 28th, 2015
Re: ESP32 - Program too big - Custom partition file
Reply #3 - Nov 29th, 2022 at 5:30pm
Print Post  
Hi,
only differences were Option 6, partition scheme.
With default 4Mb (1.2M app, 1.5M SPIFFS) it fails with program too big, with 8M with spiffs (3M app/1.5M SPIFFS) it is ok.
My partitions.csv file is in the project folder in the same folder as the .ino and all the source files.

My understanding was that a custom partition file would override the default partitions.
I have emailed the log files - both from V2.0 as it does not seem to be related to the VM version after all.
« Last Edit: Nov 29th, 2022 at 7:25pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: ESP32 - Program too big - Custom partition file
Reply #4 - Dec 2nd, 2022 at 3:47pm
Print Post  
Thanks for the logs and the detail around this, and for confirming it is unrelated to the versions.

The build logs sent so far show the custom paritions.csv file being copied to the build folder, but the size reported doesn't seem to reflect the partitions.csv changes...

Can you email or attach your custom partitions.csv file so we can replicate the issue more accurately?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: ESP32 - Program too big - Custom partition file
Reply #5 - Dec 2nd, 2022 at 4:39pm
Print Post  
Off-Topic replies have been moved to this Topic.

Partitions related to this post:
# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x330000,
app1,     app,  ota_1,   0x340000,0x330000,
spiffs,   data, spiffs,  0x670000,0x190000
« Last Edit: Dec 2nd, 2022 at 4:40pm by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: ESP32 - Program too big - Custom partition file
Reply #6 - Dec 2nd, 2022 at 6:24pm
Print Post  
Just to check, is the previous post your custom partitions file detail from the project directory?

The only reason for asking is it appears to be identical to the "8M with spiffs (3MB APP/1.5MB SPIFFS)" file, which is automatically included when using that Partition Scheme option (if there isn't one in the project folder).  I expected your custom one to be different, or should we be using the other one you posted (below), with the 8M with Spiffs board option set?
Code
Select All
Here is the partition for the 16Mb ESP32
#7Mb app, OTA, 1.8Mb spiffs
# Name,   Type, SubType,  Offset,   Size,  Flags
nvs, data, nvs, 0x9000, 0x24000,
otadata, data, ota, 0x2D000, 0x3000,
app0, app, ota_0, 0x30000, 0x700000,
app1, app, ota_1, 0x730000, 0x700000,
spiffs, data, spiffs, 0xE30000, 0x1D0000 



Sorry for any confusion on my part here...
  
Back to top
 
IP Logged
 
Acuario
Full Member
***
Offline


Posts: 233
Location: Spain
Joined: Aug 28th, 2015
Re: ESP32 - Program too big - Custom partition file
Reply #7 - Dec 3rd, 2022 at 4:05am
Print Post  
I was testing with the 8Mb custom partition - this builds/doesn't depending on the VM option setting - the VM setting should be overridden so shouldn't affect the build.

The 7Mb is what I'm trying to use (as I have a 16M ESP32) and is giving other problems.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: ESP32 - Program too big - Custom partition file
Reply #8 - Dec 5th, 2022 at 1:07pm
Print Post  
Thanks for the confirmation.

From what we can see the custom partitions.csv is being used correctly in the build process and upload, however the property which determines the maximum sketch size is not overridden automatically by the partitions.csv. This also seems identical in the Arduino IDE so far.

If you add a local board.txt to your project, and paste in the below contents, it should override the maximum upload size to be 7MB as in your partitions file:
Code
Select All
# Override the Max Sketch Size for custom partitions, use the "8M with spiffs (3MB APP/1.5MB SPIFFS)" board option selection
# And include the custom partitions.csv in the Project Folder
esp32.menu.PartitionScheme.default_8MB.upload.maximum_size=7340032 

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: ESP32 - Program too big - Custom partition file
Reply #9 - Dec 6th, 2022 at 1:38pm
Print Post  
We are working on an update to use the application size from the custom partitions.csv if one is present.

From the specification for the partitions.csv it states that the first app partition must be at offset 0x10000, however your custom table has it at offset 0x30000.
https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/t...

Does your partition file function as expected when used in an upload (with the board.txt workaround to get past the size error)?

Can you validate the partitions.csv file and work through any issues with the segmentation with the ESP32 community, and then let us know when this is correct?
« Last Edit: Dec 6th, 2022 at 2:17pm by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Acuario
Full Member
***
Offline


Posts: 233
Location: Spain
Joined: Aug 28th, 2015
Re: ESP32 - Program too big - Custom partition file
Reply #10 - Dec 6th, 2022 at 4:24pm
Print Post  
I used the partition generator in Google Docs to create/validate the partition file, referenced here: https://www.esp32.com/viewtopic.php?t=18575

It all seems to work ok, using my partition I can build/deploy (using OTA) and everything works as expected.

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: ESP32 - Program too big - Custom partition file
Reply #11 - Dec 6th, 2022 at 4:47pm
Print Post  
Thanks for confirming, we just wanted to be sure of our implementation as the specification seems explicit about that offset.

We will update when the version which uses the custom partition data to work out the maximum size for the compiled sketch.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint