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:
Kojto
Date:
Tue Feb 14 11:24:20 2017 +0000
Revision:
136:ef9c61f8c49f
Parent:
122:f9eeca106725
Release 136 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723

Who changed what in which revision?

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