]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U37H_401/LPC11U37.ld
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_NXP / TARGET_LPC11UXX / TOOLCHAIN_GCC_ARM / TARGET_LPC11U37H_401 / LPC11U37.ld
1 /* Linker script to configure memory regions. */
2 MEMORY
3 {
4 FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 128K
5 RAM (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40
6 RAMIO (rwx) : ORIGIN = 0x20000000, LENGTH = 0x800
7 USB_RAM (rwx): ORIGIN = 0x20004000, LENGTH = 0x800
8 }
9
10 /* Linker script to place sections and symbol values. Should be used together
11 * with other linker script that defines memory regions FLASH and RAM.
12 * It references following symbols, which must be defined in code:
13 * Reset_Handler : Entry of reset handler
14 *
15 * It defines following symbols, which code can use without definition:
16 * __exidx_start
17 * __exidx_end
18 * __etext
19 * __data_start__
20 * __preinit_array_start
21 * __preinit_array_end
22 * __init_array_start
23 * __init_array_end
24 * __fini_array_start
25 * __fini_array_end
26 * __data_end__
27 * __bss_start__
28 * __bss_end__
29 * __end__
30 * end
31 * __HeapLimit
32 * __StackLimit
33 * __StackTop
34 * __stack
35 */
36 ENTRY(Reset_Handler)
37
38 SECTIONS
39 {
40 .text :
41 {
42 KEEP(*(.isr_vector))
43 *(.text.Reset_Handler)
44
45 /* Only vectors and code running at reset are safe to be in first 512
46 bytes since RAM can be mapped into this area for RAM based interrupt
47 vectors. */
48 . = 0x00000200;
49 *(.text*)
50
51 KEEP(*(.init))
52 KEEP(*(.fini))
53
54 /* .ctors */
55 *crtbegin.o(.ctors)
56 *crtbegin?.o(.ctors)
57 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
58 *(SORT(.ctors.*))
59 *(.ctors)
60
61 /* .dtors */
62 *crtbegin.o(.dtors)
63 *crtbegin?.o(.dtors)
64 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
65 *(SORT(.dtors.*))
66 *(.dtors)
67
68 *(.rodata*)
69
70 KEEP(*(.eh_frame*))
71 } > FLASH
72
73 .ARM.extab :
74 {
75 *(.ARM.extab* .gnu.linkonce.armextab.*)
76 } > FLASH
77
78 __exidx_start = .;
79 .ARM.exidx :
80 {
81 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
82 } > FLASH
83 __exidx_end = .;
84
85 __etext = .;
86
87 .data : AT (__etext)
88 {
89 __data_start__ = .;
90 *(vtable)
91 *(.data*)
92
93 . = ALIGN(4);
94 /* preinit data */
95 PROVIDE (__preinit_array_start = .);
96 KEEP(*(.preinit_array))
97 PROVIDE (__preinit_array_end = .);
98
99 . = ALIGN(4);
100 /* init data */
101 PROVIDE (__init_array_start = .);
102 KEEP(*(SORT(.init_array.*)))
103 KEEP(*(.init_array))
104 PROVIDE (__init_array_end = .);
105
106
107 . = ALIGN(4);
108 /* finit data */
109 PROVIDE (__fini_array_start = .);
110 KEEP(*(SORT(.fini_array.*)))
111 KEEP(*(.fini_array))
112 PROVIDE (__fini_array_end = .);
113
114 . = ALIGN(4);
115 /* All data end */
116 __data_end__ = .;
117
118 } > RAM
119
120 .bss :
121 {
122 __bss_start__ = .;
123 *(.bss*)
124 *(COMMON)
125 __bss_end__ = .;
126 } > RAM
127
128 .heap :
129 {
130 __end__ = .;
131 end = __end__;
132 *(.heap*)
133 __HeapLimit = .;
134 } > RAM
135
136 /* .stack_dummy section doesn't contains any symbols. It is only
137 * used for linker to calculate size of stack sections, and assign
138 * values to stack symbols later */
139 .stack_dummy :
140 {
141 *(.stack)
142 } > RAM
143
144 /* Set stack top to end of RAM, and stack limit move down by
145 * size of stack_dummy section */
146 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
147 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
148 PROVIDE(__stack = __StackTop);
149
150 /* Check if data + heap + stack exceeds RAM limit */
151 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
152 }
Imprint / Impressum