-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
RFC: Remove CONFIG_BOOTLOADER_SRAM_SIZE #65121
Comments
@nordicjm, at first I was thinking that the code was wrong, but I think it is correct. It supposes the bootloader runs in xip, and assigns a ram region at the highest part to the bootloader. |
Seems like moving to partitioning the RAM in dts would be a solution |
Why. there is no problem with the existing solution. The application is always setup to the start of the ram, only a modification is applied to the bootloader. It would even be possible to reclaim the bootloader ram if there is no application written to the bootloader (ram) part. |
We use DTS for configuration, not Kconfig. |
Introduction
This is an RFC to discuss potentially removing of the Kconfig BOOTLOADER_SRAM_SIZE symbol, why you might ask, read on to find out why:
Problem description
This symbol sounds like it's useful for non-XIP applications, so you can have your application set up then set this symbol to the amount of RAM that your bootloader uses and away you go, thinking it would offset the start of your image by the value given. This however, is not the case, this is the Cortex-M code for this Kconfig:
So from looking at it, I don't really see what the point of this symbol is, it adjusts the total RAM size of your application, but does nothing to the base SRAM address? If you assume that the bootloader uses 64KB of RAM (at the start address of RAM, as we do other partitions e.g. flash) then want to load your application after, you can't use this Kconfig, you have to play with the Kconfigs for the RAM base address and total RAM size.
Proposed change
Remove this Kconfig. Alternatively, change it so it applies to the start of RAM and affects both the address and size, instead of just the end size address.
Concerns and Unresolved Questions
Unknown is anyone using this Kconfig, whom that is I do not know. @GAnthony since you seem to use this symbol on cc3220sf, do you have any input on this? And why it adjusts the end address of RAM to the application, not the start address and total size?
The text was updated successfully, but these errors were encountered: