blob: 1b0590ac1e587b09ee162060243bf3c9030f0f85 (
plain)
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
|
#include "uart.h"
void setup(void);
void reset_handler(void)
{
static _Bool setup_done;
if (!setup_done)
setup();
setup_done = 1;
// TODO do something here
while(1);
}
void
__attribute__((interrupt("UNDEF")))
__attribute__((section(".interrupts.text")))
undefined_instruction_vector(void)
{
uart_puts("Undefined instruction occured");
while( 1 )
{
/* Do Nothing! */
}
}
void supervisor_call_handler(void)
{
uart_puts("something svc happened\n\r");
while(1);
}
void
__attribute__((interrupt("ABORT")))
abort_handler(void)
{
uart_puts("re-entered system\n\r");
while(1);
}
void generic_handler(void)
{
uart_puts("something weird happened\n\r");
while(1);
}
void irq_handler(void)
{
uart_puts("irq happened\n\r");
while(1);
}
void fiq_handler(void)
{
uart_puts("fiq happened\n\r");
while(1);
}
|