1;******************************************************************************* 2;* File Name : startup_stm32f072xb.s 3;* Author : MCD Application Team 4;* Description : STM32F072x8/STM32F072xB 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 PVD_VDDIO2_IRQHandler ; PVD and VDDIO2 through EXTI Line detect 77 DCD RTC_IRQHandler ; RTC through EXTI Line 78 DCD FLASH_IRQHandler ; FLASH 79 DCD RCC_CRS_IRQHandler ; RCC and CRS 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 TSC_IRQHandler ; TSC 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_6_7_IRQHandler ; DMA1 Channel 4 to Channel 7 87 DCD ADC1_COMP_IRQHandler ; ADC1, COMP1 and COMP2 88 DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation 89 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare 90 DCD TIM2_IRQHandler ; TIM2 91 DCD TIM3_IRQHandler ; TIM3 92 DCD TIM6_DAC_IRQHandler ; TIM6 and DAC 93 DCD TIM7_IRQHandler ; TIM7 94 DCD TIM14_IRQHandler ; TIM14 95 DCD TIM15_IRQHandler ; TIM15 96 DCD TIM16_IRQHandler ; TIM16 97 DCD TIM17_IRQHandler ; TIM17 98 DCD I2C1_IRQHandler ; I2C1 99 DCD I2C2_IRQHandler ; I2C2 100 DCD SPI1_IRQHandler ; SPI1 101 DCD SPI2_IRQHandler ; SPI2 102 DCD USART1_IRQHandler ; USART1 103 DCD USART2_IRQHandler ; USART2 104 DCD USART3_4_IRQHandler ; USART3 and USART4 105 DCD CEC_CAN_IRQHandler ; CEC and CAN 106 DCD USB_IRQHandler ; USB 107 108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 109;; 110;; Default interrupt handlers. 111;; 112 THUMB 113 114 PUBWEAK Reset_Handler 115 SECTION .text:CODE:NOROOT:REORDER(2) 116Reset_Handler 117 LDR R0, =SystemInit 118 BLX R0 119 LDR R0, =__iar_program_start 120 BX R0 121 122 PUBWEAK NMI_Handler 123 SECTION .text:CODE:NOROOT:REORDER(1) 124NMI_Handler 125 B NMI_Handler 126 127 PUBWEAK HardFault_Handler 128 SECTION .text:CODE:NOROOT:REORDER(1) 129HardFault_Handler 130 B HardFault_Handler 131 132 PUBWEAK SVC_Handler 133 SECTION .text:CODE:NOROOT:REORDER(1) 134SVC_Handler 135 B SVC_Handler 136 137 PUBWEAK PendSV_Handler 138 SECTION .text:CODE:NOROOT:REORDER(1) 139PendSV_Handler 140 B PendSV_Handler 141 142 PUBWEAK SysTick_Handler 143 SECTION .text:CODE:NOROOT:REORDER(1) 144SysTick_Handler 145 B SysTick_Handler 146 147 PUBWEAK WWDG_IRQHandler 148 SECTION .text:CODE:NOROOT:REORDER(1) 149WWDG_IRQHandler 150 B WWDG_IRQHandler 151 152 PUBWEAK PVD_VDDIO2_IRQHandler 153 SECTION .text:CODE:NOROOT:REORDER(1) 154PVD_VDDIO2_IRQHandler 155 B PVD_VDDIO2_IRQHandler 156 157 PUBWEAK RTC_IRQHandler 158 SECTION .text:CODE:NOROOT:REORDER(1) 159RTC_IRQHandler 160 B RTC_IRQHandler 161 162 PUBWEAK FLASH_IRQHandler 163 SECTION .text:CODE:NOROOT:REORDER(1) 164FLASH_IRQHandler 165 B FLASH_IRQHandler 166 167 PUBWEAK RCC_CRS_IRQHandler 168 SECTION .text:CODE:NOROOT:REORDER(1) 169RCC_CRS_IRQHandler 170 B RCC_CRS_IRQHandler 171 172 PUBWEAK EXTI0_1_IRQHandler 173 SECTION .text:CODE:NOROOT:REORDER(1) 174EXTI0_1_IRQHandler 175 B EXTI0_1_IRQHandler 176 177 PUBWEAK EXTI2_3_IRQHandler 178 SECTION .text:CODE:NOROOT:REORDER(1) 179EXTI2_3_IRQHandler 180 B EXTI2_3_IRQHandler 181 182 PUBWEAK EXTI4_15_IRQHandler 183 SECTION .text:CODE:NOROOT:REORDER(1) 184EXTI4_15_IRQHandler 185 B EXTI4_15_IRQHandler 186 187 PUBWEAK TSC_IRQHandler 188 SECTION .text:CODE:NOROOT:REORDER(1) 189TSC_IRQHandler 190 B TSC_IRQHandler 191 192 PUBWEAK DMA1_Channel1_IRQHandler 193 SECTION .text:CODE:NOROOT:REORDER(1) 194DMA1_Channel1_IRQHandler 195 B DMA1_Channel1_IRQHandler 196 197 PUBWEAK DMA1_Channel2_3_IRQHandler 198 SECTION .text:CODE:NOROOT:REORDER(1) 199DMA1_Channel2_3_IRQHandler 200 B DMA1_Channel2_3_IRQHandler 201 202 PUBWEAK DMA1_Channel4_5_6_7_IRQHandler 203 SECTION .text:CODE:NOROOT:REORDER(1) 204DMA1_Channel4_5_6_7_IRQHandler 205 B DMA1_Channel4_5_6_7_IRQHandler 206 207 PUBWEAK ADC1_COMP_IRQHandler 208 SECTION .text:CODE:NOROOT:REORDER(1) 209ADC1_COMP_IRQHandler 210 B ADC1_COMP_IRQHandler 211 212 PUBWEAK TIM1_BRK_UP_TRG_COM_IRQHandler 213 SECTION .text:CODE:NOROOT:REORDER(1) 214TIM1_BRK_UP_TRG_COM_IRQHandler 215 B TIM1_BRK_UP_TRG_COM_IRQHandler 216 217 PUBWEAK TIM1_CC_IRQHandler 218 SECTION .text:CODE:NOROOT:REORDER(1) 219TIM1_CC_IRQHandler 220 B TIM1_CC_IRQHandler 221 222 PUBWEAK TIM2_IRQHandler 223 SECTION .text:CODE:NOROOT:REORDER(1) 224TIM2_IRQHandler 225 B TIM2_IRQHandler 226 227 PUBWEAK TIM3_IRQHandler 228 SECTION .text:CODE:NOROOT:REORDER(1) 229TIM3_IRQHandler 230 B TIM3_IRQHandler 231 232 PUBWEAK TIM6_DAC_IRQHandler 233 SECTION .text:CODE:NOROOT:REORDER(1) 234TIM6_DAC_IRQHandler 235 B TIM6_DAC_IRQHandler 236 237 PUBWEAK TIM7_IRQHandler 238 SECTION .text:CODE:NOROOT:REORDER(1) 239TIM7_IRQHandler 240 B TIM7_IRQHandler 241 242 PUBWEAK TIM14_IRQHandler 243 SECTION .text:CODE:NOROOT:REORDER(1) 244TIM14_IRQHandler 245 B TIM14_IRQHandler 246 247 PUBWEAK TIM15_IRQHandler 248 SECTION .text:CODE:NOROOT:REORDER(1) 249TIM15_IRQHandler 250 B TIM15_IRQHandler 251 252 PUBWEAK TIM16_IRQHandler 253 SECTION .text:CODE:NOROOT:REORDER(1) 254TIM16_IRQHandler 255 B TIM16_IRQHandler 256 257 PUBWEAK TIM17_IRQHandler 258 SECTION .text:CODE:NOROOT:REORDER(1) 259TIM17_IRQHandler 260 B TIM17_IRQHandler 261 262 PUBWEAK I2C1_IRQHandler 263 SECTION .text:CODE:NOROOT:REORDER(1) 264I2C1_IRQHandler 265 B I2C1_IRQHandler 266 267 PUBWEAK I2C2_IRQHandler 268 SECTION .text:CODE:NOROOT:REORDER(1) 269I2C2_IRQHandler 270 B I2C2_IRQHandler 271 272 PUBWEAK SPI1_IRQHandler 273 SECTION .text:CODE:NOROOT:REORDER(1) 274SPI1_IRQHandler 275 B SPI1_IRQHandler 276 277 PUBWEAK SPI2_IRQHandler 278 SECTION .text:CODE:NOROOT:REORDER(1) 279SPI2_IRQHandler 280 B SPI2_IRQHandler 281 282 PUBWEAK USART1_IRQHandler 283 SECTION .text:CODE:NOROOT:REORDER(1) 284USART1_IRQHandler 285 B USART1_IRQHandler 286 287 PUBWEAK USART2_IRQHandler 288 SECTION .text:CODE:NOROOT:REORDER(1) 289USART2_IRQHandler 290 B USART2_IRQHandler 291 292 PUBWEAK USART3_4_IRQHandler 293 SECTION .text:CODE:NOROOT:REORDER(1) 294USART3_4_IRQHandler 295 B USART3_4_IRQHandler 296 297 PUBWEAK CEC_CAN_IRQHandler 298 SECTION .text:CODE:NOROOT:REORDER(1) 299CEC_CAN_IRQHandler 300 B CEC_CAN_IRQHandler 301 302 PUBWEAK USB_IRQHandler 303 SECTION .text:CODE:NOROOT:REORDER(1) 304USB_IRQHandler 305 B USB_IRQHandler 306 307 END 308;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** 309