Packard Bell Vibe: manual - add a few plugin keymaps.
[kugel-rb.git] / firmware / target / sh / archos / app.lds
blob225f11f70572940a867f031de400f5bbb92cc965
1 #include "config.h"
3 ENTRY(start)
5 OUTPUT_FORMAT(elf32-sh)
6 STARTUP(target/sh/crt0.o)
8 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
9 #define CODECSIZE CODEC_SIZE
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 0x09000000 + STUBOFFSET
20 #define IRAMORIG 0x0f000000
21 #define IRAMSIZE 0x1000
23 /* End of the audio buffer, where the codec buffer starts */
24 #define ENDAUDIOADDR  (DRAMORIG + DRAMSIZE)
26 /* Where the codec buffer ends, and the plugin buffer starts */
27 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
29 MEMORY
31     DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
32     IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
35 SECTIONS
37     .vectors :
38     {
39         loadaddress = .;
40         _loadaddress = .;
41         KEEP(*(.resetvectors));
42         *(.resetvectors);
43         KEEP(*(.vectors));
44         *(.vectors);
45     } > DRAM
47     .text :
48     {
49         . = ALIGN(0x200);
50         *(.init.text)
51         *(.text*)
52         . = ALIGN(0x4);
53     } > DRAM
55     .rodata :
56     {
57         *(.rodata)  /* problems without this, dunno why */
58         *(.rodata*)
59         *(.rodata.str1.1)
60         *(.rodata.str1.4)
61         . = ALIGN(0x4);
63         /* Pseudo-allocate the copies of the data sections */
64         _datacopy = .;
65     } > DRAM
67     /* TRICK ALERT! For RAM execution, we put the .data section at the
68        same load address as the copy. Thus, we don't waste extra RAM
69        when we don't actually need the copy.  */
70     .data : AT ( _datacopy )
71     {
72         _datastart = .;
73         *(.data*)
74         . = ALIGN(0x4);
75         _dataend  = .;
76     } > DRAM
78     /DISCARD/ :
79     {
80         *(.eh_frame)
81     }
83     .iram IRAMORIG :
84     {
85         _iramstart = .;
86         *(.icode)
87         *(.irodata)
88         *(.idata)
89         _iramend = .;
90     } > IRAM AT> DRAM
92     _iramcopy = LOADADDR(.iram);
93     _noloaddram = LOADADDR(.iram);
95     .ibss (NOLOAD) :
96     {
97         _iedata = .;
98         *(.ibss)
99         . = ALIGN(0x4);
100         _iend = .;
101     } > IRAM
102     
103     .stack _noloaddram (NOLOAD) :
104     {
105        *(.stack)
106        _stackbegin = .;
107        . += 0x2000;
108        _stackend = .;
109     } > DRAM
111     .bss (NOLOAD) :
112     {
113        _edata = .;
114         *(.bss*)
115         *(COMMON)
116         . = ALIGN(0x4);
117        _end = .;
118     } > DRAM
120     .audiobuf (NOLOAD) :
121     {
122         . = ALIGN(4);
123         _audiobuffer = .;
124         audiobuffer = .;
125     } > DRAM
127     .audiobufend ENDAUDIOADDR (NOLOAD) :
128     {
129         audiobufend = .;
130         _audiobufend = .;
131     } > DRAM
133     .codec ENDAUDIOADDR (NOLOAD) :
134     {
135         codecbuf = .;
136         _codecbuf = .;
137     }
139     .plugin ENDADDR (NOLOAD) :
140     {
141         _pluginbuf = .;
142         pluginbuf = .;
143     }