Reference Manual For QP/C 8.1.5
Loading...
Searching...
No Matches
cmd_options.h
Go to the documentation of this file.
1/*! @file
2@code_uid{cmd_options.h, Preprocessor macros that are usually defined on the command-line to the compiler}
3@endcode_uid
4*/
5
6//------------------------------------------------------------------------------
7/*!
8@code_uid{#Q_UNSAFE, Disable the QP Functional Safety (FuSa) Subsystem}
9@code_litem{Details}
10Defining the macro #Q_UNSAFE (in the application-specific qp_config.h header file)
11disables most of the QP FuSa Subsystem, affecting the following facilities:
12- Software assertions as a recommended technique
13 (called @ref def-qp-fap "failure assertion programming (FAP)" in IEC 61508-7 C.3.3)
14- Software Self-Monitoring Safety Functions, which encompasses such techniques:
15 + @ref def-qp_dim-dis "Duplicate Inverse Storage" for critical variables
16 + @ref def-qp_cfm-lbound "Fixed Upper Loop Bound" for all loops
17 + @ref def-qp_cfm-icf "Invalid Control Flow" for all unreachable code paths
18
19The intent of the #Q_UNSAFE macro is to support verification (during development)
20that assertions (and more generally, Safety Functions) have _no side effects_
21on the primary functionality — and are truly independent from the nominal
22flow of control.
23
24However, quite specifically, the #Q_UNSAFE macro should _not_ be used to permanently
25disable the @QPX FuSa Subsystem in the final, production release of the @QPX
26Application, especially in the context of a safety-related system.
27
28@attention
29Disabling QP FuSa Subsystem (by defining the macro #Q_UNSAFE) in the final production
30release, _contradicts_ the most fundamental principles of functional safety and
31is <b>not allowed</b> in safety-related applications.
32
33@endcode_uid
34*/
35#define Q_UNSAFE
36
37//----------------------------------------------------------------------------
38/*!
39@code_uid{Q_SPY, The preprocessor switch to activate the QS software tracing instrumentation in @QPX Framework and @QPX Application code}
40@code_litem{Details}
41When defined, #Q_SPY activates the QS software tracing instrumentation. When #Q_SPY is not defined, the QS instrumentation in the code does not generate any code.
42@note
43The #Q_SPY is typically defined only in the Spy build configuration and is not defined in other build configurations.
44@endcode_uid
45*/
46#define Q_SPY
47
48//----------------------------------------------------------------------------
49/*!
50@code_uid{Q_UTEST, The preprocessor switch to activate the QUTest testing instrumentation in @QPX Framework and @QPX Application code}
51@code_litem{Details}
52When defined, #Q_UTEST activates the QUTest testing instrumentation, which also requires QS software tracing (see #Q_SPY).
53
54Also, the #Q_UTEST macro can have a value that decides whether the @QPX Framework "stub" is included or not. The following values are supported:
55@code{c}
56#define Q_UTEST // the @QPX Framework testing "stub" is included
57
58#define Q_UTEST 0 // the @QPX Framework testing "stub" is NOT included
59@endcode
60@note
61The #Q_UTEST is typically defined only in the test fixtures.
62@endcode_uid
63*/
64#define Q_UTEST