µOS++ IIIe Reference
7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
exception-handlers.h
Go to the documentation of this file.
1
/*
2
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
3
* Copyright (c) 2015-2025 Liviu Ionescu. All rights reserved.
4
*
5
* Permission to use, copy, modify, and/or distribute this software
6
* for any purpose is hereby granted, under the terms of the MIT license.
7
*
8
* If a copy of the license was not distributed with this file, it can
9
* be obtained from https://opensource.org/licenses/mit.
10
*/
11
12
#ifndef CMSIS_PLUS_CORTEXM_EXCEPTION_HANDLERS_H_
13
#define CMSIS_PLUS_CORTEXM_EXCEPTION_HANDLERS_H_
14
15
#include <stdint.h>
16
17
#if defined(DEBUG)
18
#define __DEBUG_BKPT() __asm__ volatile ("bkpt 0"
)
19
#endif
20
21
// ----------------------------------------------------------------------------
22
23
#if defined(__cplusplus)
24
extern
"C"
25
{
26
#endif
27
28
extern
void
29
Reset_Handler
(
void
);
30
31
extern
void
32
NMI_Handler
(
void
);
33
34
extern
void
35
HardFault_Handler
(
void
);
36
37
#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
38
39
extern
void
40
MemManage_Handler (
void
);
41
42
extern
void
43
BusFault_Handler (
void
);
44
45
extern
void
46
UsageFault_Handler (
void
);
47
48
extern
void
49
DebugMon_Handler (
void
);
50
51
#endif
52
53
extern
void
54
SVC_Handler
(
void
);
55
56
extern
void
57
PendSV_Handler
(
void
);
58
59
extern
void
60
SysTick_Handler
(
void
);
61
62
// Exception Stack Frame for the Cortex-M3 and Cortex-M4 processor.
63
typedef
struct
exception_stack_frame_s
64
{
65
uint32_t
r0
;
66
uint32_t
r1
;
67
uint32_t
r2
;
68
uint32_t
r3
;
69
uint32_t
r12
;
70
uint32_t
lr
;
71
uint32_t
pc
;
72
uint32_t
psr
;
73
#if defined(__ARM_ARCH_7EM__)
74
uint32_t s[16];
75
#endif
76
}
exception_stack_frame_t
;
77
78
#if defined(TRACE)
79
#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
80
void
81
dump_exception_stack (
exception_stack_frame_t
* frame, uint32_t cfsr,
82
uint32_t mmfar, uint32_t bfar, uint32_t lr);
83
#endif
// defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
84
#if defined(__ARM_ARCH_6M__)
85
void
86
dump_exception_stack (
exception_stack_frame_t
* frame, uint32_t lr);
87
#endif
// defined(__ARM_ARCH_6M__)
88
#endif
// defined(TRACE)
89
90
void
91
HardFault_Handler_C
(
exception_stack_frame_t
* frame, uint32_t lr);
92
93
#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
94
95
void
96
UsageFault_Handler_C (
exception_stack_frame_t
* frame, uint32_t lr);
97
98
void
99
BusFault_Handler_C (
exception_stack_frame_t
* frame, uint32_t lr);
100
101
#endif
// defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
102
103
#if defined(__cplusplus)
104
}
105
#endif
106
107
// ----------------------------------------------------------------------------
108
109
#endif
/* CMSIS_PLUS_CORTEXM_EXCEPTION_HANDLERS_H_ */
HardFault_Handler
void HardFault_Handler(void)
SVC_Handler
void SVC_Handler(void)
Definition
exception-handlers.c:685
HardFault_Handler_C
void HardFault_Handler_C(exception_stack_frame_t *frame, uint32_t lr)
PendSV_Handler
void PendSV_Handler(void)
Definition
exception-handlers.c:725
NMI_Handler
void NMI_Handler(void)
Definition
exception-handlers.c:117
SysTick_Handler
void SysTick_Handler(void)
Definition
exception-handlers.c:745
Reset_Handler
void Reset_Handler(void)
Definition
exception-handlers.c:81
exception_stack_frame_t
struct exception_stack_frame_s exception_stack_frame_t
exception_stack_frame_s
Definition
exception-handlers.h:64
exception_stack_frame_s::r0
uint32_t r0
Definition
exception-handlers.h:65
exception_stack_frame_s::r12
uint32_t r12
Definition
exception-handlers.h:69
exception_stack_frame_s::pc
uint32_t pc
Definition
exception-handlers.h:71
exception_stack_frame_s::r3
uint32_t r3
Definition
exception-handlers.h:68
exception_stack_frame_s::lr
uint32_t lr
Definition
exception-handlers.h:70
exception_stack_frame_s::psr
uint32_t psr
Definition
exception-handlers.h:72
exception_stack_frame_s::r2
uint32_t r2
Definition
exception-handlers.h:67
exception_stack_frame_s::r1
uint32_t r1
Definition
exception-handlers.h:66
include
cmsis-plus
cortexm
exception-handlers.h
Generated by
1.9.7