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