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:
Mon Jan 16 12:05:23 2017 +0000
Revision:
134:ad3be0349dc5
Parent:
122:f9eeca106725
Child:
154:fb8e0ae1cceb
Release 134 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3488: Dev stm i2c v2 unitary functions https://github.com/ARMmbed/mbed-os/pull/3488
3492: Fix #3463 CAN read() return value https://github.com/ARMmbed/mbed-os/pull/3492
3503: [LPC15xx] Ensure that PWM=1 is resolved correctly https://github.com/ARMmbed/mbed-os/pull/3503
3504: [LPC15xx] CAN implementation improvements https://github.com/ARMmbed/mbed-os/pull/3504
3539: NUCLEO_F412ZG - Add support of TRNG peripheral https://github.com/ARMmbed/mbed-os/pull/3539
3540: STM: SPI: Initialize Rx in spi_master_write https://github.com/ARMmbed/mbed-os/pull/3540
3438: K64F: Add support for SERIAL ASYNCH API https://github.com/ARMmbed/mbed-os/pull/3438
3519: MCUXpresso: Fix ENET driver to enable interrupts after interrupt handler is set https://github.com/ARMmbed/mbed-os/pull/3519
3544: STM32L4 deepsleep improvement https://github.com/ARMmbed/mbed-os/pull/3544
3546: NUCLEO-F412ZG - Add CAN peripheral https://github.com/ARMmbed/mbed-os/pull/3546
3551: Fix I2C driver for RZ/A1H https://github.com/ARMmbed/mbed-os/pull/3551
3558: K64F UART Asynch API: Fix synchronization issue https://github.com/ARMmbed/mbed-os/pull/3558
3563: LPC4088 - Fix vector checksum https://github.com/ARMmbed/mbed-os/pull/3563
3567: Dev stm32 F0 v1.7.0 https://github.com/ARMmbed/mbed-os/pull/3567
3577: Fixes linking errors when building with debug profile https://github.com/ARMmbed/mbed-os/pull/3577

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