1 ;/******************** (C) COPYRIGHT 2017 STMicroelectronics ********************
2 ;* File Name : startup_stm32f410tx.s
3 ;* Author : MCD Application Team
4 ;* Description : STM32F410Tx 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
10 ;* - Configure the system clock
11 ;* - Branches to main in the C library (which eventually
13 ;* After Reset the Cortex-M4 processor is in Thread mode,
14 ;* priority is Privileged, and the Stack is set to Main.
15 ;********************************************************************************
17 ;* Redistribution and use in source and binary forms, with or without modification,
18 ;* are permitted provided that the following conditions are met:
19 ;* 1. Redistributions of source code must retain the above copyright notice,
20 ;* this list of conditions and the following disclaimer.
21 ;* 2. Redistributions in binary form must reproduce the above copyright notice,
22 ;* this list of conditions and the following disclaimer in the documentation
23 ;* and/or other materials provided with the distribution.
24 ;* 3. Neither the name of STMicroelectronics nor the names of its contributors
25 ;* may be used to endorse or promote products derived from this software
26 ;* without specific prior written permission.
28 ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31 ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
32 ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34 ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35 ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36 ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 ;*******************************************************************************
42 ; The modules in this file are included in the libraries, and may be replaced
43 ; by any user-defined modules that define the PUBLIC symbol _program_start or
44 ; a user defined start symbol.
45 ; To override the cstartup defined in the library, simply add your modified
46 ; version to the workbench project.
48 ; The vector table is normally located at address 0.
49 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
50 ; The name "__vector_table" has special meaning for C-SPY:
51 ; it is where the SP start value is found, and the NVIC vector
52 ; table register (VTOR) is initialized to this address if != 0.
59 ;; Forward declaration of sections.
60 SECTION CSTACK:DATA:NOROOT(3)
62 SECTION .intvec:CODE:NOROOT(2)
64 EXTERN __iar_program_start
71 DCD Reset_Handler ; Reset Handler
73 DCD NMI_Handler ; NMI Handler
74 DCD HardFault_Handler ; Hard Fault Handler
75 DCD MemManage_Handler ; MPU Fault Handler
76 DCD BusFault_Handler ; Bus Fault Handler
77 DCD UsageFault_Handler ; Usage Fault Handler
82 DCD SVC_Handler ; SVCall Handler
83 DCD DebugMon_Handler ; Debug Monitor Handler
85 DCD PendSV_Handler ; PendSV Handler
86 DCD SysTick_Handler ; SysTick Handler
89 DCD WWDG_IRQHandler ; Window WatchDog
90 DCD PVD_IRQHandler ; PVD through EXTI Line detection
91 DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line
92 DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line
93 DCD FLASH_IRQHandler ; FLASH
94 DCD RCC_IRQHandler ; RCC
95 DCD EXTI0_IRQHandler ; EXTI Line0
96 DCD EXTI1_IRQHandler ; EXTI Line1
97 DCD EXTI2_IRQHandler ; EXTI Line2
98 DCD EXTI3_IRQHandler ; EXTI Line3
99 DCD EXTI4_IRQHandler ; EXTI Line4
100 DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0
101 DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1
102 DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2
103 DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3
104 DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4
105 DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5
106 DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6
107 DCD ADC_IRQHandler ; ADC1
112 DCD EXTI9_5_IRQHandler ; External Line[9:5]s
113 DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9
114 DCD TIM1_UP_IRQHandler ; TIM1 Update
115 DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11
116 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
120 DCD I2C1_EV_IRQHandler ; I2C1 Event
121 DCD I2C1_ER_IRQHandler ; I2C1 Error
122 DCD I2C2_EV_IRQHandler ; I2C2 Event
123 DCD I2C2_ER_IRQHandler ; I2C2 Error
124 DCD SPI1_IRQHandler ; SPI1
126 DCD USART1_IRQHandler ; USART1
127 DCD USART2_IRQHandler ; USART2
129 DCD EXTI15_10_IRQHandler ; External Line[15:10]s
130 DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
136 DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7
139 DCD TIM5_IRQHandler ; TIM5
143 DCD TIM6_DAC_IRQHandler ; TIM6 and DAC
145 DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0
146 DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1
147 DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2
148 DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3
149 DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4
157 DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5
158 DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6
159 DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7
169 DCD RNG_IRQHandler ; RNG
170 DCD FPU_IRQHandler ; FPU
184 DCD FMPI2C1_EV_IRQHandler ; FMPI2C1 Event
185 DCD FMPI2C1_ER_IRQHandler ; FMPI2C1 Error
186 DCD LPTIM1_IRQHandler ; LP TIM1
188 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
190 ;; Default interrupt handlers.
193 PUBWEAK Reset_Handler
194 SECTION .text:CODE:REORDER:NOROOT(2)
199 LDR R0, =__iar_program_start
203 SECTION .text:CODE:REORDER:NOROOT(1)
207 PUBWEAK HardFault_Handler
208 SECTION .text:CODE:REORDER:NOROOT(1)
212 PUBWEAK MemManage_Handler
213 SECTION .text:CODE:REORDER:NOROOT(1)
217 PUBWEAK BusFault_Handler
218 SECTION .text:CODE:REORDER:NOROOT(1)
222 PUBWEAK UsageFault_Handler
223 SECTION .text:CODE:REORDER:NOROOT(1)
228 SECTION .text:CODE:REORDER:NOROOT(1)
232 PUBWEAK DebugMon_Handler
233 SECTION .text:CODE:REORDER:NOROOT(1)
237 PUBWEAK PendSV_Handler
238 SECTION .text:CODE:REORDER:NOROOT(1)
242 PUBWEAK SysTick_Handler
243 SECTION .text:CODE:REORDER:NOROOT(1)
247 PUBWEAK WWDG_IRQHandler
248 SECTION .text:CODE:REORDER:NOROOT(1)
252 PUBWEAK PVD_IRQHandler
253 SECTION .text:CODE:REORDER:NOROOT(1)
257 PUBWEAK TAMP_STAMP_IRQHandler
258 SECTION .text:CODE:REORDER:NOROOT(1)
259 TAMP_STAMP_IRQHandler
260 B TAMP_STAMP_IRQHandler
262 PUBWEAK RTC_WKUP_IRQHandler
263 SECTION .text:CODE:REORDER:NOROOT(1)
265 B RTC_WKUP_IRQHandler
267 PUBWEAK FLASH_IRQHandler
268 SECTION .text:CODE:REORDER:NOROOT(1)
272 PUBWEAK RCC_IRQHandler
273 SECTION .text:CODE:REORDER:NOROOT(1)
277 PUBWEAK EXTI0_IRQHandler
278 SECTION .text:CODE:REORDER:NOROOT(1)
282 PUBWEAK EXTI1_IRQHandler
283 SECTION .text:CODE:REORDER:NOROOT(1)
287 PUBWEAK EXTI2_IRQHandler
288 SECTION .text:CODE:REORDER:NOROOT(1)
292 PUBWEAK EXTI3_IRQHandler
293 SECTION .text:CODE:REORDER:NOROOT(1)
297 PUBWEAK EXTI4_IRQHandler
298 SECTION .text:CODE:REORDER:NOROOT(1)
302 PUBWEAK DMA1_Stream0_IRQHandler
303 SECTION .text:CODE:REORDER:NOROOT(1)
304 DMA1_Stream0_IRQHandler
305 B DMA1_Stream0_IRQHandler
307 PUBWEAK DMA1_Stream1_IRQHandler
308 SECTION .text:CODE:REORDER:NOROOT(1)
309 DMA1_Stream1_IRQHandler
310 B DMA1_Stream1_IRQHandler
312 PUBWEAK DMA1_Stream2_IRQHandler
313 SECTION .text:CODE:REORDER:NOROOT(1)
314 DMA1_Stream2_IRQHandler
315 B DMA1_Stream2_IRQHandler
317 PUBWEAK DMA1_Stream3_IRQHandler
318 SECTION .text:CODE:REORDER:NOROOT(1)
319 DMA1_Stream3_IRQHandler
320 B DMA1_Stream3_IRQHandler
322 PUBWEAK DMA1_Stream4_IRQHandler
323 SECTION .text:CODE:REORDER:NOROOT(1)
324 DMA1_Stream4_IRQHandler
325 B DMA1_Stream4_IRQHandler
327 PUBWEAK DMA1_Stream5_IRQHandler
328 SECTION .text:CODE:REORDER:NOROOT(1)
329 DMA1_Stream5_IRQHandler
330 B DMA1_Stream5_IRQHandler
332 PUBWEAK DMA1_Stream6_IRQHandler
333 SECTION .text:CODE:REORDER:NOROOT(1)
334 DMA1_Stream6_IRQHandler
335 B DMA1_Stream6_IRQHandler
337 PUBWEAK ADC_IRQHandler
338 SECTION .text:CODE:REORDER:NOROOT(1)
342 PUBWEAK EXTI9_5_IRQHandler
343 SECTION .text:CODE:REORDER:NOROOT(1)
347 PUBWEAK TIM1_BRK_TIM9_IRQHandler
348 SECTION .text:CODE:REORDER:NOROOT(1)
349 TIM1_BRK_TIM9_IRQHandler
350 B TIM1_BRK_TIM9_IRQHandler
352 PUBWEAK TIM1_UP_IRQHandler
353 SECTION .text:CODE:REORDER:NOROOT(1)
357 PUBWEAK TIM1_TRG_COM_TIM11_IRQHandler
358 SECTION .text:CODE:REORDER:NOROOT(1)
359 TIM1_TRG_COM_TIM11_IRQHandler
360 B TIM1_TRG_COM_TIM11_IRQHandler
362 PUBWEAK TIM1_CC_IRQHandler
363 SECTION .text:CODE:REORDER:NOROOT(1)
367 PUBWEAK I2C1_EV_IRQHandler
368 SECTION .text:CODE:REORDER:NOROOT(1)
372 PUBWEAK I2C1_ER_IRQHandler
373 SECTION .text:CODE:REORDER:NOROOT(1)
377 PUBWEAK I2C2_EV_IRQHandler
378 SECTION .text:CODE:REORDER:NOROOT(1)
382 PUBWEAK I2C2_ER_IRQHandler
383 SECTION .text:CODE:REORDER:NOROOT(1)
387 PUBWEAK SPI1_IRQHandler
388 SECTION .text:CODE:REORDER:NOROOT(1)
392 PUBWEAK USART1_IRQHandler
393 SECTION .text:CODE:REORDER:NOROOT(1)
397 PUBWEAK USART2_IRQHandler
398 SECTION .text:CODE:REORDER:NOROOT(1)
402 PUBWEAK EXTI15_10_IRQHandler
403 SECTION .text:CODE:REORDER:NOROOT(1)
405 B EXTI15_10_IRQHandler
407 PUBWEAK RTC_Alarm_IRQHandler
408 SECTION .text:CODE:REORDER:NOROOT(1)
410 B RTC_Alarm_IRQHandler
412 PUBWEAK DMA1_Stream7_IRQHandler
413 SECTION .text:CODE:REORDER:NOROOT(1)
414 DMA1_Stream7_IRQHandler
415 B DMA1_Stream7_IRQHandler
417 PUBWEAK TIM5_IRQHandler
418 SECTION .text:CODE:REORDER:NOROOT(1)
422 PUBWEAK TIM6_DAC_IRQHandler
423 SECTION .text:CODE:REORDER:NOROOT(1)
425 B TIM6_DAC_IRQHandler
427 PUBWEAK DMA2_Stream0_IRQHandler
428 SECTION .text:CODE:REORDER:NOROOT(1)
429 DMA2_Stream0_IRQHandler
430 B DMA2_Stream0_IRQHandler
432 PUBWEAK DMA2_Stream1_IRQHandler
433 SECTION .text:CODE:REORDER:NOROOT(1)
434 DMA2_Stream1_IRQHandler
435 B DMA2_Stream1_IRQHandler
437 PUBWEAK DMA2_Stream2_IRQHandler
438 SECTION .text:CODE:REORDER:NOROOT(1)
439 DMA2_Stream2_IRQHandler
440 B DMA2_Stream2_IRQHandler
442 PUBWEAK DMA2_Stream3_IRQHandler
443 SECTION .text:CODE:REORDER:NOROOT(1)
444 DMA2_Stream3_IRQHandler
445 B DMA2_Stream3_IRQHandler
447 PUBWEAK DMA2_Stream4_IRQHandler
448 SECTION .text:CODE:REORDER:NOROOT(1)
449 DMA2_Stream4_IRQHandler
450 B DMA2_Stream4_IRQHandler
452 PUBWEAK DMA2_Stream5_IRQHandler
453 SECTION .text:CODE:REORDER:NOROOT(1)
454 DMA2_Stream5_IRQHandler
455 B DMA2_Stream5_IRQHandler
457 PUBWEAK DMA2_Stream6_IRQHandler
458 SECTION .text:CODE:REORDER:NOROOT(1)
459 DMA2_Stream6_IRQHandler
460 B DMA2_Stream6_IRQHandler
462 PUBWEAK DMA2_Stream7_IRQHandler
463 SECTION .text:CODE:REORDER:NOROOT(1)
464 DMA2_Stream7_IRQHandler
465 B DMA2_Stream7_IRQHandler
467 PUBWEAK RNG_IRQHandler
468 SECTION .text:CODE:REORDER:NOROOT(1)
472 PUBWEAK FPU_IRQHandler
473 SECTION .text:CODE:REORDER:NOROOT(1)
477 PUBWEAK FMPI2C1_EV_IRQHandler
478 SECTION .text:CODE:REORDER:NOROOT(1)
479 FMPI2C1_EV_IRQHandler
480 B FMPI2C1_EV_IRQHandler
482 PUBWEAK FMPI2C1_ER_IRQHandler
483 SECTION .text:CODE:REORDER:NOROOT(1)
484 FMPI2C1_ER_IRQHandler
485 B FMPI2C1_ER_IRQHandler
487 PUBWEAK LPTIM1_IRQHandler
488 SECTION .text:CODE:REORDER:NOROOT(1)
493 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/