1 /* Linker script to configure memory regions. */
4 FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
5 CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 16K
6 RAM (rwx) : ORIGIN = 0x20000194, LENGTH = 64K - 0x194
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
14 * It defines following symbols, which code can use without definition:
19 * __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")