mbed library sources modified for open wear

Dependents:   openwear-lifelogger-example

Fork of mbed-src by mbed official

Committer:
bogdanm
Date:
Mon Aug 12 13:49:01 2013 +0300
Revision:
18:692be3d4e4cc
Parent:
targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/LPC11U24.ld@13:0645d8841f51
Sync with official mbed library release 65

Who changed what in which revision?

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