1 /* Linker script for mbed LPC824-GCC-ARM based on LPC1114-GCC-ARM-LPC1114.ld */
3 /* Linker script to configure memory regions. */
6 /* Define each memory region */
7 FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x8000 /* 32K bytes */
8 RAM (rwx) : ORIGIN = 0x10000000+0xC0, LENGTH = 0x2000-0xC0 /* 8K bytes */
13 /* Linker script to place sections and symbol values. Should be used together
14 * with other linker script that defines memory regions FLASH and RAM.
15 * It references following symbols, which must be defined in code:
16 * Reset_Handler : Entry of reset handler
18 * It defines following symbols, which code can use without definition:
23 * __preinit_array_start
46 *(.text.Reset_Handler)
57 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
64 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
75 *(.ARM.extab* .gnu.linkonce.armextab.*)
81 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
95 PROVIDE (__preinit_array_start = .);
96 KEEP(*(.preinit_array))
97 PROVIDE (__preinit_array_end = .);
101 PROVIDE (__init_array_start = .);
102 KEEP(*(SORT(.init_array.*)))
104 PROVIDE (__init_array_end = .);
109 PROVIDE (__fini_array_start = .);
110 KEEP(*(SORT(.fini_array.*)))
112 PROVIDE (__fini_array_end = .);
136 /* .stack_dummy section doesn't contains any symbols. It is only
137 * used for linker to calculate size of stack sections, and assign
138 * values to stack symbols later */
144 /* Set stack top to end of RAM, and stack limit move down by
145 * size of stack_dummy section */
146 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
147 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
148 PROVIDE(__stack = __StackTop);
150 /* Check if data + heap + stack exceeds RAM limit */
151 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")