summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320/app.lds
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tms320dm320/app.lds')
-rw-r--r--firmware/target/arm/tms320dm320/app.lds57
1 files changed, 31 insertions, 26 deletions
diff --git a/firmware/target/arm/tms320dm320/app.lds b/firmware/target/arm/tms320dm320/app.lds
index 47ff239a1a..4e175101a9 100644
--- a/firmware/target/arm/tms320dm320/app.lds
+++ b/firmware/target/arm/tms320dm320/app.lds
@@ -6,35 +6,30 @@ OUTPUT_FORMAT(elf32-littlearm)
6OUTPUT_ARCH(arm) 6OUTPUT_ARCH(arm)
7STARTUP(target/arm/tms320dm320/crt0.o) 7STARTUP(target/arm/tms320dm320/crt0.o)
8 8
9#define PLUGINSIZE PLUGIN_BUFFER_SIZE
10#define CODECSIZE CODEC_SIZE
11
12#ifdef DEBUG 9#ifdef DEBUG
13#define STUBOFFSET 0x10000 10#define STUBOFFSET 0x10000
14#else 11#else
15#define STUBOFFSET 0 12#define STUBOFFSET 0
16#endif 13#endif
17 14
18#define LCD_BUFFER_SIZE (LCD_WIDTH*LCD_HEIGHT*2) 15#define LCD_FUDGE LCD_NATIVE_WIDTH%32
19
20/* must be 16Kb (0x4000) aligned */
21#define TTB_SIZE (0x4000)
22 16
23#define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGINSIZE - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE 17#define LCD_BUFFER_SIZE ((LCD_NATIVE_WIDTH+LCD_FUDGE)*LCD_NATIVE_HEIGHT*2)
24 18
25#define DRAMORIG 0x00900000 + STUBOFFSET 19/* must be 16Kb (0x4000) aligned */
26#define IRAMORIG 0x00000000 20#define TTB_SIZE 0x4000
27#define IRAMSIZE 0x4000
28 21
29/* End of the audio buffer, where the codec buffer starts */ 22/* Give this 1 meg to allow it to align to the MMU boundary */
30#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) 23#define LCD_TTB_AREA 0x100000
31 24
32/* Where the codec buffer ends, and the plugin buffer starts */ 25#define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET
33#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
34 26
35#define LCDBEGIN (ENDADDR + PLUGINSIZE) 27#define DRAMORIG 0x00900000 + STUBOFFSET
28#define IRAMORIG 0x00000000
29#define IRAMSIZE 0x4000
36 30
37#define TTBBEGIN (LCDBEGIN + LCD_BUFFER_SIZE) 31/* End of the audio buffer, where the codec buffer starts */
32#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_TTB_AREA)
38 33
39MEMORY 34MEMORY
40{ 35{
@@ -144,22 +139,32 @@ SECTIONS
144 { 139 {
145 codecbuf = .; 140 codecbuf = .;
146 _codecbuf = .; 141 _codecbuf = .;
147 } 142 . += CODEC_SIZE;
143 } > DRAM
148 144
149 .plugin ENDADDR (NOLOAD) : 145 .plugin (NOLOAD) :
150 { 146 {
151 _pluginbuf = .; 147 _pluginbuf = .;
152 pluginbuf = .; 148 pluginbuf = .;
153 } 149 . += PLUGIN_BUFFER_SIZE;
150 } > DRAM
154 151
155 .lcdbuffer LCDBEGIN (NOLOAD) : 152 .ttbtable (NOLOAD) :
156 { 153 {
157 _lcdbuf = .; 154 . = ALIGN (0x4000);
158 } 155 _ttbstart = .;
156 . += TTB_SIZE;
157 } > DRAM
158
159 /* The LCD buffer should be at the end of memory to protect against
160 * overflowing something else when the YUV blitter is fudging the screen
161 * size.
162 */
159 163
160 .ttbtable TTBBEGIN (NOLOAD) : 164 .lcdbuffer (NOLOAD) :
161 { 165 {
162 _ttbstart = .; 166 _lcdbuf = .;
163 } 167 . += LCD_BUFFER_SIZE;
168 } > DRAM
164} 169}
165 170