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:
mbed_official
Date:
Thu Aug 20 10:45:13 2015 +0100
Revision:
613:bc40b8d2aec4
Parent:
598:2d5fc5624619
Synchronized with git revision 92ca8c7b60a283b6bb60eb65b183dac1599f0ade

Full URL: https://github.com/mbedmicro/mbed/commit/92ca8c7b60a283b6bb60eb65b183dac1599f0ade/

Nordic: update application start address in GCC linker script

Who changed what in which revision?

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