Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cpu/cortexm_common/include/cpu_conf_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

/**
Expand Down
6 changes: 6 additions & 0 deletions cpu/cortexm_common/ldscripts/cortexm_base.ld
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down