5 OUTPUT_FORMAT(elf32-littlearm)
7 STARTUP(target/arm/tms320dm320/crt0.o)
10 #define STUBOFFSET 0x10000
15 #ifndef LCD_NATIVE_WIDTH
16 #define LCD_NATIVE_WIDTH LCD_WIDTH
19 #ifndef LCD_NATIVE_HEIGHT
20 #define LCD_NATIVE_HEIGHT LCD_HEIGHT
23 #define LCD_FUDGE LCD_NATIVE_WIDTH%32
25 #define LCD_BUFFER_SIZE ((LCD_NATIVE_WIDTH+LCD_FUDGE)*LCD_NATIVE_HEIGHT*2)
27 /* must be 16Kb (0x4000) aligned */
28 #define TTB_SIZE 0x4000
30 /* Give this some memory to allow it to align to the MMU boundary.
31 * Note that since there are two buffers (YUV/RGB) it calculates the approximate
32 * memory needed in steps of 1 Meg.
34 #define LCD_TTB_AREA 0x100000*((LCD_BUFFER_SIZE>>19)+1)
36 #define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET
38 #define DRAMORIG 0x00900000 + STUBOFFSET
39 #define IRAMORIG 0x00000000
40 #define IRAMSIZE 0x4000
42 /* End of the audio buffer, where the codec buffer starts */
43 #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_TTB_AREA)
47 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
48 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
66 *(.rodata) /* problems without this, dunno why */
89 _vectorscopy = LOADADDR(.vectors);
101 _iramcopy = LOADADDR(.iram);
133 /* This overwrites the iram (in ram), so make sure that the iram is copied
134 * out in crt0.s before the bss section and the rest are used.
138 . = ADDR(.data) + SIZEOF(.data);
152 .audiobufend ENDAUDIOADDR (NOLOAD) :
157 .codec ENDAUDIOADDR (NOLOAD) :
166 . += PLUGIN_BUFFER_SIZE;
176 /* The LCD buffer should be at the end of memory to protect against
177 * overflowing something else when the YUV blitter is fudging the screen
181 .lcdbuffer (NOLOAD) :
184 . += LCD_BUFFER_SIZE;
187 .lcdbuffer2 (NOLOAD) :
190 . += LCD_BUFFER_SIZE;