Of course there's no mdelay on c200(v1), so just use udelay
[kugel-rb.git] / firmware / target / arm / tcc77x / app.lds
blobc50367cb082da6888cf319d2299d3a0d9c1550a3
1 #include "config.h"
3 ENTRY(start)
4 OUTPUT_FORMAT(elf32-littlearm)
5 OUTPUT_ARCH(arm)
6 STARTUP(target/arm/tcc77x/crt0.o)
8 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
9 #define CODECSIZE CODEC_SIZE
10                                                                                                                                               
11 #ifdef DEBUG
12 #define STUBOFFSET 0x10000
13 #else
14 #define STUBOFFSET 0
15 #endif
17 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
19 #define DRAMORIG 0x20000000
20 #define IRAMORIG 0x00000000
21 #define IRAMSIZE 64K
24 /* End of the audio buffer, where the codec buffer starts */
25 #define ENDAUDIOADDR  (DRAMORIG + DRAMSIZE)
27 /* Where the codec buffer ends, and the plugin buffer starts */
28 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
31 MEMORY
33 #ifdef TCCBOOT
34    DRAM : ORIGIN = DRAMORIG + DRAMSIZE - 0x100000, LENGTH = 0x100000
35 #else
36    DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
37 #endif
38    IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
41 SECTIONS
43     .text : {
44         loadaddress = .;                                                                                                                      
45         _loadaddress = .;                                                                                                                     
46         . = ALIGN(0x200);                                                                                                                     
47         *(.init.text)
48         *(.text)
49         *(.text*)
50         *(.glue_7)
51         *(.glue_7t)
52    } > DRAM
54     .data : {
55         *(.icode)
56         *(.irodata)
57         *(.idata)
58         *(.data*)
59         *(.rodata.*)
60         *(.rodata)
61         . = ALIGN(0x4);
62         _dataend = . ;
63     } > DRAM
65     .stack :
66     {
67          *(.stack)
68          _stackbegin = .;
69          stackbegin = .;
70          . += 0x2000;
71          _stackend = .;
72          stackend = .;
73     } > DRAM
75     .bss : {
76          _edata = .;
77          *(.bss*);
78          *(.ibss);
79          *(COMMON)
80          _end = .;
81      } > DRAM
82     .audiobuf ALIGN(4) :
83     {
84         _audiobuffer = .;
85         audiobuffer = .;
86     } > DRAM
88     .audiobufend ENDAUDIOADDR:
89     {
90         audiobufend = .;
91         _audiobufend = .;
92     } > DRAM
93     
94     .codec ENDAUDIOADDR:
95     {
96         codecbuf = .;
97         _codecbuf = .;
98     }
100     .plugin ENDADDR:
101     {
102         _pluginbuf = .;
103         pluginbuf = .;
104     }