Statistics
| Branch: | Tag: | Revision:

root / LUFA / Platform / UC3 / Exception.S @ 978b99e5

History | View | Annotate | Download (3.08 KB)

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
#include <avr32/io.h>
32

    
33
.section .exception_handlers, "ax", @progbits
34

    
35
// ================= EXCEPTION TABLE ================
36
.balign  0x200
37
.global  EVBA_Table
38
EVBA_Table:
39

    
40
.org  0x000
41
Exception_Unrecoverable_Exception:
42
	rjmp $
43
.org  0x004
44
Exception_TLB_Multiple_Hit:
45
	rjmp $
46
.org  0x008
47
Exception_Bus_Error_Data_Fetch:
48
	rjmp $
49
.org  0x00C
50
Exception_Bus_Error_Instruction_Fetch:
51
	rjmp $
52
.org  0x010
53
Exception_NMI:
54
	rjmp $
55
.org  0x014
56
Exception_Instruction_Address:
57
	rjmp $
58
.org  0x018
59
Exception_ITLB_Protection:
60
	rjmp $
61
.org  0x01C
62
Exception_OCD_Breakpoint:
63
	rjmp $
64
.org  0x020
65
Exception_Illegal_Opcode:
66
	rjmp $
67
.org  0x024
68
Exception_Unimplemented_Instruction:
69
	rjmp $
70
.org  0x028
71
Exception_Privilege_Violation:
72
	rjmp $
73
.org  0x02C
74
Exception_Floating_Point:
75
	rjmp $
76
.org  0x030
77
Exception_Coprocessor_Absent:
78
	rjmp $
79
.org  0x034
80
Exception_Data_Address_Read:
81
	rjmp $
82
.org  0x038
83
Exception_Data_Address_Write:
84
	rjmp $
85
.org  0x03C
86
Exception_DTLB_Protection_Read:
87
	rjmp $
88
.org  0x040
89
Exception_DTLB_Protection_Write:
90
	rjmp $
91
.org  0x044
92
Exception_DTLB_Modified:
93
	rjmp $
94
.org  0x050
95
Exception_ITLB_Miss:
96
	rjmp $
97
.org  0x060
98
Exception_DTLB_Miss_Read:
99
	rjmp $
100
.org  0x070
101
Exception_DTLB_Miss_Write:
102
	rjmp $
103
.org  0x100
104
Exception_Supervisor_Call:
105
    rjmp $
106
// ============== END OF EXCEPTION TABLE =============
107

    
108
// ============= GENERAL INTERRUPT HANDLER ===========
109
.balign 4
110
.irp    Level, 0, 1, 2, 3
111
Exception_INT\Level:
112
	mov     r12, \Level
113
	call    INTC_GetInterruptHandler
114
	mov     pc, r12
115
.endr
116
// ========= END OF GENERAL INTERRUPT HANDLER ========
117

    
118
// ====== GENERAL INTERRUPT HANDLER OFFSET TABLE ======
119
.balign 4
120
.global Autovector_Table
121
Autovector_Table:
122
.irp    Level, 0, 1, 2, 3
123
	.word ((AVR32_INTC_INT0 + \Level) << AVR32_INTC_IPR_INTLEVEL_OFFSET) | (Exception_INT\Level - EVBA_Table)
124
.endr
125
// === END OF GENERAL INTERRUPT HANDLER OFFSET TABLE ===