1 /* Linker script for mbed LPC1768 */
3 /* Linker script to configure memory regions. */
6 FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K
7 RAM (rwx) : ORIGIN = 0x100000C8, LENGTH = (32K - 0xC8)
9 USB_RAM(rwx) : ORIGIN = 0x2007C000, LENGTH = 16K
10 ETH_RAM(rwx) : ORIGIN = 0x20080000, LENGTH = 16K
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
54 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
61 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
72 *(.ARM.extab* .gnu.linkonce.armextab.*)
78 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
87 Image$$RW_IRAM1$$Base = .;
93 PROVIDE (__preinit_array_start = .);
94 KEEP(*(.preinit_array))
95 PROVIDE (__preinit_array_end = .);
99 PROVIDE (__init_array_start = .);
100 KEEP(*(SORT(.init_array.*)))
102 PROVIDE (__init_array_end = .);
107 PROVIDE (__fini_array_start = .);
108 KEEP(*(SORT(.fini_array.*)))
110 PROVIDE (__fini_array_end = .);
125 Image$$RW_IRAM1$$ZI$$Limit = . ;
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 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
149 PROVIDE(__stack = __StackTop);
151 /* Check if data + heap + stack exceeds RAM limit */
152 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
155 /* Code can explicitly ask for data to be
156 placed in these higher RAM banks where
157 they will be left uninitialized.
161 Image$$RW_IRAM2$$Base = . ;
163 Image$$RW_IRAM2$$ZI$$Limit = .;
168 Image$$RW_IRAM3$$Base = . ;
170 Image$$RW_IRAM3$$ZI$$Limit = .;