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