summaryrefslogtreecommitdiff
path: root/firmware/target/arm/olympus/app.lds
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/olympus/app.lds')
-rw-r--r--firmware/target/arm/olympus/app.lds196
1 files changed, 1 insertions, 195 deletions
diff --git a/firmware/target/arm/olympus/app.lds b/firmware/target/arm/olympus/app.lds
index 30e5962b82..856cc52bb0 100644
--- a/firmware/target/arm/olympus/app.lds
+++ b/firmware/target/arm/olympus/app.lds
@@ -1,196 +1,2 @@
1#include "config.h" 1#include "config.h"
2 2#include "../pp/app-pp.lds"
3ENTRY(start)
4
5OUTPUT_FORMAT(elf32-littlearm)
6OUTPUT_ARCH(arm)
7STARTUP(target/arm/pp/crt0-pp.o)
8
9#define PLUGINSIZE PLUGIN_BUFFER_SIZE
10#define CODECSIZE CODEC_SIZE
11
12#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - CODECSIZE
13
14#define DRAMORIG 0x00000000
15#define IRAMORIG 0x40000000
16#define IRAMSIZE 0xc000
17
18#ifdef CPU_PP502x
19#define NOCACHE_BASE 0x10000000
20#else
21#define NOCACHE_BASE 0x28000000
22#endif
23
24#define CACHEALIGN_SIZE 16
25
26/* End of the audio buffer, where the codec buffer starts */
27#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
28
29/* Where the codec buffer ends, and the plugin buffer starts */
30#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
31
32MEMORY
33{
34 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
35 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
36}
37
38SECTIONS
39{
40 .text :
41 {
42 loadaddress = .;
43 _loadaddress = .;
44 . = ALIGN(0x200);
45 *(.init.text)
46 *(.text*)
47 *(.glue_7)
48 *(.glue_7t)
49 . = ALIGN(0x4);
50 } > DRAM
51
52 .rodata :
53 {
54 *(.rodata) /* problems without this, dunno why */
55 *(.rodata*)
56 *(.rodata.str1.1)
57 *(.rodata.str1.4)
58 . = ALIGN(0x4);
59 } > DRAM
60
61 .data :
62 {
63 *(.data*)
64 . = ALIGN(0x4);
65 } > DRAM
66
67#if NOCACHE_BASE != 0
68 /* .ncdata section is placed at uncached physical alias address and is
69 * loaded at the proper cached virtual address - no copying is
70 * performed in the init code */
71 .ncdata . + NOCACHE_BASE :
72 {
73 . = ALIGN(CACHEALIGN_SIZE);
74 *(.ncdata*)
75 . = ALIGN(CACHEALIGN_SIZE);
76 } AT> DRAM
77#endif
78
79 /DISCARD/ :
80 {
81 *(.eh_frame)
82 }
83
84 .vectors 0x0 :
85 {
86 _vectorsstart = .;
87 KEEP(*(.vectors));
88 _vectorsend = .;
89 } AT> DRAM
90
91 _vectorscopy = LOADADDR(.vectors);
92 _noloaddram = LOADADDR(.vectors);
93
94 .ibss IRAMORIG (NOLOAD) :
95 {
96 _iedata = .;
97 *(.qharray)
98 *(.ibss)
99 . = ALIGN(0x4);
100 _iend = .;
101 } > IRAM
102
103 .iram _iend :
104 {
105 _iramstart = .;
106 *(.icode)
107 *(.irodata)
108 *(.idata)
109 . = ALIGN(0x4);
110 _iramend = .;
111 } > IRAM AT> DRAM
112
113 _iramcopy = LOADADDR(.iram);
114
115
116 .init ENDAUDIOADDR :
117 {
118 . = ALIGN(4);
119 _initstart = .;
120 *(.init*)
121 _initend = .;
122 } AT> DRAM
123
124 _initcopy = LOADADDR(.init);
125
126 .idle_stacks (NOLOAD) :
127 {
128 *(.idle_stacks)
129#if NUM_CORES > 1
130 cpu_idlestackbegin = .;
131 . += IDLE_STACK_SIZE;
132 cpu_idlestackend = .;
133#endif
134 cop_idlestackbegin = .;
135 . += IDLE_STACK_SIZE;
136 cop_idlestackend = .;
137 } > IRAM
138
139 .stack (NOLOAD) :
140 {
141 *(.stack)
142 stackbegin = .;
143 . += 0x2000;
144 stackend = .;
145 } > IRAM
146
147 /* .bss and .ncbss are treated as a single section to use one init loop to
148 * zero it - note "_edata" and "_end" */
149 .bss _noloaddram (NOLOAD) :
150 {
151 _edata = .;
152 *(.bss*)
153 *(COMMON)
154 . = ALIGN(0x4);
155 } > DRAM
156
157#if NOCACHE_BASE != 0
158 .ncbss . + NOCACHE_BASE (NOLOAD):
159 {
160 . = ALIGN(CACHEALIGN_SIZE);
161 *(.ncbss*)
162 . = ALIGN(CACHEALIGN_SIZE);
163 } AT> DRAM
164#endif
165
166 /* This will be aligned by preceding alignments */
167 .endaddr . - NOCACHE_BASE (NOLOAD) :
168 {
169 _end = .;
170 } > DRAM
171
172 .audiobuf (NOLOAD) :
173 {
174 _audiobuffer = .;
175 . = ALIGN(0x4);
176 audiobuffer = .;
177 } > DRAM
178
179 .audiobufend ENDAUDIOADDR (NOLOAD) :
180 {
181 audiobufend = .;
182 _audiobufend = .;
183 } > DRAM
184
185 .codec ENDAUDIOADDR (NOLOAD) :
186 {
187 codecbuf = .;
188 _codecbuf = .;
189 }
190
191 .plugin ENDADDR (NOLOAD) :
192 {
193 _pluginbuf = .;
194 pluginbuf = .;
195 }
196}