1//------------------------------------------------------------------------------
2//      Linker scatter for running in external SDRAM on the ASM9260T
3//      By ArdaFu 2015-04-29
4//------------------------------------------------------------------------------
5
6//
7// Define a memory region that covers the entire 4 GB addressible space of the
8// processor.
9//
10define memory mem with size = 4G;
11
12//
13// Define a region for the on-chip flash. size = 2MB
14//
15define region FLASH = mem:[from 0x20000000 to 0x201FFFFF];
16
17//
18// Define a region for the on-chip SRAM. size = 30MB
19//
20define region SRAM  = mem:[from 0x20200000 to 0x21FFFFFF];
21
22//
23// Indicate that the read/write values should be initialized by copying from
24// flash.
25//
26initialize by copy { readwrite };
27
28//
29// Indicate that the noinit values should be left alone.  This includes the
30// stack, which if initialized will destroy the return address from the
31// initialization code, causing the processor to branch to zero and fault.
32//
33do not initialize { section .noinit };
34
35//
36// Place the interrupt vectors at the start of flash.
37//
38place at start of FLASH { readonly section .intvec };
39
40//
41// Place the remainder of the read-only items into flash.
42//
43place in FLASH { readonly };
44
45//
46// Place the RAM vector table at the start of SRAM.
47//
48place at start of SRAM { section VTABLE };
49
50//
51// Place all read/write items into SRAM.
52//
53place in SRAM { readwrite};
54//
55// RT-thread symbols
56//
57keep { section FSymTab };
58keep { section VSymTab };
59keep { section .rti_fn* };
60