UCOS_TI_LM3S_Keil
 全部 结构体 文件 函数 变量 类型定义 宏定义 
app_vect.c
浏览该文件的文档.
1 /*
2 *********************************************************************************************************
3 * EXAMPLE CODE
4 *
5 * (c) Copyright 2009; Micrium, Inc.; Weston, FL
6 *
7 * All rights reserved. Protected by international copyright laws.
8 * Knowledge of the source code may not be used to write a similar
9 * product. This file may only be used in accordance with a license
10 * and should not be redistributed in any way.
11 *********************************************************************************************************
12 */
13 
14 /*
15 *********************************************************************************************************
16 *
17 * EXCEPTION VECTORS
18 *
19 * LUMINARY MICRO LM3S1968 on the EK-LM3S1968
20 *
21 * Filename : app_vect.c
22 * Version : V1.02
23 * Programmer(s) : BAN
24 *********************************************************************************************************
25 */
26 
27 #include <includes.h>
28 
29 
30 /*
31 *********************************************************************************************************
32 * LOCAL DEFINES
33 *********************************************************************************************************
34 */
35 
36 
37 /*
38 *********************************************************************************************************
39 * LOCAL DATA TYPES
40 *********************************************************************************************************
41 */
42 
43 typedef union {
45  void *Ptr;
47 
48 
49 
50 /*
51 *********************************************************************************************************
52 * LOCAL TABLES
53 *********************************************************************************************************
54 */
55 
56 
57 /*
58 *********************************************************************************************************
59 * LOCAL GLOBAL VARIABLES
60 *********************************************************************************************************
61 */
62 
63 
64 /*
65 *********************************************************************************************************
66 * LOCAL FUNCTION PROTOTYPES
67 *********************************************************************************************************
68 */
69 
70 #pragma language=extended
71 #pragma segment="CSTACK"
72 
73 static void App_NMI_ISR (void);
74 
75 static void App_Fault_ISR (void);
76 
77 static void App_BusFault_ISR (void);
78 
79 static void App_UsageFault_ISR (void);
80 
81 static void App_MemFault_ISR (void);
82 
83 static void App_Spurious_ISR (void);
84 
85 extern void __iar_program_start(void);
86 
87 
88 /*
89 *********************************************************************************************************
90 * LOCAL CONFIGURATION ERRORS
91 *********************************************************************************************************
92 */
93 
94 
95 /*
96 *********************************************************************************************************
97 * EXCEPTION / INTERRUPT VECTOR TABLE
98 *
99 * Note(s) : (1) The Cortex-M3 may have up to 256 external interrupts, which are the final entries in the
100 * vector table. The LM3Sxxxx has 54 external interrupt vectors.
101 *********************************************************************************************************
102 */
103 
104 __root const APP_INTVECT_ELEM __vector_table[] @ ".intvec" = {
105  { .Ptr = (void *)__sfe( "CSTACK" )}, /* 0, SP start value. */
106  __iar_program_start, /* 1, PC start value. */
107  App_NMI_ISR, /* 2, NMI. */
108  App_Fault_ISR, /* 3, Hard Fault. */
109  App_MemFault_ISR, /* 4, Memory Management. */
110  App_BusFault_ISR, /* 5, Bus Fault. */
111  App_UsageFault_ISR, /* 6, Usage Fault. */
112  App_Spurious_ISR, /* 7, Reserved. */
113  App_Spurious_ISR, /* 8, Reserved. */
114  App_Spurious_ISR, /* 9, Reserved. */
115  App_Spurious_ISR, /* 10, Reserved. */
116  App_Spurious_ISR, /* 11, SVCall. */
117  App_Spurious_ISR, /* 12, Debug Monitor. */
118  App_Spurious_ISR, /* 13, Reserved. */
119  OS_CPU_PendSVHandler, /* 14, PendSV Handler. */
120  OS_CPU_SysTickHandler, /* 15, uC/OS-II Tick ISR Handler. */
121 
138 
155 
178  App_Spurious_ISR
179 };
180 
181 
182 /*
183 *********************************************************************************************************
184 * App_NMI_ISR()
185 *
186 * Description : Handle Non-Maskable Interrupt (NMI).
187 *
188 * Argument(s) : none.
189 *
190 * Return(s) : none.
191 *
192 * Caller(s) : This is an ISR.
193 *
194 * Note(s) : (1) Since the NMI is not being used, this serves merely as a catch for a spurious
195 * exception.
196 *********************************************************************************************************
197 */
198 
199 static void App_NMI_ISR (void)
200 {
201  while (DEF_TRUE) {
202  ;
203  }
204 }
205 
206 
207 /*
208 *********************************************************************************************************
209 * App_Fault_ISR()
210 *
211 * Description : Handle hard fault.
212 *
213 * Argument(s) : none.
214 *
215 * Return(s) : none.
216 *
217 * Caller(s) : This is an ISR.
218 *
219 * Note(s) : none.
220 *********************************************************************************************************
221 */
222 
223 static void App_Fault_ISR (void)
224 {
225  while (DEF_TRUE) {
226  ;
227  }
228 }
229 
230 
231 /*
232 *********************************************************************************************************
233 * App_BusFault_ISR()
234 *
235 * Description : Handle bus fault.
236 *
237 * Argument(s) : none.
238 *
239 * Return(s) : none.
240 *
241 * Caller(s) : This is an ISR.
242 *
243 * Note(s) : none.
244 *********************************************************************************************************
245 */
246 
247 static void App_BusFault_ISR (void)
248 {
249  while (DEF_TRUE) {
250  ;
251  }
252 }
253 
254 
255 /*
256 *********************************************************************************************************
257 * App_UsageFault_ISR()
258 *
259 * Description : Handle usage fault.
260 *
261 * Argument(s) : none.
262 *
263 * Return(s) : none.
264 *
265 * Caller(s) : This is an ISR.
266 *
267 * Note(s) : none.
268 *********************************************************************************************************
269 */
270 
271 static void App_UsageFault_ISR (void)
272 {
273  while (DEF_TRUE) {
274  ;
275  }
276 }
277 
278 
279 /*
280 *********************************************************************************************************
281 * App_MemFault_ISR()
282 *
283 * Description : Handle memory fault.
284 *
285 * Argument(s) : none.
286 *
287 * Return(s) : none.
288 *
289 * Caller(s) : This is an ISR.
290 *
291 * Note(s) : none.
292 *********************************************************************************************************
293 */
294 
295 static void App_MemFault_ISR (void)
296 {
297  while (DEF_TRUE) {
298  ;
299  }
300 }
301 
302 
303 /*
304 *********************************************************************************************************
305 * App_Spurious_ISR()
306 *
307 * Description : Handle spurious interrupt.
308 *
309 * Argument(s) : none.
310 *
311 * Return(s) : none.
312 *
313 * Caller(s) : This is an ISR.
314 *
315 * Note(s) : none.
316 *********************************************************************************************************
317 */
318 
319 static void App_Spurious_ISR (void)
320 {
321  while (DEF_TRUE) {
322  ;
323  }
324 }