-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Leave only some parts of SDK in iram #1710
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,24 @@ SECTIONS | |
*(.init.literal) | ||
*(.init) | ||
|
||
*sdk/esp_iot_sdk_*lib/lib*.a:*(.literal .text) | ||
/* SDK libraries that used in bootup process, interruption handling | ||
* and other ways where flash cache (iROM) is unavailable: */ | ||
*libmain.a:*(.literal .text) | ||
*libnet80211.a:*(.literal .text) | ||
*libphy.a:*(.literal .text) | ||
*libpp.a:*(.literal .text) | ||
*libgcc.a:*(.literal .text) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this list is complete. Have a look at the output of this:
It seems the following libs also have some things in IRAM:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This list is incomplete for "all libs that have something in iRAM" but complete for "all libs that should have something in iRAM". Rationale of my way is to keep iRAM as clean as possible. Sure, originally Espressif wasn't just include "safe unaligned access" patch in core library, so I think there was something similar in their internal testing process (if it was generally), so after tons of changes, them kept listed libs in iRAM just for historical reasons. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, sorry I forgot the testing you did back on that PR. And yeah, I'm not against kicking things out of IRAM if they don't have to be there, I'd just like it to be a very conscious decision, with a note about each lib we've done that to left in there. Regarding unaligned accesses though, the constraints are the same for mapped flash and IRAM, but it's all a bit tangential to the main discussion :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So okay, I was added a note about it. I think this is enough to go. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds like a good idea! |
||
|
||
/* Following SDK libraries have .text sections, but not included in iRAM: */ | ||
/* *libat.a:*(.literal .text) - not used anywhere in NodeMCU */ | ||
/* *libcrypto.a:*(.literal .text) - tested that safe to keep in iROM */ | ||
/* *libdriver.a:*(.literal .text) - not used anywhere in NodeMCU */ | ||
/* *libespnow.a:*(.literal .text) - not used anywhere in NodeMCU */ | ||
/* *libmesh.a:*(.literal .text) - not used anywhere in NodeMCU */ | ||
/* *liblwip_536.a:*(.literal .text) - source-based library used instead */ | ||
/* *libpwm.a:*(.literal .text) - our own implementation used instead */ | ||
/* *libwpa.a:*(.literal .text) - tested that safe to keep in iROM */ | ||
/* *libwps.a:*(.literal .text) - tested that safe to keep in iROM */ | ||
|
||
*(.iram.text .iram0.text) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could I request a comment here stating that we're intentionally excluding
libwps.a
even though it claims to have iram'd functions?