1 /* Linker script for mbed LPC1549 */
3 /* Linker script to configure memory regions. */
6 /* Define each memory region */
7 FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K
8 Ram0_16 (rwx) : ORIGIN = 0x2000000 + 0x100, LENGTH = (16K - 0x100)
9 Ram1_16 (rwx) : ORIGIN = 0x2004000, LENGTH = 16K
10 Ram2_4 (rwx) : ORIGIN = 0x2008000, LENGTH = 4K
14 /* Linker script to place sections and symbol values. Should be used together
15 * with other linker script that defines memory regions FLASH and RAM.
16 * It references following symbols, which must be defined in code:
17 * Reset_Handler : Entry of reset handler
19 * It defines following symbols, which code can use without definition:
24 * __preinit_array_start
55 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
62 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
73 *(.ARM.extab* .gnu.linkonce.armextab.*)
79 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
88 Image$$RW_IRAM1$$Base = .;
94 PROVIDE (__preinit_array_start = .);
95 KEEP(*(.preinit_array))
96 PROVIDE (__preinit_array_end = .);
100 PROVIDE (__init_array_start = .);
101 KEEP(*(SORT(.init_array.*)))
103 PROVIDE (__init_array_end = .);
108 PROVIDE (__fini_array_start = .);
109 KEEP(*(SORT(.fini_array.*)))
111 PROVIDE (__fini_array_end = .);
126 Image$$RW_IRAM1$$ZI$$Limit = . ;
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(Ram0_16) + LENGTH(Ram0_16);
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")