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:
Tue Mar 14 16:20:51 2017 +0000
Revision:
138:093f2bd7b9eb
Parent:
122:f9eeca106725
Child:
171:3a7713b1edbc
Release 138 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3716: fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files https://github.com/ARMmbed/mbed-os/pull/3716
3741: STM32 remove warning in hal_tick_32b.c file https://github.com/ARMmbed/mbed-os/pull/3741
3780: STM32L4 : Fix GPIO G port compatibility https://github.com/ARMmbed/mbed-os/pull/3780
3831: NCS36510: SPISLAVE enabled (Conflict resolved) https://github.com/ARMmbed/mbed-os/pull/3831
3836: Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os https://github.com/ARMmbed/mbed-os/pull/3836
3840: STM32: gpio SPEED - always set High Speed by default https://github.com/ARMmbed/mbed-os/pull/3840
3844: STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR) https://github.com/ARMmbed/mbed-os/pull/3844
3850: STM32: change spi error to debug warning https://github.com/ARMmbed/mbed-os/pull/3850
3860: Define GPIO_IP_WITHOUT_BRR for xDot platform https://github.com/ARMmbed/mbed-os/pull/3860
3880: DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated https://github.com/ARMmbed/mbed-os/pull/3880
3795: Fix pwm period calc https://github.com/ARMmbed/mbed-os/pull/3795
3828: STM32 CAN API: correct format and type https://github.com/ARMmbed/mbed-os/pull/3828
3842: TARGET_NRF: corrected spi_init() to properly handle re-initialization https://github.com/ARMmbed/mbed-os/pull/3842
3843: STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) https://github.com/ARMmbed/mbed-os/pull/3843
3879: NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10. https://github.com/ARMmbed/mbed-os/pull/3879
3902: Fix heap and stack size for NUCLEO_F746ZG https://github.com/ARMmbed/mbed-os/pull/3902
3829: can_write(): return error code when no tx mailboxes are available https://github.com/ARMmbed/mbed-os/pull/3829

Who changed what in which revision?

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