diff --git a/cpu/cortexm_common/ldscripts/cortexm_base.ld b/cpu/cortexm_common/ldscripts/cortexm_base.ld index f89e115fc8..2ed641a0f5 100644 --- a/cpu/cortexm_common/ldscripts/cortexm_base.ld +++ b/cpu/cortexm_common/ldscripts/cortexm_base.ld @@ -185,4 +185,9 @@ SECTIONS /* Round size so that we can use 4 byte copy in init */ . = ALIGN(4); } > bkup-ram + + .heap3 (NOLOAD) : ALIGN(4) { + _sheap1 = . ; + _eheap1 = ORIGIN(bkup-ram) + LENGTH(bkup-ram); + } > bkup-ram } diff --git a/cpu/sam0_common/include/cpu_conf.h b/cpu/sam0_common/include/cpu_conf.h index a35a866042..d8e93b0418 100644 --- a/cpu/sam0_common/include/cpu_conf.h +++ b/cpu/sam0_common/include/cpu_conf.h @@ -90,6 +90,13 @@ as shown in the NVM Row Organization figure. */ #endif /** @} */ +/** + * @brief The CPU has Low Power RAM that can be used as Heap + */ +#ifdef CPU_HAS_BACKUP_RAM +#define NUM_HEAPS (2) +#endif + #ifdef __cplusplus } #endif