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:
Fri Sep 30 16:49:46 2016 +0100
Revision:
127:25aea2a3f4e3
Parent:
126:abea610beb85
Child:
128:9bcdf88f62b0
Release 127 of the mbed library

Ports for Upcoming Targets

2669: Added u-blox C029 target https://github.com/ARMmbed/mbed-os/pull/2669
2707: [EFM32] Add IAR support for remaining Silicon Labs targets https://github.com/ARMmbed/mbed-os/pull/2707
2819: MultiTech xDot platform support - 09.26.2016 https://github.com/ARMmbed/mbed-os/pull/2819
2827: include MultiTech xDot in mbed 5 releases https://github.com/ARMmbed/mbed-os/pull/2827

Fixes and Changes

2522: Add CThunk for CM7 https://github.com/ARMmbed/mbed-os/pull/2522
2518: Enable uvisor on Beetle https://github.com/ARMmbed/mbed-os/pull/2518
2571: STM32F7 - Add asynchronous serial https://github.com/ARMmbed/mbed-os/pull/2571
2616: STM32F3xx - Add Serial Flow Control pins + enable it https://github.com/ARMmbed/mbed-os/pull/2616
2619: NUCLEO_L152RE - Add Serial Flow Control https://github.com/ARMmbed/mbed-os/pull/2619
2620: NUCLEO_F429ZI - Add SERIAL_FC macro https://github.com/ARMmbed/mbed-os/pull/2620
2666: [EFM32] Microsecond ticker optimization https://github.com/ARMmbed/mbed-os/pull/2666
2681: STM32F0xx - Add support of ADC internal channels https://github.com/ARMmbed/mbed-os/pull/2681
2687: [NRF5] Add fs_data symbol in data secton for gcc https://github.com/ARMmbed/mbed-os/pull/2687
2696: Add device_has to all nrf51 devices https://github.com/ARMmbed/mbed-os/pull/2696
2703: TARGET_NRF5: Changed 'serial_baud' implementation to support special baud rates. https://github.com/ARMmbed/mbed-os/pull/2703
2704: DISCO_L476VG: add SPI nicknames https://github.com/ARMmbed/mbed-os/pull/2704
2723: KSDK serial_api.c: Fix assertion error for ParityEven https://github.com/ARMmbed/mbed-os/pull/2723
2463: [STM32L0] Add asynchronous serial https://github.com/ARMmbed/mbed-os/pull/2463
2572: Fix STM32F407VG target name and LPC11U6X linker errors https://github.com/ARMmbed/mbed-os/pull/2572
2698: DELTA_DFBM_NQ620 target https://github.com/ARMmbed/mbed-os/pull/2698
2542: Dev spi asynch stm32f4 https://github.com/ARMmbed/mbed-os/pull/2542
2650: STM32F3 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2650
2415: [STM32F0] Add asynchronous serial https://github.com/ARMmbed/mbed-os/pull/2415
2585: Added support for ADC only pins in LPC43xx https://github.com/ARMmbed/mbed-os/pull/2585
2622: [STM32F4] Add asynchronous I2C https://github.com/ARMmbed/mbed-os/pull/2622
2719: Updated ARM linker scripts for Kinetis platforms that use SDK 2.0 https://github.com/ARMmbed/mbed-os/pull/2719
2728: Added ethernet and enabled IPV4 feature for the EVK-ODIN-W2/C029 target https://github.com/ARMmbed/mbed-os/pull/2728
2747: [LPC11U68] Fix pin interrupt select offset https://github.com/ARMmbed/mbed-os/pull/2747
2751: STM32L0xx - Add Serial Flow Control https://github.com/ARMmbed/mbed-os/pull/2751
2753: [NUCLEO_F767ZI] Add CAN capability https://github.com/ARMmbed/mbed-os/pull/2753
2759: STM32F0 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2759
2763: STM32L1 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2763
2764: STM32L4 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2764
2771: STM32L4 - Update deepsleep implementation https://github.com/ARMmbed/mbed-os/pull/2771
2775: Update KSDK SDHC driver for K64F & K66F https://github.com/ARMmbed/mbed-os/pull/2775
2792: [NUCLEO_F303ZE] MBED-OS5 capability https://github.com/ARMmbed/mbed-os/pull/2792
2762: STM32L0 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2762
2761: STM32F7 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2761

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 126:abea610beb85 1 /*
AnnaBridge 126:abea610beb85 2 * Copyright (c) 2015 ARM Limited
AnnaBridge 126:abea610beb85 3 *
AnnaBridge 126:abea610beb85 4 * Licensed under the Apache License, Version 2.0 (the "License");
AnnaBridge 126:abea610beb85 5 * you may not use this file except in compliance with the License.
AnnaBridge 126:abea610beb85 6 * You may obtain a copy of the License at
AnnaBridge 126:abea610beb85 7 *
AnnaBridge 126:abea610beb85 8 * http://www.apache.org/licenses/LICENSE-2.0
AnnaBridge 126:abea610beb85 9 *
AnnaBridge 126:abea610beb85 10 * Unless required by applicable law or agreed to in writing, software
AnnaBridge 126:abea610beb85 11 * distributed under the License is distributed on an "AS IS" BASIS,
AnnaBridge 126:abea610beb85 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
AnnaBridge 126:abea610beb85 13 * See the License for the specific language governing permissions and
AnnaBridge 126:abea610beb85 14 * limitations under the License.
AnnaBridge 126:abea610beb85 15 */
AnnaBridge 126:abea610beb85 16
AnnaBridge 126:abea610beb85 17 /* Linker script to configure memory regions. */
AnnaBridge 126:abea610beb85 18
AnnaBridge 126:abea610beb85 19 MEMORY
AnnaBridge 126:abea610beb85 20 {
AnnaBridge 126:abea610beb85 21 FLASH (rx) : ORIGIN = 0x1C000, LENGTH = 0x64000
AnnaBridge 126:abea610beb85 22 RAM (rwx) : ORIGIN = 0x20002ef8, LENGTH = 0xd108
AnnaBridge 126:abea610beb85 23 }
AnnaBridge 126:abea610beb85 24
AnnaBridge 126:abea610beb85 25
AnnaBridge 126:abea610beb85 26 OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
AnnaBridge 126:abea610beb85 27
AnnaBridge 126:abea610beb85 28 /* Linker script to place sections and symbol values. Should be used together
AnnaBridge 126:abea610beb85 29 * with the other linker script that defines memory regions FLASH and RAM.
AnnaBridge 126:abea610beb85 30 * It references the following symbols that must be defined in code:
AnnaBridge 126:abea610beb85 31 * Reset_Handler : Entry of reset handler
AnnaBridge 126:abea610beb85 32 *
AnnaBridge 126:abea610beb85 33 * It defines the following symbols that the code can use without definition:
AnnaBridge 126:abea610beb85 34 * __exidx_start
AnnaBridge 126:abea610beb85 35 * __exidx_end
AnnaBridge 126:abea610beb85 36 * __etext
AnnaBridge 126:abea610beb85 37 * __data_start__
AnnaBridge 126:abea610beb85 38 * __preinit_array_start
AnnaBridge 126:abea610beb85 39 * __preinit_array_end
AnnaBridge 126:abea610beb85 40 * __init_array_start
AnnaBridge 126:abea610beb85 41 * __init_array_end
AnnaBridge 126:abea610beb85 42 * __fini_array_start
AnnaBridge 126:abea610beb85 43 * __fini_array_end
AnnaBridge 126:abea610beb85 44 * __data_end__
AnnaBridge 126:abea610beb85 45 * __bss_start__
AnnaBridge 126:abea610beb85 46 * __bss_end__
AnnaBridge 126:abea610beb85 47 * __end__
AnnaBridge 126:abea610beb85 48 * end
AnnaBridge 126:abea610beb85 49 * __HeapLimit
AnnaBridge 126:abea610beb85 50 * __StackLimit
AnnaBridge 126:abea610beb85 51 * __StackTop
AnnaBridge 126:abea610beb85 52 * __stack
AnnaBridge 126:abea610beb85 53 */
AnnaBridge 126:abea610beb85 54 ENTRY(Reset_Handler)
AnnaBridge 126:abea610beb85 55
AnnaBridge 126:abea610beb85 56
AnnaBridge 126:abea610beb85 57 SECTIONS
AnnaBridge 126:abea610beb85 58 {
AnnaBridge 126:abea610beb85 59 .text :
AnnaBridge 126:abea610beb85 60 {
AnnaBridge 126:abea610beb85 61 KEEP(*(.Vectors))
AnnaBridge 126:abea610beb85 62 *(.text*)
AnnaBridge 126:abea610beb85 63
AnnaBridge 126:abea610beb85 64 KEEP(*(.init))
AnnaBridge 126:abea610beb85 65 KEEP(*(.fini))
AnnaBridge 126:abea610beb85 66
AnnaBridge 126:abea610beb85 67 /* .ctors */
AnnaBridge 126:abea610beb85 68 *crtbegin.o(.ctors)
AnnaBridge 126:abea610beb85 69 *crtbegin?.o(.ctors)
AnnaBridge 126:abea610beb85 70 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
AnnaBridge 126:abea610beb85 71 *(SORT(.ctors.*))
AnnaBridge 126:abea610beb85 72 *(.ctors)
AnnaBridge 126:abea610beb85 73
AnnaBridge 126:abea610beb85 74 /* .dtors */
AnnaBridge 126:abea610beb85 75 *crtbegin.o(.dtors)
AnnaBridge 126:abea610beb85 76 *crtbegin?.o(.dtors)
AnnaBridge 126:abea610beb85 77 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
AnnaBridge 126:abea610beb85 78 *(SORT(.dtors.*))
AnnaBridge 126:abea610beb85 79 *(.dtors)
AnnaBridge 126:abea610beb85 80
AnnaBridge 126:abea610beb85 81 *(.rodata*)
AnnaBridge 126:abea610beb85 82
AnnaBridge 126:abea610beb85 83 KEEP(*(.eh_frame*))
AnnaBridge 126:abea610beb85 84 } > FLASH
AnnaBridge 126:abea610beb85 85
AnnaBridge 126:abea610beb85 86 .ARM.extab :
AnnaBridge 126:abea610beb85 87 {
AnnaBridge 126:abea610beb85 88 *(.ARM.extab* .gnu.linkonce.armextab.*)
AnnaBridge 126:abea610beb85 89 . = ALIGN(4);
AnnaBridge 126:abea610beb85 90 } > FLASH
AnnaBridge 126:abea610beb85 91
AnnaBridge 126:abea610beb85 92 __exidx_start = .;
AnnaBridge 126:abea610beb85 93 .ARM.exidx :
AnnaBridge 126:abea610beb85 94 {
AnnaBridge 126:abea610beb85 95 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
AnnaBridge 126:abea610beb85 96 . = ALIGN(4);
AnnaBridge 126:abea610beb85 97 } > FLASH
AnnaBridge 126:abea610beb85 98 __exidx_end = .;
AnnaBridge 126:abea610beb85 99
AnnaBridge 126:abea610beb85 100 __etext = .;
AnnaBridge 126:abea610beb85 101
AnnaBridge 126:abea610beb85 102 .data : AT (__etext)
AnnaBridge 126:abea610beb85 103 {
AnnaBridge 126:abea610beb85 104 __data_start__ = .;
AnnaBridge 126:abea610beb85 105 *(vtable)
AnnaBridge 126:abea610beb85 106 *(.data*)
AnnaBridge 126:abea610beb85 107
AnnaBridge 126:abea610beb85 108 . = ALIGN(4);
AnnaBridge 126:abea610beb85 109 /* preinit data */
AnnaBridge 126:abea610beb85 110 PROVIDE_HIDDEN (__preinit_array_start = .);
AnnaBridge 126:abea610beb85 111 KEEP(*(.preinit_array))
AnnaBridge 126:abea610beb85 112 PROVIDE_HIDDEN (__preinit_array_end = .);
AnnaBridge 126:abea610beb85 113
AnnaBridge 126:abea610beb85 114 . = ALIGN(4);
AnnaBridge 126:abea610beb85 115 /* init data */
AnnaBridge 126:abea610beb85 116 PROVIDE_HIDDEN (__init_array_start = .);
AnnaBridge 126:abea610beb85 117 KEEP(*(SORT(.init_array.*)))
AnnaBridge 126:abea610beb85 118 KEEP(*(.init_array))
AnnaBridge 126:abea610beb85 119 PROVIDE_HIDDEN (__init_array_end = .);
AnnaBridge 126:abea610beb85 120
AnnaBridge 126:abea610beb85 121
AnnaBridge 126:abea610beb85 122 . = ALIGN(4);
AnnaBridge 126:abea610beb85 123 /* finit data */
AnnaBridge 126:abea610beb85 124 PROVIDE_HIDDEN (__fini_array_start = .);
AnnaBridge 126:abea610beb85 125 KEEP(*(SORT(.fini_array.*)))
AnnaBridge 126:abea610beb85 126 KEEP(*(.fini_array))
AnnaBridge 126:abea610beb85 127 PROVIDE_HIDDEN (__fini_array_end = .);
AnnaBridge 126:abea610beb85 128
<> 127:25aea2a3f4e3 129 . = ALIGN(4);
<> 127:25aea2a3f4e3 130 PROVIDE(__start_fs_data = .);
<> 127:25aea2a3f4e3 131 KEEP(*(.fs_data))
<> 127:25aea2a3f4e3 132 PROVIDE(__stop_fs_data = .);
<> 127:25aea2a3f4e3 133
AnnaBridge 126:abea610beb85 134 *(.jcr)
AnnaBridge 126:abea610beb85 135 . = ALIGN(4);
AnnaBridge 126:abea610beb85 136 /* All data end */
AnnaBridge 126:abea610beb85 137 __data_end__ = .;
AnnaBridge 126:abea610beb85 138
AnnaBridge 126:abea610beb85 139 } > RAM
AnnaBridge 126:abea610beb85 140
AnnaBridge 126:abea610beb85 141 __edata = .;
AnnaBridge 126:abea610beb85 142
AnnaBridge 126:abea610beb85 143 .bss :
AnnaBridge 126:abea610beb85 144 {
AnnaBridge 126:abea610beb85 145 . = ALIGN(4);
AnnaBridge 126:abea610beb85 146 __bss_start__ = .;
AnnaBridge 126:abea610beb85 147 *(.bss*)
AnnaBridge 126:abea610beb85 148 *(COMMON)
AnnaBridge 126:abea610beb85 149 . = ALIGN(4);
AnnaBridge 126:abea610beb85 150 __bss_end__ = .;
AnnaBridge 126:abea610beb85 151 } > RAM
AnnaBridge 126:abea610beb85 152
AnnaBridge 126:abea610beb85 153 .heap (NOLOAD):
AnnaBridge 126:abea610beb85 154 {
AnnaBridge 126:abea610beb85 155 __end__ = .;
AnnaBridge 126:abea610beb85 156 end = __end__;
AnnaBridge 126:abea610beb85 157 *(.heap*);
AnnaBridge 126:abea610beb85 158
AnnaBridge 126:abea610beb85 159 /* Expand the heap to reach the stack boundary. */
AnnaBridge 126:abea610beb85 160 ASSERT(. <= (ORIGIN(RAM) + LENGTH(RAM) - 0x800), "heap region overflowed into stack");
AnnaBridge 126:abea610beb85 161 . += (ORIGIN(RAM) + LENGTH(RAM) - 0x800) - .;
AnnaBridge 126:abea610beb85 162 } > RAM
AnnaBridge 126:abea610beb85 163 PROVIDE(__heap_start = ADDR(.heap));
AnnaBridge 126:abea610beb85 164 PROVIDE(__heap_size = SIZEOF(.heap));
AnnaBridge 126:abea610beb85 165 PROVIDE(__mbed_sbrk_start = ADDR(.heap));
AnnaBridge 126:abea610beb85 166 PROVIDE(__mbed_krbs_start = ADDR(.heap) + SIZEOF(.heap));
AnnaBridge 126:abea610beb85 167
AnnaBridge 126:abea610beb85 168 /* .stack_dummy section does not contain any symbols. It is only
AnnaBridge 126:abea610beb85 169 * used for the linker script to calculate the size of stack sections
AnnaBridge 126:abea610beb85 170 * and assign values to stack symbols later. */
AnnaBridge 126:abea610beb85 171 .stack (NOLOAD):
AnnaBridge 126:abea610beb85 172 {
AnnaBridge 126:abea610beb85 173 __StackLimit = .;
AnnaBridge 126:abea610beb85 174 *(.stack*)
AnnaBridge 126:abea610beb85 175 . += (ORIGIN(RAM) + LENGTH(RAM) - .);
AnnaBridge 126:abea610beb85 176 } > RAM
AnnaBridge 126:abea610beb85 177
AnnaBridge 126:abea610beb85 178 /* Set the stack top to the end of RAM and move down the stack limit by
AnnaBridge 126:abea610beb85 179 * the size of the stack_dummy section. */
AnnaBridge 126:abea610beb85 180 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
AnnaBridge 126:abea610beb85 181 __StackLimit = __StackTop - SIZEOF(.stack);
AnnaBridge 126:abea610beb85 182 PROVIDE(__stack = __StackTop);
AnnaBridge 126:abea610beb85 183 }