mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

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.

Committer:
bogdanm
Date:
Mon Aug 05 14:12:34 2013 +0300
Revision:
13:0645d8841f51
Update mbed sources to revision 64

Who changed what in which revision?

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