Trim down peak calculation a bit.
[kugel-rb.git] / firmware / target / arm / s5l8700 / app.lds
blob7020c725e06abd7ef6b2535bd62093a112bd8729
1 #include "config.h"
2 #include "cpu.h"
4 ENTRY(start)
6 OUTPUT_FORMAT(elf32-littlearm)
7 OUTPUT_ARCH(arm)
8 STARTUP(target/arm/s5l8700/crt0.o)
10 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
11 #define CODECSIZE CODEC_SIZE
13 #ifdef DEBUG
14 #define STUBOFFSET 0x10000
15 #else
16 #define STUBOFFSET 0
17 #endif
20 #define IRAMORIG 0x0
21 #define DRAMORIG 0x08000000
23 /* End of the audio buffer, where the codec buffer starts */
24 #define ENDAUDIOADDR  (DRAMORIG + DRAMSIZE)
26 #define DRAM_SIZE (MEMORYSIZE * 0x100000)
28 #define DRAMSIZE (DRAM_SIZE - STUBOFFSET - PLUGINSIZE - CODECSIZE)
29 #define CODECORIG (ENDAUDIOADDR)
30 #if CONFIG_CPU==S5L8700
31 #define IRAMSIZE (128*1024)  /* 256KB total - 128KB for core, 128KB for plugins */
32 #else /* S5L8701 */
33 #define IRAMSIZE (96*1024)  /* 176KB total - 96KB for core, 80KB for plugins */
34 #endif
36 /* Where the codec buffer ends, and the plugin buffer starts */
37 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
39 MEMORY
41     IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
42     DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
45 SECTIONS
47     loadaddress = DRAMORIG;
49     .intvect : {
50         _intvectstart = . ;
51         *(.intvect)
52         _intvectend = _newstart ;  
53     } >IRAM AT> DRAM
54     _intvectcopy = LOADADDR(.intvect) ;
56     .text :
57     {
58         _loadaddress = .;
59         _textstart = .;
60         *(.init.text)
61         *(.text)
62         *(.text*)
63         *(.glue_7)
64         *(.glue_7t)
65         . = ALIGN(0x4);
66     } > DRAM
68     .rodata :
69     {
70         *(.rodata*)
71         . = ALIGN(0x4);
72     } > DRAM
74     .data :
75     {
76         *(.data*)
77         . = ALIGN(0x4);
78     } > DRAM
80     /DISCARD/ :
81     {
82         *(.eh_frame)
83     }
85     .iram :
86     {
87         _iramstart = .;
88         *(.icode)
89         *(.irodata)
90         *(.idata)
91         . = ALIGN(0x4);
92         _iramend = .;
93     } > IRAM AT> DRAM
94     _iramcopy = LOADADDR(.iram) ;
96     .ibss (NOLOAD) :
97     {
98         _iedata = .;
99         *(.qharray)
100         *(.ibss)
101         . = ALIGN(0x4);
102         _iend = .;
103     } > IRAM
105     .stack (NOLOAD) :
106     {
107        *(.stack)
108        stackbegin = .;
109        _stackbegin = .;
110        . += 0x4000;
111        stackend = .;
112        _stackend = .;
113        _irqstackbegin = .;
114        . += 0x400;
115        _irqstackend = .;
116        _fiqstackbegin = .;
117        . += 0x400;
118        _fiqstackend = .;
119     } > IRAM
121     .bss (NOLOAD) :
122     {
123        _edata = .;
124         *(.bss*)
125         *(COMMON)
126         . = ALIGN(0x4);
127        _end = .;
128     } > DRAM
130     .audiobuf (NOLOAD) :
131     {
132         . = ALIGN(4);
133         _audiobuffer = .;
134         audiobuffer = .;
135     } > DRAM
137     .audiobufend ENDAUDIOADDR (NOLOAD) :
138     {
139         audiobufend = .;
140         _audiobufend = .;
141     } > DRAM
143     .codec CODECORIG (NOLOAD) :
144     {
145         codecbuf = .;
146         _codecbuf = .;
147     } > DRAM
149     .plugin ENDADDR (NOLOAD) :
150     {
151         _pluginbuf = .;
152         pluginbuf = .;
153     }