]> git.gir.st - tmk_keyboard.git/blob - protocol/lufa/LUFA-120730/LUFA/Platform/UC3/Exception.S
Change TOP_DIR to TMK_DIR in makefiles
[tmk_keyboard.git] / protocol / lufa / LUFA-120730 / LUFA / Platform / UC3 / Exception.S
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2011.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.lufa-lib.org
7 */
8
9 /*
10 Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
12 Permission to use, copy, modify, distribute, and sell this
13 software and its documentation for any purpose is hereby granted
14 without fee, provided that the above copyright notice appear in
15 all copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
20
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
28 this software.
29 */
30
31 #if defined(__AVR32__)
32 #include <avr32/io.h>
33
34 .section .exception_handlers, "ax", @progbits
35
36 // ================= EXCEPTION TABLE ================
37 .balign 0x200
38 .global EVBA_Table
39 EVBA_Table:
40
41 .org 0x000
42 Exception_Unrecoverable_Exception:
43 rjmp $
44 .org 0x004
45 Exception_TLB_Multiple_Hit:
46 rjmp $
47 .org 0x008
48 Exception_Bus_Error_Data_Fetch:
49 rjmp $
50 .org 0x00C
51 Exception_Bus_Error_Instruction_Fetch:
52 rjmp $
53 .org 0x010
54 Exception_NMI:
55 rjmp $
56 .org 0x014
57 Exception_Instruction_Address:
58 rjmp $
59 .org 0x018
60 Exception_ITLB_Protection:
61 rjmp $
62 .org 0x01C
63 Exception_OCD_Breakpoint:
64 rjmp $
65 .org 0x020
66 Exception_Illegal_Opcode:
67 rjmp $
68 .org 0x024
69 Exception_Unimplemented_Instruction:
70 rjmp $
71 .org 0x028
72 Exception_Privilege_Violation:
73 rjmp $
74 .org 0x02C
75 Exception_Floating_Point:
76 rjmp $
77 .org 0x030
78 Exception_Coprocessor_Absent:
79 rjmp $
80 .org 0x034
81 Exception_Data_Address_Read:
82 rjmp $
83 .org 0x038
84 Exception_Data_Address_Write:
85 rjmp $
86 .org 0x03C
87 Exception_DTLB_Protection_Read:
88 rjmp $
89 .org 0x040
90 Exception_DTLB_Protection_Write:
91 rjmp $
92 .org 0x044
93 Exception_DTLB_Modified:
94 rjmp $
95 .org 0x050
96 Exception_ITLB_Miss:
97 rjmp $
98 .org 0x060
99 Exception_DTLB_Miss_Read:
100 rjmp $
101 .org 0x070
102 Exception_DTLB_Miss_Write:
103 rjmp $
104 .org 0x100
105 Exception_Supervisor_Call:
106 rjmp $
107 // ============== END OF EXCEPTION TABLE =============
108
109 // ============= GENERAL INTERRUPT HANDLER ===========
110 .balign 4
111 .irp Level, 0, 1, 2, 3
112 Exception_INT\Level:
113 mov r12, \Level
114 call INTC_GetInterruptHandler
115 mov pc, r12
116 .endr
117 // ========= END OF GENERAL INTERRUPT HANDLER ========
118
119 // ====== GENERAL INTERRUPT HANDLER OFFSET TABLE ======
120 .balign 4
121 .global Autovector_Table
122 Autovector_Table:
123 .irp Level, 0, 1, 2, 3
124 .word ((AVR32_INTC_INT0 + \Level) << AVR32_INTC_IPR_INTLEVEL_OFFSET) | (Exception_INT\Level - EVBA_Table)
125 .endr
126 // === END OF GENERAL INTERRUPT HANDLER OFFSET TABLE ===
127
128 #endif
Imprint / Impressum