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
345
346
347
348
349
350
351
|
/**************************************************************************//**
* @file
* @brief CMSIS Compatible EFM32 startup file in C for IAR EWARM
* @author Energy Micro AS
* @version 3.0.0
******************************************************************************
* @section License
* <b>(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com</b>
******************************************************************************
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
* obligation to support this Software. Energy Micro AS is providing the
* Software "AS IS", with no express or implied warranties of any kind,
* including, but not limited to, any implied warranties of merchantability
* or fitness for any particular purpose or warranties against infringement
* of any proprietary rights of a third party.
*
* Energy Micro AS will not be liable for any consequential, incidental, or
* special damages, or any other relief, or for any claim by any third party,
* arising from your use of this Software.
*
*****************************************************************************/
#pragma language=extended
#pragma segment="CSTACK"
/* IAR start function */
extern void __iar_program_start(void);
/* CMSIS init function */
extern void SystemInit(void);
/* Auto defined by linker */
extern unsigned char CSTACK$$Limit;
__weak void Reset_Handler(void)
{
SystemInit();
__iar_program_start();
}
__weak void NMI_Handler(void)
{
while(1);
}
__weak void HardFault_Handler(void)
{
while(1);
}
__weak void MemManage_Handler(void)
{
while(1);
}
__weak void BusFault_Handler(void)
{
while(1);
}
__weak void UsageFault_Handler(void)
{
while(1);
}
__weak void SVC_Handler(void)
{
while(1);
}
__weak void DebugMon_Handler(void)
{
while(1);
}
__weak void PendSV_Handler(void)
{
while(1);
}
__weak void SysTick_Handler(void)
{
while(1);
}
__weak void DMA_IRQHandler(void)
{
while(1);
}
__weak void GPIO_EVEN_IRQHandler(void)
{
while(1);
}
__weak void TIMER0_IRQHandler(void)
{
while(1);
}
__weak void USART0_RX_IRQHandler(void)
{
while(1);
}
__weak void USART0_TX_IRQHandler(void)
{
while(1);
}
__weak void USB_IRQHandler(void)
{
while(1);
}
__weak void ACMP0_IRQHandler(void)
{
while(1);
}
__weak void ADC0_IRQHandler(void)
{
while(1);
}
__weak void DAC0_IRQHandler(void)
{
while(1);
}
__weak void I2C0_IRQHandler(void)
{
while(1);
}
__weak void I2C1_IRQHandler(void)
{
while(1);
}
__weak void GPIO_ODD_IRQHandler(void)
{
while(1);
}
__weak void TIMER1_IRQHandler(void)
{
while(1);
}
__weak void TIMER2_IRQHandler(void)
{
while(1);
}
__weak void TIMER3_IRQHandler(void)
{
while(1);
}
__weak void USART1_RX_IRQHandler(void)
{
while(1);
}
__weak void USART1_TX_IRQHandler(void)
{
while(1);
}
__weak void LESENSE_IRQHandler(void)
{
while(1);
}
__weak void USART2_RX_IRQHandler(void)
{
while(1);
}
__weak void USART2_TX_IRQHandler(void)
{
while(1);
}
__weak void UART0_RX_IRQHandler(void)
{
while(1);
}
__weak void UART0_TX_IRQHandler(void)
{
while(1);
}
__weak void UART1_RX_IRQHandler(void)
{
while(1);
}
__weak void UART1_TX_IRQHandler(void)
{
while(1);
}
__weak void LEUART0_IRQHandler(void)
{
while(1);
}
__weak void LEUART1_IRQHandler(void)
{
while(1);
}
__weak void LETIMER0_IRQHandler(void)
{
while(1);
}
__weak void PCNT0_IRQHandler(void)
{
while(1);
}
__weak void PCNT1_IRQHandler(void)
{
while(1);
}
__weak void PCNT2_IRQHandler(void)
{
while(1);
}
__weak void RTC_IRQHandler(void)
{
while(1);
}
__weak void BURTC_IRQHandler(void)
{
while(1);
}
__weak void CMU_IRQHandler(void)
{
while(1);
}
__weak void VCMP_IRQHandler(void)
{
while(1);
}
__weak void LCD_IRQHandler(void)
{
while(1);
}
__weak void MSC_IRQHandler(void)
{
while(1);
}
__weak void AES_IRQHandler(void)
{
while(1);
}
__weak void EBI_IRQHandler(void)
{
while(1);
}
__weak void EMU_IRQHandler(void)
{
while(1);
}
/* With IAR, the CSTACK is defined via project options settings */
#pragma data_alignment=256
#pragma location = ".intvec"
const void * const __vector_table[]= {
&CSTACK$$Limit,
(void *) Reset_Handler, /* 1 - Reset (start instruction) */
(void *) NMI_Handler, /* 2 - NMI */
(void *) HardFault_Handler, /* 3 - HardFault */
(void *) MemManage_Handler,
(void *) BusFault_Handler,
(void *) UsageFault_Handler,
(void *) 0,
(void *) 0,
(void *) 0,
(void *) 0,
(void *) SVC_Handler,
(void *) DebugMon_Handler,
(void *) 0,
(void *) PendSV_Handler,
(void *) SysTick_Handler,
(void *) DMA_IRQHandler, /* 0 - DMA */
(void *) GPIO_EVEN_IRQHandler, /* 1 - GPIO_EVEN */
(void *) TIMER0_IRQHandler, /* 2 - TIMER0 */
(void *) USART0_RX_IRQHandler, /* 3 - USART0_RX */
(void *) USART0_TX_IRQHandler, /* 4 - USART0_TX */
(void *) USB_IRQHandler, /* 5 - USB */
(void *) ACMP0_IRQHandler, /* 6 - ACMP0 */
(void *) ADC0_IRQHandler, /* 7 - ADC0 */
(void *) DAC0_IRQHandler, /* 8 - DAC0 */
(void *) I2C0_IRQHandler, /* 9 - I2C0 */
(void *) I2C1_IRQHandler, /* 10 - I2C1 */
(void *) GPIO_ODD_IRQHandler, /* 11 - GPIO_ODD */
(void *) TIMER1_IRQHandler, /* 12 - TIMER1 */
(void *) TIMER2_IRQHandler, /* 13 - TIMER2 */
(void *) TIMER3_IRQHandler, /* 14 - TIMER3 */
(void *) USART1_RX_IRQHandler, /* 15 - USART1_RX */
(void *) USART1_TX_IRQHandler, /* 16 - USART1_TX */
(void *) LESENSE_IRQHandler, /* 17 - LESENSE */
(void *) USART2_RX_IRQHandler, /* 18 - USART2_RX */
(void *) USART2_TX_IRQHandler, /* 19 - USART2_TX */
(void *) UART0_RX_IRQHandler, /* 20 - UART0_RX */
(void *) UART0_TX_IRQHandler, /* 21 - UART0_TX */
(void *) UART1_RX_IRQHandler, /* 22 - UART1_RX */
(void *) UART1_TX_IRQHandler, /* 23 - UART1_TX */
(void *) LEUART0_IRQHandler, /* 24 - LEUART0 */
(void *) LEUART1_IRQHandler, /* 25 - LEUART1 */
(void *) LETIMER0_IRQHandler, /* 26 - LETIMER0 */
(void *) PCNT0_IRQHandler, /* 27 - PCNT0 */
(void *) PCNT1_IRQHandler, /* 28 - PCNT1 */
(void *) PCNT2_IRQHandler, /* 29 - PCNT2 */
(void *) RTC_IRQHandler, /* 30 - RTC */
(void *) BURTC_IRQHandler, /* 31 - BURTC */
(void *) CMU_IRQHandler, /* 32 - CMU */
(void *) VCMP_IRQHandler, /* 33 - VCMP */
(void *) LCD_IRQHandler, /* 34 - LCD */
(void *) MSC_IRQHandler, /* 35 - MSC */
(void *) AES_IRQHandler, /* 36 - AES */
(void *) EBI_IRQHandler, /* 37 - EBI */
(void *) EMU_IRQHandler, /* 38 - EMU */
};
|