Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | ;******************** (C) COPYRIGHT 2017 STMicroelectronics ******************** |
| 2 | ;* File Name : startup_stm32f101xe.s |
||
| 3 | ;* Author : MCD Application Team |
||
| 4 | ;* Description : STM32F101xE Access Line 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 | ;* - Configure the system clock |
||
| 11 | ;* - Branches to main in the C library (which eventually |
||
| 12 | ;* calls main()). |
||
| 13 | ;* After Reset the Cortex-M3 processor is in Thread mode, |
||
| 14 | ;* priority is Privileged, and the Stack is set to Main. |
||
| 15 | ;******************************************************************************* |
||
| 16 | ;* @attention |
||
| 17 | ;* |
||
| 18 | ;* <h2><center>© Copyright (c) 2017 STMicroelectronics. |
||
| 19 | ;* All rights reserved.</center></h2> |
||
| 20 | ;* |
||
| 21 | ;* This software component is licensed by ST under BSD 3-Clause license, |
||
| 22 | ;* the "License"; You may not use this file except in compliance with the |
||
| 23 | ;* License. You may obtain a copy of the License at: |
||
| 24 | ;* opensource.org/licenses/BSD-3-Clause |
||
| 25 | ;* |
||
| 26 | ;******************************************************************************* |
||
| 27 | ; |
||
| 28 | ; |
||
| 29 | ; The modules in this file are included in the libraries, and may be replaced |
||
| 30 | ; by any user-defined modules that define the PUBLIC symbol _program_start or |
||
| 31 | ; a user defined start symbol. |
||
| 32 | ; To override the cstartup defined in the library, simply add your modified |
||
| 33 | ; version to the workbench project. |
||
| 34 | ; |
||
| 35 | ; The vector table is normally located at address 0. |
||
| 36 | ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. |
||
| 37 | ; The name "__vector_table" has special meaning for C-SPY: |
||
| 38 | ; it is where the SP start value is found, and the NVIC vector |
||
| 39 | ; table register (VTOR) is initialized to this address if != 0. |
||
| 40 | ; |
||
| 41 | ; Cortex-M version |
||
| 42 | ; |
||
| 43 | |||
| 44 | MODULE ?cstartup |
||
| 45 | |||
| 46 | ;; Forward declaration of sections. |
||
| 47 | SECTION CSTACK:DATA:NOROOT(3) |
||
| 48 | |||
| 49 | SECTION .intvec:CODE:NOROOT(2) |
||
| 50 | |||
| 51 | EXTERN __iar_program_start |
||
| 52 | EXTERN SystemInit |
||
| 53 | PUBLIC __vector_table |
||
| 54 | |||
| 55 | DATA |
||
| 56 | |||
| 57 | __vector_table |
||
| 58 | DCD sfe(CSTACK) |
||
| 59 | DCD Reset_Handler ; Reset Handler |
||
| 60 | DCD NMI_Handler ; NMI Handler |
||
| 61 | DCD HardFault_Handler ; Hard Fault Handler |
||
| 62 | DCD MemManage_Handler ; MPU Fault Handler |
||
| 63 | DCD BusFault_Handler ; Bus Fault Handler |
||
| 64 | DCD UsageFault_Handler ; Usage Fault Handler |
||
| 65 | DCD 0 ; Reserved |
||
| 66 | DCD 0 ; Reserved |
||
| 67 | DCD 0 ; Reserved |
||
| 68 | DCD 0 ; Reserved |
||
| 69 | DCD SVC_Handler ; SVCall Handler |
||
| 70 | DCD DebugMon_Handler ; Debug Monitor Handler |
||
| 71 | DCD 0 ; Reserved |
||
| 72 | DCD PendSV_Handler ; PendSV Handler |
||
| 73 | DCD SysTick_Handler ; SysTick Handler |
||
| 74 | |||
| 75 | ; External Interrupts |
||
| 76 | DCD WWDG_IRQHandler ; Window Watchdog |
||
| 77 | DCD PVD_IRQHandler ; PVD through EXTI Line detect |
||
| 78 | DCD TAMPER_IRQHandler ; Tamper |
||
| 79 | DCD RTC_IRQHandler ; RTC |
||
| 80 | DCD FLASH_IRQHandler ; Flash |
||
| 81 | DCD RCC_IRQHandler ; RCC |
||
| 82 | DCD EXTI0_IRQHandler ; EXTI Line 0 |
||
| 83 | DCD EXTI1_IRQHandler ; EXTI Line 1 |
||
| 84 | DCD EXTI2_IRQHandler ; EXTI Line 2 |
||
| 85 | DCD EXTI3_IRQHandler ; EXTI Line 3 |
||
| 86 | DCD EXTI4_IRQHandler ; EXTI Line 4 |
||
| 87 | DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 |
||
| 88 | DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2 |
||
| 89 | DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3 |
||
| 90 | DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4 |
||
| 91 | DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5 |
||
| 92 | DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6 |
||
| 93 | DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7 |
||
| 94 | DCD ADC1_IRQHandler ; ADC1 |
||
| 95 | DCD 0 ; Reserved |
||
| 96 | DCD 0 ; Reserved |
||
| 97 | DCD 0 ; Reserved |
||
| 98 | DCD 0 ; Reserved |
||
| 99 | DCD EXTI9_5_IRQHandler ; EXTI Line 9..5 |
||
| 100 | DCD 0 ; Reserved |
||
| 101 | DCD 0 ; Reserved |
||
| 102 | DCD 0 ; Reserved |
||
| 103 | DCD 0 ; Reserved |
||
| 104 | DCD TIM2_IRQHandler ; TIM2 |
||
| 105 | DCD TIM3_IRQHandler ; TIM3 |
||
| 106 | DCD TIM4_IRQHandler ; TIM4 |
||
| 107 | DCD I2C1_EV_IRQHandler ; I2C1 Event |
||
| 108 | DCD I2C1_ER_IRQHandler ; I2C1 Error |
||
| 109 | DCD I2C2_EV_IRQHandler ; I2C2 Event |
||
| 110 | DCD I2C2_ER_IRQHandler ; I2C2 Error |
||
| 111 | DCD SPI1_IRQHandler ; SPI1 |
||
| 112 | DCD SPI2_IRQHandler ; SPI2 |
||
| 113 | DCD USART1_IRQHandler ; USART1 |
||
| 114 | DCD USART2_IRQHandler ; USART2 |
||
| 115 | DCD USART3_IRQHandler ; USART3 |
||
| 116 | DCD EXTI15_10_IRQHandler ; EXTI Line 15..10 |
||
| 117 | DCD RTC_Alarm_IRQHandler ; RTC Alarm through EXTI Line |
||
| 118 | DCD 0 ; Reserved |
||
| 119 | DCD 0 ; Reserved |
||
| 120 | DCD 0 ; Reserved |
||
| 121 | DCD 0 ; Reserved |
||
| 122 | DCD 0 ; Reserved |
||
| 123 | DCD 0 ; Reserved |
||
| 124 | DCD FSMC_IRQHandler ; FSMC |
||
| 125 | DCD 0 ; Reserved |
||
| 126 | DCD TIM5_IRQHandler ; TIM5 |
||
| 127 | DCD SPI3_IRQHandler ; SPI3 |
||
| 128 | DCD UART4_IRQHandler ; UART4 |
||
| 129 | DCD UART5_IRQHandler ; UART5 |
||
| 130 | DCD TIM6_IRQHandler ; TIM6 |
||
| 131 | DCD TIM7_IRQHandler ; TIM7 |
||
| 132 | DCD DMA2_Channel1_IRQHandler ; DMA2 Channel1 |
||
| 133 | DCD DMA2_Channel2_IRQHandler ; DMA2 Channel2 |
||
| 134 | DCD DMA2_Channel3_IRQHandler ; DMA2 Channel3 |
||
| 135 | DCD DMA2_Channel4_5_IRQHandler ; DMA2 Channel4 & Channel5 |
||
| 136 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
| 137 | ;; |
||
| 138 | ;; Default interrupt handlers. |
||
| 139 | ;; |
||
| 140 | THUMB |
||
| 141 | |||
| 142 | PUBWEAK Reset_Handler |
||
| 143 | SECTION .text:CODE:REORDER:NOROOT(2) |
||
| 144 | Reset_Handler |
||
| 145 | LDR R0, =SystemInit |
||
| 146 | BLX R0 |
||
| 147 | LDR R0, =__iar_program_start |
||
| 148 | BX R0 |
||
| 149 | |||
| 150 | PUBWEAK NMI_Handler |
||
| 151 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 152 | NMI_Handler |
||
| 153 | B NMI_Handler |
||
| 154 | |||
| 155 | PUBWEAK HardFault_Handler |
||
| 156 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 157 | HardFault_Handler |
||
| 158 | B HardFault_Handler |
||
| 159 | |||
| 160 | PUBWEAK MemManage_Handler |
||
| 161 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 162 | MemManage_Handler |
||
| 163 | B MemManage_Handler |
||
| 164 | |||
| 165 | PUBWEAK BusFault_Handler |
||
| 166 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 167 | BusFault_Handler |
||
| 168 | B BusFault_Handler |
||
| 169 | |||
| 170 | PUBWEAK UsageFault_Handler |
||
| 171 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 172 | UsageFault_Handler |
||
| 173 | B UsageFault_Handler |
||
| 174 | |||
| 175 | PUBWEAK SVC_Handler |
||
| 176 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 177 | SVC_Handler |
||
| 178 | B SVC_Handler |
||
| 179 | |||
| 180 | PUBWEAK DebugMon_Handler |
||
| 181 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 182 | DebugMon_Handler |
||
| 183 | B DebugMon_Handler |
||
| 184 | |||
| 185 | PUBWEAK PendSV_Handler |
||
| 186 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 187 | PendSV_Handler |
||
| 188 | B PendSV_Handler |
||
| 189 | |||
| 190 | PUBWEAK SysTick_Handler |
||
| 191 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 192 | SysTick_Handler |
||
| 193 | B SysTick_Handler |
||
| 194 | |||
| 195 | PUBWEAK WWDG_IRQHandler |
||
| 196 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 197 | WWDG_IRQHandler |
||
| 198 | B WWDG_IRQHandler |
||
| 199 | |||
| 200 | PUBWEAK PVD_IRQHandler |
||
| 201 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 202 | PVD_IRQHandler |
||
| 203 | B PVD_IRQHandler |
||
| 204 | |||
| 205 | PUBWEAK TAMPER_IRQHandler |
||
| 206 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 207 | TAMPER_IRQHandler |
||
| 208 | B TAMPER_IRQHandler |
||
| 209 | |||
| 210 | PUBWEAK RTC_IRQHandler |
||
| 211 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 212 | RTC_IRQHandler |
||
| 213 | B RTC_IRQHandler |
||
| 214 | |||
| 215 | PUBWEAK FLASH_IRQHandler |
||
| 216 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 217 | FLASH_IRQHandler |
||
| 218 | B FLASH_IRQHandler |
||
| 219 | |||
| 220 | PUBWEAK RCC_IRQHandler |
||
| 221 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 222 | RCC_IRQHandler |
||
| 223 | B RCC_IRQHandler |
||
| 224 | |||
| 225 | PUBWEAK EXTI0_IRQHandler |
||
| 226 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 227 | EXTI0_IRQHandler |
||
| 228 | B EXTI0_IRQHandler |
||
| 229 | |||
| 230 | PUBWEAK EXTI1_IRQHandler |
||
| 231 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 232 | EXTI1_IRQHandler |
||
| 233 | B EXTI1_IRQHandler |
||
| 234 | |||
| 235 | PUBWEAK EXTI2_IRQHandler |
||
| 236 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 237 | EXTI2_IRQHandler |
||
| 238 | B EXTI2_IRQHandler |
||
| 239 | |||
| 240 | PUBWEAK EXTI3_IRQHandler |
||
| 241 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 242 | EXTI3_IRQHandler |
||
| 243 | B EXTI3_IRQHandler |
||
| 244 | |||
| 245 | PUBWEAK EXTI4_IRQHandler |
||
| 246 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 247 | EXTI4_IRQHandler |
||
| 248 | B EXTI4_IRQHandler |
||
| 249 | |||
| 250 | PUBWEAK DMA1_Channel1_IRQHandler |
||
| 251 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 252 | DMA1_Channel1_IRQHandler |
||
| 253 | B DMA1_Channel1_IRQHandler |
||
| 254 | |||
| 255 | PUBWEAK DMA1_Channel2_IRQHandler |
||
| 256 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 257 | DMA1_Channel2_IRQHandler |
||
| 258 | B DMA1_Channel2_IRQHandler |
||
| 259 | |||
| 260 | PUBWEAK DMA1_Channel3_IRQHandler |
||
| 261 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 262 | DMA1_Channel3_IRQHandler |
||
| 263 | B DMA1_Channel3_IRQHandler |
||
| 264 | |||
| 265 | PUBWEAK DMA1_Channel4_IRQHandler |
||
| 266 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 267 | DMA1_Channel4_IRQHandler |
||
| 268 | B DMA1_Channel4_IRQHandler |
||
| 269 | |||
| 270 | PUBWEAK DMA1_Channel5_IRQHandler |
||
| 271 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 272 | DMA1_Channel5_IRQHandler |
||
| 273 | B DMA1_Channel5_IRQHandler |
||
| 274 | |||
| 275 | PUBWEAK DMA1_Channel6_IRQHandler |
||
| 276 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 277 | DMA1_Channel6_IRQHandler |
||
| 278 | B DMA1_Channel6_IRQHandler |
||
| 279 | |||
| 280 | PUBWEAK DMA1_Channel7_IRQHandler |
||
| 281 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 282 | DMA1_Channel7_IRQHandler |
||
| 283 | B DMA1_Channel7_IRQHandler |
||
| 284 | |||
| 285 | PUBWEAK ADC1_IRQHandler |
||
| 286 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 287 | ADC1_IRQHandler |
||
| 288 | B ADC1_IRQHandler |
||
| 289 | |||
| 290 | PUBWEAK EXTI9_5_IRQHandler |
||
| 291 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 292 | EXTI9_5_IRQHandler |
||
| 293 | B EXTI9_5_IRQHandler |
||
| 294 | |||
| 295 | PUBWEAK TIM2_IRQHandler |
||
| 296 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 297 | TIM2_IRQHandler |
||
| 298 | B TIM2_IRQHandler |
||
| 299 | |||
| 300 | PUBWEAK TIM3_IRQHandler |
||
| 301 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 302 | TIM3_IRQHandler |
||
| 303 | B TIM3_IRQHandler |
||
| 304 | |||
| 305 | PUBWEAK TIM4_IRQHandler |
||
| 306 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 307 | TIM4_IRQHandler |
||
| 308 | B TIM4_IRQHandler |
||
| 309 | |||
| 310 | PUBWEAK I2C1_EV_IRQHandler |
||
| 311 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 312 | I2C1_EV_IRQHandler |
||
| 313 | B I2C1_EV_IRQHandler |
||
| 314 | |||
| 315 | PUBWEAK I2C1_ER_IRQHandler |
||
| 316 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 317 | I2C1_ER_IRQHandler |
||
| 318 | B I2C1_ER_IRQHandler |
||
| 319 | |||
| 320 | PUBWEAK I2C2_EV_IRQHandler |
||
| 321 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 322 | I2C2_EV_IRQHandler |
||
| 323 | B I2C2_EV_IRQHandler |
||
| 324 | |||
| 325 | PUBWEAK I2C2_ER_IRQHandler |
||
| 326 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 327 | I2C2_ER_IRQHandler |
||
| 328 | B I2C2_ER_IRQHandler |
||
| 329 | |||
| 330 | PUBWEAK SPI1_IRQHandler |
||
| 331 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 332 | SPI1_IRQHandler |
||
| 333 | B SPI1_IRQHandler |
||
| 334 | |||
| 335 | PUBWEAK SPI2_IRQHandler |
||
| 336 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 337 | SPI2_IRQHandler |
||
| 338 | B SPI2_IRQHandler |
||
| 339 | |||
| 340 | PUBWEAK USART1_IRQHandler |
||
| 341 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 342 | USART1_IRQHandler |
||
| 343 | B USART1_IRQHandler |
||
| 344 | |||
| 345 | PUBWEAK USART2_IRQHandler |
||
| 346 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 347 | USART2_IRQHandler |
||
| 348 | B USART2_IRQHandler |
||
| 349 | |||
| 350 | PUBWEAK USART3_IRQHandler |
||
| 351 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 352 | USART3_IRQHandler |
||
| 353 | B USART3_IRQHandler |
||
| 354 | |||
| 355 | PUBWEAK EXTI15_10_IRQHandler |
||
| 356 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 357 | EXTI15_10_IRQHandler |
||
| 358 | B EXTI15_10_IRQHandler |
||
| 359 | |||
| 360 | PUBWEAK RTC_Alarm_IRQHandler |
||
| 361 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 362 | RTC_Alarm_IRQHandler |
||
| 363 | B RTC_Alarm_IRQHandler |
||
| 364 | |||
| 365 | PUBWEAK FSMC_IRQHandler |
||
| 366 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 367 | FSMC_IRQHandler |
||
| 368 | B FSMC_IRQHandler |
||
| 369 | |||
| 370 | PUBWEAK SDIO_IRQHandler |
||
| 371 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 372 | SDIO_IRQHandler |
||
| 373 | B SDIO_IRQHandler |
||
| 374 | |||
| 375 | PUBWEAK TIM5_IRQHandler |
||
| 376 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 377 | TIM5_IRQHandler |
||
| 378 | B TIM5_IRQHandler |
||
| 379 | |||
| 380 | PUBWEAK SPI3_IRQHandler |
||
| 381 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 382 | SPI3_IRQHandler |
||
| 383 | B SPI3_IRQHandler |
||
| 384 | |||
| 385 | PUBWEAK UART4_IRQHandler |
||
| 386 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 387 | UART4_IRQHandler |
||
| 388 | B UART4_IRQHandler |
||
| 389 | |||
| 390 | PUBWEAK UART5_IRQHandler |
||
| 391 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 392 | UART5_IRQHandler |
||
| 393 | B UART5_IRQHandler |
||
| 394 | |||
| 395 | PUBWEAK TIM6_IRQHandler |
||
| 396 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 397 | TIM6_IRQHandler |
||
| 398 | B TIM6_IRQHandler |
||
| 399 | |||
| 400 | PUBWEAK TIM7_IRQHandler |
||
| 401 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 402 | TIM7_IRQHandler |
||
| 403 | B TIM7_IRQHandler |
||
| 404 | |||
| 405 | PUBWEAK DMA2_Channel1_IRQHandler |
||
| 406 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 407 | DMA2_Channel1_IRQHandler |
||
| 408 | B DMA2_Channel1_IRQHandler |
||
| 409 | |||
| 410 | PUBWEAK DMA2_Channel2_IRQHandler |
||
| 411 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 412 | DMA2_Channel2_IRQHandler |
||
| 413 | B DMA2_Channel2_IRQHandler |
||
| 414 | |||
| 415 | PUBWEAK DMA2_Channel3_IRQHandler |
||
| 416 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 417 | DMA2_Channel3_IRQHandler |
||
| 418 | B DMA2_Channel3_IRQHandler |
||
| 419 | |||
| 420 | PUBWEAK DMA2_Channel4_5_IRQHandler |
||
| 421 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 422 | DMA2_Channel4_5_IRQHandler |
||
| 423 | B DMA2_Channel4_5_IRQHandler |
||
| 424 | |||
| 425 | |||
| 426 | END |
||
| 427 | |||
| 428 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |