1 /*Based on following file
2 * (c) Code Red Technologies Ltd, 2008-13
3 * (c) NXP Semiconductors 2013-2015
4 * Generated linker script file for LPC824
5 * Created from generic_c.ld (LPCXpresso v7.4 (0 [Build 229] [2014-09-16] ))
6 * By LPCXpresso v7.4.0 [Build 229] [2014-09-16] on Fri Jan 02 03:36:48 JST 2015
9 /* Linker script to configure memory regions. */
12 /* Define each memory region */
13 MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 /* 32K bytes */
14 RamLoc8 (rwx) : ORIGIN = 0x10000000+0xC0, LENGTH = 0x2000-0xC0 /* 8K bytes */
19 /* Define a symbol for the top of each memory region */
20 __top_MFlash32 = 0x0 + 0x8000;
21 __top_RamLoc8 = 0x10000000 + 0x2000;
23 GROUP(libgcc.a libc.a libstdc++.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o)
24 /*GROUP(libcr_nohost.a libcr_c.a libcr_eabihelpers.a libm.a)*/
25 /* Linker script to place sections and symbol values. Should be used together
26 * with other linker script that defines memory regions FLASH and RAM.
27 * It references following symbols, which must be defined in code:
28 * Reset_Handler : Entry of reset handler
30 * It defines following symbols, which code can use without definition:
35 * __preinit_array_start
56 /* MAIN TEXT SECTION */
60 __vectors_start__ = ABSOLUTE(.) ;
63 /* Global Section Table */
65 __section_table_start = .;
66 __data_section_table = .;
67 LONG(LOADADDR(.data));
70 __data_section_table_end = .;
71 __bss_section_table = .;
74 __bss_section_table_end = .;
75 __section_table_end = . ;
76 /* End of Global Section Table */
85 *(.rodata .rodata.* .constdata .constdata.*)
89 /* C++ constructors etc */
94 __preinit_array_start = .;
95 KEEP (*(.preinit_array))
96 __preinit_array_end = .;
99 __init_array_start = .;
100 KEEP (*(SORT(.init_array.*)))
101 KEEP (*(.init_array))
102 __init_array_end = .;
109 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
116 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
129 * for exception handling/unwind - some Newlib functions (in common
130 * with C++ and STDC++) use this.
132 .ARM.extab : ALIGN(4)
134 *(.ARM.extab* .gnu.linkonce.armextab.*)
138 .ARM.exidx : ALIGN(4)
140 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
147 /* MAIN DATA SECTION */
149 /* Default MTB section */
150 .mtb_buffer_default (NOLOAD) :
155 .uninit_RESERVED : ALIGN(4)
157 KEEP(*(.bss.$RESERVED*))
159 _end_uninit_RESERVED = .;
163 /* Main DATA section (RamLoc8) */
173 } > RamLoc8 AT>MFlash32
176 /* MAIN BSS SECTION */
188 /* DEFAULT NOINIT SECTION */
189 .noinit (NOLOAD): ALIGN(4)
197 PROVIDE(_pvHeapStart = DEFINED(__user_heap_base) ? __user_heap_base : .);
198 PROVIDE(_vStackTop = DEFINED(__user_stack_top) ? __user_stack_top : __top_RamLoc8 - 0);