| 1 | ;******************************************************************************
|
|---|
| 2 | ;* File Name : startup_stm32g071xx.s
|
|---|
| 3 | ;* Author : MCD Application Team
|
|---|
| 4 | ;* Description : STM32G071xx 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 | ;*
|
|---|
| 16 | ;* Copyright (c) 2018-2021 STMicroelectronics.
|
|---|
| 17 | ;* All rights reserved.
|
|---|
| 18 | ;*
|
|---|
| 19 | ;* This software is licensed under terms that can be found in the LICENSE file
|
|---|
| 20 | ;* in the root directory of this software component.
|
|---|
| 21 | ;* If no LICENSE file comes with this software, it is provided AS-IS.
|
|---|
| 22 | ;
|
|---|
| 23 | ;*******************************************************************************
|
|---|
| 24 | ;
|
|---|
| 25 | ; The modules in this file are included in the libraries, and may be replaced
|
|---|
| 26 | ; by any user-defined modules that define the PUBLIC symbol _program_start or
|
|---|
| 27 | ; a user defined start symbol.
|
|---|
| 28 | ; To override the cstartup defined in the library, simply add your modified
|
|---|
| 29 | ; version to the workbench project.
|
|---|
| 30 | ;
|
|---|
| 31 | ; The vector table is normally located at address 0.
|
|---|
| 32 | ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
|
|---|
| 33 | ; The name "__vector_table" has special meaning for C-SPY:
|
|---|
| 34 | ; it is where the SP start value is found, and the NVIC vector
|
|---|
| 35 | ; table register (VTOR) is initialized to this address if != 0.
|
|---|
| 36 | ;
|
|---|
| 37 | ; Cortex-M version
|
|---|
| 38 | ;
|
|---|
| 39 |
|
|---|
| 40 | MODULE ?cstartup
|
|---|
| 41 |
|
|---|
| 42 | ;; Forward declaration of sections.
|
|---|
| 43 | SECTION CSTACK:DATA:NOROOT(3)
|
|---|
| 44 |
|
|---|
| 45 | SECTION .intvec:CODE:NOROOT(2)
|
|---|
| 46 |
|
|---|
| 47 | EXTERN __iar_program_start
|
|---|
| 48 | EXTERN SystemInit
|
|---|
| 49 | PUBLIC __vector_table
|
|---|
| 50 |
|
|---|
| 51 | DATA
|
|---|
| 52 | __vector_table
|
|---|
| 53 | DCD sfe(CSTACK)
|
|---|
| 54 | DCD Reset_Handler ; Reset Handler
|
|---|
| 55 |
|
|---|
| 56 | DCD NMI_Handler ; NMI Handler
|
|---|
| 57 | DCD HardFault_Handler ; Hard Fault Handler
|
|---|
| 58 | DCD 0 ; Reserved
|
|---|
| 59 | DCD 0 ; Reserved
|
|---|
| 60 | DCD 0 ; Reserved
|
|---|
| 61 | DCD 0 ; Reserved
|
|---|
| 62 | DCD 0 ; Reserved
|
|---|
| 63 | DCD 0 ; Reserved
|
|---|
| 64 | DCD 0 ; Reserved
|
|---|
| 65 | DCD SVC_Handler ; SVCall Handler
|
|---|
| 66 | DCD 0 ; Reserved
|
|---|
| 67 | DCD 0 ; Reserved
|
|---|
| 68 | DCD PendSV_Handler ; PendSV Handler
|
|---|
| 69 | DCD SysTick_Handler ; SysTick Handler
|
|---|
| 70 |
|
|---|
| 71 | ; External Interrupts
|
|---|
| 72 | DCD WWDG_IRQHandler ; Window Watchdog
|
|---|
| 73 | DCD PVD_IRQHandler ; PVD through EXTI Line detect
|
|---|
| 74 | DCD RTC_TAMP_IRQHandler ; RTC through EXTI Line
|
|---|
| 75 | DCD FLASH_IRQHandler ; FLASH
|
|---|
| 76 | DCD RCC_IRQHandler ; RCC
|
|---|
| 77 | DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1
|
|---|
| 78 | DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3
|
|---|
| 79 | DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15
|
|---|
| 80 | DCD UCPD1_2_IRQHandler ; UCPD1, UCPD2
|
|---|
| 81 | DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
|
|---|
| 82 | DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3
|
|---|
| 83 | DCD DMA1_Ch4_7_DMAMUX1_OVR_IRQHandler ; DMA1 Channel 4 to Channel 7, DMAMUX1 overrun
|
|---|
| 84 | DCD ADC1_COMP_IRQHandler ; ADC1, COMP1 and COMP2
|
|---|
| 85 | DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation
|
|---|
| 86 | DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
|
|---|
| 87 | DCD TIM2_IRQHandler ; TIM2
|
|---|
| 88 | DCD TIM3_IRQHandler ; TIM3
|
|---|
| 89 | DCD TIM6_DAC_LPTIM1_IRQHandler ; TIM6, DAC & LPTIM1
|
|---|
| 90 | DCD TIM7_LPTIM2_IRQHandler ; TIM7 & LPTIM2
|
|---|
| 91 | DCD TIM14_IRQHandler ; TIM14
|
|---|
| 92 | DCD TIM15_IRQHandler ; TIM15
|
|---|
| 93 | DCD TIM16_IRQHandler ; TIM16
|
|---|
| 94 | DCD TIM17_IRQHandler ; TIM17
|
|---|
| 95 | DCD I2C1_IRQHandler ; I2C1
|
|---|
| 96 | DCD I2C2_IRQHandler ; I2C2
|
|---|
| 97 | DCD SPI1_IRQHandler ; SPI1
|
|---|
| 98 | DCD SPI2_IRQHandler ; SPI2
|
|---|
| 99 | DCD USART1_IRQHandler ; USART1
|
|---|
| 100 | DCD USART2_IRQHandler ; USART2
|
|---|
| 101 | DCD USART3_4_LPUART1_IRQHandler ; USART3, USART4, LPUART1
|
|---|
| 102 | DCD CEC_IRQHandler ; CEC
|
|---|
| 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 PVD_IRQHandler
|
|---|
| 149 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 150 | PVD_IRQHandler
|
|---|
| 151 | B PVD_IRQHandler
|
|---|
| 152 |
|
|---|
| 153 | PUBWEAK RTC_TAMP_IRQHandler
|
|---|
| 154 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 155 | RTC_TAMP_IRQHandler
|
|---|
| 156 | B RTC_TAMP_IRQHandler
|
|---|
| 157 |
|
|---|
| 158 | PUBWEAK FLASH_IRQHandler
|
|---|
| 159 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 160 | FLASH_IRQHandler
|
|---|
| 161 | B FLASH_IRQHandler
|
|---|
| 162 |
|
|---|
| 163 | PUBWEAK RCC_IRQHandler
|
|---|
| 164 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 165 | RCC_IRQHandler
|
|---|
| 166 | B RCC_IRQHandler
|
|---|
| 167 |
|
|---|
| 168 | PUBWEAK EXTI0_1_IRQHandler
|
|---|
| 169 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 170 | EXTI0_1_IRQHandler
|
|---|
| 171 | B EXTI0_1_IRQHandler
|
|---|
| 172 |
|
|---|
| 173 | PUBWEAK EXTI2_3_IRQHandler
|
|---|
| 174 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 175 | EXTI2_3_IRQHandler
|
|---|
| 176 | B EXTI2_3_IRQHandler
|
|---|
| 177 |
|
|---|
| 178 | PUBWEAK EXTI4_15_IRQHandler
|
|---|
| 179 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 180 | EXTI4_15_IRQHandler
|
|---|
| 181 | B EXTI4_15_IRQHandler
|
|---|
| 182 |
|
|---|
| 183 | PUBWEAK UCPD1_2_IRQHandler
|
|---|
| 184 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 185 | UCPD1_2_IRQHandler
|
|---|
| 186 | B UCPD1_2_IRQHandler
|
|---|
| 187 |
|
|---|
| 188 | PUBWEAK DMA1_Channel1_IRQHandler
|
|---|
| 189 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 190 | DMA1_Channel1_IRQHandler
|
|---|
| 191 | B DMA1_Channel1_IRQHandler
|
|---|
| 192 |
|
|---|
| 193 | PUBWEAK DMA1_Channel2_3_IRQHandler
|
|---|
| 194 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 195 | DMA1_Channel2_3_IRQHandler
|
|---|
| 196 | B DMA1_Channel2_3_IRQHandler
|
|---|
| 197 |
|
|---|
| 198 | PUBWEAK DMA1_Ch4_7_DMAMUX1_OVR_IRQHandler
|
|---|
| 199 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 200 | DMA1_Ch4_7_DMAMUX1_OVR_IRQHandler
|
|---|
| 201 | B DMA1_Ch4_7_DMAMUX1_OVR_IRQHandler
|
|---|
| 202 |
|
|---|
| 203 | PUBWEAK ADC1_COMP_IRQHandler
|
|---|
| 204 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 205 | ADC1_COMP_IRQHandler
|
|---|
| 206 | B ADC1_COMP_IRQHandler
|
|---|
| 207 |
|
|---|
| 208 | PUBWEAK TIM1_BRK_UP_TRG_COM_IRQHandler
|
|---|
| 209 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 210 | TIM1_BRK_UP_TRG_COM_IRQHandler
|
|---|
| 211 | B TIM1_BRK_UP_TRG_COM_IRQHandler
|
|---|
| 212 |
|
|---|
| 213 | PUBWEAK TIM1_CC_IRQHandler
|
|---|
| 214 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 215 | TIM1_CC_IRQHandler
|
|---|
| 216 | B TIM1_CC_IRQHandler
|
|---|
| 217 |
|
|---|
| 218 | PUBWEAK TIM2_IRQHandler
|
|---|
| 219 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 220 | TIM2_IRQHandler
|
|---|
| 221 | B TIM2_IRQHandler
|
|---|
| 222 |
|
|---|
| 223 | PUBWEAK TIM3_IRQHandler
|
|---|
| 224 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 225 | TIM3_IRQHandler
|
|---|
| 226 | B TIM3_IRQHandler
|
|---|
| 227 |
|
|---|
| 228 | PUBWEAK TIM6_DAC_LPTIM1_IRQHandler
|
|---|
| 229 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 230 | TIM6_DAC_LPTIM1_IRQHandler
|
|---|
| 231 | B TIM6_DAC_LPTIM1_IRQHandler
|
|---|
| 232 |
|
|---|
| 233 | PUBWEAK TIM7_LPTIM2_IRQHandler
|
|---|
| 234 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 235 | TIM7_LPTIM2_IRQHandler
|
|---|
| 236 | B TIM7_LPTIM2_IRQHandler
|
|---|
| 237 |
|
|---|
| 238 | PUBWEAK TIM14_IRQHandler
|
|---|
| 239 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 240 | TIM14_IRQHandler
|
|---|
| 241 | B TIM14_IRQHandler
|
|---|
| 242 |
|
|---|
| 243 | PUBWEAK TIM15_IRQHandler
|
|---|
| 244 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 245 | TIM15_IRQHandler
|
|---|
| 246 | B TIM15_IRQHandler
|
|---|
| 247 |
|
|---|
| 248 | PUBWEAK TIM16_IRQHandler
|
|---|
| 249 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 250 | TIM16_IRQHandler
|
|---|
| 251 | B TIM16_IRQHandler
|
|---|
| 252 |
|
|---|
| 253 | PUBWEAK TIM17_IRQHandler
|
|---|
| 254 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 255 | TIM17_IRQHandler
|
|---|
| 256 | B TIM17_IRQHandler
|
|---|
| 257 |
|
|---|
| 258 | PUBWEAK I2C1_IRQHandler
|
|---|
| 259 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 260 | I2C1_IRQHandler
|
|---|
| 261 | B I2C1_IRQHandler
|
|---|
| 262 |
|
|---|
| 263 | PUBWEAK I2C2_IRQHandler
|
|---|
| 264 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 265 | I2C2_IRQHandler
|
|---|
| 266 | B I2C2_IRQHandler
|
|---|
| 267 |
|
|---|
| 268 | PUBWEAK SPI1_IRQHandler
|
|---|
| 269 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 270 | SPI1_IRQHandler
|
|---|
| 271 | B SPI1_IRQHandler
|
|---|
| 272 |
|
|---|
| 273 | PUBWEAK SPI2_IRQHandler
|
|---|
| 274 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 275 | SPI2_IRQHandler
|
|---|
| 276 | B SPI2_IRQHandler
|
|---|
| 277 |
|
|---|
| 278 | PUBWEAK USART1_IRQHandler
|
|---|
| 279 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 280 | USART1_IRQHandler
|
|---|
| 281 | B USART1_IRQHandler
|
|---|
| 282 |
|
|---|
| 283 | PUBWEAK USART2_IRQHandler
|
|---|
| 284 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 285 | USART2_IRQHandler
|
|---|
| 286 | B USART2_IRQHandler
|
|---|
| 287 |
|
|---|
| 288 | PUBWEAK USART3_4_LPUART1_IRQHandler
|
|---|
| 289 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 290 | USART3_4_LPUART1_IRQHandler
|
|---|
| 291 | B USART3_4_LPUART1_IRQHandler
|
|---|
| 292 |
|
|---|
| 293 | PUBWEAK CEC_IRQHandler
|
|---|
| 294 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 295 | CEC_IRQHandler
|
|---|
| 296 | B CEC_IRQHandler
|
|---|
| 297 |
|
|---|
| 298 | END
|
|---|
| 299 | ;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****
|
|---|