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 */
91 _vectorscopy = LOADADDR(.vectors);
103 _iramcopy = LOADADDR(.iram);
121 /* This could probably be shortened so that the audio buffer overwrites
122 * at the IRAM stuff (assuming that it is copied first in crt0.S), but
123 * leave it for now since the space is not critical at the moment.
127 . = ADDR(.data) + SIZEOF(.data) + SIZEOF(.vectors) + SIZEOF(.iram);
143 .audiobufend ENDAUDIOADDR (NOLOAD) :
149 .codec ENDAUDIOADDR (NOLOAD) :
160 . += PLUGIN_BUFFER_SIZE;
170 /* The LCD buffer should be at the end of memory to protect against
171 * overflowing something else when the YUV blitter is fudging the screen
175 .lcdbuffer (NOLOAD) :
178 . += LCD_BUFFER_SIZE;
181 .lcdbuffer2 (NOLOAD) :
184 . += LCD_BUFFER_SIZE;