Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
targets/cmsis/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32ZG_STK3200/TOOLCHAIN_GCC_ARM/startup_efm32zg.S@535:35ad5cbb2f6a, 2015-05-06 (annotated)
- Committer:
- mbed_official
- Date:
- Wed May 06 14:15:12 2015 +0100
- Revision:
- 535:35ad5cbb2f6a
- Parent:
- 525:c320967f86b9
Synchronized with git revision 53280295abca097d107e8afe7f31871a2b65dc9f
Full URL: https://github.com/mbedmicro/mbed/commit/53280295abca097d107e8afe7f31871a2b65dc9f/
Silicon Labs - Add the no-rtti C++ compilation flag required for linking libmbed.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_official | 525:c320967f86b9 | 1 | /* @file startup_efm32zg.S |
| mbed_official | 525:c320967f86b9 | 2 | * @brief startup file for Silicon Labs EFM32ZG 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 armv6-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 | 535:35ad5cbb2f6a | 40 | .equ Stack_Size, 0x200 |
| 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, 0x0 |
| 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 Default_Handler /* Reserved */ |
| mbed_official | 525:c320967f86b9 | 76 | .long Default_Handler /* Reserved */ |
| mbed_official | 525:c320967f86b9 | 77 | .long Default_Handler /* Reserved */ |
| 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 Default_Handler /* Reserved */ |
| 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 ACMP0_IRQHandler /* 3 - ACMP0 */ |
| mbed_official | 525:c320967f86b9 | 93 | .long ADC0_IRQHandler /* 4 - ADC0 */ |
| mbed_official | 525:c320967f86b9 | 94 | .long I2C0_IRQHandler /* 5 - I2C0 */ |
| mbed_official | 525:c320967f86b9 | 95 | .long GPIO_ODD_IRQHandler /* 6 - GPIO_ODD */ |
| mbed_official | 525:c320967f86b9 | 96 | .long TIMER1_IRQHandler /* 7 - TIMER1 */ |
| mbed_official | 525:c320967f86b9 | 97 | .long USART1_RX_IRQHandler /* 8 - USART1_RX */ |
| mbed_official | 525:c320967f86b9 | 98 | .long USART1_TX_IRQHandler /* 9 - USART1_TX */ |
| mbed_official | 525:c320967f86b9 | 99 | .long LEUART0_IRQHandler /* 10 - LEUART0 */ |
| mbed_official | 525:c320967f86b9 | 100 | .long PCNT0_IRQHandler /* 11 - PCNT0 */ |
| mbed_official | 525:c320967f86b9 | 101 | .long RTC_IRQHandler /* 12 - RTC */ |
| mbed_official | 525:c320967f86b9 | 102 | .long CMU_IRQHandler /* 13 - CMU */ |
| mbed_official | 525:c320967f86b9 | 103 | .long VCMP_IRQHandler /* 14 - VCMP */ |
| mbed_official | 525:c320967f86b9 | 104 | .long MSC_IRQHandler /* 15 - MSC */ |
| mbed_official | 525:c320967f86b9 | 105 | .long AES_IRQHandler /* 16 - AES */ |
| mbed_official | 525:c320967f86b9 | 106 | |
| mbed_official | 525:c320967f86b9 | 107 | |
| mbed_official | 525:c320967f86b9 | 108 | .size __isr_vector, . - __isr_vector |
| mbed_official | 525:c320967f86b9 | 109 | |
| mbed_official | 525:c320967f86b9 | 110 | .text |
| mbed_official | 525:c320967f86b9 | 111 | .thumb |
| mbed_official | 525:c320967f86b9 | 112 | .thumb_func |
| mbed_official | 525:c320967f86b9 | 113 | .align 2 |
| mbed_official | 525:c320967f86b9 | 114 | .globl Reset_Handler |
| mbed_official | 525:c320967f86b9 | 115 | .type Reset_Handler, %function |
| mbed_official | 525:c320967f86b9 | 116 | Reset_Handler: |
| mbed_official | 525:c320967f86b9 | 117 | /* Loop to copy data from read only memory to RAM. The ranges |
| mbed_official | 525:c320967f86b9 | 118 | * of copy from/to are specified by following symbols evaluated in |
| mbed_official | 525:c320967f86b9 | 119 | * linker script. |
| mbed_official | 525:c320967f86b9 | 120 | * __etext: End of code section, i.e., begin of data sections to copy from. |
| mbed_official | 525:c320967f86b9 | 121 | * __data_start__/__data_end__: RAM address range that data should be |
| mbed_official | 525:c320967f86b9 | 122 | * copied to. Both must be aligned to 4 bytes boundary. */ |
| mbed_official | 525:c320967f86b9 | 123 | #ifndef __NO_SYSTEM_INIT |
| mbed_official | 525:c320967f86b9 | 124 | ldr r0, =SystemInit |
| mbed_official | 525:c320967f86b9 | 125 | blx r0 |
| mbed_official | 525:c320967f86b9 | 126 | #endif |
| mbed_official | 525:c320967f86b9 | 127 | ldr r1, =__etext |
| mbed_official | 525:c320967f86b9 | 128 | ldr r2, =__data_start__ |
| mbed_official | 525:c320967f86b9 | 129 | ldr r3, =__data_end__ |
| mbed_official | 525:c320967f86b9 | 130 | |
| mbed_official | 525:c320967f86b9 | 131 | subs r3, r2 |
| mbed_official | 525:c320967f86b9 | 132 | ble .flash_to_ram_loop_end |
| mbed_official | 525:c320967f86b9 | 133 | .flash_to_ram_loop: |
| mbed_official | 525:c320967f86b9 | 134 | subs r3, #4 |
| mbed_official | 525:c320967f86b9 | 135 | ldr r0, [r1, r3] |
| mbed_official | 525:c320967f86b9 | 136 | str r0, [r2, r3] |
| mbed_official | 525:c320967f86b9 | 137 | bgt .flash_to_ram_loop |
| mbed_official | 525:c320967f86b9 | 138 | .flash_to_ram_loop_end: |
| mbed_official | 525:c320967f86b9 | 139 | |
| mbed_official | 525:c320967f86b9 | 140 | ldr r0, =_start |
| mbed_official | 525:c320967f86b9 | 141 | bx r0 |
| mbed_official | 525:c320967f86b9 | 142 | .pool |
| mbed_official | 525:c320967f86b9 | 143 | .size Reset_Handler, . - Reset_Handler |
| mbed_official | 525:c320967f86b9 | 144 | |
| mbed_official | 525:c320967f86b9 | 145 | /* Macro to define default handlers. Default handler |
| mbed_official | 525:c320967f86b9 | 146 | * will be weak symbol and just dead loops. They can be |
| mbed_official | 525:c320967f86b9 | 147 | * overwritten by other handlers */ |
| mbed_official | 525:c320967f86b9 | 148 | .macro def_irq_handler handler_name |
| mbed_official | 525:c320967f86b9 | 149 | .align 1 |
| mbed_official | 525:c320967f86b9 | 150 | .thumb_func |
| mbed_official | 525:c320967f86b9 | 151 | .weak \handler_name |
| mbed_official | 525:c320967f86b9 | 152 | .type \handler_name, %function |
| mbed_official | 525:c320967f86b9 | 153 | \handler_name: |
| mbed_official | 525:c320967f86b9 | 154 | b . |
| mbed_official | 525:c320967f86b9 | 155 | .size \handler_name, . - \handler_name |
| mbed_official | 525:c320967f86b9 | 156 | .endm |
| mbed_official | 525:c320967f86b9 | 157 | |
| mbed_official | 525:c320967f86b9 | 158 | def_irq_handler Default_Handler |
| mbed_official | 525:c320967f86b9 | 159 | |
| mbed_official | 525:c320967f86b9 | 160 | def_irq_handler NMI_Handler |
| mbed_official | 525:c320967f86b9 | 161 | def_irq_handler HardFault_Handler |
| mbed_official | 525:c320967f86b9 | 162 | def_irq_handler SVC_Handler |
| mbed_official | 525:c320967f86b9 | 163 | def_irq_handler PendSV_Handler |
| mbed_official | 525:c320967f86b9 | 164 | def_irq_handler SysTick_Handler |
| mbed_official | 525:c320967f86b9 | 165 | |
| mbed_official | 525:c320967f86b9 | 166 | def_irq_handler DMA_IRQHandler |
| mbed_official | 525:c320967f86b9 | 167 | def_irq_handler GPIO_EVEN_IRQHandler |
| mbed_official | 525:c320967f86b9 | 168 | def_irq_handler TIMER0_IRQHandler |
| mbed_official | 525:c320967f86b9 | 169 | def_irq_handler ACMP0_IRQHandler |
| mbed_official | 525:c320967f86b9 | 170 | def_irq_handler ADC0_IRQHandler |
| mbed_official | 525:c320967f86b9 | 171 | def_irq_handler I2C0_IRQHandler |
| mbed_official | 525:c320967f86b9 | 172 | def_irq_handler GPIO_ODD_IRQHandler |
| mbed_official | 525:c320967f86b9 | 173 | def_irq_handler TIMER1_IRQHandler |
| mbed_official | 525:c320967f86b9 | 174 | def_irq_handler USART1_RX_IRQHandler |
| mbed_official | 525:c320967f86b9 | 175 | def_irq_handler USART1_TX_IRQHandler |
| mbed_official | 525:c320967f86b9 | 176 | def_irq_handler LEUART0_IRQHandler |
| mbed_official | 525:c320967f86b9 | 177 | def_irq_handler PCNT0_IRQHandler |
| mbed_official | 525:c320967f86b9 | 178 | def_irq_handler RTC_IRQHandler |
| mbed_official | 525:c320967f86b9 | 179 | def_irq_handler CMU_IRQHandler |
| mbed_official | 525:c320967f86b9 | 180 | def_irq_handler VCMP_IRQHandler |
| mbed_official | 525:c320967f86b9 | 181 | def_irq_handler MSC_IRQHandler |
| mbed_official | 525:c320967f86b9 | 182 | def_irq_handler AES_IRQHandler |
| mbed_official | 525:c320967f86b9 | 183 | |
| mbed_official | 525:c320967f86b9 | 184 | |
| mbed_official | 525:c320967f86b9 | 185 | .end |
