cc y / mbed

Fork of mbed by mbed official

Committer:
<>
Date:
Thu Oct 27 16:45:56 2016 +0100
Revision:
128:9bcdf88f62b0
Parent:
113:f141b2784e32
Release 128 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

2966: Add kw24 support https://github.com/ARMmbed/mbed-os/pull/2966
3068: MultiTech mDot - clean up PeripheralPins.c and add new pin names https://github.com/ARMmbed/mbed-os/pull/3068
3089: Kinetis HAL: Remove clock initialization code from serial and ticker https://github.com/ARMmbed/mbed-os/pull/3089
2943: [NRF5] NVIC_SetVector functionality https://github.com/ARMmbed/mbed-os/pull/2943
2938: InterruptIn changes in NCS36510 HAL. https://github.com/ARMmbed/mbed-os/pull/2938
3108: Fix sleep function for NRF52. https://github.com/ARMmbed/mbed-os/pull/3108
3076: STM32F1: Correct timer master value reading https://github.com/ARMmbed/mbed-os/pull/3076
3085: Add LOWPOWERTIMER capability for NUCLEO_F303ZE https://github.com/ARMmbed/mbed-os/pull/3085
3046: [BEETLE] Update BLE stack on Beetle board https://github.com/ARMmbed/mbed-os/pull/3046
3122: [Silicon Labs] Update of Silicon Labs HAL https://github.com/ARMmbed/mbed-os/pull/3122
3022: OnSemi RAM usage fix https://github.com/ARMmbed/mbed-os/pull/3022
3121: STM32F3: Correct UART4 and UART5 defines when using DEVICE_SERIAL_ASYNCH https://github.com/ARMmbed/mbed-os/pull/3121
3142: Targets- NUMAKER_PFM_NUC47216 remove mbed 2 https://github.com/ARMmbed/mbed-os/pull/3142

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 98:8ab26030e058 1 /* Linker script for Silicon Labs EFM32GG 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 113:f141b2784e32 7 /* Silicon Laboratories, Inc. 2015 */
Kojto 113:f141b2784e32 8 /* */
Kojto 113:f141b2784e32 9 /* Version 4.2.0 */
Kojto 113:f141b2784e32 10 /* */
Kojto 113:f141b2784e32 11
<> 128:9bcdf88f62b0 12 STACK_SIZE = 0x400;
<> 128:9bcdf88f62b0 13 HEAP_SIZE = 0xC00;
<> 128:9bcdf88f62b0 14
Kojto 98:8ab26030e058 15 MEMORY
Kojto 98:8ab26030e058 16 {
Kojto 98:8ab26030e058 17 FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 1048576
Kojto 98:8ab26030e058 18 RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 131072
Kojto 98:8ab26030e058 19 }
Kojto 98:8ab26030e058 20 /* MBED: mbed needs to be able to dynamically set the interrupt vector table.
Kojto 98:8ab26030e058 21 * We make room for the table at the very beginning of RAM, i.e. at
Kojto 98:8ab26030e058 22 * 0x20000000. We need (16+39) * sizeof(uint32_t) = 220 bytes for EFM32GG */
Kojto 113:f141b2784e32 23 __vector_size = 0xDC;
Kojto 98:8ab26030e058 24
Kojto 98:8ab26030e058 25 /* Linker script to place sections and symbol values. Should be used together
Kojto 98:8ab26030e058 26 * with other linker script that defines memory regions FLASH and RAM.
Kojto 98:8ab26030e058 27 * It references following symbols, which must be defined in code:
Kojto 98:8ab26030e058 28 * Reset_Handler : Entry of reset handler
Kojto 113:f141b2784e32 29 *
Kojto 98:8ab26030e058 30 * It defines following symbols, which code can use without definition:
Kojto 98:8ab26030e058 31 * __exidx_start
Kojto 98:8ab26030e058 32 * __exidx_end
Kojto 113:f141b2784e32 33 * __copy_table_start__
Kojto 113:f141b2784e32 34 * __copy_table_end__
Kojto 113:f141b2784e32 35 * __zero_table_start__
Kojto 113:f141b2784e32 36 * __zero_table_end__
Kojto 98:8ab26030e058 37 * __etext
Kojto 98:8ab26030e058 38 * __data_start__
Kojto 98:8ab26030e058 39 * __preinit_array_start
Kojto 98:8ab26030e058 40 * __preinit_array_end
Kojto 98:8ab26030e058 41 * __init_array_start
Kojto 98:8ab26030e058 42 * __init_array_end
Kojto 98:8ab26030e058 43 * __fini_array_start
Kojto 98:8ab26030e058 44 * __fini_array_end
Kojto 98:8ab26030e058 45 * __data_end__
Kojto 98:8ab26030e058 46 * __bss_start__
Kojto 98:8ab26030e058 47 * __bss_end__
Kojto 98:8ab26030e058 48 * __end__
Kojto 98:8ab26030e058 49 * end
Kojto 98:8ab26030e058 50 * __HeapLimit
Kojto 98:8ab26030e058 51 * __StackLimit
Kojto 98:8ab26030e058 52 * __StackTop
Kojto 98:8ab26030e058 53 * __stack
Kojto 113:f141b2784e32 54 * __Vectors_End
Kojto 113:f141b2784e32 55 * __Vectors_Size
Kojto 98:8ab26030e058 56 */
Kojto 98:8ab26030e058 57 ENTRY(Reset_Handler)
Kojto 98:8ab26030e058 58
<> 128:9bcdf88f62b0 59 /* Note: The uVisor expects the text section at a fixed location, as specified
<> 128:9bcdf88f62b0 60 by the porting process configuration parameter: FLASH_OFFSET. */
<> 128:9bcdf88f62b0 61 __UVISOR_TEXT_OFFSET = 0x100;
<> 128:9bcdf88f62b0 62 __UVISOR_TEXT_START = ORIGIN(FLASH) + __UVISOR_TEXT_OFFSET;
<> 128:9bcdf88f62b0 63
Kojto 98:8ab26030e058 64 SECTIONS
Kojto 98:8ab26030e058 65 {
Kojto 98:8ab26030e058 66 .text :
Kojto 98:8ab26030e058 67 {
Kojto 113:f141b2784e32 68 KEEP(*(.vectors))
Kojto 113:f141b2784e32 69 __Vectors_End = .;
Kojto 113:f141b2784e32 70 __Vectors_Size = __Vectors_End - __Vectors;
Kojto 113:f141b2784e32 71 __end__ = .;
Kojto 113:f141b2784e32 72
<> 128:9bcdf88f62b0 73 /* uVisor code and data */
<> 128:9bcdf88f62b0 74 . = __UVISOR_TEXT_OFFSET;
<> 128:9bcdf88f62b0 75 . = ALIGN(4);
<> 128:9bcdf88f62b0 76 __uvisor_main_start = .;
<> 128:9bcdf88f62b0 77 *(.uvisor.main)
<> 128:9bcdf88f62b0 78 __uvisor_main_end = .;
<> 128:9bcdf88f62b0 79
Kojto 98:8ab26030e058 80 *(.text*)
Kojto 98:8ab26030e058 81
Kojto 98:8ab26030e058 82 KEEP(*(.init))
Kojto 98:8ab26030e058 83 KEEP(*(.fini))
Kojto 98:8ab26030e058 84
Kojto 98:8ab26030e058 85 /* .ctors */
Kojto 98:8ab26030e058 86 *crtbegin.o(.ctors)
Kojto 98:8ab26030e058 87 *crtbegin?.o(.ctors)
Kojto 98:8ab26030e058 88 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
Kojto 98:8ab26030e058 89 *(SORT(.ctors.*))
Kojto 98:8ab26030e058 90 *(.ctors)
Kojto 98:8ab26030e058 91
Kojto 98:8ab26030e058 92 /* .dtors */
Kojto 98:8ab26030e058 93 *crtbegin.o(.dtors)
Kojto 98:8ab26030e058 94 *crtbegin?.o(.dtors)
Kojto 98:8ab26030e058 95 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
Kojto 98:8ab26030e058 96 *(SORT(.dtors.*))
Kojto 98:8ab26030e058 97 *(.dtors)
Kojto 98:8ab26030e058 98
Kojto 98:8ab26030e058 99 *(.rodata*)
Kojto 98:8ab26030e058 100
Kojto 98:8ab26030e058 101 KEEP(*(.eh_frame*))
Kojto 98:8ab26030e058 102 } > FLASH
Kojto 98:8ab26030e058 103
Kojto 113:f141b2784e32 104 .ARM.extab :
Kojto 98:8ab26030e058 105 {
Kojto 98:8ab26030e058 106 *(.ARM.extab* .gnu.linkonce.armextab.*)
Kojto 98:8ab26030e058 107 } > FLASH
Kojto 98:8ab26030e058 108
Kojto 98:8ab26030e058 109 __exidx_start = .;
Kojto 98:8ab26030e058 110 .ARM.exidx :
Kojto 98:8ab26030e058 111 {
Kojto 98:8ab26030e058 112 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
Kojto 98:8ab26030e058 113 } > FLASH
Kojto 98:8ab26030e058 114 __exidx_end = .;
Kojto 98:8ab26030e058 115
Kojto 113:f141b2784e32 116 /* To copy multiple ROM to RAM sections,
Kojto 113:f141b2784e32 117 * uncomment .copy.table section and,
Kojto 113:f141b2784e32 118 * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */
Kojto 113:f141b2784e32 119 /*
Kojto 113:f141b2784e32 120 .copy.table :
Kojto 113:f141b2784e32 121 {
Kojto 113:f141b2784e32 122 . = ALIGN(4);
Kojto 113:f141b2784e32 123 __copy_table_start__ = .;
Kojto 113:f141b2784e32 124 LONG (__etext)
Kojto 113:f141b2784e32 125 LONG (__data_start__)
Kojto 113:f141b2784e32 126 LONG (__data_end__ - __data_start__)
Kojto 113:f141b2784e32 127 LONG (__etext2)
Kojto 113:f141b2784e32 128 LONG (__data2_start__)
Kojto 113:f141b2784e32 129 LONG (__data2_end__ - __data2_start__)
Kojto 113:f141b2784e32 130 __copy_table_end__ = .;
Kojto 113:f141b2784e32 131 } > FLASH
Kojto 113:f141b2784e32 132 */
Kojto 113:f141b2784e32 133
Kojto 113:f141b2784e32 134 /* To clear multiple BSS sections,
Kojto 113:f141b2784e32 135 * uncomment .zero.table section and,
Kojto 113:f141b2784e32 136 * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */
Kojto 113:f141b2784e32 137 /*
Kojto 113:f141b2784e32 138 .zero.table :
Kojto 113:f141b2784e32 139 {
Kojto 113:f141b2784e32 140 . = ALIGN(4);
Kojto 113:f141b2784e32 141 __zero_table_start__ = .;
Kojto 113:f141b2784e32 142 LONG (__bss_start__)
Kojto 113:f141b2784e32 143 LONG (__bss_end__ - __bss_start__)
Kojto 113:f141b2784e32 144 LONG (__bss2_start__)
Kojto 113:f141b2784e32 145 LONG (__bss2_end__ - __bss2_start__)
Kojto 113:f141b2784e32 146 __zero_table_end__ = .;
Kojto 113:f141b2784e32 147 } > FLASH
Kojto 113:f141b2784e32 148 */
Kojto 113:f141b2784e32 149
<> 128:9bcdf88f62b0 150 /* Ensure that the uVisor BSS section is put first in SRAM. */
<> 128:9bcdf88f62b0 151 /* Note: The uVisor expects this section at a fixed location, as specified
<> 128:9bcdf88f62b0 152 by the porting process configuration parameter: SRAM_OFFSET. */
<> 128:9bcdf88f62b0 153 __UVISOR_SRAM_OFFSET = 0x0;
<> 128:9bcdf88f62b0 154 __UVISOR_BSS_START = ORIGIN(RAM) + __UVISOR_SRAM_OFFSET;
<> 128:9bcdf88f62b0 155 .uvisor.bss __UVISOR_BSS_START (NOLOAD):
<> 128:9bcdf88f62b0 156 {
<> 128:9bcdf88f62b0 157 . = ALIGN(32);
<> 128:9bcdf88f62b0 158 __uvisor_bss_start = .;
<> 128:9bcdf88f62b0 159
<> 128:9bcdf88f62b0 160 /* uVisor main BSS section */
<> 128:9bcdf88f62b0 161 . = ALIGN(32);
<> 128:9bcdf88f62b0 162 __uvisor_bss_main_start = .;
<> 128:9bcdf88f62b0 163 KEEP(*(.keep.uvisor.bss.main))
<> 128:9bcdf88f62b0 164 . = ALIGN(32);
<> 128:9bcdf88f62b0 165 __uvisor_bss_main_end = .;
Kojto 113:f141b2784e32 166
<> 128:9bcdf88f62b0 167 /* Secure boxes BSS section */
<> 128:9bcdf88f62b0 168 . = ALIGN(32);
<> 128:9bcdf88f62b0 169 __uvisor_bss_boxes_start = .;
<> 128:9bcdf88f62b0 170 KEEP(*(.keep.uvisor.bss.boxes))
<> 128:9bcdf88f62b0 171 . = ALIGN(32);
<> 128:9bcdf88f62b0 172 __uvisor_bss_boxes_end = .;
<> 128:9bcdf88f62b0 173
<> 128:9bcdf88f62b0 174 . = ALIGN(32);
<> 128:9bcdf88f62b0 175 __uvisor_bss_end = .;
<> 128:9bcdf88f62b0 176 } > RAM
<> 128:9bcdf88f62b0 177
<> 128:9bcdf88f62b0 178 /* Heap space for the page allocator */
<> 128:9bcdf88f62b0 179 .page_heap (NOLOAD) :
Kojto 98:8ab26030e058 180 {
<> 128:9bcdf88f62b0 181 . = ALIGN(32);
<> 128:9bcdf88f62b0 182 __uvisor_page_start = .;
<> 128:9bcdf88f62b0 183 KEEP(*(.keep.uvisor.page_heap))
<> 128:9bcdf88f62b0 184
<> 128:9bcdf88f62b0 185 . = ALIGN( (1 << LOG2CEIL(LENGTH(RAM))) / 8);
<> 128:9bcdf88f62b0 186
<> 128:9bcdf88f62b0 187 __uvisor_page_end = .;
<> 128:9bcdf88f62b0 188 } > RAM
<> 128:9bcdf88f62b0 189
<> 128:9bcdf88f62b0 190 .data :
<> 128:9bcdf88f62b0 191 {
<> 128:9bcdf88f62b0 192 PROVIDE(__etext = LOADADDR(.data)); /* Define a global symbol at end of code, */
<> 128:9bcdf88f62b0 193 PROVIDE(__DATA_ROM = LOADADDR(.data)); /* Symbol is used by startup for data initialization. */
<> 128:9bcdf88f62b0 194
Kojto 98:8ab26030e058 195 __data_start__ = .;
Kojto 98:8ab26030e058 196 *("dma")
Kojto 98:8ab26030e058 197 PROVIDE( __start_vector_table__ = .);
Kojto 113:f141b2784e32 198 . += __vector_size;
Kojto 113:f141b2784e32 199 PROVIDE( __end_vector_table__ = .);
Kojto 98:8ab26030e058 200 *(vtable)
Kojto 98:8ab26030e058 201 *(.data*)
Kojto 98:8ab26030e058 202 . = ALIGN (4);
Kojto 98:8ab26030e058 203 *(.ram)
Kojto 98:8ab26030e058 204
Kojto 98:8ab26030e058 205 . = ALIGN(4);
Kojto 98:8ab26030e058 206 /* preinit data */
Kojto 98:8ab26030e058 207 PROVIDE_HIDDEN (__preinit_array_start = .);
Kojto 98:8ab26030e058 208 KEEP(*(.preinit_array))
Kojto 98:8ab26030e058 209 PROVIDE_HIDDEN (__preinit_array_end = .);
Kojto 98:8ab26030e058 210
Kojto 98:8ab26030e058 211 . = ALIGN(4);
Kojto 98:8ab26030e058 212 /* init data */
Kojto 98:8ab26030e058 213 PROVIDE_HIDDEN (__init_array_start = .);
Kojto 98:8ab26030e058 214 KEEP(*(SORT(.init_array.*)))
Kojto 98:8ab26030e058 215 KEEP(*(.init_array))
Kojto 98:8ab26030e058 216 PROVIDE_HIDDEN (__init_array_end = .);
Kojto 98:8ab26030e058 217
Kojto 98:8ab26030e058 218 . = ALIGN(4);
Kojto 98:8ab26030e058 219 /* finit data */
Kojto 98:8ab26030e058 220 PROVIDE_HIDDEN (__fini_array_start = .);
Kojto 98:8ab26030e058 221 KEEP(*(SORT(.fini_array.*)))
Kojto 98:8ab26030e058 222 KEEP(*(.fini_array))
Kojto 98:8ab26030e058 223 PROVIDE_HIDDEN (__fini_array_end = .);
Kojto 98:8ab26030e058 224
Kojto 113:f141b2784e32 225 KEEP(*(.jcr*))
Kojto 98:8ab26030e058 226 . = ALIGN(4);
Kojto 98:8ab26030e058 227 /* All data end */
Kojto 98:8ab26030e058 228 __data_end__ = .;
Kojto 98:8ab26030e058 229
<> 128:9bcdf88f62b0 230 } > RAM AT > FLASH
<> 128:9bcdf88f62b0 231
<> 128:9bcdf88f62b0 232 /* uVisor configuration section
<> 128:9bcdf88f62b0 233 * This section must be located after all other flash regions. */
<> 128:9bcdf88f62b0 234 .uvisor.secure :
<> 128:9bcdf88f62b0 235 {
<> 128:9bcdf88f62b0 236 . = ALIGN(32);
<> 128:9bcdf88f62b0 237 __uvisor_secure_start = .;
<> 128:9bcdf88f62b0 238
<> 128:9bcdf88f62b0 239 /* uVisor secure boxes configuration tables */
<> 128:9bcdf88f62b0 240 . = ALIGN(32);
<> 128:9bcdf88f62b0 241 __uvisor_cfgtbl_start = .;
<> 128:9bcdf88f62b0 242 KEEP(*(.keep.uvisor.cfgtbl))
<> 128:9bcdf88f62b0 243 . = ALIGN(32);
<> 128:9bcdf88f62b0 244 __uvisor_cfgtbl_end = .;
<> 128:9bcdf88f62b0 245
<> 128:9bcdf88f62b0 246 /* Pointers to the uVisor secure boxes configuration tables */
<> 128:9bcdf88f62b0 247 /* Note: Do not add any further alignment here, as uVisor will need to
<> 128:9bcdf88f62b0 248 have access to the exact list of pointers. */
<> 128:9bcdf88f62b0 249 __uvisor_cfgtbl_ptr_start = .;
<> 128:9bcdf88f62b0 250 KEEP(*(.keep.uvisor.cfgtbl_ptr_first))
<> 128:9bcdf88f62b0 251 KEEP(*(.keep.uvisor.cfgtbl_ptr))
<> 128:9bcdf88f62b0 252 __uvisor_cfgtbl_ptr_end = .;
<> 128:9bcdf88f62b0 253
<> 128:9bcdf88f62b0 254 /* Pointers to all boxes register gateways. These are grouped here to
<> 128:9bcdf88f62b0 255 allow discoverability and firmware verification. */
<> 128:9bcdf88f62b0 256 __uvisor_register_gateway_ptr_start = .;
<> 128:9bcdf88f62b0 257 KEEP(*(.keep.uvisor.register_gateway_ptr))
<> 128:9bcdf88f62b0 258 __uvisor_register_gateway_ptr_end = .;
<> 128:9bcdf88f62b0 259
<> 128:9bcdf88f62b0 260 . = ALIGN(32);
<> 128:9bcdf88f62b0 261 __uvisor_secure_end = .;
<> 128:9bcdf88f62b0 262 } > FLASH
<> 128:9bcdf88f62b0 263
<> 128:9bcdf88f62b0 264 /* Uninitialized data section
<> 128:9bcdf88f62b0 265 * This region is not initialized by the C/C++ library and can be used to
<> 128:9bcdf88f62b0 266 * store state across soft reboots. */
<> 128:9bcdf88f62b0 267 .uninitialized (NOLOAD):
<> 128:9bcdf88f62b0 268 {
<> 128:9bcdf88f62b0 269 . = ALIGN(32);
<> 128:9bcdf88f62b0 270 __uninitialized_start = .;
<> 128:9bcdf88f62b0 271 *(.uninitialized)
<> 128:9bcdf88f62b0 272 KEEP(*(.keep.uninitialized))
<> 128:9bcdf88f62b0 273 . = ALIGN(32);
<> 128:9bcdf88f62b0 274 __uninitialized_end = .;
Kojto 98:8ab26030e058 275 } > RAM
Kojto 98:8ab26030e058 276
Kojto 98:8ab26030e058 277 .bss :
Kojto 98:8ab26030e058 278 {
Kojto 113:f141b2784e32 279 . = ALIGN(4);
Kojto 98:8ab26030e058 280 __bss_start__ = .;
Kojto 98:8ab26030e058 281 *(.bss*)
Kojto 98:8ab26030e058 282 *(COMMON)
Kojto 113:f141b2784e32 283 . = ALIGN(4);
Kojto 98:8ab26030e058 284 __bss_end__ = .;
Kojto 98:8ab26030e058 285 } > RAM
Kojto 98:8ab26030e058 286
<> 128:9bcdf88f62b0 287 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
<> 128:9bcdf88f62b0 288 __stack = __StackTop;
<> 128:9bcdf88f62b0 289 __StackLimit = __StackTop - STACK_SIZE;
<> 128:9bcdf88f62b0 290
<> 128:9bcdf88f62b0 291 .heap (NOLOAD):
Kojto 98:8ab26030e058 292 {
<> 128:9bcdf88f62b0 293 __uvisor_heap_start = .;
Kojto 113:f141b2784e32 294 __HeapBase = .;
Kojto 98:8ab26030e058 295 __end__ = .;
Kojto 98:8ab26030e058 296 end = __end__;
Kojto 98:8ab26030e058 297 _end = __end__;
<> 128:9bcdf88f62b0 298 . += HEAP_SIZE;
Kojto 98:8ab26030e058 299 } > RAM
Kojto 98:8ab26030e058 300
<> 128:9bcdf88f62b0 301 __HeapLimit = __StackLimit;
<> 128:9bcdf88f62b0 302 __uvisor_heap_end = __StackLimit;
Kojto 98:8ab26030e058 303
<> 128:9bcdf88f62b0 304 /* Provide physical memory boundaries for uVisor. */
<> 128:9bcdf88f62b0 305 __uvisor_flash_start = ORIGIN(FLASH);
<> 128:9bcdf88f62b0 306 __uvisor_flash_end = ORIGIN(FLASH) + LENGTH(FLASH);
<> 128:9bcdf88f62b0 307 __uvisor_sram_start = ORIGIN(RAM);
<> 128:9bcdf88f62b0 308 __uvisor_sram_end = ORIGIN(RAM) + LENGTH(RAM);
Kojto 113:f141b2784e32 309
<> 128:9bcdf88f62b0 310 /* Check if FLASH usage exceeds FLASH size. */
<> 128:9bcdf88f62b0 311 ASSERT(LENGTH(FLASH) >= __uvisor_secure_end, "FLASH memory overflowed!")
Kojto 98:8ab26030e058 312 }