mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPCCAPPUCCINO/LPC11U37.ld@243:1b2bee05fe98, 2014-06-27 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Jun 27 16:30:08 2014 +0100
- Revision:
- 243:1b2bee05fe98
Synchronized with git revision f74be83b0461a86c139b029e42d632c278656b83
Full URL: https://github.com/mbedmicro/mbed/commit/f74be83b0461a86c139b029e42d632c278656b83/
LPCCAPPUCCINO] initial port
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 243:1b2bee05fe98 | 1 | /* Linker script to configure memory regions. */ |
mbed_official | 243:1b2bee05fe98 | 2 | MEMORY |
mbed_official | 243:1b2bee05fe98 | 3 | { |
mbed_official | 243:1b2bee05fe98 | 4 | FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 128K |
mbed_official | 243:1b2bee05fe98 | 5 | RAM (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40 |
mbed_official | 243:1b2bee05fe98 | 6 | USB_RAM (rwx): ORIGIN = 0x20004000, LENGTH = 0x800 |
mbed_official | 243:1b2bee05fe98 | 7 | } |
mbed_official | 243:1b2bee05fe98 | 8 | |
mbed_official | 243:1b2bee05fe98 | 9 | /* Linker script to place sections and symbol values. Should be used together |
mbed_official | 243:1b2bee05fe98 | 10 | * with other linker script that defines memory regions FLASH and RAM. |
mbed_official | 243:1b2bee05fe98 | 11 | * It references following symbols, which must be defined in code: |
mbed_official | 243:1b2bee05fe98 | 12 | * Reset_Handler : Entry of reset handler |
mbed_official | 243:1b2bee05fe98 | 13 | * |
mbed_official | 243:1b2bee05fe98 | 14 | * It defines following symbols, which code can use without definition: |
mbed_official | 243:1b2bee05fe98 | 15 | * __exidx_start |
mbed_official | 243:1b2bee05fe98 | 16 | * __exidx_end |
mbed_official | 243:1b2bee05fe98 | 17 | * __etext |
mbed_official | 243:1b2bee05fe98 | 18 | * __data_start__ |
mbed_official | 243:1b2bee05fe98 | 19 | * __preinit_array_start |
mbed_official | 243:1b2bee05fe98 | 20 | * __preinit_array_end |
mbed_official | 243:1b2bee05fe98 | 21 | * __init_array_start |
mbed_official | 243:1b2bee05fe98 | 22 | * __init_array_end |
mbed_official | 243:1b2bee05fe98 | 23 | * __fini_array_start |
mbed_official | 243:1b2bee05fe98 | 24 | * __fini_array_end |
mbed_official | 243:1b2bee05fe98 | 25 | * __data_end__ |
mbed_official | 243:1b2bee05fe98 | 26 | * __bss_start__ |
mbed_official | 243:1b2bee05fe98 | 27 | * __bss_end__ |
mbed_official | 243:1b2bee05fe98 | 28 | * __end__ |
mbed_official | 243:1b2bee05fe98 | 29 | * end |
mbed_official | 243:1b2bee05fe98 | 30 | * __HeapLimit |
mbed_official | 243:1b2bee05fe98 | 31 | * __StackLimit |
mbed_official | 243:1b2bee05fe98 | 32 | * __StackTop |
mbed_official | 243:1b2bee05fe98 | 33 | * __stack |
mbed_official | 243:1b2bee05fe98 | 34 | */ |
mbed_official | 243:1b2bee05fe98 | 35 | ENTRY(Reset_Handler) |
mbed_official | 243:1b2bee05fe98 | 36 | |
mbed_official | 243:1b2bee05fe98 | 37 | SECTIONS |
mbed_official | 243:1b2bee05fe98 | 38 | { |
mbed_official | 243:1b2bee05fe98 | 39 | .text : |
mbed_official | 243:1b2bee05fe98 | 40 | { |
mbed_official | 243:1b2bee05fe98 | 41 | KEEP(*(.isr_vector)) |
mbed_official | 243:1b2bee05fe98 | 42 | *(.text.Reset_Handler) |
mbed_official | 243:1b2bee05fe98 | 43 | |
mbed_official | 243:1b2bee05fe98 | 44 | /* Only vectors and code running at reset are safe to be in first 512 |
mbed_official | 243:1b2bee05fe98 | 45 | bytes since RAM can be mapped into this area for RAM based interrupt |
mbed_official | 243:1b2bee05fe98 | 46 | vectors. */ |
mbed_official | 243:1b2bee05fe98 | 47 | . = 0x00000200; |
mbed_official | 243:1b2bee05fe98 | 48 | *(.text*) |
mbed_official | 243:1b2bee05fe98 | 49 | |
mbed_official | 243:1b2bee05fe98 | 50 | KEEP(*(.init)) |
mbed_official | 243:1b2bee05fe98 | 51 | KEEP(*(.fini)) |
mbed_official | 243:1b2bee05fe98 | 52 | |
mbed_official | 243:1b2bee05fe98 | 53 | /* .ctors */ |
mbed_official | 243:1b2bee05fe98 | 54 | *crtbegin.o(.ctors) |
mbed_official | 243:1b2bee05fe98 | 55 | *crtbegin?.o(.ctors) |
mbed_official | 243:1b2bee05fe98 | 56 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) |
mbed_official | 243:1b2bee05fe98 | 57 | *(SORT(.ctors.*)) |
mbed_official | 243:1b2bee05fe98 | 58 | *(.ctors) |
mbed_official | 243:1b2bee05fe98 | 59 | |
mbed_official | 243:1b2bee05fe98 | 60 | /* .dtors */ |
mbed_official | 243:1b2bee05fe98 | 61 | *crtbegin.o(.dtors) |
mbed_official | 243:1b2bee05fe98 | 62 | *crtbegin?.o(.dtors) |
mbed_official | 243:1b2bee05fe98 | 63 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) |
mbed_official | 243:1b2bee05fe98 | 64 | *(SORT(.dtors.*)) |
mbed_official | 243:1b2bee05fe98 | 65 | *(.dtors) |
mbed_official | 243:1b2bee05fe98 | 66 | |
mbed_official | 243:1b2bee05fe98 | 67 | *(.rodata*) |
mbed_official | 243:1b2bee05fe98 | 68 | |
mbed_official | 243:1b2bee05fe98 | 69 | KEEP(*(.eh_frame*)) |
mbed_official | 243:1b2bee05fe98 | 70 | } > FLASH |
mbed_official | 243:1b2bee05fe98 | 71 | |
mbed_official | 243:1b2bee05fe98 | 72 | .ARM.extab : |
mbed_official | 243:1b2bee05fe98 | 73 | { |
mbed_official | 243:1b2bee05fe98 | 74 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
mbed_official | 243:1b2bee05fe98 | 75 | } > FLASH |
mbed_official | 243:1b2bee05fe98 | 76 | |
mbed_official | 243:1b2bee05fe98 | 77 | __exidx_start = .; |
mbed_official | 243:1b2bee05fe98 | 78 | .ARM.exidx : |
mbed_official | 243:1b2bee05fe98 | 79 | { |
mbed_official | 243:1b2bee05fe98 | 80 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
mbed_official | 243:1b2bee05fe98 | 81 | } > FLASH |
mbed_official | 243:1b2bee05fe98 | 82 | __exidx_end = .; |
mbed_official | 243:1b2bee05fe98 | 83 | |
mbed_official | 243:1b2bee05fe98 | 84 | __etext = .; |
mbed_official | 243:1b2bee05fe98 | 85 | |
mbed_official | 243:1b2bee05fe98 | 86 | .data : AT (__etext) |
mbed_official | 243:1b2bee05fe98 | 87 | { |
mbed_official | 243:1b2bee05fe98 | 88 | __data_start__ = .; |
mbed_official | 243:1b2bee05fe98 | 89 | *(vtable) |
mbed_official | 243:1b2bee05fe98 | 90 | *(.data*) |
mbed_official | 243:1b2bee05fe98 | 91 | |
mbed_official | 243:1b2bee05fe98 | 92 | . = ALIGN(4); |
mbed_official | 243:1b2bee05fe98 | 93 | /* preinit data */ |
mbed_official | 243:1b2bee05fe98 | 94 | PROVIDE (__preinit_array_start = .); |
mbed_official | 243:1b2bee05fe98 | 95 | KEEP(*(.preinit_array)) |
mbed_official | 243:1b2bee05fe98 | 96 | PROVIDE (__preinit_array_end = .); |
mbed_official | 243:1b2bee05fe98 | 97 | |
mbed_official | 243:1b2bee05fe98 | 98 | . = ALIGN(4); |
mbed_official | 243:1b2bee05fe98 | 99 | /* init data */ |
mbed_official | 243:1b2bee05fe98 | 100 | PROVIDE (__init_array_start = .); |
mbed_official | 243:1b2bee05fe98 | 101 | KEEP(*(SORT(.init_array.*))) |
mbed_official | 243:1b2bee05fe98 | 102 | KEEP(*(.init_array)) |
mbed_official | 243:1b2bee05fe98 | 103 | PROVIDE (__init_array_end = .); |
mbed_official | 243:1b2bee05fe98 | 104 | |
mbed_official | 243:1b2bee05fe98 | 105 | |
mbed_official | 243:1b2bee05fe98 | 106 | . = ALIGN(4); |
mbed_official | 243:1b2bee05fe98 | 107 | /* finit data */ |
mbed_official | 243:1b2bee05fe98 | 108 | PROVIDE (__fini_array_start = .); |
mbed_official | 243:1b2bee05fe98 | 109 | KEEP(*(SORT(.fini_array.*))) |
mbed_official | 243:1b2bee05fe98 | 110 | KEEP(*(.fini_array)) |
mbed_official | 243:1b2bee05fe98 | 111 | PROVIDE (__fini_array_end = .); |
mbed_official | 243:1b2bee05fe98 | 112 | |
mbed_official | 243:1b2bee05fe98 | 113 | . = ALIGN(4); |
mbed_official | 243:1b2bee05fe98 | 114 | /* All data end */ |
mbed_official | 243:1b2bee05fe98 | 115 | __data_end__ = .; |
mbed_official | 243:1b2bee05fe98 | 116 | |
mbed_official | 243:1b2bee05fe98 | 117 | } > RAM |
mbed_official | 243:1b2bee05fe98 | 118 | |
mbed_official | 243:1b2bee05fe98 | 119 | .bss : |
mbed_official | 243:1b2bee05fe98 | 120 | { |
mbed_official | 243:1b2bee05fe98 | 121 | __bss_start__ = .; |
mbed_official | 243:1b2bee05fe98 | 122 | *(.bss*) |
mbed_official | 243:1b2bee05fe98 | 123 | *(COMMON) |
mbed_official | 243:1b2bee05fe98 | 124 | __bss_end__ = .; |
mbed_official | 243:1b2bee05fe98 | 125 | } > RAM |
mbed_official | 243:1b2bee05fe98 | 126 | |
mbed_official | 243:1b2bee05fe98 | 127 | .heap : |
mbed_official | 243:1b2bee05fe98 | 128 | { |
mbed_official | 243:1b2bee05fe98 | 129 | __end__ = .; |
mbed_official | 243:1b2bee05fe98 | 130 | end = __end__; |
mbed_official | 243:1b2bee05fe98 | 131 | *(.heap*) |
mbed_official | 243:1b2bee05fe98 | 132 | __HeapLimit = .; |
mbed_official | 243:1b2bee05fe98 | 133 | } > RAM |
mbed_official | 243:1b2bee05fe98 | 134 | |
mbed_official | 243:1b2bee05fe98 | 135 | /* .stack_dummy section doesn't contains any symbols. It is only |
mbed_official | 243:1b2bee05fe98 | 136 | * used for linker to calculate size of stack sections, and assign |
mbed_official | 243:1b2bee05fe98 | 137 | * values to stack symbols later */ |
mbed_official | 243:1b2bee05fe98 | 138 | .stack_dummy : |
mbed_official | 243:1b2bee05fe98 | 139 | { |
mbed_official | 243:1b2bee05fe98 | 140 | *(.stack) |
mbed_official | 243:1b2bee05fe98 | 141 | } > RAM |
mbed_official | 243:1b2bee05fe98 | 142 | |
mbed_official | 243:1b2bee05fe98 | 143 | /* Set stack top to end of RAM, and stack limit move down by |
mbed_official | 243:1b2bee05fe98 | 144 | * size of stack_dummy section */ |
mbed_official | 243:1b2bee05fe98 | 145 | __StackTop = ORIGIN(RAM) + LENGTH(RAM); |
mbed_official | 243:1b2bee05fe98 | 146 | __StackLimit = __StackTop - SIZEOF(.stack_dummy); |
mbed_official | 243:1b2bee05fe98 | 147 | PROVIDE(__stack = __StackTop); |
mbed_official | 243:1b2bee05fe98 | 148 | |
mbed_official | 243:1b2bee05fe98 | 149 | /* Check if data + heap + stack exceeds RAM limit */ |
mbed_official | 243:1b2bee05fe98 | 150 | ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") |
mbed_official | 243:1b2bee05fe98 | 151 | } |