diff options
Diffstat (limited to 'firmware/target/arm/tms320dm320')
-rw-r--r-- | firmware/target/arm/tms320dm320/boot.lds | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/firmware/target/arm/tms320dm320/boot.lds b/firmware/target/arm/tms320dm320/boot.lds new file mode 100644 index 0000000000..8fb40ae135 --- /dev/null +++ b/firmware/target/arm/tms320dm320/boot.lds | |||
@@ -0,0 +1,87 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | OUTPUT_FORMAT(elf32-littlearm) | ||
5 | OUTPUT_ARCH(arm) | ||
6 | INPUT(target/arm/tms320dm320/crt0.o) | ||
7 | |||
8 | #define DRAMSIZE (MEMORYSIZE * 0x100000) | ||
9 | |||
10 | #define DRAMORIG 0x00900000 | ||
11 | #define IRAMORIG 0x00000000 | ||
12 | #define IRAMSIZE 16K | ||
13 | #define FLASHORIG 0x00100000 | ||
14 | #define FLASHSIZE 8M | ||
15 | |||
16 | MEMORY | ||
17 | { | ||
18 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
19 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
20 | FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE | ||
21 | } | ||
22 | |||
23 | SECTIONS | ||
24 | { | ||
25 | . = DRAMORIG + 0x1000000; | ||
26 | |||
27 | .text : { | ||
28 | loadaddress = .; | ||
29 | _loadaddress = .; | ||
30 | *(.init.text) | ||
31 | *(.text*) | ||
32 | *(.glue_7) | ||
33 | *(.glue_7t) | ||
34 | . = ALIGN(0x4); | ||
35 | } > DRAM | ||
36 | |||
37 | .rodata : | ||
38 | { | ||
39 | *(.rodata) /* problems without this, dunno why */ | ||
40 | *(.rodata*) | ||
41 | *(.rodata.str1.1) | ||
42 | *(.rodata.str1.4) | ||
43 | . = ALIGN(0x4); | ||
44 | |||
45 | /* Pseudo-allocate the copies of the data sections */ | ||
46 | _datacopy = .; | ||
47 | } > DRAM | ||
48 | |||
49 | .data : { | ||
50 | *(.icode) | ||
51 | *(.irodata) | ||
52 | *(.idata) | ||
53 | *(.data*) | ||
54 | . = ALIGN(0x4); | ||
55 | _dataend = . ; | ||
56 | } > DRAM | ||
57 | |||
58 | .stack : | ||
59 | { | ||
60 | *(.stack) | ||
61 | _stackbegin = .; | ||
62 | stackbegin = .; | ||
63 | . += 0x2000; | ||
64 | _stackend = .; | ||
65 | stackend = .; | ||
66 | } > DRAM | ||
67 | |||
68 | .bss : | ||
69 | { | ||
70 | _edata = .; | ||
71 | *(.bss*); | ||
72 | *(.ibss); | ||
73 | *(COMMON) | ||
74 | _end = .; | ||
75 | } > DRAM | ||
76 | |||
77 | .vectors IRAMORIG : | ||
78 | { | ||
79 | _vectorsstart = .; | ||
80 | KEEP(*(.resetvectors)); | ||
81 | *(.resetvectors); | ||
82 | KEEP(*(.vectors)); | ||
83 | *(.vectors); | ||
84 | _vectorsend = .; | ||
85 | } AT > DRAM | ||
86 | _vectorscopy = LOADADDR(.vectors); | ||
87 | } | ||