x1000: Simplify app linker script

Get the linker to automatically assign load addresses for
the .iram and .tcsm sections. Taken from the i.MX31 linker
script.

Change-Id: Ic03d577d8690c777726daf373a3289316639bfb9
This commit is contained in:
Aidan MacDonald 2022-12-03 11:41:46 +00:00
parent d6744c92b1
commit 68af18a56f

View file

@ -51,7 +51,13 @@ SECTIONS
*(.sdata*); *(.sdata*);
} > DRAM } > DRAM
.iram X1000_IRAM_BASE: AT (_bssbegin) /*
* The following sections are loaded after normal DRAM sections
* but are copied elsewhere by the startup code.
*/
_noloaddram = .;
.iram :
{ {
_iramstart = .; _iramstart = .;
. = 0x000; /* TLB refill */ . = 0x000; /* TLB refill */
@ -68,17 +74,19 @@ SECTIONS
*(.irodata); *(.irodata);
*(.idata); *(.idata);
_iramend = .; _iramend = .;
} > IRAM } > IRAM AT> DRAM
_iramcopy = LOADADDR(.iram); _iramcopy = LOADADDR(.iram);
.tcsm X1000_TCSM_BASE: AT (_bssbegin + SIZEOF(.iram)) .tcsm :
{ {
_tcsmstart = .; _tcsmstart = .;
KEEP(*(.tcsm*)); KEEP(*(.tcsm*));
_tcsmend = .; _tcsmend = .;
} > TCSM } > TCSM AT> DRAM
_tcsmcopy = LOADADDR(.tcsm); _tcsmcopy = LOADADDR(.tcsm);
/* Sections below have no data. */
. = ALIGN(4); . = ALIGN(4);
.stack (NOLOAD) : .stack (NOLOAD) :
{ {
@ -91,7 +99,7 @@ SECTIONS
_irqstackend = .; _irqstackend = .;
} > IRAM } > IRAM
.bss (NOLOAD) : .bss _noloaddram (NOLOAD) :
{ {
_bssbegin = .; _bssbegin = .;
*(.sbss*); *(.sbss*);