Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | ;******************************************************************************* |
| 2 | ;* File Name : startup_stm32f030x6.s |
||
| 3 | ;* Author : MCD Application Team |
||
| 4 | ;* Description : STM32F030x4/STM32F030x6 devices vector table for EWARM toolchain. |
||
| 5 | ;* This module performs: |
||
| 6 | ;* - Set the initial SP |
||
| 7 | ;* - Set the initial PC == __iar_program_start, |
||
| 8 | ;* - Set the vector table entries with the exceptions ISR |
||
| 9 | ;* address, |
||
| 10 | ;* - Branches to main in the C library (which eventually |
||
| 11 | ;* calls main()). |
||
| 12 | ;* After Reset the Cortex-M0 processor is in Thread mode, |
||
| 13 | ;* priority is Privileged, and the Stack is set to Main. |
||
| 14 | ;******************************************************************************* |
||
| 15 | ;* @attention |
||
| 16 | ;* |
||
| 17 | ;* <h2><center>© Copyright (c) 2016 STMicroelectronics. |
||
| 18 | ;* All rights reserved.</center></h2> |
||
| 19 | ;* |
||
| 20 | ;* This software component is licensed by ST under BSD 3-Clause license, |
||
| 21 | ;* the "License"; You may not use this file except in compliance with the |
||
| 22 | ;* License. You may obtain a copy of the License at: |
||
| 23 | ;* opensource.org/licenses/BSD-3-Clause |
||
| 24 | ;* |
||
| 25 | ;******************************************************************************* |
||
| 26 | ; |
||
| 27 | ; |
||
| 28 | ; The modules in this file are included in the libraries, and may be replaced |
||
| 29 | ; by any user-defined modules that define the PUBLIC symbol _program_start or |
||
| 30 | ; a user defined start symbol. |
||
| 31 | ; To override the cstartup defined in the library, simply add your modified |
||
| 32 | ; version to the workbench project. |
||
| 33 | ; |
||
| 34 | ; The vector table is normally located at address 0. |
||
| 35 | ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. |
||
| 36 | ; The name "__vector_table" has special meaning for C-SPY: |
||
| 37 | ; it is where the SP start value is found, and the NVIC vector |
||
| 38 | ; table register (VTOR) is initialized to this address if != 0. |
||
| 39 | ; |
||
| 40 | ; Cortex-M version |
||
| 41 | ; |
||
| 42 | |||
| 43 | MODULE ?cstartup |
||
| 44 | |||
| 45 | ;; Forward declaration of sections. |
||
| 46 | SECTION CSTACK:DATA:NOROOT(3) |
||
| 47 | |||
| 48 | SECTION .intvec:CODE:NOROOT(2) |
||
| 49 | |||
| 50 | EXTERN __iar_program_start |
||
| 51 | EXTERN SystemInit |
||
| 52 | PUBLIC __vector_table |
||
| 53 | |||
| 54 | DATA |
||
| 55 | __vector_table |
||
| 56 | DCD sfe(CSTACK) |
||
| 57 | DCD Reset_Handler ; Reset Handler |
||
| 58 | |||
| 59 | DCD NMI_Handler ; NMI Handler |
||
| 60 | DCD HardFault_Handler ; Hard Fault Handler |
||
| 61 | DCD 0 ; Reserved |
||
| 62 | DCD 0 ; Reserved |
||
| 63 | DCD 0 ; Reserved |
||
| 64 | DCD 0 ; Reserved |
||
| 65 | DCD 0 ; Reserved |
||
| 66 | DCD 0 ; Reserved |
||
| 67 | DCD 0 ; Reserved |
||
| 68 | DCD SVC_Handler ; SVCall Handler |
||
| 69 | DCD 0 ; Reserved |
||
| 70 | DCD 0 ; Reserved |
||
| 71 | DCD PendSV_Handler ; PendSV Handler |
||
| 72 | DCD SysTick_Handler ; SysTick Handler |
||
| 73 | |||
| 74 | ; External Interrupts |
||
| 75 | DCD WWDG_IRQHandler ; Window Watchdog |
||
| 76 | DCD 0 ; Reserved |
||
| 77 | DCD RTC_IRQHandler ; RTC through EXTI Line |
||
| 78 | DCD FLASH_IRQHandler ; FLASH |
||
| 79 | DCD RCC_IRQHandler ; RCC |
||
| 80 | DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1 |
||
| 81 | DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3 |
||
| 82 | DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15 |
||
| 83 | DCD 0 ; Reserved |
||
| 84 | DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 |
||
| 85 | DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3 |
||
| 86 | DCD DMA1_Channel4_5_IRQHandler ; DMA1 Channel 4 and Channel 5 |
||
| 87 | DCD ADC1_IRQHandler ; ADC1 |
||
| 88 | DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation |
||
| 89 | DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare |
||
| 90 | DCD 0 ; Reserved |
||
| 91 | DCD TIM3_IRQHandler ; TIM3 |
||
| 92 | DCD 0 ; Reserved |
||
| 93 | DCD 0 ; Reserved |
||
| 94 | DCD TIM14_IRQHandler ; TIM14 |
||
| 95 | DCD 0 ; Reserved |
||
| 96 | DCD TIM16_IRQHandler ; TIM16 |
||
| 97 | DCD TIM17_IRQHandler ; TIM17 |
||
| 98 | DCD I2C1_IRQHandler ; I2C1 |
||
| 99 | DCD 0 ; Reserved |
||
| 100 | DCD SPI1_IRQHandler ; SPI1 |
||
| 101 | DCD 0 ; Reserved |
||
| 102 | DCD USART1_IRQHandler ; USART1 |
||
| 103 | |||
| 104 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
| 105 | ;; |
||
| 106 | ;; Default interrupt handlers. |
||
| 107 | ;; |
||
| 108 | THUMB |
||
| 109 | |||
| 110 | PUBWEAK Reset_Handler |
||
| 111 | SECTION .text:CODE:NOROOT:REORDER(2) |
||
| 112 | Reset_Handler |
||
| 113 | LDR R0, =SystemInit |
||
| 114 | BLX R0 |
||
| 115 | LDR R0, =__iar_program_start |
||
| 116 | BX R0 |
||
| 117 | |||
| 118 | PUBWEAK NMI_Handler |
||
| 119 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 120 | NMI_Handler |
||
| 121 | B NMI_Handler |
||
| 122 | |||
| 123 | PUBWEAK HardFault_Handler |
||
| 124 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 125 | HardFault_Handler |
||
| 126 | B HardFault_Handler |
||
| 127 | |||
| 128 | PUBWEAK SVC_Handler |
||
| 129 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 130 | SVC_Handler |
||
| 131 | B SVC_Handler |
||
| 132 | |||
| 133 | PUBWEAK PendSV_Handler |
||
| 134 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 135 | PendSV_Handler |
||
| 136 | B PendSV_Handler |
||
| 137 | |||
| 138 | PUBWEAK SysTick_Handler |
||
| 139 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 140 | SysTick_Handler |
||
| 141 | B SysTick_Handler |
||
| 142 | |||
| 143 | PUBWEAK WWDG_IRQHandler |
||
| 144 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 145 | WWDG_IRQHandler |
||
| 146 | B WWDG_IRQHandler |
||
| 147 | |||
| 148 | PUBWEAK RTC_IRQHandler |
||
| 149 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 150 | RTC_IRQHandler |
||
| 151 | B RTC_IRQHandler |
||
| 152 | |||
| 153 | PUBWEAK FLASH_IRQHandler |
||
| 154 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 155 | FLASH_IRQHandler |
||
| 156 | B FLASH_IRQHandler |
||
| 157 | |||
| 158 | PUBWEAK RCC_IRQHandler |
||
| 159 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 160 | RCC_IRQHandler |
||
| 161 | B RCC_IRQHandler |
||
| 162 | |||
| 163 | PUBWEAK EXTI0_1_IRQHandler |
||
| 164 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 165 | EXTI0_1_IRQHandler |
||
| 166 | B EXTI0_1_IRQHandler |
||
| 167 | |||
| 168 | PUBWEAK EXTI2_3_IRQHandler |
||
| 169 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 170 | EXTI2_3_IRQHandler |
||
| 171 | B EXTI2_3_IRQHandler |
||
| 172 | |||
| 173 | PUBWEAK EXTI4_15_IRQHandler |
||
| 174 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 175 | EXTI4_15_IRQHandler |
||
| 176 | B EXTI4_15_IRQHandler |
||
| 177 | |||
| 178 | PUBWEAK DMA1_Channel1_IRQHandler |
||
| 179 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 180 | DMA1_Channel1_IRQHandler |
||
| 181 | B DMA1_Channel1_IRQHandler |
||
| 182 | |||
| 183 | PUBWEAK DMA1_Channel2_3_IRQHandler |
||
| 184 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 185 | DMA1_Channel2_3_IRQHandler |
||
| 186 | B DMA1_Channel2_3_IRQHandler |
||
| 187 | |||
| 188 | PUBWEAK DMA1_Channel4_5_IRQHandler |
||
| 189 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 190 | DMA1_Channel4_5_IRQHandler |
||
| 191 | B DMA1_Channel4_5_IRQHandler |
||
| 192 | |||
| 193 | PUBWEAK ADC1_IRQHandler |
||
| 194 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 195 | ADC1_IRQHandler |
||
| 196 | B ADC1_IRQHandler |
||
| 197 | |||
| 198 | PUBWEAK TIM1_BRK_UP_TRG_COM_IRQHandler |
||
| 199 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 200 | TIM1_BRK_UP_TRG_COM_IRQHandler |
||
| 201 | B TIM1_BRK_UP_TRG_COM_IRQHandler |
||
| 202 | |||
| 203 | PUBWEAK TIM1_CC_IRQHandler |
||
| 204 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 205 | TIM1_CC_IRQHandler |
||
| 206 | B TIM1_CC_IRQHandler |
||
| 207 | |||
| 208 | PUBWEAK TIM3_IRQHandler |
||
| 209 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 210 | TIM3_IRQHandler |
||
| 211 | B TIM3_IRQHandler |
||
| 212 | |||
| 213 | PUBWEAK TIM14_IRQHandler |
||
| 214 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 215 | TIM14_IRQHandler |
||
| 216 | B TIM14_IRQHandler |
||
| 217 | |||
| 218 | PUBWEAK TIM16_IRQHandler |
||
| 219 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 220 | TIM16_IRQHandler |
||
| 221 | B TIM16_IRQHandler |
||
| 222 | |||
| 223 | PUBWEAK TIM17_IRQHandler |
||
| 224 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 225 | TIM17_IRQHandler |
||
| 226 | B TIM17_IRQHandler |
||
| 227 | |||
| 228 | PUBWEAK I2C1_IRQHandler |
||
| 229 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 230 | I2C1_IRQHandler |
||
| 231 | B I2C1_IRQHandler |
||
| 232 | |||
| 233 | PUBWEAK SPI1_IRQHandler |
||
| 234 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 235 | SPI1_IRQHandler |
||
| 236 | B SPI1_IRQHandler |
||
| 237 | |||
| 238 | PUBWEAK USART1_IRQHandler |
||
| 239 | SECTION .text:CODE:NOROOT:REORDER(1) |
||
| 240 | USART1_IRQHandler |
||
| 241 | B USART1_IRQHandler |
||
| 242 | |||
| 243 | |||
| 244 | END |
||
| 245 | ;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** |