mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Mon Jul 20 09:00:09 2015 +0100
Revision:
593:78ee8643776a
Parent:
525:c320967f86b9
Synchronized with git revision a68b724d07788e6389ea4d52c622aad767953758

Full URL: https://github.com/mbedmicro/mbed/commit/a68b724d07788e6389ea4d52c622aad767953758/

[Silicon Labs] Bring EFM32 HAL up to date

Who changed what in which revision?

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