summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iaudio/app.lds
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire/iaudio/app.lds')
-rw-r--r--firmware/target/coldfire/iaudio/app.lds143
1 files changed, 143 insertions, 0 deletions
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
3ENTRY(start)
4
5OUTPUT_FORMAT(elf32-m68k)
6INPUT(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
29MEMORY
30{
31 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
32 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
33}
34
35SECTIONS
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