Skip to content

Commit ad022b4

Browse files
committed
Add special linker script stanza for CAN message RAM
1 parent 7ae96b4 commit ad022b4

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

variants/feather_m4_can/linker_scripts/gcc/flash_with_bootloader.ld

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@ SECTIONS
143143

144144
__etext = .;
145145

146+
/* Data accessed by the CAN peripheral must be in the first 64kB RAM */
147+
/* place it at the very start of RAM, before the .data section */
148+
/* *NOTE* it is not expliclty zeroed */
149+
.canram (NOLOAD) :
150+
{
151+
. = ALIGN(4);
152+
*(.canram)
153+
} > RAM
154+
146155
.data : AT (__etext)
147156
{
148157
__data_start__ = .;

variants/feather_m4_can/linker_scripts/gcc/flash_without_bootloader.ld

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,15 @@ SECTIONS
141141

142142
__etext = .;
143143

144+
/* Data accessed by the CAN peripheral must be in the first 64kB RAM */
145+
/* place it at the very start of RAM, before the .data section */
146+
/* *NOTE* it is not expliclty zeroed */
147+
.canram (NOLOAD) :
148+
{
149+
. = ALIGN(4);
150+
*(.canram)
151+
} > RAM
152+
144153
.data : AT (__etext)
145154
{
146155
__data_start__ = .;

0 commit comments

Comments
 (0)