amiro-blt / Target / Source / ARMCM4_STM32 / GCC / vectors.c @ 69661903
History | View | Annotate | Download (12.3 KB)
1 | 69661903 | Thomas Schöpping | /************************************************************************************//** |
---|---|---|---|
2 | * \file Source\ARMCM4_STM32\GCC\vectors.c
|
||
3 | * \brief Bootloader interrupt vector table source file.
|
||
4 | * \ingroup Target_ARMCM4_STM32
|
||
5 | * \internal
|
||
6 | *----------------------------------------------------------------------------------------
|
||
7 | * C O P Y R I G H T
|
||
8 | *----------------------------------------------------------------------------------------
|
||
9 | * Copyright (c) 2013 by Feaser http://www.feaser.com All rights reserved
|
||
10 | *
|
||
11 | *----------------------------------------------------------------------------------------
|
||
12 | * L I C E N S E
|
||
13 | *----------------------------------------------------------------------------------------
|
||
14 | * This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or
|
||
15 | * modify it under the terms of the GNU General Public License as published by the Free
|
||
16 | * Software Foundation, either version 3 of the License, or (at your option) any later
|
||
17 | * version.
|
||
18 | *
|
||
19 | * OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||
20 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||
21 | * PURPOSE. See the GNU General Public License for more details.
|
||
22 | *
|
||
23 | * You should have received a copy of the GNU General Public License along with OpenBLT.
|
||
24 | * If not, see <http://www.gnu.org/licenses/>.
|
||
25 | *
|
||
26 | * A special exception to the GPL is included to allow you to distribute a combined work
|
||
27 | * that includes OpenBLT without being obliged to provide the source code for any
|
||
28 | * proprietary components. The exception text is included at the bottom of the license
|
||
29 | * file <license.html>.
|
||
30 | *
|
||
31 | * \endinternal
|
||
32 | ****************************************************************************************/
|
||
33 | |||
34 | /****************************************************************************************
|
||
35 | * Include files
|
||
36 | ****************************************************************************************/
|
||
37 | #include "boot.h" /* bootloader generic header */ |
||
38 | |||
39 | |||
40 | /****************************************************************************************
|
||
41 | * External data declarations
|
||
42 | ****************************************************************************************/
|
||
43 | extern blt_int32u _estack; /* stack end address (memory.x) */ |
||
44 | |||
45 | |||
46 | /************************************************************************************//** |
||
47 | ** \brief Catch-all for unused interrrupt service routines.
|
||
48 | ** \return none.
|
||
49 | **
|
||
50 | ****************************************************************************************/
|
||
51 | void UnusedISR(void) |
||
52 | { |
||
53 | /* unexpected interrupt occured, so trigger an assertion to halt the system */
|
||
54 | ASSERT_RT(BLT_FALSE); |
||
55 | } /*** end of UnusedISR ***/
|
||
56 | |||
57 | |||
58 | /****************************************************************************************
|
||
59 | * I N T E R R U P T V E C T O R T A B L E
|
||
60 | ****************************************************************************************/
|
||
61 | extern void reset_handler(void); /* implemented in cstart.c */ |
||
62 | /** \brief Structure type for vector table entries. */
|
||
63 | typedef union |
||
64 | { |
||
65 | void (*func)(void); /**< for ISR function pointers */ |
||
66 | blt_int32u ptr; /**< for stack pointer entry */
|
||
67 | }tIsrFunc; |
||
68 | |||
69 | /** \brief Interrupt vector table. */
|
||
70 | __attribute__ ((section(".isr_vector")))
|
||
71 | const tIsrFunc _vectab[] =
|
||
72 | { |
||
73 | { .ptr = (blt_int32u)&_estack }, /* the initial stack pointer */
|
||
74 | { reset_handler }, /* the reset handler */
|
||
75 | { UnusedISR }, /* NMI Handler */
|
||
76 | { UnusedISR }, /* Hard Fault Handler */
|
||
77 | { UnusedISR }, /* MPU Fault Handler */
|
||
78 | { UnusedISR }, /* Bus Fault Handler */
|
||
79 | { UnusedISR }, /* Usage Fault Handler */
|
||
80 | { UnusedISR }, /* Reserved */
|
||
81 | { UnusedISR }, /* Reserved */
|
||
82 | { UnusedISR }, /* Reserved */
|
||
83 | { UnusedISR }, /* Reserved */
|
||
84 | { UnusedISR }, /* SVCall Handler */
|
||
85 | { UnusedISR }, /* Debug Monitor Handler */
|
||
86 | { UnusedISR }, /* Reserved */
|
||
87 | { UnusedISR }, /* PendSV Handler */
|
||
88 | { UnusedISR }, /* SysTick Handler */
|
||
89 | { UnusedISR }, /* Window Watchdog */
|
||
90 | { UnusedISR }, /* PVD through EXTI Line detect */
|
||
91 | { UnusedISR }, /* Tamper */
|
||
92 | { UnusedISR }, /* RTC */
|
||
93 | { UnusedISR }, /* Flash */
|
||
94 | { UnusedISR }, /* RCC */
|
||
95 | { UnusedISR }, /* EXTI Line 0 */
|
||
96 | { UnusedISR }, /* EXTI Line 1 */
|
||
97 | { UnusedISR }, /* EXTI Line 2 */
|
||
98 | { UnusedISR }, /* EXTI Line 3 */
|
||
99 | { UnusedISR }, /* EXTI Line 4 */
|
||
100 | { UnusedISR }, /* DMA1 Channel 0 */
|
||
101 | { UnusedISR }, /* DMA1 Channel 1 */
|
||
102 | { UnusedISR }, /* DMA1 Channel 2 */
|
||
103 | { UnusedISR }, /* DMA1 Channel 3 */
|
||
104 | { UnusedISR }, /* DMA1 Channel 4 */
|
||
105 | { UnusedISR }, /* DMA1 Channel 5 */
|
||
106 | { UnusedISR }, /* DMA1 Channel 6 */
|
||
107 | { UnusedISR }, /* ADC1 and ADC2, ADC3s */
|
||
108 | { UnusedISR }, /* CAN1 TX */
|
||
109 | { UnusedISR }, /* CAN1 RX0 */
|
||
110 | { UnusedISR }, /* CAN1 RX1 */
|
||
111 | { UnusedISR }, /* CAN1 SCE */
|
||
112 | { UnusedISR }, /* EXTI Line 9..5 */
|
||
113 | { UnusedISR }, /* TIM1 Break and TIM9 */
|
||
114 | { UnusedISR }, /* TIM1 Update and TIM10 */
|
||
115 | { UnusedISR }, /* TIM1 Trigger/Comm. and TIM11 */
|
||
116 | { UnusedISR }, /* TIM1 Capture Compare */
|
||
117 | { UnusedISR }, /* TIM2 */
|
||
118 | { UnusedISR }, /* TIM3 */
|
||
119 | { UnusedISR }, /* TIM4 */
|
||
120 | { UnusedISR }, /* I2C1 Event */
|
||
121 | { UnusedISR }, /* I2C1 Error */
|
||
122 | { UnusedISR }, /* I2C2 Event */
|
||
123 | { UnusedISR }, /* I2C1 Error */
|
||
124 | { UnusedISR }, /* SPI1 */
|
||
125 | { UnusedISR }, /* SPI2 */
|
||
126 | { UnusedISR }, /* USART1 */
|
||
127 | { UnusedISR }, /* USART2 */
|
||
128 | { UnusedISR }, /* USART3 */
|
||
129 | { UnusedISR }, /* EXTI Line 15..10 */
|
||
130 | { UnusedISR }, /* RTC alarm through EXTI line */
|
||
131 | { UnusedISR }, /* USB OTG FS Wakeup */
|
||
132 | { UnusedISR }, /* TIM8 Break and TIM12 */
|
||
133 | { UnusedISR }, /* TIM8 Update and TIM13 */
|
||
134 | { UnusedISR }, /* TIM8 Trigger/Comm. and TIM14 */
|
||
135 | { UnusedISR }, /* TIM8 Capture Compare */
|
||
136 | { UnusedISR }, /* DMA1 Stream7 */
|
||
137 | { UnusedISR }, /* FSMC */
|
||
138 | { UnusedISR }, /* SDIO */
|
||
139 | { UnusedISR }, /* TIM5 */
|
||
140 | { UnusedISR }, /* SPI3 */
|
||
141 | { UnusedISR }, /* UART4 */
|
||
142 | { UnusedISR }, /* UART5 */
|
||
143 | { UnusedISR }, /* TIM6 and DAC1&2 underrun err. */
|
||
144 | { UnusedISR }, /* TIM7 */
|
||
145 | { UnusedISR }, /* DMA2 Stream 0 */
|
||
146 | { UnusedISR }, /* DMA2 Stream 1 */
|
||
147 | { UnusedISR }, /* DMA2 Stream 2 */
|
||
148 | { UnusedISR }, /* DMA2 Stream 3 */
|
||
149 | { UnusedISR }, /* DMA2 Stream 4 */
|
||
150 | { UnusedISR }, /* Ethernet */
|
||
151 | { UnusedISR }, /* Ethernet Wakeup */
|
||
152 | { UnusedISR }, /* CAN2 TX */
|
||
153 | { UnusedISR }, /* CAN2 RX0 */
|
||
154 | { UnusedISR }, /* CAN2 RX1 */
|
||
155 | { UnusedISR }, /* CAN2 SCE */
|
||
156 | { UnusedISR }, /* USB OTG FS */
|
||
157 | { UnusedISR }, /* DMA2 Stream 5 */
|
||
158 | { UnusedISR }, /* DMA2 Stream 6 */
|
||
159 | { UnusedISR }, /* DMA2 Stream 7 */
|
||
160 | { UnusedISR }, /* USART6 */
|
||
161 | { UnusedISR }, /* I2C3 event */
|
||
162 | { UnusedISR }, /* I2C3 error */
|
||
163 | { UnusedISR }, /* USB OTG HS End Point 1 Out */
|
||
164 | { UnusedISR }, /* USB OTG HS End Point 1 In */
|
||
165 | { UnusedISR }, /* USB OTG HS Wakeup through EXTI*/
|
||
166 | { UnusedISR }, /* USB OTG HS */
|
||
167 | { UnusedISR }, /* DCMI */
|
||
168 | { UnusedISR }, /* CRYP crypto */
|
||
169 | { UnusedISR }, /* Hash and Rng */
|
||
170 | { UnusedISR } /* FPU */
|
||
171 | }; |
||
172 | |||
173 | |||
174 | /************************************ end of vectors.c *********************************/
|
||
175 | |||
176 |