1 /* Linker script to configure memory regions. */
4 FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64k
5 RAM (xrw) : ORIGIN = 0x200000C0, LENGTH = 8k - 0x0C0
8 /* Linker script to place sections and symbol values. Should be used together
9 * with other linker script that defines memory regions FLASH and RAM.
10 * It references following symbols, which must be defined in code:
11 * Reset_Handler : Entry of reset handler
13 * It defines following symbols, which code can use without definition:
18 * __preinit_array_start
50 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
57 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
68 *(.ARM.extab* .gnu.linkonce.armextab.*)
74 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
90 PROVIDE_HIDDEN (__preinit_array_start = .);
91 KEEP(*(.preinit_array))
92 PROVIDE_HIDDEN (__preinit_array_end = .);
96 PROVIDE_HIDDEN (__init_array_start = .);
97 KEEP(*(SORT(.init_array.*)))
99 PROVIDE_HIDDEN (__init_array_end = .);
104 PROVIDE_HIDDEN (__fini_array_start = .);
105 KEEP(*(SORT(.fini_array.*)))
107 PROVIDE_HIDDEN (__fini_array_end = .);
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 */
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);
152 /* Check if data + heap + stack exceeds RAM limit */
153 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")