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 BOOT_OFFSET 0x1000000
38 #define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - BOOT_OFFSET
40 #define DRAMORIG (0x00900000+BOOT_OFFSET) /* actually it's 0x00900000 */
41 #define IRAMORIG 0x00000000
42 #define IRAMSIZE 0x4000
43 #define FLASHORIG 0x00100000
46 /* End of the audio buffer, where the codec buffer starts */
47 #define TTB_BEGIN (DRAMORIG + DRAMSIZE - LCD_TTB_AREA)
51 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
52 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
53 FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
72 *(.rodata) /* problems without this, dunno why */
78 /* Pseudo-allocate the copies of the data sections */
91 KEEP(*(.resetvectors));
97 _vectorscopy = LOADADDR(.vectors);
109 _iramcopy = LOADADDR(.iram);
143 . = ADDR(.data) + SIZEOF(.data) + SIZEOF(.vectors) + SIZEOF(.iram);
151 .ttbtable TTB_BEGIN (NOLOAD) :
158 /* The LCD buffer should be at the end of memory to protect against
159 * overflowing something else when the YUV blitter is fudging the screen
163 .lcdbuffer (NOLOAD) :
166 . += LCD_BUFFER_SIZE;
169 .lcdbuffer2 (NOLOAD) :
172 . += LCD_BUFFER_SIZE;