]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC23XX/TOOLCHAIN_GCC_CR/LPC2368.ld
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_NXP / TARGET_LPC23XX / TOOLCHAIN_GCC_CR / LPC2368.ld
1 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
2 OUTPUT_ARCH(arm)
3 ENTRY(vectors)
4
5 GROUP( libgcc.a libc.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o )
6
7 /* Memory Definitions: */
8 MEMORY
9 {
10 Flash (rx) : ORIGIN = 0x00000000, LENGTH = 512k
11 Ram (rwx) : ORIGIN = 0x40000000, LENGTH = 32k
12 UsbRam (rw) : ORIGIN = 0x7FD00000, LENGTH = 8k
13 EthRam (rw) : ORIGIN = 0x7FE00000, LENGTH = 16k
14 CanRam (rw) : ORIGIN = 0xE0038000, LENGTH = 2k
15 BatRam (rw) : ORIGIN = 0xE0084000, LENGTH = 2k
16 }
17
18 /* Stack sizes: */
19 UND_Stack_Size = 16;
20 SVC_Stack_Size = 512;
21 ABT_Stack_Size = 16;
22 FIQ_Stack_Size = 16;
23 IRQ_Stack_Size = 256;
24 Stack_Size_Total = UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + FIQ_Stack_Size + IRQ_Stack_Size;
25
26 /* Stack tops for each mode: */
27 __und_stack_top__ = __stacks_top__;
28 __abt_stack_top__ = __und_stack_top__ - UND_Stack_Size ;
29 __fiq_stack_top__ = __abt_stack_top__ - ABT_Stack_Size ;
30 __irq_stack_top__ = __fiq_stack_top__ - FIQ_Stack_Size ;
31 __svc_stack_top__ = __irq_stack_top__ - IRQ_Stack_Size ;
32
33 /* C-accessible symbols for memory address ranges: */
34 __FLASH_segment_start__ = ORIGIN( Flash );
35 __FLASH_segment_end__ = ORIGIN( Flash ) + LENGTH( Flash );
36 __SRAM_segment_start__ = ORIGIN( Ram );
37 __SRAM_segment_end__ = ORIGIN( Ram ) + LENGTH( Ram );
38
39 /* Stacks (full descending) at top of RAM, grows downward:
40 *
41 * __stack_min__ is used by the malloc implementation to ensure heap never collides
42 * with stack (assuming stack never grows beyond Stack_Size_Total in length) */
43 __stacks_top__ = __SRAM_segment_end__;
44 __stacks_min__ = __SRAM_segment_end__ - Stack_Size_Total;
45
46 SECTIONS
47 {
48 /* first section is .text which is used for code */
49 __text_start__ = . ;
50 .text : {
51 __privileged_code_start__ = . ;
52 KEEP( *( .vectors ) )
53 *( .privileged_code )
54
55 __privileged_code_end__ = .;
56
57 *( .text .text.* .gnu.linkonce.t.* )
58 *( .plt )
59 *( .gnu.warning )
60 *( .glue_7t ) *( .glue_7 ) *( .vfp11_veneer )
61
62 *( .rodata .rodata.* .gnu.linkonce.r.* )
63
64 *(.ARM.extab* .gnu.linkonce.armextab.*)
65 *(.gcc_except_table)
66 *(.eh_frame_hdr)
67 *(.eh_frame)
68
69 . = ALIGN( 4 ) ;
70 KEEP( *( .init ) )
71 . = ALIGN( 4 ) ;
72 __preinit_array_start = . ;
73 KEEP( *( .preinit_array ) )
74 __preinit_array_end = . ;
75 . = ALIGN( 4 ) ;
76 __init_array_start = . ;
77 KEEP( *( SORT( .init_array.* ) ) )
78 KEEP( *( .init_array ) )
79 __init_array_end = . ;
80
81 . = ALIGN( 4 ) ;
82 KEEP( *crtbegin.o( .ctors ) )
83 KEEP( *( EXCLUDE_FILE( *crtend.o ) .ctors ) )
84 KEEP( *( SORT( .ctors.* ) ) )
85 KEEP( *crtend.o( .ctors ) )
86
87 . = ALIGN( 4 ) ;
88 KEEP( *( .fini ) )
89 . = ALIGN( 4 ) ;
90 __fini_array_start = . ;
91 KEEP( *( .fini_array ) )
92 KEEP( *( SORT( .fini_array.* ) ) )
93 __fini_array_end = . ;
94
95 KEEP( *crtbegin.o( .dtors ) )
96 KEEP( *( EXCLUDE_FILE( *crtend.o ) .dtors ) )
97 KEEP( *( SORT( .dtors.* ) ) )
98 KEEP( *crtend.o( .dtors ) )
99
100 } >Flash
101
102 __exidx_start = . ;
103 .ARM.exidx : {
104 *( .ARM.exidx* .gnu.linkonce.armexidx.* )
105 } >Flash
106 __exidx_end = . ;
107
108 .text.align : { . = ALIGN( 8 ) ; } >Flash /* Alignment schenanigans */
109 __text_end__ = . ;
110
111 /* .bss section -- used for uninitialized data */
112 /* Located at the start of RAM */
113 .bss (NOLOAD) : {
114 __bss_start__ = . ;
115 *crt0.o( .ram_vectors )
116
117 __user_bss_start__ = . ;
118 *( .user_bss )
119 __user_bss_end__ = . ;
120
121 *( .shbss )
122 *( .bss .bss.* .gnu.linkonce.b.* )
123 *( COMMON )
124 *( .ram.b )
125 . = ALIGN( 8 ) ;
126
127 __bss_end__ = . ;
128 } >Ram AT>Flash
129
130 /* .data section -- used for initialized data */
131 .data : {
132 __data_start__ = . ;
133 KEEP( *( .jcr ) )
134 *( .got.plt ) *( .got )
135 *( .shdata )
136 *( .data .data.* .gnu.linkonce.d.* )
137 *( .ram )
138 . = ALIGN( 8 ) ;
139 __data_end__ = . ;
140 } >Ram AT>Flash
141
142 __data_init_start__ = LOADADDR( .data ) ;
143
144 /* Heap starts here and grows up in memory */
145 . = ALIGN( 8 ) ;
146 __heap_start__ = . ;
147 _pvHeapStart = . ;
148 end = . ;
149
150 .stab 0 (NOLOAD) : { *(.stab) }
151 .stabstr 0 (NOLOAD) : { *(.stabstr) }
152 /* DWARF debug sections. */
153 /* Symbols in the DWARF debugging sections are relative to the */
154 /* beginning of the section so we begin them at 0. */
155 /* DWARF 1 */
156 .debug 0 : { *(.debug) }
157 .line 0 : { *(.line) }
158 /* GNU DWARF 1 extensions */
159 .debug_srcinfo 0 : { *(.debug_srcinfo) }
160 .debug_sfnames 0 : { *(.debug_sfnames) }
161 /* DWARF 1.1 and DWARF 2 */
162 .debug_aranges 0 : { *(.debug_aranges) }
163 .debug_pubnames 0 : { *(.debug_pubnames) }
164 /* DWARF 2 */
165 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
166 .debug_abbrev 0 : { *(.debug_abbrev) }
167 .debug_line 0 : { *(.debug_line) }
168 .debug_frame 0 : { *(.debug_frame) }
169 .debug_str 0 : { *(.debug_str) }
170 .debug_loc 0 : { *(.debug_loc) }
171 .debug_macinfo 0 : { *(.debug_macinfo) }
172 /* SGI/MIPS DWARF 2 extensions */
173 .debug_weaknames 0 : { *(.debug_weaknames) }
174 .debug_funcnames 0 : { *(.debug_funcnames) }
175 .debug_typenames 0 : { *(.debug_typenames) }
176 .debug_varnames 0 : { *(.debug_varnames) }
177 /* DWARF 3 */
178 .debug_pubtypes 0 : { *(.debug_pubtypes) }
179 .debug_ranges 0 : { *(.debug_ranges) }
180
181 .note.gnu.arm.ident 0 : { KEEP( *( .note.gnu.arm.ident ) ) }
182 .ARM.attributes 0 : {
183 KEEP( *( .ARM.attributes ) )
184 KEEP( *( .gnu.attributes ) )
185 }
186 /DISCARD/ : { *( .note.GNU-stack ) }
187
188 /* C data can be defined as being in special purpose RAMs using
189 * __attribute__ ((section ("ethram"))) for example. */
190 .usbram (NOLOAD):
191 {
192 *( .usbram )
193 *( .usbram.* )
194 } > UsbRam
195 .ethram (NOLOAD):
196 {
197 *( .ethram )
198 *( .ethram.* )
199 } > EthRam
200 .canram (NOLOAD):
201 {
202 *( .canram )
203 *( .canram.* )
204 } > CanRam
205 .batram (NOLOAD):
206 {
207 *( .batram )
208 *( .batram.* )
209 } > BatRam
210 }
Imprint / Impressum