|
| 1 | +//============================================================================ |
| 2 | +// QP configuration file (generic) |
| 3 | +// |
| 4 | +// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. |
| 5 | +// |
| 6 | +// Q u a n t u m L e a P s |
| 7 | +// ------------------------ |
| 8 | +// Modern Embedded Software |
| 9 | +// |
| 10 | +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial |
| 11 | +// |
| 12 | +// The QP/C software is dual-licensed under the terms of the open-source GNU |
| 13 | +// General Public License (GPL) or under the terms of one of the closed- |
| 14 | +// source Quantum Leaps commercial licenses. |
| 15 | +// |
| 16 | +// Redistributions in source code must retain this top-level comment block. |
| 17 | +// Plagiarizing this software to sidestep the license obligations is illegal. |
| 18 | +// |
| 19 | +// NOTE: |
| 20 | +// The GPL (see <www.gnu.org/licenses/gpl-3.0>) does NOT permit the |
| 21 | +// incorporation of the QP/C software into proprietary programs. Please |
| 22 | +// contact Quantum Leaps for commercial licensing options, which expressly |
| 23 | +// supersede the GPL and are designed explicitly for licensees interested |
| 24 | +// in using QP/C in closed-source proprietary applications. |
| 25 | +// |
| 26 | +// Quantum Leaps contact information: |
| 27 | +// <www.state-machine.com/licensing> |
| 28 | + |
| 29 | +//============================================================================ |
| 30 | +#ifndef QP_CONFIG_H_ |
| 31 | +#define QP_CONFIG_H_ |
| 32 | + |
| 33 | +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- |
| 34 | + |
| 35 | +// <o>QP API compatibility version (QP_API_VERSION) |
| 36 | +// <0=> 0 (Maximum compatibility) |
| 37 | +// <691=>691 (QP 6.9.1 or newer) |
| 38 | +// <734=>7.3.4 (QP 7.3.4 or newer) |
| 39 | +// <9999=>9999 (Latest only) |
| 40 | +// <i>QP API backwards compatibility with the QP/C API version. |
| 41 | +// <i>Lower QP_API_VERSION values enable backwards compatibility |
| 42 | +// <i>with lower (older) QP API versions. |
| 43 | +// <i>For example, QP_API_VERSION==691 will enable the compatibility |
| 44 | +// <i>layer with QP version 6.9.1 and newer, but not older than 6.9.1. |
| 45 | +// <i>QP_API_VERSION==0 enables the maximum currently supported |
| 46 | +// <i>backwards compatibility. Conversely, QP_API_VERSION==9999 means |
| 47 | +// <i>that no backwards compatibility layer should be enabled. |
| 48 | +// <i>Default: 0 (All supported) |
| 49 | +#define QP_API_VERSION 0 |
| 50 | + |
| 51 | +//.......................................................................... |
| 52 | +// <h>QP Functional Safety (FuSa) Subsystem (Q_UNSAFE) |
| 53 | +// <i>The QP FuSa Subsystem consists of the following facilities: |
| 54 | +// <i>- Software assertions as a recommended technique |
| 55 | +// <i> (called Failure Assertion Programming (FAP) in IEC 61508) |
| 56 | +// <i>- Software Self-Monitoring (SSM), which encompasses such techniques: |
| 57 | +// <i> * Duplicate Inverse Storage for critical variables |
| 58 | +// <i> * Memory Markers for critical objects (e.g., events) |
| 59 | +// <i> * Hard-limits for all loops |
| 60 | +// <i> * Memory Isolation by means of Memory Protection Unit (MPU) |
| 61 | + |
| 62 | +// <c3>Disable QP FuSa in development |
| 63 | +// <i>Disable assertions and other self monitoring features |
| 64 | +// <i>in development build configurations (NDEBUG undefined). |
| 65 | +// <i>VIOLATES functional safety standards. NOT recommended !!! |
| 66 | +//#ifndef NDEBUG |
| 67 | +//#define Q_UNSAFE |
| 68 | +//#endif |
| 69 | +// </c> |
| 70 | + |
| 71 | +// <c3>Disable QP FuSa in production release |
| 72 | +// <i>Disable assertions and other self monitoring features |
| 73 | +// <i>in the release build configurations (NDEBUG defined). |
| 74 | +// <i>VIOLATES functional safety standards. NOT recommended !!! |
| 75 | +//#ifdef NDEBUG |
| 76 | +//#define Q_UNSAFE |
| 77 | +//#endif |
| 78 | +// </c> |
| 79 | + |
| 80 | +// </h> |
| 81 | + |
| 82 | +//.......................................................................... |
| 83 | +// <h>QEP Event Processor |
| 84 | +// <i>Events and state machines. |
| 85 | + |
| 86 | +// <o>Event signal size (Q_SIGNAL_SIZE) |
| 87 | +// <1U=>1 |
| 88 | +// <2U=>2 (default) |
| 89 | +// <4U=>4 |
| 90 | +// <i>Size of the QEvt signal for QEP/QF [bytes] |
| 91 | +// <i>Default: 2 |
| 92 | +#define Q_SIGNAL_SIZE 2U |
| 93 | + |
| 94 | +// </h> |
| 95 | + |
| 96 | +//.......................................................................... |
| 97 | +// <h>QF Framework |
| 98 | +// <i>Active Object framework |
| 99 | + |
| 100 | +// <o>Maximum # Active Objects (QF_MAX_ACTIVE) <1-64> |
| 101 | +// <i>Maximum # Active Objects in the system <1..64> |
| 102 | +// <i>Default: 32 |
| 103 | +#define QF_MAX_ACTIVE 32U |
| 104 | + |
| 105 | +// <o>Maximum # event pools (QF_MAX_EPOOL) |
| 106 | +// <0=>0 no event pools |
| 107 | +// <1=>1 <2=>2 <3=>3 (default) <4=>4 <5=>5 |
| 108 | +// <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11 |
| 109 | +// <12=>12 <13=>13 <14=>14 <15=>15 |
| 110 | +// <i>Maximum # Event Pools <1..15> |
| 111 | +// <i>Default: 3 |
| 112 | +#define QF_MAX_EPOOL 3U |
| 113 | + |
| 114 | +// <o>Maximum # clock tick rates (QF_MAX_TICK_RATE) |
| 115 | +// <0=>0 no time events |
| 116 | +// <1=>1 (default) <2=>2 <3=>3 <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 # clock tick rates for time events <1..15> |
| 120 | +// <i>Default: 1 |
| 121 | +#define QF_MAX_TICK_RATE 1U |
| 122 | + |
| 123 | +// <c1>Event parameter initialization (QEVT_PAR_INIT) |
| 124 | +// <i>Resource Acquisition Is Initialization (RAII) for dynamic events |
| 125 | +//#define QEVT_PAR_INIT |
| 126 | +// </c> |
| 127 | + |
| 128 | +// <c1>Active Object stop API (QACTIVE_CAN_STOP) |
| 129 | +// <i>Enable Active Object stop API (Not recommended) |
| 130 | +//#define QACTIVE_CAN_STOP |
| 131 | +// </c> |
| 132 | + |
| 133 | +// <o>Event size (QF_EVENT_SIZ_SIZE) |
| 134 | +// <1U=>1 |
| 135 | +// <2U=>2 (default) |
| 136 | +// <4U=>4 |
| 137 | +// <i>Size of the dynamic events for QF [bytes] |
| 138 | +// <i>Default: 2 (64K bytes maximum event size) |
| 139 | +#define QF_EVENT_SIZ_SIZE 2U |
| 140 | + |
| 141 | +// <o>Time event counter size (QF_TIMEEVT_CTR_SIZE) |
| 142 | +// <1U=>1 |
| 143 | +// <2U=>2 |
| 144 | +// <4U=>4 (default) |
| 145 | +// <i>Size of the QTimeEvt counter [bytes] |
| 146 | +// <i>Default: 4 (2^32 dynamic range) |
| 147 | +#define QF_TIMEEVT_CTR_SIZE 4U |
| 148 | + |
| 149 | +// <o>Event queue counter size (QF_EQUEUE_CTR_SIZE) |
| 150 | +// <1U=>1 (default) |
| 151 | +// <2U=>2 |
| 152 | +// <i>Size of event queue counter [bytes] |
| 153 | +// <i>Default: 1 (255 events maximum in a queue) |
| 154 | +#define QF_EQUEUE_CTR_SIZE 1U |
| 155 | + |
| 156 | +// <o>Memory pool counter size (QF_MPOOL_CTR_SIZE) |
| 157 | +// <1U=>1 |
| 158 | +// <2U=>2 (default) |
| 159 | +// <4U=>4 |
| 160 | +// <i>Size of memory pool counter [bytes] |
| 161 | +// <i>Default: 2 (64K blocks maximum in a pool) |
| 162 | +#define QF_MPOOL_CTR_SIZE 2U |
| 163 | + |
| 164 | +// <o>Memory block size (QF_MPOOL_SIZ_SIZE) |
| 165 | +// <1U=>1 |
| 166 | +// <2U=>2 (default) |
| 167 | +// <4U=>4 |
| 168 | +// <i>Size of memory pool block [bytes] |
| 169 | +// <i>Default: 2 (64K bytes maximum block size) |
| 170 | +#define QF_MPOOL_SIZ_SIZE 2U |
| 171 | + |
| 172 | +// </h> |
| 173 | + |
| 174 | +//.......................................................................... |
| 175 | +// <h>QS Software Tracing |
| 176 | +// <i>Target-resident component of QP/Spy software tracing system |
| 177 | +// <i>(tracing instrumentation and command-input). |
| 178 | + |
| 179 | +// <n>NOTE: Requires command-line macro: Q_SPY |
| 180 | +// <i>The QS software tracing instrumentation is activated only when |
| 181 | +// <i>the macro Q_SPY is defined on the command-line to the compiler. |
| 182 | +// <i>Typically, Q_SPY is defined only in the "spy" build configuration. |
| 183 | + |
| 184 | +// <o>QS timestamp size (QS_TIME_SIZE) |
| 185 | +// <1U=>1 |
| 186 | +// <2U=>2 |
| 187 | +// <4U=>4 (default) |
| 188 | +// <i>Size of the timestamp in QS [bytes] |
| 189 | +// <i>Default: 4 (2^32 dynamic range) |
| 190 | +#define QS_TIME_SIZE 4U |
| 191 | + |
| 192 | +// <o>QS buffer counter size (QS_CTR_SIZE) |
| 193 | +// <1U=>1 |
| 194 | +// <2U=>2 (default) |
| 195 | +// <4U=>4 |
| 196 | +// <i>Size of the counter in the internal QS buffer [bytes] |
| 197 | +// <i>Default: 2 (64K bytes in QS buffer) |
| 198 | +#define QS_CTR_SIZE 2U |
| 199 | + |
| 200 | +// </h> |
| 201 | + |
| 202 | +//------------- <<< end of configuration section >>> ----------------------- |
| 203 | + |
| 204 | +#endif // QP_CONFIG_H_ |
0 commit comments