summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8702/app.lds
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s5l8702/app.lds')
-rw-r--r--firmware/target/arm/s5l8702/app.lds142
1 files changed, 142 insertions, 0 deletions
diff --git a/firmware/target/arm/s5l8702/app.lds b/firmware/target/arm/s5l8702/app.lds
new file mode 100644
index 0000000000..fafdea4cd9
--- /dev/null
+++ b/firmware/target/arm/s5l8702/app.lds
@@ -0,0 +1,142 @@
1#define ASM
2#include "config.h"
3#include "cpu.h"
4
5ENTRY(start)
6
7OUTPUT_FORMAT(elf32-littlearm)
8OUTPUT_ARCH(arm)
9STARTUP(target/arm/s5l8702/crt0.o)
10
11#define PLUGINSIZE PLUGIN_BUFFER_SIZE
12#define CODECSIZE CODEC_SIZE
13
14#define IRAMORIG 0x0
15#define DRAMORIG 0x08000000
16
17/* End of the audio buffer, where the codec buffer starts */
18#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
19
20#define DRAMSIZE (DRAM_SIZE - PLUGINSIZE - CODECSIZE - TTB_SIZE)
21#define CODECORIG (ENDAUDIOADDR)
22#define IRAMSIZE (56*1024) /* 256KB total - 56KB for core, 200KB for codecs */
23
24/* Where the codec buffer ends, and the plugin buffer starts */
25#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
26
27MEMORY
28{
29 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
30 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
31}
32
33SECTIONS
34{
35 loadaddress = DRAMORIG;
36
37 .intvect : {
38 _intvectstart = . ;
39 *(.intvect)
40 _intvectend = _newstart ;
41 } >IRAM AT> DRAM
42 _intvectcopy = LOADADDR(.intvect) ;
43
44 .text :
45 {
46 _loadaddress = .;
47 _textstart = .;
48 *(.init.text)
49 *(.text)
50 *(.text*)
51 *(.glue_7)
52 *(.glue_7t)
53 . = ALIGN(0x4);
54 } > DRAM
55
56 .rodata :
57 {
58 *(.rodata*)
59 . = ALIGN(0x4);
60 } > DRAM
61
62 .data :
63 {
64 *(.data*)
65 . = ALIGN(0x4);
66 } > DRAM
67
68 /DISCARD/ :
69 {
70 *(.eh_frame)
71 }
72
73 .iram :
74 {
75 _iramstart = .;
76 *(.icode)
77 *(.irodata)
78 *(.idata)
79 . = ALIGN(0x4);
80 _iramend = .;
81 } > IRAM AT> DRAM
82 _iramcopy = LOADADDR(.iram) ;
83
84 .ibss (NOLOAD) :
85 {
86 _iedata = .;
87 *(.qharray)
88 *(.ibss)
89 . = ALIGN(0x4);
90 _iend = .;
91 } > IRAM
92
93 .stack (NOLOAD) :
94 {
95 *(.stack)
96 stackbegin = .;
97 _stackbegin = .;
98 . += 0x4000;
99 stackend = .;
100 _stackend = .;
101 _irqstackbegin = .;
102 . += 0x400;
103 _irqstackend = .;
104 _fiqstackbegin = .;
105 . += 0x400;
106 _fiqstackend = .;
107 } > IRAM
108
109 .bss (NOLOAD) :
110 {
111 _edata = .;
112 *(.bss*)
113 *(COMMON)
114 . = ALIGN(0x4);
115 _end = .;
116 } > DRAM
117
118 .audiobuf (NOLOAD) :
119 {
120 . = ALIGN(4);
121 _audiobuffer = .;
122 audiobuffer = .;
123 } > DRAM
124
125 .audiobufend ENDAUDIOADDR (NOLOAD) :
126 {
127 audiobufend = .;
128 _audiobufend = .;
129 } > DRAM
130
131 .codec CODECORIG (NOLOAD) :
132 {
133 codecbuf = .;
134 _codecbuf = .;
135 } > DRAM
136
137 .plugin ENDADDR (NOLOAD) :
138 {
139 _pluginbuf = .;
140 pluginbuf = .;
141 }
142}