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