-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/esp*: fix linker scripts #15186
Merged
benpicco
merged 3 commits into
RIOT-OS:master
from
leandrolanzieri:pr/esp/fix_linker_scripts
Oct 9, 2020
Merged
cpu/esp*: fix linker scripts #15186
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
837ddf6
cpu/esp32/ld: use folder name instead of archive for module objects
leandrolanzieri eb2655b
cpu/esp8266/ld: use folder name instead of archive for module objects
leandrolanzieri b897637
tests: remove esp32-wroom-32 from blacklist of mtd using tests
leandrolanzieri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What's with this random driver getting special treatment 🤔
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.
I'm not really sure, maybe @gschorcht can clarify?
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.
Hm, yes I can clarify. In section Network Devices of the ESP8266 documentation it is mentioned that ESP8266 is working and has been tested with ENC28J60 and MRF24J40. However, the ENC28J60 works only if the driver code is placed in IRAM.
Since the IRAM of the ESP8266 is very limited and only has a size of 48 kByte, it is not possible to place code segments in the IRAM by default. The IROM of the ESP8266 on the other hand has 448 kByte. The IRAM is of course much faster, while the IROM is much slower and can only be accessed via a cache, which is also sometimes disabled, e.g. by the WiFi module or when writing to the flash.
Therefore, time-critical code as well as code that has to work even when the cache is disabled must be placed in the IRAM. Due to the limited size of the IRAM, fine-tuning is always required as to what must be placed in the IRAM and what can be placed in the IROM.
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.
The WiFi module disabling the cache is surprising! Wouldn't that mean that any code can be hit by the problem if another task gets scheduled while the WiFi driver has the cache disabled? Or are interrupts disabled together with the cache?
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.
@benpicco I'm not really sure (I just forgot too much in last 2 years doing other things 😟), but when I remember correctly, I had problems to access IROM when the WiFi module was active. So my guess at that time was (without knowing it definitely, there is no documentation) that it might be that the WiFi module is connected via SPI inside the SoC. That's why
esp_wifi
is already in IRAM. I could try it again.