1 /* Linker script for mbed LPC1768 */
4 /* FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K */
5 FLASH (rx) : ORIGIN = 16K, LENGTH = (512K - 16K)
6 RAM (rwx) : ORIGIN = 0x100000C8, LENGTH = (32K - 0xC8)
8 USB_RAM(rwx) : ORIGIN = 0x2007C000, LENGTH = 16K
9 ETH_RAM(rwx) : ORIGIN = 0x20080000, LENGTH = 16K
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_Handler : Entry of reset handler
17 * It defines following symbols, which code can use without definition:
22 * __preinit_array_start
44 __cs3_region_start_rom = .;
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.*)
86 __cs3_region_start_ram = .;
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 = .);
125 Image$$RW_IRAM1$$ZI$$Limit = . ;
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")
154 /* Code can explicitly ask for data to be
155 placed in these higher RAM banks where
156 they will be left uninitialized.
160 Image$$RW_IRAM2$$Base = . ;
162 Image$$RW_IRAM2$$ZI$$Limit = .;
167 Image$$RW_IRAM3$$Base = . ;
169 Image$$RW_IRAM3$$ZI$$Limit = .;