Sample QP/C++ configuration file. More...
Go to the source code of this file.
Macros | |
| #define | QP_API_VERSION 0 |
| QP Framework API backwards-compatibility version. | |
| #define | Q_UNSAFE |
| Disable the QP Functional Safety (FuSa) Subsystem. | |
| #define | QF_MAX_ACTIVE 32U |
| Maximum # Active Objects in the system (1..64). | |
| #define | QF_MAX_EPOOL 3U |
| Maximum # event pools in the system (0..15). | |
| #define | QF_MAX_TICK_RATE 1U |
| Maximum # clock tick rates in the system (0..15). | |
| #define | QEVT_PAR_INIT |
| Event parameter initialization (RAII) for dynamic events. | |
| #define | QACTIVE_CAN_STOP |
| Enable the Active Object stop API. | |
| #define | Q_XTOR |
| Enable the virtual destructor in the QP::QAsm base class. | |
| #define | QF_EVENT_SIZ_SIZE 2U |
| Maximum size of dynamic events managed by QP. | |
| #define | QF_TIMEEVT_CTR_SIZE 4U |
| Time event counter size. | |
| #define | QF_EQUEUE_CTR_SIZE 1U |
| Event queue counter size. | |
| #define | QF_MPOOL_CTR_SIZE 2U |
| Memory pool counter size (QF_MPOOL_CTR_SIZE). | |
| #define | QF_MPOOL_SIZ_SIZE 2U |
| Memory block size (QF_MPOOL_SIZ_SIZE). | |
| #define | QS_TIME_SIZE 4U |
| QS timestamp size (QS_TIME_SIZE). | |
| #define | QS_CTR_SIZE 2U |
| QS buffer counter size. | |
| #define | QF_ON_CONTEXT_SW |
| Enable context switch callback WITHOUT QS. | |
| #define | QF_MEM_ISOLATE |
| Enable MPU memory isolation. | |
| #define | QK_USE_IRQ_NUM 31 |
| Use IRQ handler for QK return-from-preemption in ARM Cortex-M. | |
| #define | QK_USE_IRQ_HANDLER Reserved31_IRQHandler |
| Use IRQ handler for QK return-from-preemption in ARM Cortex-M. | |
| #define | QXK_USE_IRQ_NUM 31 |
| Use IRQ handler for QXK return-from-preemption in ARM Cortex-M. | |
| #define | QXK_USE_IRQ_HANDLER Reserved31_IRQHandler |
| Use IRQ handler for QK return-from-preemption in ARM Cortex-M. | |
Sample QP/C++ configuration file.
Details
This an example of a QP/C++ configuration file with the explanation of the available configuration macros. The qp_config.hpp file is required for every QP/C++ Application.
Configuration Wizard support
The qp_config.hpp header files provided in the various QP/C++ examples are formatted to support the "Configuration Wizard" editor available in some IDEs (e.g., KEIL uVision). The screen shot below shows how to edit qp_config.hpp in that mode.
Forward Traceability
Definition in file qp_config.hpp.
| #define QP_API_VERSION 0 |
QP Framework API backwards-compatibility version.
Details
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)
Definition at line 54 of file qp_config.hpp.
| #define Q_UNSAFE |
Disable the QP Functional Safety (FuSa) Subsystem.
Details
Defining the macro Q_UNSAFE (in the application-specific qp_config.h header file) disables most of the QP FuSa Subsystem, affecting the following facilities:
The intent of the Q_UNSAFE macro is to support verification (during development) that assertions (and more generally, Safety Functions) have no side effects on the primary functionalityare and are truly independent from the nominal flow of control.
However, quite specifically, the Q_UNSAFE macro should not be used to permanently disable the QP/C++ FuSa Subsystem in the final, production release of the QP/C++ Application, especially in the context of a safety-related system.
Definition at line 85 of file qp_config.hpp.
| #define QF_MAX_ACTIVE 32U |
Maximum # Active Objects in the system (1..64).
Details
Defines the maximum # Active Objects that QP Framework can manage at any time.
Definition at line 100 of file qp_config.hpp.
| #define QF_MAX_EPOOL 3U |
Maximum # event pools in the system (0..15).
Details
Definition at line 110 of file qp_config.hpp.
| #define QF_MAX_TICK_RATE 1U |
Maximum # clock tick rates in the system (0..15).
Details
Definition at line 120 of file qp_config.hpp.
| #define QEVT_PAR_INIT |
Event parameter initialization (RAII) for dynamic events.
Details
When defined, the macro activates initialization of event parameters while creating dynamic events. This could be use for Resource Acquisition Is Initialization (RAII) for dynamic events.
Default: undefined
Definition at line 138 of file qp_config.hpp.
| #define QACTIVE_CAN_STOP |
Enable the Active Object stop API.
Details
When defined, enable Active Object stop API (Not recommended)
Default: undefined
Definition at line 149 of file qp_config.hpp.
| #define Q_XTOR |
Enable the virtual destructor in the QP::QAsm base class.
Details
When defined, the macro Q_XTOR enables the virtual destructor in the QP::QAsm base class and all its subclasses: QP::QHsm, QP::QMsm, QP::QActive, QP::QMActive, etc.
Default: undefined
Definition at line 169 of file qp_config.hpp.
| #define QF_EVENT_SIZ_SIZE 2U |
Maximum size of dynamic events managed by QP.
Details
This macro controls the maximum size of dynamic events managed by QP Framework.
Default: 2 byte dynamic range (64K bytes maximum event size)
Definition at line 181 of file qp_config.hpp.
| #define QF_TIMEEVT_CTR_SIZE 4U |
Time event counter size.
Details
This macro controls the dynamic range of timeouts allowed in QP::QTimeEvt. The timeouts are counted in tick of the associated clock tick rate.
Default: 4 bytes (2^32 dynamic range)
Definition at line 196 of file qp_config.hpp.
| #define QF_EQUEUE_CTR_SIZE 1U |
Event queue counter size.
The size [bytes] of the ring-buffer counters used in the native QF event queue implementation.
Details
This macro controls the maximum number of events that QP::QEQueue can hold
Default: 1 (maximum 255 events in a queue)
Details
This macro can be defined in the QF port file (qf_port.h) to configure the QP::QEQueueCtr type. Valid values: 1U or 2U; default 1U.
Definition at line 209 of file qp_config.hpp.
| #define QF_MPOOL_CTR_SIZE 2U |
Memory pool counter size (QF_MPOOL_CTR_SIZE).
Details
This macro controls the maximum number of memory blocks that QP::QMPool can hold
Default: 2 bytes (up to 65535 memory blocks maximum in a pool)
Definition at line 223 of file qp_config.hpp.
| #define QF_MPOOL_SIZ_SIZE 2U |
Memory block size (QF_MPOOL_SIZ_SIZE).
Details
This macro controls the maximum size of memory blocks that QP::QMPool can hold.
Default: 2 byte dynamic range (64K bytes maximum block size)
Definition at line 236 of file qp_config.hpp.
| #define QS_TIME_SIZE 4U |
QS timestamp size (QS_TIME_SIZE).
Details
This macro controls the dynamic range of timestamp produced by QS software tracing.
Default: 4 bytes (2^32 dynamic range)
Definition at line 258 of file qp_config.hpp.
| #define QS_CTR_SIZE 2U |
QS buffer counter size.
Details
This macro controls the maximum number of bytes held in the QS TX/RX buffers.
Default: 2 bytes (maximum 65535 bytes in QS buffers)
Definition at line 272 of file qp_config.hpp.
| #define QF_ON_CONTEXT_SW |
Enable context switch callback WITHOUT QS.
Details
When defined, enables context switch callback QF_onContextSw() in the built-in kernels (QV, QK, QXK).
Default: undefined
Definition at line 284 of file qp_config.hpp.
| #define QF_MEM_ISOLATE |
Enable MPU memory isolation.
Details
When defined, enables memory isolation (requires MPU)
Definition at line 295 of file qp_config.hpp.
| #define QK_USE_IRQ_NUM 31 |
Use IRQ handler for QK return-from-preemption in ARM Cortex-M.
Details
If QK_USE_IRQ_NUM macro is defined, it specifies the IRQ number in ARM Cortex-M to be used as the exception for return-from-preemption in the QK kernel.
This macro should be defined only if the NMI handler is utilized in the project. The specified IRQ number must be otherwise unused.
Default: undefined
Definition at line 314 of file qp_config.hpp.
| #define QK_USE_IRQ_HANDLER Reserved31_IRQHandler |
Use IRQ handler for QK return-from-preemption in ARM Cortex-M.
Details
If QK_USE_IRQ_HANDLER macro is defined, it specifies the IRQ handler name in ARM Cortex-M to be used as the exception for return-from-preemption in the QK kernel.
This macro should be defined only if the NMI handler is utilized in the project. The specified IRQ handler must be otherwise unused.
Definition at line 330 of file qp_config.hpp.
| #define QXK_USE_IRQ_NUM 31 |
Use IRQ handler for QXK return-from-preemption in ARM Cortex-M.
Details
If QXK_USE_IRQ_NUM macro is defined, it specifies the IRQ number in ARM Cortex-M to be used as the exception for return-from-preemption in the QXK kernel.
This macro should be defined only if the NMI handler is utilized in the project. The specified IRQ number must be otherwise unused.
Default: undefined
Definition at line 348 of file qp_config.hpp.
| #define QXK_USE_IRQ_HANDLER Reserved31_IRQHandler |
Use IRQ handler for QK return-from-preemption in ARM Cortex-M.
Details
If QXK_USE_IRQ_HANDLER macro is defined, it specifies the IRQ handler name in ARM Cortex-M to be used as the exception for return-from-preemption in the QK kernel.
This macro should be defined only if the NMI handler is utilized in the project. The specified IRQ handler must be otherwise unused.
Default: undefined
Definition at line 366 of file qp_config.hpp.