[1272ff]: ilg.gnuarmeclipse.templates.stm / templates / micro-os-plus / stm32f0.pack / src / cmsis / vectors_stm32f0xx.c  Maximize  Restore  History

Download this file

345 lines (312 with data), 10.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
//
// This file is part of the ÂľOS++ III distribution.
// Copyright (c) 2014 Liviu Ionescu.
//
// ----------------------------------------------------------------------------
#include "cortexm/ExceptionHandlers.h"
// ----------------------------------------------------------------------------
void __attribute__((weak))
Default_Handler(void);
// Forward declaration of the specific IRQ handlers. These are aliased
// to the Default_Handler, which is a 'forever' loop. When the application
// defines a handler (with the same name), this will automatically take
// precedence over these weak definitions
void __attribute__ ((weak, alias ("Default_Handler")))
WWDG_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
PVD_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
RTC_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
FLASH_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
RCC_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
EXTI0_1_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
EXTI2_3_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
EXTI4_15_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TS_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
DMA1_Channel1_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
DMA1_Channel2_3_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
DMA1_Channel4_5_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
ADC1_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM1_BRK_UP_TRG_COM_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM1_CC_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM2_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM3_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM6_DAC_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM14_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM15_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM16_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM17_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
I2C1_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
I2C2_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
SPI1_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
SPI2_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
USART1_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
USART2_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
CEC_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
ADC1_COMP_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
PVD_VDDIO2_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
RCC_CRS_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TSC_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
TIM7_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
USART3_4_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
CEC_CAN_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
USB_IRQHandler(void);
void __attribute__ ((weak, alias ("Default_Handler")))
DMA1_Channel4_5_6_7_IRQHandler(void);
// ----------------------------------------------------------------------------
extern unsigned int _estack;
typedef void
(* const pHandler)(void);
// ----------------------------------------------------------------------------
// The vector table.
// This relies on the linker script to place at correct location in memory.
__attribute__ ((section(".isr_vector")))
pHandler g_pfnVectors[] =
{
// Core Level - CM0
(pHandler) &_estack, // The initial stack pointer
Reset_Handler, // The reset handler
NMI_Handler, // The NMI handler
HardFault_Handler, // The hard fault handler
#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
MemManage_Handler, // The MPU fault handler
BusFault_Handler, // The bus fault handler
UsageFault_Handler, // The usage fault handler
#else
0, 0, 0, // Reserved
#endif
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
SVC_Handler, // SVCall handler
#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
DebugMon_Handler, // Debug monitor handler
#else
0, // Reserved
#endif
0, // Reserved
PendSV_Handler, // The PendSV handler
SysTick_Handler, // The SysTick handler
// ----------------------------------------------------------------------
#if defined(STM32F030)
// Chip Level - STM32F030
WWDG_IRQHandler, //
0, //
RTC_IRQHandler, //
FLASH_IRQHandler, //
RCC_IRQHandler, //
EXTI0_1_IRQHandler, //
EXTI2_3_IRQHandler, //
EXTI4_15_IRQHandler, //
0, //
DMA1_Channel1_IRQHandler, //
DMA1_Channel2_3_IRQHandler, //
DMA1_Channel4_5_IRQHandler, //
ADC1_IRQHandler, //
TIM1_BRK_UP_TRG_COM_IRQHandler, //
TIM1_CC_IRQHandler, //
0, //
TIM3_IRQHandler, //
0, //
0, //
TIM14_IRQHandler, //
TIM15_IRQHandler, //
TIM16_IRQHandler, //
TIM17_IRQHandler, //
I2C1_IRQHandler, //
I2C2_IRQHandler, //
SPI1_IRQHandler, //
SPI2_IRQHandler, //
USART1_IRQHandler, //
USART2_IRQHandler, //
0, //
0, //
0, //
#elif defined(STM32F031)
// Chip Level - STM32F031 (was STM32F0xx LD)
WWDG_IRQHandler, //
PVD_IRQHandler, //
RTC_IRQHandler, //
FLASH_IRQHandler, //
RCC_IRQHandler, //
EXTI0_1_IRQHandler, //
EXTI2_3_IRQHandler, //
EXTI4_15_IRQHandler, //
0, //
DMA1_Channel1_IRQHandler, //
DMA1_Channel2_3_IRQHandler, //
DMA1_Channel4_5_IRQHandler, //
ADC1_IRQHandler, //
TIM1_BRK_UP_TRG_COM_IRQHandler, //
TIM1_CC_IRQHandler, //
TIM2_IRQHandler, //
TIM3_IRQHandler, //
0, //
0, //
TIM14_IRQHandler, //
0, //
TIM16_IRQHandler, //
TIM17_IRQHandler, //
I2C1_IRQHandler, //
0, //
SPI1_IRQHandler, //
0, //
USART1_IRQHandler, //
0, //
0, //
0, //
0, //
#elif defined(STM32F042)
// Chip Level - STM32F042 (was STM32F0xx MD)
WWDG_IRQHandler, //
PVD_VDDIO2_IRQHandler, //
RTC_IRQHandler, //
FLASH_IRQHandler, //
RCC_CRS_IRQHandler, //
EXTI0_1_IRQHandler, //
EXTI2_3_IRQHandler, //
EXTI4_15_IRQHandler, //
TSC_IRQHandler, //
DMA1_Channel1_IRQHandler, //
DMA1_Channel2_3_IRQHandler, //
DMA1_Channel4_5_IRQHandler, //
ADC1_IRQHandler, //
TIM1_BRK_UP_TRG_COM_IRQHandler, //
TIM1_CC_IRQHandler, //
TIM2_IRQHandler, //
TIM3_IRQHandler, //
0, //
0, //
TIM14_IRQHandler, //
0, //
TIM16_IRQHandler, //
TIM17_IRQHandler, //
I2C1_IRQHandler, //
0, //
SPI1_IRQHandler, //
SPI2_IRQHandler, //
USART1_IRQHandler, //
USART2_IRQHandler, //
0, //
CEC_CAN_IRQHandler, //
USB_IRQHandler, //
#elif defined(STM32F051)
// Chip Level - STM32F051 (was STM32F0xx MD)
WWDG_IRQHandler, //
PVD_IRQHandler, //
RTC_IRQHandler, //
FLASH_IRQHandler, //
RCC_IRQHandler, //
EXTI0_1_IRQHandler, //
EXTI2_3_IRQHandler, //
EXTI4_15_IRQHandler, //
TS_IRQHandler, //
DMA1_Channel1_IRQHandler, //
DMA1_Channel2_3_IRQHandler, //
DMA1_Channel4_5_IRQHandler, //
ADC1_COMP_IRQHandler, //
TIM1_BRK_UP_TRG_COM_IRQHandler, //
TIM1_CC_IRQHandler, //
TIM2_IRQHandler, //
TIM3_IRQHandler, //
TIM6_DAC_IRQHandler, //
0, //
TIM14_IRQHandler, //
TIM15_IRQHandler, //
TIM16_IRQHandler, //
TIM17_IRQHandler, //
I2C1_IRQHandler, //
I2C2_IRQHandler, //
SPI1_IRQHandler, //
SPI2_IRQHandler, //
USART1_IRQHandler, //
USART2_IRQHandler, //
0, //
CEC_IRQHandler, //
0, //
#elif defined(STM32F072)
// Chip Level - STM32F051 (was STM32F0xx MD)
WWDG_IRQHandler, //
PVD_VDDIO2_IRQHandler, //
RTC_IRQHandler, //
FLASH_IRQHandler, //
RCC_CRS_IRQHandler, //
EXTI0_1_IRQHandler, //
EXTI2_3_IRQHandler, //
EXTI4_15_IRQHandler, //
TSC_IRQHandler, //
DMA1_Channel1_IRQHandler, //
DMA1_Channel2_3_IRQHandler, //
DMA1_Channel4_5_6_7_IRQHandler, //
ADC1_COMP_IRQHandler, //
TIM1_BRK_UP_TRG_COM_IRQHandler, //
TIM1_CC_IRQHandler, //
TIM2_IRQHandler, //
TIM3_IRQHandler, //
TIM6_DAC_IRQHandler, //
TIM7_IRQHandler, //
TIM14_IRQHandler, //
TIM15_IRQHandler, //
TIM16_IRQHandler, //
TIM17_IRQHandler, //
I2C1_IRQHandler, //
I2C2_IRQHandler, //
SPI1_IRQHandler, //
SPI2_IRQHandler, //
USART1_IRQHandler, //
USART2_IRQHandler, //
USART3_4_IRQHandler, //
CEC_CAN_IRQHandler, //
USB_IRQHandler, //
#else
#error "missing vectors"
#endif
// @0x108. This is for boot in RAM mode for STM32F0xx devices.
(pHandler) 0xF108F85F
};
// ----------------------------------------------------------------------------
// Processor ends up here if an unexpected interrupt occurs or a specific
// handler is not present in the application code.
void __attribute__ ((section(".after_vectors")))
Default_Handler(void)
{
while (1)
{
}
}
// ----------------------------------------------------------------------------