QP/C
7.4.0-rc.3
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qp_config.h
Go to the documentation of this file.
1
/*!@file
2
@code_uid{qp_config.h,Sample @QPX configuration file}
3
@code_litem{Details}
4
This an example of a @QPX configuration file with the explanation
5
of the available configuration macros. The `qp_config.h` file
6
is optional and does not need to be provided (see the description of
7
the #QP_CONFIG macro below). In that case, all the listed configuration
8
macros will be set at their __default__ values.
9
10
@attention
11
The `qp_config.h` configuration file takes effect only when the
12
command-line macro #QP_CONFIG is defined.
13
14
15
Also, if the `qp_config.h` file is provided and enabled (by defining
16
the command-line macro #QP_CONFIG), but any of the listed configuration
17
macros is not defined in the provided file, the __default__ value
18
will be used.
19
20
@note
21
Some of the configuration macros listed in this file apply only
22
to specific @QPX ports.
23
24
@code_litem{Configuration Wizard support}
25
The `qp_config.h` header files provided in the various @ref exa "@QPX examples"
26
are formatted to support the "Configuration Wizard" editor available in some IDEs
27
(e.g., KEIL uVision). The screen shot below shows how to edit `qp_config.h`
28
in that mode.
29
30
@image html qp_config.png
31
@image latex qp_config.png width=5in
32
33
@endcode_uid
34
*/
35
#ifndef QP_CONFIG_H_
36
#define QP_CONFIG_H_
37
38
//------------------------------------------------------------------------------
39
/*!
40
@code_uid{::QP_API_VERSION,QP Framework API backwards-compatibility version}
41
@code_litem{Details}
42
QP API backwards compatibility with the @QPX API version.
43
Lower `QP_API_VERSION` values enable backwards compatibility
44
with lower (older) QP API versions.
45
46
- 0 => maximum supported compatibility
47
- 580 => QP 5.8.0 or newer
48
- 660 => QP 6.6.0 or newer
49
- 691 => QP 6.9.1 or newer
50
- 700 => QP 7.0.0 or newer
51
- 9999 => Latest QP API only (minimum compatibility)
52
53
For example, `QP_API_VERSION==691` will enable the compatibility
54
layer with QP version 6.9.1 and newer, but not older than 6.9.1.
55
`QP_API_VERSION==0` enables the maximum currently supported
56
backwards compatibility. Conversely, `QP_API_VERSION==9999` means
57
that no backwards compatibility layer should be enabled.
58
Default: 0 (All supported)
59
@endcode_uid
60
*/
61
#define QP_API_VERSION 0
62
63
//------------------------------------------------------------------------------
64
/*!
65
@code_uid{::Q_UNSAFE,Disable the QP Functional Safety (FuSa) Subsystem}
66
@code_litem{Details}
67
Defining the macro `Q_UNSAFE` disables QP FuSa Subsystem, which
68
consists of the following facilities:
69
- Software assertions as a recommended technique
70
(called Failure Assertion Programming (FAP) in IEC 61508)
71
- Software Self-Monitoring (SSM), which encompasses such techniques:
72
+ Duplicate Inverse Storage for critical variables
73
+ Memory Markers for critical objects (e.g., events)
74
+ Explicit iteration bounds for all loops
75
+ Memory Isolation by means of Memory Protection Unit (MPU)
76
77
Default: undefined
78
79
@attention
80
Disabling QP FuSa Subsystem (by defining the macro `Q_UNSAFE`), especially
81
in the final production release, __CONTRADICTS__ the most fundamental
82
principles of functional safety and is __NOT recommended__.
83
84
@endcode_uid
85
*/
86
#define Q_UNSAFE
87
88
//------------------------------------------------------------------------------
89
// <h>QEP Event Processor
90
// <i>Events and state machines.
91
92
/*!
93
@code_uid{::Q_SIGNAL_SIZE,Size of the ::QEvt signal [bytes]}
94
@code_litem{Details}
95
This macro controls the dynamic range of event signals.
96
- 1U => 1 byte (up to 255 signals)
97
- 2U => 2 bytes (up to 65535 signals) (default)
98
- 4U => 4 bytes (up to 4G signals)
99
@endcode_uid
100
*/
101
#define Q_SIGNAL_SIZE 2U
102
103
// </h>
104
105
//------------------------------------------------------------------------------
106
// <h>QF Framework
107
// <i>Active Object framework
108
109
/*!
110
@code_uid{::QF_MAX_ACTIVE,Maximum # Active Objects in the system (1..64)}
111
@code_litem{Details}
112
Defines the maximum # Active Objects that QP Framework can manage at any time.
113
- Minimum: 1
114
- Default: 32
115
- Maximum: 64 (inclusive)
116
@endcode_uid
117
*/
118
#define QF_MAX_ACTIVE 32U
119
120
/*!
121
@code_uid{::QF_MAX_EPOOL,Maximum # event pools in the system (0..15)}
122
@code_litem{Details}
123
- Minimum: 0 -- no event pools at all
124
- Default: 3
125
- Maximum: 15 (inclusive)
126
@endcode_uid
127
*/
128
#define QF_MAX_EPOOL 3U
129
130
/*!
131
@code_uid{::QF_MAX_TICK_RATE,Maximum # clock tick rates in the system (0..15)}
132
@code_litem{Details}
133
- Minimum: 0 -- no time events at all
134
- Default: 1
135
- Maximum: 15 (inclusive)
136
@endcode_uid
137
*/
138
#define QF_MAX_TICK_RATE 1U
139
140
//------------------------------------------------------------------------------
141
/*!
142
@code_uid{::QEVT_PAR_INIT,Event parameter initialization (RAII) for dynamic events}
143
@code_litem{Details}
144
When defined, the macro activates initialization of event parameters while
145
creating dynamic events. This could be use for Resource Acquisition Is
146
Initialization (__RAII__) for dynamic events.
147
148
Default: undefined
149
150
@sa
151
- Q_NEW()
152
- Q_NEW_X()
153
- @ref QEvt::QEvt_init() "QEvt_init()"
154
@endcode_uid
155
*/
156
#define QEVT_PAR_INIT
157
158
//------------------------------------------------------------------------------
159
/*!
160
@code_uid{::QACTIVE_CAN_STOP,Enable the Active Object stop API}
161
@code_litem{Details}
162
When defined, enable Active Object stop API (Not recommended)
163
164
Default: undefined
165
@endcode_uid
166
*/
167
#define QACTIVE_CAN_STOP
168
169
//------------------------------------------------------------------------------
170
/*!
171
@code_uid{::QF_EVENT_SIZ_SIZE,Maximum size of dynamic events managed by QP}
172
173
@code_litem{Details}
174
This macro controls the maximum size of dynamic events managed by QP Framework.
175
- 1U => 1 byte dynamic range (event size up to 255 bytes)
176
- 2U => 2 byte dynamic range (event size up to 65535 bytes) (default)
177
178
Default: 2 byte dynamic range (64K bytes maximum event size)
179
*/
180
#define QF_EVENT_SIZ_SIZE 2U
181
182
//------------------------------------------------------------------------------
183
/*!
184
@code_uid{::QF_TIMEEVT_CTR_SIZE,Time event counter size}
185
@code_litem{Details}
186
This macro controls the dynamic range of timeouts allowed in ::QTimeEvt.
187
The timeouts are counted in tick _of the associated_ clock tick rate.
188
- 1U => 1 byte (timeouts of up to 255 ticks)
189
- 2U => 2 bytes (timeouts of up to 65535 ticks)
190
- 4U => 4 bytes (timeouts of up to 2^32 ticks) (default)
191
192
Default: 4 bytes (2^32 dynamic range)
193
@endcode_uid
194
*/
195
#define QF_TIMEEVT_CTR_SIZE 4U
196
197
//------------------------------------------------------------------------------
198
/*!
199
@code_uid{::QF_EQUEUE_CTR_SIZE,Event queue counter size}
200
@code_litem{Details}
201
This macro controls the maximum number of events that ::QEQueue can hold
202
- 1U => 1 byte (maximum 255 events) (default)
203
- 2U => 2 bytes (maximum 65535 events)
204
- 4U => 4 bytes (maximum 2^32 events)
205
206
Default: 1 (maximum 255 events in a queue)
207
@endcode_uid
208
*/
209
#define QF_EQUEUE_CTR_SIZE 1U
210
211
//------------------------------------------------------------------------------
212
/*!
213
@code_uid{::QF_MPOOL_CTR_SIZE,Memory pool counter size (QF_MPOOL_CTR_SIZE)}
214
@code_litem{Details}
215
This macro controls the maximum number of memory blocks that ::QMPool can hold
216
- 1U => 1 byte (up to 255 memory blocks)
217
- 2U => 2 bytes (up to 65535 memory blocks) (default)
218
- 2U => 2 bytes (up to 2^32 memory blocks)
219
220
Default: 2 bytes (up to 65535 memory blocks maximum in a pool)
221
@endcode_uid
222
*/
223
#define QF_MPOOL_CTR_SIZE 2U
224
225
//------------------------------------------------------------------------------
226
/*!
227
@code_uid{::QF_MPOOL_SIZ_SIZE,Memory block size (QF_MPOOL_SIZ_SIZE)}
228
@code_litem{Details}
229
This macro controls the maximum size of memory blocks that ::QMPool can hold.
230
- 1U => 1 byte dynamic range (event size up to 255 bytes)
231
- 2 U=> 2 byte dynamic range (event size up to 65535 bytes) (default)
232
233
Default: 2 byte dynamic range (64K bytes maximum block size)
234
@endcode_uid
235
*/
236
#define QF_MPOOL_SIZ_SIZE 2U
237
238
//==============================================================================
239
// QS Software Tracing
240
// Target-resident component of QP/Spy software tracing system
241
// (tracing instrumentation and command-input).
242
243
//------------------------------------------------------------------------------
244
/*!
245
@code_uid{::QS_TIME_SIZE,QS timestamp size (QS_TIME_SIZE)}
246
@code_litem{Details}
247
This macro controls the dynamic range of timestamp produced by QS software tracing.
248
- 1U => 1 byte (timestamp wraps around at 255 )
249
- 2U => 2 bytes (timestamp wraps around at 65535)
250
- 4U => 4 bytes (timestamp wraps around at 2^32) (default)
251
252
Default: 4 bytes (2^32 dynamic range)
253
@sa
254
- ::QSTimeCtr
255
- QS::QS_onGetTime()
256
@endcode_uid
257
*/
258
#define QS_TIME_SIZE 4U
259
260
//------------------------------------------------------------------------------
261
/*!
262
@code_uid{::QS_CTR_SIZE,QS buffer counter size (QS_CTR_SIZE)}
263
@code_litem{Details}
264
This macro controls the maximum number of bytes held in the QS TX/RX buffers.
265
- 1U => 1 byte (maximum 255 bytes)
266
- 2U => 2 bytes (maximum 65535 bytes) (default)
267
- 4U => 4 bytes (maximum 2^32 bytes)
268
269
Default: 2 bytes (maximum 65535 bytes in QS buffers)
270
@endcode_uid
271
*/
272
#define QS_CTR_SIZE 2U
273
274
//==============================================================================
275
/*!
276
@code_uid{::QF_ON_CONTEXT_SW,Enable context switch callback WITHOUT QS}
277
@code_litem{Details}
278
When defined, enables context switch callback QF_onContextSw() in the built-in
279
kernels (QV, QK, QXK).
280
281
Default: undefined
282
@endcode_uid
283
*/
284
#define QF_ON_CONTEXT_SW
285
286
//------------------------------------------------------------------------------
287
/*!
288
@code_uid{::QF_MEM_ISOLATE,Enable MPU memory isolation}
289
@code_litem{Details}
290
When defined, enables memory isolation (requires MPU)
291
@note
292
Implies ::QF_ON_CONTEXT_SW (i.e., ::QF_ON_CONTEXT_SW gets defined)
293
@endcode_uid
294
*/
295
#define QF_MEM_ISOLATE
296
// </c>
297
298
//------------------------------------------------------------------------------
299
/*!
300
@code_uid{::QK_USE_IRQ_NUM,Use IRQ handler for QK return-from-preemption in ARM Cortex-M}
301
@code_litem{Details}
302
If #QK_USE_IRQ_NUM macro is defined, it specifies the IRQ number in ARM Cortex-M
303
to be used as the exception for return-from-preemption in the QK kernel.
304
305
This macro should be defined only if the NMI handler is utilized in the project.
306
The specified IRQ number must be otherwise unused.
307
308
Default: undefined
309
310
@sa
311
Requires defining the macro #QK_USE_IRQ_HANDLER
312
@endcode_uid
313
*/
314
#define QK_USE_IRQ_NUM 31
315
316
/*!
317
@code_uid{::QK_USE_IRQ_HANDLER,Use IRQ handler for QK return-from-preemption in ARM Cortex-M}
318
@code_litem{Details}
319
If #QK_USE_IRQ_HANDLER macro is defined, it specifies the IRQ handler name
320
in ARM Cortex-M to be used as the exception for return-from-preemption
321
in the QK kernel.
322
323
This macro should be defined only if the NMI handler is utilized in the project.
324
The specified IRQ handler must be otherwise unused.
325
326
@sa
327
Requires defining the macro #QK_USE_IRQ_NUM
328
@endcode_uid
329
*/
330
#define QK_USE_IRQ_HANDLER Reserved31_IRQHandler
331
332
//------------------------------------------------------------------------------
333
/*!
334
@code_uid{::QXK_USE_IRQ_NUM,Use IRQ handler for QXK return-from-preemption in ARM Cortex-M}
335
@code_litem{Details}
336
If #QXK_USE_IRQ_NUM macro is defined, it specifies the IRQ number in ARM Cortex-M
337
to be used as the exception for return-from-preemption in the QXK kernel.
338
339
This macro should be defined only if the NMI handler is utilized in the project.
340
The specified IRQ number must be otherwise unused.
341
342
Default: undefined
343
344
@sa
345
Requires defining the macro #QXK_USE_IRQ_HANDLER
346
@endcode_uid
347
*/
348
#define QXK_USE_IRQ_NUM 31
349
350
/*!
351
@code_uid{::QXK_USE_IRQ_HANDLER,Use IRQ handler for QK return-from-preemption in ARM Cortex-M}
352
@code_litem{Details}
353
If #QXK_USE_IRQ_HANDLER macro is defined, it specifies the IRQ handler name
354
in ARM Cortex-M to be used as the exception for return-from-preemption
355
in the QK kernel.
356
357
This macro should be defined only if the NMI handler is utilized in the project.
358
The specified IRQ handler must be otherwise unused.
359
360
Default: undefined
361
362
@sa
363
Requires defining the macro #QXK_USE_IRQ_NUM
364
@endcode_uid
365
*/
366
#define QXK_USE_IRQ_HANDLER Reserved31_IRQHandler
367
368
#endif
// QP_CONFIG_H_
spex
qp_config.h
© 2005-2024 Quantum Leaps
|
Using Online Help
|
QP/C 7.4.0-rc.3
| created with
Spexygen
© 2005-2024 Quantum Leaps
|
Using Online Help
|
QP/C 7.4.0-rc.3
| created with
Spexygen