samd: template.ld: put canram in its own output section

This commit is contained in:
Jeff Epler 2020-09-18 13:54:03 -05:00
parent c39ec1581e
commit 09f8a83a75

View File

@ -43,6 +43,17 @@ SECTIONS
_sidata = .; /* start of .data section */
} >FLASH_FIRMWARE
/* Data accessed by the CAN peripheral must be in the first 64kB RAM */
/* place it at the very start of RAM, before the .data section */
/* it is zeroed by reset_port */
.canram (NOLOAD) :
{
. = ALIGN(4);
_scanram = .;
*(.canram)
_ecanram = .;
} > RAM
/* This is the initialized data section
The program executes knowing that the data is in the RAM
but the loader puts the initial values in the FLASH_FIRMWARE (inidata).
@ -67,10 +78,6 @@ SECTIONS
. = ALIGN(4);
_sbss = .;
_szero = .; /* define a global symbol at bss start; used by startup code */
/* Data accessed by the CAN peripheral must be in the first 64kB RAM */
_scanram = .;
*(.canram)
_ecanram = .;
*(.bss)
*(.bss*)
*(COMMON)