Skip to content

Commit 09f8a83

Browse files
committed
samd: template.ld: put canram in its own output section
1 parent c39ec15 commit 09f8a83

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

ports/atmel-samd/boards/common.template.ld

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ SECTIONS
4343
_sidata = .; /* start of .data section */
4444
} >FLASH_FIRMWARE
4545

46+
/* Data accessed by the CAN peripheral must be in the first 64kB RAM */
47+
/* place it at the very start of RAM, before the .data section */
48+
/* it is zeroed by reset_port */
49+
.canram (NOLOAD) :
50+
{
51+
. = ALIGN(4);
52+
_scanram = .;
53+
*(.canram)
54+
_ecanram = .;
55+
} > RAM
56+
4657
/* This is the initialized data section
4758
The program executes knowing that the data is in the RAM
4859
but the loader puts the initial values in the FLASH_FIRMWARE (inidata).
@@ -67,10 +78,6 @@ SECTIONS
6778
. = ALIGN(4);
6879
_sbss = .;
6980
_szero = .; /* define a global symbol at bss start; used by startup code */
70-
/* Data accessed by the CAN peripheral must be in the first 64kB RAM */
71-
_scanram = .;
72-
*(.canram)
73-
_ecanram = .;
7481
*(.bss)
7582
*(.bss*)
7683
*(COMMON)

0 commit comments

Comments
 (0)