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:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
113:f141b2784e32
Child:
124:2241e3a39974
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

Who changed what in which revision?

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