2 ******************************************************************************
\r
3 * @file startup_stm32l475xx.s
\r
4 * @author MCD Application Team
\r
5 * @brief STM32L475xx devices vector table for GCC toolchain.
\r
6 * This module performs:
\r
7 * - Set the initial SP
\r
8 * - Set the initial PC == Reset_Handler,
\r
9 * - Set the vector table entries with the exceptions ISR address,
\r
10 * - Configure the clock system
\r
11 * - Branches to main in the C library (which eventually
\r
13 * After Reset the Cortex-M4 processor is in Thread mode,
\r
14 * priority is Privileged, and the Stack is set to Main.
\r
15 ******************************************************************************
\r
18 * <h2><center>© Copyright (c) 2017 STMicroelectronics.
\r
19 * All rights reserved.</center></h2>
\r
21 * This software component is licensed by ST under BSD 3-Clause license,
\r
22 * the "License"; You may not use this file except in compliance with the
\r
23 * License. You may obtain a copy of the License at:
\r
24 * opensource.org/licenses/BSD-3-Clause
\r
26 ******************************************************************************
\r
34 .global g_pfnVectors
\r
35 .global Default_Handler
\r
37 /* start address for the initialization values of the .data section.
\r
38 defined in linker script */
\r
40 /* start address for the .data section. defined in linker script */
\r
42 /* end address for the .data section. defined in linker script */
\r
44 /* start address for the .bss section. defined in linker script */
\r
46 /* end address for the .bss section. defined in linker script */
\r
49 .equ BootRAM, 0xF1E0F85F
\r
51 * @brief This is the code that gets called when the processor first
\r
52 * starts execution following a reset event. Only the absolutely
\r
53 * necessary set is performed, after which the application
\r
54 * supplied main() routine is called.
\r
59 .section .text.Reset_Handler
\r
61 .type Reset_Handler, %function
\r
63 ldr sp, =_estack /* Atollic update: set stack pointer */
\r
65 /* Copy the data segment initializers from flash to SRAM */
\r
83 /* Zero fill the bss segment. */
\r
93 /* Call the clock system intitialization function.*/
\r
95 /* Call static constructors */
\r
96 bl __libc_init_array
\r
97 /* Call the application's entry point.*/
\r
103 .size Reset_Handler, .-Reset_Handler
\r
106 * @brief This is the code that gets called when the processor receives an
\r
107 * unexpected interrupt. This simply enters an infinite loop, preserving
\r
108 * the system state for examination by a debugger.
\r
113 .section .text.Default_Handler,"ax",%progbits
\r
117 .size Default_Handler, .-Default_Handler
\r
118 /******************************************************************************
\r
120 * The minimal vector table for a Cortex-M4. Note that the proper constructs
\r
121 * must be placed on this to ensure that it ends up at physical address
\r
124 ******************************************************************************/
\r
125 .section .isr_vector,"a",%progbits
\r
126 .type g_pfnVectors, %object
\r
127 .size g_pfnVectors, .-g_pfnVectors
\r
132 .word Reset_Handler
\r
134 .word HardFault_Handler
\r
135 .word MemManage_Handler
\r
136 .word BusFault_Handler
\r
137 .word UsageFault_Handler
\r
143 .word DebugMon_Handler
\r
145 .word PendSV_Handler
\r
146 .word SysTick_Handler
\r
147 .word WWDG_IRQHandler
\r
148 .word PVD_PVM_IRQHandler
\r
149 .word TAMP_STAMP_IRQHandler
\r
150 .word RTC_WKUP_IRQHandler
\r
151 .word FLASH_IRQHandler
\r
152 .word RCC_IRQHandler
\r
153 .word EXTI0_IRQHandler
\r
154 .word EXTI1_IRQHandler
\r
155 .word EXTI2_IRQHandler
\r
156 .word EXTI3_IRQHandler
\r
157 .word EXTI4_IRQHandler
\r
158 .word DMA1_Channel1_IRQHandler
\r
159 .word DMA1_Channel2_IRQHandler
\r
160 .word DMA1_Channel3_IRQHandler
\r
161 .word DMA1_Channel4_IRQHandler
\r
162 .word DMA1_Channel5_IRQHandler
\r
163 .word DMA1_Channel6_IRQHandler
\r
164 .word DMA1_Channel7_IRQHandler
\r
165 .word ADC1_2_IRQHandler
\r
166 .word CAN1_TX_IRQHandler
\r
167 .word CAN1_RX0_IRQHandler
\r
168 .word CAN1_RX1_IRQHandler
\r
169 .word CAN1_SCE_IRQHandler
\r
170 .word EXTI9_5_IRQHandler
\r
171 .word TIM1_BRK_TIM15_IRQHandler
\r
172 .word TIM1_UP_TIM16_IRQHandler
\r
173 .word TIM1_TRG_COM_TIM17_IRQHandler
\r
174 .word TIM1_CC_IRQHandler
\r
175 .word TIM2_IRQHandler
\r
176 .word TIM3_IRQHandler
\r
177 .word TIM4_IRQHandler
\r
178 .word I2C1_EV_IRQHandler
\r
179 .word I2C1_ER_IRQHandler
\r
180 .word I2C2_EV_IRQHandler
\r
181 .word I2C2_ER_IRQHandler
\r
182 .word SPI1_IRQHandler
\r
183 .word SPI2_IRQHandler
\r
184 .word USART1_IRQHandler
\r
185 .word USART2_IRQHandler
\r
186 .word USART3_IRQHandler
\r
187 .word EXTI15_10_IRQHandler
\r
188 .word RTC_Alarm_IRQHandler
\r
189 .word DFSDM1_FLT3_IRQHandler
\r
190 .word TIM8_BRK_IRQHandler
\r
191 .word TIM8_UP_IRQHandler
\r
192 .word TIM8_TRG_COM_IRQHandler
\r
193 .word TIM8_CC_IRQHandler
\r
194 .word ADC3_IRQHandler
\r
195 .word FMC_IRQHandler
\r
196 .word SDMMC1_IRQHandler
\r
197 .word TIM5_IRQHandler
\r
198 .word SPI3_IRQHandler
\r
199 .word UART4_IRQHandler
\r
200 .word UART5_IRQHandler
\r
201 .word TIM6_DAC_IRQHandler
\r
202 .word TIM7_IRQHandler
\r
203 .word DMA2_Channel1_IRQHandler
\r
204 .word DMA2_Channel2_IRQHandler
\r
205 .word DMA2_Channel3_IRQHandler
\r
206 .word DMA2_Channel4_IRQHandler
\r
207 .word DMA2_Channel5_IRQHandler
\r
208 .word DFSDM1_FLT0_IRQHandler
\r
209 .word DFSDM1_FLT1_IRQHandler
\r
210 .word DFSDM1_FLT2_IRQHandler
\r
211 .word COMP_IRQHandler
\r
212 .word LPTIM1_IRQHandler
\r
213 .word LPTIM2_IRQHandler
\r
214 .word OTG_FS_IRQHandler
\r
215 .word DMA2_Channel6_IRQHandler
\r
216 .word DMA2_Channel7_IRQHandler
\r
217 .word LPUART1_IRQHandler
\r
218 .word QUADSPI_IRQHandler
\r
219 .word I2C3_EV_IRQHandler
\r
220 .word I2C3_ER_IRQHandler
\r
221 .word SAI1_IRQHandler
\r
222 .word SAI2_IRQHandler
\r
223 .word SWPMI1_IRQHandler
\r
224 .word TSC_IRQHandler
\r
227 .word RNG_IRQHandler
\r
228 .word FPU_IRQHandler
\r
231 /*******************************************************************************
\r
233 * Provide weak aliases for each Exception handler to the Default_Handler.
\r
234 * As they are weak aliases, any function with the same name will override
\r
237 *******************************************************************************/
\r
240 .thumb_set NMI_Handler,Default_Handler
\r
242 .weak HardFault_Handler
\r
243 .thumb_set HardFault_Handler,Default_Handler
\r
245 .weak MemManage_Handler
\r
246 .thumb_set MemManage_Handler,Default_Handler
\r
248 .weak BusFault_Handler
\r
249 .thumb_set BusFault_Handler,Default_Handler
\r
251 .weak UsageFault_Handler
\r
252 .thumb_set UsageFault_Handler,Default_Handler
\r
255 .thumb_set SVC_Handler,Default_Handler
\r
257 .weak DebugMon_Handler
\r
258 .thumb_set DebugMon_Handler,Default_Handler
\r
260 .weak PendSV_Handler
\r
261 .thumb_set PendSV_Handler,Default_Handler
\r
263 .weak SysTick_Handler
\r
264 .thumb_set SysTick_Handler,Default_Handler
\r
266 .weak WWDG_IRQHandler
\r
267 .thumb_set WWDG_IRQHandler,Default_Handler
\r
269 .weak PVD_PVM_IRQHandler
\r
270 .thumb_set PVD_PVM_IRQHandler,Default_Handler
\r
272 .weak TAMP_STAMP_IRQHandler
\r
273 .thumb_set TAMP_STAMP_IRQHandler,Default_Handler
\r
275 .weak RTC_WKUP_IRQHandler
\r
276 .thumb_set RTC_WKUP_IRQHandler,Default_Handler
\r
278 .weak FLASH_IRQHandler
\r
279 .thumb_set FLASH_IRQHandler,Default_Handler
\r
281 .weak RCC_IRQHandler
\r
282 .thumb_set RCC_IRQHandler,Default_Handler
\r
284 .weak EXTI0_IRQHandler
\r
285 .thumb_set EXTI0_IRQHandler,Default_Handler
\r
287 .weak EXTI1_IRQHandler
\r
288 .thumb_set EXTI1_IRQHandler,Default_Handler
\r
290 .weak EXTI2_IRQHandler
\r
291 .thumb_set EXTI2_IRQHandler,Default_Handler
\r
293 .weak EXTI3_IRQHandler
\r
294 .thumb_set EXTI3_IRQHandler,Default_Handler
\r
296 .weak EXTI4_IRQHandler
\r
297 .thumb_set EXTI4_IRQHandler,Default_Handler
\r
299 .weak DMA1_Channel1_IRQHandler
\r
300 .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
\r
302 .weak DMA1_Channel2_IRQHandler
\r
303 .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
\r
305 .weak DMA1_Channel3_IRQHandler
\r
306 .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
\r
308 .weak DMA1_Channel4_IRQHandler
\r
309 .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
\r
311 .weak DMA1_Channel5_IRQHandler
\r
312 .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
\r
314 .weak DMA1_Channel6_IRQHandler
\r
315 .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
\r
317 .weak DMA1_Channel7_IRQHandler
\r
318 .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
\r
320 .weak ADC1_2_IRQHandler
\r
321 .thumb_set ADC1_2_IRQHandler,Default_Handler
\r
323 .weak CAN1_TX_IRQHandler
\r
324 .thumb_set CAN1_TX_IRQHandler,Default_Handler
\r
326 .weak CAN1_RX0_IRQHandler
\r
327 .thumb_set CAN1_RX0_IRQHandler,Default_Handler
\r
329 .weak CAN1_RX1_IRQHandler
\r
330 .thumb_set CAN1_RX1_IRQHandler,Default_Handler
\r
332 .weak CAN1_SCE_IRQHandler
\r
333 .thumb_set CAN1_SCE_IRQHandler,Default_Handler
\r
335 .weak EXTI9_5_IRQHandler
\r
336 .thumb_set EXTI9_5_IRQHandler,Default_Handler
\r
338 .weak TIM1_BRK_TIM15_IRQHandler
\r
339 .thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler
\r
341 .weak TIM1_UP_TIM16_IRQHandler
\r
342 .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler
\r
344 .weak TIM1_TRG_COM_TIM17_IRQHandler
\r
345 .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler
\r
347 .weak TIM1_CC_IRQHandler
\r
348 .thumb_set TIM1_CC_IRQHandler,Default_Handler
\r
350 .weak TIM2_IRQHandler
\r
351 .thumb_set TIM2_IRQHandler,Default_Handler
\r
353 .weak TIM3_IRQHandler
\r
354 .thumb_set TIM3_IRQHandler,Default_Handler
\r
356 .weak TIM4_IRQHandler
\r
357 .thumb_set TIM4_IRQHandler,Default_Handler
\r
359 .weak I2C1_EV_IRQHandler
\r
360 .thumb_set I2C1_EV_IRQHandler,Default_Handler
\r
362 .weak I2C1_ER_IRQHandler
\r
363 .thumb_set I2C1_ER_IRQHandler,Default_Handler
\r
365 .weak I2C2_EV_IRQHandler
\r
366 .thumb_set I2C2_EV_IRQHandler,Default_Handler
\r
368 .weak I2C2_ER_IRQHandler
\r
369 .thumb_set I2C2_ER_IRQHandler,Default_Handler
\r
371 .weak SPI1_IRQHandler
\r
372 .thumb_set SPI1_IRQHandler,Default_Handler
\r
374 .weak SPI2_IRQHandler
\r
375 .thumb_set SPI2_IRQHandler,Default_Handler
\r
377 .weak USART1_IRQHandler
\r
378 .thumb_set USART1_IRQHandler,Default_Handler
\r
380 .weak USART2_IRQHandler
\r
381 .thumb_set USART2_IRQHandler,Default_Handler
\r
383 .weak USART3_IRQHandler
\r
384 .thumb_set USART3_IRQHandler,Default_Handler
\r
386 .weak EXTI15_10_IRQHandler
\r
387 .thumb_set EXTI15_10_IRQHandler,Default_Handler
\r
389 .weak RTC_Alarm_IRQHandler
\r
390 .thumb_set RTC_Alarm_IRQHandler,Default_Handler
\r
392 .weak DFSDM1_FLT3_IRQHandler
\r
393 .thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler
\r
395 .weak TIM8_BRK_IRQHandler
\r
396 .thumb_set TIM8_BRK_IRQHandler,Default_Handler
\r
398 .weak TIM8_UP_IRQHandler
\r
399 .thumb_set TIM8_UP_IRQHandler,Default_Handler
\r
401 .weak TIM8_TRG_COM_IRQHandler
\r
402 .thumb_set TIM8_TRG_COM_IRQHandler,Default_Handler
\r
404 .weak TIM8_CC_IRQHandler
\r
405 .thumb_set TIM8_CC_IRQHandler,Default_Handler
\r
407 .weak ADC3_IRQHandler
\r
408 .thumb_set ADC3_IRQHandler,Default_Handler
\r
410 .weak FMC_IRQHandler
\r
411 .thumb_set FMC_IRQHandler,Default_Handler
\r
413 .weak SDMMC1_IRQHandler
\r
414 .thumb_set SDMMC1_IRQHandler,Default_Handler
\r
416 .weak TIM5_IRQHandler
\r
417 .thumb_set TIM5_IRQHandler,Default_Handler
\r
419 .weak SPI3_IRQHandler
\r
420 .thumb_set SPI3_IRQHandler,Default_Handler
\r
422 .weak UART4_IRQHandler
\r
423 .thumb_set UART4_IRQHandler,Default_Handler
\r
425 .weak UART5_IRQHandler
\r
426 .thumb_set UART5_IRQHandler,Default_Handler
\r
428 .weak TIM6_DAC_IRQHandler
\r
429 .thumb_set TIM6_DAC_IRQHandler,Default_Handler
\r
431 .weak TIM7_IRQHandler
\r
432 .thumb_set TIM7_IRQHandler,Default_Handler
\r
434 .weak DMA2_Channel1_IRQHandler
\r
435 .thumb_set DMA2_Channel1_IRQHandler,Default_Handler
\r
437 .weak DMA2_Channel2_IRQHandler
\r
438 .thumb_set DMA2_Channel2_IRQHandler,Default_Handler
\r
440 .weak DMA2_Channel3_IRQHandler
\r
441 .thumb_set DMA2_Channel3_IRQHandler,Default_Handler
\r
443 .weak DMA2_Channel4_IRQHandler
\r
444 .thumb_set DMA2_Channel4_IRQHandler,Default_Handler
\r
446 .weak DMA2_Channel5_IRQHandler
\r
447 .thumb_set DMA2_Channel5_IRQHandler,Default_Handler
\r
449 .weak DFSDM1_FLT0_IRQHandler
\r
450 .thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler
\r
452 .weak DFSDM1_FLT1_IRQHandler
\r
453 .thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler
\r
455 .weak DFSDM1_FLT2_IRQHandler
\r
456 .thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler
\r
458 .weak COMP_IRQHandler
\r
459 .thumb_set COMP_IRQHandler,Default_Handler
\r
461 .weak LPTIM1_IRQHandler
\r
462 .thumb_set LPTIM1_IRQHandler,Default_Handler
\r
464 .weak LPTIM2_IRQHandler
\r
465 .thumb_set LPTIM2_IRQHandler,Default_Handler
\r
467 .weak OTG_FS_IRQHandler
\r
468 .thumb_set OTG_FS_IRQHandler,Default_Handler
\r
470 .weak DMA2_Channel6_IRQHandler
\r
471 .thumb_set DMA2_Channel6_IRQHandler,Default_Handler
\r
473 .weak DMA2_Channel7_IRQHandler
\r
474 .thumb_set DMA2_Channel7_IRQHandler,Default_Handler
\r
476 .weak LPUART1_IRQHandler
\r
477 .thumb_set LPUART1_IRQHandler,Default_Handler
\r
479 .weak QUADSPI_IRQHandler
\r
480 .thumb_set QUADSPI_IRQHandler,Default_Handler
\r
482 .weak I2C3_EV_IRQHandler
\r
483 .thumb_set I2C3_EV_IRQHandler,Default_Handler
\r
485 .weak I2C3_ER_IRQHandler
\r
486 .thumb_set I2C3_ER_IRQHandler,Default_Handler
\r
488 .weak SAI1_IRQHandler
\r
489 .thumb_set SAI1_IRQHandler,Default_Handler
\r
491 .weak SAI2_IRQHandler
\r
492 .thumb_set SAI2_IRQHandler,Default_Handler
\r
494 .weak SWPMI1_IRQHandler
\r
495 .thumb_set SWPMI1_IRQHandler,Default_Handler
\r
497 .weak TSC_IRQHandler
\r
498 .thumb_set TSC_IRQHandler,Default_Handler
\r
500 .weak RNG_IRQHandler
\r
501 .thumb_set RNG_IRQHandler,Default_Handler
\r
503 .weak FPU_IRQHandler
\r
504 .thumb_set FPU_IRQHandler,Default_Handler
\r
505 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r