//============================================================================ // QP configuration file (generic) // // Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. // // Q u a n t u m L e a P s // ------------------------ // Modern Embedded Software // // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial // // The QP/C software is dual-licensed under the terms of the open-source GNU // General Public License (GPL) or under the terms of one of the closed- // source Quantum Leaps commercial licenses. // // Redistributions in source code must retain this top-level comment block. // Plagiarizing this software to sidestep the license obligations is illegal. // // NOTE: // The GPL (see ) does NOT permit the // incorporation of the QP/C software into proprietary programs. Please // contact Quantum Leaps for commercial licensing options, which expressly // supersede the GPL and are designed explicitly for licensees interested // in using QP/C in closed-source proprietary applications. // // Quantum Leaps contact information: // // //============================================================================ #ifndef QP_CONFIG_H_ #define QP_CONFIG_H_ //-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- // QP API compatibility version (QP_API_VERSION) // <0=> 0 (Maximum compatibility) // <691=>691 (QP 6.9.1 or newer) // <734=>7.3.4 (QP 7.3.4 or newer) // <9999=>9999 (Latest only) // QP API backwards compatibility with the QP/C API version. // Lower QP_API_VERSION values enable backwards compatibility // with lower (older) QP API versions. // For example, QP_API_VERSION==691 will enable the compatibility // layer with QP version 6.9.1 and newer, but not older than 6.9.1. // QP_API_VERSION==0 enables the maximum currently supported // backwards compatibility. Conversely, QP_API_VERSION==9999 means // that no backwards compatibility layer should be enabled. // Default: 0 (All supported) #define QP_API_VERSION 0 //.......................................................................... // QP Functional Safety (FuSa) Subsystem (Q_UNSAFE) // The QP FuSa Subsystem consists of the following facilities: // - Software assertions as a recommended technique // (called Failure Assertion Programming (FAP) in IEC 61508) // - Software Self-Monitoring (SSM), which encompasses such techniques: // * Duplicate Inverse Storage for critical variables // * Memory Markers for critical objects (e.g., events) // * Hard-limits for all loops // * Memory Isolation by means of Memory Protection Unit (MPU) // Disable QP FuSa in development // Disable assertions and other self monitoring features // in development build configurations (NDEBUG undefined). // VIOLATES functional safety standards. NOT recommended !!! //#ifndef NDEBUG //#define Q_UNSAFE //#endif // // Disable QP FuSa in production release // Disable assertions and other self monitoring features // in the release build configurations (NDEBUG defined). // VIOLATES functional safety standards. NOT recommended !!! //#ifdef NDEBUG //#define Q_UNSAFE //#endif // // //.......................................................................... // QEP Event Processor // Events and state machines. // Event signal size (Q_SIGNAL_SIZE) // <1U=>1 // <2U=>2 (default) // <4U=>4 // Size of the QEvt signal for QEP/QF [bytes] // Default: 2 #define Q_SIGNAL_SIZE 2U // //.......................................................................... // QF Framework // Active Object framework // Maximum # Active Objects (QF_MAX_ACTIVE) <1-64> // Maximum # Active Objects in the system <1..64> // Default: 32 #define QF_MAX_ACTIVE 32U // Maximum # event pools (QF_MAX_EPOOL) // <0=>0 no event pools // <1=>1 <2=>2 <3=>3 (default) <4=>4 <5=>5 // <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11 // <12=>12 <13=>13 <14=>14 <15=>15 // Maximum # Event Pools <1..15> // Default: 3 #define QF_MAX_EPOOL 3U // Maximum # clock tick rates (QF_MAX_TICK_RATE) // <0=>0 no time events // <1=>1 (default) <2=>2 <3=>3 <4=>4 <5=>5 // <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11 // <12=>12 <13=>13 <14=>14 <15=>15 // Maximum # clock tick rates for time events <1..15> // Default: 1 #define QF_MAX_TICK_RATE 1U // Event parameter initialization (QEVT_PAR_INIT) // Resource Acquisition Is Initialization (RAII) for dynamic events //#define QEVT_PAR_INIT // // Active Object stop API (QACTIVE_CAN_STOP) // Enable Active Object stop API (Not recommended) //#define QACTIVE_CAN_STOP // // Event size (QF_EVENT_SIZ_SIZE) // <1U=>1 // <2U=>2 (default) // <4U=>4 // Size of the dynamic events for QF [bytes] // Default: 2 (64K bytes maximum event size) #define QF_EVENT_SIZ_SIZE 2U // Time event counter size (QF_TIMEEVT_CTR_SIZE) // <1U=>1 // <2U=>2 // <4U=>4 (default) // Size of the QTimeEvt counter [bytes] // Default: 4 (2^32 dynamic range) #define QF_TIMEEVT_CTR_SIZE 4U // Event queue counter size (QF_EQUEUE_CTR_SIZE) // <1U=>1 (default) // <2U=>2 // Size of event queue counter [bytes] // Default: 1 (255 events maximum in a queue) #define QF_EQUEUE_CTR_SIZE 1U // Memory pool counter size (QF_MPOOL_CTR_SIZE) // <1U=>1 // <2U=>2 (default) // <4U=>4 // Size of memory pool counter [bytes] // Default: 2 (64K blocks maximum in a pool) #define QF_MPOOL_CTR_SIZE 2U // Memory block size (QF_MPOOL_SIZ_SIZE) // <1U=>1 // <2U=>2 (default) // <4U=>4 // Size of memory pool block [bytes] // Default: 2 (64K bytes maximum block size) #define QF_MPOOL_SIZ_SIZE 2U // //.......................................................................... // QS Software Tracing // Target-resident component of QP/Spy software tracing system // (tracing instrumentation and command-input). // NOTE: Requires command-line macro: Q_SPY // The QS software tracing instrumentation is activated only when // the macro Q_SPY is defined on the command-line to the compiler. // Typically, Q_SPY is defined only in the "spy" build configuration. // QS timestamp size (QS_TIME_SIZE) // <1U=>1 // <2U=>2 // <4U=>4 (default) // Size of the timestamp in QS [bytes] // Default: 4 (2^32 dynamic range) #define QS_TIME_SIZE 4U // QS buffer counter size (QS_CTR_SIZE) // <1U=>1 // <2U=>2 (default) // <4U=>4 // Size of the counter in the internal QS buffer [bytes] // Default: 2 (64K bytes in QS buffer) #define QS_CTR_SIZE 2U // //------------- <<< end of configuration section >>> ----------------------- #endif // QP_CONFIG_H_