The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
<>
Date:
Wed Apr 12 16:07:08 2017 +0100
Revision:
140:97feb9bacc10
Parent:
136:ef9c61f8c49f
Child:
145:64910690c574
Release 140 of the mbed library

Ports for Upcoming Targets

3841: Add nRf52840 target https://github.com/ARMmbed/mbed-os/pull/3841
3992: Introducing UBLOX_C030 platform. https://github.com/ARMmbed/mbed-os/pull/3992

Fixes and Changes

3951: [NUCLEO_F303ZE] Correct ARDUINO pin https://github.com/ARMmbed/mbed-os/pull/3951
4021: Fixing a macro to detect when RTOS was in use for the NRF52840_DK https://github.com/ARMmbed/mbed-os/pull/4021
3979: KW24D: Add missing SPI defines and Arduino connector definitions https://github.com/ARMmbed/mbed-os/pull/3979
3990: UBLOX_C027: construct a ticker-based wait, rather than calling wait_ms(), in the https://github.com/ARMmbed/mbed-os/pull/3990
4003: Fixed OBOE in async serial tx for NRF52 target, fixes #4002 https://github.com/ARMmbed/mbed-os/pull/4003
4012: STM32: Correct I2C master error handling https://github.com/ARMmbed/mbed-os/pull/4012
4020: NUCLEO_L011K4 remove unsupported tool chain files https://github.com/ARMmbed/mbed-os/pull/4020
4065: K66F: Move bss section to m_data_2 Section https://github.com/ARMmbed/mbed-os/pull/4065
4014: Issue 3763: Reduce heap allocation in the GCC linker file https://github.com/ARMmbed/mbed-os/pull/4014
4030: [STM32L0] reduce IAR heap and stack size for small targets https://github.com/ARMmbed/mbed-os/pull/4030
4109: NUCLEO_L476RG : minor serial pin update https://github.com/ARMmbed/mbed-os/pull/4109
3982: Ticker - kl25z bugfix for handling events in the past https://github.com/ARMmbed/mbed-os/pull/3982

Who changed what in which revision?

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