summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/app.lds
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/app.lds')
-rw-r--r--firmware/target/arm/imx233/app.lds119
1 files changed, 119 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/app.lds b/firmware/target/arm/imx233/app.lds
new file mode 100644
index 0000000000..66d0b04391
--- /dev/null
+++ b/firmware/target/arm/imx233/app.lds
@@ -0,0 +1,119 @@
1#include "config.h"
2#include "cpu.h"
3
4ENTRY(start)
5OUTPUT_FORMAT(elf32-littlearm)
6OUTPUT_ARCH(arm)
7STARTUP(target/arm/imx233/crt0.o)
8
9#define PLUGINSIZE PLUGIN_BUFFER_SIZE
10#define CODECSIZE CODEC_SIZE
11
12#define DRAMORIG DRAM_ORIG
13#define IRAMORIG IRAM_ORIG
14
15#define IRAMSIZE (IRAM_SIZE - TTB_SIZE)
16
17#define DRAMSIZE (DRAM_SIZE - PLUGINSIZE - CODECSIZE - FRAME_SIZE)
18
19/* End of the audio buffer, where the codec buffer starts */
20#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
21
22/* Where the codec buffer ends, and the plugin buffer starts */
23#define ENDADDR (ENDAUDIOADDR + CODEC_SIZE)
24
25/* INIT section is the codec buffer */
26#define INITSIZE CODEC_SIZE
27#define INITSTART ENDAUDIOADDR
28
29MEMORY
30{
31 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
32 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
33}
34
35SECTIONS
36{
37 .text :
38 {
39 loadaddress = .;
40 _loadaddress = .;
41 *(.text*)
42 } > DRAM
43
44 .data :
45 {
46 *(.data*)
47 *(.rodata*)
48 _dataend = . ;
49 } > DRAM
50
51 .iram :
52 {
53 _iramstart = .; // always 0
54 *(.vectors)
55 KEEP(*(.vectors));// otherwise there are no references to it and the linker strip it
56 *(.icode)
57 *(.irodata)
58 *(.idata)
59 . = ALIGN(0x4);
60 _iramend = .;
61 } > IRAM AT> DRAM
62
63 _iramcopy = LOADADDR(.iram);
64
65 .ibss (NOLOAD) :
66 {
67 _iedata = .;
68 *(.qharray)
69 *(.ibss)
70 . = ALIGN(0x4);
71 _iend = .;
72 } > IRAM
73
74 .init ENDAUDIOADDR :
75 {
76 . = ALIGN(4);
77 _initstart = .;
78 *(.init)
79 _initend = .;
80 } AT> DRAM
81
82 _initcopy = LOADADDR(.init);
83
84 .stack (NOLOAD) :
85 {
86 *(.stack)
87 stackbegin = .;
88 . += 0x2000;
89 stackend = .;
90 } > DRAM
91
92 .bss (NOLOAD) :
93 {
94 _edata = .;
95 *(.bss*);
96 _end = .;
97 } > DRAM
98
99 .audiobuf (NOLOAD) :
100 {
101 . = ALIGN(4);
102 _audiobuffer = .;
103 audiobuffer = .;
104 } > DRAM
105
106 .codec ENDAUDIOADDR (NOLOAD) :
107 {
108 audiobufend = .;
109 _audiobufend = .;
110 codecbuf = .;
111 _codecbuf = .;
112 } > DRAM
113
114 .plugin ENDADDR (NOLOAD) :
115 {
116 _pluginbuf = .;
117 pluginbuf = .;
118 }
119}