Add MCUBOOT linker changes
use better linker constant names
This commit is contained in:
parent
55f8908769
commit
16502b788f
2 changed files with 16 additions and 5 deletions
|
@ -3,14 +3,24 @@
|
||||||
SEARCH_DIR(.)
|
SEARCH_DIR(.)
|
||||||
GROUP(-lgcc -lc -lnosys)
|
GROUP(-lgcc -lc -lnosys)
|
||||||
|
|
||||||
|
NOINIT_SIZE = 0x100;
|
||||||
|
RAM_SIZE = 64K;
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
FLASH (rx) : ORIGIN = 0x08020, LENGTH = 0x78000
|
FLASH (rx) : ORIGIN = 0x08020, LENGTH = 0x78000
|
||||||
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
|
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = RAM_SIZE - NOINIT_SIZE
|
||||||
|
NOINIT (rwx): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH = NOINIT_SIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
noinit (NOLOAD):
|
||||||
|
{
|
||||||
|
PROVIDE(__start_noinit_data = .);
|
||||||
|
KEEP(*(.noinit))
|
||||||
|
PROVIDE(__stop_noinit_data = .);
|
||||||
|
} >NOINIT
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
SEARCH_DIR(.)
|
SEARCH_DIR(.)
|
||||||
GROUP(-lgcc -lc -lnosys)
|
GROUP(-lgcc -lc -lnosys)
|
||||||
|
|
||||||
NO_INIT_SIZE = 0x100;
|
NOINIT_SIZE = 0x100;
|
||||||
RAM_MAX = 64K;
|
RAM_SIZE = 64K;
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
FLASH (rx) : ORIGIN = 0x00000, LENGTH = 0x78000
|
FLASH (rx) : ORIGIN = 0x00000, LENGTH = 0x78000
|
||||||
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = RAM_MAX - NO_INIT_SIZE
|
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = RAM_SIZE - NOINIT_SIZE
|
||||||
NOINIT (rwx): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH = NO_INIT_SIZE
|
NOINIT (rwx): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH = NOINIT_SIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
|
Loading…
Reference in a new issue