cpu: add BACKUP_RAM attribute#13646
Conversation
gschorcht
left a comment
There was a problem hiding this comment.
I'm wondering whether it would make sense to have a default definition as fallback?
|
I don't think there could be a good fallback. Using |
|
Are you sure that |
|
BTW, we should also have a shortcut for |
I'm open to suggestions for a better name, however from my understanding it makes no difference for the software how that memory is wired up electrically.
I agree. |
|
@benpicco Please squash |
Contribution description
Many platforms provide a special memory section that is retained during Deep Sleep when all other state is lost.
RIOT already has support for putting data in this memory, but writing
__attribute__((section(".backup.bss")))is clunky and hard to memorize.Even worse, it's not consistent across platforms.
This introduces an easy to use
definethat makes placing things in this memory much easier to look at.It also allows applications to fall back to using
.noinitif no backup memory is available by doingThen memory might not be retained during Deep Sleep, but there is a good chance it stays the same across reboots, which might be the next best thing.
Testing procedure
Only introduces a define for readability, but you can run
tests/periph_backup_ram.Issues/PRs references
suggested in #13519 (comment)