Rev 369 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 369 | Rev 377 | ||
---|---|---|---|
Line 23... | Line 23... | ||
23 | #include "91x_it.h" |
23 | #include "91x_it.h" |
24 | #include "usb_lib.h" |
24 | #include "usb_lib.h" |
25 | #include "fat16.h" |
25 | #include "fat16.h" |
26 | #include "main.h" |
26 | #include "main.h" |
27 | #include "uart1.h" |
27 | #include "uart1.h" |
- | 28 | #include "stdio.h" |
|
Line 28... | Line 29... | ||
28 | 29 | ||
Line 29... | Line 30... | ||
29 | 30 | ||
Line 41... | Line 42... | ||
41 | * Description : This function Undefined instruction exception. |
42 | * Description : This function Undefined instruction exception. |
42 | * Input : None |
43 | * Input : None |
43 | * Output : None |
44 | * Output : None |
44 | * Return : None |
45 | * Return : None |
45 | *******************************************************************************/ |
46 | *******************************************************************************/ |
- | 47 | void Undefined_Handler(void) __attribute__ ((naked)); |
|
46 | void Undefined_Handler(void) |
48 | void Undefined_Handler(void) |
47 | { |
49 | { |
48 | UART1_PutString("\r\nUndefined Handler"); |
50 | UART1_PutString("\n\rUndefined Instrution"); |
- | 51 | ||
49 | while(1) |
52 | while(1) |
50 | { |
53 | { |
51 | // infinite loop |
54 | // infinite loop |
52 | } |
55 | } |
53 | } |
56 | } |
Line 66... | Line 69... | ||
66 | * Description : This function handles preftetch abort exception. |
69 | * Description : This function handles preftetch abort exception. |
67 | * Input : None |
70 | * Input : None |
68 | * Output : None |
71 | * Output : None |
69 | * Return : None |
72 | * Return : None |
70 | *******************************************************************************/ |
73 | *******************************************************************************/ |
- | 74 | void Prefetch_Handler(void) __attribute__ ((naked)); |
|
71 | void Prefetch_Handler(void) |
75 | void Prefetch_Handler(void) |
72 | { |
76 | { |
- | 77 | register u_long *lnk_ptr; |
|
- | 78 | ||
- | 79 | __asm__ __volatile__ |
|
- | 80 | ( |
|
- | 81 | "sub lr, lr, #0\n" |
|
- | 82 | "mov %0, lr" : "=r" (lnk_ptr) |
|
- | 83 | ); |
|
- | 84 | u8 text[100]; |
|
- | 85 | ||
- | 86 | sprintf(text, "\n\rPrefetch Abort at %p 0x%08lX\n", lnk_ptr, *(lnk_ptr)); |
|
73 | UART1_PutString("\r\nPrefetch Handler"); |
87 | UART1_PutString(text); |
- | 88 | ||
74 | while(1) |
89 | while(1) |
75 | { |
90 | { |
76 | // infinite loop |
91 | // infinite loop |
77 | } |
92 | } |
78 | } |
93 | } |
Line 81... | Line 96... | ||
81 | * Description : This function handles data abort exception. |
96 | * Description : This function handles data abort exception. |
82 | * Input : None |
97 | * Input : None |
83 | * Output : None |
98 | * Output : None |
84 | * Return : None |
99 | * Return : None |
85 | *******************************************************************************/ |
100 | *******************************************************************************/ |
- | 101 | void Abort_Handler(void) __attribute__ ((naked)); |
|
86 | void Abort_Handler(void) |
102 | void Abort_Handler(void) |
87 | { |
103 | { |
- | 104 | register u_long *lnk_ptr; |
|
- | 105 | ||
- | 106 | __asm__ __volatile__ |
|
- | 107 | ( |
|
- | 108 | "sub lr, lr, #8\n" |
|
- | 109 | "mov %0, lr" : "=r" (lnk_ptr) |
|
- | 110 | ); |
|
- | 111 | u8 text[100]; |
|
- | 112 | ||
- | 113 | sprintf(text, "\n\rData Abort at %p 0x%08lX\n", lnk_ptr, *(lnk_ptr)); |
|
88 | UART1_PutString("\r\nAbort Handler"); |
114 | UART1_PutString(text); |
- | 115 | ||
89 | while(1) |
116 | while(1) |
90 | { |
117 | { |
91 | // infinite loop |
118 | // infinite loop |
92 | } |
119 | } |
93 | } |
120 | } |