Skip to content

Commit eeb1d01

Browse files
committed
added a default vector table
1 parent 15cc371 commit eeb1d01

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

entry/cortex-vector.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// include the header with the global reset handler and the default handler
2+
#include "entry.hpp"
3+
4+
// array with the initial vector table. Interrupt handlers should all point
5+
// to the default handler as the irq class should be used to register the
6+
// the handlers for interrupts.
7+
void (*const volatile __vectors[])(void) __attribute__ ((section(".vectors"))) = {
8+
(void (*)(void)) &__stack_end,
9+
__reset_handler, // The reset handler
10+
__default_handler, // The NMI handler
11+
__default_handler, // The hard fault handler
12+
__default_handler, // The MPU fault handler
13+
__default_handler, // The bus fault handler
14+
__default_handler, // The usage fault handler
15+
0, // Reserved
16+
0, // Reserved
17+
0, // Reserved
18+
0, // Reserved
19+
__default_handler, // SVCall handler
20+
__default_handler, // Debug monitor handler
21+
0, // Reserved
22+
__default_handler, // The PendSV handler
23+
__default_handler // The SysTick handler
24+
};

0 commit comments

Comments
 (0)