]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_MTS_DRAGONFLY_F411RE/TOOLCHAIN_GCC_ARM/NUCLEO_F411RE.ld
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_STM / TARGET_STM32F4 / TARGET_MTS_DRAGONFLY_F411RE / TOOLCHAIN_GCC_ARM / NUCLEO_F411RE.ld
1 /* Linker script for STM32F411 */
2
3 /* Linker script to configure memory regions. */
4 MEMORY
5 {
6 /* First 64kB of flash reserved for bootloader */
7 /* Other 448kB for application */
8 FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 448K
9 /* CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K */
10 RAM (rwx) : ORIGIN = 0x20000198, LENGTH = 128k - 0x198
11 }
12
13 /* Linker script to place sections and symbol values. Should be used together
14 * with other linker script that defines memory regions FLASH and RAM.
15 * It references following symbols, which must be defined in code:
16 * Reset_Handler : Entry of reset handler
17 *
18 * It defines following symbols, which code can use without definition:
19 * __exidx_start
20 * __exidx_end
21 * __etext
22 * __data_start__
23 * __preinit_array_start
24 * __preinit_array_end
25 * __init_array_start
26 * __init_array_end
27 * __fini_array_start
28 * __fini_array_end
29 * __data_end__
30 * __bss_start__
31 * __bss_end__
32 * __end__
33 * end
34 * __HeapLimit
35 * __StackLimit
36 * __StackTop
37 * __stack
38 */
39 ENTRY(Reset_Handler)
40
41 SECTIONS
42 {
43 .text :
44 {
45 KEEP(*(.isr_vector))
46 *(.text*)
47
48 KEEP(*(.init))
49 KEEP(*(.fini))
50
51 /* .ctors */
52 *crtbegin.o(.ctors)
53 *crtbegin?.o(.ctors)
54 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
55 *(SORT(.ctors.*))
56 *(.ctors)
57
58 /* .dtors */
59 *crtbegin.o(.dtors)
60 *crtbegin?.o(.dtors)
61 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
62 *(SORT(.dtors.*))
63 *(.dtors)
64
65 *(.rodata*)
66
67 KEEP(*(.eh_frame*))
68 } > FLASH
69
70 .ARM.extab :
71 {
72 *(.ARM.extab* .gnu.linkonce.armextab.*)
73 } > FLASH
74
75 __exidx_start = .;
76 .ARM.exidx :
77 {
78 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
79 } > FLASH
80 __exidx_end = .;
81
82 __etext = .;
83
84 .data : AT (__etext)
85 {
86 __data_start__ = .;
87 *(vtable)
88 *(.data*)
89
90 . = ALIGN(4);
91 /* preinit data */
92 PROVIDE_HIDDEN (__preinit_array_start = .);
93 KEEP(*(.preinit_array))
94 PROVIDE_HIDDEN (__preinit_array_end = .);
95
96 . = ALIGN(4);
97 /* init data */
98 PROVIDE_HIDDEN (__init_array_start = .);
99 KEEP(*(SORT(.init_array.*)))
100 KEEP(*(.init_array))
101 PROVIDE_HIDDEN (__init_array_end = .);
102
103
104 . = ALIGN(4);
105 /* finit data */
106 PROVIDE_HIDDEN (__fini_array_start = .);
107 KEEP(*(SORT(.fini_array.*)))
108 KEEP(*(.fini_array))
109 PROVIDE_HIDDEN (__fini_array_end = .);
110
111 KEEP(*(.jcr*))
112 . = ALIGN(4);
113 /* All data end */
114 __data_end__ = .;
115
116 } > RAM
117
118 .bss :
119 {
120 . = ALIGN(4);
121 __bss_start__ = .;
122 *(.bss*)
123 *(COMMON)
124 . = ALIGN(4);
125 __bss_end__ = .;
126 } > RAM
127
128 .heap (COPY):
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 (COPY):
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 }
153
Imprint / Impressum