1 /* Linker script for STM32F3xx */
3 /* Linker script to configure memory regions. */
6 FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 256K
7 CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 8K
8 RAM (rwx) : ORIGIN = 0x20000188, LENGTH = 40k - 0x188
11 /* Linker script to place sections and symbol values. Should be used together
12 * with other linker script that defines memory regions FLASH and RAM.
13 * It references following symbols, which must be defined in code:
14 * Reset_Handler : Entry of reset handler
16 * It defines following symbols, which code can use without definition:
21 * __preinit_array_start
52 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
59 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
70 *(.ARM.extab* .gnu.linkonce.armextab.*)
76 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
92 PROVIDE_HIDDEN (__preinit_array_start = .);
93 KEEP(*(.preinit_array))
94 PROVIDE_HIDDEN (__preinit_array_end = .);
98 PROVIDE_HIDDEN (__init_array_start = .);
99 KEEP(*(SORT(.init_array.*)))
101 PROVIDE_HIDDEN (__init_array_end = .);
106 PROVIDE_HIDDEN (__fini_array_start = .);
107 KEEP(*(SORT(.fini_array.*)))
109 PROVIDE_HIDDEN (__fini_array_end = .);
139 /* .stack_dummy section doesn't contains any symbols. It is only
140 * used for linker to calculate size of stack sections, and assign
141 * values to stack symbols later */
147 /* Set stack top to end of RAM, and stack limit move down by
148 * size of stack_dummy section */
149 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
150 _estack = __StackTop;
151 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
152 PROVIDE(__stack = __StackTop);
154 /* Check if data + heap + stack exceeds RAM limit */
155 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")