cpu/cortexm_common: define BACKUP_RAM attribute

This commit is contained in:
Benjamin Valentin 2020-03-16 23:34:15 +01:00 committed by Benjamin Valentin
parent 7be303f12f
commit a11bcdcd5c

View File

@ -73,6 +73,20 @@ extern "C" {
*/ */
#define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".puf"))) #define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".puf")))
#if CPU_HAS_BACKUP_RAM || DOXYGEN
/**
* @brief Memory marked with this attribute is retained during deep sleep
* and initialized with 0 on cold boot.
*/
#define BACKUP_RAM __attribute__((section(".backup.bss")))
/**
* @brief Memory marked with this attribute is retained during deep sleep
* and initialized with user provided data on cold boot.
*/
#define BACKUP_RAM_DATA __attribute__((section(".backup.data")))
#endif /* CPU_HAS_BACKUP_RAM */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif