1 /*Copyright (C) 2011 by Sagar G V, Thejasvi M V
3 Permission is hereby granted, free of charge, to any person obtaining a copy
4 of this software and associated documentation files (the "Software"), to deal
5 in the Software without restriction, including without limitation the rights
6 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 copies of the Software, and to permit persons to whom the Software is
8 furnished to do so, subject to the following conditions:
10 The above copyright notice and this permission notice shall be included in
11 all copies or substantial portions of the Software.
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 Arthur Wolf & Adam Green in 2011 - Updated to work with mbed.
25 OUTPUT_FORMAT ("elf32-littlearm")
31 /* LPC1768 : 512k ROM + 64k SRAM */
32 /*------------------------------ */
34 /* On-chip ROM is a readable (r), executable region (x) */
35 /* On-chip SRAM is a readable (r), writable (w) and */
36 /* executable region (x) */
38 /* Main ROM region - 512k for LPC1768 */
39 /* IROM (rx) : ORIGIN = 0x00000000, LENGTH = 512k */
40 IROM (rx) : ORIGIN = 16K, LENGTH = (512k - 16K)
42 /* local static RAM - 32k for LPC1768 */
43 IRAM0 (rwx) : ORIGIN = 0x10000000, LENGTH = 32k
45 /* AHB SRAM - 16k + 16k for LPC1768 */
46 IRAM1 (rwx) : ORIGIN = 0x2007C000, LENGTH = 16k
47 IRAM2 (rwx) : ORIGIN = 0x20080000, LENGTH = 16k
50 /* SECTION command : Define mapping of input sections */
51 /* into output sections. */
55 /******************************************/
79 __preinit_array_start = .;
80 KEEP (*(.preinit_array))
81 __preinit_array_end = .;
84 __init_array_start = .;
85 KEEP (*(SORT(.init_array.*)))
90 KEEP (*crtbegin.o(.ctors))
91 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
92 KEEP (*(SORT(.ctors.*)))
93 KEEP (*crtend.o(.ctors))
99 __fini_array_start = .;
100 KEEP (*(.fini_array))
101 KEEP (*(SORT(.fini_array.*)))
102 __fini_array_end = .;
106 KEEP (*crtbegin.o(.dtors))
107 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
108 KEEP (*(SORT(.dtors.*)))
109 KEEP (*crtend.o(.dtors))
111 /* End Of .text section */
120 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
124 /******************************************/
128 _sidata = LOADADDR (.data);
131 Image$$RW_IRAM1$$Base = .;
133 *(.ARM.__AT_0x10000000)
142 /******************************************/
143 /* For no-init variables section */
155 Image$$RW_IRAM1$$ZI$$Limit = . ;
158 /**************************************************/
159 /* fastcode - copied at startup & executed in RAM */
163 _sifastcode = LOADADDR (.fastcode);
167 *(.glue_7t) *(.glue_7)
170 /* add other modules here ... */
176 /******************************************/
177 /* For stack section */
178 .stackarea (NOLOAD) :
183 *(.stackarea .stackarea.*)
192 _stack = ORIGIN(IRAM0) + LENGTH(IRAM0);
194 /******************************************/
195 /* Code can explicitly ask for data to be
196 placed in these higher RAM banks where
197 they will be left uninitialized. */
200 Image$$RW_IRAM2$$Base = . ;
202 Image$$RW_IRAM2$$ZI$$Limit = .;
207 Image$$RW_IRAM3$$Base = . ;
209 Image$$RW_IRAM3$$ZI$$Limit = .;
213 /******************************************/
214 /* Stabs debugging sections. */
215 .stab 0 : { *(.stab) }
216 .stabstr 0 : { *(.stabstr) }
217 .stab.excl 0 : { *(.stab.excl) }
218 .stab.exclstr 0 : { *(.stab.exclstr) }
219 .stab.index 0 : { *(.stab.index) }
220 .stab.indexstr 0 : { *(.stab.indexstr) }
221 /* .comment 0 : { *(.comment) } */
222 /* DWARF debug sections.
223 Symbols in the DWARF debugging sections are relative to the beginning
224 of the section so we begin them at 0. */
226 .debug 0 : { *(.debug) }
227 .line 0 : { *(.line) }
228 /* GNU DWARF 1 extensions */
229 .debug_srcinfo 0 : { *(.debug_srcinfo) }
230 .debug_sfnames 0 : { *(.debug_sfnames) }
231 /* DWARF 1.1 and DWARF 2 */
232 .debug_aranges 0 : { *(.debug_aranges) }
233 .debug_pubnames 0 : { *(.debug_pubnames) }
235 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
236 .debug_abbrev 0 : { *(.debug_abbrev) }
237 .debug_line 0 : { *(.debug_line) }
238 .debug_frame 0 : { *(.debug_frame) }
239 .debug_str 0 : { *(.debug_str) }
240 .debug_loc 0 : { *(.debug_loc) }
241 .debug_macinfo 0 : { *(.debug_macinfo) }
242 /* SGI/MIPS DWARF 2 extensions */
243 .debug_weaknames 0 : { *(.debug_weaknames) }
244 .debug_funcnames 0 : { *(.debug_funcnames) }
245 .debug_typenames 0 : { *(.debug_typenames) }
246 .debug_varnames 0 : { *(.debug_varnames) }