Skip to content

Commit a271985

Browse files
switch default QP/C to v8.0.4, while maintaining compatibility with prior v7.3.x
1 parent a99c511 commit a271985

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if(NOT DEFINED CMS_QPC_TOP_DIR)
1515
set(CMS_QPC_TOP_DIR ${CMS_EXTERNALS_TOP_DIR}/qpc)
1616
FetchContent_Declare(qpc
1717
GIT_REPOSITORY https://github.com/QuantumLeaps/qpc.git
18-
GIT_TAG fcea9943bbeeca49c66ce124d4d71467f6e2661e #7.3.3
18+
GIT_TAG 6cbb42cf26f10e8ba1fff887f5fd66f674b2d92a #8.0.4
1919
SOURCE_DIR ${CMS_QPC_TOP_DIR}
2020
)
2121
message("Fetching QP/C git repository")

cpputest-for-qpc-lib/src/cms_cpputest_qf_ctrl.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,15 @@ void Setup(enum_t const maxPubSubSignalValue, uint32_t ticksPerSecond,
7171
l_subscriberStorage->resize(static_cast<size_t>(maxPubSubSignalValue));
7272
QSubscrList nullValue;
7373
QPSet_setEmpty(&nullValue.set);
74+
75+
#if QP_VERSION >= 800U
76+
//safety fields eliminated from GPL version of QP starting in v8.x.x
77+
#elif QP_VERSION > 700U
7478
QPSet_setEmpty(&nullValue.set_dis);
79+
#else
80+
#error "unsupported QP version"
81+
#endif
82+
7583
std::fill(l_subscriberStorage->begin(), l_subscriberStorage->end(),
7684
nullValue);
7785

cpputest-for-qpc-lib/src/cpputest_qf_port.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,26 @@ extern "C" void QF_stop(void)
5252
QF_onCleanup();
5353
}
5454

55+
#if QP_VERSION >= 800U
56+
extern "C" void QActive_start(QActive * const me,
57+
QPrioSpec const prioSpec,
58+
QEvt const * * const qSto,
59+
uint_fast16_t const qLen,
60+
void * const stkSto,
61+
uint_fast16_t const stkSize,
62+
void const * const par)
63+
64+
#elif QP_VERSION > 700U
5565
extern "C" void QActive_start_(QActive * const me,
5666
QPrioSpec const prioSpec,
5767
QEvt const * * const qSto,
5868
uint_fast16_t const qLen,
5969
void * const stkSto,
6070
uint_fast16_t const stkSize,
6171
void const * const par)
72+
#else
73+
#error "unsupported QP version"
74+
#endif
6275
{
6376
Q_UNUSED_PAR(stkSto);
6477
Q_UNUSED_PAR(stkSize);

0 commit comments

Comments
 (0)