2 ******************************************************************************
3 * @file startup_stm32f745xx.s
4 * @author MCD Application Team
7 * @brief STM32F745xx Devices vector table for GCC toolchain based application.
8 * This module performs:
10 * - Set the initial PC == Reset_Handler,
11 * - Set the vector table entries with the exceptions ISR address
12 * - Branches to main in the C library (which eventually
14 * After Reset the Cortex-M7 processor is in Thread mode,
15 * priority is Privileged, and the Stack is set to Main.
16 ******************************************************************************
19 * <h2><center>© COPYRIGHT 2016 STMicroelectronics</center></h2>
21 * Redistribution and use in source and binary forms, with or without modification,
22 * are permitted provided that the following conditions are met:
23 * 1. Redistributions of source code must retain the above copyright notice,
24 * this list of conditions and the following disclaimer.
25 * 2. Redistributions in binary form must reproduce the above copyright notice,
26 * this list of conditions and the following disclaimer in the documentation
27 * and/or other materials provided with the distribution.
28 * 3. Neither the name of STMicroelectronics nor the names of its contributors
29 * may be used to endorse or promote products derived from this software
30 * without specific prior written permission.
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
36 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
38 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
39 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
40 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 ******************************************************************************
52 .global Default_Handler
54 /* start address for the initialization values of the .data section.
55 defined in linker script */
57 /* start address for the .data section. defined in linker script */
59 /* end address for the .data section. defined in linker script */
61 /* start address for the .bss section. defined in linker script */
63 /* end address for the .bss section. defined in linker script */
65 /* stack used for SystemInit_ExtMemCtl; always internal RAM used */
68 * @brief This is the code that gets called when the processor first
69 * starts execution following a reset event. Only the absolutely
70 * necessary set is performed, after which the application
71 * supplied main() routine is called.
76 .section .text.Reset_Handler
78 .type Reset_Handler, %function
80 ldr sp
, =_estack
/* set stack pointer */
82 bl persistentObjectInit
84 /* Copy the data segment initializers from flash to SRAM */
103 /* Zero fill the bss segment. */
113 /* Zero fill FASTRAM */
114 ldr
r2, =__fastram_bss_start__
115 b LoopFillZeroFASTRAM
122 ldr
r3, = __fastram_bss_end__
126 /* Mark the heap and stack */
127 ldr
r2, =_heap_stack_begin
135 ldr
r3, = _heap_stack_end
140 ldr
r0, =0xE000ED88 /* Enable CP10,CP11 */
142 orr
r1,r1,#(0xF << 20)
145 /* Call the clock system initialization function.*/
147 /* Call the application's entry point.*/
154 .size Reset_Handler, .-Reset_Handler
157 * @brief This is the code that gets called when the processor receives an
158 * unexpected interrupt. This simply enters an infinite loop, preserving
159 * the system state for examination by a debugger.
163 .section .text.Default_Handler,"ax",%progbits
167 .size Default_Handler, .-Default_Handler
168 /******************************************************************************
170 * The minimal vector table for a Cortex M7. Note that the proper constructs
171 * must be placed on this to ensure that it ends up at physical address
174 *******************************************************************************/
175 .section .isr_vector,"a",%progbits
176 .type g_pfnVectors, %object
177 .size g_pfnVectors, .-g_pfnVectors
184 .word HardFault_Handler
185 .word MemManage_Handler
186 .word BusFault_Handler
187 .word UsageFault_Handler
193 .word DebugMon_Handler
196 .word SysTick_Handler
198 /* External Interrupts */
199 .word WWDG_IRQHandler /* Window WatchDog */
200 .word PVD_IRQHandler /* PVD through EXTI Line detection */
201 .word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
202 .word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
203 .word FLASH_IRQHandler /* FLASH */
204 .word RCC_IRQHandler /* RCC */
205 .word EXTI0_IRQHandler /* EXTI Line0 */
206 .word EXTI1_IRQHandler /* EXTI Line1 */
207 .word EXTI2_IRQHandler /* EXTI Line2 */
208 .word EXTI3_IRQHandler /* EXTI Line3 */
209 .word EXTI4_IRQHandler /* EXTI Line4 */
210 .word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
211 .word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
212 .word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
213 .word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
214 .word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
215 .word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
216 .word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
217 .word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
218 .word CAN1_TX_IRQHandler /* CAN1 TX */
219 .word CAN1_RX0_IRQHandler /* CAN1 RX0 */
220 .word CAN1_RX1_IRQHandler /* CAN1 RX1 */
221 .word CAN1_SCE_IRQHandler /* CAN1 SCE */
222 .word EXTI9_5_IRQHandler /* External Line[9:5]s */
223 .word TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
224 .word TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
225 .word TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
226 .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
227 .word TIM2_IRQHandler /* TIM2 */
228 .word TIM3_IRQHandler /* TIM3 */
229 .word TIM4_IRQHandler /* TIM4 */
230 .word I2C1_EV_IRQHandler /* I2C1 Event */
231 .word I2C1_ER_IRQHandler /* I2C1 Error */
232 .word I2C2_EV_IRQHandler /* I2C2 Event */
233 .word I2C2_ER_IRQHandler /* I2C2 Error */
234 .word SPI1_IRQHandler /* SPI1 */
235 .word SPI2_IRQHandler /* SPI2 */
236 .word USART1_IRQHandler /* USART1 */
237 .word USART2_IRQHandler /* USART2 */
238 .word USART3_IRQHandler /* USART3 */
239 .word EXTI15_10_IRQHandler /* External Line[15:10]s */
240 .word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
241 .word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
242 .word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
243 .word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
244 .word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
245 .word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
246 .word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
247 .word FMC_IRQHandler /* FMC */
248 .word SDMMC1_IRQHandler /* SDMMC1 */
249 .word TIM5_IRQHandler /* TIM5 */
250 .word SPI3_IRQHandler /* SPI3 */
251 .word UART4_IRQHandler /* UART4 */
252 .word UART5_IRQHandler /* UART5 */
253 .word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
254 .word TIM7_IRQHandler /* TIM7 */
255 .word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
256 .word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
257 .word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
258 .word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
259 .word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
260 .word ETH_IRQHandler /* Ethernet */
261 .word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
262 .word CAN2_TX_IRQHandler /* CAN2 TX */
263 .word CAN2_RX0_IRQHandler /* CAN2 RX0 */
264 .word CAN2_RX1_IRQHandler /* CAN2 RX1 */
265 .word CAN2_SCE_IRQHandler /* CAN2 SCE */
266 .word OTG_FS_IRQHandler /* USB OTG FS */
267 .word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
268 .word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
269 .word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
270 .word USART6_IRQHandler /* USART6 */
271 .word I2C3_EV_IRQHandler /* I2C3 event */
272 .word I2C3_ER_IRQHandler /* I2C3 error */
273 .word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
274 .word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
275 .word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
276 .word OTG_HS_IRQHandler /* USB OTG HS */
277 .word DCMI_IRQHandler /* DCMI */
278 .word 0 /* Reserved */
279 .word RNG_IRQHandler /* Rng */
280 .word FPU_IRQHandler /* FPU */
281 .word UART7_IRQHandler /* UART7 */
282 .word UART8_IRQHandler /* UART8 */
283 .word SPI4_IRQHandler /* SPI4 */
284 .word SPI5_IRQHandler /* SPI5 */
285 .word SPI6_IRQHandler /* SPI6 */
286 .word SAI1_IRQHandler /* SAI1 */
287 .word 0 /* Reserved */
288 .word 0 /* Reserved */
289 .word DMA2D_IRQHandler /* DMA2D */
290 .word SAI2_IRQHandler /* SAI2 */
291 .word QUADSPI_IRQHandler /* QUADSPI */
292 .word LPTIM1_IRQHandler /* LPTIM1 */
293 .word CEC_IRQHandler /* HDMI_CEC */
294 .word I2C4_EV_IRQHandler /* I2C4 Event */
295 .word I2C4_ER_IRQHandler /* I2C4 Error */
296 .word SPDIF_RX_IRQHandler /* SPDIF_RX */
298 /*******************************************************************************
300 * Provide weak aliases for each Exception handler to the Default_Handler.
301 * As they are weak aliases, any function with the same name will override
304 *******************************************************************************/
306 .thumb_set NMI_Handler,Default_Handler
308 .weak HardFault_Handler
309 .thumb_set HardFault_Handler,Default_Handler
311 .weak MemManage_Handler
312 .thumb_set MemManage_Handler,Default_Handler
314 .weak BusFault_Handler
315 .thumb_set BusFault_Handler,Default_Handler
317 .weak UsageFault_Handler
318 .thumb_set UsageFault_Handler,Default_Handler
321 .thumb_set SVC_Handler,Default_Handler
323 .weak DebugMon_Handler
324 .thumb_set DebugMon_Handler,Default_Handler
327 .thumb_set PendSV_Handler,Default_Handler
329 .weak SysTick_Handler
330 .thumb_set SysTick_Handler,Default_Handler
332 .weak WWDG_IRQHandler
333 .thumb_set WWDG_IRQHandler,Default_Handler
336 .thumb_set PVD_IRQHandler,Default_Handler
338 .weak TAMP_STAMP_IRQHandler
339 .thumb_set TAMP_STAMP_IRQHandler,Default_Handler
341 .weak RTC_WKUP_IRQHandler
342 .thumb_set RTC_WKUP_IRQHandler,Default_Handler
344 .weak FLASH_IRQHandler
345 .thumb_set FLASH_IRQHandler,Default_Handler
348 .thumb_set RCC_IRQHandler,Default_Handler
350 .weak EXTI0_IRQHandler
351 .thumb_set EXTI0_IRQHandler,Default_Handler
353 .weak EXTI1_IRQHandler
354 .thumb_set EXTI1_IRQHandler,Default_Handler
356 .weak EXTI2_IRQHandler
357 .thumb_set EXTI2_IRQHandler,Default_Handler
359 .weak EXTI3_IRQHandler
360 .thumb_set EXTI3_IRQHandler,Default_Handler
362 .weak EXTI4_IRQHandler
363 .thumb_set EXTI4_IRQHandler,Default_Handler
365 .weak DMA1_Stream0_IRQHandler
366 .thumb_set DMA1_Stream0_IRQHandler,Default_Handler
368 .weak DMA1_Stream1_IRQHandler
369 .thumb_set DMA1_Stream1_IRQHandler,Default_Handler
371 .weak DMA1_Stream2_IRQHandler
372 .thumb_set DMA1_Stream2_IRQHandler,Default_Handler
374 .weak DMA1_Stream3_IRQHandler
375 .thumb_set DMA1_Stream3_IRQHandler,Default_Handler
377 .weak DMA1_Stream4_IRQHandler
378 .thumb_set DMA1_Stream4_IRQHandler,Default_Handler
380 .weak DMA1_Stream5_IRQHandler
381 .thumb_set DMA1_Stream5_IRQHandler,Default_Handler
383 .weak DMA1_Stream6_IRQHandler
384 .thumb_set DMA1_Stream6_IRQHandler,Default_Handler
387 .thumb_set ADC_IRQHandler,Default_Handler
389 .weak CAN1_TX_IRQHandler
390 .thumb_set CAN1_TX_IRQHandler,Default_Handler
392 .weak CAN1_RX0_IRQHandler
393 .thumb_set CAN1_RX0_IRQHandler,Default_Handler
395 .weak CAN1_RX1_IRQHandler
396 .thumb_set CAN1_RX1_IRQHandler,Default_Handler
398 .weak CAN1_SCE_IRQHandler
399 .thumb_set CAN1_SCE_IRQHandler,Default_Handler
401 .weak EXTI9_5_IRQHandler
402 .thumb_set EXTI9_5_IRQHandler,Default_Handler
404 .weak TIM1_BRK_TIM9_IRQHandler
405 .thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
407 .weak TIM1_UP_TIM10_IRQHandler
408 .thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
410 .weak TIM1_TRG_COM_TIM11_IRQHandler
411 .thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
413 .weak TIM1_CC_IRQHandler
414 .thumb_set TIM1_CC_IRQHandler,Default_Handler
416 .weak TIM2_IRQHandler
417 .thumb_set TIM2_IRQHandler,Default_Handler
419 .weak TIM3_IRQHandler
420 .thumb_set TIM3_IRQHandler,Default_Handler
422 .weak TIM4_IRQHandler
423 .thumb_set TIM4_IRQHandler,Default_Handler
425 .weak I2C1_EV_IRQHandler
426 .thumb_set I2C1_EV_IRQHandler,Default_Handler
428 .weak I2C1_ER_IRQHandler
429 .thumb_set I2C1_ER_IRQHandler,Default_Handler
431 .weak I2C2_EV_IRQHandler
432 .thumb_set I2C2_EV_IRQHandler,Default_Handler
434 .weak I2C2_ER_IRQHandler
435 .thumb_set I2C2_ER_IRQHandler,Default_Handler
437 .weak SPI1_IRQHandler
438 .thumb_set SPI1_IRQHandler,Default_Handler
440 .weak SPI2_IRQHandler
441 .thumb_set SPI2_IRQHandler,Default_Handler
443 .weak USART1_IRQHandler
444 .thumb_set USART1_IRQHandler,Default_Handler
446 .weak USART2_IRQHandler
447 .thumb_set USART2_IRQHandler,Default_Handler
449 .weak USART3_IRQHandler
450 .thumb_set USART3_IRQHandler,Default_Handler
452 .weak EXTI15_10_IRQHandler
453 .thumb_set EXTI15_10_IRQHandler,Default_Handler
455 .weak RTC_Alarm_IRQHandler
456 .thumb_set RTC_Alarm_IRQHandler,Default_Handler
458 .weak OTG_FS_WKUP_IRQHandler
459 .thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
461 .weak TIM8_BRK_TIM12_IRQHandler
462 .thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
464 .weak TIM8_UP_TIM13_IRQHandler
465 .thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
467 .weak TIM8_TRG_COM_TIM14_IRQHandler
468 .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
470 .weak TIM8_CC_IRQHandler
471 .thumb_set TIM8_CC_IRQHandler,Default_Handler
473 .weak DMA1_Stream7_IRQHandler
474 .thumb_set DMA1_Stream7_IRQHandler,Default_Handler
477 .thumb_set FMC_IRQHandler,Default_Handler
479 .weak SDMMC1_IRQHandler
480 .thumb_set SDMMC1_IRQHandler,Default_Handler
482 .weak TIM5_IRQHandler
483 .thumb_set TIM5_IRQHandler,Default_Handler
485 .weak SPI3_IRQHandler
486 .thumb_set SPI3_IRQHandler,Default_Handler
488 .weak UART4_IRQHandler
489 .thumb_set UART4_IRQHandler,Default_Handler
491 .weak UART5_IRQHandler
492 .thumb_set UART5_IRQHandler,Default_Handler
494 .weak TIM6_DAC_IRQHandler
495 .thumb_set TIM6_DAC_IRQHandler,Default_Handler
497 .weak TIM7_IRQHandler
498 .thumb_set TIM7_IRQHandler,Default_Handler
500 .weak DMA2_Stream0_IRQHandler
501 .thumb_set DMA2_Stream0_IRQHandler,Default_Handler
503 .weak DMA2_Stream1_IRQHandler
504 .thumb_set DMA2_Stream1_IRQHandler,Default_Handler
506 .weak DMA2_Stream2_IRQHandler
507 .thumb_set DMA2_Stream2_IRQHandler,Default_Handler
509 .weak DMA2_Stream3_IRQHandler
510 .thumb_set DMA2_Stream3_IRQHandler,Default_Handler
512 .weak DMA2_Stream4_IRQHandler
513 .thumb_set DMA2_Stream4_IRQHandler,Default_Handler
516 .thumb_set ETH_IRQHandler,Default_Handler
518 .weak ETH_WKUP_IRQHandler
519 .thumb_set ETH_WKUP_IRQHandler,Default_Handler
521 .weak CAN2_TX_IRQHandler
522 .thumb_set CAN2_TX_IRQHandler,Default_Handler
524 .weak CAN2_RX0_IRQHandler
525 .thumb_set CAN2_RX0_IRQHandler,Default_Handler
527 .weak CAN2_RX1_IRQHandler
528 .thumb_set CAN2_RX1_IRQHandler,Default_Handler
530 .weak CAN2_SCE_IRQHandler
531 .thumb_set CAN2_SCE_IRQHandler,Default_Handler
533 .weak OTG_FS_IRQHandler
534 .thumb_set OTG_FS_IRQHandler,Default_Handler
536 .weak DMA2_Stream5_IRQHandler
537 .thumb_set DMA2_Stream5_IRQHandler,Default_Handler
539 .weak DMA2_Stream6_IRQHandler
540 .thumb_set DMA2_Stream6_IRQHandler,Default_Handler
542 .weak DMA2_Stream7_IRQHandler
543 .thumb_set DMA2_Stream7_IRQHandler,Default_Handler
545 .weak USART6_IRQHandler
546 .thumb_set USART6_IRQHandler,Default_Handler
548 .weak I2C3_EV_IRQHandler
549 .thumb_set I2C3_EV_IRQHandler,Default_Handler
551 .weak I2C3_ER_IRQHandler
552 .thumb_set I2C3_ER_IRQHandler,Default_Handler
554 .weak OTG_HS_EP1_OUT_IRQHandler
555 .thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
557 .weak OTG_HS_EP1_IN_IRQHandler
558 .thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
560 .weak OTG_HS_WKUP_IRQHandler
561 .thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
563 .weak OTG_HS_IRQHandler
564 .thumb_set OTG_HS_IRQHandler,Default_Handler
566 .weak DCMI_IRQHandler
567 .thumb_set DCMI_IRQHandler,Default_Handler
570 .thumb_set RNG_IRQHandler,Default_Handler
573 .thumb_set FPU_IRQHandler,Default_Handler
575 .weak UART7_IRQHandler
576 .thumb_set UART7_IRQHandler,Default_Handler
578 .weak UART8_IRQHandler
579 .thumb_set UART8_IRQHandler,Default_Handler
581 .weak SPI4_IRQHandler
582 .thumb_set SPI4_IRQHandler,Default_Handler
584 .weak SPI5_IRQHandler
585 .thumb_set SPI5_IRQHandler,Default_Handler
587 .weak SPI6_IRQHandler
588 .thumb_set SPI6_IRQHandler,Default_Handler
590 .weak SAI1_IRQHandler
591 .thumb_set SAI1_IRQHandler,Default_Handler
593 .weak DMA2D_IRQHandler
594 .thumb_set DMA2D_IRQHandler,Default_Handler
596 .weak SAI2_IRQHandler
597 .thumb_set SAI2_IRQHandler,Default_Handler
599 .weak QUADSPI_IRQHandler
600 .thumb_set QUADSPI_IRQHandler,Default_Handler
602 .weak LPTIM1_IRQHandler
603 .thumb_set LPTIM1_IRQHandler,Default_Handler
606 .thumb_set CEC_IRQHandler,Default_Handler
608 .weak I2C4_EV_IRQHandler
609 .thumb_set I2C4_EV_IRQHandler,Default_Handler
611 .weak I2C4_ER_IRQHandler
612 .thumb_set I2C4_ER_IRQHandler,Default_Handler
614 .weak SPDIF_RX_IRQHandler
615 .thumb_set SPDIF_RX_IRQHandler,Default_Handler
617 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/