-
Notifications
You must be signed in to change notification settings - Fork 2.1k
cpu/esp32: define RAM_START_ADDR and RAM_LEN #19763
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
Conversation
bors try |
tryBuild failed: |
65528ce
to
87a9d63
Compare
bors try |
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.
Looks good and I really like the assert for checking the defines in C match the linked firmware
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. |
bors merge |
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. |
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_LEN
was 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_ADDR
andRAM_LEN
incpu/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_LEN
andRAM_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
riotboot
module 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