summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320/app.lds
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2008-03-13 03:48:23 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2008-03-13 03:48:23 +0000
commitef62d6891a4def12d43b7a562f165eeb93816461 (patch)
tree3c9e8720c846075568d2fe1157f8e3b6b48103db /firmware/target/arm/tms320dm320/app.lds
parent2b5f9aec646aceaf24b243e38e1de316e1bc3475 (diff)
downloadrockbox-ef62d6891a4def12d43b7a562f165eeb93816461.tar.gz
rockbox-ef62d6891a4def12d43b7a562f165eeb93816461.zip
Split up app.lds to the respective target directories. The portalplayer devices replicate app.lds since their target tree doesn't follow a syntax typical to the newer arm targets - the portalplayers could be cleaned up further. boot.lds and plugin.lds still need to be cleaned up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16651 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tms320dm320/app.lds')
-rw-r--r--firmware/target/arm/tms320dm320/app.lds149
1 files changed, 149 insertions, 0 deletions
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
3ENTRY(start)
4
5OUTPUT_FORMAT(elf32-littlearm)
6OUTPUT_ARCH(arm)
7INPUT(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
31MEMORY
32{
33 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
34 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
35}
36
37SECTIONS
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