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 29 10:16:23 2015 +0100
Revision:
98:8ab26030e058
Child:
113:f141b2784e32
Release 98 of the mbed library

Changes:
- Silabs new targets (Giant, Zero, Happy, Leopard, Wonder Geckos)
- Asynchronous SPI, I2C, Serial
- LowPower classes
- Nordic - nordic SDK v8.0 update
- Teensy - gcc arm fix for startup
- Nucleo F411 - usb freq fix

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 98:8ab26030e058 1 /* Linker script for Silicon Labs EFM32WG devices */
Kojto 98:8ab26030e058 2 /* */
Kojto 98:8ab26030e058 3 /* This file is subject to the license terms as defined in ARM's */
Kojto 98:8ab26030e058 4 /* CMSIS END USER LICENSE AGREEMENT.pdf, governing the use of */
Kojto 98:8ab26030e058 5 /* Example Code. */
Kojto 98:8ab26030e058 6 /* */
Kojto 98:8ab26030e058 7 /* Silicon Laboratories, Inc. 2014 */
Kojto 98:8ab26030e058 8 MEMORY
Kojto 98:8ab26030e058 9 {
Kojto 98:8ab26030e058 10 FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 262144
Kojto 98:8ab26030e058 11 RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 32768
Kojto 98:8ab26030e058 12 }
Kojto 98:8ab26030e058 13 /* MBED: mbed needs to be able to dynamically set the interrupt vector table.
Kojto 98:8ab26030e058 14 * We make room for the table at the very beginning of RAM, i.e. at
Kojto 98:8ab26030e058 15 * 0x20000000. We need (16+39) * sizeof(uint32_t) = 220 bytes for EFM32WG */
Kojto 98:8ab26030e058 16 __vector_size = 0xE0;
Kojto 98:8ab26030e058 17
Kojto 98:8ab26030e058 18 /* Linker script to place sections and symbol values. Should be used together
Kojto 98:8ab26030e058 19 * with other linker script that defines memory regions FLASH and RAM.
Kojto 98:8ab26030e058 20 * It references following symbols, which must be defined in code:
Kojto 98:8ab26030e058 21 * Reset_Handler : Entry of reset handler
Kojto 98:8ab26030e058 22 *
Kojto 98:8ab26030e058 23 * It defines following symbols, which code can use without definition:
Kojto 98:8ab26030e058 24 * __exidx_start
Kojto 98:8ab26030e058 25 * __exidx_end
Kojto 98:8ab26030e058 26 * __etext
Kojto 98:8ab26030e058 27 * __data_start__
Kojto 98:8ab26030e058 28 * __preinit_array_start
Kojto 98:8ab26030e058 29 * __preinit_array_end
Kojto 98:8ab26030e058 30 * __init_array_start
Kojto 98:8ab26030e058 31 * __init_array_end
Kojto 98:8ab26030e058 32 * __fini_array_start
Kojto 98:8ab26030e058 33 * __fini_array_end
Kojto 98:8ab26030e058 34 * __data_end__
Kojto 98:8ab26030e058 35 * __bss_start__
Kojto 98:8ab26030e058 36 * __bss_end__
Kojto 98:8ab26030e058 37 * __end__
Kojto 98:8ab26030e058 38 * end
Kojto 98:8ab26030e058 39 * __HeapLimit
Kojto 98:8ab26030e058 40 * __StackLimit
Kojto 98:8ab26030e058 41 * __StackTop
Kojto 98:8ab26030e058 42 * __stack
Kojto 98:8ab26030e058 43 */
Kojto 98:8ab26030e058 44 ENTRY(Reset_Handler)
Kojto 98:8ab26030e058 45
Kojto 98:8ab26030e058 46 SECTIONS
Kojto 98:8ab26030e058 47 {
Kojto 98:8ab26030e058 48 .text :
Kojto 98:8ab26030e058 49 {
Kojto 98:8ab26030e058 50 KEEP(*(.isr_vector))
Kojto 98:8ab26030e058 51 *(.text*)
Kojto 98:8ab26030e058 52
Kojto 98:8ab26030e058 53 KEEP(*(.init))
Kojto 98:8ab26030e058 54 KEEP(*(.fini))
Kojto 98:8ab26030e058 55
Kojto 98:8ab26030e058 56 /* .ctors */
Kojto 98:8ab26030e058 57 *crtbegin.o(.ctors)
Kojto 98:8ab26030e058 58 *crtbegin?.o(.ctors)
Kojto 98:8ab26030e058 59 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
Kojto 98:8ab26030e058 60 *(SORT(.ctors.*))
Kojto 98:8ab26030e058 61 *(.ctors)
Kojto 98:8ab26030e058 62
Kojto 98:8ab26030e058 63 /* .dtors */
Kojto 98:8ab26030e058 64 *crtbegin.o(.dtors)
Kojto 98:8ab26030e058 65 *crtbegin?.o(.dtors)
Kojto 98:8ab26030e058 66 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
Kojto 98:8ab26030e058 67 *(SORT(.dtors.*))
Kojto 98:8ab26030e058 68 *(.dtors)
Kojto 98:8ab26030e058 69
Kojto 98:8ab26030e058 70 *(.rodata*)
Kojto 98:8ab26030e058 71
Kojto 98:8ab26030e058 72 KEEP(*(.eh_frame*))
Kojto 98:8ab26030e058 73 } > FLASH
Kojto 98:8ab26030e058 74
Kojto 98:8ab26030e058 75 .ARM.extab :
Kojto 98:8ab26030e058 76 {
Kojto 98:8ab26030e058 77 *(.ARM.extab* .gnu.linkonce.armextab.*)
Kojto 98:8ab26030e058 78 } > FLASH
Kojto 98:8ab26030e058 79
Kojto 98:8ab26030e058 80 __exidx_start = .;
Kojto 98:8ab26030e058 81 .ARM.exidx :
Kojto 98:8ab26030e058 82 {
Kojto 98:8ab26030e058 83 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
Kojto 98:8ab26030e058 84 } > FLASH
Kojto 98:8ab26030e058 85 __exidx_end = .;
Kojto 98:8ab26030e058 86
Kojto 98:8ab26030e058 87 __etext = .;
Kojto 98:8ab26030e058 88
Kojto 98:8ab26030e058 89 .data : AT (__etext)
Kojto 98:8ab26030e058 90 {
Kojto 98:8ab26030e058 91 __data_start__ = .;
Kojto 98:8ab26030e058 92 *("dma")
Kojto 98:8ab26030e058 93 PROVIDE( __start_vector_table__ = .);
Kojto 98:8ab26030e058 94 . += __vector_size;
Kojto 98:8ab26030e058 95 PROVIDE( __end_vector_table__ = .);
Kojto 98:8ab26030e058 96 *(vtable)
Kojto 98:8ab26030e058 97 *(.data*)
Kojto 98:8ab26030e058 98 . = ALIGN (4);
Kojto 98:8ab26030e058 99 *(.ram)
Kojto 98:8ab26030e058 100
Kojto 98:8ab26030e058 101 . = ALIGN(4);
Kojto 98:8ab26030e058 102 /* preinit data */
Kojto 98:8ab26030e058 103 PROVIDE_HIDDEN (__preinit_array_start = .);
Kojto 98:8ab26030e058 104 KEEP(*(.preinit_array))
Kojto 98:8ab26030e058 105 PROVIDE_HIDDEN (__preinit_array_end = .);
Kojto 98:8ab26030e058 106
Kojto 98:8ab26030e058 107 . = ALIGN(4);
Kojto 98:8ab26030e058 108 /* init data */
Kojto 98:8ab26030e058 109 PROVIDE_HIDDEN (__init_array_start = .);
Kojto 98:8ab26030e058 110 KEEP(*(SORT(.init_array.*)))
Kojto 98:8ab26030e058 111 KEEP(*(.init_array))
Kojto 98:8ab26030e058 112 PROVIDE_HIDDEN (__init_array_end = .);
Kojto 98:8ab26030e058 113
Kojto 98:8ab26030e058 114 . = ALIGN(4);
Kojto 98:8ab26030e058 115 /* finit data */
Kojto 98:8ab26030e058 116 PROVIDE_HIDDEN (__fini_array_start = .);
Kojto 98:8ab26030e058 117 KEEP(*(SORT(.fini_array.*)))
Kojto 98:8ab26030e058 118 KEEP(*(.fini_array))
Kojto 98:8ab26030e058 119 PROVIDE_HIDDEN (__fini_array_end = .);
Kojto 98:8ab26030e058 120
Kojto 98:8ab26030e058 121 . = ALIGN(4);
Kojto 98:8ab26030e058 122 /* All data end */
Kojto 98:8ab26030e058 123 __data_end__ = .;
Kojto 98:8ab26030e058 124
Kojto 98:8ab26030e058 125 } > RAM
Kojto 98:8ab26030e058 126
Kojto 98:8ab26030e058 127 .bss :
Kojto 98:8ab26030e058 128 {
Kojto 98:8ab26030e058 129 __bss_start__ = .;
Kojto 98:8ab26030e058 130 *(.bss*)
Kojto 98:8ab26030e058 131 *(COMMON)
Kojto 98:8ab26030e058 132 __bss_end__ = .;
Kojto 98:8ab26030e058 133 } > RAM
Kojto 98:8ab26030e058 134
Kojto 98:8ab26030e058 135 .heap :
Kojto 98:8ab26030e058 136 {
Kojto 98:8ab26030e058 137 __end__ = .;
Kojto 98:8ab26030e058 138 end = __end__;
Kojto 98:8ab26030e058 139 _end = __end__;
Kojto 98:8ab26030e058 140 *(.heap*)
Kojto 98:8ab26030e058 141 __HeapLimit = .;
Kojto 98:8ab26030e058 142 } > RAM
Kojto 98:8ab26030e058 143
Kojto 98:8ab26030e058 144 /* .stack_dummy section doesn't contains any symbols. It is only
Kojto 98:8ab26030e058 145 * used for linker to calculate size of stack sections, and assign
Kojto 98:8ab26030e058 146 * values to stack symbols later */
Kojto 98:8ab26030e058 147 .stack_dummy :
Kojto 98:8ab26030e058 148 {
Kojto 98:8ab26030e058 149 *(.stack)
Kojto 98:8ab26030e058 150 } > RAM
Kojto 98:8ab26030e058 151
Kojto 98:8ab26030e058 152 /* Set stack top to end of RAM, and stack limit move down by
Kojto 98:8ab26030e058 153 * size of stack_dummy section */
Kojto 98:8ab26030e058 154 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
Kojto 98:8ab26030e058 155 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
Kojto 98:8ab26030e058 156 PROVIDE(__stack = __StackTop);
Kojto 98:8ab26030e058 157
Kojto 98:8ab26030e058 158 /* Check if data + heap + stack exceeds RAM limit */
Kojto 98:8ab26030e058 159 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
Kojto 98:8ab26030e058 160 }