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