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
53 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
60 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
71 *(.ARM.extab* .gnu.linkonce.armextab.*)
77 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
86 Image$$RW_IRAM1$$Base = .;
92 PROVIDE (__preinit_array_start = .);
93 KEEP(*(.preinit_array))
94 PROVIDE (__preinit_array_end = .);
98 PROVIDE (__init_array_start = .);
99 KEEP(*(SORT(.init_array.*)))
101 PROVIDE (__init_array_end = .);
106 PROVIDE (__fini_array_start = .);
107 KEEP(*(SORT(.fini_array.*)))
109 PROVIDE (__fini_array_end = .);
123 Image$$RW_IRAM1$$ZI$$Limit = . ;
134 /* .stack_dummy section doesn't contains any symbols. It is only
135 * used for linker to calculate size of stack sections, and assign
136 * values to stack symbols later */
142 /* Set stack top to end of RAM, and stack limit move down by
143 * size of stack_dummy section */
144 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
145 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
146 PROVIDE(__stack = __StackTop);
148 /* Check if data + heap + stack exceeds RAM limit */
149 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
152 /* Code can explicitly ask for data to be
153 placed in these higher RAM banks where
154 they will be left uninitialized.
158 Image$$RW_IRAM2$$Base = . ;
160 Image$$RW_IRAM2$$ZI$$Limit = .;
165 Image$$RW_IRAM3$$Base = . ;
167 Image$$RW_IRAM3$$ZI$$Limit = .;