QP/C++
7.3.4
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qp_config.hpp
Go to the documentation of this file.
1
//============================================================================
2
// QP configuration file (generic)
3
// Last updated for version: 7.3.0
4
// Last updated on: 2023-10-30
5
//
6
// Q u a n t u m L e a P s
7
// ------------------------
8
// Modern Embedded Software
9
//
10
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
11
//
12
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
13
//
14
// This software is dual-licensed under the terms of the open source GNU
15
// General Public License version 3 (or any later version), or alternatively,
16
// under the terms of one of the closed source Quantum Leaps commercial
17
// licenses.
18
//
19
// The terms of the open source GNU General Public License version 3
20
// can be found at: <www.gnu.org/licenses/gpl-3.0>
21
//
22
// The terms of the closed source Quantum Leaps commercial licenses
23
// can be found at: <www.state-machine.com/licensing>
24
//
25
// Redistributions in source code must retain this top-level comment block.
26
// Plagiarizing this software to sidestep the license obligations is illegal.
27
//
28
// Contact information:
29
// <www.state-machine.com>
30
// <info@state-machine.com>
31
//============================================================================
32
#ifndef QP_CONFIG_HPP_
33
#define QP_CONFIG_HPP_
34
35
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
36
37
// <n>NOTE: Requires command-line macro: QP_CONFIG
38
// <i>This qp_config.h header file is activated only when the macro
39
// <i>QP_CONFIG is defined on the command-line to the compiler
40
// <n>-------------------------------------------
41
42
// <o>QP API compatibility version (QP_API_VERSION)
43
// <0=> 0 (Maximum compatibility)
44
// <580=>580 (QP 5.8.0 or newer)
45
// <660=>660 (QP 6.6.0 or newer)
46
// <691=>691 (QP 6.9.1 or newer)
47
// <700=>700 (QP 7.0.0 or newer)
48
// <9999=>9999 (Latest only)
49
// <i>QP API backwards compatibility with the QP/C API version.
50
// <i>Lower QP_API_VERSION values enable backwards compatibility
51
// <i>with lower (older) QP API versions.
52
// <i>For example, QP_API_VERSION==691 will enable the compatibility
53
// <i>layer with QP version 6.9.1 and newer, but not older than 6.9.1.
54
// <i>QP_API_VERSION==0 enables the maximum currently supported
55
// <i>backwards compatibility. Conversely, QP_API_VERSION==9999 means
56
// <i>that no backwards compatibility layer should be enabled.
57
// <i>Default: 0 (All supported)
58
#define QP_API_VERSION 0
59
60
//..........................................................................
61
// <h>QP Functional Safety (FuSa) Subsystem (Q_UNSAFE)
62
// <i>The QP FuSa Subsystem consists of the following facilities:
63
// <i>- Software assertions as a recommended technique
64
// <i> (called Failure Assertion Programming (FAP) in IEC 61508)
65
// <i>- Software Self-Monitoring (SSM), which encompasses such techniques:
66
// <i> * Duplicate Inverse Storage for critical variables
67
// <i> * Memory Markers for critical objects (e.g., events)
68
// <i> * Hard-limits for all loops
69
// <i> * Memory Isolation by means of Memory Protection Unit (MPU)
70
71
// <c3>Disable QP FuSa in development
72
// <i>Disable assertions and other self monitoring features
73
// <i>in development build configurations (NDEBUG undefined).
74
// <i>VIOLATES functional safety standards. NOT recommended !!!
75
#ifndef NDEBUG
76
#define Q_UNSAFE
77
#endif
78
// </c>
79
80
// <c3>Disable QP FuSa in production release
81
// <i>Disable assertions and other self monitoring features
82
// <i>in the release build configurations (NDEBUG defined).
83
// <i>VIOLATES functional safety standards. NOT recommended !!!
84
#ifdef NDEBUG
85
#define Q_UNSAFE
86
#endif
87
// </c>
88
89
// </h>
90
91
//..........................................................................
92
// <h>QEP Event Processor
93
// <i>Events and state machines.
94
95
// <o>Event signal size (Q_SIGNAL_SIZE)
96
// <1U=>1
97
// <2U=>2 (default)
98
// <4U=>4
99
// <i>Size of the QEvt signal for QEP/QF [bytes]
100
// <i>Default: 2
101
#define Q_SIGNAL_SIZE 2U
102
103
// </h>
104
105
//..........................................................................
106
// <h>QF Framework
107
// <i>Active Object framework
108
109
// <o>Maximum # Active Objects (QF_MAX_ACTIVE) <1-64>
110
// <i>Maximum # Active Objects in the system <1..64>
111
// <i>Default: 32
112
#define QF_MAX_ACTIVE 32U
113
114
// <o>Maximum # event pools (QF_MAX_EPOOL)
115
// <0=>0 no event pools
116
// <1=>1 <2=>2 <3=>3 (default) <4=>4 <5=>5
117
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
118
// <12=>12 <13=>13 <14=>14 <15=>15
119
// <i>Maximum # Event Pools <1..15>
120
// <i>Default: 3
121
#define QF_MAX_EPOOL 3U
122
123
// <o>Maximum # clock tick rates (QF_MAX_TICK_RATE)
124
// <0=>0 no time events
125
// <1=>1 (default) <2=>2 <3=>3 <4=>4 <5=>5
126
// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11
127
// <12=>12 <13=>13 <14=>14 <15=>15
128
// <i>Maximum # clock tick rates for time events <1..15>
129
// <i>Default: 1
130
#define QF_MAX_TICK_RATE 1U
131
132
// <c1>Dynamic Event Constructor (QEVT_DYN_CTOR)
133
// <i>Dynamic Event Constructor (RAII)
134
#define QEVT_DYN_CTOR
135
// </c>
136
137
// <c1>Provide destructors for QP classes
138
// <i>Destructors for classes
139
#define Q_XTOR
140
// </c>
141
142
// <c1>Active Object stop API (QACTIVE_CAN_STOP)
143
// <i>Enable Active Object stop API (Not recommended)
144
#define QACTIVE_CAN_STOP
145
// </c>
146
147
// <o>Event size (QF_EVENT_SIZ_SIZE)
148
// <1U=>1
149
// <2U=>2 (default)
150
// <4U=>4
151
// <i>Size of the dynamic events for QF [bytes]
152
// <i>Default: 2 (64K bytes maximum event size)
153
#define QF_EVENT_SIZ_SIZE 2U
154
155
// <o>Time event counter size (QF_TIMEEVT_CTR_SIZE)
156
// <1U=>1
157
// <2U=>2
158
// <4U=>4 (default)
159
// <i>Size of the QTimeEvt counter [bytes]
160
// <i>Default: 4 (2^32 dynamic range)
161
#define QF_TIMEEVT_CTR_SIZE 4U
162
163
// <o>Event queue counter size (QF_EQUEUE_CTR_SIZE)
164
// <1U=>1 (default)
165
// <2U=>2
166
// <4U=>4
167
// <i>Size of event queue counter [bytes]
168
// <i>Default: 1 (255 events maximum in a queue)
169
#define QF_EQUEUE_CTR_SIZE 1U
170
171
// <o>Memory pool counter size (QF_MPOOL_CTR_SIZE)
172
// <1U=>1
173
// <2U=>2 (default)
174
// <4U=>4
175
// <i>Size of memory pool counter [bytes]
176
// <i>Default: 2 (64K blocks maximum in a pool)
177
#define QF_MPOOL_CTR_SIZE 2U
178
179
// <o>Memory block size (QF_MPOOL_SIZ_SIZE)
180
// <1U=>1
181
// <2U=>2 (default)
182
// <4U=>4
183
// <i>Size of memory pool block [bytes]
184
// <i>Default: 2 (64K bytes maximum block size)
185
#define QF_MPOOL_SIZ_SIZE 2U
186
187
// </h>
188
189
//..........................................................................
190
// <h>QS Software Tracing
191
// <i>Target-resident component of QP/Spy software tracing system
192
// <i>(tracing instrumenation and command-input).
193
194
// <n>NOTE: Requires command-line macro: Q_SPY
195
// <i>The QS software tracing instrumenation is activated only when
196
// <i>the macro Q_SPY is defined on the command-line to the compiler.
197
// <i>Typically, Q_SPY is defined only in the "spy" build configuration.
198
199
// <o>QS timestamp size (QS_TIME_SIZE)
200
// <1U=>1
201
// <2U=>2
202
// <4U=>4 (default)
203
// <i>Size of the timestamp in QS [bytes]
204
// <i>Default: 4 (2^32 dynamic range)
205
#define QS_TIME_SIZE 4U
206
207
// <o>Object pointer size (QS_OBJ_PTR_SIZE)
208
// <2U=>2
209
// <4U=>4 (default)
210
// <8U=>8
211
// <i>Size of object pointer for QS [bytes]
212
// <i>Default: 4 (4G address space)
213
#define QS_OBJ_PTR_SIZE 4U
214
215
// <o>Function pointer size (QS_FUN_PTR_SIZE)
216
// <2U=>2
217
// <4U=>4 (default)
218
// <8U=>8
219
// <i>Size of function pointer for QS [bytes]
220
// <i>Default: 4 (4G address space)
221
#define QS_FUN_PTR_SIZE 4U
222
223
// <o>QS buffer counter size (QS_CTR_SIZE)
224
// <1U=>1
225
// <2U=>2 (default)
226
// <4U=>4
227
// <i>Size of the counter in the internal QS buffer [bytes]
228
// <i>Default: 2 (64K bytes in QS buffer)
229
#define QS_CTR_SIZE 2U
230
231
// </h>
232
233
//------------- <<< end of configuration section >>> -----------------------
234
235
#endif
// QP_CONFIG_HPP_
qp_config.hpp
© 2005-2024 Quantum Leaps
|
Using Online Help
|
QP/C++ 7.3.4
| Updated on Wed Apr 24 2024
© 2005-2024 Quantum Leaps
|
Using Online Help
|
QP/C++ 7.3.4
| Updated on Wed Apr 24 2024