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