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