| [42] | 1 | ;******************************************************************************
|
|---|
| 2 | ;* File Name : startup_stm32c071xx.s
|
|---|
| 3 | ;* Author : MCD Application Team
|
|---|
| 4 | ;* Description : STM32C071xx 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 | ;* Copyright (c) 2024 STMicroelectronics.
|
|---|
| 18 | ;* All rights reserved.
|
|---|
| 19 | ;*
|
|---|
| 20 | ;* This software is licensed under terms that can be found in the LICENSE file
|
|---|
| 21 | ;* in the root directory of this software component.
|
|---|
| 22 | ;* If no LICENSE file comes with this software, it is provided AS-IS.
|
|---|
| 23 | ;*
|
|---|
| 24 | ;*******************************************************************************
|
|---|
| 25 | ;
|
|---|
| 26 | ; The modules in this file are included in the libraries, and may be replaced
|
|---|
| 27 | ; by any user-defined modules that define the PUBLIC symbol _program_start or
|
|---|
| 28 | ; a user defined start symbol.
|
|---|
| 29 | ; To override the cstartup defined in the library, simply add your modified
|
|---|
| 30 | ; version to the workbench project.
|
|---|
| 31 | ;
|
|---|
| 32 | ; The vector table is normally located at address 0.
|
|---|
| 33 | ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
|
|---|
| 34 | ; The name "__vector_table" has special meaning for C-SPY:
|
|---|
| 35 | ; it is where the SP start value is found, and the NVIC vector
|
|---|
| 36 | ; table register (VTOR) is initialized to this address if != 0.
|
|---|
| 37 | ;
|
|---|
| 38 | ; Cortex-M version
|
|---|
| 39 | ;
|
|---|
| 40 |
|
|---|
| 41 | MODULE ?cstartup
|
|---|
| 42 |
|
|---|
| 43 | ;; Forward declaration of sections.
|
|---|
| 44 | SECTION CSTACK:DATA:NOROOT(3)
|
|---|
| 45 |
|
|---|
| 46 | SECTION .intvec:CODE:NOROOT(2)
|
|---|
| 47 |
|
|---|
| 48 | EXTERN __iar_program_start
|
|---|
| 49 | EXTERN SystemInit
|
|---|
| 50 | PUBLIC __vector_table
|
|---|
| 51 |
|
|---|
| 52 | DATA
|
|---|
| 53 | __vector_table
|
|---|
| 54 | DCD sfe(CSTACK)
|
|---|
| 55 | DCD Reset_Handler ; Reset Handler
|
|---|
| 56 |
|
|---|
| 57 | DCD NMI_Handler ; NMI Handler
|
|---|
| 58 | DCD HardFault_Handler ; Hard Fault Handler
|
|---|
| 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 0 ; Reserved
|
|---|
| 66 | DCD SVC_Handler ; SVCall Handler
|
|---|
| 67 | DCD 0 ; Reserved
|
|---|
| 68 | DCD 0 ; Reserved
|
|---|
| 69 | DCD PendSV_Handler ; PendSV Handler
|
|---|
| 70 | DCD SysTick_Handler ; SysTick Handler
|
|---|
| 71 |
|
|---|
| 72 | ; External Interrupts
|
|---|
| 73 | DCD WWDG_IRQHandler ; Window Watchdog
|
|---|
| 74 | DCD PVD_VDDIO2_IRQHandler ; PVD through EXTI Line detect
|
|---|
| 75 | DCD RTC_IRQHandler ; RTC through EXTI Line
|
|---|
| 76 | DCD FLASH_IRQHandler ; FLASH
|
|---|
| 77 | DCD RCC_CRS_IRQHandler ; RCC, CRS
|
|---|
| 78 | DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1
|
|---|
| 79 | DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3
|
|---|
| 80 | DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15
|
|---|
| 81 | DCD USB_DRD_FS_IRQHandler ; USB Dual Role
|
|---|
| 82 | DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
|
|---|
| 83 | DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3
|
|---|
| 84 | DCD DMAMUX1_DMA1_CH4_5_IRQHandler ; DMAMUX, DMA1 Channel 4 and 5
|
|---|
| 85 | DCD ADC1_IRQHandler ; ADC1
|
|---|
| 86 | DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation
|
|---|
| 87 | DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
|
|---|
| 88 | DCD TIM2_IRQHandler ; TIM2
|
|---|
| 89 | DCD TIM3_IRQHandler ; TIM3
|
|---|
| 90 | DCD 0 ; Reserved
|
|---|
| 91 | DCD 0 ; Reserved
|
|---|
| 92 | DCD TIM14_IRQHandler ; TIM14
|
|---|
| 93 | DCD 0 ; Reserved
|
|---|
| 94 | DCD TIM16_IRQHandler ; TIM16
|
|---|
| 95 | DCD TIM17_IRQHandler ; TIM17
|
|---|
| 96 | DCD I2C1_IRQHandler ; I2C1
|
|---|
| 97 | DCD I2C2_IRQHandler ; I2C2
|
|---|
| 98 | DCD SPI1_IRQHandler ; SPI1
|
|---|
| 99 | DCD SPI2_IRQHandler ; SPI2
|
|---|
| 100 | DCD USART1_IRQHandler ; USART1
|
|---|
| 101 | DCD USART2_IRQHandler ; USART2
|
|---|
| 102 | DCD 0 ; Reserved
|
|---|
| 103 | DCD 0 ; Reserved
|
|---|
| 104 | DCD 0 ; Reserved
|
|---|
| 105 |
|
|---|
| 106 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|---|
| 107 | ;;
|
|---|
| 108 | ;; Default interrupt handlers.
|
|---|
| 109 | ;;
|
|---|
| 110 | THUMB
|
|---|
| 111 |
|
|---|
| 112 | PUBWEAK Reset_Handler
|
|---|
| 113 | SECTION .text:CODE:NOROOT:REORDER(2)
|
|---|
| 114 | Reset_Handler
|
|---|
| 115 | LDR R0, =SystemInit
|
|---|
| 116 | BLX R0
|
|---|
| 117 | LDR R0, =__iar_program_start
|
|---|
| 118 | BX R0
|
|---|
| 119 |
|
|---|
| 120 | PUBWEAK NMI_Handler
|
|---|
| 121 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 122 | NMI_Handler
|
|---|
| 123 | B NMI_Handler
|
|---|
| 124 |
|
|---|
| 125 | PUBWEAK HardFault_Handler
|
|---|
| 126 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 127 | HardFault_Handler
|
|---|
| 128 | B HardFault_Handler
|
|---|
| 129 |
|
|---|
| 130 | PUBWEAK SVC_Handler
|
|---|
| 131 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 132 | SVC_Handler
|
|---|
| 133 | B SVC_Handler
|
|---|
| 134 |
|
|---|
| 135 | PUBWEAK PendSV_Handler
|
|---|
| 136 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 137 | PendSV_Handler
|
|---|
| 138 | B PendSV_Handler
|
|---|
| 139 |
|
|---|
| 140 | PUBWEAK SysTick_Handler
|
|---|
| 141 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 142 | SysTick_Handler
|
|---|
| 143 | B SysTick_Handler
|
|---|
| 144 |
|
|---|
| 145 | PUBWEAK WWDG_IRQHandler
|
|---|
| 146 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 147 | WWDG_IRQHandler
|
|---|
| 148 | B WWDG_IRQHandler
|
|---|
| 149 |
|
|---|
| 150 | PUBWEAK PVD_VDDIO2_IRQHandler
|
|---|
| 151 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 152 | PVD_VDDIO2_IRQHandler
|
|---|
| 153 | B PVD_VDDIO2_IRQHandler
|
|---|
| 154 |
|
|---|
| 155 | PUBWEAK RTC_IRQHandler
|
|---|
| 156 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 157 | RTC_IRQHandler
|
|---|
| 158 | B RTC_IRQHandler
|
|---|
| 159 |
|
|---|
| 160 | PUBWEAK FLASH_IRQHandler
|
|---|
| 161 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 162 | FLASH_IRQHandler
|
|---|
| 163 | B FLASH_IRQHandler
|
|---|
| 164 |
|
|---|
| 165 | PUBWEAK RCC_CRS_IRQHandler
|
|---|
| 166 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 167 | RCC_CRS_IRQHandler
|
|---|
| 168 | B RCC_CRS_IRQHandler
|
|---|
| 169 |
|
|---|
| 170 | PUBWEAK EXTI0_1_IRQHandler
|
|---|
| 171 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 172 | EXTI0_1_IRQHandler
|
|---|
| 173 | B EXTI0_1_IRQHandler
|
|---|
| 174 |
|
|---|
| 175 | PUBWEAK EXTI2_3_IRQHandler
|
|---|
| 176 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 177 | EXTI2_3_IRQHandler
|
|---|
| 178 | B EXTI2_3_IRQHandler
|
|---|
| 179 |
|
|---|
| 180 | PUBWEAK EXTI4_15_IRQHandler
|
|---|
| 181 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 182 | EXTI4_15_IRQHandler
|
|---|
| 183 | B EXTI4_15_IRQHandler
|
|---|
| 184 |
|
|---|
| 185 | PUBWEAK USB_DRD_FS_IRQHandler
|
|---|
| 186 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 187 | USB_DRD_FS_IRQHandler
|
|---|
| 188 | B USB_DRD_FS_IRQHandler
|
|---|
| 189 |
|
|---|
| 190 | PUBWEAK DMA1_Channel1_IRQHandler
|
|---|
| 191 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 192 | DMA1_Channel1_IRQHandler
|
|---|
| 193 | B DMA1_Channel1_IRQHandler
|
|---|
| 194 |
|
|---|
| 195 | PUBWEAK DMA1_Channel2_3_IRQHandler
|
|---|
| 196 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 197 | DMA1_Channel2_3_IRQHandler
|
|---|
| 198 | B DMA1_Channel2_3_IRQHandler
|
|---|
| 199 |
|
|---|
| 200 | PUBWEAK DMAMUX1_DMA1_CH4_5_IRQHandler
|
|---|
| 201 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 202 | DMAMUX1_DMA1_CH4_5_IRQHandler
|
|---|
| 203 | B DMAMUX1_DMA1_CH4_5_IRQHandler
|
|---|
| 204 |
|
|---|
| 205 | PUBWEAK ADC1_IRQHandler
|
|---|
| 206 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 207 | ADC1_IRQHandler
|
|---|
| 208 | B ADC1_IRQHandler
|
|---|
| 209 |
|
|---|
| 210 | PUBWEAK TIM1_BRK_UP_TRG_COM_IRQHandler
|
|---|
| 211 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 212 | TIM1_BRK_UP_TRG_COM_IRQHandler
|
|---|
| 213 | B TIM1_BRK_UP_TRG_COM_IRQHandler
|
|---|
| 214 |
|
|---|
| 215 | PUBWEAK TIM1_CC_IRQHandler
|
|---|
| 216 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 217 | TIM1_CC_IRQHandler
|
|---|
| 218 | B TIM1_CC_IRQHandler
|
|---|
| 219 |
|
|---|
| 220 | PUBWEAK TIM2_IRQHandler
|
|---|
| 221 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 222 | TIM2_IRQHandler
|
|---|
| 223 | B TIM2_IRQHandler
|
|---|
| 224 |
|
|---|
| 225 | PUBWEAK TIM3_IRQHandler
|
|---|
| 226 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 227 | TIM3_IRQHandler
|
|---|
| 228 | B TIM3_IRQHandler
|
|---|
| 229 |
|
|---|
| 230 | PUBWEAK TIM14_IRQHandler
|
|---|
| 231 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 232 | TIM14_IRQHandler
|
|---|
| 233 | B TIM14_IRQHandler
|
|---|
| 234 |
|
|---|
| 235 | PUBWEAK TIM16_IRQHandler
|
|---|
| 236 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 237 | TIM16_IRQHandler
|
|---|
| 238 | B TIM16_IRQHandler
|
|---|
| 239 |
|
|---|
| 240 | PUBWEAK TIM17_IRQHandler
|
|---|
| 241 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 242 | TIM17_IRQHandler
|
|---|
| 243 | B TIM17_IRQHandler
|
|---|
| 244 |
|
|---|
| 245 | PUBWEAK I2C1_IRQHandler
|
|---|
| 246 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 247 | I2C1_IRQHandler
|
|---|
| 248 | B I2C1_IRQHandler
|
|---|
| 249 |
|
|---|
| 250 | PUBWEAK I2C2_IRQHandler
|
|---|
| 251 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 252 | I2C2_IRQHandler
|
|---|
| 253 | B I2C2_IRQHandler
|
|---|
| 254 |
|
|---|
| 255 | PUBWEAK SPI1_IRQHandler
|
|---|
| 256 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 257 | SPI1_IRQHandler
|
|---|
| 258 | B SPI1_IRQHandler
|
|---|
| 259 |
|
|---|
| 260 | PUBWEAK SPI2_IRQHandler
|
|---|
| 261 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 262 | SPI2_IRQHandler
|
|---|
| 263 | B SPI2_IRQHandler
|
|---|
| 264 |
|
|---|
| 265 | PUBWEAK USART1_IRQHandler
|
|---|
| 266 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 267 | USART1_IRQHandler
|
|---|
| 268 | B USART1_IRQHandler
|
|---|
| 269 |
|
|---|
| 270 | PUBWEAK USART2_IRQHandler
|
|---|
| 271 | SECTION .text:CODE:NOROOT:REORDER(1)
|
|---|
| 272 | USART2_IRQHandler
|
|---|
| 273 | B USART2_IRQHandler
|
|---|
| 274 |
|
|---|
| 275 | END
|
|---|
| 276 |
|
|---|
| 277 |
|
|---|