diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/app.lds | 575 | ||||
-rw-r--r-- | firmware/target/arm/imx31/app.lds | 150 | ||||
-rw-r--r-- | firmware/target/arm/ipod/app.lds | 160 | ||||
-rw-r--r-- | firmware/target/arm/iriver/app.lds | 160 | ||||
-rw-r--r-- | firmware/target/arm/olympus/app.lds | 160 | ||||
-rw-r--r-- | firmware/target/arm/pnx0101/app.lds | 151 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/app.lds | 147 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/app.lds | 160 | ||||
-rw-r--r-- | firmware/target/arm/tcc780x/app.lds | 170 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/app.lds | 149 | ||||
-rw-r--r-- | firmware/target/coldfire/iaudio/app.lds | 143 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/app.lds | 143 | ||||
-rw-r--r-- | firmware/target/sh/archos/app.lds | 145 |
13 files changed, 1838 insertions, 575 deletions
diff --git a/firmware/app.lds b/firmware/app.lds deleted file mode 100644 index 5850a35fe1..0000000000 --- a/firmware/app.lds +++ /dev/null | |||
@@ -1,575 +0,0 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | #ifdef CPU_COLDFIRE | ||
5 | OUTPUT_FORMAT(elf32-m68k) | ||
6 | INPUT(target/coldfire/crt0.o) | ||
7 | #elif defined(CPU_ARM) | ||
8 | OUTPUT_FORMAT(elf32-littlearm) | ||
9 | OUTPUT_ARCH(arm) | ||
10 | #ifdef CPU_PP | ||
11 | INPUT(target/arm/crt0-pp.o) | ||
12 | #elif CONFIG_CPU==DM320 | ||
13 | INPUT(target/arm/tms320dm320/crt0.o) | ||
14 | #elif CONFIG_CPU==S3C2440 | ||
15 | INPUT(target/arm/s3c2440/crt0.o) | ||
16 | #elif defined(CPU_TCC780X) | ||
17 | INPUT(target/arm/tcc780x/crt0.o) | ||
18 | #elif CONFIG_CPU == PNX0101 | ||
19 | INPUT(target/arm/pnx0101/crt0-pnx0101.o) | ||
20 | #elif CONFIG_CPU == IMX31L | ||
21 | INPUT(target/arm/imx31/crt0.o) | ||
22 | #elif defined(CPU_ARM) | ||
23 | INPUT(target/arm/crt0.o) | ||
24 | #endif | ||
25 | #else | ||
26 | OUTPUT_FORMAT(elf32-sh) | ||
27 | INPUT(target/sh/crt0.o) | ||
28 | #endif | ||
29 | |||
30 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
31 | #define CODECSIZE CODEC_SIZE | ||
32 | |||
33 | #ifdef DEBUG | ||
34 | #define STUBOFFSET 0x10000 | ||
35 | #else | ||
36 | #define STUBOFFSET 0 | ||
37 | #endif | ||
38 | |||
39 | #if CONFIG_CPU==S3C2440 | ||
40 | #include "s3c2440.h" | ||
41 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE | ||
42 | #elif CONFIG_CPU==IMX31L | ||
43 | #include "imx31l.h" | ||
44 | /* Subtract 1MB for the FRAME/TTB section */ | ||
45 | #define DRAMSIZE (MEMORYSIZE * 0x100000 - 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
46 | #elif CONFIG_CPU==DM320 | ||
47 | #include "dm320.h" | ||
48 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE | ||
49 | #else | ||
50 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
51 | #endif | ||
52 | |||
53 | #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300) | ||
54 | #define DRAMORIG 0x31000000 + STUBOFFSET | ||
55 | #define IRAMORIG 0x10000000 | ||
56 | #define IRAMSIZE 0xc000 | ||
57 | #elif defined(IAUDIO_X5) || defined(IAUDIO_M5) | ||
58 | #define DRAMORIG 0x31000000 + STUBOFFSET | ||
59 | #define IRAMORIG 0x10000000 | ||
60 | #define IRAMSIZE 0x10000 | ||
61 | #elif defined(CPU_PP) | ||
62 | #define DRAMORIG 0x00000000 + STUBOFFSET | ||
63 | #define IRAMORIG 0x40000000 | ||
64 | #define IRAMSIZE 0xc000 | ||
65 | #elif CONFIG_CPU==PNX0101 | ||
66 | #define DRAMORIG 0xc00000 + STUBOFFSET | ||
67 | #define IRAM0ORIG 0x000000 | ||
68 | #define IRAM0SIZE 0x7000 | ||
69 | #define IRAMORIG 0x400000 | ||
70 | #define IRAMSIZE 0x7000 | ||
71 | #elif CONFIG_CPU==S3C2440 | ||
72 | #define DRAMORIG 0x00000100 + STUBOFFSET | ||
73 | #define IRAMORIG DRAMORIG | ||
74 | #define IRAM DRAM | ||
75 | #define IRAMSIZE 0x1000 | ||
76 | #elif CONFIG_CPU==DM320 | ||
77 | #define DRAMORIG 0x00900000 + STUBOFFSET | ||
78 | #define IRAMORIG 0x00000000 | ||
79 | #define IRAMSIZE 0x4000 | ||
80 | #elif CONFIG_CPU==IMX31L | ||
81 | #define DRAMORIG (0x0 + STUBOFFSET) | ||
82 | /* #define IRAMORIG 0x1FFFC000 */ | ||
83 | #define IRAMORIG DRAMORIG | ||
84 | #define IRAM DRAM | ||
85 | #define IRAMSIZE 0x4000 | ||
86 | #elif defined(CPU_TCC780X) | ||
87 | #define DRAMORIG 0x20000000 + STUBOFFSET | ||
88 | #define ITCMORIG 0x00000000 | ||
89 | #define ITCMSIZE 0x1000 | ||
90 | #define DTCMORIG 0xA0000000 | ||
91 | #define DTCMSIZE 0x2000 | ||
92 | #define SRAMORIG 0x10000000 | ||
93 | #define SRAMSIZE 0xc000 | ||
94 | #else | ||
95 | #define DRAMORIG 0x09000000 + STUBOFFSET | ||
96 | #define IRAMORIG 0x0f000000 | ||
97 | #define IRAMSIZE 0x1000 | ||
98 | #endif | ||
99 | |||
100 | /* End of the audio buffer, where the codec buffer starts */ | ||
101 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
102 | |||
103 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
104 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
105 | |||
106 | MEMORY | ||
107 | { | ||
108 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
109 | #if defined(CPU_TCC780X) | ||
110 | /* Seperate data & instruction TCMs plus SRAM. */ | ||
111 | ITCM : ORIGIN = ITCMORIG, LENGTH = ITCMSIZE | ||
112 | DTCM : ORIGIN = DTCMORIG, LENGTH = DTCMSIZE | ||
113 | SRAM : ORIGIN = SRAMORIG, LENGTH = SRAMSIZE | ||
114 | #elif CONFIG_CPU != S3C2440 && CONFIG_CPU != IMX31L | ||
115 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
116 | #endif | ||
117 | #if CONFIG_CPU==PNX0101 | ||
118 | IRAM0 : ORIGIN = IRAM0ORIG, LENGTH = IRAM0SIZE | ||
119 | #endif | ||
120 | } | ||
121 | |||
122 | SECTIONS | ||
123 | { | ||
124 | #if (CONFIG_CPU==DM320) | ||
125 | .text : | ||
126 | { | ||
127 | loadaddress = .; | ||
128 | _loadaddress = .; | ||
129 | . = ALIGN(0x200); | ||
130 | *(.init.text) | ||
131 | *(.text*) | ||
132 | *(.glue_7) | ||
133 | *(.glue_7t) | ||
134 | . = ALIGN(0x4); | ||
135 | } > DRAM | ||
136 | |||
137 | .rodata : | ||
138 | { | ||
139 | *(.rodata) /* problems without this, dunno why */ | ||
140 | *(.rodata*) | ||
141 | *(.rodata.str1.1) | ||
142 | *(.rodata.str1.4) | ||
143 | . = ALIGN(0x4); | ||
144 | |||
145 | /* Pseudo-allocate the copies of the data sections */ | ||
146 | _datacopy = .; | ||
147 | } > DRAM | ||
148 | |||
149 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
150 | same load address as the copy. Thus, we don't waste extra RAM | ||
151 | when we don't actually need the copy. */ | ||
152 | .data : AT ( _datacopy ) | ||
153 | { | ||
154 | _datastart = .; | ||
155 | *(.data*) | ||
156 | . = ALIGN(0x4); | ||
157 | _dataend = .; | ||
158 | } > DRAM | ||
159 | |||
160 | /DISCARD/ : | ||
161 | { | ||
162 | *(.eh_frame) | ||
163 | } | ||
164 | |||
165 | .vectors IRAMORIG : | ||
166 | { | ||
167 | _vectorsstart = .; | ||
168 | *(.vectors); | ||
169 | _vectorsend = .; | ||
170 | } > IRAM AT> DRAM | ||
171 | |||
172 | _vectorscopy = LOADADDR(.vectors); | ||
173 | |||
174 | .iram : | ||
175 | { | ||
176 | _iramstart = .; | ||
177 | *(.icode) | ||
178 | *(.irodata) | ||
179 | *(.idata) | ||
180 | . = ALIGN(0x4); | ||
181 | _iramend = .; | ||
182 | } > IRAM AT> DRAM | ||
183 | |||
184 | _iramcopy = LOADADDR(.iram); | ||
185 | |||
186 | .ibss (NOLOAD) : | ||
187 | { | ||
188 | _iedata = .; | ||
189 | *(.ibss) | ||
190 | . = ALIGN(0x4); | ||
191 | _iend = .; | ||
192 | } > IRAM | ||
193 | |||
194 | .stack : | ||
195 | { | ||
196 | *(.stack) | ||
197 | stackbegin = .; | ||
198 | . += 0x2000; | ||
199 | stackend = .; | ||
200 | } > IRAM | ||
201 | |||
202 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | ||
203 | { | ||
204 | _edata = .; | ||
205 | *(.bss*) | ||
206 | *(COMMON) | ||
207 | . = ALIGN(0x4); | ||
208 | _end = .; | ||
209 | } > DRAM | ||
210 | |||
211 | #elif defined(CPU_TCC780X) | ||
212 | .text : | ||
213 | { | ||
214 | loadaddress = .; | ||
215 | _loadaddress = .; | ||
216 | . = ALIGN(0x200); | ||
217 | *(.init.text) | ||
218 | *(.text*) | ||
219 | *(.glue_7) | ||
220 | *(.glue_7t) | ||
221 | . = ALIGN(0x4); | ||
222 | } > DRAM | ||
223 | |||
224 | .rodata : | ||
225 | { | ||
226 | *(.rodata) /* problems without this, dunno why */ | ||
227 | *(.rodata*) | ||
228 | *(.rodata.str1.1) | ||
229 | *(.rodata.str1.4) | ||
230 | . = ALIGN(0x4); | ||
231 | |||
232 | /* Pseudo-allocate the copies of the data sections */ | ||
233 | _datacopy = .; | ||
234 | } > DRAM | ||
235 | |||
236 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
237 | same load address as the copy. Thus, we don't waste extra RAM | ||
238 | when we don't actually need the copy. */ | ||
239 | .data : AT ( _datacopy ) | ||
240 | { | ||
241 | _datastart = .; | ||
242 | *(.data*) | ||
243 | . = ALIGN(0x4); | ||
244 | _dataend = .; | ||
245 | } > DRAM | ||
246 | |||
247 | /DISCARD/ : | ||
248 | { | ||
249 | *(.eh_frame) | ||
250 | } | ||
251 | |||
252 | .vectors ITCMORIG : | ||
253 | { | ||
254 | _vectorsstart = .; | ||
255 | *(.vectors); | ||
256 | _vectorsend = .; | ||
257 | } > ITCM AT> DRAM | ||
258 | |||
259 | _vectorscopy = LOADADDR(.vectors); | ||
260 | |||
261 | .itcm : | ||
262 | { | ||
263 | _itcmstart = .; | ||
264 | _itcmend = .; | ||
265 | } > ITCM AT> DRAM | ||
266 | |||
267 | _itcmcopy = LOADADDR(.itcm); | ||
268 | |||
269 | .dtcm : | ||
270 | { | ||
271 | _dtcmstart = .; | ||
272 | _dtcmend = .; | ||
273 | } > DTCM AT> DRAM | ||
274 | |||
275 | _dtcmcopy = LOADADDR(.dtcm); | ||
276 | |||
277 | .iram : | ||
278 | { | ||
279 | _iramstart = .; | ||
280 | *(.irodata) | ||
281 | *(.idata) | ||
282 | *(.icode) | ||
283 | . = ALIGN(0x4); | ||
284 | _iramend = .; | ||
285 | } > SRAM AT> DRAM | ||
286 | |||
287 | _iramcopy = LOADADDR(.iram); | ||
288 | |||
289 | .ibss (NOLOAD) : | ||
290 | { | ||
291 | _iedata = .; | ||
292 | *(.ibss) | ||
293 | . = ALIGN(0x4); | ||
294 | _iend = .; | ||
295 | } > SRAM | ||
296 | |||
297 | .stack : | ||
298 | { | ||
299 | *(.stack) | ||
300 | stackbegin = .; | ||
301 | . += 0x2000; | ||
302 | stackend = .; | ||
303 | } > SRAM | ||
304 | |||
305 | .bss : | ||
306 | { | ||
307 | _edata = .; | ||
308 | *(.bss*) | ||
309 | *(COMMON) | ||
310 | . = ALIGN(0x4); | ||
311 | _end = .; | ||
312 | } > DRAM | ||
313 | |||
314 | #elif CONFIG_CPU==S3C2440 || CONFIG_CPU == IMX31L | ||
315 | .text : | ||
316 | { | ||
317 | loadaddress = .; | ||
318 | _loadaddress = .; | ||
319 | . = ALIGN(0x200); | ||
320 | *(.init.text) | ||
321 | *(.text*) | ||
322 | *(.glue_7) | ||
323 | *(.glue_7t) | ||
324 | . = ALIGN(0x4); | ||
325 | } > DRAM | ||
326 | |||
327 | .rodata : | ||
328 | { | ||
329 | *(.rodata) /* problems without this, dunno why */ | ||
330 | *(.rodata*) | ||
331 | *(.rodata.str1.1) | ||
332 | *(.rodata.str1.4) | ||
333 | . = ALIGN(0x4); | ||
334 | |||
335 | /* Pseudo-allocate the copies of the data sections */ | ||
336 | _datacopy = .; | ||
337 | } > DRAM | ||
338 | |||
339 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
340 | same load address as the copy. Thus, we don't waste extra RAM | ||
341 | when we don't actually need the copy. */ | ||
342 | .data : AT ( _datacopy ) | ||
343 | { | ||
344 | _datastart = .; | ||
345 | *(.data*) | ||
346 | . = ALIGN(0x4); | ||
347 | _dataend = .; | ||
348 | } > DRAM | ||
349 | |||
350 | /DISCARD/ : | ||
351 | { | ||
352 | *(.eh_frame) | ||
353 | } | ||
354 | |||
355 | .vectors 0x0 : | ||
356 | { | ||
357 | _vectorsstart = .; | ||
358 | *(.vectors); | ||
359 | _vectorsend = .; | ||
360 | } AT> DRAM | ||
361 | |||
362 | _vectorscopy = LOADADDR(.vectors); | ||
363 | |||
364 | .iram : | ||
365 | { | ||
366 | _iramstart = .; | ||
367 | *(.icode) | ||
368 | *(.irodata) | ||
369 | *(.idata) | ||
370 | _iramend = .; | ||
371 | } > DRAM | ||
372 | |||
373 | _iramcopy = LOADADDR(.iram); | ||
374 | |||
375 | .ibss (NOLOAD) : | ||
376 | { | ||
377 | _iedata = .; | ||
378 | *(.ibss) | ||
379 | . = ALIGN(0x4); | ||
380 | _iend = .; | ||
381 | } > DRAM | ||
382 | |||
383 | .stack : | ||
384 | { | ||
385 | *(.stack) | ||
386 | stackbegin = .; | ||
387 | . += 0x2000; | ||
388 | stackend = .; | ||
389 | } > DRAM | ||
390 | |||
391 | .bss : | ||
392 | { | ||
393 | _edata = .; | ||
394 | *(.bss*) | ||
395 | *(COMMON) | ||
396 | . = ALIGN(0x4); | ||
397 | _end = .; | ||
398 | } > DRAM | ||
399 | |||
400 | #else /* End CONFIG_CPU */ | ||
401 | |||
402 | #if !defined(CPU_ARM) | ||
403 | .vectors : | ||
404 | { | ||
405 | loadaddress = .; | ||
406 | _loadaddress = .; | ||
407 | KEEP(*(.resetvectors)); | ||
408 | *(.resetvectors); | ||
409 | KEEP(*(.vectors)); | ||
410 | *(.vectors); | ||
411 | } > DRAM | ||
412 | |||
413 | .text : | ||
414 | { | ||
415 | #else | ||
416 | .text : | ||
417 | { | ||
418 | loadaddress = .; | ||
419 | _loadaddress = .; | ||
420 | #endif | ||
421 | . = ALIGN(0x200); | ||
422 | *(.init.text) | ||
423 | *(.text*) | ||
424 | #ifdef CPU_ARM | ||
425 | *(.glue_7) | ||
426 | *(.glue_7t) | ||
427 | #endif | ||
428 | . = ALIGN(0x4); | ||
429 | } > DRAM | ||
430 | |||
431 | .rodata : | ||
432 | { | ||
433 | *(.rodata) /* problems without this, dunno why */ | ||
434 | *(.rodata*) | ||
435 | *(.rodata.str1.1) | ||
436 | *(.rodata.str1.4) | ||
437 | . = ALIGN(0x4); | ||
438 | |||
439 | /* Pseudo-allocate the copies of the data sections */ | ||
440 | _datacopy = .; | ||
441 | } > DRAM | ||
442 | |||
443 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
444 | same load address as the copy. Thus, we don't waste extra RAM | ||
445 | when we don't actually need the copy. */ | ||
446 | .data : AT ( _datacopy ) | ||
447 | { | ||
448 | _datastart = .; | ||
449 | *(.data*) | ||
450 | . = ALIGN(0x4); | ||
451 | _dataend = .; | ||
452 | } > DRAM | ||
453 | |||
454 | /DISCARD/ : | ||
455 | { | ||
456 | *(.eh_frame) | ||
457 | } | ||
458 | |||
459 | #if defined(CPU_ARM) | ||
460 | .vectors 0x0 : | ||
461 | { | ||
462 | _vectorsstart = .; | ||
463 | *(.vectors); | ||
464 | _vectorsend = .; | ||
465 | #if CONFIG_CPU==PNX0101 | ||
466 | *(.dmabuf) | ||
467 | } >IRAM0 AT> DRAM | ||
468 | #else | ||
469 | } AT> DRAM | ||
470 | #endif | ||
471 | |||
472 | _vectorscopy = LOADADDR(.vectors); | ||
473 | #endif | ||
474 | |||
475 | #if CONFIG_CPU==PNX0101 | ||
476 | .iram IRAMORIG + SIZEOF(.vectors) : | ||
477 | #else | ||
478 | .iram IRAMORIG : | ||
479 | #endif | ||
480 | { | ||
481 | _iramstart = .; | ||
482 | *(.icode) | ||
483 | *(.irodata) | ||
484 | *(.idata) | ||
485 | _iramend = .; | ||
486 | } > IRAM AT> DRAM | ||
487 | |||
488 | _iramcopy = LOADADDR(.iram); | ||
489 | |||
490 | .ibss (NOLOAD) : | ||
491 | { | ||
492 | _iedata = .; | ||
493 | *(.ibss) | ||
494 | . = ALIGN(0x4); | ||
495 | _iend = .; | ||
496 | } > IRAM | ||
497 | |||
498 | #if defined(CPU_COLDFIRE) || defined(CPU_ARM) | ||
499 | #ifdef CPU_PP | ||
500 | .idle_stacks : | ||
501 | { | ||
502 | *(.idle_stacks) | ||
503 | #if NUM_CORES > 1 | ||
504 | cpu_idlestackbegin = .; | ||
505 | . += IDLE_STACK_SIZE; | ||
506 | cpu_idlestackend = .; | ||
507 | #endif | ||
508 | cop_idlestackbegin = .; | ||
509 | . += IDLE_STACK_SIZE; | ||
510 | cop_idlestackend = .; | ||
511 | } > IRAM | ||
512 | #endif | ||
513 | |||
514 | .stack : | ||
515 | { | ||
516 | *(.stack) | ||
517 | stackbegin = .; | ||
518 | . += 0x2000; | ||
519 | stackend = .; | ||
520 | } > IRAM | ||
521 | |||
522 | #else | ||
523 | /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section | ||
524 | size smaller, and allow the stack to grow into the .iram copy */ | ||
525 | .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): | ||
526 | { | ||
527 | *(.stack) | ||
528 | _stackbegin = . - SIZEOF(.iram); | ||
529 | . += 0x2000 - SIZEOF(.iram); | ||
530 | _stackend = .; | ||
531 | } > DRAM | ||
532 | #endif | ||
533 | |||
534 | #if defined(CPU_COLDFIRE) | ||
535 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): | ||
536 | #elif defined(CPU_ARM) | ||
537 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | ||
538 | #else | ||
539 | .bss : | ||
540 | #endif | ||
541 | { | ||
542 | _edata = .; | ||
543 | *(.bss*) | ||
544 | *(COMMON) | ||
545 | . = ALIGN(0x4); | ||
546 | _end = .; | ||
547 | } > DRAM | ||
548 | |||
549 | #endif | ||
550 | |||
551 | .audiobuf ALIGN(4) : | ||
552 | { | ||
553 | _audiobuffer = .; | ||
554 | audiobuffer = .; | ||
555 | } > DRAM | ||
556 | |||
557 | .audiobufend ENDAUDIOADDR: | ||
558 | { | ||
559 | audiobufend = .; | ||
560 | _audiobufend = .; | ||
561 | } > DRAM | ||
562 | |||
563 | .codec ENDAUDIOADDR: | ||
564 | { | ||
565 | codecbuf = .; | ||
566 | _codecbuf = .; | ||
567 | } | ||
568 | |||
569 | .plugin ENDADDR: | ||
570 | { | ||
571 | _pluginbuf = .; | ||
572 | pluginbuf = .; | ||
573 | } | ||
574 | } | ||
575 | |||
diff --git a/firmware/target/arm/imx31/app.lds b/firmware/target/arm/imx31/app.lds new file mode 100644 index 0000000000..fda508dc50 --- /dev/null +++ b/firmware/target/arm/imx31/app.lds | |||
@@ -0,0 +1,150 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/imx31/crt0.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #include "imx31l.h" | ||
19 | /* Subtract 1MB for the FRAME/TTB section */ | ||
20 | #define DRAMSIZE (MEMORYSIZE * 0x100000 - 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
21 | |||
22 | #define DRAMORIG (0x0 + STUBOFFSET) | ||
23 | /* #define IRAMORIG 0x1FFFC000 */ | ||
24 | #define IRAMORIG DRAMORIG | ||
25 | #define IRAM DRAM | ||
26 | #define IRAMSIZE 0x4000 | ||
27 | |||
28 | /* End of the audio buffer, where the codec buffer starts */ | ||
29 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
30 | |||
31 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
32 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
33 | |||
34 | MEMORY | ||
35 | { | ||
36 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
37 | } | ||
38 | |||
39 | SECTIONS | ||
40 | { | ||
41 | .text : | ||
42 | { | ||
43 | loadaddress = .; | ||
44 | _loadaddress = .; | ||
45 | . = ALIGN(0x200); | ||
46 | *(.init.text) | ||
47 | *(.text*) | ||
48 | *(.glue_7) | ||
49 | *(.glue_7t) | ||
50 | . = ALIGN(0x4); | ||
51 | } > DRAM | ||
52 | |||
53 | .rodata : | ||
54 | { | ||
55 | *(.rodata) /* problems without this, dunno why */ | ||
56 | *(.rodata*) | ||
57 | *(.rodata.str1.1) | ||
58 | *(.rodata.str1.4) | ||
59 | . = ALIGN(0x4); | ||
60 | |||
61 | /* Pseudo-allocate the copies of the data sections */ | ||
62 | _datacopy = .; | ||
63 | } > DRAM | ||
64 | |||
65 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
66 | same load address as the copy. Thus, we don't waste extra RAM | ||
67 | when we don't actually need the copy. */ | ||
68 | .data : AT ( _datacopy ) | ||
69 | { | ||
70 | _datastart = .; | ||
71 | *(.data*) | ||
72 | . = ALIGN(0x4); | ||
73 | _dataend = .; | ||
74 | } > DRAM | ||
75 | |||
76 | /DISCARD/ : | ||
77 | { | ||
78 | *(.eh_frame) | ||
79 | } | ||
80 | |||
81 | .vectors 0x0 : | ||
82 | { | ||
83 | _vectorsstart = .; | ||
84 | *(.vectors); | ||
85 | _vectorsend = .; | ||
86 | } AT> DRAM | ||
87 | |||
88 | _vectorscopy = LOADADDR(.vectors); | ||
89 | |||
90 | .iram : | ||
91 | { | ||
92 | _iramstart = .; | ||
93 | *(.icode) | ||
94 | *(.irodata) | ||
95 | *(.idata) | ||
96 | _iramend = .; | ||
97 | } > DRAM | ||
98 | |||
99 | _iramcopy = LOADADDR(.iram); | ||
100 | |||
101 | .ibss (NOLOAD) : | ||
102 | { | ||
103 | _iedata = .; | ||
104 | *(.ibss) | ||
105 | . = ALIGN(0x4); | ||
106 | _iend = .; | ||
107 | } > DRAM | ||
108 | |||
109 | .stack : | ||
110 | { | ||
111 | *(.stack) | ||
112 | stackbegin = .; | ||
113 | . += 0x2000; | ||
114 | stackend = .; | ||
115 | } > DRAM | ||
116 | |||
117 | .bss : | ||
118 | { | ||
119 | _edata = .; | ||
120 | *(.bss*) | ||
121 | *(COMMON) | ||
122 | . = ALIGN(0x4); | ||
123 | _end = .; | ||
124 | } > DRAM | ||
125 | |||
126 | .audiobuf ALIGN(4) : | ||
127 | { | ||
128 | _audiobuffer = .; | ||
129 | audiobuffer = .; | ||
130 | } > DRAM | ||
131 | |||
132 | .audiobufend ENDAUDIOADDR: | ||
133 | { | ||
134 | audiobufend = .; | ||
135 | _audiobufend = .; | ||
136 | } > DRAM | ||
137 | |||
138 | .codec ENDAUDIOADDR: | ||
139 | { | ||
140 | codecbuf = .; | ||
141 | _codecbuf = .; | ||
142 | } | ||
143 | |||
144 | .plugin ENDADDR: | ||
145 | { | ||
146 | _pluginbuf = .; | ||
147 | pluginbuf = .; | ||
148 | } | ||
149 | } | ||
150 | |||
diff --git a/firmware/target/arm/ipod/app.lds b/firmware/target/arm/ipod/app.lds new file mode 100644 index 0000000000..765a5f0389 --- /dev/null +++ b/firmware/target/arm/ipod/app.lds | |||
@@ -0,0 +1,160 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/crt0-pp.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
19 | |||
20 | #define DRAMORIG 0x00000000 + STUBOFFSET | ||
21 | #define IRAMORIG 0x40000000 | ||
22 | #define IRAMSIZE 0xc000 | ||
23 | |||
24 | /* End of the audio buffer, where the codec buffer starts */ | ||
25 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
26 | |||
27 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
28 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
29 | |||
30 | MEMORY | ||
31 | { | ||
32 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
33 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
34 | } | ||
35 | |||
36 | SECTIONS | ||
37 | { | ||
38 | .text : | ||
39 | { | ||
40 | loadaddress = .; | ||
41 | _loadaddress = .; | ||
42 | . = ALIGN(0x200); | ||
43 | *(.init.text) | ||
44 | *(.text*) | ||
45 | *(.glue_7) | ||
46 | *(.glue_7t) | ||
47 | . = ALIGN(0x4); | ||
48 | } > DRAM | ||
49 | |||
50 | .rodata : | ||
51 | { | ||
52 | *(.rodata) /* problems without this, dunno why */ | ||
53 | *(.rodata*) | ||
54 | *(.rodata.str1.1) | ||
55 | *(.rodata.str1.4) | ||
56 | . = ALIGN(0x4); | ||
57 | |||
58 | /* Pseudo-allocate the copies of the data sections */ | ||
59 | _datacopy = .; | ||
60 | } > DRAM | ||
61 | |||
62 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
63 | same load address as the copy. Thus, we don't waste extra RAM | ||
64 | when we don't actually need the copy. */ | ||
65 | .data : AT ( _datacopy ) | ||
66 | { | ||
67 | _datastart = .; | ||
68 | *(.data*) | ||
69 | . = ALIGN(0x4); | ||
70 | _dataend = .; | ||
71 | } > DRAM | ||
72 | |||
73 | /DISCARD/ : | ||
74 | { | ||
75 | *(.eh_frame) | ||
76 | } | ||
77 | |||
78 | .vectors 0x0 : | ||
79 | { | ||
80 | _vectorsstart = .; | ||
81 | *(.vectors); | ||
82 | _vectorsend = .; | ||
83 | } AT> DRAM | ||
84 | |||
85 | _vectorscopy = LOADADDR(.vectors); | ||
86 | |||
87 | .iram IRAMORIG : | ||
88 | { | ||
89 | _iramstart = .; | ||
90 | *(.icode) | ||
91 | *(.irodata) | ||
92 | *(.idata) | ||
93 | _iramend = .; | ||
94 | } > IRAM AT> DRAM | ||
95 | |||
96 | _iramcopy = LOADADDR(.iram); | ||
97 | |||
98 | .ibss (NOLOAD) : | ||
99 | { | ||
100 | _iedata = .; | ||
101 | *(.ibss) | ||
102 | . = ALIGN(0x4); | ||
103 | _iend = .; | ||
104 | } > IRAM | ||
105 | |||
106 | .idle_stacks : | ||
107 | { | ||
108 | *(.idle_stacks) | ||
109 | #if NUM_CORES > 1 | ||
110 | cpu_idlestackbegin = .; | ||
111 | . += IDLE_STACK_SIZE; | ||
112 | cpu_idlestackend = .; | ||
113 | #endif | ||
114 | cop_idlestackbegin = .; | ||
115 | . += IDLE_STACK_SIZE; | ||
116 | cop_idlestackend = .; | ||
117 | } > IRAM | ||
118 | |||
119 | .stack : | ||
120 | { | ||
121 | *(.stack) | ||
122 | stackbegin = .; | ||
123 | . += 0x2000; | ||
124 | stackend = .; | ||
125 | } > IRAM | ||
126 | |||
127 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | ||
128 | { | ||
129 | _edata = .; | ||
130 | *(.bss*) | ||
131 | *(COMMON) | ||
132 | . = ALIGN(0x4); | ||
133 | _end = .; | ||
134 | } > DRAM | ||
135 | |||
136 | .audiobuf ALIGN(4) : | ||
137 | { | ||
138 | _audiobuffer = .; | ||
139 | audiobuffer = .; | ||
140 | } > DRAM | ||
141 | |||
142 | .audiobufend ENDAUDIOADDR: | ||
143 | { | ||
144 | audiobufend = .; | ||
145 | _audiobufend = .; | ||
146 | } > DRAM | ||
147 | |||
148 | .codec ENDAUDIOADDR: | ||
149 | { | ||
150 | codecbuf = .; | ||
151 | _codecbuf = .; | ||
152 | } | ||
153 | |||
154 | .plugin ENDADDR: | ||
155 | { | ||
156 | _pluginbuf = .; | ||
157 | pluginbuf = .; | ||
158 | } | ||
159 | } | ||
160 | |||
diff --git a/firmware/target/arm/iriver/app.lds b/firmware/target/arm/iriver/app.lds new file mode 100644 index 0000000000..765a5f0389 --- /dev/null +++ b/firmware/target/arm/iriver/app.lds | |||
@@ -0,0 +1,160 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/crt0-pp.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
19 | |||
20 | #define DRAMORIG 0x00000000 + STUBOFFSET | ||
21 | #define IRAMORIG 0x40000000 | ||
22 | #define IRAMSIZE 0xc000 | ||
23 | |||
24 | /* End of the audio buffer, where the codec buffer starts */ | ||
25 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
26 | |||
27 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
28 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
29 | |||
30 | MEMORY | ||
31 | { | ||
32 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
33 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
34 | } | ||
35 | |||
36 | SECTIONS | ||
37 | { | ||
38 | .text : | ||
39 | { | ||
40 | loadaddress = .; | ||
41 | _loadaddress = .; | ||
42 | . = ALIGN(0x200); | ||
43 | *(.init.text) | ||
44 | *(.text*) | ||
45 | *(.glue_7) | ||
46 | *(.glue_7t) | ||
47 | . = ALIGN(0x4); | ||
48 | } > DRAM | ||
49 | |||
50 | .rodata : | ||
51 | { | ||
52 | *(.rodata) /* problems without this, dunno why */ | ||
53 | *(.rodata*) | ||
54 | *(.rodata.str1.1) | ||
55 | *(.rodata.str1.4) | ||
56 | . = ALIGN(0x4); | ||
57 | |||
58 | /* Pseudo-allocate the copies of the data sections */ | ||
59 | _datacopy = .; | ||
60 | } > DRAM | ||
61 | |||
62 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
63 | same load address as the copy. Thus, we don't waste extra RAM | ||
64 | when we don't actually need the copy. */ | ||
65 | .data : AT ( _datacopy ) | ||
66 | { | ||
67 | _datastart = .; | ||
68 | *(.data*) | ||
69 | . = ALIGN(0x4); | ||
70 | _dataend = .; | ||
71 | } > DRAM | ||
72 | |||
73 | /DISCARD/ : | ||
74 | { | ||
75 | *(.eh_frame) | ||
76 | } | ||
77 | |||
78 | .vectors 0x0 : | ||
79 | { | ||
80 | _vectorsstart = .; | ||
81 | *(.vectors); | ||
82 | _vectorsend = .; | ||
83 | } AT> DRAM | ||
84 | |||
85 | _vectorscopy = LOADADDR(.vectors); | ||
86 | |||
87 | .iram IRAMORIG : | ||
88 | { | ||
89 | _iramstart = .; | ||
90 | *(.icode) | ||
91 | *(.irodata) | ||
92 | *(.idata) | ||
93 | _iramend = .; | ||
94 | } > IRAM AT> DRAM | ||
95 | |||
96 | _iramcopy = LOADADDR(.iram); | ||
97 | |||
98 | .ibss (NOLOAD) : | ||
99 | { | ||
100 | _iedata = .; | ||
101 | *(.ibss) | ||
102 | . = ALIGN(0x4); | ||
103 | _iend = .; | ||
104 | } > IRAM | ||
105 | |||
106 | .idle_stacks : | ||
107 | { | ||
108 | *(.idle_stacks) | ||
109 | #if NUM_CORES > 1 | ||
110 | cpu_idlestackbegin = .; | ||
111 | . += IDLE_STACK_SIZE; | ||
112 | cpu_idlestackend = .; | ||
113 | #endif | ||
114 | cop_idlestackbegin = .; | ||
115 | . += IDLE_STACK_SIZE; | ||
116 | cop_idlestackend = .; | ||
117 | } > IRAM | ||
118 | |||
119 | .stack : | ||
120 | { | ||
121 | *(.stack) | ||
122 | stackbegin = .; | ||
123 | . += 0x2000; | ||
124 | stackend = .; | ||
125 | } > IRAM | ||
126 | |||
127 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | ||
128 | { | ||
129 | _edata = .; | ||
130 | *(.bss*) | ||
131 | *(COMMON) | ||
132 | . = ALIGN(0x4); | ||
133 | _end = .; | ||
134 | } > DRAM | ||
135 | |||
136 | .audiobuf ALIGN(4) : | ||
137 | { | ||
138 | _audiobuffer = .; | ||
139 | audiobuffer = .; | ||
140 | } > DRAM | ||
141 | |||
142 | .audiobufend ENDAUDIOADDR: | ||
143 | { | ||
144 | audiobufend = .; | ||
145 | _audiobufend = .; | ||
146 | } > DRAM | ||
147 | |||
148 | .codec ENDAUDIOADDR: | ||
149 | { | ||
150 | codecbuf = .; | ||
151 | _codecbuf = .; | ||
152 | } | ||
153 | |||
154 | .plugin ENDADDR: | ||
155 | { | ||
156 | _pluginbuf = .; | ||
157 | pluginbuf = .; | ||
158 | } | ||
159 | } | ||
160 | |||
diff --git a/firmware/target/arm/olympus/app.lds b/firmware/target/arm/olympus/app.lds new file mode 100644 index 0000000000..765a5f0389 --- /dev/null +++ b/firmware/target/arm/olympus/app.lds | |||
@@ -0,0 +1,160 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/crt0-pp.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
19 | |||
20 | #define DRAMORIG 0x00000000 + STUBOFFSET | ||
21 | #define IRAMORIG 0x40000000 | ||
22 | #define IRAMSIZE 0xc000 | ||
23 | |||
24 | /* End of the audio buffer, where the codec buffer starts */ | ||
25 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
26 | |||
27 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
28 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
29 | |||
30 | MEMORY | ||
31 | { | ||
32 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
33 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
34 | } | ||
35 | |||
36 | SECTIONS | ||
37 | { | ||
38 | .text : | ||
39 | { | ||
40 | loadaddress = .; | ||
41 | _loadaddress = .; | ||
42 | . = ALIGN(0x200); | ||
43 | *(.init.text) | ||
44 | *(.text*) | ||
45 | *(.glue_7) | ||
46 | *(.glue_7t) | ||
47 | . = ALIGN(0x4); | ||
48 | } > DRAM | ||
49 | |||
50 | .rodata : | ||
51 | { | ||
52 | *(.rodata) /* problems without this, dunno why */ | ||
53 | *(.rodata*) | ||
54 | *(.rodata.str1.1) | ||
55 | *(.rodata.str1.4) | ||
56 | . = ALIGN(0x4); | ||
57 | |||
58 | /* Pseudo-allocate the copies of the data sections */ | ||
59 | _datacopy = .; | ||
60 | } > DRAM | ||
61 | |||
62 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
63 | same load address as the copy. Thus, we don't waste extra RAM | ||
64 | when we don't actually need the copy. */ | ||
65 | .data : AT ( _datacopy ) | ||
66 | { | ||
67 | _datastart = .; | ||
68 | *(.data*) | ||
69 | . = ALIGN(0x4); | ||
70 | _dataend = .; | ||
71 | } > DRAM | ||
72 | |||
73 | /DISCARD/ : | ||
74 | { | ||
75 | *(.eh_frame) | ||
76 | } | ||
77 | |||
78 | .vectors 0x0 : | ||
79 | { | ||
80 | _vectorsstart = .; | ||
81 | *(.vectors); | ||
82 | _vectorsend = .; | ||
83 | } AT> DRAM | ||
84 | |||
85 | _vectorscopy = LOADADDR(.vectors); | ||
86 | |||
87 | .iram IRAMORIG : | ||
88 | { | ||
89 | _iramstart = .; | ||
90 | *(.icode) | ||
91 | *(.irodata) | ||
92 | *(.idata) | ||
93 | _iramend = .; | ||
94 | } > IRAM AT> DRAM | ||
95 | |||
96 | _iramcopy = LOADADDR(.iram); | ||
97 | |||
98 | .ibss (NOLOAD) : | ||
99 | { | ||
100 | _iedata = .; | ||
101 | *(.ibss) | ||
102 | . = ALIGN(0x4); | ||
103 | _iend = .; | ||
104 | } > IRAM | ||
105 | |||
106 | .idle_stacks : | ||
107 | { | ||
108 | *(.idle_stacks) | ||
109 | #if NUM_CORES > 1 | ||
110 | cpu_idlestackbegin = .; | ||
111 | . += IDLE_STACK_SIZE; | ||
112 | cpu_idlestackend = .; | ||
113 | #endif | ||
114 | cop_idlestackbegin = .; | ||
115 | . += IDLE_STACK_SIZE; | ||
116 | cop_idlestackend = .; | ||
117 | } > IRAM | ||
118 | |||
119 | .stack : | ||
120 | { | ||
121 | *(.stack) | ||
122 | stackbegin = .; | ||
123 | . += 0x2000; | ||
124 | stackend = .; | ||
125 | } > IRAM | ||
126 | |||
127 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | ||
128 | { | ||
129 | _edata = .; | ||
130 | *(.bss*) | ||
131 | *(COMMON) | ||
132 | . = ALIGN(0x4); | ||
133 | _end = .; | ||
134 | } > DRAM | ||
135 | |||
136 | .audiobuf ALIGN(4) : | ||
137 | { | ||
138 | _audiobuffer = .; | ||
139 | audiobuffer = .; | ||
140 | } > DRAM | ||
141 | |||
142 | .audiobufend ENDAUDIOADDR: | ||
143 | { | ||
144 | audiobufend = .; | ||
145 | _audiobufend = .; | ||
146 | } > DRAM | ||
147 | |||
148 | .codec ENDAUDIOADDR: | ||
149 | { | ||
150 | codecbuf = .; | ||
151 | _codecbuf = .; | ||
152 | } | ||
153 | |||
154 | .plugin ENDADDR: | ||
155 | { | ||
156 | _pluginbuf = .; | ||
157 | pluginbuf = .; | ||
158 | } | ||
159 | } | ||
160 | |||
diff --git a/firmware/target/arm/pnx0101/app.lds b/firmware/target/arm/pnx0101/app.lds new file mode 100644 index 0000000000..28ca53736d --- /dev/null +++ b/firmware/target/arm/pnx0101/app.lds | |||
@@ -0,0 +1,151 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/pnx0101/crt0-pnx0101.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
19 | |||
20 | #define DRAMORIG 0xc00000 + STUBOFFSET | ||
21 | #define IRAM0ORIG 0x000000 | ||
22 | #define IRAM0SIZE 0x7000 | ||
23 | #define IRAMORIG 0x400000 | ||
24 | #define IRAMSIZE 0x7000 | ||
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 | |||
32 | MEMORY | ||
33 | { | ||
34 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
35 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
36 | IRAM0 : ORIGIN = IRAM0ORIG, LENGTH = IRAM0SIZE | ||
37 | } | ||
38 | |||
39 | SECTIONS | ||
40 | { | ||
41 | .text : | ||
42 | { | ||
43 | loadaddress = .; | ||
44 | _loadaddress = .; | ||
45 | . = ALIGN(0x200); | ||
46 | *(.init.text) | ||
47 | *(.text*) | ||
48 | *(.glue_7) | ||
49 | *(.glue_7t) | ||
50 | . = ALIGN(0x4); | ||
51 | } > DRAM | ||
52 | |||
53 | .rodata : | ||
54 | { | ||
55 | *(.rodata) /* problems without this, dunno why */ | ||
56 | *(.rodata*) | ||
57 | *(.rodata.str1.1) | ||
58 | *(.rodata.str1.4) | ||
59 | . = ALIGN(0x4); | ||
60 | |||
61 | /* Pseudo-allocate the copies of the data sections */ | ||
62 | _datacopy = .; | ||
63 | } > DRAM | ||
64 | |||
65 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
66 | same load address as the copy. Thus, we don't waste extra RAM | ||
67 | when we don't actually need the copy. */ | ||
68 | .data : AT ( _datacopy ) | ||
69 | { | ||
70 | _datastart = .; | ||
71 | *(.data*) | ||
72 | . = ALIGN(0x4); | ||
73 | _dataend = .; | ||
74 | } > DRAM | ||
75 | |||
76 | /DISCARD/ : | ||
77 | { | ||
78 | *(.eh_frame) | ||
79 | } | ||
80 | |||
81 | .vectors 0x0 : | ||
82 | { | ||
83 | _vectorsstart = .; | ||
84 | *(.vectors); | ||
85 | _vectorsend = .; | ||
86 | *(.dmabuf) | ||
87 | } >IRAM0 AT> DRAM | ||
88 | |||
89 | _vectorscopy = LOADADDR(.vectors); | ||
90 | |||
91 | .iram IRAMORIG + SIZEOF(.vectors) : | ||
92 | { | ||
93 | _iramstart = .; | ||
94 | *(.icode) | ||
95 | *(.irodata) | ||
96 | *(.idata) | ||
97 | _iramend = .; | ||
98 | } > IRAM AT> DRAM | ||
99 | |||
100 | _iramcopy = LOADADDR(.iram); | ||
101 | |||
102 | .ibss (NOLOAD) : | ||
103 | { | ||
104 | _iedata = .; | ||
105 | *(.ibss) | ||
106 | . = ALIGN(0x4); | ||
107 | _iend = .; | ||
108 | } > IRAM | ||
109 | |||
110 | .stack : | ||
111 | { | ||
112 | *(.stack) | ||
113 | stackbegin = .; | ||
114 | . += 0x2000; | ||
115 | stackend = .; | ||
116 | } > IRAM | ||
117 | |||
118 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | ||
119 | { | ||
120 | _edata = .; | ||
121 | *(.bss*) | ||
122 | *(COMMON) | ||
123 | . = ALIGN(0x4); | ||
124 | _end = .; | ||
125 | } > DRAM | ||
126 | |||
127 | .audiobuf ALIGN(4) : | ||
128 | { | ||
129 | _audiobuffer = .; | ||
130 | audiobuffer = .; | ||
131 | } > DRAM | ||
132 | |||
133 | .audiobufend ENDAUDIOADDR: | ||
134 | { | ||
135 | audiobufend = .; | ||
136 | _audiobufend = .; | ||
137 | } > DRAM | ||
138 | |||
139 | .codec ENDAUDIOADDR: | ||
140 | { | ||
141 | codecbuf = .; | ||
142 | _codecbuf = .; | ||
143 | } | ||
144 | |||
145 | .plugin ENDADDR: | ||
146 | { | ||
147 | _pluginbuf = .; | ||
148 | pluginbuf = .; | ||
149 | } | ||
150 | } | ||
151 | |||
diff --git a/firmware/target/arm/s3c2440/app.lds b/firmware/target/arm/s3c2440/app.lds new file mode 100644 index 0000000000..3528ed86bf --- /dev/null +++ b/firmware/target/arm/s3c2440/app.lds | |||
@@ -0,0 +1,147 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/s3c2440/crt0.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #include "cpu.h" | ||
19 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - STUBOFFSET - PLUGINSIZE - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE | ||
20 | |||
21 | #define DRAMORIG 0x00000100 + STUBOFFSET | ||
22 | #define IRAMORIG DRAMORIG | ||
23 | #define IRAM DRAM | ||
24 | #define IRAMSIZE 0x1000 | ||
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 | |||
32 | MEMORY | ||
33 | { | ||
34 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
35 | } | ||
36 | |||
37 | SECTIONS | ||
38 | { | ||
39 | .text : | ||
40 | { | ||
41 | loadaddress = .; | ||
42 | _loadaddress = .; | ||
43 | . = ALIGN(0x200); | ||
44 | *(.init.text) | ||
45 | *(.text*) | ||
46 | *(.glue_7) | ||
47 | *(.glue_7t) | ||
48 | . = ALIGN(0x4); | ||
49 | } > DRAM | ||
50 | |||
51 | .rodata : | ||
52 | { | ||
53 | *(.rodata) /* problems without this, dunno why */ | ||
54 | *(.rodata*) | ||
55 | *(.rodata.str1.1) | ||
56 | *(.rodata.str1.4) | ||
57 | . = ALIGN(0x4); | ||
58 | |||
59 | /* Pseudo-allocate the copies of the data sections */ | ||
60 | _datacopy = .; | ||
61 | } > DRAM | ||
62 | |||
63 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
64 | same load address as the copy. Thus, we don't waste extra RAM | ||
65 | when we don't actually need the copy. */ | ||
66 | .data : AT ( _datacopy ) | ||
67 | { | ||
68 | _datastart = .; | ||
69 | *(.data*) | ||
70 | . = ALIGN(0x4); | ||
71 | _dataend = .; | ||
72 | } > DRAM | ||
73 | |||
74 | /DISCARD/ : | ||
75 | { | ||
76 | *(.eh_frame) | ||
77 | } | ||
78 | |||
79 | .vectors 0x0 : | ||
80 | { | ||
81 | _vectorsstart = .; | ||
82 | *(.vectors); | ||
83 | _vectorsend = .; | ||
84 | } AT> DRAM | ||
85 | |||
86 | _vectorscopy = LOADADDR(.vectors); | ||
87 | |||
88 | .iram : | ||
89 | { | ||
90 | _iramstart = .; | ||
91 | *(.icode) | ||
92 | *(.irodata) | ||
93 | *(.idata) | ||
94 | _iramend = .; | ||
95 | } > DRAM | ||
96 | |||
97 | _iramcopy = LOADADDR(.iram); | ||
98 | |||
99 | .ibss (NOLOAD) : | ||
100 | { | ||
101 | _iedata = .; | ||
102 | *(.ibss) | ||
103 | . = ALIGN(0x4); | ||
104 | _iend = .; | ||
105 | } > DRAM | ||
106 | |||
107 | .stack : | ||
108 | { | ||
109 | *(.stack) | ||
110 | stackbegin = .; | ||
111 | . += 0x2000; | ||
112 | stackend = .; | ||
113 | } > DRAM | ||
114 | |||
115 | .bss : | ||
116 | { | ||
117 | _edata = .; | ||
118 | *(.bss*) | ||
119 | *(COMMON) | ||
120 | . = ALIGN(0x4); | ||
121 | _end = .; | ||
122 | } > DRAM | ||
123 | |||
124 | .audiobuf ALIGN(4) : | ||
125 | { | ||
126 | _audiobuffer = .; | ||
127 | audiobuffer = .; | ||
128 | } > DRAM | ||
129 | |||
130 | .audiobufend ENDAUDIOADDR: | ||
131 | { | ||
132 | audiobufend = .; | ||
133 | _audiobufend = .; | ||
134 | } > DRAM | ||
135 | |||
136 | .codec ENDAUDIOADDR: | ||
137 | { | ||
138 | codecbuf = .; | ||
139 | _codecbuf = .; | ||
140 | } | ||
141 | |||
142 | .plugin ENDADDR: | ||
143 | { | ||
144 | _pluginbuf = .; | ||
145 | pluginbuf = .; | ||
146 | } | ||
147 | } | ||
diff --git a/firmware/target/arm/sandisk/app.lds b/firmware/target/arm/sandisk/app.lds new file mode 100644 index 0000000000..765a5f0389 --- /dev/null +++ b/firmware/target/arm/sandisk/app.lds | |||
@@ -0,0 +1,160 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/crt0-pp.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
19 | |||
20 | #define DRAMORIG 0x00000000 + STUBOFFSET | ||
21 | #define IRAMORIG 0x40000000 | ||
22 | #define IRAMSIZE 0xc000 | ||
23 | |||
24 | /* End of the audio buffer, where the codec buffer starts */ | ||
25 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
26 | |||
27 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
28 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
29 | |||
30 | MEMORY | ||
31 | { | ||
32 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
33 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
34 | } | ||
35 | |||
36 | SECTIONS | ||
37 | { | ||
38 | .text : | ||
39 | { | ||
40 | loadaddress = .; | ||
41 | _loadaddress = .; | ||
42 | . = ALIGN(0x200); | ||
43 | *(.init.text) | ||
44 | *(.text*) | ||
45 | *(.glue_7) | ||
46 | *(.glue_7t) | ||
47 | . = ALIGN(0x4); | ||
48 | } > DRAM | ||
49 | |||
50 | .rodata : | ||
51 | { | ||
52 | *(.rodata) /* problems without this, dunno why */ | ||
53 | *(.rodata*) | ||
54 | *(.rodata.str1.1) | ||
55 | *(.rodata.str1.4) | ||
56 | . = ALIGN(0x4); | ||
57 | |||
58 | /* Pseudo-allocate the copies of the data sections */ | ||
59 | _datacopy = .; | ||
60 | } > DRAM | ||
61 | |||
62 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
63 | same load address as the copy. Thus, we don't waste extra RAM | ||
64 | when we don't actually need the copy. */ | ||
65 | .data : AT ( _datacopy ) | ||
66 | { | ||
67 | _datastart = .; | ||
68 | *(.data*) | ||
69 | . = ALIGN(0x4); | ||
70 | _dataend = .; | ||
71 | } > DRAM | ||
72 | |||
73 | /DISCARD/ : | ||
74 | { | ||
75 | *(.eh_frame) | ||
76 | } | ||
77 | |||
78 | .vectors 0x0 : | ||
79 | { | ||
80 | _vectorsstart = .; | ||
81 | *(.vectors); | ||
82 | _vectorsend = .; | ||
83 | } AT> DRAM | ||
84 | |||
85 | _vectorscopy = LOADADDR(.vectors); | ||
86 | |||
87 | .iram IRAMORIG : | ||
88 | { | ||
89 | _iramstart = .; | ||
90 | *(.icode) | ||
91 | *(.irodata) | ||
92 | *(.idata) | ||
93 | _iramend = .; | ||
94 | } > IRAM AT> DRAM | ||
95 | |||
96 | _iramcopy = LOADADDR(.iram); | ||
97 | |||
98 | .ibss (NOLOAD) : | ||
99 | { | ||
100 | _iedata = .; | ||
101 | *(.ibss) | ||
102 | . = ALIGN(0x4); | ||
103 | _iend = .; | ||
104 | } > IRAM | ||
105 | |||
106 | .idle_stacks : | ||
107 | { | ||
108 | *(.idle_stacks) | ||
109 | #if NUM_CORES > 1 | ||
110 | cpu_idlestackbegin = .; | ||
111 | . += IDLE_STACK_SIZE; | ||
112 | cpu_idlestackend = .; | ||
113 | #endif | ||
114 | cop_idlestackbegin = .; | ||
115 | . += IDLE_STACK_SIZE; | ||
116 | cop_idlestackend = .; | ||
117 | } > IRAM | ||
118 | |||
119 | .stack : | ||
120 | { | ||
121 | *(.stack) | ||
122 | stackbegin = .; | ||
123 | . += 0x2000; | ||
124 | stackend = .; | ||
125 | } > IRAM | ||
126 | |||
127 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | ||
128 | { | ||
129 | _edata = .; | ||
130 | *(.bss*) | ||
131 | *(COMMON) | ||
132 | . = ALIGN(0x4); | ||
133 | _end = .; | ||
134 | } > DRAM | ||
135 | |||
136 | .audiobuf ALIGN(4) : | ||
137 | { | ||
138 | _audiobuffer = .; | ||
139 | audiobuffer = .; | ||
140 | } > DRAM | ||
141 | |||
142 | .audiobufend ENDAUDIOADDR: | ||
143 | { | ||
144 | audiobufend = .; | ||
145 | _audiobufend = .; | ||
146 | } > DRAM | ||
147 | |||
148 | .codec ENDAUDIOADDR: | ||
149 | { | ||
150 | codecbuf = .; | ||
151 | _codecbuf = .; | ||
152 | } | ||
153 | |||
154 | .plugin ENDADDR: | ||
155 | { | ||
156 | _pluginbuf = .; | ||
157 | pluginbuf = .; | ||
158 | } | ||
159 | } | ||
160 | |||
diff --git a/firmware/target/arm/tcc780x/app.lds b/firmware/target/arm/tcc780x/app.lds new file mode 100644 index 0000000000..069dd24b9c --- /dev/null +++ b/firmware/target/arm/tcc780x/app.lds | |||
@@ -0,0 +1,170 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/tcc780x/crt0.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
19 | |||
20 | #define DRAMORIG 0x20000000 + STUBOFFSET | ||
21 | #define ITCMORIG 0x00000000 | ||
22 | #define ITCMSIZE 0x1000 | ||
23 | #define DTCMORIG 0xA0000000 | ||
24 | #define DTCMSIZE 0x2000 | ||
25 | #define SRAMORIG 0x10000000 | ||
26 | #define SRAMSIZE 0xc000 | ||
27 | |||
28 | /* End of the audio buffer, where the codec buffer starts */ | ||
29 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
30 | |||
31 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
32 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
33 | |||
34 | MEMORY | ||
35 | { | ||
36 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
37 | /* Seperate data & instruction TCMs plus SRAM. */ | ||
38 | ITCM : ORIGIN = ITCMORIG, LENGTH = ITCMSIZE | ||
39 | DTCM : ORIGIN = DTCMORIG, LENGTH = DTCMSIZE | ||
40 | SRAM : ORIGIN = SRAMORIG, LENGTH = SRAMSIZE | ||
41 | } | ||
42 | |||
43 | SECTIONS | ||
44 | { | ||
45 | .text : | ||
46 | { | ||
47 | loadaddress = .; | ||
48 | _loadaddress = .; | ||
49 | . = ALIGN(0x200); | ||
50 | *(.init.text) | ||
51 | *(.text*) | ||
52 | *(.glue_7) | ||
53 | *(.glue_7t) | ||
54 | . = ALIGN(0x4); | ||
55 | } > DRAM | ||
56 | |||
57 | .rodata : | ||
58 | { | ||
59 | *(.rodata) /* problems without this, dunno why */ | ||
60 | *(.rodata*) | ||
61 | *(.rodata.str1.1) | ||
62 | *(.rodata.str1.4) | ||
63 | . = ALIGN(0x4); | ||
64 | |||
65 | /* Pseudo-allocate the copies of the data sections */ | ||
66 | _datacopy = .; | ||
67 | } > DRAM | ||
68 | |||
69 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
70 | same load address as the copy. Thus, we don't waste extra RAM | ||
71 | when we don't actually need the copy. */ | ||
72 | .data : AT ( _datacopy ) | ||
73 | { | ||
74 | _datastart = .; | ||
75 | *(.data*) | ||
76 | . = ALIGN(0x4); | ||
77 | _dataend = .; | ||
78 | } > DRAM | ||
79 | |||
80 | /DISCARD/ : | ||
81 | { | ||
82 | *(.eh_frame) | ||
83 | } | ||
84 | |||
85 | .vectors ITCMORIG : | ||
86 | { | ||
87 | _vectorsstart = .; | ||
88 | *(.vectors); | ||
89 | _vectorsend = .; | ||
90 | } > ITCM AT> DRAM | ||
91 | |||
92 | _vectorscopy = LOADADDR(.vectors); | ||
93 | |||
94 | .itcm : | ||
95 | { | ||
96 | _itcmstart = .; | ||
97 | _itcmend = .; | ||
98 | } > ITCM AT> DRAM | ||
99 | |||
100 | _itcmcopy = LOADADDR(.itcm); | ||
101 | |||
102 | .dtcm : | ||
103 | { | ||
104 | _dtcmstart = .; | ||
105 | _dtcmend = .; | ||
106 | } > DTCM AT> DRAM | ||
107 | |||
108 | _dtcmcopy = LOADADDR(.dtcm); | ||
109 | |||
110 | .iram : | ||
111 | { | ||
112 | _iramstart = .; | ||
113 | *(.irodata) | ||
114 | *(.idata) | ||
115 | *(.icode) | ||
116 | . = ALIGN(0x4); | ||
117 | _iramend = .; | ||
118 | } > SRAM AT> DRAM | ||
119 | |||
120 | _iramcopy = LOADADDR(.iram); | ||
121 | |||
122 | .ibss (NOLOAD) : | ||
123 | { | ||
124 | _iedata = .; | ||
125 | *(.ibss) | ||
126 | . = ALIGN(0x4); | ||
127 | _iend = .; | ||
128 | } > SRAM | ||
129 | |||
130 | .stack : | ||
131 | { | ||
132 | *(.stack) | ||
133 | stackbegin = .; | ||
134 | . += 0x2000; | ||
135 | stackend = .; | ||
136 | } > SRAM | ||
137 | |||
138 | .bss : | ||
139 | { | ||
140 | _edata = .; | ||
141 | *(.bss*) | ||
142 | *(COMMON) | ||
143 | . = ALIGN(0x4); | ||
144 | _end = .; | ||
145 | } > DRAM | ||
146 | |||
147 | .audiobuf ALIGN(4) : | ||
148 | { | ||
149 | _audiobuffer = .; | ||
150 | audiobuffer = .; | ||
151 | } > DRAM | ||
152 | |||
153 | .audiobufend ENDAUDIOADDR: | ||
154 | { | ||
155 | audiobufend = .; | ||
156 | _audiobufend = .; | ||
157 | } > DRAM | ||
158 | |||
159 | .codec ENDAUDIOADDR: | ||
160 | { | ||
161 | codecbuf = .; | ||
162 | _codecbuf = .; | ||
163 | } | ||
164 | |||
165 | .plugin ENDADDR: | ||
166 | { | ||
167 | _pluginbuf = .; | ||
168 | pluginbuf = .; | ||
169 | } | ||
170 | } | ||
diff --git a/firmware/target/arm/tms320dm320/app.lds b/firmware/target/arm/tms320dm320/app.lds new file mode 100644 index 0000000000..289e1bb218 --- /dev/null +++ b/firmware/target/arm/tms320dm320/app.lds | |||
@@ -0,0 +1,149 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/tms320dm320/crt0.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #include "cpu.h" | ||
19 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGINSIZE - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE | ||
20 | |||
21 | #define DRAMORIG 0x00900000 + STUBOFFSET | ||
22 | #define IRAMORIG 0x00000000 | ||
23 | #define IRAMSIZE 0x4000 | ||
24 | |||
25 | /* End of the audio buffer, where the codec buffer starts */ | ||
26 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
27 | |||
28 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
29 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
30 | |||
31 | MEMORY | ||
32 | { | ||
33 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
34 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
35 | } | ||
36 | |||
37 | SECTIONS | ||
38 | { | ||
39 | .text : | ||
40 | { | ||
41 | loadaddress = .; | ||
42 | _loadaddress = .; | ||
43 | . = ALIGN(0x200); | ||
44 | *(.init.text) | ||
45 | *(.text*) | ||
46 | *(.glue_7) | ||
47 | *(.glue_7t) | ||
48 | . = ALIGN(0x4); | ||
49 | } > DRAM | ||
50 | |||
51 | .rodata : | ||
52 | { | ||
53 | *(.rodata) /* problems without this, dunno why */ | ||
54 | *(.rodata*) | ||
55 | *(.rodata.str1.1) | ||
56 | *(.rodata.str1.4) | ||
57 | . = ALIGN(0x4); | ||
58 | |||
59 | /* Pseudo-allocate the copies of the data sections */ | ||
60 | _datacopy = .; | ||
61 | } > DRAM | ||
62 | |||
63 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
64 | same load address as the copy. Thus, we don't waste extra RAM | ||
65 | when we don't actually need the copy. */ | ||
66 | .data : AT ( _datacopy ) | ||
67 | { | ||
68 | _datastart = .; | ||
69 | *(.data*) | ||
70 | . = ALIGN(0x4); | ||
71 | _dataend = .; | ||
72 | } > DRAM | ||
73 | |||
74 | /DISCARD/ : | ||
75 | { | ||
76 | *(.eh_frame) | ||
77 | } | ||
78 | |||
79 | .vectors IRAMORIG : | ||
80 | { | ||
81 | _vectorsstart = .; | ||
82 | *(.vectors); | ||
83 | _vectorsend = .; | ||
84 | } > IRAM AT> DRAM | ||
85 | |||
86 | _vectorscopy = LOADADDR(.vectors); | ||
87 | |||
88 | .iram : | ||
89 | { | ||
90 | _iramstart = .; | ||
91 | *(.icode) | ||
92 | *(.irodata) | ||
93 | *(.idata) | ||
94 | . = ALIGN(0x4); | ||
95 | _iramend = .; | ||
96 | } > IRAM AT> DRAM | ||
97 | |||
98 | _iramcopy = LOADADDR(.iram); | ||
99 | |||
100 | .ibss (NOLOAD) : | ||
101 | { | ||
102 | _iedata = .; | ||
103 | *(.ibss) | ||
104 | . = ALIGN(0x4); | ||
105 | _iend = .; | ||
106 | } > IRAM | ||
107 | |||
108 | .stack : | ||
109 | { | ||
110 | *(.stack) | ||
111 | stackbegin = .; | ||
112 | . += 0x2000; | ||
113 | stackend = .; | ||
114 | } > IRAM | ||
115 | |||
116 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | ||
117 | { | ||
118 | _edata = .; | ||
119 | *(.bss*) | ||
120 | *(COMMON) | ||
121 | . = ALIGN(0x4); | ||
122 | _end = .; | ||
123 | } > DRAM | ||
124 | |||
125 | .audiobuf ALIGN(4) : | ||
126 | { | ||
127 | _audiobuffer = .; | ||
128 | audiobuffer = .; | ||
129 | } > DRAM | ||
130 | |||
131 | .audiobufend ENDAUDIOADDR: | ||
132 | { | ||
133 | audiobufend = .; | ||
134 | _audiobufend = .; | ||
135 | } > DRAM | ||
136 | |||
137 | .codec ENDAUDIOADDR: | ||
138 | { | ||
139 | codecbuf = .; | ||
140 | _codecbuf = .; | ||
141 | } | ||
142 | |||
143 | .plugin ENDADDR: | ||
144 | { | ||
145 | _pluginbuf = .; | ||
146 | pluginbuf = .; | ||
147 | } | ||
148 | } | ||
149 | |||
diff --git a/firmware/target/coldfire/iaudio/app.lds b/firmware/target/coldfire/iaudio/app.lds new file mode 100644 index 0000000000..f7d8e975da --- /dev/null +++ b/firmware/target/coldfire/iaudio/app.lds | |||
@@ -0,0 +1,143 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-m68k) | ||
6 | INPUT(target/coldfire/crt0.o) | ||
7 | |||
8 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
9 | #define CODECSIZE CODEC_SIZE | ||
10 | |||
11 | #ifdef DEBUG | ||
12 | #define STUBOFFSET 0x10000 | ||
13 | #else | ||
14 | #define STUBOFFSET 0 | ||
15 | #endif | ||
16 | |||
17 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
18 | |||
19 | #define DRAMORIG 0x31000000 + STUBOFFSET | ||
20 | #define IRAMORIG 0x10000000 | ||
21 | #define IRAMSIZE 0x10000 | ||
22 | |||
23 | /* End of the audio buffer, where the codec buffer starts */ | ||
24 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
25 | |||
26 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
27 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
28 | |||
29 | MEMORY | ||
30 | { | ||
31 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
32 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
33 | } | ||
34 | |||
35 | SECTIONS | ||
36 | { | ||
37 | .vectors : | ||
38 | { | ||
39 | loadaddress = .; | ||
40 | _loadaddress = .; | ||
41 | KEEP(*(.resetvectors)); | ||
42 | *(.resetvectors); | ||
43 | KEEP(*(.vectors)); | ||
44 | *(.vectors); | ||
45 | } > DRAM | ||
46 | |||
47 | .text : | ||
48 | { | ||
49 | . = ALIGN(0x200); | ||
50 | *(.init.text) | ||
51 | *(.text*) | ||
52 | . = ALIGN(0x4); | ||
53 | } > DRAM | ||
54 | |||
55 | .rodata : | ||
56 | { | ||
57 | *(.rodata) /* problems without this, dunno why */ | ||
58 | *(.rodata*) | ||
59 | *(.rodata.str1.1) | ||
60 | *(.rodata.str1.4) | ||
61 | . = ALIGN(0x4); | ||
62 | |||
63 | /* Pseudo-allocate the copies of the data sections */ | ||
64 | _datacopy = .; | ||
65 | } > DRAM | ||
66 | |||
67 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
68 | same load address as the copy. Thus, we don't waste extra RAM | ||
69 | when we don't actually need the copy. */ | ||
70 | .data : AT ( _datacopy ) | ||
71 | { | ||
72 | _datastart = .; | ||
73 | *(.data*) | ||
74 | . = ALIGN(0x4); | ||
75 | _dataend = .; | ||
76 | } > DRAM | ||
77 | |||
78 | /DISCARD/ : | ||
79 | { | ||
80 | *(.eh_frame) | ||
81 | } | ||
82 | |||
83 | .iram IRAMORIG : | ||
84 | { | ||
85 | _iramstart = .; | ||
86 | *(.icode) | ||
87 | *(.irodata) | ||
88 | *(.idata) | ||
89 | _iramend = .; | ||
90 | } > IRAM AT> DRAM | ||
91 | |||
92 | _iramcopy = LOADADDR(.iram); | ||
93 | |||
94 | .ibss (NOLOAD) : | ||
95 | { | ||
96 | _iedata = .; | ||
97 | *(.ibss) | ||
98 | . = ALIGN(0x4); | ||
99 | _iend = .; | ||
100 | } > IRAM | ||
101 | |||
102 | .stack : | ||
103 | { | ||
104 | *(.stack) | ||
105 | stackbegin = .; | ||
106 | . += 0x2000; | ||
107 | stackend = .; | ||
108 | } > IRAM | ||
109 | |||
110 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): | ||
111 | { | ||
112 | _edata = .; | ||
113 | *(.bss*) | ||
114 | *(COMMON) | ||
115 | . = ALIGN(0x4); | ||
116 | _end = .; | ||
117 | } > DRAM | ||
118 | |||
119 | .audiobuf ALIGN(4) : | ||
120 | { | ||
121 | _audiobuffer = .; | ||
122 | audiobuffer = .; | ||
123 | } > DRAM | ||
124 | |||
125 | .audiobufend ENDAUDIOADDR: | ||
126 | { | ||
127 | audiobufend = .; | ||
128 | _audiobufend = .; | ||
129 | } > DRAM | ||
130 | |||
131 | .codec ENDAUDIOADDR: | ||
132 | { | ||
133 | codecbuf = .; | ||
134 | _codecbuf = .; | ||
135 | } | ||
136 | |||
137 | .plugin ENDADDR: | ||
138 | { | ||
139 | _pluginbuf = .; | ||
140 | pluginbuf = .; | ||
141 | } | ||
142 | } | ||
143 | |||
diff --git a/firmware/target/coldfire/iriver/app.lds b/firmware/target/coldfire/iriver/app.lds new file mode 100644 index 0000000000..3e4c81fe51 --- /dev/null +++ b/firmware/target/coldfire/iriver/app.lds | |||
@@ -0,0 +1,143 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-m68k) | ||
6 | INPUT(target/coldfire/crt0.o) | ||
7 | |||
8 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
9 | #define CODECSIZE CODEC_SIZE | ||
10 | |||
11 | #ifdef DEBUG | ||
12 | #define STUBOFFSET 0x10000 | ||
13 | #else | ||
14 | #define STUBOFFSET 0 | ||
15 | #endif | ||
16 | |||
17 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
18 | |||
19 | #define DRAMORIG 0x31000000 + STUBOFFSET | ||
20 | #define IRAMORIG 0x10000000 | ||
21 | #define IRAMSIZE 0xc000 | ||
22 | |||
23 | /* End of the audio buffer, where the codec buffer starts */ | ||
24 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
25 | |||
26 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
27 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
28 | |||
29 | MEMORY | ||
30 | { | ||
31 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
32 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
33 | } | ||
34 | |||
35 | SECTIONS | ||
36 | { | ||
37 | .vectors : | ||
38 | { | ||
39 | loadaddress = .; | ||
40 | _loadaddress = .; | ||
41 | KEEP(*(.resetvectors)); | ||
42 | *(.resetvectors); | ||
43 | KEEP(*(.vectors)); | ||
44 | *(.vectors); | ||
45 | } > DRAM | ||
46 | |||
47 | .text : | ||
48 | { | ||
49 | . = ALIGN(0x200); | ||
50 | *(.init.text) | ||
51 | *(.text*) | ||
52 | . = ALIGN(0x4); | ||
53 | } > DRAM | ||
54 | |||
55 | .rodata : | ||
56 | { | ||
57 | *(.rodata) /* problems without this, dunno why */ | ||
58 | *(.rodata*) | ||
59 | *(.rodata.str1.1) | ||
60 | *(.rodata.str1.4) | ||
61 | . = ALIGN(0x4); | ||
62 | |||
63 | /* Pseudo-allocate the copies of the data sections */ | ||
64 | _datacopy = .; | ||
65 | } > DRAM | ||
66 | |||
67 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
68 | same load address as the copy. Thus, we don't waste extra RAM | ||
69 | when we don't actually need the copy. */ | ||
70 | .data : AT ( _datacopy ) | ||
71 | { | ||
72 | _datastart = .; | ||
73 | *(.data*) | ||
74 | . = ALIGN(0x4); | ||
75 | _dataend = .; | ||
76 | } > DRAM | ||
77 | |||
78 | /DISCARD/ : | ||
79 | { | ||
80 | *(.eh_frame) | ||
81 | } | ||
82 | |||
83 | .iram IRAMORIG : | ||
84 | { | ||
85 | _iramstart = .; | ||
86 | *(.icode) | ||
87 | *(.irodata) | ||
88 | *(.idata) | ||
89 | _iramend = .; | ||
90 | } > IRAM AT> DRAM | ||
91 | |||
92 | _iramcopy = LOADADDR(.iram); | ||
93 | |||
94 | .ibss (NOLOAD) : | ||
95 | { | ||
96 | _iedata = .; | ||
97 | *(.ibss) | ||
98 | . = ALIGN(0x4); | ||
99 | _iend = .; | ||
100 | } > IRAM | ||
101 | |||
102 | .stack : | ||
103 | { | ||
104 | *(.stack) | ||
105 | stackbegin = .; | ||
106 | . += 0x2000; | ||
107 | stackend = .; | ||
108 | } > IRAM | ||
109 | |||
110 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): | ||
111 | { | ||
112 | _edata = .; | ||
113 | *(.bss*) | ||
114 | *(COMMON) | ||
115 | . = ALIGN(0x4); | ||
116 | _end = .; | ||
117 | } > DRAM | ||
118 | |||
119 | .audiobuf ALIGN(4) : | ||
120 | { | ||
121 | _audiobuffer = .; | ||
122 | audiobuffer = .; | ||
123 | } > DRAM | ||
124 | |||
125 | .audiobufend ENDAUDIOADDR: | ||
126 | { | ||
127 | audiobufend = .; | ||
128 | _audiobufend = .; | ||
129 | } > DRAM | ||
130 | |||
131 | .codec ENDAUDIOADDR: | ||
132 | { | ||
133 | codecbuf = .; | ||
134 | _codecbuf = .; | ||
135 | } | ||
136 | |||
137 | .plugin ENDADDR: | ||
138 | { | ||
139 | _pluginbuf = .; | ||
140 | pluginbuf = .; | ||
141 | } | ||
142 | } | ||
143 | |||
diff --git a/firmware/target/sh/archos/app.lds b/firmware/target/sh/archos/app.lds new file mode 100644 index 0000000000..94cb437706 --- /dev/null +++ b/firmware/target/sh/archos/app.lds | |||
@@ -0,0 +1,145 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-sh) | ||
6 | INPUT(target/sh/crt0.o) | ||
7 | |||
8 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
9 | #define CODECSIZE CODEC_SIZE | ||
10 | |||
11 | #ifdef DEBUG | ||
12 | #define STUBOFFSET 0x10000 | ||
13 | #else | ||
14 | #define STUBOFFSET 0 | ||
15 | #endif | ||
16 | |||
17 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
18 | |||
19 | #define DRAMORIG 0x09000000 + STUBOFFSET | ||
20 | #define IRAMORIG 0x0f000000 | ||
21 | #define IRAMSIZE 0x1000 | ||
22 | |||
23 | /* End of the audio buffer, where the codec buffer starts */ | ||
24 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
25 | |||
26 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
27 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
28 | |||
29 | MEMORY | ||
30 | { | ||
31 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
32 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
33 | } | ||
34 | |||
35 | SECTIONS | ||
36 | { | ||
37 | .vectors : | ||
38 | { | ||
39 | loadaddress = .; | ||
40 | _loadaddress = .; | ||
41 | KEEP(*(.resetvectors)); | ||
42 | *(.resetvectors); | ||
43 | KEEP(*(.vectors)); | ||
44 | *(.vectors); | ||
45 | } > DRAM | ||
46 | |||
47 | .text : | ||
48 | { | ||
49 | . = ALIGN(0x200); | ||
50 | *(.init.text) | ||
51 | *(.text*) | ||
52 | . = ALIGN(0x4); | ||
53 | } > DRAM | ||
54 | |||
55 | .rodata : | ||
56 | { | ||
57 | *(.rodata) /* problems without this, dunno why */ | ||
58 | *(.rodata*) | ||
59 | *(.rodata.str1.1) | ||
60 | *(.rodata.str1.4) | ||
61 | . = ALIGN(0x4); | ||
62 | |||
63 | /* Pseudo-allocate the copies of the data sections */ | ||
64 | _datacopy = .; | ||
65 | } > DRAM | ||
66 | |||
67 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
68 | same load address as the copy. Thus, we don't waste extra RAM | ||
69 | when we don't actually need the copy. */ | ||
70 | .data : AT ( _datacopy ) | ||
71 | { | ||
72 | _datastart = .; | ||
73 | *(.data*) | ||
74 | . = ALIGN(0x4); | ||
75 | _dataend = .; | ||
76 | } > DRAM | ||
77 | |||
78 | /DISCARD/ : | ||
79 | { | ||
80 | *(.eh_frame) | ||
81 | } | ||
82 | |||
83 | .iram IRAMORIG : | ||
84 | { | ||
85 | _iramstart = .; | ||
86 | *(.icode) | ||
87 | *(.irodata) | ||
88 | *(.idata) | ||
89 | _iramend = .; | ||
90 | } > IRAM AT> DRAM | ||
91 | |||
92 | _iramcopy = LOADADDR(.iram); | ||
93 | |||
94 | .ibss (NOLOAD) : | ||
95 | { | ||
96 | _iedata = .; | ||
97 | *(.ibss) | ||
98 | . = ALIGN(0x4); | ||
99 | _iend = .; | ||
100 | } > IRAM | ||
101 | |||
102 | /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section | ||
103 | size smaller, and allow the stack to grow into the .iram copy */ | ||
104 | .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): | ||
105 | { | ||
106 | *(.stack) | ||
107 | _stackbegin = . - SIZEOF(.iram); | ||
108 | . += 0x2000 - SIZEOF(.iram); | ||
109 | _stackend = .; | ||
110 | } > DRAM | ||
111 | |||
112 | .bss : | ||
113 | { | ||
114 | _edata = .; | ||
115 | *(.bss*) | ||
116 | *(COMMON) | ||
117 | . = ALIGN(0x4); | ||
118 | _end = .; | ||
119 | } > DRAM | ||
120 | |||
121 | .audiobuf ALIGN(4) : | ||
122 | { | ||
123 | _audiobuffer = .; | ||
124 | audiobuffer = .; | ||
125 | } > DRAM | ||
126 | |||
127 | .audiobufend ENDAUDIOADDR: | ||
128 | { | ||
129 | audiobufend = .; | ||
130 | _audiobufend = .; | ||
131 | } > DRAM | ||
132 | |||
133 | .codec ENDAUDIOADDR: | ||
134 | { | ||
135 | codecbuf = .; | ||
136 | _codecbuf = .; | ||
137 | } | ||
138 | |||
139 | .plugin ENDADDR: | ||
140 | { | ||
141 | _pluginbuf = .; | ||
142 | pluginbuf = .; | ||
143 | } | ||
144 | } | ||
145 | |||