F1 and F3 HAL / LL libraries
[betaflight.git] / lib / main / STM32F3 / Drivers / CMSIS / Device / ST / STM32F3xx / Source / Templates / iar / startup_stm32f334x8.s
blob9e5a2021009b931b8296506653b3d5f0e7021958
1 ;/******************** (C) COPYRIGHT 2016 STMicroelectronics ********************
2 ;* File Name : startup_stm32f334x8.s
3 ;* Author : MCD Application Team
4 ;* Description : STM32F334x4/STM32F334x6/STM32F334x8 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-M4 processor is in Thread mode,
13 ;* priority is Privileged, and the Stack is set to Main.
14 ;********************************************************************************
16 ;* Redistribution and use in source and binary forms, with or without modification,
17 ;* are permitted provided that the following conditions are met:
18 ;* 1. Redistributions of source code must retain the above copyright notice,
19 ;* this list of conditions and the following disclaimer.
20 ;* 2. Redistributions in binary form must reproduce the above copyright notice,
21 ;* this list of conditions and the following disclaimer in the documentation
22 ;* and/or other materials provided with the distribution.
23 ;* 3. Neither the name of STMicroelectronics nor the names of its contributors
24 ;* may be used to endorse or promote products derived from this software
25 ;* without specific prior written permission.
27 ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31 ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33 ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35 ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 ;*******************************************************************************
41 ; The modules in this file are included in the libraries, and may be replaced
42 ; by any user-defined modules that define the PUBLIC symbol _program_start or
43 ; a user defined start symbol.
44 ; To override the cstartup defined in the library, simply add your modified
45 ; version to the workbench project.
47 ; The vector table is normally located at address 0.
48 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
49 ; The name "__vector_table" has special meaning for C-SPY:
50 ; it is where the SP start value is found, and the NVIC vector
51 ; table register (VTOR) is initialized to this address if != 0.
53 ; Cortex-M version
56 MODULE ?cstartup
58 ;; Forward declaration of sections.
59 SECTION CSTACK:DATA:NOROOT(3)
61 SECTION .intvec:CODE:NOROOT(2)
63 EXTERN __iar_program_start
64 EXTERN SystemInit
65 PUBLIC __vector_table
67 DATA
68 __vector_table
69 DCD sfe(CSTACK)
70 DCD Reset_Handler ; Reset Handler
72 DCD NMI_Handler ; NMI Handler
73 DCD HardFault_Handler ; Hard Fault Handler
74 DCD MemManage_Handler ; MPU Fault Handler
75 DCD BusFault_Handler ; Bus Fault Handler
76 DCD UsageFault_Handler ; Usage Fault Handler
77 DCD 0 ; Reserved
78 DCD 0 ; Reserved
79 DCD 0 ; Reserved
80 DCD 0 ; Reserved
81 DCD SVC_Handler ; SVCall Handler
82 DCD DebugMon_Handler ; Debug Monitor Handler
83 DCD 0 ; Reserved
84 DCD PendSV_Handler ; PendSV Handler
85 DCD SysTick_Handler ; SysTick Handler
87 ; External Interrupts
88 DCD WWDG_IRQHandler ; Window WatchDog
89 DCD PVD_IRQHandler ; PVD through EXTI Line detection
90 DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line
91 DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line
92 DCD FLASH_IRQHandler ; FLASH
93 DCD RCC_IRQHandler ; RCC
94 DCD EXTI0_IRQHandler ; EXTI Line0
95 DCD EXTI1_IRQHandler ; EXTI Line1
96 DCD EXTI2_TSC_IRQHandler ; EXTI Line2 and Touch Sense controller
97 DCD EXTI3_IRQHandler ; EXTI Line3
98 DCD EXTI4_IRQHandler ; EXTI Line4
99 DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
100 DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
101 DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
102 DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
103 DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
104 DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
105 DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
106 DCD ADC1_2_IRQHandler ; ADC1 and ADC2
107 DCD CAN_TX_IRQHandler ; CAN TX
108 DCD CAN_RX0_IRQHandler ; CAN RX0
109 DCD CAN_RX1_IRQHandler ; CAN RX1
110 DCD CAN_SCE_IRQHandler ; CAN SCE
111 DCD EXTI9_5_IRQHandler ; External Line[9:5]s
112 DCD TIM1_BRK_TIM15_IRQHandler ; TIM1 Break and TIM15
113 DCD TIM1_UP_TIM16_IRQHandler ; TIM1 Update and TIM16
114 DCD TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Commutation and TIM17
115 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
116 DCD TIM2_IRQHandler ; TIM2
117 DCD TIM3_IRQHandler ; TIM3
118 DCD 0 ; Reserved
119 DCD I2C1_EV_IRQHandler ; I2C1 Event
120 DCD I2C1_ER_IRQHandler ; I2C1 Error
121 DCD 0 ; Reserved
122 DCD 0 ; Reserved
123 DCD SPI1_IRQHandler ; SPI1
124 DCD 0 ; Reserved
125 DCD USART1_IRQHandler ; USART1
126 DCD USART2_IRQHandler ; USART2
127 DCD USART3_IRQHandler ; USART3
128 DCD EXTI15_10_IRQHandler ; External Line[15:10]s
129 DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
130 DCD 0 ; Reserved
131 DCD 0 ; Reserved
132 DCD 0 ; Reserved
133 DCD 0 ; Reserved
134 DCD 0 ; Reserved
135 DCD 0 ; Reserved
136 DCD 0 ; Reserved
137 DCD 0 ; Reserved
138 DCD 0 ; Reserved
139 DCD 0 ; Reserved
140 DCD 0 ; Reserved
141 DCD 0 ; Reserved
142 DCD TIM6_DAC1_IRQHandler ; TIM6 and DAC1 underrun errors
143 DCD TIM7_DAC2_IRQHandler ; TIM7 and DAC2 underrun errors
144 DCD 0 ; Reserved
145 DCD 0 ; Reserved
146 DCD 0 ; Reserved
147 DCD 0 ; Reserved
148 DCD 0 ; Reserved
149 DCD 0 ; Reserved
150 DCD 0 ; Reserved
151 DCD 0 ; Reserved
152 DCD COMP2_IRQHandler ; COMP2
153 DCD COMP4_6_IRQHandler ; COMP4 and COMP6
154 DCD 0 ; Reserved
155 DCD HRTIM1_Master_IRQHandler ; HRTIM1 master timer
156 DCD HRTIM1_TIMA_IRQHandler ; HRTIM1 timer A
157 DCD HRTIM1_TIMB_IRQHandler ; HRTIM1 timer B
158 DCD HRTIM1_TIMC_IRQHandler ; HRTIM1 timer C
159 DCD HRTIM1_TIMD_IRQHandler ; HRTIM1 timer D
160 DCD HRTIM1_TIME_IRQHandler ; HRTIM1 timer E
161 DCD HRTIM1_FLT_IRQHandler ; HRTIM1 fault
162 DCD 0 ; Reserved
163 DCD 0 ; Reserved
164 DCD 0 ; Reserved
165 DCD 0 ; Reserved
166 DCD 0 ; Reserved
167 DCD 0 ; Reserved
168 DCD 0 ; Reserved
169 DCD FPU_IRQHandler ; FPU
171 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
173 ;; Default interrupt handlers.
175 THUMB
176 PUBWEAK Reset_Handler
177 SECTION .text:CODE:NOROOT:REORDER(2)
178 Reset_Handler
180 LDR R0, =SystemInit
181 BLX R0
182 LDR R0, =__iar_program_start
183 BX R0
185 PUBWEAK NMI_Handler
186 SECTION .text:CODE:NOROOT:REORDER(1)
187 NMI_Handler
188 B NMI_Handler
190 PUBWEAK HardFault_Handler
191 SECTION .text:CODE:NOROOT:REORDER(1)
192 HardFault_Handler
193 B HardFault_Handler
195 PUBWEAK MemManage_Handler
196 SECTION .text:CODE:NOROOT:REORDER(1)
197 MemManage_Handler
198 B MemManage_Handler
200 PUBWEAK BusFault_Handler
201 SECTION .text:CODE:NOROOT:REORDER(1)
202 BusFault_Handler
203 B BusFault_Handler
205 PUBWEAK UsageFault_Handler
206 SECTION .text:CODE:NOROOT:REORDER(1)
207 UsageFault_Handler
208 B UsageFault_Handler
210 PUBWEAK SVC_Handler
211 SECTION .text:CODE:NOROOT:REORDER(1)
212 SVC_Handler
213 B SVC_Handler
215 PUBWEAK DebugMon_Handler
216 SECTION .text:CODE:NOROOT:REORDER(1)
217 DebugMon_Handler
218 B DebugMon_Handler
220 PUBWEAK PendSV_Handler
221 SECTION .text:CODE:NOROOT:REORDER(1)
222 PendSV_Handler
223 B PendSV_Handler
225 PUBWEAK SysTick_Handler
226 SECTION .text:CODE:NOROOT:REORDER(1)
227 SysTick_Handler
228 B SysTick_Handler
230 PUBWEAK WWDG_IRQHandler
231 SECTION .text:CODE:NOROOT:REORDER(1)
232 WWDG_IRQHandler
233 B WWDG_IRQHandler
235 PUBWEAK PVD_IRQHandler
236 SECTION .text:CODE:NOROOT:REORDER(1)
237 PVD_IRQHandler
238 B PVD_IRQHandler
240 PUBWEAK TAMP_STAMP_IRQHandler
241 SECTION .text:CODE:NOROOT:REORDER(1)
242 TAMP_STAMP_IRQHandler
243 B TAMP_STAMP_IRQHandler
245 PUBWEAK RTC_WKUP_IRQHandler
246 SECTION .text:CODE:NOROOT:REORDER(1)
247 RTC_WKUP_IRQHandler
248 B RTC_WKUP_IRQHandler
250 PUBWEAK FLASH_IRQHandler
251 SECTION .text:CODE:NOROOT:REORDER(1)
252 FLASH_IRQHandler
253 B FLASH_IRQHandler
255 PUBWEAK RCC_IRQHandler
256 SECTION .text:CODE:NOROOT:REORDER(1)
257 RCC_IRQHandler
258 B RCC_IRQHandler
260 PUBWEAK EXTI0_IRQHandler
261 SECTION .text:CODE:NOROOT:REORDER(1)
262 EXTI0_IRQHandler
263 B EXTI0_IRQHandler
265 PUBWEAK EXTI1_IRQHandler
266 SECTION .text:CODE:NOROOT:REORDER(1)
267 EXTI1_IRQHandler
268 B EXTI1_IRQHandler
270 PUBWEAK EXTI2_TSC_IRQHandler
271 SECTION .text:CODE:NOROOT:REORDER(1)
272 EXTI2_TSC_IRQHandler
273 B EXTI2_TSC_IRQHandler
275 PUBWEAK EXTI3_IRQHandler
276 SECTION .text:CODE:NOROOT:REORDER(1)
277 EXTI3_IRQHandler
278 B EXTI3_IRQHandler
280 PUBWEAK EXTI4_IRQHandler
281 SECTION .text:CODE:NOROOT:REORDER(1)
282 EXTI4_IRQHandler
283 B EXTI4_IRQHandler
285 PUBWEAK DMA1_Channel1_IRQHandler
286 SECTION .text:CODE:NOROOT:REORDER(1)
287 DMA1_Channel1_IRQHandler
288 B DMA1_Channel1_IRQHandler
290 PUBWEAK DMA1_Channel2_IRQHandler
291 SECTION .text:CODE:NOROOT:REORDER(1)
292 DMA1_Channel2_IRQHandler
293 B DMA1_Channel2_IRQHandler
295 PUBWEAK DMA1_Channel3_IRQHandler
296 SECTION .text:CODE:NOROOT:REORDER(1)
297 DMA1_Channel3_IRQHandler
298 B DMA1_Channel3_IRQHandler
300 PUBWEAK DMA1_Channel4_IRQHandler
301 SECTION .text:CODE:NOROOT:REORDER(1)
302 DMA1_Channel4_IRQHandler
303 B DMA1_Channel4_IRQHandler
305 PUBWEAK DMA1_Channel5_IRQHandler
306 SECTION .text:CODE:NOROOT:REORDER(1)
307 DMA1_Channel5_IRQHandler
308 B DMA1_Channel5_IRQHandler
310 PUBWEAK DMA1_Channel6_IRQHandler
311 SECTION .text:CODE:NOROOT:REORDER(1)
312 DMA1_Channel6_IRQHandler
313 B DMA1_Channel6_IRQHandler
315 PUBWEAK DMA1_Channel7_IRQHandler
316 SECTION .text:CODE:NOROOT:REORDER(1)
317 DMA1_Channel7_IRQHandler
318 B DMA1_Channel7_IRQHandler
320 PUBWEAK ADC1_2_IRQHandler
321 SECTION .text:CODE:NOROOT:REORDER(1)
322 ADC1_2_IRQHandler
323 B ADC1_2_IRQHandler
325 PUBWEAK CAN_TX_IRQHandler
326 SECTION .text:CODE:NOROOT:REORDER(1)
327 CAN_TX_IRQHandler
328 B CAN_TX_IRQHandler
330 PUBWEAK CAN_RX0_IRQHandler
331 SECTION .text:CODE:NOROOT:REORDER(1)
332 CAN_RX0_IRQHandler
333 B CAN_RX0_IRQHandler
335 PUBWEAK CAN_RX1_IRQHandler
336 SECTION .text:CODE:NOROOT:REORDER(1)
337 CAN_RX1_IRQHandler
338 B CAN_RX1_IRQHandler
340 PUBWEAK CAN_SCE_IRQHandler
341 SECTION .text:CODE:NOROOT:REORDER(1)
342 CAN_SCE_IRQHandler
343 B CAN_SCE_IRQHandler
345 PUBWEAK EXTI9_5_IRQHandler
346 SECTION .text:CODE:NOROOT:REORDER(1)
347 EXTI9_5_IRQHandler
348 B EXTI9_5_IRQHandler
350 PUBWEAK TIM1_BRK_TIM15_IRQHandler
351 SECTION .text:CODE:NOROOT:REORDER(1)
352 TIM1_BRK_TIM15_IRQHandler
353 B TIM1_BRK_TIM15_IRQHandler
355 PUBWEAK TIM1_UP_TIM16_IRQHandler
356 SECTION .text:CODE:NOROOT:REORDER(1)
357 TIM1_UP_TIM16_IRQHandler
358 B TIM1_UP_TIM16_IRQHandler
360 PUBWEAK TIM1_TRG_COM_TIM17_IRQHandler
361 SECTION .text:CODE:NOROOT:REORDER(1)
362 TIM1_TRG_COM_TIM17_IRQHandler
363 B TIM1_TRG_COM_TIM17_IRQHandler
365 PUBWEAK TIM1_CC_IRQHandler
366 SECTION .text:CODE:NOROOT:REORDER(1)
367 TIM1_CC_IRQHandler
368 B TIM1_CC_IRQHandler
370 PUBWEAK TIM2_IRQHandler
371 SECTION .text:CODE:NOROOT:REORDER(1)
372 TIM2_IRQHandler
373 B TIM2_IRQHandler
375 PUBWEAK TIM3_IRQHandler
376 SECTION .text:CODE:NOROOT:REORDER(1)
377 TIM3_IRQHandler
378 B TIM3_IRQHandler
380 PUBWEAK I2C1_EV_IRQHandler
381 SECTION .text:CODE:NOROOT:REORDER(1)
382 I2C1_EV_IRQHandler
383 B I2C1_EV_IRQHandler
385 PUBWEAK I2C1_ER_IRQHandler
386 SECTION .text:CODE:NOROOT:REORDER(1)
387 I2C1_ER_IRQHandler
388 B I2C1_ER_IRQHandler
390 PUBWEAK SPI1_IRQHandler
391 SECTION .text:CODE:NOROOT:REORDER(1)
392 SPI1_IRQHandler
393 B SPI1_IRQHandler
395 PUBWEAK USART1_IRQHandler
396 SECTION .text:CODE:NOROOT:REORDER(1)
397 USART1_IRQHandler
398 B USART1_IRQHandler
400 PUBWEAK USART2_IRQHandler
401 SECTION .text:CODE:NOROOT:REORDER(1)
402 USART2_IRQHandler
403 B USART2_IRQHandler
405 PUBWEAK USART3_IRQHandler
406 SECTION .text:CODE:NOROOT:REORDER(1)
407 USART3_IRQHandler
408 B USART3_IRQHandler
410 PUBWEAK EXTI15_10_IRQHandler
411 SECTION .text:CODE:NOROOT:REORDER(1)
412 EXTI15_10_IRQHandler
413 B EXTI15_10_IRQHandler
415 PUBWEAK RTC_Alarm_IRQHandler
416 SECTION .text:CODE:NOROOT:REORDER(1)
417 RTC_Alarm_IRQHandler
418 B RTC_Alarm_IRQHandler
420 PUBWEAK TIM6_DAC1_IRQHandler
421 SECTION .text:CODE:NOROOT:REORDER(1)
422 TIM6_DAC1_IRQHandler
423 B TIM6_DAC1_IRQHandler
425 PUBWEAK TIM7_DAC2_IRQHandler
426 SECTION .text:CODE:NOROOT:REORDER(1)
427 TIM7_DAC2_IRQHandler
428 B TIM7_DAC2_IRQHandler
430 PUBWEAK COMP2_IRQHandler
431 SECTION .text:CODE:NOROOT:REORDER(1)
432 COMP2_IRQHandler
433 B COMP2_IRQHandler
435 PUBWEAK COMP4_6_IRQHandler
436 SECTION .text:CODE:NOROOT:REORDER(1)
437 COMP4_6_IRQHandler
438 B COMP4_6_IRQHandler
440 PUBWEAK HRTIM1_Master_IRQHandler
441 SECTION .text:CODE:NOROOT:REORDER(1)
442 HRTIM1_Master_IRQHandler
443 B HRTIM1_Master_IRQHandler
445 PUBWEAK HRTIM1_TIMA_IRQHandler
446 SECTION .text:CODE:NOROOT:REORDER(1)
447 HRTIM1_TIMA_IRQHandler
448 B HRTIM1_TIMA_IRQHandler
450 PUBWEAK HRTIM1_TIMB_IRQHandler
451 SECTION .text:CODE:NOROOT:REORDER(1)
452 HRTIM1_TIMB_IRQHandler
453 B HRTIM1_TIMB_IRQHandler
455 PUBWEAK HRTIM1_TIMC_IRQHandler
456 SECTION .text:CODE:NOROOT:REORDER(1)
457 HRTIM1_TIMC_IRQHandler
458 B HRTIM1_TIMC_IRQHandler
460 PUBWEAK HRTIM1_TIMD_IRQHandler
461 SECTION .text:CODE:NOROOT:REORDER(1)
462 HRTIM1_TIMD_IRQHandler
463 B HRTIM1_TIMD_IRQHandler
465 PUBWEAK HRTIM1_TIME_IRQHandler
466 SECTION .text:CODE:NOROOT:REORDER(1)
467 HRTIM1_TIME_IRQHandler
468 B HRTIM1_TIME_IRQHandler
470 PUBWEAK HRTIM1_FLT_IRQHandler
471 SECTION .text:CODE:NOROOT:REORDER(1)
472 HRTIM1_FLT_IRQHandler
473 B HRTIM1_FLT_IRQHandler
475 PUBWEAK FPU_IRQHandler
476 SECTION .text:CODE:NOROOT:REORDER(1)
477 FPU_IRQHandler
478 B FPU_IRQHandler
481 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/