Skip to content

Fix placement of code into RAM, enable gc-sections #857

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

Merged
merged 1 commit into from
Oct 6, 2015

Conversation

igrr
Copy link
Member

@igrr igrr commented Oct 5, 2015

Related to #856, #826, #803, #734.

Reduces size of the sketches somewhat.
Without this change (HelloServer sample sketch):

Sketch uses 349,510 bytes (33%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 45,674 bytes (55%) of dynamic memory, leaving 36,246 bytes for local variables. Maximum is 81,920 bytes.

With this change:

Sketch uses 225,310 bytes (21%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 36,506 bytes (44%) of dynamic memory, leaving 45,414 bytes for local variables. Maximum is 81,920 bytes.

Compile tests pass, but might break some sketches at run time. Needs testing.

igrr added a commit that referenced this pull request Oct 6, 2015
Fix placement of code into RAM, enable gc-sections
@igrr igrr merged commit c6cb9cd into esp8266 Oct 6, 2015
@Juppit
Copy link
Contributor

Juppit commented Oct 6, 2015

On 06.10.2015 at 01:23 wrote Ivan Grokhotkov:

|Sketch uses 349,510 bytes (33%) of program storage space. Maximum is
1,044,464 bytes. Global variables use 45,674 bytes (55%) of dynamic
memory, leaving 36,246 bytes for local variables. Maximum is 81,920 bytes. |

With this change:

|Sketch uses 225,310 bytes (21%) of program storage space. Maximum is
1,044,464 bytes. Global variables use 36,506 bytes (44%) of dynamic
memory, leaving 45,414 bytes for local variables. Maximum is 81,920 bytes. |

Compile tests pass, but might break some sketches at run time. Needs
testing.

Reduced my sketch size from 32% to 20% and RAM usage from 52% to 41%.
No problems occurred.
Great, once again.

@igrr igrr deleted the linker-sections-fix branch October 6, 2015 23:12
igrr added a commit that referenced this pull request Oct 29, 2015
Fix placement of code into RAM, enable gc-sections
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