diff options
Diffstat (limited to 'firmware/target/arm/tcc77x/app.lds')
-rw-r--r-- | firmware/target/arm/tcc77x/app.lds | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/firmware/target/arm/tcc77x/app.lds b/firmware/target/arm/tcc77x/app.lds new file mode 100644 index 0000000000..03a427f76b --- /dev/null +++ b/firmware/target/arm/tcc77x/app.lds | |||
@@ -0,0 +1,144 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | STARTUP(target/arm/tcc77x/crt0.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #include "imx31l.h" | ||
13 | |||
14 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - CODECSIZE | ||
15 | |||
16 | #define DRAMORIG 0x20000000 | ||
17 | #define IRAMORIG 0x00000000 | ||
18 | #define IRAMSIZE IRAM_SIZE | ||
19 | |||
20 | /* End of the audio buffer, where the codec buffer starts */ | ||
21 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
22 | |||
23 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
24 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
25 | |||
26 | MEMORY | ||
27 | { | ||
28 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
29 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
30 | } | ||
31 | |||
32 | SECTIONS | ||
33 | { | ||
34 | .text : | ||
35 | { | ||
36 | loadaddress = .; | ||
37 | _loadaddress = .; | ||
38 | . = ALIGN(0x200); | ||
39 | *(.init.text) | ||
40 | *(.text*) | ||
41 | *(.glue_7) | ||
42 | *(.glue_7t) | ||
43 | . = ALIGN(0x4); | ||
44 | } > DRAM | ||
45 | |||
46 | .rodata : | ||
47 | { | ||
48 | *(.rodata) /* problems without this, dunno why */ | ||
49 | *(.rodata*) | ||
50 | *(.rodata.str1.1) | ||
51 | *(.rodata.str1.4) | ||
52 | . = ALIGN(0x4); | ||
53 | |||
54 | /* Pseudo-allocate the copies of the data sections */ | ||
55 | _datacopy = .; | ||
56 | } > DRAM | ||
57 | |||
58 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
59 | same load address as the copy. Thus, we don't waste extra RAM | ||
60 | when we don't actually need the copy. */ | ||
61 | .data : AT ( _datacopy ) | ||
62 | { | ||
63 | _datastart = .; | ||
64 | *(.data*) | ||
65 | . = ALIGN(0x4); | ||
66 | _dataend = .; | ||
67 | } > DRAM | ||
68 | |||
69 | /DISCARD/ : | ||
70 | { | ||
71 | *(.eh_frame) | ||
72 | } | ||
73 | |||
74 | .vectors 0x0 : | ||
75 | { | ||
76 | _vectorsstart = .; | ||
77 | *(.vectors); | ||
78 | _vectorsend = .; | ||
79 | } AT> DRAM | ||
80 | |||
81 | _vectorscopy = LOADADDR(.vectors); | ||
82 | |||
83 | .iram : | ||
84 | { | ||
85 | _iramstart = .; | ||
86 | *(.icode) | ||
87 | *(.irodata) | ||
88 | *(.idata) | ||
89 | . = ALIGN(0x4); | ||
90 | _iramend = .; | ||
91 | } > DRAM | ||
92 | |||
93 | _iramcopy = LOADADDR(.iram); | ||
94 | |||
95 | .ibss (NOLOAD) : | ||
96 | { | ||
97 | _iedata = .; | ||
98 | *(.ibss) | ||
99 | . = ALIGN(0x4); | ||
100 | _iend = .; | ||
101 | } > DRAM | ||
102 | |||
103 | .stack : | ||
104 | { | ||
105 | *(.stack) | ||
106 | stackbegin = .; | ||
107 | . += 0x2000; | ||
108 | stackend = .; | ||
109 | } > DRAM | ||
110 | |||
111 | .bss : | ||
112 | { | ||
113 | _edata = .; | ||
114 | *(.bss*) | ||
115 | *(COMMON) | ||
116 | . = ALIGN(0x4); | ||
117 | _end = .; | ||
118 | } > DRAM | ||
119 | |||
120 | .audiobuf ALIGN(4) : | ||
121 | { | ||
122 | _audiobuffer = .; | ||
123 | audiobuffer = .; | ||
124 | } > DRAM | ||
125 | |||
126 | .audiobufend ENDAUDIOADDR: | ||
127 | { | ||
128 | audiobufend = .; | ||
129 | _audiobufend = .; | ||
130 | } > DRAM | ||
131 | |||
132 | .codec ENDAUDIOADDR: | ||
133 | { | ||
134 | codecbuf = .; | ||
135 | _codecbuf = .; | ||
136 | } | ||
137 | |||
138 | .plugin ENDADDR: | ||
139 | { | ||
140 | _pluginbuf = .; | ||
141 | pluginbuf = .; | ||
142 | } | ||
143 | } | ||
144 | |||