mbed SDK library sources
Fork of mbed-src by
Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.
If you are looking for a stable and tested release, please import one of the official mbed library releases:
Import librarymbed
The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
targets/cmsis/TARGET_NXP/TARGET_LPC11XX_11CXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11CXX/LPC11C24.ld@30:91c1d09ada54, 2013-09-25 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Sep 25 10:30:04 2013 +0100
- Revision:
- 30:91c1d09ada54
Synchronized with git revision 8f57c1e84759991fa81ede0da2b4aabe8530fa09
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 30:91c1d09ada54 | 1 | /* Linker script for mbed LPC1114 */ |
mbed_official | 30:91c1d09ada54 | 2 | |
mbed_official | 30:91c1d09ada54 | 3 | /* Linker script to configure memory regions. */ |
mbed_official | 30:91c1d09ada54 | 4 | MEMORY |
mbed_official | 30:91c1d09ada54 | 5 | { |
mbed_official | 30:91c1d09ada54 | 6 | FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 32K |
mbed_official | 30:91c1d09ada54 | 7 | RAM (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40 |
mbed_official | 30:91c1d09ada54 | 8 | } |
mbed_official | 30:91c1d09ada54 | 9 | |
mbed_official | 30:91c1d09ada54 | 10 | /* Linker script to place sections and symbol values. Should be used together |
mbed_official | 30:91c1d09ada54 | 11 | * with other linker script that defines memory regions FLASH and RAM. |
mbed_official | 30:91c1d09ada54 | 12 | * It references following symbols, which must be defined in code: |
mbed_official | 30:91c1d09ada54 | 13 | * Reset_Handler : Entry of reset handler |
mbed_official | 30:91c1d09ada54 | 14 | * |
mbed_official | 30:91c1d09ada54 | 15 | * It defines following symbols, which code can use without definition: |
mbed_official | 30:91c1d09ada54 | 16 | * __exidx_start |
mbed_official | 30:91c1d09ada54 | 17 | * __exidx_end |
mbed_official | 30:91c1d09ada54 | 18 | * __etext |
mbed_official | 30:91c1d09ada54 | 19 | * __data_start__ |
mbed_official | 30:91c1d09ada54 | 20 | * __preinit_array_start |
mbed_official | 30:91c1d09ada54 | 21 | * __preinit_array_end |
mbed_official | 30:91c1d09ada54 | 22 | * __init_array_start |
mbed_official | 30:91c1d09ada54 | 23 | * __init_array_end |
mbed_official | 30:91c1d09ada54 | 24 | * __fini_array_start |
mbed_official | 30:91c1d09ada54 | 25 | * __fini_array_end |
mbed_official | 30:91c1d09ada54 | 26 | * __data_end__ |
mbed_official | 30:91c1d09ada54 | 27 | * __bss_start__ |
mbed_official | 30:91c1d09ada54 | 28 | * __bss_end__ |
mbed_official | 30:91c1d09ada54 | 29 | * __end__ |
mbed_official | 30:91c1d09ada54 | 30 | * end |
mbed_official | 30:91c1d09ada54 | 31 | * __HeapLimit |
mbed_official | 30:91c1d09ada54 | 32 | * __StackLimit |
mbed_official | 30:91c1d09ada54 | 33 | * __StackTop |
mbed_official | 30:91c1d09ada54 | 34 | * __stack |
mbed_official | 30:91c1d09ada54 | 35 | */ |
mbed_official | 30:91c1d09ada54 | 36 | ENTRY(Reset_Handler) |
mbed_official | 30:91c1d09ada54 | 37 | |
mbed_official | 30:91c1d09ada54 | 38 | SECTIONS |
mbed_official | 30:91c1d09ada54 | 39 | { |
mbed_official | 30:91c1d09ada54 | 40 | .text : |
mbed_official | 30:91c1d09ada54 | 41 | { |
mbed_official | 30:91c1d09ada54 | 42 | KEEP(*(.isr_vector)) |
mbed_official | 30:91c1d09ada54 | 43 | *(.text.Reset_Handler) |
mbed_official | 30:91c1d09ada54 | 44 | *(.text.SystemInit) |
mbed_official | 30:91c1d09ada54 | 45 | . = 0x200; |
mbed_official | 30:91c1d09ada54 | 46 | *(.text*) |
mbed_official | 30:91c1d09ada54 | 47 | |
mbed_official | 30:91c1d09ada54 | 48 | KEEP(*(.init)) |
mbed_official | 30:91c1d09ada54 | 49 | KEEP(*(.fini)) |
mbed_official | 30:91c1d09ada54 | 50 | |
mbed_official | 30:91c1d09ada54 | 51 | /* .ctors */ |
mbed_official | 30:91c1d09ada54 | 52 | *crtbegin.o(.ctors) |
mbed_official | 30:91c1d09ada54 | 53 | *crtbegin?.o(.ctors) |
mbed_official | 30:91c1d09ada54 | 54 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) |
mbed_official | 30:91c1d09ada54 | 55 | *(SORT(.ctors.*)) |
mbed_official | 30:91c1d09ada54 | 56 | *(.ctors) |
mbed_official | 30:91c1d09ada54 | 57 | |
mbed_official | 30:91c1d09ada54 | 58 | /* .dtors */ |
mbed_official | 30:91c1d09ada54 | 59 | *crtbegin.o(.dtors) |
mbed_official | 30:91c1d09ada54 | 60 | *crtbegin?.o(.dtors) |
mbed_official | 30:91c1d09ada54 | 61 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) |
mbed_official | 30:91c1d09ada54 | 62 | *(SORT(.dtors.*)) |
mbed_official | 30:91c1d09ada54 | 63 | *(.dtors) |
mbed_official | 30:91c1d09ada54 | 64 | |
mbed_official | 30:91c1d09ada54 | 65 | *(.rodata*) |
mbed_official | 30:91c1d09ada54 | 66 | |
mbed_official | 30:91c1d09ada54 | 67 | KEEP(*(.eh_frame*)) |
mbed_official | 30:91c1d09ada54 | 68 | } > FLASH |
mbed_official | 30:91c1d09ada54 | 69 | |
mbed_official | 30:91c1d09ada54 | 70 | .ARM.extab : |
mbed_official | 30:91c1d09ada54 | 71 | { |
mbed_official | 30:91c1d09ada54 | 72 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
mbed_official | 30:91c1d09ada54 | 73 | } > FLASH |
mbed_official | 30:91c1d09ada54 | 74 | |
mbed_official | 30:91c1d09ada54 | 75 | __exidx_start = .; |
mbed_official | 30:91c1d09ada54 | 76 | .ARM.exidx : |
mbed_official | 30:91c1d09ada54 | 77 | { |
mbed_official | 30:91c1d09ada54 | 78 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
mbed_official | 30:91c1d09ada54 | 79 | } > FLASH |
mbed_official | 30:91c1d09ada54 | 80 | __exidx_end = .; |
mbed_official | 30:91c1d09ada54 | 81 | |
mbed_official | 30:91c1d09ada54 | 82 | __etext = .; |
mbed_official | 30:91c1d09ada54 | 83 | |
mbed_official | 30:91c1d09ada54 | 84 | .data : AT (__etext) |
mbed_official | 30:91c1d09ada54 | 85 | { |
mbed_official | 30:91c1d09ada54 | 86 | __data_start__ = .; |
mbed_official | 30:91c1d09ada54 | 87 | *(vtable) |
mbed_official | 30:91c1d09ada54 | 88 | *(.data*) |
mbed_official | 30:91c1d09ada54 | 89 | |
mbed_official | 30:91c1d09ada54 | 90 | . = ALIGN(4); |
mbed_official | 30:91c1d09ada54 | 91 | /* preinit data */ |
mbed_official | 30:91c1d09ada54 | 92 | PROVIDE (__preinit_array_start = .); |
mbed_official | 30:91c1d09ada54 | 93 | KEEP(*(.preinit_array)) |
mbed_official | 30:91c1d09ada54 | 94 | PROVIDE (__preinit_array_end = .); |
mbed_official | 30:91c1d09ada54 | 95 | |
mbed_official | 30:91c1d09ada54 | 96 | . = ALIGN(4); |
mbed_official | 30:91c1d09ada54 | 97 | /* init data */ |
mbed_official | 30:91c1d09ada54 | 98 | PROVIDE (__init_array_start = .); |
mbed_official | 30:91c1d09ada54 | 99 | KEEP(*(SORT(.init_array.*))) |
mbed_official | 30:91c1d09ada54 | 100 | KEEP(*(.init_array)) |
mbed_official | 30:91c1d09ada54 | 101 | PROVIDE (__init_array_end = .); |
mbed_official | 30:91c1d09ada54 | 102 | |
mbed_official | 30:91c1d09ada54 | 103 | |
mbed_official | 30:91c1d09ada54 | 104 | . = ALIGN(4); |
mbed_official | 30:91c1d09ada54 | 105 | /* finit data */ |
mbed_official | 30:91c1d09ada54 | 106 | PROVIDE (__fini_array_start = .); |
mbed_official | 30:91c1d09ada54 | 107 | KEEP(*(SORT(.fini_array.*))) |
mbed_official | 30:91c1d09ada54 | 108 | KEEP(*(.fini_array)) |
mbed_official | 30:91c1d09ada54 | 109 | PROVIDE (__fini_array_end = .); |
mbed_official | 30:91c1d09ada54 | 110 | |
mbed_official | 30:91c1d09ada54 | 111 | . = ALIGN(4); |
mbed_official | 30:91c1d09ada54 | 112 | /* All data end */ |
mbed_official | 30:91c1d09ada54 | 113 | __data_end__ = .; |
mbed_official | 30:91c1d09ada54 | 114 | |
mbed_official | 30:91c1d09ada54 | 115 | } > RAM |
mbed_official | 30:91c1d09ada54 | 116 | |
mbed_official | 30:91c1d09ada54 | 117 | .bss : |
mbed_official | 30:91c1d09ada54 | 118 | { |
mbed_official | 30:91c1d09ada54 | 119 | __bss_start__ = .; |
mbed_official | 30:91c1d09ada54 | 120 | *(.bss*) |
mbed_official | 30:91c1d09ada54 | 121 | *(COMMON) |
mbed_official | 30:91c1d09ada54 | 122 | __bss_end__ = .; |
mbed_official | 30:91c1d09ada54 | 123 | } > RAM |
mbed_official | 30:91c1d09ada54 | 124 | |
mbed_official | 30:91c1d09ada54 | 125 | .heap : |
mbed_official | 30:91c1d09ada54 | 126 | { |
mbed_official | 30:91c1d09ada54 | 127 | __end__ = .; |
mbed_official | 30:91c1d09ada54 | 128 | end = __end__; |
mbed_official | 30:91c1d09ada54 | 129 | *(.heap*) |
mbed_official | 30:91c1d09ada54 | 130 | __HeapLimit = .; |
mbed_official | 30:91c1d09ada54 | 131 | } > RAM |
mbed_official | 30:91c1d09ada54 | 132 | |
mbed_official | 30:91c1d09ada54 | 133 | /* .stack_dummy section doesn't contains any symbols. It is only |
mbed_official | 30:91c1d09ada54 | 134 | * used for linker to calculate size of stack sections, and assign |
mbed_official | 30:91c1d09ada54 | 135 | * values to stack symbols later */ |
mbed_official | 30:91c1d09ada54 | 136 | .stack_dummy : |
mbed_official | 30:91c1d09ada54 | 137 | { |
mbed_official | 30:91c1d09ada54 | 138 | *(.stack) |
mbed_official | 30:91c1d09ada54 | 139 | } > RAM |
mbed_official | 30:91c1d09ada54 | 140 | |
mbed_official | 30:91c1d09ada54 | 141 | /* Set stack top to end of RAM, and stack limit move down by |
mbed_official | 30:91c1d09ada54 | 142 | * size of stack_dummy section */ |
mbed_official | 30:91c1d09ada54 | 143 | __StackTop = ORIGIN(RAM) + LENGTH(RAM); |
mbed_official | 30:91c1d09ada54 | 144 | __StackLimit = __StackTop - SIZEOF(.stack_dummy); |
mbed_official | 30:91c1d09ada54 | 145 | PROVIDE(__stack = __StackTop); |
mbed_official | 30:91c1d09ada54 | 146 | |
mbed_official | 30:91c1d09ada54 | 147 | /* Check if data + heap + stack exceeds RAM limit */ |
mbed_official | 30:91c1d09ada54 | 148 | ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") |
mbed_official | 30:91c1d09ada54 | 149 | } |