Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | ;******************** (C) COPYRIGHT 2017 STMicroelectronics ******************** |
| 2 | ;* File Name : startup_stm32f100xb.s |
||
| 3 | ;* Author : MCD Application Team |
||
| 4 | ;* Description : STM32F100xB Value Line Devices vector table |
||
| 5 | ;* for EWARM toolchain. |
||
| 6 | ;* This module performs: |
||
| 7 | ;* - Set the initial SP |
||
| 8 | ;* - Configure the clock system |
||
| 9 | ;* - Set the initial PC == __iar_program_start, |
||
| 10 | ;* - Set the vector table entries with the exceptions ISR |
||
| 11 | ;* address. |
||
| 12 | ;* After Reset the Cortex-M3 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) 2017 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 | DCD NMI_Handler ; NMI Handler |
||
| 59 | DCD HardFault_Handler ; Hard Fault Handler |
||
| 60 | DCD MemManage_Handler ; MPU Fault Handler |
||
| 61 | DCD BusFault_Handler ; Bus Fault Handler |
||
| 62 | DCD UsageFault_Handler ; Usage Fault Handler |
||
| 63 | DCD 0 ; Reserved |
||
| 64 | DCD 0 ; Reserved |
||
| 65 | DCD 0 ; Reserved |
||
| 66 | DCD 0 ; Reserved |
||
| 67 | DCD SVC_Handler ; SVCall Handler |
||
| 68 | DCD DebugMon_Handler ; Debug Monitor Handler |
||
| 69 | DCD 0 ; Reserved |
||
| 70 | DCD PendSV_Handler ; PendSV Handler |
||
| 71 | DCD SysTick_Handler ; SysTick Handler |
||
| 72 | |||
| 73 | ; External Interrupts |
||
| 74 | DCD WWDG_IRQHandler ; Window Watchdog |
||
| 75 | DCD PVD_IRQHandler ; PVD through EXTI Line detect |
||
| 76 | DCD TAMPER_IRQHandler ; Tamper |
||
| 77 | DCD RTC_IRQHandler ; RTC |
||
| 78 | DCD FLASH_IRQHandler ; Flash |
||
| 79 | DCD RCC_IRQHandler ; RCC |
||
| 80 | DCD EXTI0_IRQHandler ; EXTI Line 0 |
||
| 81 | DCD EXTI1_IRQHandler ; EXTI Line 1 |
||
| 82 | DCD EXTI2_IRQHandler ; EXTI Line 2 |
||
| 83 | DCD EXTI3_IRQHandler ; EXTI Line 3 |
||
| 84 | DCD EXTI4_IRQHandler ; EXTI Line 4 |
||
| 85 | DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 |
||
| 86 | DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2 |
||
| 87 | DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3 |
||
| 88 | DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4 |
||
| 89 | DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5 |
||
| 90 | DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6 |
||
| 91 | DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7 |
||
| 92 | DCD ADC1_IRQHandler ; ADC1 |
||
| 93 | DCD 0 ; Reserved |
||
| 94 | DCD 0 ; Reserved |
||
| 95 | DCD 0 ; Reserved |
||
| 96 | DCD 0 ; Reserved |
||
| 97 | DCD EXTI9_5_IRQHandler ; EXTI Line 9..5 |
||
| 98 | DCD TIM1_BRK_TIM15_IRQHandler ; TIM1 Break and TIM15 |
||
| 99 | DCD TIM1_UP_TIM16_IRQHandler ; TIM1 Update and TIM16 |
||
| 100 | DCD TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Commutation and TIM17 |
||
| 101 | DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare |
||
| 102 | DCD TIM2_IRQHandler ; TIM2 |
||
| 103 | DCD TIM3_IRQHandler ; TIM3 |
||
| 104 | DCD TIM4_IRQHandler ; TIM4 |
||
| 105 | DCD I2C1_EV_IRQHandler ; I2C1 Event |
||
| 106 | DCD I2C1_ER_IRQHandler ; I2C1 Error |
||
| 107 | DCD I2C2_EV_IRQHandler ; I2C2 Event |
||
| 108 | DCD I2C2_ER_IRQHandler ; I2C2 Error |
||
| 109 | DCD SPI1_IRQHandler ; SPI1 |
||
| 110 | DCD SPI2_IRQHandler ; SPI2 |
||
| 111 | DCD USART1_IRQHandler ; USART1 |
||
| 112 | DCD USART2_IRQHandler ; USART2 |
||
| 113 | DCD USART3_IRQHandler ; USART3 |
||
| 114 | DCD EXTI15_10_IRQHandler ; EXTI Line 15..10 |
||
| 115 | DCD RTC_Alarm_IRQHandler ; RTC Alarm through EXTI Line |
||
| 116 | DCD CEC_IRQHandler ; HDMI-CEC |
||
| 117 | DCD 0 ; Reserved |
||
| 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 0 ; Reserved |
||
| 125 | DCD 0 ; Reserved |
||
| 126 | DCD 0 ; Reserved |
||
| 127 | DCD 0 ; Reserved |
||
| 128 | DCD TIM6_DAC_IRQHandler ; TIM6 and DAC underrun |
||
| 129 | DCD TIM7_IRQHandler ; TIM7 |
||
| 130 | |||
| 131 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
| 132 | ;; |
||
| 133 | ;; Default interrupt handlers. |
||
| 134 | ;; |
||
| 135 | THUMB |
||
| 136 | |||
| 137 | PUBWEAK Reset_Handler |
||
| 138 | SECTION .text:CODE:REORDER:NOROOT(2) |
||
| 139 | Reset_Handler |
||
| 140 | LDR R0, =SystemInit |
||
| 141 | BLX R0 |
||
| 142 | LDR R0, =__iar_program_start |
||
| 143 | BX R0 |
||
| 144 | |||
| 145 | PUBWEAK NMI_Handler |
||
| 146 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 147 | NMI_Handler |
||
| 148 | B NMI_Handler |
||
| 149 | |||
| 150 | PUBWEAK HardFault_Handler |
||
| 151 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 152 | HardFault_Handler |
||
| 153 | B HardFault_Handler |
||
| 154 | |||
| 155 | PUBWEAK MemManage_Handler |
||
| 156 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 157 | MemManage_Handler |
||
| 158 | B MemManage_Handler |
||
| 159 | |||
| 160 | PUBWEAK BusFault_Handler |
||
| 161 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 162 | BusFault_Handler |
||
| 163 | B BusFault_Handler |
||
| 164 | |||
| 165 | PUBWEAK UsageFault_Handler |
||
| 166 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 167 | UsageFault_Handler |
||
| 168 | B UsageFault_Handler |
||
| 169 | |||
| 170 | PUBWEAK SVC_Handler |
||
| 171 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 172 | SVC_Handler |
||
| 173 | B SVC_Handler |
||
| 174 | |||
| 175 | PUBWEAK DebugMon_Handler |
||
| 176 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 177 | DebugMon_Handler |
||
| 178 | B DebugMon_Handler |
||
| 179 | |||
| 180 | PUBWEAK PendSV_Handler |
||
| 181 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 182 | PendSV_Handler |
||
| 183 | B PendSV_Handler |
||
| 184 | |||
| 185 | PUBWEAK SysTick_Handler |
||
| 186 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 187 | SysTick_Handler |
||
| 188 | B SysTick_Handler |
||
| 189 | |||
| 190 | PUBWEAK WWDG_IRQHandler |
||
| 191 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 192 | WWDG_IRQHandler |
||
| 193 | B WWDG_IRQHandler |
||
| 194 | |||
| 195 | PUBWEAK PVD_IRQHandler |
||
| 196 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 197 | PVD_IRQHandler |
||
| 198 | B PVD_IRQHandler |
||
| 199 | |||
| 200 | PUBWEAK TAMPER_IRQHandler |
||
| 201 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 202 | TAMPER_IRQHandler |
||
| 203 | B TAMPER_IRQHandler |
||
| 204 | |||
| 205 | PUBWEAK RTC_IRQHandler |
||
| 206 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 207 | RTC_IRQHandler |
||
| 208 | B RTC_IRQHandler |
||
| 209 | |||
| 210 | PUBWEAK FLASH_IRQHandler |
||
| 211 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 212 | FLASH_IRQHandler |
||
| 213 | B FLASH_IRQHandler |
||
| 214 | |||
| 215 | PUBWEAK RCC_IRQHandler |
||
| 216 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 217 | RCC_IRQHandler |
||
| 218 | B RCC_IRQHandler |
||
| 219 | |||
| 220 | PUBWEAK EXTI0_IRQHandler |
||
| 221 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 222 | EXTI0_IRQHandler |
||
| 223 | B EXTI0_IRQHandler |
||
| 224 | |||
| 225 | PUBWEAK EXTI1_IRQHandler |
||
| 226 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 227 | EXTI1_IRQHandler |
||
| 228 | B EXTI1_IRQHandler |
||
| 229 | |||
| 230 | PUBWEAK EXTI2_IRQHandler |
||
| 231 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 232 | EXTI2_IRQHandler |
||
| 233 | B EXTI2_IRQHandler |
||
| 234 | |||
| 235 | PUBWEAK EXTI3_IRQHandler |
||
| 236 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 237 | EXTI3_IRQHandler |
||
| 238 | B EXTI3_IRQHandler |
||
| 239 | |||
| 240 | PUBWEAK EXTI4_IRQHandler |
||
| 241 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 242 | EXTI4_IRQHandler |
||
| 243 | B EXTI4_IRQHandler |
||
| 244 | |||
| 245 | PUBWEAK DMA1_Channel1_IRQHandler |
||
| 246 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 247 | DMA1_Channel1_IRQHandler |
||
| 248 | B DMA1_Channel1_IRQHandler |
||
| 249 | |||
| 250 | PUBWEAK DMA1_Channel2_IRQHandler |
||
| 251 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 252 | DMA1_Channel2_IRQHandler |
||
| 253 | B DMA1_Channel2_IRQHandler |
||
| 254 | |||
| 255 | PUBWEAK DMA1_Channel3_IRQHandler |
||
| 256 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 257 | DMA1_Channel3_IRQHandler |
||
| 258 | B DMA1_Channel3_IRQHandler |
||
| 259 | |||
| 260 | PUBWEAK DMA1_Channel4_IRQHandler |
||
| 261 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 262 | DMA1_Channel4_IRQHandler |
||
| 263 | B DMA1_Channel4_IRQHandler |
||
| 264 | |||
| 265 | PUBWEAK DMA1_Channel5_IRQHandler |
||
| 266 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 267 | DMA1_Channel5_IRQHandler |
||
| 268 | B DMA1_Channel5_IRQHandler |
||
| 269 | |||
| 270 | PUBWEAK DMA1_Channel6_IRQHandler |
||
| 271 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 272 | DMA1_Channel6_IRQHandler |
||
| 273 | B DMA1_Channel6_IRQHandler |
||
| 274 | |||
| 275 | PUBWEAK DMA1_Channel7_IRQHandler |
||
| 276 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 277 | DMA1_Channel7_IRQHandler |
||
| 278 | B DMA1_Channel7_IRQHandler |
||
| 279 | |||
| 280 | PUBWEAK ADC1_IRQHandler |
||
| 281 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 282 | ADC1_IRQHandler |
||
| 283 | B ADC1_IRQHandler |
||
| 284 | |||
| 285 | PUBWEAK EXTI9_5_IRQHandler |
||
| 286 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 287 | EXTI9_5_IRQHandler |
||
| 288 | B EXTI9_5_IRQHandler |
||
| 289 | |||
| 290 | PUBWEAK TIM1_BRK_TIM15_IRQHandler |
||
| 291 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 292 | TIM1_BRK_TIM15_IRQHandler |
||
| 293 | B TIM1_BRK_TIM15_IRQHandler |
||
| 294 | |||
| 295 | PUBWEAK TIM1_UP_TIM16_IRQHandler |
||
| 296 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 297 | TIM1_UP_TIM16_IRQHandler |
||
| 298 | B TIM1_UP_TIM16_IRQHandler |
||
| 299 | |||
| 300 | PUBWEAK TIM1_TRG_COM_TIM17_IRQHandler |
||
| 301 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 302 | TIM1_TRG_COM_TIM17_IRQHandler |
||
| 303 | B TIM1_TRG_COM_TIM17_IRQHandler |
||
| 304 | |||
| 305 | PUBWEAK TIM1_CC_IRQHandler |
||
| 306 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 307 | TIM1_CC_IRQHandler |
||
| 308 | B TIM1_CC_IRQHandler |
||
| 309 | |||
| 310 | PUBWEAK TIM2_IRQHandler |
||
| 311 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 312 | TIM2_IRQHandler |
||
| 313 | B TIM2_IRQHandler |
||
| 314 | |||
| 315 | PUBWEAK TIM3_IRQHandler |
||
| 316 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 317 | TIM3_IRQHandler |
||
| 318 | B TIM3_IRQHandler |
||
| 319 | |||
| 320 | PUBWEAK TIM4_IRQHandler |
||
| 321 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 322 | TIM4_IRQHandler |
||
| 323 | B TIM4_IRQHandler |
||
| 324 | |||
| 325 | PUBWEAK I2C1_EV_IRQHandler |
||
| 326 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 327 | I2C1_EV_IRQHandler |
||
| 328 | B I2C1_EV_IRQHandler |
||
| 329 | |||
| 330 | PUBWEAK I2C1_ER_IRQHandler |
||
| 331 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 332 | I2C1_ER_IRQHandler |
||
| 333 | B I2C1_ER_IRQHandler |
||
| 334 | |||
| 335 | PUBWEAK I2C2_EV_IRQHandler |
||
| 336 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 337 | I2C2_EV_IRQHandler |
||
| 338 | B I2C2_EV_IRQHandler |
||
| 339 | |||
| 340 | PUBWEAK I2C2_ER_IRQHandler |
||
| 341 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 342 | I2C2_ER_IRQHandler |
||
| 343 | B I2C2_ER_IRQHandler |
||
| 344 | |||
| 345 | PUBWEAK SPI1_IRQHandler |
||
| 346 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 347 | SPI1_IRQHandler |
||
| 348 | B SPI1_IRQHandler |
||
| 349 | |||
| 350 | PUBWEAK SPI2_IRQHandler |
||
| 351 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 352 | SPI2_IRQHandler |
||
| 353 | B SPI2_IRQHandler |
||
| 354 | |||
| 355 | PUBWEAK USART1_IRQHandler |
||
| 356 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 357 | USART1_IRQHandler |
||
| 358 | B USART1_IRQHandler |
||
| 359 | |||
| 360 | PUBWEAK USART2_IRQHandler |
||
| 361 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 362 | USART2_IRQHandler |
||
| 363 | B USART2_IRQHandler |
||
| 364 | |||
| 365 | PUBWEAK USART3_IRQHandler |
||
| 366 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 367 | USART3_IRQHandler |
||
| 368 | B USART3_IRQHandler |
||
| 369 | |||
| 370 | PUBWEAK EXTI15_10_IRQHandler |
||
| 371 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 372 | EXTI15_10_IRQHandler |
||
| 373 | B EXTI15_10_IRQHandler |
||
| 374 | |||
| 375 | PUBWEAK RTC_Alarm_IRQHandler |
||
| 376 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 377 | RTC_Alarm_IRQHandler |
||
| 378 | B RTC_Alarm_IRQHandler |
||
| 379 | |||
| 380 | PUBWEAK CEC_IRQHandler |
||
| 381 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 382 | CEC_IRQHandler |
||
| 383 | B CEC_IRQHandler |
||
| 384 | |||
| 385 | PUBWEAK TIM6_DAC_IRQHandler |
||
| 386 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 387 | TIM6_DAC_IRQHandler |
||
| 388 | B TIM6_DAC_IRQHandler |
||
| 389 | |||
| 390 | PUBWEAK TIM7_IRQHandler |
||
| 391 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 392 | TIM7_IRQHandler |
||
| 393 | B TIM7_IRQHandler |
||
| 394 | |||
| 395 | END |
||
| 396 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |