2 * CMSIS/Device/ARM/ARMCM0plus/Source/GCC/gcc_arm.ld
4 * git://github.com/ARM-software/CMSIS
7 /* Linker script to configure memory regions. */
11 : ORIGIN = 0x00000000, LENGTH = 0x08000
14 : ORIGIN = 0x1fffe000, LENGTH = 0x08000
17 /* Linker script to place sections and symbol values. Should be used together
18 * with other linker script that defines memory regions FLASH and RAM.
19 * It references following symbols, which must be defined in code:
20 * Reset_Handler : Entry of reset handler
22 * It defines following symbols, which code can use without definition:
27 * __preinit_array_start
52 /* The flash configuration field: */
59 /* Don't put any other code in there so we may avoid
60 * erasing and re-programming it.
72 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
79 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
90 *(.ARM.extab* .gnu.linkonce.armextab.*)
96 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
110 PROVIDE_HIDDEN (__preinit_array_start = .);
111 KEEP(*(.preinit_array))
112 PROVIDE_HIDDEN (__preinit_array_end = .);
116 PROVIDE_HIDDEN (__init_array_start = .);
117 KEEP(*(SORT(.init_array.*)))
119 PROVIDE_HIDDEN (__init_array_end = .);
124 PROVIDE_HIDDEN (__fini_array_start = .);
125 KEEP(*(SORT(.fini_array.*)))
127 PROVIDE_HIDDEN (__fini_array_end = .);
155 /* .stack_dummy section doesn't contains any symbols. It is only
156 * used for linker to calculate size of stack sections, and assign
157 * values to stack symbols later */
163 /* Set stack top to end of RAM, and stack limit move down by
164 * size of stack_dummy section */
165 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
166 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
167 PROVIDE(__stack = __StackTop);
169 /* Check if data + heap + stack exceeds RAM limit */
170 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")