1 /* Linker script to configure memory regions. */
4 /* First 64kB of flash reserved for bootloader */
5 /* Other 448kB for application */
6 FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 448K
7 RAM (rwx) : ORIGIN = 0x20000198, LENGTH = 128k - 0x198
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
15 * It defines following symbols, which code can use without definition:
20 * __preinit_array_start
51 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
58 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
69 *(.ARM.extab* .gnu.linkonce.armextab.*)
75 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
91 PROVIDE_HIDDEN (__preinit_array_start = .);
92 KEEP(*(.preinit_array))
93 PROVIDE_HIDDEN (__preinit_array_end = .);
97 PROVIDE_HIDDEN (__init_array_start = .);
98 KEEP(*(SORT(.init_array.*)))
100 PROVIDE_HIDDEN (__init_array_end = .);
105 PROVIDE_HIDDEN (__fini_array_start = .);
106 KEEP(*(SORT(.fini_array.*)))
108 PROVIDE_HIDDEN (__fini_array_end = .);
138 /* .stack_dummy section doesn't contains any symbols. It is only
139 * used for linker to calculate size of stack sections, and assign
140 * values to stack symbols later */
146 /* Set stack top to end of RAM, and stack limit move down by
147 * size of stack_dummy section */
148 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
149 _estack = __StackTop;
150 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
151 PROVIDE(__stack = __StackTop);
153 /* Check if data + heap + stack exceeds RAM limit */
154 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")