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:
Kojto
Date:
Tue Feb 14 11:24:20 2017 +0000
Revision:
136:ef9c61f8c49f
Parent:
128:9bcdf88f62b0
Release 136 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723

Who changed what in which revision?

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