cpu/sam0_common: hook up low power RAM as extra heap

This enables unused low-lower RAM on saml21/samd5x to be used for
heap memory.
This commit is contained in:
Benjamin Valentin 2019-12-12 00:42:53 +01:00 committed by Benjamin Valentin
parent 24ed1bbb70
commit cfd0ef415e
2 changed files with 12 additions and 0 deletions

View File

@ -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
}

View File

@ -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