cpu/esp32: define RAM_START_ADDR and RAM_LEN#19763
Merged
bors[bot] merged 2 commits intoRIOT-OS:masterfrom Jun 26, 2023
Merged
Conversation
Contributor
Author
|
bors try |
Contributor
tryBuild failed: |
65528ce to
87a9d63
Compare
Contributor
Author
|
bors try |
maribu
approved these changes
Jun 25, 2023
Member
maribu
left a comment
There was a problem hiding this comment.
Looks good and I really like the assert for checking the defines in C match the linked firmware
Contributor
tryBuild succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Member
|
bors merge |
Contributor
|
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contribution description
This PR fixes the problem
for ESP32x SoCs that was introduced with PR #19746. The reason for the error message was that
RAM_LENwas not defined for ESP32x SoCs.The solution is a bit tricky since ESP32x SoCs use a combination of SRAMs of different sizes and with different byte/word access requirements. Additionally, several hardware components such as the instruction cache or the Bluetooth controller share the RAM so that the start address and the size that is usable may differ depending on the hardware components used and configured parameters like the cache size a.s.o.
Therefore, the DRAM region parameters as defined in the memory layout of the linker scripts are used to define
RAM_START_ADDRandRAM_LENincpu/esp32/Makefile.include. Some checks have been added to the linker scripts to ensure that the same parameters are used in the linker scripts and forRAM_LENandRAM_START_ADDR. This is to ensure that none of the parameters are changed without generating an assertion.Note: Since I don't know for what other purposes than the
riotbootmodule these parameters might be relevant, I'm not sure if the values represent what they are supposed to.Testing procedure
Green CI with full compilation
Issues/PRs references
Fixes PR #19746