Skip to content
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

Change remove floating point libs from IRAM #8047

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

s-hadinger
Copy link
Collaborator

Description:

Changed linker script to move all floating point libs from libgcc.a out of IRAM. No interrupt handler is using float/double so we can safely move them back to IROM.

This is a quick and dirty patch, I'm sending a PR to Arduino Core in parallel to make it a compile flag.

IRAM size reduction:

  • Tasmota (std): from 31660 to 30620 (-1040 bytes)
  • Tasmota-sensors: from 31656 to 30616 (-1040 bytes)
  • Tasmota-IR: from 29364 to 28324 (-1040 bytes)

The actual change is adding the following in eagle.app.v6.common.ld in section .irom0.text::

    *libgcc.a:*f2.o(.literal .text)
    *libgcc.a:*f3.o(.literal .text)
    *libgcc.a:*fsi.o(.literal .text)
    *libgcc.a:*fdi.o(.literal .text)
    *libgcc.a:*ifs.o(.literal .text)
    *libgcc.a:*idf.o(.literal .text)

Checklist:

  • The pull request is done against the latest dev branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR.
  • The code change is tested and works on core Tasmota_core_stage
  • The code change pass travis tests. Your PR cannot be merged unless tests pass
  • I accept the CLA.

@arendst arendst merged commit 88278c8 into arendst:development Apr 1, 2020
@Jason2866
Copy link
Collaborator

5 test devices with different sensors does work without a issue with this PR

@arendst
Copy link
Owner

arendst commented Apr 1, 2020

I store my source on "Google Drive". This fails the compiler as the linker path contains a space in the path. Moving the source to a non spaced folder works fine.

Working on renaming "Google Drive" to "GoogleDrive"...

@s-hadinger
Copy link
Collaborator Author

This is probably not the best way to force a local linker script, but I didn't find a better way.

Anyways, I hope the PR esp8266/Arduino#7180 will be quickly merged in Arduino Core. After that it will only be a compilation flag.

@arendst
Copy link
Owner

arendst commented Apr 1, 2020

Fixed it by removing and re-installing Google Drive pointing it to a renamed folder. Very (in)flexible this Google stuff.

@Jason2866
Copy link
Collaborator

Another way would be patching the file on the fly.
https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html#override-package-files

EspEasy is doing this. Example PUYA patch

@s-hadinger
Copy link
Collaborator Author

That's very interesting, I didn't know this feature. I'm a bit reluctant to use patch files, they can very easily break whenever Arduino updates their files.

s-hadinger added a commit to s-hadinger/Tasmota that referenced this pull request Apr 3, 2020
@s-hadinger s-hadinger deleted the fp_in_irom branch April 6, 2020 09:31
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.

None yet

3 participants