| [6] | 1 | /*********************************************************************
|
|---|
| 2 | * SEGGER Microcontroller GmbH *
|
|---|
| 3 | * The Embedded Experts *
|
|---|
| 4 | **********************************************************************
|
|---|
| 5 | * *
|
|---|
| 6 | * (c) 2014 - 2019 SEGGER Microcontroller GmbH *
|
|---|
| 7 | * *
|
|---|
| 8 | * www.segger.com Support: support@segger.com *
|
|---|
| 9 | * *
|
|---|
| 10 | **********************************************************************
|
|---|
| 11 | * *
|
|---|
| 12 | * All rights reserved. *
|
|---|
| 13 | * *
|
|---|
| 14 | * Redistribution and use in source and binary forms, with or *
|
|---|
| 15 | * without modification, are permitted provided that the following *
|
|---|
| 16 | * conditions are met: *
|
|---|
| 17 | * *
|
|---|
| 18 | * - Redistributions of source code must retain the above copyright *
|
|---|
| 19 | * notice, this list of conditions and the following disclaimer. *
|
|---|
| 20 | * *
|
|---|
| 21 | * - Neither the name of SEGGER Microcontroller GmbH *
|
|---|
| 22 | * nor the names of its contributors may be used to endorse or *
|
|---|
| 23 | * promote products derived from this software without specific *
|
|---|
| 24 | * prior written permission. *
|
|---|
| 25 | * *
|
|---|
| 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
|
|---|
| 27 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
|
|---|
| 28 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
|
|---|
| 29 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
|
|---|
| 30 | * DISCLAIMED. *
|
|---|
| 31 | * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR *
|
|---|
| 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
|
|---|
| 33 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
|
|---|
| 34 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
|
|---|
| 35 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
|
|---|
| 36 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
|
|---|
| 37 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
|
|---|
| 38 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
|
|---|
| 39 | * DAMAGE. *
|
|---|
| 40 | * *
|
|---|
| 41 | *********************************************************************/
|
|---|
| 42 |
|
|---|
| 43 | /*****************************************************************************
|
|---|
| 44 | * Preprocessor Definitions *
|
|---|
| 45 | * ------------------------ *
|
|---|
| 46 | * VECTORS_IN_RAM *
|
|---|
| 47 | * *
|
|---|
| 48 | * If defined, an area of RAM will large enough to store the vector table *
|
|---|
| 49 | * will be reserved. *
|
|---|
| 50 | * *
|
|---|
| 51 | *****************************************************************************/
|
|---|
| 52 |
|
|---|
| 53 | .syntax unified
|
|---|
| 54 | .code 16
|
|---|
| 55 |
|
|---|
| 56 | .section .init, "ax"
|
|---|
| 57 | .align 2
|
|---|
| 58 |
|
|---|
| 59 | /*****************************************************************************
|
|---|
| 60 | * Default Exception Handlers *
|
|---|
| 61 | *****************************************************************************/
|
|---|
| 62 |
|
|---|
| 63 | .thumb_func
|
|---|
| 64 | .weak NMI_Handler
|
|---|
| 65 | NMI_Handler:
|
|---|
| 66 | b .
|
|---|
| 67 |
|
|---|
| 68 | .thumb_func
|
|---|
| 69 | .weak HardFault_Handler
|
|---|
| 70 | HardFault_Handler:
|
|---|
| 71 | b .
|
|---|
| 72 |
|
|---|
| 73 | .thumb_func
|
|---|
| 74 | .weak SVC_Handler
|
|---|
| 75 | SVC_Handler:
|
|---|
| 76 | b .
|
|---|
| 77 |
|
|---|
| 78 | .thumb_func
|
|---|
| 79 | .weak PendSV_Handler
|
|---|
| 80 | PendSV_Handler:
|
|---|
| 81 | b .
|
|---|
| 82 |
|
|---|
| 83 | .thumb_func
|
|---|
| 84 | .weak SysTick_Handler
|
|---|
| 85 | SysTick_Handler:
|
|---|
| 86 | b .
|
|---|
| 87 |
|
|---|
| 88 | .thumb_func
|
|---|
| 89 | Dummy_Handler:
|
|---|
| 90 | b .
|
|---|
| 91 |
|
|---|
| 92 | #if defined(__OPTIMIZATION_SMALL)
|
|---|
| 93 |
|
|---|
| 94 | .weak WWDG_IRQHandler
|
|---|
| 95 | .thumb_set WWDG_IRQHandler,Dummy_Handler
|
|---|
| 96 |
|
|---|
| 97 | .weak PVD_IRQHandler
|
|---|
| 98 | .thumb_set PVD_IRQHandler,Dummy_Handler
|
|---|
| 99 |
|
|---|
| 100 | .weak RTC_STAMP_IRQHandler
|
|---|
| 101 | .thumb_set RTC_STAMP_IRQHandler,Dummy_Handler
|
|---|
| 102 |
|
|---|
| 103 | .weak FLASH_IRQHandler
|
|---|
| 104 | .thumb_set FLASH_IRQHandler,Dummy_Handler
|
|---|
| 105 |
|
|---|
| 106 | .weak RCC_IRQHandler
|
|---|
| 107 | .thumb_set RCC_IRQHandler,Dummy_Handler
|
|---|
| 108 |
|
|---|
| 109 | .weak EXTI0_1_IRQHandler
|
|---|
| 110 | .thumb_set EXTI0_1_IRQHandler,Dummy_Handler
|
|---|
| 111 |
|
|---|
| 112 | .weak EXTI2_3_IRQHandler
|
|---|
| 113 | .thumb_set EXTI2_3_IRQHandler,Dummy_Handler
|
|---|
| 114 |
|
|---|
| 115 | .weak EXTI4_15_IRQHandler
|
|---|
| 116 | .thumb_set EXTI4_15_IRQHandler,Dummy_Handler
|
|---|
| 117 |
|
|---|
| 118 | .weak UCPD1_UCPD2_IRQHandler
|
|---|
| 119 | .thumb_set UCPD1_UCPD2_IRQHandler,Dummy_Handler
|
|---|
| 120 |
|
|---|
| 121 | .weak DMA_Channel1_IRQHandler
|
|---|
| 122 | .thumb_set DMA_Channel1_IRQHandler,Dummy_Handler
|
|---|
| 123 |
|
|---|
| 124 | .weak DMA_Channel2_3_IRQHandler
|
|---|
| 125 | .thumb_set DMA_Channel2_3_IRQHandler,Dummy_Handler
|
|---|
| 126 |
|
|---|
| 127 | .weak DMA_Channel4_5_6_7_IRQHandler
|
|---|
| 128 | .thumb_set DMA_Channel4_5_6_7_IRQHandler,Dummy_Handler
|
|---|
| 129 |
|
|---|
| 130 | .weak ADC_COMP_IRQHandler
|
|---|
| 131 | .thumb_set ADC_COMP_IRQHandler,Dummy_Handler
|
|---|
| 132 |
|
|---|
| 133 | .weak TIM1_BRK_UP_TRG_COMP_IRQHandler
|
|---|
| 134 | .thumb_set TIM1_BRK_UP_TRG_COMP_IRQHandler,Dummy_Handler
|
|---|
| 135 |
|
|---|
| 136 | .weak TIM1_CC_IRQHandler
|
|---|
| 137 | .thumb_set TIM1_CC_IRQHandler,Dummy_Handler
|
|---|
| 138 |
|
|---|
| 139 | .weak TIM2_IRQHandler
|
|---|
| 140 | .thumb_set TIM2_IRQHandler,Dummy_Handler
|
|---|
| 141 |
|
|---|
| 142 | .weak TIM3_IRQHandler
|
|---|
| 143 | .thumb_set TIM3_IRQHandler,Dummy_Handler
|
|---|
| 144 |
|
|---|
| 145 | .weak TIM6_DAC_LPTIM1_IRQHandler
|
|---|
| 146 | .thumb_set TIM6_DAC_LPTIM1_IRQHandler,Dummy_Handler
|
|---|
| 147 |
|
|---|
| 148 | .weak TIM7_LPTIM2_IRQHandler
|
|---|
| 149 | .thumb_set TIM7_LPTIM2_IRQHandler,Dummy_Handler
|
|---|
| 150 |
|
|---|
| 151 | .weak TIM14_IRQHandler
|
|---|
| 152 | .thumb_set TIM14_IRQHandler,Dummy_Handler
|
|---|
| 153 |
|
|---|
| 154 | .weak TIM15_IRQHandler
|
|---|
| 155 | .thumb_set TIM15_IRQHandler,Dummy_Handler
|
|---|
| 156 |
|
|---|
| 157 | .weak TIM16_IRQHandler
|
|---|
| 158 | .thumb_set TIM16_IRQHandler,Dummy_Handler
|
|---|
| 159 |
|
|---|
| 160 | .weak TIM17_IRQHandler
|
|---|
| 161 | .thumb_set TIM17_IRQHandler,Dummy_Handler
|
|---|
| 162 |
|
|---|
| 163 | .weak I2C1_IRQHandler
|
|---|
| 164 | .thumb_set I2C1_IRQHandler,Dummy_Handler
|
|---|
| 165 |
|
|---|
| 166 | .weak I2C2_IRQHandler
|
|---|
| 167 | .thumb_set I2C2_IRQHandler,Dummy_Handler
|
|---|
| 168 |
|
|---|
| 169 | .weak SPI1_IRQHandler
|
|---|
| 170 | .thumb_set SPI1_IRQHandler,Dummy_Handler
|
|---|
| 171 |
|
|---|
| 172 | .weak SPI2_IRQHandler
|
|---|
| 173 | .thumb_set SPI2_IRQHandler,Dummy_Handler
|
|---|
| 174 |
|
|---|
| 175 | .weak USART1_IRQHandler
|
|---|
| 176 | .thumb_set USART1_IRQHandler,Dummy_Handler
|
|---|
| 177 |
|
|---|
| 178 | .weak USART2_IRQHandler
|
|---|
| 179 | .thumb_set USART2_IRQHandler,Dummy_Handler
|
|---|
| 180 |
|
|---|
| 181 | .weak USART3_USART4_LPUART1_IRQHandler
|
|---|
| 182 | .thumb_set USART3_USART4_LPUART1_IRQHandler,Dummy_Handler
|
|---|
| 183 |
|
|---|
| 184 | .weak CEC_IRQHandler
|
|---|
| 185 | .thumb_set CEC_IRQHandler,Dummy_Handler
|
|---|
| 186 |
|
|---|
| 187 | .weak AES_RNG_IRQHandler
|
|---|
| 188 | .thumb_set AES_RNG_IRQHandler,Dummy_Handler
|
|---|
| 189 |
|
|---|
| 190 | #else
|
|---|
| 191 |
|
|---|
| 192 | .thumb_func
|
|---|
| 193 | .weak WWDG_IRQHandler
|
|---|
| 194 | WWDG_IRQHandler:
|
|---|
| 195 | b .
|
|---|
| 196 |
|
|---|
| 197 | .thumb_func
|
|---|
| 198 | .weak PVD_IRQHandler
|
|---|
| 199 | PVD_IRQHandler:
|
|---|
| 200 | b .
|
|---|
| 201 |
|
|---|
| 202 | .thumb_func
|
|---|
| 203 | .weak RTC_STAMP_IRQHandler
|
|---|
| 204 | RTC_STAMP_IRQHandler:
|
|---|
| 205 | b .
|
|---|
| 206 |
|
|---|
| 207 | .thumb_func
|
|---|
| 208 | .weak FLASH_IRQHandler
|
|---|
| 209 | FLASH_IRQHandler:
|
|---|
| 210 | b .
|
|---|
| 211 |
|
|---|
| 212 | .thumb_func
|
|---|
| 213 | .weak RCC_IRQHandler
|
|---|
| 214 | RCC_IRQHandler:
|
|---|
| 215 | b .
|
|---|
| 216 |
|
|---|
| 217 | .thumb_func
|
|---|
| 218 | .weak EXTI0_1_IRQHandler
|
|---|
| 219 | EXTI0_1_IRQHandler:
|
|---|
| 220 | b .
|
|---|
| 221 |
|
|---|
| 222 | .thumb_func
|
|---|
| 223 | .weak EXTI2_3_IRQHandler
|
|---|
| 224 | EXTI2_3_IRQHandler:
|
|---|
| 225 | b .
|
|---|
| 226 |
|
|---|
| 227 | .thumb_func
|
|---|
| 228 | .weak EXTI4_15_IRQHandler
|
|---|
| 229 | EXTI4_15_IRQHandler:
|
|---|
| 230 | b .
|
|---|
| 231 |
|
|---|
| 232 | .thumb_func
|
|---|
| 233 | .weak UCPD1_UCPD2_IRQHandler
|
|---|
| 234 | UCPD1_UCPD2_IRQHandler:
|
|---|
| 235 | b .
|
|---|
| 236 |
|
|---|
| 237 | .thumb_func
|
|---|
| 238 | .weak DMA_Channel1_IRQHandler
|
|---|
| 239 | DMA_Channel1_IRQHandler:
|
|---|
| 240 | b .
|
|---|
| 241 |
|
|---|
| 242 | .thumb_func
|
|---|
| 243 | .weak DMA_Channel2_3_IRQHandler
|
|---|
| 244 | DMA_Channel2_3_IRQHandler:
|
|---|
| 245 | b .
|
|---|
| 246 |
|
|---|
| 247 | .thumb_func
|
|---|
| 248 | .weak DMA_Channel4_5_6_7_IRQHandler
|
|---|
| 249 | DMA_Channel4_5_6_7_IRQHandler:
|
|---|
| 250 | b .
|
|---|
| 251 |
|
|---|
| 252 | .thumb_func
|
|---|
| 253 | .weak ADC_COMP_IRQHandler
|
|---|
| 254 | ADC_COMP_IRQHandler:
|
|---|
| 255 | b .
|
|---|
| 256 |
|
|---|
| 257 | .thumb_func
|
|---|
| 258 | .weak TIM1_BRK_UP_TRG_COMP_IRQHandler
|
|---|
| 259 | TIM1_BRK_UP_TRG_COMP_IRQHandler:
|
|---|
| 260 | b .
|
|---|
| 261 |
|
|---|
| 262 | .thumb_func
|
|---|
| 263 | .weak TIM1_CC_IRQHandler
|
|---|
| 264 | TIM1_CC_IRQHandler:
|
|---|
| 265 | b .
|
|---|
| 266 |
|
|---|
| 267 | .thumb_func
|
|---|
| 268 | .weak TIM2_IRQHandler
|
|---|
| 269 | TIM2_IRQHandler:
|
|---|
| 270 | b .
|
|---|
| 271 |
|
|---|
| 272 | .thumb_func
|
|---|
| 273 | .weak TIM3_IRQHandler
|
|---|
| 274 | TIM3_IRQHandler:
|
|---|
| 275 | b .
|
|---|
| 276 |
|
|---|
| 277 | .thumb_func
|
|---|
| 278 | .weak TIM6_DAC_LPTIM1_IRQHandler
|
|---|
| 279 | TIM6_DAC_LPTIM1_IRQHandler:
|
|---|
| 280 | b .
|
|---|
| 281 |
|
|---|
| 282 | .thumb_func
|
|---|
| 283 | .weak TIM7_LPTIM2_IRQHandler
|
|---|
| 284 | TIM7_LPTIM2_IRQHandler:
|
|---|
| 285 | b .
|
|---|
| 286 |
|
|---|
| 287 | .thumb_func
|
|---|
| 288 | .weak TIM14_IRQHandler
|
|---|
| 289 | TIM14_IRQHandler:
|
|---|
| 290 | b .
|
|---|
| 291 |
|
|---|
| 292 | .thumb_func
|
|---|
| 293 | .weak TIM15_IRQHandler
|
|---|
| 294 | TIM15_IRQHandler:
|
|---|
| 295 | b .
|
|---|
| 296 |
|
|---|
| 297 | .thumb_func
|
|---|
| 298 | .weak TIM16_IRQHandler
|
|---|
| 299 | TIM16_IRQHandler:
|
|---|
| 300 | b .
|
|---|
| 301 |
|
|---|
| 302 | .thumb_func
|
|---|
| 303 | .weak TIM17_IRQHandler
|
|---|
| 304 | TIM17_IRQHandler:
|
|---|
| 305 | b .
|
|---|
| 306 |
|
|---|
| 307 | .thumb_func
|
|---|
| 308 | .weak I2C1_IRQHandler
|
|---|
| 309 | I2C1_IRQHandler:
|
|---|
| 310 | b .
|
|---|
| 311 |
|
|---|
| 312 | .thumb_func
|
|---|
| 313 | .weak I2C2_IRQHandler
|
|---|
| 314 | I2C2_IRQHandler:
|
|---|
| 315 | b .
|
|---|
| 316 |
|
|---|
| 317 | .thumb_func
|
|---|
| 318 | .weak SPI1_IRQHandler
|
|---|
| 319 | SPI1_IRQHandler:
|
|---|
| 320 | b .
|
|---|
| 321 |
|
|---|
| 322 | .thumb_func
|
|---|
| 323 | .weak SPI2_IRQHandler
|
|---|
| 324 | SPI2_IRQHandler:
|
|---|
| 325 | b .
|
|---|
| 326 |
|
|---|
| 327 | .thumb_func
|
|---|
| 328 | .weak USART1_IRQHandler
|
|---|
| 329 | USART1_IRQHandler:
|
|---|
| 330 | b .
|
|---|
| 331 |
|
|---|
| 332 | .thumb_func
|
|---|
| 333 | .weak USART2_IRQHandler
|
|---|
| 334 | USART2_IRQHandler:
|
|---|
| 335 | b .
|
|---|
| 336 |
|
|---|
| 337 | .thumb_func
|
|---|
| 338 | .weak USART3_USART4_LPUART1_IRQHandler
|
|---|
| 339 | USART3_USART4_LPUART1_IRQHandler:
|
|---|
| 340 | b .
|
|---|
| 341 |
|
|---|
| 342 | .thumb_func
|
|---|
| 343 | .weak CEC_IRQHandler
|
|---|
| 344 | CEC_IRQHandler:
|
|---|
| 345 | b .
|
|---|
| 346 |
|
|---|
| 347 | .thumb_func
|
|---|
| 348 | .weak AES_RNG_IRQHandler
|
|---|
| 349 | AES_RNG_IRQHandler:
|
|---|
| 350 | b .
|
|---|
| 351 |
|
|---|
| 352 | #endif
|
|---|
| 353 |
|
|---|
| 354 | /*****************************************************************************
|
|---|
| 355 | * Vector Table *
|
|---|
| 356 | *****************************************************************************/
|
|---|
| 357 |
|
|---|
| 358 | .section .vectors, "ax"
|
|---|
| 359 | .align 2
|
|---|
| 360 | .global _vectors
|
|---|
| 361 | .extern __stack_end__
|
|---|
| 362 | .extern Reset_Handler
|
|---|
| 363 |
|
|---|
| 364 | _vectors:
|
|---|
| 365 | .word __stack_end__
|
|---|
| 366 | .word Reset_Handler
|
|---|
| 367 | .word NMI_Handler
|
|---|
| 368 | .word HardFault_Handler
|
|---|
| 369 | .word 0 /* Reserved */
|
|---|
| 370 | .word 0 /* Reserved */
|
|---|
| 371 | .word 0 /* Reserved */
|
|---|
| 372 | .word 0 /* Reserved */
|
|---|
| 373 | .word 0 /* Reserved */
|
|---|
| 374 | .word 0 /* Reserved */
|
|---|
| 375 | .word 0 /* Reserved */
|
|---|
| 376 | .word SVC_Handler
|
|---|
| 377 | .word 0 /* Reserved */
|
|---|
| 378 | .word 0 /* Reserved */
|
|---|
| 379 | .word PendSV_Handler
|
|---|
| 380 | .word SysTick_Handler
|
|---|
| 381 | .word WWDG_IRQHandler
|
|---|
| 382 | .word PVD_IRQHandler
|
|---|
| 383 | .word RTC_STAMP_IRQHandler
|
|---|
| 384 | .word FLASH_IRQHandler
|
|---|
| 385 | .word RCC_IRQHandler
|
|---|
| 386 | .word EXTI0_1_IRQHandler
|
|---|
| 387 | .word EXTI2_3_IRQHandler
|
|---|
| 388 | .word EXTI4_15_IRQHandler
|
|---|
| 389 | .word UCPD1_UCPD2_IRQHandler
|
|---|
| 390 | .word DMA_Channel1_IRQHandler
|
|---|
| 391 | .word DMA_Channel2_3_IRQHandler
|
|---|
| 392 | .word DMA_Channel4_5_6_7_IRQHandler
|
|---|
| 393 | .word ADC_COMP_IRQHandler
|
|---|
| 394 | .word TIM1_BRK_UP_TRG_COMP_IRQHandler
|
|---|
| 395 | .word TIM1_CC_IRQHandler
|
|---|
| 396 | .word TIM2_IRQHandler
|
|---|
| 397 | .word TIM3_IRQHandler
|
|---|
| 398 | .word TIM6_DAC_LPTIM1_IRQHandler
|
|---|
| 399 | .word TIM7_LPTIM2_IRQHandler
|
|---|
| 400 | .word TIM14_IRQHandler
|
|---|
| 401 | .word TIM15_IRQHandler
|
|---|
| 402 | .word TIM16_IRQHandler
|
|---|
| 403 | .word TIM17_IRQHandler
|
|---|
| 404 | .word I2C1_IRQHandler
|
|---|
| 405 | .word I2C2_IRQHandler
|
|---|
| 406 | .word SPI1_IRQHandler
|
|---|
| 407 | .word SPI2_IRQHandler
|
|---|
| 408 | .word USART1_IRQHandler
|
|---|
| 409 | .word USART2_IRQHandler
|
|---|
| 410 | .word USART3_USART4_LPUART1_IRQHandler
|
|---|
| 411 | .word CEC_IRQHandler
|
|---|
| 412 | .word AES_RNG_IRQHandler
|
|---|
| 413 | _vectors_end:
|
|---|
| 414 |
|
|---|
| 415 | #ifdef VECTORS_IN_RAM
|
|---|
| 416 | .section .vectors_ram, "ax"
|
|---|
| 417 | .align 2
|
|---|
| 418 | .global _vectors_ram
|
|---|
| 419 |
|
|---|
| 420 | _vectors_ram:
|
|---|
| 421 | .space _vectors_end - _vectors, 0
|
|---|
| 422 | #endif
|
|---|