Skip to content

Sets compiler optimization to Size (-Os) #5789

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
wants to merge 1 commit into from
Closed

Sets compiler optimization to Size (-Os) #5789

wants to merge 1 commit into from

Conversation

SuGlider
Copy link
Collaborator

@SuGlider SuGlider commented Oct 20, 2021

Summary

It changes the compiler optimization to Size for esp32, esp32S2 and esp32C3
It is just a part of the improvement. Another piece is in Arduino Lib Builder.
See espressif/esp32-arduino-lib-builder#47

Impact

It will reduce the size of final binary

Related issue: #5630 #5474

@SuGlider SuGlider self-assigned this Oct 20, 2021
me-no-dev pushed a commit to espressif/esp32-arduino-lib-builder that referenced this pull request Oct 21, 2021
on commit deacf43

sdkconfig modifications to build libraries with compile optimization to size (-Os)
keep all the bootloaders with -Os and no boot messages
changes max number of sockets from 10 to 16
disables LWIP "Experimental PPP and SLIP" because it adds about 60K to the binary size and it's not used in Arduino
on commit a133257

sets WIFI LWIP to try first to allocate from SPIRAM on esp32 (this is esp32s2 default configuration)
defines SPIRAM_MALLOC_ALWAYSINTERNAL to 4096 bytes on esp32 (same as default for esp32s2)
disables SPIRAM_MALLOC_RESERVE_INTERNAL on both esp32 and esp32s2 to release more RAM to heap
Related PRs in Arduino-ESP32:
espressif/arduino-esp32#5789
espressif/arduino-esp32#5791

Related issue:
espressif/arduino-esp32#5699
espressif/arduino-esp32#5474
espressif/arduino-esp32#5630
espressif/arduino-esp32#5751
@me-no-dev me-no-dev closed this Oct 21, 2021
@SuGlider SuGlider deleted the bin-size branch October 21, 2021 14:28
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 this pull request may close these issues.

2 participants