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:
Thu Oct 27 16:45:56 2016 +0100
Revision:
128:9bcdf88f62b0
Child:
140:97feb9bacc10
Release 128 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

2966: Add kw24 support https://github.com/ARMmbed/mbed-os/pull/2966
3068: MultiTech mDot - clean up PeripheralPins.c and add new pin names https://github.com/ARMmbed/mbed-os/pull/3068
3089: Kinetis HAL: Remove clock initialization code from serial and ticker https://github.com/ARMmbed/mbed-os/pull/3089
2943: [NRF5] NVIC_SetVector functionality https://github.com/ARMmbed/mbed-os/pull/2943
2938: InterruptIn changes in NCS36510 HAL. https://github.com/ARMmbed/mbed-os/pull/2938
3108: Fix sleep function for NRF52. https://github.com/ARMmbed/mbed-os/pull/3108
3076: STM32F1: Correct timer master value reading https://github.com/ARMmbed/mbed-os/pull/3076
3085: Add LOWPOWERTIMER capability for NUCLEO_F303ZE https://github.com/ARMmbed/mbed-os/pull/3085
3046: [BEETLE] Update BLE stack on Beetle board https://github.com/ARMmbed/mbed-os/pull/3046
3122: [Silicon Labs] Update of Silicon Labs HAL https://github.com/ARMmbed/mbed-os/pull/3122
3022: OnSemi RAM usage fix https://github.com/ARMmbed/mbed-os/pull/3022
3121: STM32F3: Correct UART4 and UART5 defines when using DEVICE_SERIAL_ASYNCH https://github.com/ARMmbed/mbed-os/pull/3121
3142: Targets- NUMAKER_PFM_NUC47216 remove mbed 2 https://github.com/ARMmbed/mbed-os/pull/3142

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 128:9bcdf88f62b0 1 /*
<> 128:9bcdf88f62b0 2 ** ###################################################################
<> 128:9bcdf88f62b0 3 ** Processor: MKW24D512VHA5
<> 128:9bcdf88f62b0 4 ** Compiler: GNU C Compiler
<> 128:9bcdf88f62b0 5 ** Reference manual: MKW2xDRM Rev.2 July 2014
<> 128:9bcdf88f62b0 6 ** Version: rev. 2.0, 2014-11-26
<> 128:9bcdf88f62b0 7 ** Build: b160512
<> 128:9bcdf88f62b0 8 **
<> 128:9bcdf88f62b0 9 ** Abstract:
<> 128:9bcdf88f62b0 10 ** Linker file for the GNU C Compiler
<> 128:9bcdf88f62b0 11 **
<> 128:9bcdf88f62b0 12 ** Copyright (c) 2016 Freescale Semiconductor, Inc.
<> 128:9bcdf88f62b0 13 ** All rights reserved.
<> 128:9bcdf88f62b0 14 **
<> 128:9bcdf88f62b0 15 ** Redistribution and use in source and binary forms, with or without modification,
<> 128:9bcdf88f62b0 16 ** are permitted provided that the following conditions are met:
<> 128:9bcdf88f62b0 17 **
<> 128:9bcdf88f62b0 18 ** o Redistributions of source code must retain the above copyright notice, this list
<> 128:9bcdf88f62b0 19 ** of conditions and the following disclaimer.
<> 128:9bcdf88f62b0 20 **
<> 128:9bcdf88f62b0 21 ** o Redistributions in binary form must reproduce the above copyright notice, this
<> 128:9bcdf88f62b0 22 ** list of conditions and the following disclaimer in the documentation and/or
<> 128:9bcdf88f62b0 23 ** other materials provided with the distribution.
<> 128:9bcdf88f62b0 24 **
<> 128:9bcdf88f62b0 25 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
<> 128:9bcdf88f62b0 26 ** contributors may be used to endorse or promote products derived from this
<> 128:9bcdf88f62b0 27 ** software without specific prior written permission.
<> 128:9bcdf88f62b0 28 **
<> 128:9bcdf88f62b0 29 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
<> 128:9bcdf88f62b0 30 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
<> 128:9bcdf88f62b0 31 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 128:9bcdf88f62b0 32 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
<> 128:9bcdf88f62b0 33 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
<> 128:9bcdf88f62b0 34 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
<> 128:9bcdf88f62b0 35 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
<> 128:9bcdf88f62b0 36 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
<> 128:9bcdf88f62b0 37 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
<> 128:9bcdf88f62b0 38 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 128:9bcdf88f62b0 39 **
<> 128:9bcdf88f62b0 40 ** http: www.freescale.com
<> 128:9bcdf88f62b0 41 ** mail: support@freescale.com
<> 128:9bcdf88f62b0 42 **
<> 128:9bcdf88f62b0 43 ** ###################################################################
<> 128:9bcdf88f62b0 44 */
<> 128:9bcdf88f62b0 45
<> 128:9bcdf88f62b0 46 /* Entry Point */
<> 128:9bcdf88f62b0 47 ENTRY(Reset_Handler)
<> 128:9bcdf88f62b0 48
<> 128:9bcdf88f62b0 49 __ram_vector_table__ = 1;
<> 128:9bcdf88f62b0 50
<> 128:9bcdf88f62b0 51 /* Heap 1/4 of ram and stack 1/8 */
<> 128:9bcdf88f62b0 52 __stack_size__ = 0x2000;
<> 128:9bcdf88f62b0 53 __heap_size__ = 0x4000;
<> 128:9bcdf88f62b0 54
<> 128:9bcdf88f62b0 55 HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400;
<> 128:9bcdf88f62b0 56 STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400;
<> 128:9bcdf88f62b0 57 M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0;
<> 128:9bcdf88f62b0 58
<> 128:9bcdf88f62b0 59 /* Specify the memory areas */
<> 128:9bcdf88f62b0 60 MEMORY
<> 128:9bcdf88f62b0 61 {
<> 128:9bcdf88f62b0 62 m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
<> 128:9bcdf88f62b0 63 m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
<> 128:9bcdf88f62b0 64 m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0
<> 128:9bcdf88f62b0 65 m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00008000
<> 128:9bcdf88f62b0 66 m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00008000
<> 128:9bcdf88f62b0 67 }
<> 128:9bcdf88f62b0 68
<> 128:9bcdf88f62b0 69 /* Define output sections */
<> 128:9bcdf88f62b0 70 SECTIONS
<> 128:9bcdf88f62b0 71 {
<> 128:9bcdf88f62b0 72 /* The startup code goes first into internal flash */
<> 128:9bcdf88f62b0 73 .interrupts :
<> 128:9bcdf88f62b0 74 {
<> 128:9bcdf88f62b0 75 __VECTOR_TABLE = .;
<> 128:9bcdf88f62b0 76 . = ALIGN(4);
<> 128:9bcdf88f62b0 77 KEEP(*(.isr_vector)) /* Startup code */
<> 128:9bcdf88f62b0 78 . = ALIGN(4);
<> 128:9bcdf88f62b0 79 } > m_interrupts
<> 128:9bcdf88f62b0 80
<> 128:9bcdf88f62b0 81 .flash_config :
<> 128:9bcdf88f62b0 82 {
<> 128:9bcdf88f62b0 83 . = ALIGN(4);
<> 128:9bcdf88f62b0 84 KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */
<> 128:9bcdf88f62b0 85 . = ALIGN(4);
<> 128:9bcdf88f62b0 86 } > m_flash_config
<> 128:9bcdf88f62b0 87
<> 128:9bcdf88f62b0 88 /* The program code and other data goes into internal flash */
<> 128:9bcdf88f62b0 89 .text :
<> 128:9bcdf88f62b0 90 {
<> 128:9bcdf88f62b0 91 . = ALIGN(4);
<> 128:9bcdf88f62b0 92 *(.text) /* .text sections (code) */
<> 128:9bcdf88f62b0 93 *(.text*) /* .text* sections (code) */
<> 128:9bcdf88f62b0 94 *(.rodata) /* .rodata sections (constants, strings, etc.) */
<> 128:9bcdf88f62b0 95 *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
<> 128:9bcdf88f62b0 96 *(.glue_7) /* glue arm to thumb code */
<> 128:9bcdf88f62b0 97 *(.glue_7t) /* glue thumb to arm code */
<> 128:9bcdf88f62b0 98 *(.eh_frame)
<> 128:9bcdf88f62b0 99 KEEP (*(.init))
<> 128:9bcdf88f62b0 100 KEEP (*(.fini))
<> 128:9bcdf88f62b0 101 . = ALIGN(4);
<> 128:9bcdf88f62b0 102 } > m_text
<> 128:9bcdf88f62b0 103
<> 128:9bcdf88f62b0 104 .ARM.extab :
<> 128:9bcdf88f62b0 105 {
<> 128:9bcdf88f62b0 106 *(.ARM.extab* .gnu.linkonce.armextab.*)
<> 128:9bcdf88f62b0 107 } > m_text
<> 128:9bcdf88f62b0 108
<> 128:9bcdf88f62b0 109 .ARM :
<> 128:9bcdf88f62b0 110 {
<> 128:9bcdf88f62b0 111 __exidx_start = .;
<> 128:9bcdf88f62b0 112 *(.ARM.exidx*)
<> 128:9bcdf88f62b0 113 __exidx_end = .;
<> 128:9bcdf88f62b0 114 } > m_text
<> 128:9bcdf88f62b0 115
<> 128:9bcdf88f62b0 116 .ctors :
<> 128:9bcdf88f62b0 117 {
<> 128:9bcdf88f62b0 118 __CTOR_LIST__ = .;
<> 128:9bcdf88f62b0 119 /* gcc uses crtbegin.o to find the start of
<> 128:9bcdf88f62b0 120 the constructors, so we make sure it is
<> 128:9bcdf88f62b0 121 first. Because this is a wildcard, it
<> 128:9bcdf88f62b0 122 doesn't matter if the user does not
<> 128:9bcdf88f62b0 123 actually link against crtbegin.o; the
<> 128:9bcdf88f62b0 124 linker won't look for a file to match a
<> 128:9bcdf88f62b0 125 wildcard. The wildcard also means that it
<> 128:9bcdf88f62b0 126 doesn't matter which directory crtbegin.o
<> 128:9bcdf88f62b0 127 is in. */
<> 128:9bcdf88f62b0 128 KEEP (*crtbegin.o(.ctors))
<> 128:9bcdf88f62b0 129 KEEP (*crtbegin?.o(.ctors))
<> 128:9bcdf88f62b0 130 /* We don't want to include the .ctor section from
<> 128:9bcdf88f62b0 131 from the crtend.o file until after the sorted ctors.
<> 128:9bcdf88f62b0 132 The .ctor section from the crtend file contains the
<> 128:9bcdf88f62b0 133 end of ctors marker and it must be last */
<> 128:9bcdf88f62b0 134 KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))
<> 128:9bcdf88f62b0 135 KEEP (*(SORT(.ctors.*)))
<> 128:9bcdf88f62b0 136 KEEP (*(.ctors))
<> 128:9bcdf88f62b0 137 __CTOR_END__ = .;
<> 128:9bcdf88f62b0 138 } > m_text
<> 128:9bcdf88f62b0 139
<> 128:9bcdf88f62b0 140 .dtors :
<> 128:9bcdf88f62b0 141 {
<> 128:9bcdf88f62b0 142 __DTOR_LIST__ = .;
<> 128:9bcdf88f62b0 143 KEEP (*crtbegin.o(.dtors))
<> 128:9bcdf88f62b0 144 KEEP (*crtbegin?.o(.dtors))
<> 128:9bcdf88f62b0 145 KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))
<> 128:9bcdf88f62b0 146 KEEP (*(SORT(.dtors.*)))
<> 128:9bcdf88f62b0 147 KEEP (*(.dtors))
<> 128:9bcdf88f62b0 148 __DTOR_END__ = .;
<> 128:9bcdf88f62b0 149 } > m_text
<> 128:9bcdf88f62b0 150
<> 128:9bcdf88f62b0 151 .preinit_array :
<> 128:9bcdf88f62b0 152 {
<> 128:9bcdf88f62b0 153 PROVIDE_HIDDEN (__preinit_array_start = .);
<> 128:9bcdf88f62b0 154 KEEP (*(.preinit_array*))
<> 128:9bcdf88f62b0 155 PROVIDE_HIDDEN (__preinit_array_end = .);
<> 128:9bcdf88f62b0 156 } > m_text
<> 128:9bcdf88f62b0 157
<> 128:9bcdf88f62b0 158 .init_array :
<> 128:9bcdf88f62b0 159 {
<> 128:9bcdf88f62b0 160 PROVIDE_HIDDEN (__init_array_start = .);
<> 128:9bcdf88f62b0 161 KEEP (*(SORT(.init_array.*)))
<> 128:9bcdf88f62b0 162 KEEP (*(.init_array*))
<> 128:9bcdf88f62b0 163 PROVIDE_HIDDEN (__init_array_end = .);
<> 128:9bcdf88f62b0 164 } > m_text
<> 128:9bcdf88f62b0 165
<> 128:9bcdf88f62b0 166 .fini_array :
<> 128:9bcdf88f62b0 167 {
<> 128:9bcdf88f62b0 168 PROVIDE_HIDDEN (__fini_array_start = .);
<> 128:9bcdf88f62b0 169 KEEP (*(SORT(.fini_array.*)))
<> 128:9bcdf88f62b0 170 KEEP (*(.fini_array*))
<> 128:9bcdf88f62b0 171 PROVIDE_HIDDEN (__fini_array_end = .);
<> 128:9bcdf88f62b0 172 } > m_text
<> 128:9bcdf88f62b0 173
<> 128:9bcdf88f62b0 174 __etext = .; /* define a global symbol at end of code */
<> 128:9bcdf88f62b0 175 __DATA_ROM = .; /* Symbol is used by startup for data initialization */
<> 128:9bcdf88f62b0 176
<> 128:9bcdf88f62b0 177 .interrupts_ram :
<> 128:9bcdf88f62b0 178 {
<> 128:9bcdf88f62b0 179 . = ALIGN(4);
<> 128:9bcdf88f62b0 180 __VECTOR_RAM__ = .;
<> 128:9bcdf88f62b0 181 __interrupts_ram_start__ = .; /* Create a global symbol at data start */
<> 128:9bcdf88f62b0 182 *(.m_interrupts_ram) /* This is a user defined section */
<> 128:9bcdf88f62b0 183 . += M_VECTOR_RAM_SIZE;
<> 128:9bcdf88f62b0 184 . = ALIGN(4);
<> 128:9bcdf88f62b0 185 __interrupts_ram_end__ = .; /* Define a global symbol at data end */
<> 128:9bcdf88f62b0 186 } > m_data
<> 128:9bcdf88f62b0 187
<> 128:9bcdf88f62b0 188 __VECTOR_RAM = DEFINED(__ram_vector_table__) ? __VECTOR_RAM__ : ORIGIN(m_interrupts);
<> 128:9bcdf88f62b0 189 __RAM_VECTOR_TABLE_SIZE_BYTES = DEFINED(__ram_vector_table__) ? (__interrupts_ram_end__ - __interrupts_ram_start__) : 0x0;
<> 128:9bcdf88f62b0 190
<> 128:9bcdf88f62b0 191 .data : AT(__DATA_ROM)
<> 128:9bcdf88f62b0 192 {
<> 128:9bcdf88f62b0 193 . = ALIGN(4);
<> 128:9bcdf88f62b0 194 __DATA_RAM = .;
<> 128:9bcdf88f62b0 195 __data_start__ = .; /* create a global symbol at data start */
<> 128:9bcdf88f62b0 196 *(.data) /* .data sections */
<> 128:9bcdf88f62b0 197 *(.data*) /* .data* sections */
<> 128:9bcdf88f62b0 198 KEEP(*(.jcr*))
<> 128:9bcdf88f62b0 199 . = ALIGN(4);
<> 128:9bcdf88f62b0 200 __data_end__ = .; /* define a global symbol at data end */
<> 128:9bcdf88f62b0 201 } > m_data
<> 128:9bcdf88f62b0 202
<> 128:9bcdf88f62b0 203 __DATA_END = __DATA_ROM + (__data_end__ - __data_start__);
<> 128:9bcdf88f62b0 204 text_end = ORIGIN(m_text) + LENGTH(m_text);
<> 128:9bcdf88f62b0 205 ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
<> 128:9bcdf88f62b0 206
<> 128:9bcdf88f62b0 207 USB_RAM_GAP = DEFINED(__usb_ram_size__) ? __usb_ram_size__ : 0x800;
<> 128:9bcdf88f62b0 208 /* Uninitialized data section */
<> 128:9bcdf88f62b0 209 .bss :
<> 128:9bcdf88f62b0 210 {
<> 128:9bcdf88f62b0 211 /* This is used by the startup in order to initialize the .bss section */
<> 128:9bcdf88f62b0 212 . = ALIGN(4);
<> 128:9bcdf88f62b0 213 __START_BSS = .;
<> 128:9bcdf88f62b0 214 __bss_start__ = .;
<> 128:9bcdf88f62b0 215 *(.bss)
<> 128:9bcdf88f62b0 216 *(.bss*)
<> 128:9bcdf88f62b0 217 . = ALIGN(512);
<> 128:9bcdf88f62b0 218 USB_RAM_START = .;
<> 128:9bcdf88f62b0 219 . += USB_RAM_GAP;
<> 128:9bcdf88f62b0 220 *(COMMON)
<> 128:9bcdf88f62b0 221 . = ALIGN(4);
<> 128:9bcdf88f62b0 222 __bss_end__ = .;
<> 128:9bcdf88f62b0 223 __END_BSS = .;
<> 128:9bcdf88f62b0 224 } > m_data
<> 128:9bcdf88f62b0 225
<> 128:9bcdf88f62b0 226 .heap :
<> 128:9bcdf88f62b0 227 {
<> 128:9bcdf88f62b0 228 . = ALIGN(8);
<> 128:9bcdf88f62b0 229 __end__ = .;
<> 128:9bcdf88f62b0 230 PROVIDE(end = .);
<> 128:9bcdf88f62b0 231 __HeapBase = .;
<> 128:9bcdf88f62b0 232 . += HEAP_SIZE;
<> 128:9bcdf88f62b0 233 __HeapLimit = .;
<> 128:9bcdf88f62b0 234 __heap_limit = .; /* Add for _sbrk */
<> 128:9bcdf88f62b0 235 } > m_data_2
<> 128:9bcdf88f62b0 236
<> 128:9bcdf88f62b0 237 .stack :
<> 128:9bcdf88f62b0 238 {
<> 128:9bcdf88f62b0 239 . = ALIGN(8);
<> 128:9bcdf88f62b0 240 . += STACK_SIZE;
<> 128:9bcdf88f62b0 241 } > m_data_2
<> 128:9bcdf88f62b0 242
<> 128:9bcdf88f62b0 243 m_usb_bdt USB_RAM_START (NOLOAD) :
<> 128:9bcdf88f62b0 244 {
<> 128:9bcdf88f62b0 245 *(m_usb_bdt)
<> 128:9bcdf88f62b0 246 USB_RAM_BDT_END = .;
<> 128:9bcdf88f62b0 247 }
<> 128:9bcdf88f62b0 248
<> 128:9bcdf88f62b0 249 m_usb_global USB_RAM_BDT_END (NOLOAD) :
<> 128:9bcdf88f62b0 250 {
<> 128:9bcdf88f62b0 251 *(m_usb_global)
<> 128:9bcdf88f62b0 252 }
<> 128:9bcdf88f62b0 253
<> 128:9bcdf88f62b0 254 /* Initializes stack on the end of block */
<> 128:9bcdf88f62b0 255 __StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2);
<> 128:9bcdf88f62b0 256 __StackLimit = __StackTop - STACK_SIZE;
<> 128:9bcdf88f62b0 257 PROVIDE(__stack = __StackTop);
<> 128:9bcdf88f62b0 258
<> 128:9bcdf88f62b0 259 .ARM.attributes 0 : { *(.ARM.attributes) }
<> 128:9bcdf88f62b0 260
<> 128:9bcdf88f62b0 261 ASSERT(__StackLimit >= __HeapLimit, "region m_data_2 overflowed with stack and heap")
<> 128:9bcdf88f62b0 262 }
<> 128:9bcdf88f62b0 263