libmicroemu 0.2.0
ARM Microcontroller Emulator Library
Loading...
Searching...
No Matches
exception_type.h
1#pragma once
2
3#include "libmicroemu/types.h"
4
5namespace libmicroemu {
6
12enum class ExceptionType {
13
14 kReset = 1U,
15
18 kNMI = 2U,
19
22
25
28
31
34
37
40
43
46
48 kSVCall = 11U,
49
52
55
57 kPendSV = 14U,
58
61
64
65};
66
67static constexpr auto kNoOfExternalIrqs = 32U;
68static constexpr auto kLastInternalException = ExceptionType::kSysTick;
69
70static constexpr u32 CountInternalExceptions() noexcept {
71 return static_cast<u32>(kLastInternalException) + 1U;
72};
73
74static constexpr u32 CountExceptions() noexcept {
75 return CountInternalExceptions() + kNoOfExternalIrqs;
76};
77
78} // namespace libmicroemu
The libmicroemu namespace contains all classes and functions of the libmicroemu which are public.
Definition bkpt_flags.h:6
ExceptionType
Exception enumeration.
Definition exception_type.h:12
@ kDebugMonitor
Debugging related ExceptionsOps.
Definition exception_type.h:51
@ kMemoryManagementFault
Memory related fault (bus access error either for instructions or data)
Definition exception_type.h:24
@ kSysTick
SysTick exception, used for system timer.
Definition exception_type.h:60
@ kReserved6
Reserved for future use.
Definition exception_type.h:54
@ kReserved4
Reserved for future use.
Definition exception_type.h:42
@ kReserved1
Reserved for future use.
Definition exception_type.h:33
@ kSVCall
Exception for system calls.
Definition exception_type.h:48
@ kUsageFault
Usage fault exception, triggered by errors in the usage of the processor.
Definition exception_type.h:30
@ kNMI
Definition exception_type.h:18
@ kPendSV
PendSV exception, used for context switching.
Definition exception_type.h:57
@ kHardFault
Hard fault exception, triggered by faults that cannot be handled by any other exception.
Definition exception_type.h:21
@ kReset
Special exception to reset the processor.
Definition exception_type.h:14
@ kReserved3
Reserved for future use.
Definition exception_type.h:39
@ kReserved5
Reserved for future use.
Definition exception_type.h:45
@ kBusFault
Bus fault exception, triggered by bus errors on instruction fetches and data accesses.
Definition exception_type.h:27
@ kReserved2
Reserved for future use.
Definition exception_type.h:36