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:
Wed Apr 27 12:10:56 2016 -0500
Revision:
119:aae6fcc7d9bb
Child:
145:64910690c574
Release 119 of the mbed library

Changes:
- new targets - EFM32PG_STK3401, NUCLEO_L031K6
- ST - hwflwctl support for NUCLEO_L476RG
- Update STM32CUBE_L0 from v1.2 to v1.5
- STM32F7 - bugfix - The weak function HAL_Delay is overwritten to use us ticker API.
- Maxim - Fixing the send break for the MAXWSNENV and MAX32600MBED

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 119:aae6fcc7d9bb 1 /* Linker script for Silicon Labs EFM32PG1B devices */
Kojto 119:aae6fcc7d9bb 2 /* */
Kojto 119:aae6fcc7d9bb 3 /* This file is subject to the license terms as defined in ARM's */
Kojto 119:aae6fcc7d9bb 4 /* CMSIS END USER LICENSE AGREEMENT.pdf, governing the use of */
Kojto 119:aae6fcc7d9bb 5 /* Example Code. */
Kojto 119:aae6fcc7d9bb 6 /* */
Kojto 119:aae6fcc7d9bb 7 /* Silicon Laboratories, Inc. 2015 */
Kojto 119:aae6fcc7d9bb 8 /* */
Kojto 119:aae6fcc7d9bb 9 /* Version 4.2.0 */
Kojto 119:aae6fcc7d9bb 10 /* */
Kojto 119:aae6fcc7d9bb 11
Kojto 119:aae6fcc7d9bb 12 MEMORY
Kojto 119:aae6fcc7d9bb 13 {
Kojto 119:aae6fcc7d9bb 14 FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 262144
Kojto 119:aae6fcc7d9bb 15 RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 32768
Kojto 119:aae6fcc7d9bb 16 }
Kojto 119:aae6fcc7d9bb 17
Kojto 119:aae6fcc7d9bb 18 /* MBED: mbed needs to be able to dynamically set the interrupt vector table.
Kojto 119:aae6fcc7d9bb 19 * We make room for the table at the very beginning of RAM, i.e. at
Kojto 119:aae6fcc7d9bb 20 * 0x20000000. We need (16+34) * sizeof(uint32_t) = 200 bytes for EFM32PG */
Kojto 119:aae6fcc7d9bb 21 __vector_size = 0xC8;
Kojto 119:aae6fcc7d9bb 22
Kojto 119:aae6fcc7d9bb 23 /* Linker script to place sections and symbol values. Should be used together
Kojto 119:aae6fcc7d9bb 24 * with other linker script that defines memory regions FLASH and RAM.
Kojto 119:aae6fcc7d9bb 25 * It references following symbols, which must be defined in code:
Kojto 119:aae6fcc7d9bb 26 * Reset_Handler : Entry of reset handler
Kojto 119:aae6fcc7d9bb 27 *
Kojto 119:aae6fcc7d9bb 28 * It defines following symbols, which code can use without definition:
Kojto 119:aae6fcc7d9bb 29 * __exidx_start
Kojto 119:aae6fcc7d9bb 30 * __exidx_end
Kojto 119:aae6fcc7d9bb 31 * __copy_table_start__
Kojto 119:aae6fcc7d9bb 32 * __copy_table_end__
Kojto 119:aae6fcc7d9bb 33 * __zero_table_start__
Kojto 119:aae6fcc7d9bb 34 * __zero_table_end__
Kojto 119:aae6fcc7d9bb 35 * __etext
Kojto 119:aae6fcc7d9bb 36 * __data_start__
Kojto 119:aae6fcc7d9bb 37 * __preinit_array_start
Kojto 119:aae6fcc7d9bb 38 * __preinit_array_end
Kojto 119:aae6fcc7d9bb 39 * __init_array_start
Kojto 119:aae6fcc7d9bb 40 * __init_array_end
Kojto 119:aae6fcc7d9bb 41 * __fini_array_start
Kojto 119:aae6fcc7d9bb 42 * __fini_array_end
Kojto 119:aae6fcc7d9bb 43 * __data_end__
Kojto 119:aae6fcc7d9bb 44 * __bss_start__
Kojto 119:aae6fcc7d9bb 45 * __bss_end__
Kojto 119:aae6fcc7d9bb 46 * __end__
Kojto 119:aae6fcc7d9bb 47 * end
Kojto 119:aae6fcc7d9bb 48 * __HeapLimit
Kojto 119:aae6fcc7d9bb 49 * __StackLimit
Kojto 119:aae6fcc7d9bb 50 * __StackTop
Kojto 119:aae6fcc7d9bb 51 * __stack
Kojto 119:aae6fcc7d9bb 52 * __Vectors_End
Kojto 119:aae6fcc7d9bb 53 * __Vectors_Size
Kojto 119:aae6fcc7d9bb 54 */
Kojto 119:aae6fcc7d9bb 55 ENTRY(Reset_Handler)
Kojto 119:aae6fcc7d9bb 56
Kojto 119:aae6fcc7d9bb 57 SECTIONS
Kojto 119:aae6fcc7d9bb 58 {
Kojto 119:aae6fcc7d9bb 59 .text :
Kojto 119:aae6fcc7d9bb 60 {
Kojto 119:aae6fcc7d9bb 61 KEEP(*(.vectors))
Kojto 119:aae6fcc7d9bb 62 __Vectors_End = .;
Kojto 119:aae6fcc7d9bb 63 __Vectors_Size = __Vectors_End - __Vectors;
Kojto 119:aae6fcc7d9bb 64 __end__ = .;
Kojto 119:aae6fcc7d9bb 65
Kojto 119:aae6fcc7d9bb 66 *(.text*)
Kojto 119:aae6fcc7d9bb 67
Kojto 119:aae6fcc7d9bb 68 KEEP(*(.init))
Kojto 119:aae6fcc7d9bb 69 KEEP(*(.fini))
Kojto 119:aae6fcc7d9bb 70
Kojto 119:aae6fcc7d9bb 71 /* .ctors */
Kojto 119:aae6fcc7d9bb 72 *crtbegin.o(.ctors)
Kojto 119:aae6fcc7d9bb 73 *crtbegin?.o(.ctors)
Kojto 119:aae6fcc7d9bb 74 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
Kojto 119:aae6fcc7d9bb 75 *(SORT(.ctors.*))
Kojto 119:aae6fcc7d9bb 76 *(.ctors)
Kojto 119:aae6fcc7d9bb 77
Kojto 119:aae6fcc7d9bb 78 /* .dtors */
Kojto 119:aae6fcc7d9bb 79 *crtbegin.o(.dtors)
Kojto 119:aae6fcc7d9bb 80 *crtbegin?.o(.dtors)
Kojto 119:aae6fcc7d9bb 81 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
Kojto 119:aae6fcc7d9bb 82 *(SORT(.dtors.*))
Kojto 119:aae6fcc7d9bb 83 *(.dtors)
Kojto 119:aae6fcc7d9bb 84
Kojto 119:aae6fcc7d9bb 85 *(.rodata*)
Kojto 119:aae6fcc7d9bb 86
Kojto 119:aae6fcc7d9bb 87 KEEP(*(.eh_frame*))
Kojto 119:aae6fcc7d9bb 88 } > FLASH
Kojto 119:aae6fcc7d9bb 89
Kojto 119:aae6fcc7d9bb 90 .ARM.extab :
Kojto 119:aae6fcc7d9bb 91 {
Kojto 119:aae6fcc7d9bb 92 *(.ARM.extab* .gnu.linkonce.armextab.*)
Kojto 119:aae6fcc7d9bb 93 } > FLASH
Kojto 119:aae6fcc7d9bb 94
Kojto 119:aae6fcc7d9bb 95 __exidx_start = .;
Kojto 119:aae6fcc7d9bb 96 .ARM.exidx :
Kojto 119:aae6fcc7d9bb 97 {
Kojto 119:aae6fcc7d9bb 98 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
Kojto 119:aae6fcc7d9bb 99 } > FLASH
Kojto 119:aae6fcc7d9bb 100 __exidx_end = .;
Kojto 119:aae6fcc7d9bb 101
Kojto 119:aae6fcc7d9bb 102 /* To copy multiple ROM to RAM sections,
Kojto 119:aae6fcc7d9bb 103 * uncomment .copy.table section and,
Kojto 119:aae6fcc7d9bb 104 * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */
Kojto 119:aae6fcc7d9bb 105 /*
Kojto 119:aae6fcc7d9bb 106 .copy.table :
Kojto 119:aae6fcc7d9bb 107 {
Kojto 119:aae6fcc7d9bb 108 . = ALIGN(4);
Kojto 119:aae6fcc7d9bb 109 __copy_table_start__ = .;
Kojto 119:aae6fcc7d9bb 110 LONG (__etext)
Kojto 119:aae6fcc7d9bb 111 LONG (__data_start__)
Kojto 119:aae6fcc7d9bb 112 LONG (__data_end__ - __data_start__)
Kojto 119:aae6fcc7d9bb 113 LONG (__etext2)
Kojto 119:aae6fcc7d9bb 114 LONG (__data2_start__)
Kojto 119:aae6fcc7d9bb 115 LONG (__data2_end__ - __data2_start__)
Kojto 119:aae6fcc7d9bb 116 __copy_table_end__ = .;
Kojto 119:aae6fcc7d9bb 117 } > FLASH
Kojto 119:aae6fcc7d9bb 118 */
Kojto 119:aae6fcc7d9bb 119
Kojto 119:aae6fcc7d9bb 120 /* To clear multiple BSS sections,
Kojto 119:aae6fcc7d9bb 121 * uncomment .zero.table section and,
Kojto 119:aae6fcc7d9bb 122 * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */
Kojto 119:aae6fcc7d9bb 123 /*
Kojto 119:aae6fcc7d9bb 124 .zero.table :
Kojto 119:aae6fcc7d9bb 125 {
Kojto 119:aae6fcc7d9bb 126 . = ALIGN(4);
Kojto 119:aae6fcc7d9bb 127 __zero_table_start__ = .;
Kojto 119:aae6fcc7d9bb 128 LONG (__bss_start__)
Kojto 119:aae6fcc7d9bb 129 LONG (__bss_end__ - __bss_start__)
Kojto 119:aae6fcc7d9bb 130 LONG (__bss2_start__)
Kojto 119:aae6fcc7d9bb 131 LONG (__bss2_end__ - __bss2_start__)
Kojto 119:aae6fcc7d9bb 132 __zero_table_end__ = .;
Kojto 119:aae6fcc7d9bb 133 } > FLASH
Kojto 119:aae6fcc7d9bb 134 */
Kojto 119:aae6fcc7d9bb 135
Kojto 119:aae6fcc7d9bb 136 __etext = .;
Kojto 119:aae6fcc7d9bb 137
Kojto 119:aae6fcc7d9bb 138 .data : AT (__etext)
Kojto 119:aae6fcc7d9bb 139 {
Kojto 119:aae6fcc7d9bb 140 __data_start__ = .;
Kojto 119:aae6fcc7d9bb 141 PROVIDE( __start_vector_table__ = .);
Kojto 119:aae6fcc7d9bb 142 . += __vector_size;
Kojto 119:aae6fcc7d9bb 143 PROVIDE( __end_vector_table__ = .);
Kojto 119:aae6fcc7d9bb 144 *(vtable)
Kojto 119:aae6fcc7d9bb 145 *(.data*)
Kojto 119:aae6fcc7d9bb 146 . = ALIGN (4);
Kojto 119:aae6fcc7d9bb 147 *(.ram)
Kojto 119:aae6fcc7d9bb 148
Kojto 119:aae6fcc7d9bb 149 . = ALIGN(4);
Kojto 119:aae6fcc7d9bb 150 /* preinit data */
Kojto 119:aae6fcc7d9bb 151 PROVIDE_HIDDEN (__preinit_array_start = .);
Kojto 119:aae6fcc7d9bb 152 KEEP(*(.preinit_array))
Kojto 119:aae6fcc7d9bb 153 PROVIDE_HIDDEN (__preinit_array_end = .);
Kojto 119:aae6fcc7d9bb 154
Kojto 119:aae6fcc7d9bb 155 . = ALIGN(4);
Kojto 119:aae6fcc7d9bb 156 /* init data */
Kojto 119:aae6fcc7d9bb 157 PROVIDE_HIDDEN (__init_array_start = .);
Kojto 119:aae6fcc7d9bb 158 KEEP(*(SORT(.init_array.*)))
Kojto 119:aae6fcc7d9bb 159 KEEP(*(.init_array))
Kojto 119:aae6fcc7d9bb 160 PROVIDE_HIDDEN (__init_array_end = .);
Kojto 119:aae6fcc7d9bb 161
Kojto 119:aae6fcc7d9bb 162 . = ALIGN(4);
Kojto 119:aae6fcc7d9bb 163 /* finit data */
Kojto 119:aae6fcc7d9bb 164 PROVIDE_HIDDEN (__fini_array_start = .);
Kojto 119:aae6fcc7d9bb 165 KEEP(*(SORT(.fini_array.*)))
Kojto 119:aae6fcc7d9bb 166 KEEP(*(.fini_array))
Kojto 119:aae6fcc7d9bb 167 PROVIDE_HIDDEN (__fini_array_end = .);
Kojto 119:aae6fcc7d9bb 168
Kojto 119:aae6fcc7d9bb 169 KEEP(*(.jcr*))
Kojto 119:aae6fcc7d9bb 170 . = ALIGN(4);
Kojto 119:aae6fcc7d9bb 171 /* All data end */
Kojto 119:aae6fcc7d9bb 172 __data_end__ = .;
Kojto 119:aae6fcc7d9bb 173
Kojto 119:aae6fcc7d9bb 174 } > RAM
Kojto 119:aae6fcc7d9bb 175
Kojto 119:aae6fcc7d9bb 176 .bss :
Kojto 119:aae6fcc7d9bb 177 {
Kojto 119:aae6fcc7d9bb 178 . = ALIGN(4);
Kojto 119:aae6fcc7d9bb 179 __bss_start__ = .;
Kojto 119:aae6fcc7d9bb 180 *(.bss*)
Kojto 119:aae6fcc7d9bb 181 *(COMMON)
Kojto 119:aae6fcc7d9bb 182 . = ALIGN(4);
Kojto 119:aae6fcc7d9bb 183 __bss_end__ = .;
Kojto 119:aae6fcc7d9bb 184 } > RAM
Kojto 119:aae6fcc7d9bb 185
Kojto 119:aae6fcc7d9bb 186 .heap (COPY):
Kojto 119:aae6fcc7d9bb 187 {
Kojto 119:aae6fcc7d9bb 188 __HeapBase = .;
Kojto 119:aae6fcc7d9bb 189 __end__ = .;
Kojto 119:aae6fcc7d9bb 190 end = __end__;
Kojto 119:aae6fcc7d9bb 191 _end = __end__;
Kojto 119:aae6fcc7d9bb 192 KEEP(*(.heap*))
Kojto 119:aae6fcc7d9bb 193 __HeapLimit = .;
Kojto 119:aae6fcc7d9bb 194 } > RAM
Kojto 119:aae6fcc7d9bb 195
Kojto 119:aae6fcc7d9bb 196 /* .stack_dummy section doesn't contains any symbols. It is only
Kojto 119:aae6fcc7d9bb 197 * used for linker to calculate size of stack sections, and assign
Kojto 119:aae6fcc7d9bb 198 * values to stack symbols later */
Kojto 119:aae6fcc7d9bb 199 .stack_dummy (COPY):
Kojto 119:aae6fcc7d9bb 200 {
Kojto 119:aae6fcc7d9bb 201 KEEP(*(.stack*))
Kojto 119:aae6fcc7d9bb 202 } > RAM
Kojto 119:aae6fcc7d9bb 203
Kojto 119:aae6fcc7d9bb 204 /* Set stack top to end of RAM, and stack limit move down by
Kojto 119:aae6fcc7d9bb 205 * size of stack_dummy section */
Kojto 119:aae6fcc7d9bb 206 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
Kojto 119:aae6fcc7d9bb 207 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
Kojto 119:aae6fcc7d9bb 208 PROVIDE(__stack = __StackTop);
Kojto 119:aae6fcc7d9bb 209
Kojto 119:aae6fcc7d9bb 210 /* Check if data + heap + stack exceeds RAM limit */
Kojto 119:aae6fcc7d9bb 211 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
Kojto 119:aae6fcc7d9bb 212
Kojto 119:aae6fcc7d9bb 213 /* Check if FLASH usage exceeds FLASH size */
Kojto 119:aae6fcc7d9bb 214 ASSERT( LENGTH(FLASH) >= (__etext + SIZEOF(.data)), "FLASH memory overflowed !")
Kojto 119:aae6fcc7d9bb 215 }