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