1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 06:53:52 +01:00

Merge pull request #21559 from derMihai/mir/backup_noinit

cpu/cortexm_common: add .backup.noinit section
This commit is contained in:
Teufelchen 2025-06-24 10:18:47 +00:00 committed by GitHub
commit 3ad34d837c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -162,6 +162,12 @@ extern "C" {
* and initialized with user provided data on cold boot.
*/
#define BACKUP_RAM_DATA __attribute__((section(".backup.data")))
/**
* @brief Memory marked with this attribute is retained during deep sleep
* and never initialized.
*/
#define BACKUP_RAM_NOINIT __attribute__((section(".backup.noinit")))
#endif /* CPU_HAS_BACKUP_RAM */
/**

View File

@ -229,6 +229,12 @@ SECTIONS
. = ALIGN(4);
} > bkup_ram
.backup.noinit (NOLOAD) : ALIGN(4) {
_sbackup_noinit = .;
*(.backup.noinit)
_ebackup_noinit = .;
} > bkup_ram
.heap3 (NOLOAD) : ALIGN(4) {
_sheap1 = . ;
_eheap1 = ORIGIN(bkup_ram) + LENGTH(bkup_ram);