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:
Tue Apr 28 11:45:12 2015 +0100
Revision:
525:c320967f86b9
Synchronized with git revision 299385b8331142b9dc524da7a986536f60b14553

Full URL: https://github.com/mbedmicro/mbed/commit/299385b8331142b9dc524da7a986536f60b14553/

Add in Silicon Labs targets with asynchronous API support

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 525:c320967f86b9 1 /* @file startup_efm32gg.S
mbed_official 525:c320967f86b9 2 * @brief startup file for Silicon Labs EFM32GG devices.
mbed_official 525:c320967f86b9 3 * For use with GCC for ARM Embedded Processors
mbed_official 525:c320967f86b9 4 * @version 3.20.6
mbed_official 525:c320967f86b9 5 * Date: 08 Feb 2012
mbed_official 525:c320967f86b9 6 *
mbed_official 525:c320967f86b9 7 * Copyright (c) 2012, ARM Limited
mbed_official 525:c320967f86b9 8 * All rights reserved.
mbed_official 525:c320967f86b9 9 *
mbed_official 525:c320967f86b9 10 * Redistribution and use in source and binary forms, with or without
mbed_official 525:c320967f86b9 11 * modification, are permitted provided that the following conditions are met:
mbed_official 525:c320967f86b9 12 * Redistributions of source code must retain the above copyright
mbed_official 525:c320967f86b9 13 notice, this list of conditions and the following disclaimer.
mbed_official 525:c320967f86b9 14 * Redistributions in binary form must reproduce the above copyright
mbed_official 525:c320967f86b9 15 notice, this list of conditions and the following disclaimer in the
mbed_official 525:c320967f86b9 16 documentation and/or other materials provided with the distribution.
mbed_official 525:c320967f86b9 17 * Neither the name of the ARM Limited nor the
mbed_official 525:c320967f86b9 18 names of its contributors may be used to endorse or promote products
mbed_official 525:c320967f86b9 19 derived from this software without specific prior written permission.
mbed_official 525:c320967f86b9 20 *
mbed_official 525:c320967f86b9 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
mbed_official 525:c320967f86b9 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
mbed_official 525:c320967f86b9 23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 525:c320967f86b9 24 * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED BE LIABLE FOR ANY
mbed_official 525:c320967f86b9 25 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
mbed_official 525:c320967f86b9 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
mbed_official 525:c320967f86b9 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
mbed_official 525:c320967f86b9 28 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mbed_official 525:c320967f86b9 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
mbed_official 525:c320967f86b9 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 525:c320967f86b9 31 */
mbed_official 525:c320967f86b9 32 .syntax unified
mbed_official 525:c320967f86b9 33 .arch armv7-m
mbed_official 525:c320967f86b9 34
mbed_official 525:c320967f86b9 35 .section .stack
mbed_official 525:c320967f86b9 36 .align 3
mbed_official 525:c320967f86b9 37 #ifdef __STACK_SIZE
mbed_official 525:c320967f86b9 38 .equ Stack_Size, __STACK_SIZE
mbed_official 525:c320967f86b9 39 #else
mbed_official 525:c320967f86b9 40 .equ Stack_Size, 0x400
mbed_official 525:c320967f86b9 41 #endif
mbed_official 525:c320967f86b9 42 .globl __StackTop
mbed_official 525:c320967f86b9 43 .globl __StackLimit
mbed_official 525:c320967f86b9 44 __StackLimit:
mbed_official 525:c320967f86b9 45 .space Stack_Size
mbed_official 525:c320967f86b9 46 .size __StackLimit, . - __StackLimit
mbed_official 525:c320967f86b9 47 __StackTop:
mbed_official 525:c320967f86b9 48 .size __StackTop, . - __StackTop
mbed_official 525:c320967f86b9 49
mbed_official 525:c320967f86b9 50 .section .heap
mbed_official 525:c320967f86b9 51 .align 3
mbed_official 525:c320967f86b9 52 #ifdef __HEAP_SIZE
mbed_official 525:c320967f86b9 53 .equ Heap_Size, __HEAP_SIZE
mbed_official 525:c320967f86b9 54 #else
mbed_official 525:c320967f86b9 55 .equ Heap_Size, 0xC00
mbed_official 525:c320967f86b9 56 #endif
mbed_official 525:c320967f86b9 57 .globl __HeapBase
mbed_official 525:c320967f86b9 58 .globl __HeapLimit
mbed_official 525:c320967f86b9 59 __HeapBase:
mbed_official 525:c320967f86b9 60 .if Heap_Size
mbed_official 525:c320967f86b9 61 .space Heap_Size
mbed_official 525:c320967f86b9 62 .endif
mbed_official 525:c320967f86b9 63 .size __HeapBase, . - __HeapBase
mbed_official 525:c320967f86b9 64 __HeapLimit:
mbed_official 525:c320967f86b9 65 .size __HeapLimit, . - __HeapLimit
mbed_official 525:c320967f86b9 66
mbed_official 525:c320967f86b9 67 .section .isr_vector
mbed_official 525:c320967f86b9 68 .align 8
mbed_official 525:c320967f86b9 69 .globl __isr_vector
mbed_official 525:c320967f86b9 70 __isr_vector:
mbed_official 525:c320967f86b9 71 .long __StackTop /* Top of Stack */
mbed_official 525:c320967f86b9 72 .long Reset_Handler /* Reset Handler */
mbed_official 525:c320967f86b9 73 .long NMI_Handler /* NMI Handler */
mbed_official 525:c320967f86b9 74 .long HardFault_Handler /* Hard Fault Handler */
mbed_official 525:c320967f86b9 75 .long MemManage_Handler /* MPU Fault Handler */
mbed_official 525:c320967f86b9 76 .long BusFault_Handler /* Bus Fault Handler */
mbed_official 525:c320967f86b9 77 .long UsageFault_Handler /* Usage Fault Handler */
mbed_official 525:c320967f86b9 78 .long Default_Handler /* Reserved */
mbed_official 525:c320967f86b9 79 .long Default_Handler /* Reserved */
mbed_official 525:c320967f86b9 80 .long Default_Handler /* Reserved */
mbed_official 525:c320967f86b9 81 .long Default_Handler /* Reserved */
mbed_official 525:c320967f86b9 82 .long SVC_Handler /* SVCall Handler */
mbed_official 525:c320967f86b9 83 .long DebugMon_Handler /* Debug Monitor Handler */
mbed_official 525:c320967f86b9 84 .long Default_Handler /* Reserved */
mbed_official 525:c320967f86b9 85 .long PendSV_Handler /* PendSV Handler */
mbed_official 525:c320967f86b9 86 .long SysTick_Handler /* SysTick Handler */
mbed_official 525:c320967f86b9 87
mbed_official 525:c320967f86b9 88 /* External interrupts */
mbed_official 525:c320967f86b9 89 .long DMA_IRQHandler /* 0 - DMA */
mbed_official 525:c320967f86b9 90 .long GPIO_EVEN_IRQHandler /* 1 - GPIO_EVEN */
mbed_official 525:c320967f86b9 91 .long TIMER0_IRQHandler /* 2 - TIMER0 */
mbed_official 525:c320967f86b9 92 .long USART0_RX_IRQHandler /* 3 - USART0_RX */
mbed_official 525:c320967f86b9 93 .long USART0_TX_IRQHandler /* 4 - USART0_TX */
mbed_official 525:c320967f86b9 94 .long USB_IRQHandler /* 5 - USB */
mbed_official 525:c320967f86b9 95 .long ACMP0_IRQHandler /* 6 - ACMP0 */
mbed_official 525:c320967f86b9 96 .long ADC0_IRQHandler /* 7 - ADC0 */
mbed_official 525:c320967f86b9 97 .long DAC0_IRQHandler /* 8 - DAC0 */
mbed_official 525:c320967f86b9 98 .long I2C0_IRQHandler /* 9 - I2C0 */
mbed_official 525:c320967f86b9 99 .long I2C1_IRQHandler /* 10 - I2C1 */
mbed_official 525:c320967f86b9 100 .long GPIO_ODD_IRQHandler /* 11 - GPIO_ODD */
mbed_official 525:c320967f86b9 101 .long TIMER1_IRQHandler /* 12 - TIMER1 */
mbed_official 525:c320967f86b9 102 .long TIMER2_IRQHandler /* 13 - TIMER2 */
mbed_official 525:c320967f86b9 103 .long TIMER3_IRQHandler /* 14 - TIMER3 */
mbed_official 525:c320967f86b9 104 .long USART1_RX_IRQHandler /* 15 - USART1_RX */
mbed_official 525:c320967f86b9 105 .long USART1_TX_IRQHandler /* 16 - USART1_TX */
mbed_official 525:c320967f86b9 106 .long LESENSE_IRQHandler /* 17 - LESENSE */
mbed_official 525:c320967f86b9 107 .long USART2_RX_IRQHandler /* 18 - USART2_RX */
mbed_official 525:c320967f86b9 108 .long USART2_TX_IRQHandler /* 19 - USART2_TX */
mbed_official 525:c320967f86b9 109 .long UART0_RX_IRQHandler /* 20 - UART0_RX */
mbed_official 525:c320967f86b9 110 .long UART0_TX_IRQHandler /* 21 - UART0_TX */
mbed_official 525:c320967f86b9 111 .long UART1_RX_IRQHandler /* 22 - UART1_RX */
mbed_official 525:c320967f86b9 112 .long UART1_TX_IRQHandler /* 23 - UART1_TX */
mbed_official 525:c320967f86b9 113 .long LEUART0_IRQHandler /* 24 - LEUART0 */
mbed_official 525:c320967f86b9 114 .long LEUART1_IRQHandler /* 25 - LEUART1 */
mbed_official 525:c320967f86b9 115 .long LETIMER0_IRQHandler /* 26 - LETIMER0 */
mbed_official 525:c320967f86b9 116 .long PCNT0_IRQHandler /* 27 - PCNT0 */
mbed_official 525:c320967f86b9 117 .long PCNT1_IRQHandler /* 28 - PCNT1 */
mbed_official 525:c320967f86b9 118 .long PCNT2_IRQHandler /* 29 - PCNT2 */
mbed_official 525:c320967f86b9 119 .long RTC_IRQHandler /* 30 - RTC */
mbed_official 525:c320967f86b9 120 .long BURTC_IRQHandler /* 31 - BURTC */
mbed_official 525:c320967f86b9 121 .long CMU_IRQHandler /* 32 - CMU */
mbed_official 525:c320967f86b9 122 .long VCMP_IRQHandler /* 33 - VCMP */
mbed_official 525:c320967f86b9 123 .long LCD_IRQHandler /* 34 - LCD */
mbed_official 525:c320967f86b9 124 .long MSC_IRQHandler /* 35 - MSC */
mbed_official 525:c320967f86b9 125 .long AES_IRQHandler /* 36 - AES */
mbed_official 525:c320967f86b9 126 .long EBI_IRQHandler /* 37 - EBI */
mbed_official 525:c320967f86b9 127 .long EMU_IRQHandler /* 38 - EMU */
mbed_official 525:c320967f86b9 128
mbed_official 525:c320967f86b9 129
mbed_official 525:c320967f86b9 130 .size __isr_vector, . - __isr_vector
mbed_official 525:c320967f86b9 131
mbed_official 525:c320967f86b9 132 .text
mbed_official 525:c320967f86b9 133 .thumb
mbed_official 525:c320967f86b9 134 .thumb_func
mbed_official 525:c320967f86b9 135 .align 2
mbed_official 525:c320967f86b9 136 .globl Reset_Handler
mbed_official 525:c320967f86b9 137 .type Reset_Handler, %function
mbed_official 525:c320967f86b9 138 Reset_Handler:
mbed_official 525:c320967f86b9 139 /* Loop to copy data from read only memory to RAM. The ranges
mbed_official 525:c320967f86b9 140 * of copy from/to are specified by following symbols evaluated in
mbed_official 525:c320967f86b9 141 * linker script.
mbed_official 525:c320967f86b9 142 * __etext: End of code section, i.e., begin of data sections to copy from.
mbed_official 525:c320967f86b9 143 * __data_start__/__data_end__: RAM address range that data should be
mbed_official 525:c320967f86b9 144 * copied to. Both must be aligned to 4 bytes boundary. */
mbed_official 525:c320967f86b9 145 #ifndef __NO_SYSTEM_INIT
mbed_official 525:c320967f86b9 146 ldr r0, =SystemInit
mbed_official 525:c320967f86b9 147 blx r0
mbed_official 525:c320967f86b9 148 #endif
mbed_official 525:c320967f86b9 149 ldr r1, =__etext
mbed_official 525:c320967f86b9 150 ldr r2, =__data_start__
mbed_official 525:c320967f86b9 151 ldr r3, =__data_end__
mbed_official 525:c320967f86b9 152
mbed_official 525:c320967f86b9 153 subs r3, r2
mbed_official 525:c320967f86b9 154 ble .flash_to_ram_loop_end
mbed_official 525:c320967f86b9 155 .flash_to_ram_loop:
mbed_official 525:c320967f86b9 156 subs r3, #4
mbed_official 525:c320967f86b9 157 ldr r0, [r1, r3]
mbed_official 525:c320967f86b9 158 str r0, [r2, r3]
mbed_official 525:c320967f86b9 159 bgt .flash_to_ram_loop
mbed_official 525:c320967f86b9 160 .flash_to_ram_loop_end:
mbed_official 525:c320967f86b9 161
mbed_official 525:c320967f86b9 162 ldr r0, =_start
mbed_official 525:c320967f86b9 163 bx r0
mbed_official 525:c320967f86b9 164 .pool
mbed_official 525:c320967f86b9 165 .size Reset_Handler, . - Reset_Handler
mbed_official 525:c320967f86b9 166
mbed_official 525:c320967f86b9 167 /* Macro to define default handlers. Default handler
mbed_official 525:c320967f86b9 168 * will be weak symbol and just dead loops. They can be
mbed_official 525:c320967f86b9 169 * overwritten by other handlers */
mbed_official 525:c320967f86b9 170 .macro def_irq_handler handler_name
mbed_official 525:c320967f86b9 171 .align 1
mbed_official 525:c320967f86b9 172 .thumb_func
mbed_official 525:c320967f86b9 173 .weak \handler_name
mbed_official 525:c320967f86b9 174 .type \handler_name, %function
mbed_official 525:c320967f86b9 175 \handler_name:
mbed_official 525:c320967f86b9 176 b .
mbed_official 525:c320967f86b9 177 .size \handler_name, . - \handler_name
mbed_official 525:c320967f86b9 178 .endm
mbed_official 525:c320967f86b9 179
mbed_official 525:c320967f86b9 180 def_irq_handler Default_Handler
mbed_official 525:c320967f86b9 181
mbed_official 525:c320967f86b9 182 def_irq_handler NMI_Handler
mbed_official 525:c320967f86b9 183 def_irq_handler HardFault_Handler
mbed_official 525:c320967f86b9 184 def_irq_handler MemManage_Handler
mbed_official 525:c320967f86b9 185 def_irq_handler BusFault_Handler
mbed_official 525:c320967f86b9 186 def_irq_handler UsageFault_Handler
mbed_official 525:c320967f86b9 187 def_irq_handler SVC_Handler
mbed_official 525:c320967f86b9 188 def_irq_handler DebugMon_Handler
mbed_official 525:c320967f86b9 189 def_irq_handler PendSV_Handler
mbed_official 525:c320967f86b9 190 def_irq_handler SysTick_Handler
mbed_official 525:c320967f86b9 191
mbed_official 525:c320967f86b9 192 def_irq_handler DMA_IRQHandler
mbed_official 525:c320967f86b9 193 def_irq_handler GPIO_EVEN_IRQHandler
mbed_official 525:c320967f86b9 194 def_irq_handler TIMER0_IRQHandler
mbed_official 525:c320967f86b9 195 def_irq_handler USART0_RX_IRQHandler
mbed_official 525:c320967f86b9 196 def_irq_handler USART0_TX_IRQHandler
mbed_official 525:c320967f86b9 197 def_irq_handler USB_IRQHandler
mbed_official 525:c320967f86b9 198 def_irq_handler ACMP0_IRQHandler
mbed_official 525:c320967f86b9 199 def_irq_handler ADC0_IRQHandler
mbed_official 525:c320967f86b9 200 def_irq_handler DAC0_IRQHandler
mbed_official 525:c320967f86b9 201 def_irq_handler I2C0_IRQHandler
mbed_official 525:c320967f86b9 202 def_irq_handler I2C1_IRQHandler
mbed_official 525:c320967f86b9 203 def_irq_handler GPIO_ODD_IRQHandler
mbed_official 525:c320967f86b9 204 def_irq_handler TIMER1_IRQHandler
mbed_official 525:c320967f86b9 205 def_irq_handler TIMER2_IRQHandler
mbed_official 525:c320967f86b9 206 def_irq_handler TIMER3_IRQHandler
mbed_official 525:c320967f86b9 207 def_irq_handler USART1_RX_IRQHandler
mbed_official 525:c320967f86b9 208 def_irq_handler USART1_TX_IRQHandler
mbed_official 525:c320967f86b9 209 def_irq_handler LESENSE_IRQHandler
mbed_official 525:c320967f86b9 210 def_irq_handler USART2_RX_IRQHandler
mbed_official 525:c320967f86b9 211 def_irq_handler USART2_TX_IRQHandler
mbed_official 525:c320967f86b9 212 def_irq_handler UART0_RX_IRQHandler
mbed_official 525:c320967f86b9 213 def_irq_handler UART0_TX_IRQHandler
mbed_official 525:c320967f86b9 214 def_irq_handler UART1_RX_IRQHandler
mbed_official 525:c320967f86b9 215 def_irq_handler UART1_TX_IRQHandler
mbed_official 525:c320967f86b9 216 def_irq_handler LEUART0_IRQHandler
mbed_official 525:c320967f86b9 217 def_irq_handler LEUART1_IRQHandler
mbed_official 525:c320967f86b9 218 def_irq_handler LETIMER0_IRQHandler
mbed_official 525:c320967f86b9 219 def_irq_handler PCNT0_IRQHandler
mbed_official 525:c320967f86b9 220 def_irq_handler PCNT1_IRQHandler
mbed_official 525:c320967f86b9 221 def_irq_handler PCNT2_IRQHandler
mbed_official 525:c320967f86b9 222 def_irq_handler RTC_IRQHandler
mbed_official 525:c320967f86b9 223 def_irq_handler BURTC_IRQHandler
mbed_official 525:c320967f86b9 224 def_irq_handler CMU_IRQHandler
mbed_official 525:c320967f86b9 225 def_irq_handler VCMP_IRQHandler
mbed_official 525:c320967f86b9 226 def_irq_handler LCD_IRQHandler
mbed_official 525:c320967f86b9 227 def_irq_handler MSC_IRQHandler
mbed_official 525:c320967f86b9 228 def_irq_handler AES_IRQHandler
mbed_official 525:c320967f86b9 229 def_irq_handler EBI_IRQHandler
mbed_official 525:c320967f86b9 230 def_irq_handler EMU_IRQHandler
mbed_official 525:c320967f86b9 231
mbed_official 525:c320967f86b9 232
mbed_official 525:c320967f86b9 233 .end