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