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