Skip to content

[Question] Core 2.0 increased in size so much my code won't fit with (default) OTA Partition? (was using 1.0.6) #5697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Frtrillo opened this issue Sep 23, 2021 · 6 comments · Fixed by #5791
Assignees

Comments

@Frtrillo
Copy link

Hardware:

Board ESP32 Dev Module
Version/Date 1.0.6 2.0.0
IDE name Arduino IDE VSCode
Flash Frequency 80Mhz
PSRAM enabled no
Upload Speed 115200
Computer OS Windows 10

Description:

I ran my code with core 1.0.6 (94% size use) with default partition (as im using OTA HTTPUpdates).

So I went and updated core to 2.0 and with its increase in size I exceeded a bit the max. partition size.

I can upload my code of course if I change partition size to Huge APP (No OTA) but then I wouldn't be able to use HTTPUpdate( https://github.com/espressif/arduino-esp32/tree/master/libraries/HTTPUpdate)? Or is that only for Arduino IDE Updates and its different from HTTUpdates...

And If I try to use the other partition schemes my LittleFS code won't work

Debug Messages:

text section exceeds available space in board
The Sketch uses 1313501 bytes (100%) of the program storage space. The maximum is 1310720 bytes.
Global variables use 39536 bytes (12%) of dynamic memory, leaving 288144 bytes for local variables. The maximum is 327680 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
Error compilando para la tarjeta ESP32 Dev Module.
@alorbach
Copy link
Contributor

Facing the same problem, build with 1.0.4 before no problem with 2.0.0 I get this:

Sketch uses 2092697 bytes (106%) of program storage space. Maximum is 1966080 bytes.
Global variables use 62968 bytes (19%) of dynamic memory, leaving 264712 bytes for local variables. Maximum is 327680 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
text section exceeds available space in board

@Jason2866
Copy link
Collaborator

A solution could be to use OTA partitions with different sizes. The bigger for the running firmware and the smaller to store a gzip version of the uploaded new firmware. This firmware is extracted and flashed on the fly over the old firmware.

@alorbach
Copy link
Contributor

Interesting approach, any sample code or working samples?

@Speedy2k
Copy link

But the main question is why changing core version give so much bigger code?

@SuGlider
Copy link
Collaborator

Please check issue #5630
More at
#5630 (comment)

We are working to reduce binary size for next release 2.0.1.

In the issue #5630 you will see more details about how to test a beta version.

It is now better than 1.0.6 for several sketches.

@SuGlider
Copy link
Collaborator

This is solved by espressif/esp32-arduino-lib-builder#47
New sizes are better than in V1.0.6.
A draft core version for testing is in https://github.com/espressif/arduino-esp32/tree/mem-optimized
Next release 2.0.1RC1 will fix this binary size issue.

me-no-dev pushed a commit that referenced this issue Oct 21, 2021
)

Summary

Modifies WiFi lib to allow dynamic buffer allocation along with SPIRAM MALLOC enabled
This gives more heap space to the users

Related PR in Arduino Lib Builder: espressif/esp32-arduino-lib-builder#47

Impact

WiFi will work the same as it was in version 1.0.6, restoring free heap.

close #5630
close #5474
close #5699
close #5697
ewpa pushed a commit to ewpa/arduino-esp32 that referenced this issue Nov 15, 2021
…pressif#5791)

Summary

Modifies WiFi lib to allow dynamic buffer allocation along with SPIRAM MALLOC enabled
This gives more heap space to the users

Related PR in Arduino Lib Builder: espressif/esp32-arduino-lib-builder#47

Impact

WiFi will work the same as it was in version 1.0.6, restoring free heap.

close espressif#5630
close espressif#5474
close espressif#5699
close espressif#5697
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants