2 * KL05Z ARM GCC linker script file, Martin Kojtal (0xc0170)
7 VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000410
8 FLASH (rx) : ORIGIN = 0x00000410, LENGTH = 32K - 0x00000410
9 RAM (rwx) : ORIGIN = 0x1FFFFCC0, LENGTH = 4K - 0xC0
12 /* Linker script to place sections and symbol values. Should be used together
13 * with other linker script that defines memory regions FLASH and RAM.
14 * It references following symbols, which must be defined in code:
15 * _reset_init : Entry of reset handler
17 * It defines following symbols, which code can use without definition:
22 * __preinit_array_start
45 KEEP(*(.vector_table))
59 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
66 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
77 *(.ARM.extab* .gnu.linkonce.armextab.*)
83 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
97 PROVIDE_HIDDEN (__preinit_array_start = .);
98 KEEP(*(.preinit_array))
99 PROVIDE_HIDDEN (__preinit_array_end = .);
103 PROVIDE_HIDDEN (__init_array_start = .);
104 KEEP(*(SORT(.init_array.*)))
106 PROVIDE_HIDDEN (__init_array_end = .);
111 PROVIDE_HIDDEN (__fini_array_start = .);
112 KEEP(*(SORT(.fini_array.*)))
114 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 __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")