]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC176X/TOOLCHAIN_GCC_CR/LPC1768.ld
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_NXP / TARGET_LPC176X / TOOLCHAIN_GCC_CR / LPC1768.ld
1 /* mbed - LPC1768 linker script
2 * Based linker script generated by Code Red Technologies Red Suite 4.1
3 */
4 GROUP(libgcc.a libc.a libstdc++.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o)
5
6 MEMORY
7 {
8 /* Define each memory region */
9 MFlash512 (rx) : ORIGIN = 0x0, LENGTH = 0x80000 /* 512k */
10 RamLoc32 (rwx) : ORIGIN = 0x100000C8, LENGTH = 0x7F38 /* 32k */
11 RamAHB32 (rwx) : ORIGIN = 0x2007c000, LENGTH = 0x8000 /* 32k */
12
13 }
14 /* Define a symbol for the top of each memory region */
15 __top_MFlash512 = 0x0 + 0x80000;
16 __top_RamLoc32 = 0x10000000 + 0x8000;
17 __top_RamAHB32 = 0x2007c000 + 0x8000;
18
19 ENTRY(ResetISR)
20
21 SECTIONS
22 {
23
24 /* MAIN TEXT SECTION */
25 .text : ALIGN(4)
26 {
27 FILL(0xff)
28 KEEP(*(.isr_vector))
29
30 /* Global Section Table */
31 . = ALIGN(4) ;
32 __section_table_start = .;
33 __data_section_table = .;
34 LONG(LOADADDR(.data));
35 LONG( ADDR(.data)) ;
36 LONG( SIZEOF(.data));
37 LONG(LOADADDR(.data_RAM2));
38 LONG( ADDR(.data_RAM2)) ;
39 LONG( SIZEOF(.data_RAM2));
40 __data_section_table_end = .;
41 __bss_section_table = .;
42 LONG( ADDR(.bss));
43 LONG( SIZEOF(.bss));
44 LONG( ADDR(.bss_RAM2));
45 LONG( SIZEOF(.bss_RAM2));
46 __bss_section_table_end = .;
47 __section_table_end = . ;
48 /* End of Global Section Table */
49
50
51 *(.after_vectors*)
52
53 *(.text*)
54 *(.rodata .rodata.*)
55 . = ALIGN(4);
56
57 /* C++ constructors etc */
58 . = ALIGN(4);
59 KEEP(*(.init))
60
61 . = ALIGN(4);
62 __preinit_array_start = .;
63 KEEP (*(.preinit_array))
64 __preinit_array_end = .;
65
66 . = ALIGN(4);
67 __init_array_start = .;
68 KEEP (*(SORT(.init_array.*)))
69 KEEP (*(.init_array))
70 __init_array_end = .;
71
72 KEEP(*(.fini));
73
74 . = ALIGN(0x4);
75 KEEP (*crtbegin.o(.ctors))
76 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
77 KEEP (*(SORT(.ctors.*)))
78 KEEP (*crtend.o(.ctors))
79
80 . = ALIGN(0x4);
81 KEEP (*crtbegin.o(.dtors))
82 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
83 KEEP (*(SORT(.dtors.*)))
84 KEEP (*crtend.o(.dtors))
85 /* End C++ */
86 } > MFlash512
87
88 /*
89 * for exception handling/unwind - some Newlib functions (in common
90 * with C++ and STDC++) use this.
91 */
92 .ARM.extab : ALIGN(4)
93 {
94 *(.ARM.extab* .gnu.linkonce.armextab.*)
95 } > MFlash512
96 __exidx_start = .;
97
98 .ARM.exidx : ALIGN(4)
99 {
100 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
101 } > MFlash512
102 __exidx_end = .;
103
104 _etext = .;
105
106
107 .data_RAM2 : ALIGN(4)
108 {
109 FILL(0xff)
110 *(.data.$RAM2*)
111 *(.data.$RamAHB32*)
112 . = ALIGN(4) ;
113 } > RamAHB32 AT>MFlash512
114
115 /* MAIN DATA SECTION */
116
117 .uninit_RESERVED : ALIGN(4)
118 {
119 KEEP(*(.bss.$RESERVED*))
120 } > RamLoc32
121
122 .data : ALIGN(4)
123 {
124 FILL(0xff)
125 _data = .;
126 *(vtable)
127 *(.data*)
128 . = ALIGN(4) ;
129 _edata = .;
130 } > RamLoc32 AT>MFlash512
131
132
133 .bss_RAM2 : ALIGN(4)
134 {
135 *(.bss.$RAM2*)
136 *(.bss.$RamAHB32*)
137 . = ALIGN(4) ;
138 } > RamAHB32
139
140 /* MAIN BSS SECTION */
141 .bss : ALIGN(4)
142 {
143 _bss = .;
144 *(.bss*)
145 *(COMMON)
146 . = ALIGN(4) ;
147 _ebss = .;
148 PROVIDE(end = .);
149 __end__ = .;
150 } > RamLoc32
151
152 PROVIDE(_pvHeapStart = .);
153 PROVIDE(_vStackTop = __top_RamLoc32 - 0);
154 }
Imprint / Impressum