diff --git a/LICENSES/QM-EVAL-QPCPP.qlc b/LICENSES/QM-EVAL-QPCPP.qlc deleted file mode 100644 index 4afeee54..00000000 --- a/LICENSES/QM-EVAL-QPCPP.qlc +++ /dev/null @@ -1,25 +0,0 @@ -Users of QP/C++ Real-Time Embedded Framework (RTEF) -qpcpp -2023-12-31 - -SPDX-License-Identifier: GPL-3.0-or-later - -This generated code is free software: you can redistribute it under -the terms of the GNU General Public License as published by the Free -Software Foundation. - -This code is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -more details. - -NOTE: -Alternatively, this generated code may be distributed under the terms -of Quantum Leaps commercial licenses, which expressly supersede the GNU -General Public License and are specifically designed for licensees -interested in retaining the proprietary status of their code. - -Contact information: - - -#57F9DACB138813B26105022C8852763EB8EE4CDB \ No newline at end of file diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile index 041e6914..c65a300c 100644 --- a/doxygen/Doxyfile +++ b/doxygen/Doxyfile @@ -7,7 +7,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = QP/C++ -PROJECT_NUMBER = 7.1.2 +PROJECT_NUMBER = 7.1.3 PROJECT_BRIEF = "Real-Time Embedded Framework" PROJECT_LOGO = ../../ql-doxygen/images/logo_ql.png OUTPUT_DIRECTORY = @@ -124,6 +124,13 @@ WARN_LOGFILE = #--------------------------------------------------------------------------- INPUT = main.dox \ gs.dox \ + ../../cert-pack/cert-pack.dox \ + ../../cert-pack/srs.dox \ + ../../cert-pack/sas.dox \ + ../../cert-pack/sds.dox \ + ../../cert-pack/sds_sm-cpp.dox \ + ../../cert-pack/autosar.dox \ + ../../cert-pack/metrics.dox \ exa.dox \ exa_native.dox \ exa_rtos.dox \ @@ -138,13 +145,6 @@ INPUT = main.dox \ api.dox \ history.dox \ ../../ql-doxygen/help.dox \ - ../../cert-pack/srs.dox \ - ../../cert-pack/sas.dox \ - ../../cert-pack/sds.dox \ - ../../cert-pack/sds_sm-cpp.dox \ - ../../cert-pack/autosar.dox \ - ../../cert-pack/tr.dox \ - metrics.dox \ dir.dox \ config.hpp \ ../include \ @@ -168,7 +168,8 @@ EXCLUDE = ../include/qs_dummy.hpp \ EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXCLUDE_SYMBOLS = QP_IMPL -EXAMPLE_PATH = snippets \ +EXAMPLE_PATH = gen \ + snippets \ ../include \ ../src \ ../ports \ diff --git a/doxygen/Doxyfile-CERT b/doxygen/Doxyfile-CERT deleted file mode 100644 index 35353902..00000000 --- a/doxygen/Doxyfile-CERT +++ /dev/null @@ -1,8 +0,0 @@ -# Doxyfile 1.9.5 - -@INCLUDE = Doxyfile - -ENABLED_SECTIONS += CERT LATEX -GENERATE_LATEX = YES -HTML_OUTPUT = ../cert-pack -LATEX_OUTPUT = ../cert-latex diff --git a/doxygen/DoxygenLayout.xml b/doxygen/DoxygenLayout.xml deleted file mode 100644 index 8506ea14..00000000 --- a/doxygen/DoxygenLayout.xml +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doxygen/gen/metrics.txt b/doxygen/gen/metrics.txt new file mode 100644 index 00000000..2e70d548 --- /dev/null +++ b/doxygen/gen/metrics.txt @@ -0,0 +1,232 @@ +@code{.c} +================================================ + NLOC CCN token PARAM length location +------------------------------------------------ + 3 1 13 1 4 QP::QEvt::QEvt@183-186@..\include\qep.hpp + 7 1 27 2 7 QP::QEvt::QEvt@192-198@..\include\qep.hpp + 2 1 6 0 3 QP::QEvt::~QEvt@204-206@..\include\qep.hpp + 2 1 6 0 3 QP::QHsm::~QHsm@375-377@..\include\qep.hpp + 3 1 17 1 3 QP::QHsm::init@406-408@..\include\qep.hpp + 3 1 12 0 3 QP::QHsm::state@455-457@..\include\qep.hpp + 3 1 11 0 3 QP::QHsm::getStateHandler@462-464@..\include\qep.hpp + 4 1 18 1 4 QP::QHsm::tran@494-497@..\include\qep.hpp + 4 1 18 1 4 QP::QHsm::tran_hist@500-503@..\include\qep.hpp + 4 1 18 1 4 QP::QHsm::super@506-509@..\include\qep.hpp + 4 1 30 1 4 QP::QHsm::qm_tran@513-516@..\include\qep.hpp + 4 1 30 1 4 QP::QHsm::qm_tran_init@520-523@..\include\qep.hpp + 8 1 42 2 8 QP::QHsm::qm_tran_hist@527-534@..\include\qep.hpp + 4 1 30 1 4 QP::QHsm::qm_tran_ep@538-541@..\include\qep.hpp + 8 1 40 2 8 QP::QHsm::qm_tran_xp@545-552@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_entry@557-560@..\include\qep.hpp + 4 1 22 1 4 QP::QHsm::qm_entry@566-569@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_exit@575-578@..\include\qep.hpp + 4 1 22 1 4 QP::QHsm::qm_exit@584-587@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_sm_exit@591-594@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_super_sub@598-601@..\include\qep.hpp + 6 1 26 1 6 QP::QMsm::QMsm@687-692@..\include\qep.hpp + 3 1 20 1 3 QP::QMsm::init@705-707@..\include\qep.hpp + 3 1 12 0 3 QP::QMsm::stateObj@750-752@..\include\qep.hpp + 3 1 14 0 3 QP::QMsm::getStateHandler@782-784@..\include\qep.hpp + 3 1 10 0 3 QP::QEQueue::getNFree@289-291@..\include\qequeue.hpp + 3 1 10 0 3 QP::QEQueue::getNMin@304-306@..\include\qequeue.hpp + 3 1 12 0 3 QP::QEQueue::isEmpty@318-320@..\include\qequeue.hpp + 5 2 24 0 8 QP::QPSet::setEmpty@234-241@..\include\qf.hpp + 4 3 35 0 7 QP::QPSet::isEmpty@244-250@..\include\qf.hpp + 4 3 35 0 7 QP::QPSet::notEmpty@253-259@..\include\qf.hpp + 6 3 97 1 9 QP::QPSet::hasElement@262-270@..\include\qf.hpp + 11 3 101 1 14 QP::QPSet::insert@273-286@..\include\qf.hpp + 12 3 117 1 15 QP::QPSet::remove@289-303@..\include\qf.hpp + 6 3 45 0 9 QP::QPSet::findMax@306-314@..\include\qf.hpp + 9 1 49 5 9 QP::QActive::start@478-486@..\include\qf.hpp + 3 1 10 0 3 QP::QActive::getPrio@711-713@..\include\qf.hpp + 4 1 38 1 4 QP::QActive::setPrio@718-721@..\include\qf.hpp + 3 1 9 0 3 QP::QActive::getOsObject@734-736@..\include\qf.hpp + 3 1 9 0 3 QP::QActive::getThread@743-745@..\include\qf.hpp + 5 1 20 1 5 QP::QMActive::QMActive@897-901@..\include\qf.hpp + 3 1 12 0 3 QP::QMActive::stateObj@922-924@..\include\qf.hpp + 3 1 10 0 3 QP::QTimeEvt::getAct@1118-1120@..\include\qf.hpp + 3 1 10 0 3 QP::QTimeEvt::getCtr@1123-1125@..\include\qf.hpp + 3 1 10 0 3 QP::QTimeEvt::getInterval@1128-1130@..\include\qf.hpp + 3 1 16 0 3 QP::QTimeEvt::toActive@1187-1189@..\include\qf.hpp + 3 1 16 0 3 QP::QTimeEvt::toTimeEvt@1192-1194@..\include\qf.hpp + 6 1 23 2 6 QP::QF::psInit@1348-1353@..\include\qf.hpp + 7 1 34 3 7 QP::QF::publish_@1360-1366@..\include\qf.hpp + 6 1 26 2 6 QP::QF::tick_@1373-1378@..\include\qf.hpp + 3 1 29 1 3 QP::QEvt_refCtr_inc_@112-114@..\include\qf_pkg.hpp + 3 1 29 1 3 QP::QEvt_refCtr_dec_@117-119@..\include\qf_pkg.hpp + 3 1 10 0 3 QP::QMPool::getNMin@263-265@..\include\qmpool.hpp + 3 1 10 0 3 QP::QMPool::getNFree@275-277@..\include\qmpool.hpp + 3 1 18 0 3 QP::QSpyId::getPrio@315-317@..\include\qs.hpp + 7 1 28 1 7 QP::QS::force_cast@399-405@..\include\qs.hpp + 14 3 70 1 14 QP::QS::rxPut@805-818@..\include\qs.hpp + 9 1 49 5 9 QP::QActiveDummy::start@1517-1525@..\include\qs.hpp + 3 1 18 0 3 QP::QSpyId::getPrio@134-136@..\include\qs_dummy.hpp + 3 1 11 0 3 QP::QXThread::getTimeEvt@208-210@..\include\qxk.hpp + 9 1 49 5 9 QP::QXThread::start@310-318@..\include\qxk.hpp + 2 1 39 2 3 QP::QEvt@86-88@..\src\qf\qep_hsm.cpp + 7 1 41 3 7 hsm_reservedEvt_@103-109@..\src\qf\qep_hsm.cpp + 17 3 102 3 20 hsm_state_entry_@117-136@..\src\qf\qep_hsm.cpp + 23 3 114 3 26 hsm_state_exit_@148-173@..\src\qf\qep_hsm.cpp + 4 1 27 1 4 QP::QHsm::QHsm@183-186@..\src\qf\qep_hsm.cpp + 50 7 325 2 73 QP::QHsm::init@189-261@..\src\qf\qep_hsm.cpp + 103 15 609 2 158 QP::QHsm::dispatch@264-421@..\src\qf\qep_hsm.cpp + 8 1 31 2 8 QP::QHsm::top@424-431@..\src\qf\qep_hsm.cpp + 16 3 87 1 22 QP::QHsm::isIn@434-455@..\src\qf\qep_hsm.cpp + 20 4 107 1 29 QP::QHsm::childState@458-486@..\src\qf\qep_hsm.cpp + 90 15 487 2 132 QP::QHsm::hsm_tran@489-620@..\src\qf\qep_hsm.cpp + 25 3 165 2 38 QP::QMsm::init@79-116@..\src\qf\qep_msm.cpp + 116 21 658 2 168 QP::QMsm::dispatch@119-286@..\src\qf\qep_msm.cpp + 13 3 59 1 14 QP::QMsm::isInState@289-302@..\src\qf\qep_msm.cpp + 19 4 87 1 26 QP::QMsm::childStateObj@305-330@..\src\qf\qep_msm.cpp + 51 9 294 2 62 QP::QMsm::execTatbl_@333-394@..\src\qf\qep_msm.cpp + 22 4 107 3 29 QP::QMsm::exitToTranSource_@397-425@..\src\qf\qep_msm.cpp + 44 6 227 2 55 QP::QMsm::enterHistory_@428-482@..\src\qf\qep_msm.cpp + 82 14 410 3 120 QP::QActive::post_@77-196@..\src\qf\qf_actq.cpp + 42 7 237 1 63 QP::QActive::postLIFO@204-266@..\src\qf\qf_actq.cpp + 34 3 205 0 45 QP::QActive::get_@274-318@..\src\qf\qf_actq.cpp + 10 2 72 1 11 QP::QF::getQueueMin@328-338@..\src\qf\qf_actq.cpp + 5 1 30 1 6 QP::QTicker::QTicker@351-356@..\src\qf\qf_actq.cpp + 8 1 34 2 8 QP::QTicker::init@359-366@..\src\qf\qf_actq.cpp + 3 1 21 1 3 QP::QTicker::init@369-371@..\src\qf\qf_actq.cpp + 16 2 81 2 18 QP::QTicker::dispatch@374-391@..\src\qf\qf_actq.cpp + 30 3 166 3 42 QP::QTicker::post_@394-435@..\src\qf\qf_actq.cpp + 15 1 79 2 17 QP::QActive::defer@70-86@..\src\qf\qf_defer.cpp + 32 3 157 1 50 QP::QActive::recall@94-143@..\src\qf\qf_defer.cpp + 11 3 62 1 13 QP::QActive::flushDeferred@151-163@..\src\qf\qf_defer.cpp + 18 3 151 3 26 QP::QF::poolInit@97-122@..\src\qf\qf_dyn.cpp + 41 7 282 3 57 QP::QF::newX_@125-181@..\src\qf\qf_dyn.cpp + 35 5 257 1 57 QP::QF::gc@184-240@..\src\qf\qf_dyn.cpp + 3 1 21 0 3 QP::QF::poolGetMaxBlockSize@243-245@..\src\qf\qf_dyn.cpp + 19 2 104 2 26 QP::QF::newRef_@248-273@..\src\qf\qf_dyn.cpp + 11 2 68 1 14 QP::QF::deleteRef_@276-289@..\src\qf\qf_dyn.cpp + 10 3 77 1 12 QP::QF::getPoolMin@292-303@..\src\qf\qf_dyn.cpp + 9 1 42 0 9 QP::QMPool::QMPool@71-79@..\src\qf\qf_mem.cpp + 33 5 234 3 55 QP::QMPool::init@82-136@..\src\qf\qf_mem.cpp + 43 4 208 2 71 QP::QMPool::get@139-209@..\src\qf\qf_mem.cpp + 20 2 107 2 26 QP::QMPool::put@212-237@..\src\qf\qf_mem.cpp + 3 1 12 0 3 QP::QMPool::getBlockSize@240-242@..\src\qf\qf_mem.cpp + 9 1 44 2 9 QP::QActive::psInit@83-91@..\src\qf\qf_ps.cpp + 42 6 238 3 71 QP::QActive::publish_@99-169@..\src\qf\qf_ps.cpp + 16 5 108 1 20 QP::QActive::subscribe@177-196@..\src\qf\qf_ps.cpp + 16 5 108 1 23 QP::QActive::unsubscribe@204-226@..\src\qf\qf_ps.cpp + 19 5 127 0 25 QP::QActive::unsubscribeAll@234-258@..\src\qf\qf_ps.cpp + 10 2 59 2 10 QP::QF::bzero@107-116@..\src\qf\qf_qact.cpp + 9 4 65 1 17 QP::QActive::QActive@127-143@..\src\qf\qf_qact.cpp + 30 10 198 0 46 QP::QActive::register_@151-196@..\src\qf\qf_qact.cpp + 10 3 72 0 11 QP::QActive::unregister_@204-214@..\src\qf\qf_qact.cpp + 24 6 158 1 29 QP::QPSet::QF_LOG2@225-253@..\src\qf\qf_qact.cpp + 9 1 43 0 9 QP::QEQueue::QEQueue@71-79@..\src\qf\qf_qeq.cpp + 14 2 74 2 14 QP::QEQueue::init@82-95@..\src\qf\qf_qeq.cpp + 57 8 281 3 76 QP::QEQueue::post@98-173@..\src\qf\qf_qeq.cpp + 36 5 174 2 46 QP::QEQueue::postLIFO@176-221@..\src\qf\qf_qeq.cpp + 36 4 190 1 46 QP::QEQueue::get@224-269@..\src\qf\qf_qeq.cpp + 7 1 41 2 7 QP::QMActive::init@78-84@..\src\qf\qf_qmact.cpp + 4 1 33 1 4 QP::QMActive::init@87-90@..\src\qf\qf_qmact.cpp + 6 1 32 2 6 QP::QMActive::dispatch@93-98@..\src\qf\qf_qmact.cpp + 3 1 27 1 3 QP::QMActive::isInState@101-103@..\src\qf\qf_qmact.cpp + 4 1 27 1 4 QP::QMActive::childStateObj@106-109@..\src\qf\qf_qmact.cpp + 3 1 20 0 3 QP::QMActive::getStateHandler@113-115@..\src\qf\qf_qmact.cpp + 18 2 101 3 34 QP::QTimeEvt::QTimeEvt@72-105@..\src\qf\qf_time.cpp + 34 8 217 2 58 QP::QTimeEvt::armX@108-165@..\src\qf\qf_time.cpp + 32 3 169 0 41 QP::QTimeEvt::disarm@168-208@..\src\qf\qf_time.cpp + 33 8 217 1 58 QP::QTimeEvt::rearm@211-268@..\src\qf\qf_time.cpp + 5 1 37 0 6 QP::QTimeEvt::wasDisarmed@271-276@..\src\qf\qf_time.cpp + 72 7 396 2 112 QP::QTimeEvt::tick_@279-390@..\src\qf\qf_time.cpp + 14 3 70 1 16 QP::QTimeEvt::noActive@393-408@..\src\qf\qf_time.cpp + 13 1 50 0 27 QP::QTimeEvt::QTimeEvt@411-437@..\src\qf\qf_time.cpp + 22 2 136 1 32 QP::QK::schedLock@76-107@..\src\qk\qk.cpp + 20 4 129 1 32 QP::QK::schedUnlock@110-141@..\src\qk\qk.cpp + 14 3 144 0 25 QP::QF::init@151-175@..\src\qk\qk.cpp + 3 1 9 0 4 QP::QF::stop@178-181@..\src\qk\qk.cpp + 15 4 62 0 25 QP::QF::run@184-208@..\src\qk\qk.cpp + 25 3 146 6 34 QP::QActive::start@219-252@..\src\qk\qk.cpp + 19 4 93 0 24 QK_sched_@265-288@..\src\qk\qk.cpp + 65 17 428 0 112 QK_activate_@291-402@..\src\qk\qk.cpp + 7 3 66 0 13 QP::QF::init@83-95@..\src\qv\qv.cpp + 3 1 9 0 4 QP::QF::stop@98-101@..\src\qv\qv.cpp + 38 10 197 0 75 QP::QF::run@104-178@..\src\qv\qv.cpp + 18 1 114 6 25 QP::QActive::start@189-213@..\src\qv\qv.cpp + 24 3 152 1 35 QP::QXK::schedLock@77-111@..\src\qxk\qxk.cpp + 20 4 129 1 32 QP::QXK::schedUnlock@114-145@..\src\qxk\qxk.cpp + 14 3 144 0 25 QP::QF::init@155-179@..\src\qxk\qxk.cpp + 3 1 9 0 4 QP::QF::stop@182-185@..\src\qxk\qxk.cpp + 17 4 84 0 29 QP::QF::run@188-216@..\src\qxk\qxk.cpp + 29 5 159 6 40 QP::QActive::start@227-266@..\src\qxk\qxk.cpp + 43 8 230 0 54 QXK_sched_@279-332@..\src\qxk\qxk.cpp + 59 16 406 0 98 QXK_activate_@335-432@..\src\qxk\qxk.cpp + 12 2 69 0 18 QXK_current@435-452@..\src\qxk\qxk.cpp + 23 7 130 1 34 QXK_contextSw@456-489@..\src\qxk\qxk.cpp + 14 2 110 0 23 QXK_threadExit_@493-515@..\src\qxk\qxk.cpp + 3 1 15 0 3 QP::QXMutex::QXMutex@76-78@..\src\qxk\qxk_mutex.cpp + 8 2 54 1 11 QP::QXMutex::init@81-91@..\src\qxk\qxk_mutex.cpp + 61 9 422 0 95 QP::QXMutex::tryLock@94-188@..\src\qxk\qxk_mutex.cpp + 81 11 599 1 133 QP::QXMutex::lock@191-323@..\src\qxk\qxk_mutex.cpp + 77 12 578 0 129 QP::QXMutex::unlock@326-454@..\src\qxk\qxk_mutex.cpp + 9 1 58 2 11 QP::QXSemaphore::init@76-86@..\src\qxk\qxk_sema.cpp + 54 7 346 1 79 QP::QXSemaphore::wait@89-167@..\src\qxk\qxk_sema.cpp + 27 3 131 0 38 QP::QXSemaphore::tryWait@170-207@..\src\qxk\qxk_sema.cpp + 41 7 251 0 64 QP::QXSemaphore::signal@210-273@..\src\qxk\qxk_sema.cpp + 9 1 56 2 9 QP::QXThread::QXThread@77-85@..\src\qxk\qxk_xthr.cpp + 21 4 178 1 36 QP::QXThread::delay@88-123@..\src\qxk\qxk_xthr.cpp + 14 2 57 0 16 QP::QXThread::delayCancel@126-141@..\src\qxk\qxk_xthr.cpp + 58 7 429 1 86 QP::QXThread::queueGet@144-229@..\src\qxk\qxk_xthr.cpp + 8 1 33 2 8 QP::QXThread::init@232-239@..\src\qxk\qxk_xthr.cpp + 4 1 22 1 4 QP::QXThread::init@242-245@..\src\qxk\qxk_xthr.cpp + 8 1 33 2 8 QP::QXThread::dispatch@248-255@..\src\qxk\qxk_xthr.cpp + 30 7 191 6 49 QP::QXThread::start@258-306@..\src\qxk\qxk_xthr.cpp + 96 15 480 3 133 QP::QXThread::post_@309-441@..\src\qxk\qxk_xthr.cpp + 4 1 23 1 4 QP::QXThread::postLIFO@444-447@..\src\qxk\qxk_xthr.cpp + 5 1 49 0 6 QP::QXThread::block_@450-455@..\src\qxk\qxk_xthr.cpp + 8 3 58 0 9 QP::QXThread::unblock_@458-466@..\src\qxk\qxk_xthr.cpp + 22 3 153 2 40 QP::QXThread::teArm_@469-508@..\src\qxk\qxk_xthr.cpp + 11 2 41 0 14 QP::QXThread::teDisarm_@511-524@..\src\qxk\qxk_xthr.cpp +34 file analyzed. +============================================================== +NLOC Avg.NLOC AvgCCN Avg.token function_cnt file +-------------------------------------------------------------- + 6 0.0 0.0 0.0 0 ..\include\qassert.h + 235 4.1 1.0 20.6 25 ..\include\qep.hpp + 46 3.0 1.0 10.7 3 ..\include\qequeue.hpp + 317 5.1 1.6 33.9 22 ..\include\qf.hpp + 24 3.0 1.0 29.0 2 ..\include\qf_pkg.hpp + 25 0.0 0.0 0.0 0 ..\include\qk.hpp + 49 3.0 1.0 10.0 2 ..\include\qmpool.hpp + 5 0.0 0.0 0.0 0 ..\include\qpcpp.hpp + 397 8.2 1.5 41.2 4 ..\include\qs.hpp + 5 0.0 0.0 0.0 0 ..\include\qstamp.cpp + 4 0.0 0.0 0.0 0 ..\include\qstamp.hpp + 25 3.0 1.0 18.0 1 ..\include\qs_dummy.hpp + 25 0.0 0.0 0.0 0 ..\include\qs_pkg.hpp + 9 0.0 0.0 0.0 0 ..\include\quit.hpp + 8 0.0 0.0 0.0 0 ..\include\qv.hpp + 121 6.0 1.0 30.0 2 ..\include\qxk.hpp + 360 30.9 4.9 179.0 11 ..\src\qf\qep_hsm.cpp + 307 41.4 7.1 228.1 7 ..\src\qf\qep_msm.cpp + 2 0.0 0.0 0.0 0 ..\src\qf\qf_act.cpp + 251 25.6 3.8 139.6 9 ..\src\qf\qf_actq.cpp + 73 19.3 2.3 99.3 3 ..\src\qf\qf_defer.cpp + 160 19.6 3.3 137.1 7 ..\src\qf\qf_dyn.cpp + 119 21.6 2.6 120.6 5 ..\src\qf\qf_mem.cpp + 127 20.4 4.4 125.0 5 ..\src\qf\qf_ps.cpp + 122 16.6 5.0 110.4 5 ..\src\qf\qf_qact.cpp + 163 30.4 4.0 152.4 5 ..\src\qf\qf_qeq.cpp + 33 4.5 1.0 30.0 6 ..\src\qf\qf_qmact.cpp + 233 27.6 4.1 157.1 8 ..\src\qf\qf_time.cpp + 205 22.9 4.8 143.4 8 ..\src\qk\qk.cpp + 85 16.5 3.8 96.5 4 ..\src\qv\qv.cpp + 280 23.5 5.0 147.5 11 ..\src\qxk\qxk.cpp + 241 46.0 7.0 333.6 5 ..\src\qxk\qxk_mutex.cpp + 142 32.8 4.5 196.5 4 ..\src\qxk\qxk_sema.cpp + 309 21.3 3.5 128.8 14 ..\src\qxk\qxk_xthr.cpp + +========================================================================================================= +!!!! Warnings (cyclomatic_complexity > 20 or length > 500 or nloc > 1000000 or parameter_count > 10) !!!! +================================================ + NLOC CCN token PARAM length location +------------------------------------------------ + 116 21 658 2 168 QP::QMsm::dispatch@119-286@..\src\qf\qep_msm.cpp +========================================================================================== +Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt +------------------------------------------------------------------------------------------ + 4513 18.0 3.2 107.2 178 1 0.01 0.04 +@endcode diff --git a/doxygen/history.dox b/doxygen/history.dox index e8f01110..8e91e4b4 100644 --- a/doxygen/history.dox +++ b/doxygen/history.dox @@ -1,5 +1,29 @@ /** @page history Revision History +@section qpcpp_7_1_3 Version 7.1.3, 2022-11-18 + +__Bug Fixes:__ +- This release fixes [bug#317](https://sourceforge.net/p/qpc/bugs/317) in QK kernel + +__Source__ +- The file `qstamp.cpp` has been copied from the `include/` folder to `src/qs/`. This makes it easier to build SPY configuration. (The file `qstamp.cpp` has been left in the `include/` folder for backwards compatibility). + +__Ports__ +- This release removes the QP libraries from the **Windows** ports +- `CMakeLists.txt` file in the zephyr port has been modified to use `zephyr_library_named(qpcpp)` instead of `zephyr_library()` + +__Examples__ +- This release changes all examples for **Windows** (Makefiles for GCC and project files for Visual Studio) to build the QP framework from sources rather than using QP libraries. This slightly extends the first build of the application, but avoids any problems with library incompatibilities (e.g., 32-bit/64-bit compilers used to build the application vs. the QP libraries). +- updated examples for emWin Embedded GUI (for emWin v6.28) +- updated examples for MSP430 + +__Documentation__ +- Modified the `doxygen/` folder for generation of QM Manual in LaTeX (enables generation of PDF) + +__Licensing__ +- This release removes the `QM-EVAL-QPC.qlc` file from the `LICENSES` folder. This "QM License Certificate" is no longer needed for QM 5.2.3, where "QM License Certificates" are no longer needed for generating QMsm-style state machines. + + @section qpcpp_7_1_2 Version 7.1.2, 2022-10-07 This release improves preemption-threshold scheduling (PTS) in @ref srs_qk "QK" kernel, especially the generation of the software tracing information about the scheduler activity. Also, PTS has been removed from the @ref srs_qxk "QXK" kernel because of the inherent complexity of that kernel. diff --git a/doxygen/make.bat b/doxygen/make.bat index 01d6b27d..33350505 100644 --- a/doxygen/make.bat +++ b/doxygen/make.bat @@ -28,7 +28,6 @@ @echo usage: @echo make @echo make -CHM -@echo make -CERT @echo make -LATEX :: tools (adjust to your system)--------------------------------------------- @@ -53,17 +52,11 @@ IF "%1"=="-CERT" ( :: Generate metrics.dox file------------------------------------------------- @set METRICS_INP=%QP%\include %QP%\src -x %QP%\src\qs\* -@set METRICS_OUT=metrics.dox - -@echo /** @defgroup metrics Code Metrics> %METRICS_OUT% -@echo.>> %METRICS_OUT% -@echo @code{.cpp}>> %METRICS_OUT% -@echo Code Metrics >> %METRICS_OUT% +@set METRICS_OUT=gen\metrics.txt +@echo @code{.c}> %METRICS_OUT% %METRICS% %METRICS_INP% >> %METRICS_OUT% - @echo @endcode>> %METRICS_OUT% -@echo */>> %METRICS_OUT% :: Generate Doxygen Documentation ------------------------------------------- if "%1"=="-CHM" ( @@ -95,9 +88,8 @@ if "%1"=="-CHM" ( @echo Adding custom files... xcopy img %LATEX_OUT%\img\ - @echo TODO... - @echo cd ..\latex - @echo make.bat + @cd %LATEX_OUT% + @call make.bat ) else ( diff --git a/doxygen/metrics.dox b/doxygen/metrics.dox index d80f2e08..ce34e266 100644 --- a/doxygen/metrics.dox +++ b/doxygen/metrics.dox @@ -8,28 +8,28 @@ 3 1 13 1 4 QP::QEvt::QEvt@183-186@..\include\qep.hpp 7 1 27 2 7 QP::QEvt::QEvt@192-198@..\include\qep.hpp 2 1 6 0 3 QP::QEvt::~QEvt@204-206@..\include\qep.hpp - 2 1 6 0 3 QP::QHsm::~QHsm@374-376@..\include\qep.hpp - 3 1 17 1 3 QP::QHsm::init@405-407@..\include\qep.hpp - 3 1 12 0 3 QP::QHsm::state@454-456@..\include\qep.hpp - 3 1 11 0 3 QP::QHsm::getStateHandler@461-463@..\include\qep.hpp - 4 1 18 1 4 QP::QHsm::tran@493-496@..\include\qep.hpp - 4 1 18 1 4 QP::QHsm::tran_hist@499-502@..\include\qep.hpp - 4 1 18 1 4 QP::QHsm::super@505-508@..\include\qep.hpp - 4 1 30 1 4 QP::QHsm::qm_tran@512-515@..\include\qep.hpp - 4 1 30 1 4 QP::QHsm::qm_tran_init@519-522@..\include\qep.hpp - 8 1 42 2 8 QP::QHsm::qm_tran_hist@526-533@..\include\qep.hpp - 4 1 30 1 4 QP::QHsm::qm_tran_ep@537-540@..\include\qep.hpp - 8 1 40 2 8 QP::QHsm::qm_tran_xp@544-551@..\include\qep.hpp - 4 1 20 1 4 QP::QHsm::qm_entry@556-559@..\include\qep.hpp - 4 1 22 1 4 QP::QHsm::qm_entry@565-568@..\include\qep.hpp - 4 1 20 1 4 QP::QHsm::qm_exit@574-577@..\include\qep.hpp - 4 1 22 1 4 QP::QHsm::qm_exit@583-586@..\include\qep.hpp - 4 1 20 1 4 QP::QHsm::qm_sm_exit@590-593@..\include\qep.hpp - 4 1 20 1 4 QP::QHsm::qm_super_sub@597-600@..\include\qep.hpp - 6 1 26 1 6 QP::QMsm::QMsm@686-691@..\include\qep.hpp - 3 1 20 1 3 QP::QMsm::init@704-706@..\include\qep.hpp - 3 1 12 0 3 QP::QMsm::stateObj@749-751@..\include\qep.hpp - 3 1 14 0 3 QP::QMsm::getStateHandler@781-783@..\include\qep.hpp + 2 1 6 0 3 QP::QHsm::~QHsm@375-377@..\include\qep.hpp + 3 1 17 1 3 QP::QHsm::init@406-408@..\include\qep.hpp + 3 1 12 0 3 QP::QHsm::state@455-457@..\include\qep.hpp + 3 1 11 0 3 QP::QHsm::getStateHandler@462-464@..\include\qep.hpp + 4 1 18 1 4 QP::QHsm::tran@494-497@..\include\qep.hpp + 4 1 18 1 4 QP::QHsm::tran_hist@500-503@..\include\qep.hpp + 4 1 18 1 4 QP::QHsm::super@506-509@..\include\qep.hpp + 4 1 30 1 4 QP::QHsm::qm_tran@513-516@..\include\qep.hpp + 4 1 30 1 4 QP::QHsm::qm_tran_init@520-523@..\include\qep.hpp + 8 1 42 2 8 QP::QHsm::qm_tran_hist@527-534@..\include\qep.hpp + 4 1 30 1 4 QP::QHsm::qm_tran_ep@538-541@..\include\qep.hpp + 8 1 40 2 8 QP::QHsm::qm_tran_xp@545-552@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_entry@557-560@..\include\qep.hpp + 4 1 22 1 4 QP::QHsm::qm_entry@566-569@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_exit@575-578@..\include\qep.hpp + 4 1 22 1 4 QP::QHsm::qm_exit@584-587@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_sm_exit@591-594@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_super_sub@598-601@..\include\qep.hpp + 6 1 26 1 6 QP::QMsm::QMsm@687-692@..\include\qep.hpp + 3 1 20 1 3 QP::QMsm::init@705-707@..\include\qep.hpp + 3 1 12 0 3 QP::QMsm::stateObj@750-752@..\include\qep.hpp + 3 1 14 0 3 QP::QMsm::getStateHandler@782-784@..\include\qep.hpp 3 1 10 0 3 QP::QEQueue::getNFree@289-291@..\include\qequeue.hpp 3 1 10 0 3 QP::QEQueue::getNMin@304-306@..\include\qequeue.hpp 3 1 12 0 3 QP::QEQueue::isEmpty@318-320@..\include\qequeue.hpp @@ -52,13 +52,11 @@ 3 1 10 0 3 QP::QTimeEvt::getInterval@1128-1130@..\include\qf.hpp 3 1 16 0 3 QP::QTimeEvt::toActive@1187-1189@..\include\qf.hpp 3 1 16 0 3 QP::QTimeEvt::toTimeEvt@1192-1194@..\include\qf.hpp - 6 1 23 2 6 QP::QF::psInit@1344-1349@..\include\qf.hpp - 7 1 34 3 7 QP::QF::publish_@1356-1362@..\include\qf.hpp - 6 1 26 2 6 QP::QF::tick_@1369-1374@..\include\qf.hpp - 3 1 16 1 3 QP::QF_EVT_POOL_ID_@112-114@..\include\qf_pkg.hpp - 3 1 16 1 3 QP::QF_EVT_REF_CTR_@117-119@..\include\qf_pkg.hpp - 3 1 29 1 3 QP::QF_EVT_REF_CTR_INC_@122-124@..\include\qf_pkg.hpp - 3 1 29 1 3 QP::QF_EVT_REF_CTR_DEC_@127-129@..\include\qf_pkg.hpp + 6 1 23 2 6 QP::QF::psInit@1348-1353@..\include\qf.hpp + 7 1 34 3 7 QP::QF::publish_@1360-1366@..\include\qf.hpp + 6 1 26 2 6 QP::QF::tick_@1373-1378@..\include\qf.hpp + 3 1 29 1 3 QP::QEvt_refCtr_inc_@112-114@..\include\qf_pkg.hpp + 3 1 29 1 3 QP::QEvt_refCtr_dec_@117-119@..\include\qf_pkg.hpp 3 1 10 0 3 QP::QMPool::getNMin@263-265@..\include\qmpool.hpp 3 1 10 0 3 QP::QMPool::getNFree@275-277@..\include\qmpool.hpp 3 1 18 0 3 QP::QSpyId::getPrio@315-317@..\include\qs.hpp @@ -68,14 +66,17 @@ 3 1 18 0 3 QP::QSpyId::getPrio@134-136@..\include\qs_dummy.hpp 3 1 11 0 3 QP::QXThread::getTimeEvt@208-210@..\include\qxk.hpp 9 1 49 5 9 QP::QXThread::start@310-318@..\include\qxk.hpp - 2 1 15 2 3 QP::QEvt@101-103@..\src\qf\qep_hsm.cpp - 4 1 27 1 4 QP::QHsm::QHsm@130-133@..\src\qf\qep_hsm.cpp - 50 7 303 2 71 QP::QHsm::init@136-206@..\src\qf\qep_hsm.cpp - 105 15 587 2 158 QP::QHsm::dispatch@209-366@..\src\qf\qep_hsm.cpp - 8 1 31 2 8 QP::QHsm::top@369-376@..\src\qf\qep_hsm.cpp - 16 3 85 1 22 QP::QHsm::isIn@379-400@..\src\qf\qep_hsm.cpp - 20 4 105 1 29 QP::QHsm::childState@403-431@..\src\qf\qep_hsm.cpp - 95 15 439 2 130 QP::QHsm::hsm_tran@434-563@..\src\qf\qep_hsm.cpp + 2 1 39 2 3 QP::QEvt@86-88@..\src\qf\qep_hsm.cpp + 7 1 41 3 7 hsm_reservedEvt_@103-109@..\src\qf\qep_hsm.cpp + 17 3 102 3 20 hsm_state_entry_@117-136@..\src\qf\qep_hsm.cpp + 23 3 114 3 26 hsm_state_exit_@148-173@..\src\qf\qep_hsm.cpp + 4 1 27 1 4 QP::QHsm::QHsm@183-186@..\src\qf\qep_hsm.cpp + 50 7 325 2 73 QP::QHsm::init@189-261@..\src\qf\qep_hsm.cpp + 103 15 609 2 158 QP::QHsm::dispatch@264-421@..\src\qf\qep_hsm.cpp + 8 1 31 2 8 QP::QHsm::top@424-431@..\src\qf\qep_hsm.cpp + 16 3 87 1 22 QP::QHsm::isIn@434-455@..\src\qf\qep_hsm.cpp + 20 4 107 1 29 QP::QHsm::childState@458-486@..\src\qf\qep_hsm.cpp + 90 15 487 2 132 QP::QHsm::hsm_tran@489-620@..\src\qf\qep_hsm.cpp 25 3 165 2 38 QP::QMsm::init@79-116@..\src\qf\qep_msm.cpp 116 21 658 2 168 QP::QMsm::dispatch@119-286@..\src\qf\qep_msm.cpp 13 3 59 1 14 QP::QMsm::isInState@289-302@..\src\qf\qep_msm.cpp @@ -104,19 +105,19 @@ 10 3 77 1 12 QP::QF::getPoolMin@292-303@..\src\qf\qf_dyn.cpp 9 1 42 0 9 QP::QMPool::QMPool@71-79@..\src\qf\qf_mem.cpp 33 5 234 3 55 QP::QMPool::init@82-136@..\src\qf\qf_mem.cpp - 43 4 208 2 67 QP::QMPool::get@139-205@..\src\qf\qf_mem.cpp - 20 2 107 2 26 QP::QMPool::put@208-233@..\src\qf\qf_mem.cpp - 3 1 12 0 3 QP::QMPool::getBlockSize@236-238@..\src\qf\qf_mem.cpp + 43 4 208 2 71 QP::QMPool::get@139-209@..\src\qf\qf_mem.cpp + 20 2 107 2 26 QP::QMPool::put@212-237@..\src\qf\qf_mem.cpp + 3 1 12 0 3 QP::QMPool::getBlockSize@240-242@..\src\qf\qf_mem.cpp 9 1 44 2 9 QP::QActive::psInit@83-91@..\src\qf\qf_ps.cpp 42 6 238 3 71 QP::QActive::publish_@99-169@..\src\qf\qf_ps.cpp 16 5 108 1 20 QP::QActive::subscribe@177-196@..\src\qf\qf_ps.cpp 16 5 108 1 23 QP::QActive::unsubscribe@204-226@..\src\qf\qf_ps.cpp 19 5 127 0 25 QP::QActive::unsubscribeAll@234-258@..\src\qf\qf_ps.cpp - 10 2 59 2 10 QP::QF::bzero@97-106@..\src\qf\qf_qact.cpp - 9 4 65 1 17 QP::QActive::QActive@117-133@..\src\qf\qf_qact.cpp - 30 10 198 0 46 QP::QActive::register_@141-186@..\src\qf\qf_qact.cpp - 10 3 72 0 11 QP::QActive::unregister_@194-204@..\src\qf\qf_qact.cpp - 24 6 158 1 29 QP::QPSet::QF_LOG2@215-243@..\src\qf\qf_qact.cpp + 10 2 59 2 10 QP::QF::bzero@107-116@..\src\qf\qf_qact.cpp + 9 4 65 1 17 QP::QActive::QActive@127-143@..\src\qf\qf_qact.cpp + 30 10 198 0 46 QP::QActive::register_@151-196@..\src\qf\qf_qact.cpp + 10 3 72 0 11 QP::QActive::unregister_@204-214@..\src\qf\qf_qact.cpp + 24 6 158 1 29 QP::QPSet::QF_LOG2@225-253@..\src\qf\qf_qact.cpp 9 1 43 0 9 QP::QEQueue::QEQueue@71-79@..\src\qf\qf_qeq.cpp 14 2 74 2 14 QP::QEQueue::init@82-95@..\src\qf\qf_qeq.cpp 57 8 281 3 76 QP::QEQueue::post@98-173@..\src\qf\qf_qeq.cpp @@ -138,27 +139,27 @@ 13 1 50 0 27 QP::QTimeEvt::QTimeEvt@411-437@..\src\qf\qf_time.cpp 22 2 136 1 32 QP::QK::schedLock@76-107@..\src\qk\qk.cpp 20 4 129 1 32 QP::QK::schedUnlock@110-141@..\src\qk\qk.cpp - 9 3 87 0 17 QP::QF::init@151-167@..\src\qk\qk.cpp - 3 1 9 0 4 QP::QF::stop@170-173@..\src\qk\qk.cpp - 15 4 62 0 25 QP::QF::run@176-200@..\src\qk\qk.cpp - 25 3 146 6 34 QP::QActive::start@211-244@..\src\qk\qk.cpp - 19 4 93 0 24 QK_sched_@257-280@..\src\qk\qk.cpp - 65 17 428 0 112 QK_activate_@283-394@..\src\qk\qk.cpp + 14 3 144 0 25 QP::QF::init@151-175@..\src\qk\qk.cpp + 3 1 9 0 4 QP::QF::stop@178-181@..\src\qk\qk.cpp + 15 4 62 0 25 QP::QF::run@184-208@..\src\qk\qk.cpp + 25 3 146 6 34 QP::QActive::start@219-252@..\src\qk\qk.cpp + 19 4 93 0 24 QK_sched_@265-288@..\src\qk\qk.cpp + 65 17 428 0 112 QK_activate_@291-402@..\src\qk\qk.cpp 7 3 66 0 13 QP::QF::init@83-95@..\src\qv\qv.cpp 3 1 9 0 4 QP::QF::stop@98-101@..\src\qv\qv.cpp 38 10 197 0 75 QP::QF::run@104-178@..\src\qv\qv.cpp 18 1 114 6 25 QP::QActive::start@189-213@..\src\qv\qv.cpp 24 3 152 1 35 QP::QXK::schedLock@77-111@..\src\qxk\qxk.cpp 20 4 129 1 32 QP::QXK::schedUnlock@114-145@..\src\qxk\qxk.cpp - 13 3 139 0 24 QP::QF::init@155-178@..\src\qxk\qxk.cpp - 3 1 9 0 4 QP::QF::stop@181-184@..\src\qxk\qxk.cpp - 17 4 84 0 29 QP::QF::run@187-215@..\src\qxk\qxk.cpp - 29 5 159 6 40 QP::QActive::start@226-265@..\src\qxk\qxk.cpp - 43 8 230 0 54 QXK_sched_@278-331@..\src\qxk\qxk.cpp - 59 16 406 0 98 QXK_activate_@334-431@..\src\qxk\qxk.cpp - 12 2 69 0 18 QXK_current@434-451@..\src\qxk\qxk.cpp - 23 7 130 1 34 QXK_contextSw@455-488@..\src\qxk\qxk.cpp - 14 2 110 0 23 QXK_threadExit_@492-514@..\src\qxk\qxk.cpp + 14 3 144 0 25 QP::QF::init@155-179@..\src\qxk\qxk.cpp + 3 1 9 0 4 QP::QF::stop@182-185@..\src\qxk\qxk.cpp + 17 4 84 0 29 QP::QF::run@188-216@..\src\qxk\qxk.cpp + 29 5 159 6 40 QP::QActive::start@227-266@..\src\qxk\qxk.cpp + 43 8 230 0 54 QXK_sched_@279-332@..\src\qxk\qxk.cpp + 59 16 406 0 98 QXK_activate_@335-432@..\src\qxk\qxk.cpp + 12 2 69 0 18 QXK_current@435-452@..\src\qxk\qxk.cpp + 23 7 130 1 34 QXK_contextSw@456-489@..\src\qxk\qxk.cpp + 14 2 110 0 23 QXK_threadExit_@493-515@..\src\qxk\qxk.cpp 3 1 15 0 3 QP::QXMutex::QXMutex@76-78@..\src\qxk\qxk_mutex.cpp 8 2 54 1 11 QP::QXMutex::init@81-91@..\src\qxk\qxk_mutex.cpp 61 9 422 0 95 QP::QXMutex::tryLock@94-188@..\src\qxk\qxk_mutex.cpp @@ -187,10 +188,10 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file -------------------------------------------------------------- 6 0.0 0.0 0.0 0 ..\include\qassert.h - 234 4.1 1.0 20.6 25 ..\include\qep.hpp + 235 4.1 1.0 20.6 25 ..\include\qep.hpp 46 3.0 1.0 10.7 3 ..\include\qequeue.hpp - 316 5.1 1.6 33.9 22 ..\include\qf.hpp - 30 3.0 1.0 22.5 4 ..\include\qf_pkg.hpp + 317 5.1 1.6 33.9 22 ..\include\qf.hpp + 24 3.0 1.0 29.0 2 ..\include\qf_pkg.hpp 25 0.0 0.0 0.0 0 ..\include\qk.hpp 49 3.0 1.0 10.0 2 ..\include\qmpool.hpp 5 0.0 0.0 0.0 0 ..\include\qpcpp.hpp @@ -202,7 +203,7 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file 9 0.0 0.0 0.0 0 ..\include\quit.hpp 8 0.0 0.0 0.0 0 ..\include\qv.hpp 121 6.0 1.0 30.0 2 ..\include\qxk.hpp - 323 37.5 5.9 199.0 8 ..\src\qf\qep_hsm.cpp + 360 30.9 4.9 179.0 11 ..\src\qf\qep_hsm.cpp 307 41.4 7.1 228.1 7 ..\src\qf\qep_msm.cpp 2 0.0 0.0 0.0 0 ..\src\qf\qf_act.cpp 251 25.6 3.8 139.6 9 ..\src\qf\qf_actq.cpp @@ -210,13 +211,13 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file 160 19.6 3.3 137.1 7 ..\src\qf\qf_dyn.cpp 119 21.6 2.6 120.6 5 ..\src\qf\qf_mem.cpp 127 20.4 4.4 125.0 5 ..\src\qf\qf_ps.cpp - 117 16.6 5.0 110.4 5 ..\src\qf\qf_qact.cpp + 122 16.6 5.0 110.4 5 ..\src\qf\qf_qact.cpp 163 30.4 4.0 152.4 5 ..\src\qf\qf_qeq.cpp 33 4.5 1.0 30.0 6 ..\src\qf\qf_qmact.cpp 233 27.6 4.1 157.1 8 ..\src\qf\qf_time.cpp - 200 22.2 4.8 136.2 8 ..\src\qk\qk.cpp + 205 22.9 4.8 143.4 8 ..\src\qk\qk.cpp 85 16.5 3.8 96.5 4 ..\src\qv\qv.cpp - 279 23.4 5.0 147.0 11 ..\src\qxk\qxk.cpp + 280 23.5 5.0 147.5 11 ..\src\qxk\qxk.cpp 241 46.0 7.0 333.6 5 ..\src\qxk\qxk_mutex.cpp 142 32.8 4.5 196.5 4 ..\src\qxk\qxk_sema.cpp 309 21.3 3.5 128.8 14 ..\src\qxk\qxk_xthr.cpp @@ -230,6 +231,6 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file ========================================================================================== Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt ------------------------------------------------------------------------------------------ - 4469 17.8 3.2 105.5 177 1 0.01 0.04 + 4513 18.0 3.2 107.2 178 1 0.01 0.04 @endcode */ diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/bsp.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/bsp.cpp index 9e75136d..53fee0c2 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/bsp.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/bsp.cpp @@ -56,8 +56,6 @@ static DWORD WINAPI appThread(LPVOID par) { } //============================================================================ -namespace DPP { - // local variables ----------------------------------------------------------- static HINSTANCE l_hInst; // this application instance static HWND l_hWnd; // main window handle @@ -188,19 +186,19 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, // drawing of owner-drawn buttons... case WM_DRAWITEM: { - static QP::QEvt const pe = QEVT_INITIALIZER(PAUSE_SIG); + static QP::QEvt const pe = QEVT_INITIALIZER(DPP::PAUSE_SIG); LPDRAWITEMSTRUCT pdis = (LPDRAWITEMSTRUCT)lParam; switch (pdis->CtlID) { case IDC_PAUSE: { // PAUSE owner-drawn button switch (OwnerDrawnButton_draw(&l_pauseBtn,pdis)) { case BTN_DEPRESSED: { - AO_Table->POST(&pe, nullptr); + DPP::AO_Table->POST(&pe, nullptr); break; } case BTN_RELEASED: { static QP::QEvt const se = - QEVT_INITIALIZER(SERVE_SIG); - AO_Table->POST(&se, nullptr); + QEVT_INITIALIZER(DPP::SERVE_SIG); + DPP::AO_Table->POST(&se, nullptr); break; } default: { @@ -276,7 +274,8 @@ void BSP::displayPhilStat(uint8_t n, char const *stat) { // set the "segment" # n to the bitmap # 'bitmapNum' SegmentDisplay_setSegment(&l_philos, (UINT)n, bitmapNum); - QS_BEGIN_ID(PHILO_STAT, AO_Philo[n]->m_prio) // app-specific record begin + // app-specific trace record + QS_BEGIN_ID(PHILO_STAT, DPP::AO_Philo[n]->m_prio) QS_U8(1, n); // Philosopher number QS_STR(stat); // Philosopher status QS_END() @@ -301,22 +300,21 @@ void BSP::randomSeed(uint32_t seed) { l_rnd = seed; } -} // namespace DPP - //============================================================================ namespace QP { //............................................................................ void QF::onStartup(void) { - QF_setTickRate(DPP::BSP::TICKS_PER_SEC, 30); // set the desired tick rate + QF::setTickRate(BSP::TICKS_PER_SEC, 30); // set the desired tick rate } //............................................................................ void QF::onCleanup(void) { } //............................................................................ -void QF_onClockTick(void) { - QTimeEvt::TICK_X(0U, &DPP::l_clock_tick); // perform the QF clock tick processing +void QF::onClockTick(void) { + // perform the QF clock tick processing + QTimeEvt::TICK_X(0U, &l_clock_tick); QS_RX_INPUT(); // handle the QS-RX input QS_OUTPUT(); // handle the QS output @@ -330,7 +328,7 @@ extern "C" Q_NORETURN Q_onAssert(char const * const module, int_t const loc) { char message[80]; SNPRINTF_S(message, Q_DIM(message) - 1, "Assertion failed in module %s location %d", module, loc); - MessageBox(DPP::l_hWnd, message, "!!! ASSERTION !!!", + MessageBox(l_hWnd, message, "!!! ASSERTION !!!", MB_OK | MB_ICONEXCLAMATION | MB_APPLMODAL); PostQuitMessage(-1); } @@ -349,7 +347,7 @@ void QS::onCommand(uint8_t cmdId, uint32_t param1, (void)param3; // application-specific record - QS_BEGIN_ID(DPP::COMMAND_STAT, 0U) + QS_BEGIN_ID(COMMAND_STAT, 0U) QS_U8(2, cmdId); QS_U32(8, param1); QS_END() diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj index b0eff282..b18f8369 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj +++ b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj @@ -103,10 +103,10 @@ 0x0409 - qp.lib;%(AdditionalDependencies) + %(AdditionalDependencies) $(OutDir)$(ProjectName).exe true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) Windows false @@ -156,10 +156,10 @@ 0x0409 - qp.lib;ws2_32.lib;%(AdditionalDependencies) + ws2_32.lib;%(AdditionalDependencies) $(OutDir)$(ProjectName).exe true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) true false @@ -215,10 +215,10 @@ 0x0409 - qp.lib;%(AdditionalDependencies) + %(AdditionalDependencies) $(OutDir)$(ProjectName).exe true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) true false @@ -238,7 +238,33 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -252,11 +278,17 @@ - - + + + + + + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj.filters b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj.filters index ecd6128f..c66b5795 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj.filters +++ b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj.filters @@ -4,13 +4,87 @@ - + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP_port + + + QP_port + + + QP_port + + + QS + + + QS + + + QS + + + QS + + + QS + - - + + QP_port + + + QP_port + + + QP_port + + + QP_port + + + + + QP_port + @@ -34,11 +108,23 @@ Res + + QP_port + {c8d4d732-dcf8-4466-ad8e-3f15ab6fe204} + + {cb277694-9964-421d-b5bd-0004c348d0a7} + + + {45ec4af0-fc0e-466d-abe9-db8791529dc6} + + + {3c454ef1-d642-403f-97ef-c157e04d82c9} + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/main.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/main.cpp index 6a3d43f6..8e9fa12c 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/main.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/main.cpp @@ -47,7 +47,7 @@ int main() { static QP::QSubscrList subscrSto[DPP::MAX_PUB_SIG]; QP::QF::init(); // initialize the framework and the underlying RT kernel - DPP::BSP::init(); // initialize the BSP + BSP::init(); // initialize the BSP QP::QActive::psInit(subscrSto, Q_DIM(subscrSto)); // init publish-subscribe diff --git a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/bsp.cpp b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/bsp.cpp index 6ab12235..0b88fb6a 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/bsp.cpp +++ b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/bsp.cpp @@ -822,10 +822,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, //..........................................................................*/ static void playerTrigger(void) { static QP::QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0U, 0U }; - QP::QF::PUBLISH(&fireEvt, nullptr); + static QP::QSpyId const sender = { 0U }; + QP::QF::PUBLISH(&fireEvt, &sender); } - } // namespace GAME //============================================================================ @@ -833,16 +833,16 @@ namespace QP { //............................................................................ void QF::onStartup(void) { - QF_setTickRate(GAME::BSP_TICKS_PER_SEC, 30); // set the desired tick rate + setTickRate(GAME::BSP_TICKS_PER_SEC, 30); // set the desired tick rate } //............................................................................ void QF::onCleanup(void) { } //............................................................................ -void QF_onClockTick(void) { +void QF::onClockTick(void) { static QP::QEvt const tickEvt = QEVT_INITIALIZER(GAME::TIME_TICK_SIG); - QP::QTimeEvt::TICK_X(0U, &GAME::l_clock_tick); // process time events at rate 0 - QP::QF::PUBLISH(&tickEvt, &GAME::l_clock_tick); // publish the tick event + QTimeEvt::TICK_X(0U, &GAME::l_clock_tick); // process time events at rate 0 + QF::PUBLISH(&tickEvt, &GAME::l_clock_tick); // publish the tick event QS_RX_INPUT(); // handle the QS-RX input QS_OUTPUT(); // handle the QS output @@ -868,13 +868,10 @@ extern "C" Q_NORETURN Q_onAssert(char const * const module, int_t const loc) { void QS::onCommand(uint8_t cmdId, uint32_t param1, uint32_t param2, uint32_t param3) { - (void)cmdId; - (void)param1; - (void)param2; - (void)param3; - if (cmdId == 10U) { - Q_onAssert("QS::onCommand", 10); - } + Q_UNUSED_PAR(cmdId); + Q_UNUSED_PAR(param1); + Q_UNUSED_PAR(param2); + Q_UNUSED_PAR(param3); } #endif // Q_SPY diff --git a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj index 4f89bf44..93ff6211 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj +++ b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj @@ -103,10 +103,10 @@ 0x0409 - qp.lib;%(AdditionalDependencies) + %(AdditionalDependencies) $(OutDir)$(ProjectName).exe true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) Windows false @@ -156,10 +156,10 @@ 0x0409 - qp.lib;ws2_32.lib;%(AdditionalDependencies) + ws2_32.lib;%(AdditionalDependencies) $(OutDir)$(ProjectName).exe true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) true false @@ -215,10 +215,10 @@ 0x0409 - qp.lib;%(AdditionalDependencies) + %(AdditionalDependencies) $(OutDir)$(ProjectName).exe true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) true false @@ -238,7 +238,56 @@ - + + + true + + + true + + + + + + + + + + + + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + @@ -255,11 +304,17 @@ + + + + + + diff --git a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj.filters b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj.filters index 61ef9bbd..f8543dba 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj.filters +++ b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj.filters @@ -8,12 +8,86 @@ - + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QS + + + QS + + + QS + + + QS + + + QS + + + QP_port + + + QP_port + + + QP_port + + + QP_port + + + QP_port + + + QP_port + + + QP_port + + + QP_port + @@ -37,11 +111,23 @@ Res + + QP_port + {c8d4d732-dcf8-4466-ad8e-3f15ab6fe204} + + {4edf856c-7db0-4957-a143-44a72f59a0af} + + + {65d40db6-59fb-41d1-8a98-2187dc3217a1} + + + {c4527ddf-c49e-4957-bd70-77babf9183e2} + diff --git a/examples/emwin/demo_no_wm/Config/GUIConf.c b/examples/emwin/demo_no_wm/Config/GUIConf.c index 48228146..80eb9923 100644 --- a/examples/emwin/demo_no_wm/Config/GUIConf.c +++ b/examples/emwin/demo_no_wm/Config/GUIConf.c @@ -1,18 +1,18 @@ /********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * +* SEGGER Microcontroller GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2011 SEGGER Microcontroller GmbH & Co. KG * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V5.08 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may -only be used in accordance with a license and should not be re- +only be used in accordance with a license and should not be re- distributed in any way. We appreciate your understanding and fairness. ---------------------------------------------------------------------- File : GUIConf.c @@ -31,11 +31,7 @@ Purpose : Display controller initialization // // Define the available number of bytes available for the GUI // -#define GUI_NUMBYTES 0x400000 -// -// Define the average block size -// -#define GUI_BLOCKSIZE 0x80 +#define GUI_NUMBYTES 0x280000 /********************************************************************* * @@ -60,7 +56,6 @@ void GUI_X_Config(void) { // Assign memory to emWin // GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES); - GUI_ALLOC_SetAvBlockSize(GUI_BLOCKSIZE); } /*************************** End of file ****************************/ diff --git a/examples/emwin/demo_no_wm/Config/GUIConf.h b/examples/emwin/demo_no_wm/Config/GUIConf.h index 235544de..af51cc9c 100644 --- a/examples/emwin/demo_no_wm/Config/GUIConf.h +++ b/examples/emwin/demo_no_wm/Config/GUIConf.h @@ -1,18 +1,18 @@ /********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * +* SEGGER Microcontroller GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2011 SEGGER Microcontroller GmbH & Co. KG * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V5.08 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may -only be used in accordance with a license and should not be re- +only be used in accordance with a license and should not be re- distributed in any way. We appreciate your understanding and fairness. ---------------------------------------------------------------------- File : GUIConf.h @@ -54,7 +54,7 @@ Purpose : Configuration of available features and default values * * Default font */ -#define GUI_DEFAULT_FONT &GUI_Font6x8 +#define GUI_DEFAULT_FONT &GUI_Font6x8 #endif /* Avoid multiple inclusion */ diff --git a/examples/emwin/demo_no_wm/Config/LCDConf.c b/examples/emwin/demo_no_wm/Config/LCDConf.c index a94799fe..7e6de997 100644 --- a/examples/emwin/demo_no_wm/Config/LCDConf.c +++ b/examples/emwin/demo_no_wm/Config/LCDConf.c @@ -1,18 +1,18 @@ /********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * +* SEGGER Microcontroller GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2011 SEGGER Microcontroller GmbH & Co. KG * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V5.08 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may -only be used in accordance with a license and should not be re- +only be used in accordance with a license and should not be re- distributed in any way. We appreciate your understanding and fairness. ---------------------------------------------------------------------- File : LCDConf.c @@ -31,14 +31,17 @@ Purpose : Display controller configuration (single layer) // // Physical display size // -#define XSIZE_PHYS 320 -#define YSIZE_PHYS 240 -#define VYSIZE_PHYS (YSIZE_PHYS << 1) +#define XSIZE_PHYS 320 +#define YSIZE_PHYS 240 // // Color conversion // -#define COLOR_CONVERSION GUICC_8888 +#if GUI_USE_ARGB + #define COLOR_CONVERSION GUICC_M8888I +#else + #define COLOR_CONVERSION GUICC_8888 +#endif // // Display driver @@ -95,7 +98,7 @@ void LCD_X_Config(void) { // GUI_DEVICE_CreateAndLink(DISPLAY_DRIVER, COLOR_CONVERSION, 0, 0); // - // Display driver configuration, required for Lin-driver + // Display driver configuration // LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS); LCD_SetVSizeEx (0, VXSIZE_PHYS, VYSIZE_PHYS); diff --git a/examples/emwin/demo_no_wm/Config/LCDConf.h b/examples/emwin/demo_no_wm/Config/LCDConf.h index f2e21232..4d791da5 100644 --- a/examples/emwin/demo_no_wm/Config/LCDConf.h +++ b/examples/emwin/demo_no_wm/Config/LCDConf.h @@ -1,18 +1,18 @@ /********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * +* SEGGER Microcontroller GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2011 SEGGER Microcontroller GmbH & Co. KG * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V5.08 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may -only be used in accordance with a license and should not be re- +only be used in accordance with a license and should not be re- distributed in any way. We appreciate your understanding and fairness. ---------------------------------------------------------------------- File : LCDConf.h diff --git a/examples/emwin/demo_no_wm/Config/SIMConf.c b/examples/emwin/demo_no_wm/Config/SIMConf.c index e58554ae..badc4638 100644 --- a/examples/emwin/demo_no_wm/Config/SIMConf.c +++ b/examples/emwin/demo_no_wm/Config/SIMConf.c @@ -3,13 +3,13 @@ * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2019 SEGGER Microcontroller GmbH * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V6.10 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may only be used in accordance with a license and should not be re- @@ -22,11 +22,7 @@ Purpose : Windows Simulator configuration #ifdef WIN32 -#include -#include - #include "LCD_SIM.h" -#include "GUI_SIM_Win32.h" /********************************************************************* * diff --git a/examples/emwin/demo_no_wm/bsp.cpp b/examples/emwin/demo_no_wm/bsp.cpp index adf603c3..1d100372 100644 --- a/examples/emwin/demo_no_wm/bsp.cpp +++ b/examples/emwin/demo_no_wm/bsp.cpp @@ -37,7 +37,7 @@ extern "C" { #include "GUI.h" - #include "GUI_SIM.h" + #include "LCD_SIM.h" #include "DIALOG.h" } @@ -123,7 +123,7 @@ void BSP_init(void) { SIM_HARDKEY_SetCallback(n, &simHardKey); } - QF_setTickRate(BSP_TICKS_PER_SEC, 30); // set the desired tick rate + QF::setTickRate(BSP_TICKS_PER_SEC, 30); // set the desired tick rate } //............................................................................ void QF::onStartup(void) { @@ -135,7 +135,7 @@ void QF::onCleanup(void) { #endif } //............................................................................ -void QP::QF_onClockTick(void) { +void QF::onClockTick(void) { QTimeEvt::TICK(&l_clock_tick); // perform the QF clock tick processing } diff --git a/examples/emwin/demo_no_wm/demo_no_wm.vcxproj b/examples/emwin/demo_no_wm/demo_no_wm.vcxproj index 2d5b560f..f15c0ee5 100644 --- a/examples/emwin/demo_no_wm/demo_no_wm.vcxproj +++ b/examples/emwin/demo_no_wm/demo_no_wm.vcxproj @@ -83,7 +83,7 @@ MaxSpeed OnlyExplicitInline - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + ..\..\..\include;..\..\..\ports\win32-qv;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) true MultiThreaded @@ -100,10 +100,10 @@ 0x0409 - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) + legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) .\Release/demo_no_wm.exe true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) false .\Release/demo_no_wm.pdb true @@ -131,7 +131,7 @@ Disabled - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + ..\..\..\include;..\..\..\ports\win32-qv;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) Default MultiThreadedDebug @@ -148,10 +148,10 @@ 0x0409 - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) + legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) .\Debug/demo_no_wm.exe true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) false true .\Debug/demo_no_wm.pdb @@ -180,7 +180,7 @@ Disabled - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + ..\..\..\include;..\..\..\ports\win32-qv;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;Q_SPY;%(PreprocessorDefinitions) true EnableFastChecks @@ -198,10 +198,10 @@ 0x0409 - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;ws2_32.lib;%(AdditionalDependencies) + legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;ws2_32.lib;%(AdditionalDependencies) .\QSpy/demo_no_wm.exe true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) false true .\QSpy/demo_no_wm.pdb @@ -221,6 +221,19 @@ + + + + + + + + + + + + + @@ -232,6 +245,9 @@ + + + @@ -244,6 +260,9 @@ + + + diff --git a/examples/emwin/demo_no_wm/demo_no_wm.vcxproj.filters b/examples/emwin/demo_no_wm/demo_no_wm.vcxproj.filters index 11590621..dc199f5e 100644 --- a/examples/emwin/demo_no_wm/demo_no_wm.vcxproj.filters +++ b/examples/emwin/demo_no_wm/demo_no_wm.vcxproj.filters @@ -17,6 +17,12 @@ {edb4bdd4-7822-4812-b677-b21cb00121b0} *.lib + + {c3592ef4-5e20-44d3-97b5-90dd6b206777} + + + {7a7fe1ad-75a5-4b4b-85cc-602c1d933e3b} + @@ -49,20 +55,68 @@ Source Files + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP_port + - - Header Files - - - Header Files - emWin emWin + + Header Files + + + Header Files + + + QP_port + + + QP_port + + + QP_port + @@ -77,4 +131,9 @@ emWin + + + QP_port + + \ No newline at end of file diff --git a/examples/emwin/demo_no_wm/main.cpp b/examples/emwin/demo_no_wm/main.cpp index 9f4ea86c..f4adfe2b 100644 --- a/examples/emwin/demo_no_wm/main.cpp +++ b/examples/emwin/demo_no_wm/main.cpp @@ -38,37 +38,35 @@ // GUI includes Q_DEFINE_THIS_FILE -// Local-scope objects ------------------------------------------------------- -static QEvt const *l_tableQueueSto[N_PHILO]; -static QEvt const *l_philoQueueSto[N_PHILO][N_PHILO]; -static QSubscrList l_subscrSto[MAX_PUB_SIG]; - -static union SmallEvents { - void *min_size; - TableEvt te; - MouseEvt me; - // other event types to go into this pool -} l_smlPoolSto[2*N_PHILO]; // storage for the small event pool - //............................................................................ extern "C" void MainTask(void) { BSP_init(); // initialize the BSP QF::init(); // initialize the framework and the underlying RT kernel - QActive::psInit(l_subscrSto, Q_DIM(l_subscrSto)); // init publish-subscribe - // initialize event pools... + static union SmallEvents { + void* min_size; + TableEvt te; + MouseEvt me; + // other event types to go into this pool + } l_smlPoolSto[2 * N_PHILO]; // storage for the small event pool QF::poolInit(l_smlPoolSto, sizeof(l_smlPoolSto), sizeof(l_smlPoolSto[0])); + // initialize publish-subscribe + static QSubscrList l_subscrSto[MAX_PUB_SIG]; + QActive::psInit(l_subscrSto, Q_DIM(l_subscrSto)); + // start the active objects... - uint8_t n; - for (n = 0; n < N_PHILO; ++n) { - AO_Philo[n]->start((uint8_t)(n + 1), + static QEvt const *l_philoQueueSto[N_PHILO][10]; + for (uint8_t n = 0; n < N_PHILO; ++n) { + AO_Philo[n]->start(n + 1U, l_philoQueueSto[n], Q_DIM(l_philoQueueSto[n]), nullptr, 1024, nullptr); } - AO_Table->start((uint8_t)(N_PHILO + 1), + + static QEvt const *l_tableQueueSto[N_PHILO]; + AO_Table->start(N_PHILO + 1U, l_tableQueueSto, Q_DIM(l_tableQueueSto), nullptr, 1024, nullptr); diff --git a/examples/emwin/demo_no_wm/sim_x.cpp b/examples/emwin/demo_no_wm/sim_x.cpp index 0adbe7ab..26d26815 100644 --- a/examples/emwin/demo_no_wm/sim_x.cpp +++ b/examples/emwin/demo_no_wm/sim_x.cpp @@ -34,7 +34,7 @@ extern "C" { #include "GUI.h" -#include "GUI_SIM.h" +#include "LCD_SIM.h" void SIM_X_Init() { if (((LCD_GetDevCap(LCD_DEVCAP_XSIZE) * LCD_GetXMag()) == 320) diff --git a/examples/emwin/demo_no_wm/table.cpp b/examples/emwin/demo_no_wm/table.cpp index aff18a9c..cb8077c6 100644 --- a/examples/emwin/demo_no_wm/table.cpp +++ b/examples/emwin/demo_no_wm/table.cpp @@ -37,7 +37,7 @@ extern "C" { #include "GUI.h" - #include "GUI_SIM.h" + #include "LCD_SIM.h" #include "DIALOG.h" } diff --git a/examples/emwin/demo_with_wm/Config/GUIConf.c b/examples/emwin/demo_with_wm/Config/GUIConf.c index 48228146..80eb9923 100644 --- a/examples/emwin/demo_with_wm/Config/GUIConf.c +++ b/examples/emwin/demo_with_wm/Config/GUIConf.c @@ -1,18 +1,18 @@ /********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * +* SEGGER Microcontroller GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2011 SEGGER Microcontroller GmbH & Co. KG * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V5.08 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may -only be used in accordance with a license and should not be re- +only be used in accordance with a license and should not be re- distributed in any way. We appreciate your understanding and fairness. ---------------------------------------------------------------------- File : GUIConf.c @@ -31,11 +31,7 @@ Purpose : Display controller initialization // // Define the available number of bytes available for the GUI // -#define GUI_NUMBYTES 0x400000 -// -// Define the average block size -// -#define GUI_BLOCKSIZE 0x80 +#define GUI_NUMBYTES 0x280000 /********************************************************************* * @@ -60,7 +56,6 @@ void GUI_X_Config(void) { // Assign memory to emWin // GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES); - GUI_ALLOC_SetAvBlockSize(GUI_BLOCKSIZE); } /*************************** End of file ****************************/ diff --git a/examples/emwin/demo_with_wm/Config/GUIConf.h b/examples/emwin/demo_with_wm/Config/GUIConf.h index 235544de..af51cc9c 100644 --- a/examples/emwin/demo_with_wm/Config/GUIConf.h +++ b/examples/emwin/demo_with_wm/Config/GUIConf.h @@ -1,18 +1,18 @@ /********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * +* SEGGER Microcontroller GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2011 SEGGER Microcontroller GmbH & Co. KG * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V5.08 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may -only be used in accordance with a license and should not be re- +only be used in accordance with a license and should not be re- distributed in any way. We appreciate your understanding and fairness. ---------------------------------------------------------------------- File : GUIConf.h @@ -54,7 +54,7 @@ Purpose : Configuration of available features and default values * * Default font */ -#define GUI_DEFAULT_FONT &GUI_Font6x8 +#define GUI_DEFAULT_FONT &GUI_Font6x8 #endif /* Avoid multiple inclusion */ diff --git a/examples/emwin/demo_with_wm/Config/LCDConf.c b/examples/emwin/demo_with_wm/Config/LCDConf.c index a94799fe..7e6de997 100644 --- a/examples/emwin/demo_with_wm/Config/LCDConf.c +++ b/examples/emwin/demo_with_wm/Config/LCDConf.c @@ -1,18 +1,18 @@ /********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * +* SEGGER Microcontroller GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2011 SEGGER Microcontroller GmbH & Co. KG * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V5.08 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may -only be used in accordance with a license and should not be re- +only be used in accordance with a license and should not be re- distributed in any way. We appreciate your understanding and fairness. ---------------------------------------------------------------------- File : LCDConf.c @@ -31,14 +31,17 @@ Purpose : Display controller configuration (single layer) // // Physical display size // -#define XSIZE_PHYS 320 -#define YSIZE_PHYS 240 -#define VYSIZE_PHYS (YSIZE_PHYS << 1) +#define XSIZE_PHYS 320 +#define YSIZE_PHYS 240 // // Color conversion // -#define COLOR_CONVERSION GUICC_8888 +#if GUI_USE_ARGB + #define COLOR_CONVERSION GUICC_M8888I +#else + #define COLOR_CONVERSION GUICC_8888 +#endif // // Display driver @@ -95,7 +98,7 @@ void LCD_X_Config(void) { // GUI_DEVICE_CreateAndLink(DISPLAY_DRIVER, COLOR_CONVERSION, 0, 0); // - // Display driver configuration, required for Lin-driver + // Display driver configuration // LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS); LCD_SetVSizeEx (0, VXSIZE_PHYS, VYSIZE_PHYS); diff --git a/examples/emwin/demo_with_wm/Config/LCDConf.h b/examples/emwin/demo_with_wm/Config/LCDConf.h index f2e21232..4d791da5 100644 --- a/examples/emwin/demo_with_wm/Config/LCDConf.h +++ b/examples/emwin/demo_with_wm/Config/LCDConf.h @@ -1,18 +1,18 @@ /********************************************************************* -* SEGGER Microcontroller GmbH & Co. KG * +* SEGGER Microcontroller GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2011 SEGGER Microcontroller GmbH & Co. KG * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V5.08 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may -only be used in accordance with a license and should not be re- +only be used in accordance with a license and should not be re- distributed in any way. We appreciate your understanding and fairness. ---------------------------------------------------------------------- File : LCDConf.h diff --git a/examples/emwin/demo_with_wm/Config/SIMConf.c b/examples/emwin/demo_with_wm/Config/SIMConf.c index e58554ae..badc4638 100644 --- a/examples/emwin/demo_with_wm/Config/SIMConf.c +++ b/examples/emwin/demo_with_wm/Config/SIMConf.c @@ -3,13 +3,13 @@ * Solutions for real time microcontroller applications * ********************************************************************** * * -* (c) 1996 - 2019 SEGGER Microcontroller GmbH * +* (c) 1996 - 2022 SEGGER Microcontroller GmbH * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** -** emWin V6.10 - Graphical user interface for embedded applications ** +** emWin V6.28 - Graphical user interface for embedded applications ** emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may only be used in accordance with a license and should not be re- @@ -22,11 +22,7 @@ Purpose : Windows Simulator configuration #ifdef WIN32 -#include -#include - #include "LCD_SIM.h" -#include "GUI_SIM_Win32.h" /********************************************************************* * diff --git a/examples/emwin/demo_with_wm/bsp.cpp b/examples/emwin/demo_with_wm/bsp.cpp index adf603c3..1d100372 100644 --- a/examples/emwin/demo_with_wm/bsp.cpp +++ b/examples/emwin/demo_with_wm/bsp.cpp @@ -37,7 +37,7 @@ extern "C" { #include "GUI.h" - #include "GUI_SIM.h" + #include "LCD_SIM.h" #include "DIALOG.h" } @@ -123,7 +123,7 @@ void BSP_init(void) { SIM_HARDKEY_SetCallback(n, &simHardKey); } - QF_setTickRate(BSP_TICKS_PER_SEC, 30); // set the desired tick rate + QF::setTickRate(BSP_TICKS_PER_SEC, 30); // set the desired tick rate } //............................................................................ void QF::onStartup(void) { @@ -135,7 +135,7 @@ void QF::onCleanup(void) { #endif } //............................................................................ -void QP::QF_onClockTick(void) { +void QF::onClockTick(void) { QTimeEvt::TICK(&l_clock_tick); // perform the QF clock tick processing } diff --git a/examples/emwin/demo_with_wm/demo_with_wm.vcxproj b/examples/emwin/demo_with_wm/demo_with_wm.vcxproj index 2438e2fd..8f96c0dc 100644 --- a/examples/emwin/demo_with_wm/demo_with_wm.vcxproj +++ b/examples/emwin/demo_with_wm/demo_with_wm.vcxproj @@ -83,7 +83,7 @@ MaxSpeed OnlyExplicitInline - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + ..\..\..\include;..\..\..\ports\win32-qv;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) true MultiThreaded @@ -100,10 +100,10 @@ 0x0409 - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) + legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) .\Release/demo_with_wm.exe true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) false .\Release/demo_with_wm.pdb true @@ -131,7 +131,7 @@ Disabled - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + ..\..\..\include;..\..\..\ports\win32-qv;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) Default MultiThreadedDebug @@ -148,10 +148,10 @@ 0x0409 - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) + legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) .\Debug/demo_with_wm.exe true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) false true .\Debug/demo_with_wm.pdb @@ -180,7 +180,7 @@ Disabled - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + ..\..\..\include;..\..\..\ports\win32-qv;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;Q_SPY;%(PreprocessorDefinitions) true EnableFastChecks @@ -198,10 +198,10 @@ 0x0409 - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;ws2_32.lib;%(AdditionalDependencies) + legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;ws2_32.lib;%(AdditionalDependencies) .\QSpy/demo_with_wm.exe true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalLibraryDirectories) false true .\QSpy/demo_with_wm.pdb @@ -221,6 +221,19 @@ + + + + + + + + + + + + + @@ -232,6 +245,9 @@ + + + @@ -244,6 +260,9 @@ + + + diff --git a/examples/emwin/demo_with_wm/demo_with_wm.vcxproj.filters b/examples/emwin/demo_with_wm/demo_with_wm.vcxproj.filters index 11590621..f4fdda8b 100644 --- a/examples/emwin/demo_with_wm/demo_with_wm.vcxproj.filters +++ b/examples/emwin/demo_with_wm/demo_with_wm.vcxproj.filters @@ -17,6 +17,12 @@ {edb4bdd4-7822-4812-b677-b21cb00121b0} *.lib + + {2f8471b1-5e79-4b02-bb56-c37c483f0c9e} + + + {12be5770-2052-40b6-b2df-6810909b2e27} + @@ -49,20 +55,68 @@ Source Files + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP_port + - - Header Files - - - Header Files - emWin emWin + + Header Files + + + Header Files + + + QP_port + + + QP_port + + + QP_port + @@ -77,4 +131,9 @@ emWin + + + QP_port + + \ No newline at end of file diff --git a/examples/emwin/demo_with_wm/sim_x.cpp b/examples/emwin/demo_with_wm/sim_x.cpp index 0adbe7ab..26d26815 100644 --- a/examples/emwin/demo_with_wm/sim_x.cpp +++ b/examples/emwin/demo_with_wm/sim_x.cpp @@ -34,7 +34,7 @@ extern "C" { #include "GUI.h" -#include "GUI_SIM.h" +#include "LCD_SIM.h" void SIM_X_Init() { if (((LCD_GetDevCap(LCD_DEVCAP_XSIZE) * LCD_GetXMag()) == 320) diff --git a/examples/emwin/demo_with_wm/table.cpp b/examples/emwin/demo_with_wm/table.cpp index 70b7c460..39f0cebf 100644 --- a/examples/emwin/demo_with_wm/table.cpp +++ b/examples/emwin/demo_with_wm/table.cpp @@ -37,7 +37,7 @@ extern "C" { #include "GUI.h" - #include "GUI_SIM.h" + #include "LCD_SIM.h" #include "DIALOG.h" #include "WM.h" // emWin Windows Manager } diff --git a/examples/performance/dpp_efm32-slstk3401a/dpp.hpp b/examples/performance/dpp_efm32-slstk3401a/dpp.hpp index 94012999..6247da22 100644 --- a/examples/performance/dpp_efm32-slstk3401a/dpp.hpp +++ b/examples/performance/dpp_efm32-slstk3401a/dpp.hpp @@ -3,19 +3,12 @@ // Model: dpp_qmsm.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // diff --git a/examples/performance/dpp_efm32-slstk3401a/dpp_qmsm.qm b/examples/performance/dpp_efm32-slstk3401a/dpp_qmsm.qm index 8c22a356..c827d6ef 100644 --- a/examples/performance/dpp_efm32-slstk3401a/dpp_qmsm.qm +++ b/examples/performance/dpp_efm32-slstk3401a/dpp_qmsm.qm @@ -1,8 +1,8 @@ - + Dining Philosopher Problem example with MSM state machines - + diff --git a/examples/performance/dpp_efm32-slstk3401a/philo.cpp b/examples/performance/dpp_efm32-slstk3401a/philo.cpp index 5da008e3..09dc8b46 100644 --- a/examples/performance/dpp_efm32-slstk3401a/philo.cpp +++ b/examples/performance/dpp_efm32-slstk3401a/philo.cpp @@ -3,19 +3,12 @@ // Model: dpp_qmsm.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // diff --git a/examples/performance/dpp_efm32-slstk3401a/table.cpp b/examples/performance/dpp_efm32-slstk3401a/table.cpp index c725fa52..6083d90c 100644 --- a/examples/performance/dpp_efm32-slstk3401a/table.cpp +++ b/examples/performance/dpp_efm32-slstk3401a/table.cpp @@ -3,19 +3,12 @@ // Model: dpp_qmsm.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // diff --git a/examples/qt/dpp-gui/dpp.hpp b/examples/qt/dpp-gui/dpp.hpp index d05b292b..fceacd72 100644 --- a/examples/qt/dpp-gui/dpp.hpp +++ b/examples/qt/dpp-gui/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -87,4 +87,4 @@ extern QP::QActive * const AO_Table; } // namespace DPP //$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -#endif // DPP_HPP \ No newline at end of file +#endif // DPP_HPP diff --git a/examples/qt/dpp-gui/dpp.qm b/examples/qt/dpp-gui/dpp.qm index f36c3d4d..ef8cb9ca 100644 --- a/examples/qt/dpp-gui/dpp.qm +++ b/examples/qt/dpp-gui/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example for Qt with GUI diff --git a/examples/qt/dpp-gui/philo.cpp b/examples/qt/dpp-gui/philo.cpp index 6452aa11..f1bc1d03 100644 --- a/examples/qt/dpp-gui/philo.cpp +++ b/examples/qt/dpp-gui/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/qt/dpp-gui/table.cpp b/examples/qt/dpp-gui/table.cpp index 869b5c8d..1caf8b24 100644 --- a/examples/qt/dpp-gui/table.cpp +++ b/examples/qt/dpp-gui/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/qt/dpp/dpp.hpp b/examples/qt/dpp/dpp.hpp index 22f2b625..d306cdd7 100644 --- a/examples/qt/dpp/dpp.hpp +++ b/examples/qt/dpp/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -87,4 +87,4 @@ extern QP::QActive * const AO_Table; } // namespace DPP //$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -#endif // DPP_HPP \ No newline at end of file +#endif // DPP_HPP diff --git a/examples/qt/dpp/dpp.qm b/examples/qt/dpp/dpp.qm index 2295cc42..82027f0c 100644 --- a/examples/qt/dpp/dpp.qm +++ b/examples/qt/dpp/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example for Qt console application diff --git a/examples/qt/dpp/philo.cpp b/examples/qt/dpp/philo.cpp index 6452aa11..f1bc1d03 100644 --- a/examples/qt/dpp/philo.cpp +++ b/examples/qt/dpp/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/qt/dpp/table.cpp b/examples/qt/dpp/table.cpp index 625037c2..36aa3def 100644 --- a/examples/qt/dpp/table.cpp +++ b/examples/qt/dpp/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/qt/game-gui/game.hpp b/examples/qt/game-gui/game.hpp index 8d8bf508..88e02c97 100644 --- a/examples/qt/game-gui/game.hpp +++ b/examples/qt/game-gui/game.hpp @@ -3,7 +3,7 @@ // Model: game.qm // File: ${.::game.hpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -220,9 +220,9 @@ bool do_bitmaps_overlap( uint8_t y1, uint8_t bmp_id2, uint8_t x2, - uint8_t y2) ; + uint8_t y2); } // namespace GAME //$enddecl${AOs::do_bitmaps_overlap} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -#endif // GAME_HPP \ No newline at end of file +#endif // GAME_HPP diff --git a/examples/qt/game-gui/game.qm b/examples/qt/game-gui/game.qm index 7e67a750..a3222bc1 100644 --- a/examples/qt/game-gui/game.qm +++ b/examples/qt/game-gui/game.qm @@ -1,5 +1,5 @@ - + "Fly 'n' Shoot" game model from Chapters 1 & 9 of PSiCC2 for Qt with GUI NOTE: Adapted for QP-Qt integartion @@ -65,7 +65,7 @@ int main() { Direct event posting is the simplest asynchronous communication method available in QP. -NOTE: Direct event posting should not be confused with direct event dispatching. In contrast to asynchronous event posting through event queues, direct event dispatching is synchronous. Direct event dispatching occurs when you call QMsm::dispatch() function. +NOTE: Direct event posting should not be confused with direct event dispatching. In contrast to asynchronous event posting through event queues, direct event dispatching is synchronous. Direct event dispatching occurs when you call QHsm::dispatch() function. // Example: @@ -86,7 +86,7 @@ Direct event posting is the simplest asynchronous communication method available NOTE: You should be very careful with the LIFO (Last In First Out) policy, because it *reverses* the order of events in the queue. Typically, the QActive_postLIFO() operation shuould be only used for self-posting of events as reminders (see the "Reminder" state pattern) for continuing a processing. The postLIFO() operation is also used in the QActive::recall() operation. -NOTE: Direct event posting should not be confused with direct event dispatching. In contrast to asynchronous event posting through event queues, direct event dispatching is synchronous. Direct event dispatching occurs when you call QMsm::dispatch() function. +NOTE: Direct event posting should not be confused with direct event dispatching. In contrast to asynchronous event posting through event queues, direct event dispatching is synchronous. Direct event dispatching occurs when you call QHsm::dispatch() function. // Example: @@ -156,7 +156,7 @@ int main() { Direct event posting is the simplest asynchronous communication method available in QP. -NOTE: Direct event posting should not be confused with direct event dispatching. In contrast to asynchronous event posting through event queues, direct event dispatching is synchronous. Direct event dispatching occurs when you call QMsm::dispatch() function. +NOTE: Direct event posting should not be confused with direct event dispatching. In contrast to asynchronous event posting through event queues, direct event dispatching is synchronous. Direct event dispatching occurs when you call QHsm::dispatch() function. // Example: @@ -177,7 +177,7 @@ Direct event posting is the simplest asynchronous communication method available NOTE: You should be very careful with the LIFO (Last In First Out) policy, because it *reverses* the order of events in the queue. Typically, the QActive_postLIFO() operation shuould be only used for self-posting of events as reminders (see the "Reminder" state pattern) for continuing a processing. The postLIFO() operation is also used in the QActive::recall() operation. -NOTE: Direct event posting should not be confused with direct event dispatching. In contrast to asynchronous event posting through event queues, direct event dispatching is synchronous. Direct event dispatching occurs when you call QMsm::dispatch() function. +NOTE: Direct event posting should not be confused with direct event dispatching. In contrast to asynchronous event posting through event queues, direct event dispatching is synchronous. Direct event dispatching occurs when you call QHsm::dispatch() function. // Example: diff --git a/examples/qt/game-gui/mine1.cpp b/examples/qt/game-gui/mine1.cpp index 1ef919d4..61911a17 100644 --- a/examples/qt/game-gui/mine1.cpp +++ b/examples/qt/game-gui/mine1.cpp @@ -3,7 +3,7 @@ // Model: game.qm // File: ${.::mine1.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/qt/game-gui/mine2.cpp b/examples/qt/game-gui/mine2.cpp index 56d50713..b2de81f0 100644 --- a/examples/qt/game-gui/mine2.cpp +++ b/examples/qt/game-gui/mine2.cpp @@ -3,7 +3,7 @@ // Model: game.qm // File: ${.::mine2.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/qt/game-gui/missile.cpp b/examples/qt/game-gui/missile.cpp index e0e9f067..577b3ca2 100644 --- a/examples/qt/game-gui/missile.cpp +++ b/examples/qt/game-gui/missile.cpp @@ -3,7 +3,7 @@ // Model: game.qm // File: ${.::missile.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/qt/game-gui/ship.cpp b/examples/qt/game-gui/ship.cpp index 8fd0b1a0..8b5493d4 100644 --- a/examples/qt/game-gui/ship.cpp +++ b/examples/qt/game-gui/ship.cpp @@ -3,7 +3,7 @@ // Model: game.qm // File: ${.::ship.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/qt/game-gui/tunnel.cpp b/examples/qt/game-gui/tunnel.cpp index 70f20574..b0f781f0 100644 --- a/examples/qt/game-gui/tunnel.cpp +++ b/examples/qt/game-gui/tunnel.cpp @@ -3,7 +3,7 @@ // Model: game.qm // File: ${.::tunnel.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -980,3 +980,4 @@ Q_STATE_DEF(Tunnel, final) { } // namespace GAME //$enddef${AOs::Tunnel} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + diff --git a/examples/qt/pelican-gui/pelican.cpp b/examples/qt/pelican-gui/pelican.cpp index 2c5b1347..bc20cd13 100644 --- a/examples/qt/pelican-gui/pelican.cpp +++ b/examples/qt/pelican-gui/pelican.cpp @@ -3,7 +3,7 @@ // Model: pelican.qm // File: ${.::pelican.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/qt/pelican-gui/pelican.hpp b/examples/qt/pelican-gui/pelican.hpp index 9db1fd0b..36c2a0bc 100644 --- a/examples/qt/pelican-gui/pelican.hpp +++ b/examples/qt/pelican-gui/pelican.hpp @@ -3,7 +3,7 @@ // Model: pelican.qm // File: ${.::pelican.hpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -57,4 +57,4 @@ extern QP::QActive * const AO_Pelican; } // namespace PELICAN //$enddecl${components::AO_Pelican} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // opaque pointer to Pelican AO -#endif // PELICAN_HPP \ No newline at end of file +#endif // PELICAN_HPP diff --git a/examples/qt/pelican-gui/pelican.qm b/examples/qt/pelican-gui/pelican.qm index 6381429b..36c669c0 100644 --- a/examples/qt/pelican-gui/pelican.qm +++ b/examples/qt/pelican-gui/pelican.qm @@ -1,5 +1,5 @@ - + PEdestrian LIghto CONtrolled (PELICA) crossing for Qt with GUI diff --git a/examples/qutest/blinky/test/Makefile b/examples/qutest/blinky/test/Makefile index 500c12e1..55ad24da 100644 --- a/examples/qutest/blinky/test/Makefile +++ b/examples/qutest/blinky/test/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -95,13 +95,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -121,7 +115,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -174,7 +177,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -201,7 +204,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/blinky/test/test_vc.vcxproj b/examples/qutest/blinky/test/test_vc.vcxproj index 7f5b82e7..e644fe41 100644 --- a/examples/qutest/blinky/test/test_vc.vcxproj +++ b/examples/qutest/blinky/test/test_vc.vcxproj @@ -15,15 +15,40 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + {8CC465F7-872E-4D03-B93C-1B64858B4E11} test_vc @@ -89,8 +114,8 @@ Default - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../../ports/win32-qutest/vc;%(AdditionalLibraryDirectories) + ws2_32.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) true Console MachineX86 diff --git a/examples/qutest/blinky/test/test_vc.vcxproj.filters b/examples/qutest/blinky/test/test_vc.vcxproj.filters index 356a6500..91d59b5f 100644 --- a/examples/qutest/blinky/test/test_vc.vcxproj.filters +++ b/examples/qutest/blinky/test/test_vc.vcxproj.filters @@ -4,10 +4,94 @@ - + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP_port + + + QS + + + QS + + + QS + + + QS + + + QS + + + QS + + + QP_port + + + QP_port + + + QP_port + + + QP_port + + + + + {6f4a93f8-9c12-4382-bcaf-7990fc017806} + + + {ac007963-eaca-4059-a0e8-c1540f39b04c} + + + {00254ee7-7214-4063-b202-f6cedf2784eb} + + + + + QP_port + \ No newline at end of file diff --git a/examples/qutest/dpp-comp/test_dpp/Makefile b/examples/qutest/dpp-comp/test_dpp/Makefile index f760a674..76c23e1e 100644 --- a/examples/qutest/dpp-comp/test_dpp/Makefile +++ b/examples/qutest/dpp-comp/test_dpp/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -97,13 +97,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -123,7 +117,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -176,7 +179,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -203,7 +206,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/dpp-comp/test_philo/Makefile b/examples/qutest/dpp-comp/test_philo/Makefile index 4c56f6f3..568c3475 100644 --- a/examples/qutest/dpp-comp/test_philo/Makefile +++ b/examples/qutest/dpp-comp/test_philo/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -95,13 +95,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -121,7 +115,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -174,7 +177,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -201,7 +204,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/dpp-comp/test_table/Makefile b/examples/qutest/dpp-comp/test_table/Makefile index 3ed878f1..525be29f 100644 --- a/examples/qutest/dpp-comp/test_table/Makefile +++ b/examples/qutest/dpp-comp/test_table/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -95,13 +95,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -121,7 +115,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -174,7 +177,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -201,7 +204,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/dpp/test_dpp/Makefile b/examples/qutest/dpp/test_dpp/Makefile index f760a674..1888c4b5 100644 --- a/examples/qutest/dpp/test_dpp/Makefile +++ b/examples/qutest/dpp/test_dpp/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +## Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -97,13 +97,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -123,7 +117,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -176,7 +179,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -203,7 +206,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/dpp/test_philo/Makefile b/examples/qutest/dpp/test_philo/Makefile index 4c56f6f3..568c3475 100644 --- a/examples/qutest/dpp/test_philo/Makefile +++ b/examples/qutest/dpp/test_philo/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -95,13 +95,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -121,7 +115,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -174,7 +177,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -201,7 +204,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/dpp/test_philo/test_vc.sln b/examples/qutest/dpp/test_philo/test_vc.sln deleted file mode 100644 index fc1e7c19..00000000 --- a/examples/qutest/dpp/test_philo/test_vc.sln +++ /dev/null @@ -1,18 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_vc", "test_vc.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/examples/qutest/dpp/test_philo/test_vc.vcxproj b/examples/qutest/dpp/test_philo/test_vc.vcxproj deleted file mode 100644 index d729188f..00000000 --- a/examples/qutest/dpp/test_philo/test_vc.vcxproj +++ /dev/null @@ -1,161 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - QSpy - Win32 - - - - - - - - - - - - - - {8CC465F7-872E-4D03-B93C-1B64858B4E11} - test_vc - Win32Proj - 10.0 - - - - Application - NotSet - v142 - - - Application - NotSet - true - v142 - - - Application - NotSet - v142 - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - - - - Disabled - ../src;../../../../include;../../../../ports/win32-qutest;%(AdditionalIncludeDirectories) - Q_SPY;Q_UTEST;Q_HOST;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - Default - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../../ports/win32-qutest/vc;%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - MaxSpeed - true - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;snprintf=_snprintf;WIN32;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - true - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - - \ No newline at end of file diff --git a/examples/qutest/dpp/test_philo/test_vc.vcxproj.filters b/examples/qutest/dpp/test_philo/test_vc.vcxproj.filters deleted file mode 100644 index f631d7d2..00000000 --- a/examples/qutest/dpp/test_philo/test_vc.vcxproj.filters +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/qutest/dpp/test_table/Makefile b/examples/qutest/dpp/test_table/Makefile index 3ed878f1..525be29f 100644 --- a/examples/qutest/dpp/test_table/Makefile +++ b/examples/qutest/dpp/test_table/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -95,13 +95,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -121,7 +115,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -174,7 +177,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -201,7 +204,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/evt_par/test/Makefile b/examples/qutest/evt_par/test/Makefile index 9d22f7ca..84d2f17b 100644 --- a/examples/qutest/evt_par/test/Makefile +++ b/examples/qutest/evt_par/test/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -94,13 +94,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -120,7 +114,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -173,7 +176,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -200,7 +203,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/qhsmtst/test/Makefile b/examples/qutest/qhsmtst/test/Makefile index 4ca1670d..5aced2ec 100644 --- a/examples/qutest/qhsmtst/test/Makefile +++ b/examples/qutest/qhsmtst/test/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -94,13 +94,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -120,7 +114,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -173,7 +176,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -200,7 +203,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/qmsmtst/qmsmtst.qm b/examples/qutest/qmsmtst/qmsmtst.qm index 125ccafe..b4ca2520 100644 --- a/examples/qutest/qmsmtst/qmsmtst.qm +++ b/examples/qutest/qmsmtst/qmsmtst.qm @@ -1,8 +1,8 @@ - + QMsmTst is a test for the QMsm state machine implementation strategy of the state machine design from Chapter 2 of the PSiCC2 book. - + diff --git a/examples/qutest/qmsmtst/src/qmsmtst.cpp b/examples/qutest/qmsmtst/src/qmsmtst.cpp index c4bbd9c4..ca8d46b4 100644 --- a/examples/qutest/qmsmtst/src/qmsmtst.cpp +++ b/examples/qutest/qmsmtst/src/qmsmtst.cpp @@ -3,19 +3,12 @@ // Model: qmsmtst.qm // File: ${src::qmsmtst.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // @@ -740,4 +733,4 @@ QM_STATE_DEF(QMsmTst, s211) { } //$enddef${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -} // namespace QMSMTST \ No newline at end of file +} // namespace QMSMTST diff --git a/examples/qutest/qmsmtst/src/qmsmtst.hpp b/examples/qutest/qmsmtst/src/qmsmtst.hpp index 9e36b4b6..58b4a4d8 100644 --- a/examples/qutest/qmsmtst/src/qmsmtst.hpp +++ b/examples/qutest/qmsmtst/src/qmsmtst.hpp @@ -3,19 +3,12 @@ // Model: qmsmtst.qm // File: ${src::qmsmtst.hpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // @@ -63,4 +56,4 @@ void BSP_terminate(int16_t const result); } // namespace QMSMTST -#endif // QMSMTST_HPP \ No newline at end of file +#endif // QMSMTST_HPP diff --git a/examples/qutest/qmsmtst/test/Makefile b/examples/qutest/qmsmtst/test/Makefile index ff1f5b63..7f1c91c3 100644 --- a/examples/qutest/qmsmtst/test/Makefile +++ b/examples/qutest/qmsmtst/test/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -94,13 +94,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -120,7 +114,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -173,7 +176,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -200,7 +203,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/qutest/self_test/test/Makefile b/examples/qutest/self_test/test/Makefile index f0402a50..49b1ba36 100644 --- a/examples/qutest/self_test/test/Makefile +++ b/examples/qutest/self_test/test/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -93,13 +93,7 @@ DEFINES := #----------------------------------------------------------------------------- # add QP/C++ framework (depends on the OS this Makefile runs on): # -ifeq ($(OS),Windows_NT) - QP_PORT_DIR := $(QPCPP)/ports/win32-qutest - LIB_DIRS += -L$(QP_PORT_DIR)/mingw - LIBS += -lqp -lws2_32 -else - QP_PORT_DIR := $(QPCPP)/ports/posix-qutest - CPP_SRCS += \ +CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ qf_act.cpp \ @@ -119,7 +113,16 @@ else qutest.cpp \ qutest_port.cpp - LIBS += -lpthread +ifeq ($(OS),Windows_NT) + +QP_PORT_DIR := $(QPCPP)/ports/win32-qutest +LIBS += -lws2_32 + +else + +QP_PORT_DIR := $(QPCPP)/ports/posix-qutest +LIBS += -lpthread + endif #============================================================================ @@ -172,7 +175,7 @@ endif BIN_DIR := build -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -199,7 +202,6 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - #----------------------------------------------------------------------------- # rules # diff --git a/examples/workstation/blinky/Makefile b/examples/workstation/blinky/Makefile index f64ab156..d1812dd4 100644 --- a/examples/workstation/blinky/Makefile +++ b/examples/workstation/blinky/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -89,30 +89,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -135,6 +113,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -150,7 +149,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -182,7 +181,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -197,7 +196,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -209,7 +208,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -232,15 +231,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -259,17 +255,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/calc/Makefile b/examples/workstation/calc/Makefile index 4ce0b08b..7d70eba6 100644 --- a/examples/workstation/calc/Makefile +++ b/examples/workstation/calc/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -91,30 +91,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -137,6 +115,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -152,7 +151,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -184,7 +183,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -199,7 +198,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -211,7 +210,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -234,15 +233,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -261,17 +257,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/calc1/Makefile b/examples/workstation/calc1/Makefile index d95b2c80..ebf13140 100644 --- a/examples/workstation/calc1/Makefile +++ b/examples/workstation/calc1/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -91,30 +91,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -137,6 +115,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -152,7 +151,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -184,7 +183,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -199,7 +198,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -211,7 +210,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -234,15 +233,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -261,17 +257,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/calc1_sub/Makefile b/examples/workstation/calc1_sub/Makefile index e5ae5ccd..3ae32132 100644 --- a/examples/workstation/calc1_sub/Makefile +++ b/examples/workstation/calc1_sub/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -91,30 +91,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -137,6 +115,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -152,7 +151,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -184,7 +183,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -199,7 +198,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -211,7 +210,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -234,15 +233,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -261,17 +257,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/calc1_sub/calc1_sub.cpp b/examples/workstation/calc1_sub/calc1_sub.cpp index 6fd62b80..f3848c5d 100644 --- a/examples/workstation/calc1_sub/calc1_sub.cpp +++ b/examples/workstation/calc1_sub/calc1_sub.cpp @@ -3,19 +3,12 @@ // Model: calc1_sub.qm // File: ${.::calc1_sub.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // diff --git a/examples/workstation/calc1_sub/calc1_sub.hpp b/examples/workstation/calc1_sub/calc1_sub.hpp index 5c056cc8..f3d70752 100644 --- a/examples/workstation/calc1_sub/calc1_sub.hpp +++ b/examples/workstation/calc1_sub/calc1_sub.hpp @@ -3,19 +3,12 @@ // Model: calc1_sub.qm // File: ${.::calc1_sub.hpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // @@ -65,3 +58,4 @@ extern QP::QHsm * const the_calc; //$enddecl${SMs::the_calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ #endif // CALC1_SUB_HPP + diff --git a/examples/workstation/calc1_sub/calc1_sub.qm b/examples/workstation/calc1_sub/calc1_sub.qm index 928c36fb..358c68df 100644 --- a/examples/workstation/calc1_sub/calc1_sub.qm +++ b/examples/workstation/calc1_sub/calc1_sub.qm @@ -1,8 +1,8 @@ - + The improved Calculator model with QMsm state machine implementation strategy and Sub-Machines. - + diff --git a/examples/workstation/calc2/Makefile b/examples/workstation/calc2/Makefile index 6b7a10e9..eb006e15 100644 --- a/examples/workstation/calc2/Makefile +++ b/examples/workstation/calc2/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -91,30 +91,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -137,6 +115,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -152,7 +151,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -184,7 +183,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -199,7 +198,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -211,7 +210,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -234,15 +233,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -261,17 +257,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/comp/Makefile b/examples/workstation/comp/Makefile index 3c0d4aea..44c53a09 100644 --- a/examples/workstation/comp/Makefile +++ b/examples/workstation/comp/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -92,30 +92,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -138,6 +116,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -153,7 +152,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -185,7 +184,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -200,7 +199,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -212,7 +211,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -235,15 +234,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -262,17 +258,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/defer/Makefile b/examples/workstation/defer/Makefile index bbfa116a..ebd320e8 100644 --- a/examples/workstation/defer/Makefile +++ b/examples/workstation/defer/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -90,30 +90,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -136,6 +114,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -151,7 +150,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -183,7 +182,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -198,7 +197,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -210,7 +209,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -233,15 +232,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -260,17 +256,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/dpp-comp/Makefile b/examples/workstation/dpp-comp/Makefile index 5ffa496c..297ede9b 100644 --- a/examples/workstation/dpp-comp/Makefile +++ b/examples/workstation/dpp-comp/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -56,10 +56,10 @@ PROJECT := dpp # # list of all source directories used by this project -VPATH = . +VPATH := . \ # list of all include directories needed by this project -INCLUDES := -I. +INCLUDES := -I. \ # location of the QP/C framework (if not provided in an env. variable) ifeq ($(QPCPP),) @@ -92,30 +92,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -138,6 +116,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -153,7 +152,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -185,7 +184,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -200,7 +199,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -212,7 +211,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -235,15 +234,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -262,17 +258,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/dpp-comp/Makefile-win32 b/examples/workstation/dpp-comp/Makefile-win32 deleted file mode 100644 index efe11788..00000000 --- a/examples/workstation/dpp-comp/Makefile-win32 +++ /dev/null @@ -1,295 +0,0 @@ -############################################################################## -# Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 -# -# Q u a n t u m L e a P s -# ------------------------ -# Modern Embedded Software -# -# Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved. -# -# This program is open source software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Alternatively, this program may be distributed and modified under the -# terms of Quantum Leaps commercial licenses, which expressly supersede -# the GNU General Public License and are specifically designed for -# licensees interested in retaining the proprietary status of their code. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# Contact information: -# -# -############################################################################## -# -# examples of invoking this Makefile: -# building configurations: Debug (default), Release, and Spy -# make -# make CONF=rel -# make CONF=spy -# make clean # cleanup the build -# make CONF=spy clean # cleanup the build -# -# NOTE: -# To use this Makefile on Windows, you will need the GNU make utility, which -# is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ -# - -#----------------------------------------------------------------------------- -# project name: -# -PROJECT := dpp - -#----------------------------------------------------------------------------- -# project directories: -# - -# list of all source directories used by this project -VPATH = . - -# list of all include directories needed by this project -INCLUDES := -I. - -# location of the QP/C framework (if not provided in an env. variable) -ifeq ($(QPCPP),) -QPCPP := ../../.. -endif - -#----------------------------------------------------------------------------- -# project files: -# - -# C source files... -C_SRCS := - -# C++ source files... -CPP_SRCS := \ - bsp.cpp \ - main.cpp \ - philo.cpp \ - table.cpp - -LIB_DIRS := -LIBS := - -# defines... -# QP_API_VERSION controls the QP API compatibility; 9999 means the latest API -DEFINES := -DQP_API_VERSION=9999 - -ifeq (,$(CONF)) - CONF := dbg -endif - -#----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): -# -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -#QP_PORT_DIR := $(QPCPP)/ports/win32-qv -QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - -CPP_SRCS += \ - qep_hsm.cpp \ - qep_msm.cpp \ - qf_act.cpp \ - qf_actq.cpp \ - qf_defer.cpp \ - qf_dyn.cpp \ - qf_mem.cpp \ - qf_ps.cpp \ - qf_qact.cpp \ - qf_qeq.cpp \ - qf_qmact.cpp \ - qf_time.cpp \ - qf_port.cpp - -QS_SRCS := \ - qs.cpp \ - qs_64bit.cpp \ - qs_rx.cpp \ - qs_fp.cpp \ - qs_port.cpp - -LIBS += -lpthread - -endif - -#============================================================================ -# Typically you should not need to change anything below this line - -VPATH += $(QPCPP)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) - -#----------------------------------------------------------------------------- -# GNU toolset: -# -# NOTE: -# GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ -# It is assumed that %QTOOLS%\bin directory is added to the PATH -# -CC := gcc -CPP := g++ -#LINK := gcc # for C programs -LINK := g++ # for C++ programs - -#----------------------------------------------------------------------------- -# basic utilities (depends on the OS this Makefile runs on): -# -ifeq ($(OS),Windows_NT) - MKDIR := mkdir - RM := rm - TARGET_EXT := .exe -else ifeq ($(OSTYPE),cygwin) - MKDIR := mkdir -p - RM := rm -f - TARGET_EXT := .exe -else - MKDIR := mkdir -p - RM := rm -f - TARGET_EXT := -endif - -#----------------------------------------------------------------------------- -# build configurations... - -ifeq (rel, $(CONF)) # Release configuration .................................. - -BIN_DIR := build_rel -# gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) -DNDEBUG - -CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) -DNDEBUG - -else ifeq (spy, $(CONF)) # Spy configuration ................................ - -BIN_DIR := build_spy - -CPP_SRCS += $(QS_SRCS) -VPATH += $(QPCPP)/src/qs - -# gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) -DQ_SPY - -CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) -DQ_SPY - -else # default Debug configuration ......................................... - -BIN_DIR := build - -# gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) - -CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) - -endif # ..................................................................... - -ifndef GCC_OLD - LINKFLAGS := -no-pie -endif - -#----------------------------------------------------------------------------- -C_OBJS := $(patsubst %.c,%.o, $(C_SRCS)) -CPP_OBJS := $(patsubst %.cpp,%.o, $(CPP_SRCS)) - -TARGET_EXE := $(BIN_DIR)/$(PROJECT)$(TARGET_EXT) -C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) -C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) -CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) -CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - -#----------------------------------------------------------------------------- -# rules -# - -all: $(TARGET_EXE) - -$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) - $(CPP) $(CPPFLAGS) $(QPCPP)/include/qstamp.cpp -o $(BIN_DIR)/qstamp.o - $(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS) - -$(BIN_DIR)/%.d : %.c - $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@ - -$(BIN_DIR)/%.d : %.cpp - $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@ - -$(BIN_DIR)/%.o : %.c - $(CC) $(CFLAGS) $< -o $@ - -$(BIN_DIR)/%.o : %.cpp - $(CPP) $(CPPFLAGS) $< -o $@ - -.PHONY : clean show - -# include dependency files only if our goal depends on their existence -ifneq ($(MAKECMDGOALS),clean) - ifneq ($(MAKECMDGOALS),show) --include $(C_DEPS_EXT) $(CPP_DEPS_EXT) - endif -endif - -.PHONY : clean show - -clean : - -$(RM) $(BIN_DIR)/*.o \ - $(BIN_DIR)/*.d \ - $(TARGET_EXE) - -show : - @echo PROJECT = $(PROJECT) - @echo TARGET_EXE = $(TARGET_EXE) - @echo VPATH = $(VPATH) - @echo C_SRCS = $(C_SRCS) - @echo CPP_SRCS = $(CPP_SRCS) - @echo C_DEPS_EXT = $(C_DEPS_EXT) - @echo C_OBJS_EXT = $(C_OBJS_EXT) - @echo C_DEPS_EXT = $(C_DEPS_EXT) - @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) - @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) - @echo LIB_DIRS = $(LIB_DIRS) - @echo LIBS = $(LIBS) - @echo DEFINES = $(DEFINES) - diff --git a/examples/workstation/dpp/Makefile b/examples/workstation/dpp/Makefile index b7a1e7d0..297ede9b 100644 --- a/examples/workstation/dpp/Makefile +++ b/examples/workstation/dpp/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -92,30 +92,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -138,6 +116,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -153,7 +152,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -185,7 +184,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -200,7 +199,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -212,7 +211,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -235,15 +234,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -262,17 +258,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/dpp/Makefile_t b/examples/workstation/dpp/Makefile_t index 07842345..15f50488 100644 --- a/examples/workstation/dpp/Makefile_t +++ b/examples/workstation/dpp/Makefile_t @@ -1,13 +1,13 @@ ############################################################################## -# Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* (threaded ports) -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -92,30 +92,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -#QP_PORT_DIR := $(QPCPP)/ports/win32-qv -QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -#QP_PORT_DIR := $(QPCPP)/ports/posix-qv -QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -138,6 +116,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +#QP_PORT_DIR := $(QPCPP)/ports/win32-qv +QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +#QP_PORT_DIR := $(QPCPP)/ports/posix-qv +QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -146,14 +145,14 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPCPP)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPCPP)/include -I$(QPCPP)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -185,7 +184,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -200,7 +199,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -212,7 +211,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -235,15 +234,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -262,17 +258,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/dpp/dpp.vcxproj b/examples/workstation/dpp/dpp.vcxproj index 4569587f..98afbaed 100644 --- a/examples/workstation/dpp/dpp.vcxproj +++ b/examples/workstation/dpp/dpp.vcxproj @@ -151,8 +151,8 @@ Default - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) true Console MachineX86 @@ -205,8 +205,8 @@ 4127 - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) true Console true @@ -262,8 +262,8 @@ 4127 - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + ws2_32.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) true Console MachineX86 @@ -313,8 +313,8 @@ 4127 - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + ws2_32.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) true Console MachineX64 @@ -349,16 +349,83 @@ - + + + true + + + + + true + + + + + + + + + + + + + + + true + + + + + true + + + true + + + + + true + + + true + + + + + true + + + true + + + + + true + + + true + + + + + true + + + + + + + + diff --git a/examples/workstation/dpp/dpp.vcxproj.filters b/examples/workstation/dpp/dpp.vcxproj.filters index 165425ef..1d6dfdf9 100644 --- a/examples/workstation/dpp/dpp.vcxproj.filters +++ b/examples/workstation/dpp/dpp.vcxproj.filters @@ -5,10 +5,94 @@ - + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QS + + + QS + + + QS + + + QS + + + QS + + + QP_port + + + QP_port + + + QP_port + + + QP_port + + + QP_port + + + QP_port + + + + + {132373cd-4fbf-4759-b90b-33d062646870} + + + {3782d84c-89fd-4955-b3bb-1a48d8ed5e1e} + + + {63c2ea15-0007-4619-903e-97d5e7a963d6} + + + + + QP_port + \ No newline at end of file diff --git a/examples/workstation/history_qhsm/Makefile b/examples/workstation/history_qhsm/Makefile index 806a0f5e..a50b89b2 100644 --- a/examples/workstation/history_qhsm/Makefile +++ b/examples/workstation/history_qhsm/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -90,30 +90,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -136,6 +114,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -151,7 +150,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -183,7 +182,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -198,7 +197,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -210,7 +209,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -233,15 +232,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -260,17 +256,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/history_qmsm/Makefile b/examples/workstation/history_qmsm/Makefile index d2d22476..4798aad5 100644 --- a/examples/workstation/history_qmsm/Makefile +++ b/examples/workstation/history_qmsm/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -90,30 +90,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -136,6 +114,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -151,7 +150,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -183,7 +182,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -198,7 +197,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -210,7 +209,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -233,15 +232,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -260,17 +256,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/history_qmsm/history.cpp b/examples/workstation/history_qmsm/history.cpp index ca1adb17..9c49512d 100644 --- a/examples/workstation/history_qmsm/history.cpp +++ b/examples/workstation/history_qmsm/history.cpp @@ -3,19 +3,12 @@ // Model: history.qm // File: ${.::history.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // diff --git a/examples/workstation/history_qmsm/history.hpp b/examples/workstation/history_qmsm/history.hpp index 375455a9..ce8106a4 100644 --- a/examples/workstation/history_qmsm/history.hpp +++ b/examples/workstation/history_qmsm/history.hpp @@ -3,19 +3,12 @@ // Model: history.qm // File: ${.::history.hpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // @@ -49,4 +42,4 @@ enum ToastOvenSignals { extern QP::QMsm * const the_oven; // opaque pointer to the oven MSM -#endif // HISTORY_HPP \ No newline at end of file +#endif // HISTORY_HPP diff --git a/examples/workstation/history_qmsm/history.qm b/examples/workstation/history_qmsm/history.qm index 1ae2758d..da14b057 100644 --- a/examples/workstation/history_qmsm/history.qm +++ b/examples/workstation/history_qmsm/history.qm @@ -1,8 +1,8 @@ - + Transition to history in a subclass of QP::QMsm - + diff --git a/examples/workstation/qhsmtst/Makefile b/examples/workstation/qhsmtst/Makefile index 212a4f98..096aecf2 100644 --- a/examples/workstation/qhsmtst/Makefile +++ b/examples/workstation/qhsmtst/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -90,30 +90,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -136,6 +114,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -151,7 +150,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -183,7 +182,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -198,7 +197,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -210,7 +209,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -233,15 +232,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -260,17 +256,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/qhsmtst/qhsmtst.filters b/examples/workstation/qhsmtst/qhsmtst.filters deleted file mode 100644 index 165425ef..00000000 --- a/examples/workstation/qhsmtst/qhsmtst.filters +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/workstation/qhsmtst/qhsmtst.sln b/examples/workstation/qhsmtst/qhsmtst.sln deleted file mode 100644 index ca6f0a70..00000000 --- a/examples/workstation/qhsmtst/qhsmtst.sln +++ /dev/null @@ -1,42 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qhsmtst", "qhsmtst.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - QSpy|Win32 = QSpy|Win32 - QSpy|x64 = QSpy|x64 - QSpy64|Win32 = QSpy64|Win32 - QSpy64|x64 = QSpy64|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|x64.ActiveCfg = Debug|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|x64.Build.0 = Debug|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.Build.0 = QSpy|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|x64.ActiveCfg = QSpy|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|x64.Build.0 = QSpy|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|Win32.ActiveCfg = QSpy64|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|Win32.Build.0 = QSpy64|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|x64.ActiveCfg = QSpy64|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|x64.Build.0 = QSpy64|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.ActiveCfg = Release|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.Build.0 = Release|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|x64.ActiveCfg = Release|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {435A4978-E6C4-4DB5-997D-40C45B465DD2} - EndGlobalSection -EndGlobal diff --git a/examples/workstation/qhsmtst/qhsmtst.vcxproj b/examples/workstation/qhsmtst/qhsmtst.vcxproj deleted file mode 100644 index f27d6c94..00000000 --- a/examples/workstation/qhsmtst/qhsmtst.vcxproj +++ /dev/null @@ -1,370 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - QSpy64 - Win32 - - - QSpy64 - x64 - - - QSpy - x64 - - - Release - Win32 - - - QSpy - Win32 - - - Release - x64 - - - - {8CC465F7-872E-4D03-B93C-1B64858B4E11} - qhsmtst - Win32Proj - 10.0 - - - - Application - NotSet - v142 - - - Application - NotSet - v142 - - - Application - NotSet - v142 - - - Application - NotSet - v142 - - - Application - NotSet - true - v142 - - - Application - NotSet - true - v142 - - - Application - NotSet - v142 - - - Application - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - QSpy64\ - $(Configuration)\ - QSpy64\ - true - true - true - true - - - QSpy64\ - QSpy64\ - - - - Disabled - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - Default - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - true - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - Default - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - MaxSpeed - true - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - true - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - true - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - MaxSpeed - true - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - true - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - true - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - true - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX64 - true - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/workstation/qmsmtst/Makefile b/examples/workstation/qmsmtst/Makefile index e28ae0fc..8ca6a1fb 100644 --- a/examples/workstation/qmsmtst/Makefile +++ b/examples/workstation/qmsmtst/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -90,30 +90,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -136,6 +114,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -151,7 +150,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -183,7 +182,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -198,7 +197,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -210,7 +209,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -233,15 +232,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -260,17 +256,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/qmsmtst/log.txt b/examples/workstation/qmsmtst/log.txt index 3465f59e..1fe12b7f 100644 --- a/examples/workstation/qmsmtst/log.txt +++ b/examples/workstation/qmsmtst/log.txt @@ -1,4 +1,4 @@ -QMsmTst example, QEP 7.0.1 +QMsmTst example, QEP 7.1.3 top-INIT;s-ENTRY;s2-ENTRY;s2-INIT;s21-ENTRY;s211-ENTRY; A:s21-A;s211-EXIT;s21-EXIT;s21-ENTRY;s21-INIT;s211-ENTRY; B:s21-B;s211-EXIT;s211-ENTRY; diff --git a/examples/workstation/qmsmtst/qmsmtst.cpp b/examples/workstation/qmsmtst/qmsmtst.cpp index 448a02fe..9708a340 100644 --- a/examples/workstation/qmsmtst/qmsmtst.cpp +++ b/examples/workstation/qmsmtst/qmsmtst.cpp @@ -3,19 +3,12 @@ // Model: qmsmtst.qm // File: ${.::qmsmtst.cpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // @@ -725,3 +718,4 @@ QM_STATE_DEF(QMsmTst, s211) { return status_; } //$enddef${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + diff --git a/examples/workstation/qmsmtst/qmsmtst.hpp b/examples/workstation/qmsmtst/qmsmtst.hpp index 72a44c6a..06c39e1a 100644 --- a/examples/workstation/qmsmtst/qmsmtst.hpp +++ b/examples/workstation/qmsmtst/qmsmtst.hpp @@ -3,19 +3,12 @@ // Model: qmsmtst.qm // File: ${.::qmsmtst.hpp} // -// This code has been generated by QM 5.2.0 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // -// This code is covered by the following QP license: -// License # : QM-EVAL-QPCPP -// Issued to : Users of QP/C++ Real-Time Embedded Framework (RTEF) -// Framework(s) : qpcpp -// Support ends : 2023-12-31 -// License scope: -// // SPDX-License-Identifier: GPL-3.0-or-later // -// This generated code is free software: you can redistribute it under +// This generated code is open source software: you can redistribute it under // the terms of the GNU General Public License as published by the Free // Software Foundation. // @@ -60,3 +53,4 @@ void BSP_display(char const *msg); void BSP_terminate(int16_t const result); #endif // QMSMTST_HPP + diff --git a/examples/workstation/qmsmtst/qmsmtst.qm b/examples/workstation/qmsmtst/qmsmtst.qm index 8830dca4..428a4aff 100644 --- a/examples/workstation/qmsmtst/qmsmtst.qm +++ b/examples/workstation/qmsmtst/qmsmtst.qm @@ -1,8 +1,8 @@ - + QMsmTst is a test for the QMsm state machine implementation strategy based on the state machine design from Chapter 2 of the PSiCC2 book. - + diff --git a/examples/workstation/reminder/Makefile b/examples/workstation/reminder/Makefile index 430da614..de66d9b1 100644 --- a/examples/workstation/reminder/Makefile +++ b/examples/workstation/reminder/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -90,30 +90,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -136,6 +114,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -151,7 +150,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -183,7 +182,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -198,7 +197,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -210,7 +209,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -233,15 +232,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -260,17 +256,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/workstation/reminder2/Makefile b/examples/workstation/reminder2/Makefile index f2e36a2b..c4a98d0f 100644 --- a/examples/workstation/reminder2/Makefile +++ b/examples/workstation/reminder2/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ for Windows and POSIX *HOSTS* -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last updated for version 7.1.3 +# Last updated on 2022-11-13 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. # # This program is open source software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published @@ -90,30 +90,8 @@ ifeq (,$(CONF)) endif #----------------------------------------------------------------------------- -# add QP/C++ framework (depends on the OS this Makefile runs on): +# add QP/C++ framework: # -ifeq ($(OS),Windows_NT) - -# NOTE: -# For Windows hosts, you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/win32-qv -#QP_PORT_DIR := $(QPCPP)/ports/win32 -LIB_DIRS += -L$(QP_PORT_DIR)/$(CONF) -LIBS += -lqp -lws2_32 - -else - -# NOTE: -# For POSIX hosts (Linux, MacOS), you can choose: -# - the single-threaded QP/C++ port (win32-qv) or -# - the multithreaded QP/C++ port (win32). -# -QP_PORT_DIR := $(QPCPP)/ports/posix-qv -#QP_PORT_DIR := $(QPCPP)/ports/posix - CPP_SRCS += \ qep_hsm.cpp \ qep_msm.cpp \ @@ -136,6 +114,27 @@ QS_SRCS := \ qs_fp.cpp \ qs_port.cpp +ifeq ($(OS),Windows_NT) + +# NOTE: +# For Windows hosts, you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/win32-qv +#QP_PORT_DIR := $(QPCPP)/ports/win32 +LIBS += -lws2_32 + +else + +# NOTE: +# For POSIX hosts (Linux, MacOS), you can choose: +# - the single-threaded QP/C++ port (win32-qv) or +# - the multithreaded QP/C++ port (win32). +# +QP_PORT_DIR := $(QPCPP)/ports/posix-qv +#QP_PORT_DIR := $(QPCPP)/ports/posix + LIBS += -lpthread endif @@ -151,7 +150,7 @@ INCLUDES += -I$(QPCPP)/include -I$(QP_PORT_DIR) # # NOTE: # GNU toolset (MinGW) is included in the QTools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/QTools/ +# https://www.state-machine.com/qtools # It is assumed that %QTOOLS%\bin directory is added to the PATH # CC := gcc @@ -183,7 +182,7 @@ ifeq (rel, $(CONF)) # Release configuration .................................. BIN_DIR := build_rel # gcc options: -CFLAGS = -c -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -O3 -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -198,7 +197,7 @@ CPP_SRCS += $(QS_SRCS) VPATH += $(QPCPP)/src/qs # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) -DQ_SPY CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -210,7 +209,7 @@ else # default Debug configuration ......................................... BIN_DIR := build # gcc options: -CFLAGS = -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ +CFLAGS = -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ $(INCLUDES) $(DEFINES) CPPFLAGS = -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ @@ -233,15 +232,12 @@ C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - #----------------------------------------------------------------------------- # rules # +.PHONY: clean show + all: $(TARGET_EXE) $(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) @@ -260,17 +256,18 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ -.PHONY : clean show - -# include dependency files only if our goal depends on their existence +# create BIN_DIR and include dependencies only if needed ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif -include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif endif endif -.PHONY : clean show - clean : -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/include/qep.hpp b/include/qep.hpp index 26ed24c2..0218037a 100644 --- a/include/qep.hpp +++ b/include/qep.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qep.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -63,8 +63,8 @@ // #define QP_VERSION_STR "7.1.3" -//! Encrypted current QP release (7.1.3) and date (2022-11-11) -#define QP_RELEASE 0x7C3520C6U +//! Encrypted current QP release (7.1.3) and date (2022-11-18) +#define QP_RELEASE 0x7C340F56U //============================================================================ // Global namespace... @@ -327,10 +327,11 @@ public: //! Reserved signals by the HSM-style state machine //! implementation strategy. - enum ReservedHsmSignals : QSignal { - Q_ENTRY_SIG = 1U, //!< signal for entry actions - Q_EXIT_SIG, //!< signal for exit actions - Q_INIT_SIG //!< signal for nested initial transitions + enum ReservedSig : QSignal { + Q_EMPTY_SIG, //!< signal to execute the default case + Q_ENTRY_SIG, //!< signal for entry actions + Q_EXIT_SIG, //!< signal for exit actions + Q_INIT_SIG //!< signal for nested initial transitions }; //! All possible return values from state-handlers @@ -602,12 +603,12 @@ protected: private: //! @details - //! helper function to execute transition sequence in a hierarchical state - //! machine (HSM). + //! helper function to execute transition sequence in a hierarchical + //! state machine (HSM). //! //! @param[in,out] path array of pointers to state-handler functions //! to execute the entry actions - //! @param[in] qs_id QS-id of this state machine (for QS local filter) + //! @param[in] qs_id QS-id of this state machine (for QS local filter) //! //! @returns //! the depth of the entry path stored in the `path` parameter. diff --git a/include/qequeue.hpp b/include/qequeue.hpp index aa6088c6..8049dc4d 100644 --- a/include/qequeue.hpp +++ b/include/qequeue.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qequeue.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qf.hpp b/include/qf.hpp index 55a667c6..20967931 100644 --- a/include/qf.hpp +++ b/include/qf.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qf.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qf_pkg.hpp b/include/qf_pkg.hpp index 72589927..c0062bbe 100644 --- a/include/qf_pkg.hpp +++ b/include/qf_pkg.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qf_pkg.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -108,23 +108,13 @@ constexpr std::uint8_t TE_TICK_RATE = 0x0FU; // bitmask // internal helper inline functions -//! return the Pool-ID of an event `e` -inline std::uint8_t QF_EVT_POOL_ID_ (QEvt const * const e) noexcept { - return e->poolId_; -} - -//! return the Reference Conter of an event `e` -inline std::uint8_t QF_EVT_REF_CTR_ (QEvt const * const e) noexcept { - return e->refCtr_; -} - //! increment the refCtr_ of an event `e` -inline void QF_EVT_REF_CTR_INC_(QEvt const * const e) noexcept { +inline void QEvt_refCtr_inc_(QEvt const * const e) noexcept { (QF_CONST_CAST_(QEvt*, e))->refCtr_ = e->refCtr_ + 1U; } //! decrement the refCtr_ of an event `e` -inline void QF_EVT_REF_CTR_DEC_(QEvt const * const e) noexcept { +inline void QEvt_refCtr_dec_(QEvt const * const e) noexcept { (QF_CONST_CAST_(QEvt*, e))->refCtr_ = e->refCtr_ - 1U; } diff --git a/include/qk.hpp b/include/qk.hpp index fa326d10..c55d6b75 100644 --- a/include/qk.hpp +++ b/include/qk.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qk.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qmpool.hpp b/include/qmpool.hpp index b3faff26..0e170186 100644 --- a/include/qmpool.hpp +++ b/include/qmpool.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qmpool.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qpcpp.hpp b/include/qpcpp.hpp index 4ac7831e..0488f24c 100644 --- a/include/qpcpp.hpp +++ b/include/qpcpp.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qpcpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qs.hpp b/include/qs.hpp index 44c35cef..e5c4d472 100644 --- a/include/qs.hpp +++ b/include/qs.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qs.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qs_dummy.hpp b/include/qs_dummy.hpp index c0c53e84..72202514 100644 --- a/include/qs_dummy.hpp +++ b/include/qs_dummy.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qs_dummy.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qs_pkg.hpp b/include/qs_pkg.hpp index d3758921..512f0e0f 100644 --- a/include/qs_pkg.hpp +++ b/include/qs_pkg.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qs_pkg.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qstamp.hpp b/include/qstamp.hpp index 8ccd0752..a61be6f0 100644 --- a/include/qstamp.hpp +++ b/include/qstamp.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qstamp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qv.hpp b/include/qv.hpp index 22403013..69f96cb0 100644 --- a/include/qv.hpp +++ b/include/qv.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qv.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/include/qxk.hpp b/include/qxk.hpp index 8906d04a..9c2e119a 100644 --- a/include/qxk.hpp +++ b/include/qxk.hpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${include::qxk.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/ports/lint-plus/options.lnt b/ports/lint-plus/options.lnt index 012a5891..9feb36e1 100644 --- a/ports/lint-plus/options.lnt +++ b/ports/lint-plus/options.lnt @@ -22,7 +22,7 @@ // // //============================================================================ -//! @date Last updated on: 2022-10-07 +//! @date Last updated on: 2022-11-17 //! @version Last updated for: @ref qpcpp_7_1_3 //! //! @file @@ -78,13 +78,6 @@ qpcpp.lnt // QP/C++ options // QEP ----------------------------------------------------------------------- -// MC++R16-0-4 function-like macro --esym(9026, - QEP_TRIG_, - QEP_ENTER_, - QEP_EXIT_, - QEP_ACT_PTR_INC_) - // implicit conversion of enum 'QP::QHsm::QStateRet' to integral type -esym(641, QP::QHsm::QStateRet) @@ -99,8 +92,6 @@ qpcpp.lnt // QP/C++ options -esym(9026, QF_CRIT_E_, QF_CRIT_X_, - QF_EVT_REF_CTR_INC_, - QF_EVT_REF_CTR_DEC_, QF_CONST_CAST_, QF_CRIT_ENTRY_, QF_CRIT_EXIT_, @@ -147,8 +138,6 @@ qpcpp.lnt // QP/C++ options // M3-R11.8(r) cast drops const qualifier -emacro(9005, - QF_EVT_REF_CTR_INC_, - QF_EVT_REF_CTR_DEC_, QF_EPOOL_PUT_) // M3-D11.5(a) conversion from pointer to void to other pointer type diff --git a/ports/win32-qutest/Makefile b/ports/win32-qutest/Makefile deleted file mode 100644 index 58e73849..00000000 --- a/ports/win32-qutest/Makefile +++ /dev/null @@ -1,191 +0,0 @@ -############################################################################## -# Product: Makefile for QUTEST, QP/C++, Win32, MinGW toolset -# Last updated for version 7.0.1 -# Last updated on 2022-05-23 -# -# Q u a n t u m L e a P s -# ------------------------ -# Modern Embedded Software -# -# Copyright (C) 2005-2019 Quantum Leaps, LLC. All rights reserved. -# -# This program is open source software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Alternatively, this program may be distributed and modified under the -# terms of Quantum Leaps commercial licenses, which expressly supersede -# the GNU General Public License and are specifically designed for -# licensees interested in retaining the proprietary status of their code. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# Contact information: -# https://www.state-machine.com/licensing -# mailto:info@state-machine.com -############################################################################## -# examples of invoking this Makefile: -# make -# -# cleaning -# make clean -# -# NOTE: -# To use this Makefile on Windows, you will need the GNU make utility, which -# is included in the Qtools collection for Windows, see: -# https://sourceforge.net/projects/qpc/files/QTools/ -# - -#----------------------------------------------------------------------------- -# project name: -# -PROJECT := qp - -#----------------------------------------------------------------------------- -# project directories: -# - -# location of the QP/C++ framework -QPCPP := ../.. - -# QP port used in this project -QP_PORT_DIR := . - - -# list of all source directories used by this project -VPATH = \ - $(QPCPP)/src/qf \ - $(QPCPP)/src/qs \ - $(QP_PORT_DIR) - -# list of all include directories needed by this project -INCLUDES = \ - -I$(QPCPP)/include \ - -I$(QP_PORT_DIR) - -#----------------------------------------------------------------------------- -# files -# - -# C source files -C_SRCS := - -# C++ source files -CPP_SRCS := \ - qep_hsm.cpp \ - qep_msm.cpp \ - qf_act.cpp \ - qf_actq.cpp \ - qf_defer.cpp \ - qf_dyn.cpp \ - qf_mem.cpp \ - qf_ps.cpp \ - qf_qact.cpp \ - qf_qeq.cpp \ - qf_qmact.cpp \ - qf_time.cpp \ - qs.cpp \ - qs_64bit.cpp \ - qs_rx.cpp \ - qs_fp.cpp \ - qutest.cpp \ - qutest_port.cpp - -# defines: -DEFINES := -DQ_SPY -DQ_UTEST -DQ_HOST - -#----------------------------------------------------------------------------- -# MinGW toolset (NOTE: assumed to be on your PATH) -# -# NOTE: -# MinGW toolset is included in the Qtools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/Qtools/ - -CC := gcc -CPP := g++ -LIB := ar - - -############################################################################## -# Typically, you should not need to change anything below this line - -# basic utilities (included in Qtools for Windows), see: -# http://sourceforge.net/projects/qpc/files/Qtools - -MKDIR := mkdir -RM := rm - -#----------------------------------------------------------------------------- -# build options: -# - -LIBFLAGS := rs - -BIN_DIR = mingw - -# gcc options: -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) - -CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) - -#----------------------------------------------------------------------------- -C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS))) -CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS))) - -TARGET_LIB := $(BIN_DIR)/lib$(PROJECT).a -C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) -C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) -CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) -CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - -#----------------------------------------------------------------------------- -# rules -# - -all: $(TARGET_LIB) - -$(RM) $(BIN_DIR)/*.o - -$(TARGET_LIB) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) - $(LIB) $(LIBFLAGS) $@ $^ - -$(BIN_DIR)/%.o : %.c - $(CC) $(CFLAGS) $< -o $@ - -$(BIN_DIR)/%.o : %.cpp - $(CPP) $(CPPFLAGS) $< -o $@ - -#----------------------------------------------------------------------------- -# the clean target -# -.PHONY : clean -clean: - -$(RM) $(BIN_DIR)/*.o $(TARGET_LIB) - -#----------------------------------------------------------------------------- -# the show target for debugging -# -show: - @echo PROJECT = $(PROJECT) - @echo CONF = $(CONF) - @echo TARGET_LIB = $(TARGET_LIB) - @echo C_SRCS = $(C_SRCS) - @echo CPP_SRCS = $(CPP_SRCS) - @echo C_OBJS_EXT = $(C_OBJS_EXT) - @echo C_DEPS_EXT = $(C_DEPS_EXT) - @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) - @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) diff --git a/ports/win32-qutest/qp.sln b/ports/win32-qutest/qp.sln deleted file mode 100644 index 9c374166..00000000 --- a/ports/win32-qutest/qp.sln +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qp", "qp.vcxproj", "{3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - vc64|Win32 = vc64|Win32 - vc64|x64 = vc64|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.ActiveCfg = vc|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.Build.0 = vc|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.ActiveCfg = vc|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.Build.0 = vc|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|Win32.ActiveCfg = vc64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|Win32.Build.0 = vc64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|x64.ActiveCfg = vc64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|x64.Build.0 = vc64|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7F90CAF0-10D4-4A86-96E4-586D343FC2C8} - EndGlobalSection -EndGlobal diff --git a/ports/win32-qutest/qp.vcxproj b/ports/win32-qutest/qp.vcxproj deleted file mode 100644 index 09ae4258..00000000 --- a/ports/win32-qutest/qp.vcxproj +++ /dev/null @@ -1,209 +0,0 @@ - - - - - vc64 - Win32 - - - vc64 - x64 - - - vc - Win32 - - - vc - x64 - - - - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9} - qp - ManagedCProj - 10.0 - - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - false - false - - - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - true - true - - - true - true - - - true - true - - - - - true - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ports/win32-qutest/qp.vcxproj.filters b/ports/win32-qutest/qp.vcxproj.filters deleted file mode 100644 index b3e64c4d..00000000 --- a/ports/win32-qutest/qp.vcxproj.filters +++ /dev/null @@ -1,79 +0,0 @@ - - - - - {553ace6f-efbf-49d9-be33-15209894492c} - - - {f23cedd0-0f13-4d39-b4f1-77eaa32e87fd} - - - {83db361d-b95e-42e4-aec7-b7a40473cacb} - - - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QS - - - QS - - - QS - - - QS - - - QS - - - QP_port - - - QP - - - - - - QP_port - - - QP_port - - - QP_port - - - \ No newline at end of file diff --git a/ports/win32-qv/Makefile b/ports/win32-qv/Makefile deleted file mode 100644 index 4237a921..00000000 --- a/ports/win32-qv/Makefile +++ /dev/null @@ -1,231 +0,0 @@ -############################################################################## -# Product: Makefile for QP/C++ port to Win32-QV, MinGW toolset -# Last updated for version 7.0.1 -# Last updated on 2022-05-23 -# -# Q u a n t u m L e a P s -# ------------------------ -# Modern Embedded Software -# -# Copyright (C) 2005-2019 Quantum Leaps, LLC. All rights reserved. -# -# This program is open source software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Alternatively, this program may be distributed and modified under the -# terms of Quantum Leaps commercial licenses, which expressly supersede -# the GNU General Public License and are specifically designed for -# licensees interested in retaining the proprietary status of their code. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# Contact information: -# https://www.state-machine.com/licensing -# mailto:info@state-machine.com -############################################################################## -# examples of invoking this Makefile: -# building configurations: Debug (default), Release and Spy -# make -# make CONF=rel -# make CONF=spy -# -# cleaning configurations: Debug (default), Release, and Spy -# make clean -# make CONF=rel clean -# make CONF=spy clean -# -# NOTE: -# To use this Makefile on Windows, you will need the GNU make utility, which -# is included in the Qtools collection for Windows, see: -# https://sourceforge.net/projects/qpc/files/QTools/ -# - -#----------------------------------------------------------------------------- -# project name: -# -PROJECT := qp - -#----------------------------------------------------------------------------- -# project directories: -# - -# location of the QP/C++ framework -QPCPP := ../.. - -# QP port used in this project -QP_PORT_DIR := . - - -# list of all source directories used by this project -VPATH = \ - $(QPCPP)/src/qf \ - $(QPCPP)/src/qs \ - $(QP_PORT_DIR) - -# list of all include directories needed by this project -INCLUDES = \ - -I$(QPCPP)/include \ - -I$(QP_PORT_DIR) - -#----------------------------------------------------------------------------- -# files -# - -# C source files -C_SRCS := \ - qwin_gui.c - -# C++ source files -CPP_SRCS := \ - qep_hsm.cpp \ - qep_msm.cpp \ - qf_act.cpp \ - qf_actq.cpp \ - qf_defer.cpp \ - qf_dyn.cpp \ - qf_mem.cpp \ - qf_ps.cpp \ - qf_qact.cpp \ - qf_qeq.cpp \ - qf_qmact.cpp \ - qf_time.cpp \ - qf_port.cpp - -# C++ QS source files -CPP_QS_SRCS := \ - qs.cpp \ - qs_rx.cpp \ - qs_fp.cpp \ - qs_64bit.cpp \ - qs_port.cpp - -# defines: -DEFINES := -DQWIN_GUI - -#----------------------------------------------------------------------------- -# MinGW toolset (NOTE: assumed to be on your PATH) -# -# NOTE: -# MinGW toolset is included in the Qtools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/Qtools/ - -CC := gcc -CPP := g++ -LIB := ar - - -############################################################################## -# Typically, you should not need to change anything below this line - -# basic utilities (included in Qtools for Windows), see: -# http://sourceforge.net/projects/qpc/files/Qtools - -MKDIR := mkdir -RM := rm - -#----------------------------------------------------------------------------- -# build options for various configurations -# - -LIBFLAGS := rs - -ifeq (rel, $(CONF)) # Release configuration ................................. - -BIN_DIR := rel - -# gcc options: -CFLAGS := -c -g -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) - -CPPFLAGS := -c -g -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) - -else ifeq (spy, $(CONF)) # Spy configuration ................................ - -BIN_DIR := spy - -# add the QS sources... -CPP_SRCS += $(CPP_QS_SRCS) - -# gcc options: -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) -DQ_SPY - -CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) -DQ_SPY - -else # default Debug configuration ......................................... - -BIN_DIR := dbg - -# gcc options: -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) - -CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) - -endif - -#----------------------------------------------------------------------------- -C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS))) -CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS))) - -TARGET_LIB := $(BIN_DIR)/lib$(PROJECT).a -C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) -C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) -CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) -CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - -#----------------------------------------------------------------------------- -# rules -# - -all: $(TARGET_LIB) - -$(RM) $(BIN_DIR)/*.o - -$(TARGET_LIB) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) - $(LIB) $(LIBFLAGS) $@ $^ - -$(BIN_DIR)/%.o : %.c - $(CC) $(CFLAGS) $< -o $@ - -$(BIN_DIR)/%.o : %.cpp - $(CPP) $(CPPFLAGS) $< -o $@ - -#----------------------------------------------------------------------------- -# the clean target -# -.PHONY : clean -clean: - -$(RM) $(BIN_DIR)/*.o $(TARGET_LIB) - -#----------------------------------------------------------------------------- -# the show target for debugging -# -show: - @echo PROJECT = $(PROJECT) - @echo CONF = $(CONF) - @echo TARGET_LIB = $(TARGET_LIB) - @echo C_SRCS = $(C_SRCS) - @echo CPP_SRCS = $(CPP_SRCS) - @echo C_OBJS_EXT = $(C_OBJS_EXT) - @echo C_DEPS_EXT = $(C_DEPS_EXT) - @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) - @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) diff --git a/ports/win32-qv/qp.sln b/ports/win32-qv/qp.sln deleted file mode 100644 index 30e73142..00000000 --- a/ports/win32-qv/qp.sln +++ /dev/null @@ -1,42 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qp", "qp.vcxproj", "{3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - QSpy|Win32 = QSpy|Win32 - QSpy|x64 = QSpy|x64 - QSpy64|Win32 = QSpy64|Win32 - QSpy64|x64 = QSpy64|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.Build.0 = Debug|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.ActiveCfg = Debug|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.Build.0 = Debug|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.Build.0 = QSpy|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.ActiveCfg = QSpy|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.Build.0 = QSpy|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.ActiveCfg = QSpy64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.Build.0 = QSpy64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.ActiveCfg = QSpy64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.Build.0 = QSpy64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.ActiveCfg = Release|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.Build.0 = Release|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.ActiveCfg = Release|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {A248BBC1-DE1F-4F97-A6BA-D6A8D9D8DC1E} - EndGlobalSection -EndGlobal diff --git a/ports/win32-qv/qp.vcxproj b/ports/win32-qv/qp.vcxproj deleted file mode 100644 index 81eb7f7e..00000000 --- a/ports/win32-qv/qp.vcxproj +++ /dev/null @@ -1,384 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - QSpy64 - Win32 - - - QSpy64 - x64 - - - QSpy - x64 - - - Release - Win32 - - - QSpy - Win32 - - - Release - x64 - - - - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9} - qp - ManagedCProj - 10.0 - - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - true - v142 - - - StaticLibrary - NotSet - false - true - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - QSpy64\ - $(Configuration)\ - QSpy64\ - false - false - false - false - - - QSpy64\ - QSpy64\ - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Full - .;../../include;%(AdditionalIncludeDirectories) - QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - - - Default - 4127;%(DisableSpecificWarnings) - false - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Full - .;../../include;%(AdditionalIncludeDirectories) - QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - - - Default - 4127;%(DisableSpecificWarnings) - false - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - true - true - - - true - true - - - true - true - - - - - true - true - true - true - - - - - - - - - - - - - - - - - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - - true - true - true - true - - - - - - - - - - - - - diff --git a/ports/win32-qv/qp.vcxproj.filters b/ports/win32-qv/qp.vcxproj.filters deleted file mode 100644 index 7b5c77e3..00000000 --- a/ports/win32-qv/qp.vcxproj.filters +++ /dev/null @@ -1,93 +0,0 @@ - - - - - {56273036-d67c-489b-bc4b-84d286c6a000} - - - {553ace6f-efbf-49d9-be33-15209894492c} - - - {f23cedd0-0f13-4d39-b4f1-77eaa32e87fd} - - - {a9d19e53-4919-44a0-b925-5b00e2189525} - - - - - QP_port - - - QWIN-GUI - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QS - - - QS - - - QS - - - QS - - - QS - - - QP_port - - - - - QWIN-GUI - - - QP_port - - - QP_port - - - QP_port - - - \ No newline at end of file diff --git a/ports/win32/Makefile b/ports/win32/Makefile deleted file mode 100644 index 84dd56cd..00000000 --- a/ports/win32/Makefile +++ /dev/null @@ -1,231 +0,0 @@ -############################################################################## -# Product: Makefile for QP/C++ port to Win32, MinGW toolset -# Last updated for version 7.0.1 -# Last updated on 2022-05-23 -# -# Q u a n t u m L e a P s -# ------------------------ -# Modern Embedded Software -# -# Copyright (C) 2005-2019 Quantum Leaps, LLC. All rights reserved. -# -# This program is open source software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Alternatively, this program may be distributed and modified under the -# terms of Quantum Leaps commercial licenses, which expressly supersede -# the GNU General Public License and are specifically designed for -# licensees interested in retaining the proprietary status of their code. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# Contact information: -# https://www.state-machine.com/licensing -# mailto:info@state-machine.com -############################################################################## -# examples of invoking this Makefile: -# building configurations: Debug (default), Release and Spy -# make -# make CONF=rel -# make CONF=spy -# -# cleaning configurations: Debug (default), Release, and Spy -# make clean -# make CONF=rel clean -# make CONF=spy clean -# -# NOTE: -# To use this Makefile on Windows, you will need the GNU make utility, which -# is included in the Qtools collection for Windows, see: -# https://sourceforge.net/projects/qpc/files/QTools/ -# - -#----------------------------------------------------------------------------- -# project name: -# -PROJECT := qp - -#----------------------------------------------------------------------------- -# project directories: -# - -# location of the QP/C++ framework -QPCPP := ../.. - -# QP port used in this project -QP_PORT_DIR := . - - -# list of all source directories used by this project -VPATH = \ - $(QPCPP)/src/qf \ - $(QPCPP)/src/qs \ - $(QP_PORT_DIR) - -# list of all include directories needed by this project -INCLUDES = \ - -I$(QPCPP)/include \ - -I$(QP_PORT_DIR) - -#----------------------------------------------------------------------------- -# files -# - -# C source files -C_SRCS := \ - qwin_gui.c - -# C++ source files -CPP_SRCS := \ - qep_hsm.cpp \ - qep_msm.cpp \ - qf_act.cpp \ - qf_actq.cpp \ - qf_defer.cpp \ - qf_dyn.cpp \ - qf_mem.cpp \ - qf_ps.cpp \ - qf_qact.cpp \ - qf_qeq.cpp \ - qf_qmact.cpp \ - qf_time.cpp \ - qf_port.cpp - -# C++ QS source files -CPP_QS_SRCS := \ - qs.cpp \ - qs_rx.cpp \ - qs_fp.cpp \ - qs_64bit.cpp \ - qs_port.cpp - -# defines: -DEFINES := -DQWIN_GUI - -#----------------------------------------------------------------------------- -# MinGW toolset (NOTE: assumed to be on your PATH) -# -# NOTE: -# MinGW toolset is included in the Qtools collection for Windows, see: -# http://sourceforge.net/projects/qpc/files/Qtools/ - -CC := gcc -CPP := g++ -LIB := ar - - -############################################################################## -# Typically, you should not need to change anything below this line - -# basic utilities (included in Qtools for Windows), see: -# http://sourceforge.net/projects/qpc/files/Qtools - -MKDIR := mkdir -RM := rm - -#----------------------------------------------------------------------------- -# build options for various configurations -# - -LIBFLAGS := rs - -ifeq (rel, $(CONF)) # Release configuration ................................. - -BIN_DIR := rel - -# gcc options: -CFLAGS := -c -g -O3 -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) - -CPPFLAGS := -c -g -O3 -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) - -else ifeq (spy, $(CONF)) # Spy configuration ................................ - -BIN_DIR := spy - -# add the QS sources... -CPP_SRCS += $(CPP_QS_SRCS) - -# gcc options: -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) -DQ_SPY - -CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) -DQ_SPY - -else # default Debug configuration ......................................... - -BIN_DIR := dbg - -# gcc options: -CFLAGS := -c -g -O -fno-pie -std=c99 -pedantic -Wall -Wextra -W \ - $(INCLUDES) $(DEFINES) - -CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ - -fno-rtti -fno-exceptions \ - $(INCLUDES) $(DEFINES) - -endif - -#----------------------------------------------------------------------------- -C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS))) -CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS))) - -TARGET_LIB := $(BIN_DIR)/lib$(PROJECT).a -C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) -C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) -CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) -CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) - -# create $(BIN_DIR) if it does not exist -ifeq ("$(wildcard $(BIN_DIR))","") -$(shell $(MKDIR) $(BIN_DIR)) -endif - -#----------------------------------------------------------------------------- -# rules -# - -all: $(TARGET_LIB) - -$(RM) $(BIN_DIR)/*.o - -$(TARGET_LIB) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) - $(LIB) $(LIBFLAGS) $@ $^ - -$(BIN_DIR)/%.o : %.c - $(CC) $(CFLAGS) $< -o $@ - -$(BIN_DIR)/%.o : %.cpp - $(CPP) $(CPPFLAGS) $< -o $@ - -#----------------------------------------------------------------------------- -# the clean target -# -.PHONY : clean -clean: - -$(RM) $(BIN_DIR)/*.o $(TARGET_LIB) - -#----------------------------------------------------------------------------- -# the show target for debugging -# -show: - @echo PROJECT = $(PROJECT) - @echo CONF = $(CONF) - @echo TARGET_LIB = $(TARGET_LIB) - @echo C_SRCS = $(C_SRCS) - @echo CPP_SRCS = $(CPP_SRCS) - @echo C_OBJS_EXT = $(C_OBJS_EXT) - @echo C_DEPS_EXT = $(C_DEPS_EXT) - @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) - @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) diff --git a/ports/win32/qp.sln b/ports/win32/qp.sln deleted file mode 100644 index 30e73142..00000000 --- a/ports/win32/qp.sln +++ /dev/null @@ -1,42 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qp", "qp.vcxproj", "{3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - QSpy|Win32 = QSpy|Win32 - QSpy|x64 = QSpy|x64 - QSpy64|Win32 = QSpy64|Win32 - QSpy64|x64 = QSpy64|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.Build.0 = Debug|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.ActiveCfg = Debug|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.Build.0 = Debug|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.Build.0 = QSpy|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.ActiveCfg = QSpy|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.Build.0 = QSpy|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.ActiveCfg = QSpy64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.Build.0 = QSpy64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.ActiveCfg = QSpy64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.Build.0 = QSpy64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.ActiveCfg = Release|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.Build.0 = Release|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.ActiveCfg = Release|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {A248BBC1-DE1F-4F97-A6BA-D6A8D9D8DC1E} - EndGlobalSection -EndGlobal diff --git a/ports/win32/qp.vcxproj b/ports/win32/qp.vcxproj deleted file mode 100644 index 81eb7f7e..00000000 --- a/ports/win32/qp.vcxproj +++ /dev/null @@ -1,384 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - QSpy64 - Win32 - - - QSpy64 - x64 - - - QSpy - x64 - - - Release - Win32 - - - QSpy - Win32 - - - Release - x64 - - - - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9} - qp - ManagedCProj - 10.0 - - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - true - v142 - - - StaticLibrary - NotSet - false - true - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - QSpy64\ - $(Configuration)\ - QSpy64\ - false - false - false - false - - - QSpy64\ - QSpy64\ - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Full - .;../../include;%(AdditionalIncludeDirectories) - QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - - - Default - 4127;%(DisableSpecificWarnings) - false - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Full - .;../../include;%(AdditionalIncludeDirectories) - QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - - - Default - 4127;%(DisableSpecificWarnings) - false - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - true - true - - - true - true - - - true - true - - - - - true - true - true - true - - - - - - - - - - - - - - - - - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - - true - true - true - true - - - - - - - - - - - - - diff --git a/ports/win32/qp.vcxproj.filters b/ports/win32/qp.vcxproj.filters deleted file mode 100644 index 7b5c77e3..00000000 --- a/ports/win32/qp.vcxproj.filters +++ /dev/null @@ -1,93 +0,0 @@ - - - - - {56273036-d67c-489b-bc4b-84d286c6a000} - - - {553ace6f-efbf-49d9-be33-15209894492c} - - - {f23cedd0-0f13-4d39-b4f1-77eaa32e87fd} - - - {a9d19e53-4919-44a0-b925-5b00e2189525} - - - - - QP_port - - - QWIN-GUI - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QS - - - QS - - - QS - - - QS - - - QS - - - QP_port - - - - - QWIN-GUI - - - QP_port - - - QP_port - - - QP_port - - - \ No newline at end of file diff --git a/qpcpp.qm b/qpcpp.qm index 27d87691..de16ff5d 100644 --- a/qpcpp.qm +++ b/qpcpp.qm @@ -1,5 +1,5 @@ - + QP/C++ Real-Time Embedded Framework (RTEF) The model is used to generate the whole QP/C++ source code. @@ -497,14 +497,15 @@ Contact information: - - + + //! Reserved signals by the HSM-style state machine //! implementation strategy. : QSignal { - Q_ENTRY_SIG = 1U, //!< signal for entry actions - Q_EXIT_SIG, //!< signal for exit actions - Q_INIT_SIG //!< signal for nested initial transitions + Q_EMPTY_SIG, //!< signal to execute the default case + Q_ENTRY_SIG, //!< signal for entry actions + Q_EXIT_SIG, //!< signal for exit actions + Q_INIT_SIG //!< signal for nested initial transitions }; @@ -570,7 +571,9 @@ m_temp.fun = initial; - Q_UNUSED_PAR(qs_id); // when Q_SPY not defined + #ifndef Q_SPY +Q_UNUSED_PAR(qs_id); +#endif QStateHandler t = m_state.fun; @@ -597,24 +600,24 @@ do { std::int_fast8_t ip = 0; // entry path index path[0] = m_temp.fun; - QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + static_cast<void>(hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG)); while (m_temp.fun != t) { ++ip; Q_ASSERT_ID(220, ip < MAX_NEST_DEPTH_); path[ip] = m_temp.fun; - QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + static_cast<void>(hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG)); } m_temp.fun = path[0]; // retrace the entry path in reverse (desired) order... do { - QEP_ENTER_(path[ip]); // enter path[ip] + hsm_state_entry_(this, path[ip], qs_id); // enter path[ip] --ip; } while (ip >= 0); t = path[0]; // current state becomes the new source - r = QEP_TRIG_(t, Q_INIT_SIG); // execute initial transition + r = hsm_reservedEvt_(this, t, Q_INIT_SIG); // execute initial tran. #ifdef Q_SPY if (r == Q_RET_TRAN) { @@ -674,7 +677,11 @@ m_temp.fun = t; // mark the configuration as stable - QStateHandler t = m_state.fun; + #ifndef Q_SPY +Q_UNUSED_PAR(qs_id); +#endif + +QStateHandler t = m_state.fun; QS_CRIT_STAT_ //! @pre the current state must be initialized and @@ -705,7 +712,7 @@ do { QS_FUN_PRE_(s); // the current state QS_END_PRE_() - r = QEP_TRIG_(s, QEP_EMPTY_SIG_); // find superstate of s + r = hsm_reservedEvt_(this, s, Q_EMPTY_SIG); // find superstate of s } } while (r == Q_RET_SUPER); @@ -722,14 +729,9 @@ if (r >= Q_RET_TRAN) { //! @tr{RQP120C} for (; t != s; t = m_temp.fun) { // exit handled? - if (QEP_TRIG_(t, Q_EXIT_SIG) == Q_RET_HANDLED) { - QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) - QS_OBJ_PRE_(this); // this state machine object - QS_FUN_PRE_(t); // the exited state - QS_END_PRE_() - + if (hsm_state_exit_(this, t, qs_id)) { // find superstate of t - QEP_TRIG_(t, QEP_EMPTY_SIG_); + static_cast<void>(hsm_reservedEvt_(this, t, Q_EMPTY_SIG)); } } @@ -750,14 +752,14 @@ if (r >= Q_RET_TRAN) { // execute state entry actions in the desired order... //! @tr{RQP120B} for (; ip >= 0; --ip) { - QEP_ENTER_(path[ip]); // enter path[ip] + hsm_state_entry_(this, path[ip], qs_id); // enter path[ip] } t = path[0]; // stick the target into register m_temp.fun = t; // update the next state // drill into the target hierarchy... //! @tr{RQP120I} - while (QEP_TRIG_(t, Q_INIT_SIG) == Q_RET_TRAN) { + while (hsm_reservedEvt_(this, t, Q_INIT_SIG) == Q_RET_TRAN) { QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) QS_OBJ_PRE_(this); // this state machine object @@ -769,13 +771,14 @@ if (r >= Q_RET_TRAN) { path[0] = m_temp.fun; // find superstate - QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + static_cast<void>(hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG)); while (m_temp.fun != t) { ++ip; path[ip] = m_temp.fun; // find superstate - QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + static_cast<void>( + hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG)); } m_temp.fun = path[0]; @@ -784,7 +787,7 @@ if (r >= Q_RET_TRAN) { // retrace the entry path in reverse (correct) order... do { - QEP_ENTER_(path[ip]); // enter path[ip] + hsm_state_entry_(this, path[ip], qs_id); // enter path[ip] --ip; } while (ip >= 0); @@ -908,7 +911,7 @@ do { r = Q_RET_IGNORED; // cause breaking out of the loop } else { - r = QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + r = hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG); } } while (r != Q_RET_IGNORED); // QHsm::top() state not reached m_temp.fun = m_state.fun; // restore the stable state configuration @@ -937,7 +940,7 @@ do { } else { child = m_temp.fun; - r = QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + r = hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG); } } while (r != Q_RET_IGNORED); // QHsm::top() state not reached m_temp.fun = m_state.fun; // establish stable state configuration @@ -1092,12 +1095,12 @@ return Q_RET_SUPER_SUB; //! @details -//! helper function to execute transition sequence in a hierarchical state -//! machine (HSM). +//! helper function to execute transition sequence in a hierarchical +//! state machine (HSM). //! //! @param[in,out] path array of pointers to state-handler functions //! to execute the entry actions -//! @param[in] qs_id QS-id of this state machine (for QS local filter) +//! @param[in] qs_id QS-id of this state machine (for QS local filter) //! //! @returns //! the depth of the entry path stored in the `path` parameter. @@ -1108,19 +1111,23 @@ return Q_RET_SUPER_SUB; - std::int_fast8_t ip = -1; // transition entry path index + #ifndef Q_SPY +Q_UNUSED_PAR(qs_id); +#endif + +std::int_fast8_t ip = -1; // transition entry path index QStateHandler t = path[0]; QStateHandler const s = path[2]; -QS_CRIT_STAT_ // (a) check source==target (transition to self) if (s == t) { - QEP_EXIT_(s); // exit the source + // exit the source + static_cast<void>(hsm_state_exit_(this, s, qs_id)); ip = 0; // enter the target } else { // superstate of target - QEP_TRIG_(t, QEP_EMPTY_SIG_); + static_cast<void>(hsm_reservedEvt_(this, t, Q_EMPTY_SIG)); t = m_temp.fun; // (b) check source==target->super @@ -1129,17 +1136,19 @@ else { } else { // superstate of src - QEP_TRIG_(s, QEP_EMPTY_SIG_); + static_cast<void>(hsm_reservedEvt_(this, s, Q_EMPTY_SIG)); // (c) check source->super==target->super if (m_temp.fun == t) { - QEP_EXIT_(s); // exit the source + // exit the source + static_cast<void>(hsm_state_exit_(this, s, qs_id)); ip = 0; // enter the target } else { // (d) check source->super==target if (m_temp.fun == path[0]) { - QEP_EXIT_(s); // exit the source + // exit the source + static_cast<void>(hsm_state_exit_(this, s, qs_id)); } else { // (e) check rest of source==target->super->super.. @@ -1150,7 +1159,7 @@ else { t = m_temp.fun; // save source->super // find target->super->super - QState r = QEP_TRIG_(path[1], QEP_EMPTY_SIG_); + QState r = hsm_reservedEvt_(this, path[1], Q_EMPTY_SIG); while (r == Q_RET_SUPER) { ++ip; path[ip] = m_temp.fun; // store the entry path @@ -1165,7 +1174,7 @@ else { } // it is not the source, keep going up else { - r = QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + r = hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG); } } @@ -1174,7 +1183,8 @@ else { // entry path must not overflow Q_ASSERT_ID(520, ip < MAX_NEST_DEPTH_); - QEP_EXIT_(s); // exit the source + // exit the source + static_cast<void>(hsm_state_exit_(this, s, qs_id)); // (f) check the rest of source->super // == target->super->super... @@ -1200,15 +1210,11 @@ else { // r = Q_RET_IGNORED; // keep looping do { - // exit t unhandled? - if (QEP_TRIG_(t, Q_EXIT_SIG) == Q_RET_HANDLED) - { - QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) - QS_OBJ_PRE_(this); - QS_FUN_PRE_(t); - QS_END_PRE_() - - QEP_TRIG_(t, QEP_EMPTY_SIG_); + // exit from t handled? + if (hsm_state_exit_(this, t, qs_id)) { + // find superstate of t + static_cast<void>( + hsm_reservedEvt_(this, t, Q_EMPTY_SIG)); } t = m_temp.fun; // set to super of t iq = ip; @@ -1230,7 +1236,6 @@ else { } } } -Q_UNUSED_PAR(qs_id); // when Q_SPY not defined return ip; @@ -2749,7 +2754,7 @@ else { // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } if (status) { // can post the event? @@ -2868,7 +2873,7 @@ Q_ASSERT_CRIT_(210, nFree != 0U); // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } --nFree; // one free entry just used up @@ -3209,7 +3214,7 @@ if (e != nullptr) { // we need to decrement the reference counter once, to account // for removing the event from the deferred event queue. - QF_EVT_REF_CTR_DEC_(e); // decrement the reference counter + QEvt_refCtr_dec_(e); // decrement the reference counter } QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_RECALL, m_prio) @@ -3397,7 +3402,7 @@ if (e->poolId_ != 0U) { // recycles the event if the counter drops to zero. This covers the // case when the event was published without any subscribers. // - QF_EVT_REF_CTR_INC_(e); + QEvt_refCtr_inc_(e); } // make a local, modifiable copy of the subscriber list @@ -4485,7 +4490,7 @@ if (((margin == QF::NO_MARGIN) && (nFree > 0U)) { // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } --nFree; // one free entry just used up @@ -4582,7 +4587,7 @@ Q_REQUIRE_CRIT_(300, nFree != 0U); // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } --nFree; // one free entry just used up @@ -4962,9 +4967,13 @@ if (m_nFree > static_cast<QMPoolCtr>(margin)) { m_nMin = 0U;// remember that pool got empty } else { - // pool is not empty, so the next free block must be in range - // - // NOTE: the next free block pointer can fall out of range + //! @invariant + //! The pool is not empty, so the next free-block pointer, + //! so the next free block must be in range. + //! + //! @tr{PQP18_3} + + // NOTE: The next free block pointer can fall out of range // when the client code writes past the memory block, thus // corrupting the next block. Q_ASSERT_CRIT_(330, QF_PTR_RANGE_(fb_next, m_start, m_end)); @@ -5570,7 +5579,7 @@ if (e->poolId_ != 0U) { QS_2U8_PRE_(e->poolId_, e->refCtr_); // pool Id & refCtr QS_END_NOCRIT_PRE_() - QF_EVT_REF_CTR_DEC_(e); // decrement the ref counter + QEvt_refCtr_dec_(e); // decrement the ref counter QF_CRIT_X_(); } @@ -5645,7 +5654,7 @@ Q_REQUIRE_ID(500, (e->poolId_ != 0U) QF_CRIT_STAT_ QF_CRIT_E_(); -QF_EVT_REF_CTR_INC_(e); // increments the ref counter +QEvt_refCtr_inc_(e); // increments the ref counter QS_BEGIN_NOCRIT_PRE_(QS_QF_NEW_REF, static_cast<std::uint_fast8_t>(QS_EP_ID) @@ -8614,7 +8623,7 @@ switch (state) { // when the event is just retreived from a queue. // This is expected for the following QF::gc() call. // - QF_EVT_REF_CTR_INC_(l_rx.var.evt.e); + QEvt_refCtr_inc_(l_rx.var.evt.e); static_cast<QHsm *>(QS::rxPriv_.currObj[QS::SM_OBJ]) ->dispatch(l_rx.var.evt.e, 0U); @@ -8631,7 +8640,7 @@ switch (state) { // when the event is just retreived from a queue. // This is expected for the following QF::gc() call. // - QF_EVT_REF_CTR_INC_(l_rx.var.evt.e); + QEvt_refCtr_inc_(l_rx.var.evt.e); static_cast<QHsm *>(QS::rxPriv_.currObj[QS::SM_OBJ]) ->init(l_rx.var.evt.e, 0U); @@ -9253,7 +9262,7 @@ QF_CRIT_E_(); // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } std::uint_fast8_t const rec = @@ -9306,7 +9315,7 @@ QF_CRIT_E_(); // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, m_prio) @@ -9676,12 +9685,13 @@ bzero(&QK_attr_, sizeof(QK_attr_)); // setup the QK scheduler as initially locked and not running QK_attr_.lockCeil = (QF_MAX_ACTIVE + 1U); // scheduler locked -// QK idle AO object (const in ROM) -static void * const idle_ao[(sizeof(QActive)/sizeof(void*)) + 1U] - = { nullptr }; -// register the idle AO object (cast 'const' away) +// storage capable for holding a blank QActive object (const in ROM) +static void* const + idle_ao[((sizeof(QActive) + sizeof(void*)) - 1U) / sizeof(void*)] + = { nullptr }; +// register the blank QActive object as the idle-AO (cast 'const' away) QActive::registry_[0] = QF_CONST_CAST_(QActive*, - reinterpret_cast<QActive const*>(&idle_ao[0])); + reinterpret_cast<QActive const*>(idle_ao)); #ifdef QK_INIT QK_INIT(); // port-specific initialization of the QK kernel @@ -10659,7 +10669,7 @@ else if (m_eQueue.m_end != 0U) { // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } if (status) { // can post the event? @@ -11694,12 +11704,13 @@ bzero(&QXK_attr_, sizeof(QXK_attr_)); // setup the QXK scheduler as initially locked and not running QXK_attr_.lockCeil = (QF_MAX_ACTIVE + 1U); // scheduler locked -// QXK idle AO object (const in ROM) -static void * const idle_ao[(sizeof(QActive)/sizeof(void*)) + 1U] - = { nullptr }; -// register the idle AO object (cast 'const' away) +// storage capable for holding a blank QActive object (const in ROM) +static void* const + idle_ao[((sizeof(QActive) + sizeof(void*)) - 1U) / sizeof(void*)] + = { nullptr }; +// register the blank QActive object as the idle-AO (cast 'const' away) QActive::registry_[0] = QF_CONST_CAST_(QActive*, - reinterpret_cast<QActive const*>(&idle_ao[0])); + reinterpret_cast<QActive const*>(idle_ao)); #ifdef QXK_INIT QXK_INIT(); // port-specific initialization of the QXK kernel @@ -12274,8 +12285,8 @@ QF_CRIT_X_(); // #define QP_VERSION_STR "7.1.3" -//! Encrypted current QP release (7.1.3) and date (2022-11-11) -#define QP_RELEASE 0x7C3520C6U +//! Encrypted current QP release (7.1.3) and date (2022-11-18) +#define QP_RELEASE 0x7C340F56U //============================================================================ // Global namespace... @@ -12355,23 +12366,13 @@ constexpr std::uint8_t TE_TICK_RATE = 0x0FU; // bitmask // internal helper inline functions -//! return the Pool-ID of an event `e` -inline std::uint8_t QF_EVT_POOL_ID_ (QEvt const * const e) noexcept { - return e->poolId_; -} - -//! return the Reference Conter of an event `e` -inline std::uint8_t QF_EVT_REF_CTR_ (QEvt const * const e) noexcept { - return e->refCtr_; -} - //! increment the refCtr_ of an event `e` -inline void QF_EVT_REF_CTR_INC_(QEvt const * const e) noexcept { +inline void QEvt_refCtr_inc_(QEvt const * const e) noexcept { (QF_CONST_CAST_(QEvt*, e))->refCtr_ = e->refCtr_ + 1U; } //! decrement the refCtr_ of an event `e` -inline void QF_EVT_REF_CTR_DEC_(QEvt const * const e) noexcept { +inline void QEvt_refCtr_dec_(QEvt const * const e) noexcept { (QF_CONST_CAST_(QEvt*, e))->refCtr_ = e->refCtr_ - 1U; } @@ -13422,65 +13423,118 @@ extern char const BUILD_TIME[9]; #endif // Q_SPY #include "qassert.h" // QP embedded systems-friendly assertions -// local helper macros... - -//! helper macro to trigger internal event in an HSM -#define QEP_TRIG_(state_, sig_) \ - ((*(state_))(this, &QEP_reservedEvt_[sig_])) - -//! helper macro to trigger exit action in an HSM -#define QEP_EXIT_(state_) do { \ - if (QEP_TRIG_(state_, Q_EXIT_SIG) == Q_RET_HANDLED) { \ - QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) \ - QS_OBJ_PRE_(this); \ - QS_FUN_PRE_(state_); \ - QS_END_PRE_() \ - } \ -} while (false) - -//! helper macro to trigger entry action in an HSM -#define QEP_ENTER_(state_) do { \ - if (QEP_TRIG_(state_, Q_ENTRY_SIG) == Q_RET_HANDLED) { \ - QS_BEGIN_PRE_(QS_QEP_STATE_ENTRY, qs_id) \ - QS_OBJ_PRE_(this); \ - QS_FUN_PRE_(state_); \ - QS_END_PRE_() \ - } \ -} while (false) +//============================================================================ +$define ${QEP::versionStr[]} //============================================================================ // unnamed namespace for local definitions with internal linkage namespace { Q_DEFINE_THIS_MODULE("qep_hsm") -enum : QP::QSignal { - //! empty signal for internal use only - QEP_EMPTY_SIG_ = 0U -}; - -//============================================================================ -//! @details -//! Static, preallocated standard events that the QEP event processor sends -//! to state handler functions of QP::QHsm-style state machine to execute -//! entry actions, exit actions, and initial transitions. +//---------------------------------------------------------------------------- +//! Immutable events corresponding to the reserved signals. //! -static QP::QEvt const QEP_reservedEvt_[4] { +//! @details +//! Static, immutable reserved events that the QEP event processor sends +//! to state handler functions of QHsm-style state machine to execute entry +//! actions, exit actions, and initial transitions. +//! +static QP::QEvt const l_reservedEvt_[4] { #ifdef Q_EVT_CTOR // Is the QEvt constructor provided? - QP::QEvt(0U, 0U), - QP::QEvt(1U, 0U), - QP::QEvt(2U, 0U), - QP::QEvt(3U, 0U) + QP::QEvt(static_cast<QP::QSignal>(QP::QHsm::Q_EMPTY_SIG), 0U), + QP::QEvt(static_cast<QP::QSignal>(QP::QHsm::Q_ENTRY_SIG), 0U), + QP::QEvt(static_cast<QP::QSignal>(QP::QHsm::Q_EXIT_SIG), 0U), + QP::QEvt(static_cast<QP::QSignal>(QP::QHsm::Q_INIT_SIG), 0U) #else // QEvt is a POD (Plain Old Datatype) - { 0U, 0U, 0U }, - { 1U, 0U, 0U }, - { 2U, 0U, 0U }, - { 3U, 0U, 0U } + { static_cast<QP::QSignal>(QP::QHsm::Q_EMPTY_SIG), 0U, 0U }, + { static_cast<QP::QSignal>(QP::QHsm::Q_ENTRY_SIG), 0U, 0U }, + { static_cast<QP::QSignal>(QP::QHsm::Q_EXIT_SIG), 0U, 0U }, + { static_cast<QP::QSignal>(QP::QHsm::Q_INIT_SIG), 0U, 0U } #endif }; +//---------------------------------------------------------------------------- +// inline helper functions + +//............................................................................ +//! helper function to trigger reserved event in an QHsm +//! +//! @param[in] state state handler function +//! @param[in] sig reserved signal to trigger +static inline QP::QState hsm_reservedEvt_( + QP::QHsm * const me, + QP::QStateHandler const state, + enum QP::QHsm::ReservedSig const sig) +{ + return (*state)(me, &l_reservedEvt_[sig]); +} + +//............................................................................ +//! Helper function to execute entry into a given state in a +//! hierarchical state machine (HSM). +//! +//! @param[in] state state handler function +//! @param[in] qs_id QS-id of this state machine (for QS local filter) +static inline void hsm_state_entry_( + QP::QHsm * const me, + QP::QStateHandler const state, + std::uint_fast8_t const qs_id) +{ +#ifdef Q_SPY + if ((*state)(me, &l_reservedEvt_[QP::QHsm::Q_ENTRY_SIG]) + == QP::QHsm::Q_RET_HANDLED) + { + QS_CRIT_STAT_ + QS_BEGIN_PRE_(QP::QS_QEP_STATE_ENTRY, qs_id) + QS_OBJ_PRE_(me); + QS_FUN_PRE_(state); + QS_END_PRE_() + } +#else + Q_UNUSED_PAR(qs_id); + static_cast<void>((*state)(me, &l_reservedEvt_[QP::QHsm::Q_ENTRY_SIG])); +#endif // Q_SPY +} + +//............................................................................ +//! Helper function to execute exit from a given state in a +//! hierarchical state machine (HSM). +//! +//! @param[in] state state handler function +//! @param[in] qs_id QS-id of this state machine (for QS local filter) +//! +//! @returns +//! 'true' if the exit action has been found in the state and +//! 'flase' otherwise. +static inline bool hsm_state_exit_( + QP::QHsm * const me, + QP::QStateHandler const state, + std::uint_fast8_t const qs_id) +{ +#ifdef Q_SPY + bool isHandled; + if ((*state)(me, &l_reservedEvt_[QP::QHsm::Q_EXIT_SIG]) + == QP::QHsm::Q_RET_HANDLED) + { + QS_CRIT_STAT_ + QS_BEGIN_PRE_(QP::QS_QEP_STATE_EXIT, qs_id) + QS_OBJ_PRE_(me); + QS_FUN_PRE_(state); + QS_END_PRE_() + isHandled = true; + } + else { + isHandled = false; + } + return isHandled; +#else + Q_UNUSED_PAR(qs_id); + return (*state)(me, &l_reservedEvt_[QP::QHsm::Q_EXIT_SIG]); +#endif // Q_SPY +} + } // unnamed namespace -$define ${QEP::versionStr[]} $define ${QEP::QHsm} diff --git a/src/qf/qep_hsm.cpp b/src/qf/qep_hsm.cpp index 506191a6..18975c6c 100644 --- a/src/qf/qep_hsm.cpp +++ b/src/qf/qep_hsm.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qep_hsm.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -51,64 +51,7 @@ #endif // Q_SPY #include "qassert.h" // QP embedded systems-friendly assertions -// local helper macros... - -//! helper macro to trigger internal event in an HSM -#define QEP_TRIG_(state_, sig_) \ - ((*(state_))(this, &QEP_reservedEvt_[sig_])) - -//! helper macro to trigger exit action in an HSM -#define QEP_EXIT_(state_) do { \ - if (QEP_TRIG_(state_, Q_EXIT_SIG) == Q_RET_HANDLED) { \ - QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) \ - QS_OBJ_PRE_(this); \ - QS_FUN_PRE_(state_); \ - QS_END_PRE_() \ - } \ -} while (false) - -//! helper macro to trigger entry action in an HSM -#define QEP_ENTER_(state_) do { \ - if (QEP_TRIG_(state_, Q_ENTRY_SIG) == Q_RET_HANDLED) { \ - QS_BEGIN_PRE_(QS_QEP_STATE_ENTRY, qs_id) \ - QS_OBJ_PRE_(this); \ - QS_FUN_PRE_(state_); \ - QS_END_PRE_() \ - } \ -} while (false) - //============================================================================ -// unnamed namespace for local definitions with internal linkage -namespace { -Q_DEFINE_THIS_MODULE("qep_hsm") - -enum : QP::QSignal { - //! empty signal for internal use only - QEP_EMPTY_SIG_ = 0U -}; - -//============================================================================ -//! @details -//! Static, preallocated standard events that the QEP event processor sends -//! to state handler functions of QP::QHsm-style state machine to execute -//! entry actions, exit actions, and initial transitions. -//! -static QP::QEvt const QEP_reservedEvt_[4] { -#ifdef Q_EVT_CTOR // Is the QEvt constructor provided? - QP::QEvt(0U, 0U), - QP::QEvt(1U, 0U), - QP::QEvt(2U, 0U), - QP::QEvt(3U, 0U) -#else // QEvt is a POD (Plain Old Datatype) - { 0U, 0U, 0U }, - { 1U, 0U, 0U }, - { 2U, 0U, 0U }, - { 3U, 0U, 0U } -#endif -}; - -} // unnamed namespace - //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) @@ -121,6 +64,116 @@ namespace QP { } // namespace QP //$enddef${QEP::versionStr[]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +//============================================================================ +// unnamed namespace for local definitions with internal linkage +namespace { +Q_DEFINE_THIS_MODULE("qep_hsm") + +//---------------------------------------------------------------------------- +//! Immutable events corresponding to the reserved signals. +//! +//! @details +//! Static, immutable reserved events that the QEP event processor sends +//! to state handler functions of QHsm-style state machine to execute entry +//! actions, exit actions, and initial transitions. +//! +static QP::QEvt const l_reservedEvt_[4] { +#ifdef Q_EVT_CTOR // Is the QEvt constructor provided? + QP::QEvt(static_cast(QP::QHsm::Q_EMPTY_SIG), 0U), + QP::QEvt(static_cast(QP::QHsm::Q_ENTRY_SIG), 0U), + QP::QEvt(static_cast(QP::QHsm::Q_EXIT_SIG), 0U), + QP::QEvt(static_cast(QP::QHsm::Q_INIT_SIG), 0U) +#else // QEvt is a POD (Plain Old Datatype) + { static_cast(QP::QHsm::Q_EMPTY_SIG), 0U, 0U }, + { static_cast(QP::QHsm::Q_ENTRY_SIG), 0U, 0U }, + { static_cast(QP::QHsm::Q_EXIT_SIG), 0U, 0U }, + { static_cast(QP::QHsm::Q_INIT_SIG), 0U, 0U } +#endif +}; + +//---------------------------------------------------------------------------- +// inline helper functions + +//............................................................................ +//! helper function to trigger reserved event in an QHsm +//! +//! @param[in] state state handler function +//! @param[in] sig reserved signal to trigger +static inline QP::QState hsm_reservedEvt_( + QP::QHsm * const me, + QP::QStateHandler const state, + enum QP::QHsm::ReservedSig const sig) +{ + return (*state)(me, &l_reservedEvt_[sig]); +} + +//............................................................................ +//! Helper function to execute entry into a given state in a +//! hierarchical state machine (HSM). +//! +//! @param[in] state state handler function +//! @param[in] qs_id QS-id of this state machine (for QS local filter) +static inline void hsm_state_entry_( + QP::QHsm * const me, + QP::QStateHandler const state, + std::uint_fast8_t const qs_id) +{ +#ifdef Q_SPY + if ((*state)(me, &l_reservedEvt_[QP::QHsm::Q_ENTRY_SIG]) + == QP::QHsm::Q_RET_HANDLED) + { + QS_CRIT_STAT_ + QS_BEGIN_PRE_(QP::QS_QEP_STATE_ENTRY, qs_id) + QS_OBJ_PRE_(me); + QS_FUN_PRE_(state); + QS_END_PRE_() + } +#else + Q_UNUSED_PAR(qs_id); + static_cast((*state)(me, &l_reservedEvt_[QP::QHsm::Q_ENTRY_SIG])); +#endif // Q_SPY +} + +//............................................................................ +//! Helper function to execute exit from a given state in a +//! hierarchical state machine (HSM). +//! +//! @param[in] state state handler function +//! @param[in] qs_id QS-id of this state machine (for QS local filter) +//! +//! @returns +//! 'true' if the exit action has been found in the state and +//! 'flase' otherwise. +static inline bool hsm_state_exit_( + QP::QHsm * const me, + QP::QStateHandler const state, + std::uint_fast8_t const qs_id) +{ +#ifdef Q_SPY + bool isHandled; + if ((*state)(me, &l_reservedEvt_[QP::QHsm::Q_EXIT_SIG]) + == QP::QHsm::Q_RET_HANDLED) + { + QS_CRIT_STAT_ + QS_BEGIN_PRE_(QP::QS_QEP_STATE_EXIT, qs_id) + QS_OBJ_PRE_(me); + QS_FUN_PRE_(state); + QS_END_PRE_() + isHandled = true; + } + else { + isHandled = false; + } + return isHandled; +#else + Q_UNUSED_PAR(qs_id); + return (*state)(me, &l_reservedEvt_[QP::QHsm::Q_EXIT_SIG]); +#endif // Q_SPY +} + +} // unnamed namespace + //$define${QEP::QHsm} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv namespace QP { @@ -137,7 +190,9 @@ void QHsm::init( void const * const e, std::uint_fast8_t const qs_id) { - Q_UNUSED_PAR(qs_id); // when Q_SPY not defined + #ifndef Q_SPY + Q_UNUSED_PAR(qs_id); + #endif QStateHandler t = m_state.fun; @@ -164,24 +219,24 @@ void QHsm::init( std::int_fast8_t ip = 0; // entry path index path[0] = m_temp.fun; - QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + static_cast(hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG)); while (m_temp.fun != t) { ++ip; Q_ASSERT_ID(220, ip < MAX_NEST_DEPTH_); path[ip] = m_temp.fun; - QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + static_cast(hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG)); } m_temp.fun = path[0]; // retrace the entry path in reverse (desired) order... do { - QEP_ENTER_(path[ip]); // enter path[ip] + hsm_state_entry_(this, path[ip], qs_id); // enter path[ip] --ip; } while (ip >= 0); t = path[0]; // current state becomes the new source - r = QEP_TRIG_(t, Q_INIT_SIG); // execute initial transition + r = hsm_reservedEvt_(this, t, Q_INIT_SIG); // execute initial tran. #ifdef Q_SPY if (r == Q_RET_TRAN) { @@ -210,6 +265,10 @@ void QHsm::dispatch( QEvt const * const e, std::uint_fast8_t const qs_id) { + #ifndef Q_SPY + Q_UNUSED_PAR(qs_id); + #endif + QStateHandler t = m_state.fun; QS_CRIT_STAT_ @@ -241,7 +300,7 @@ void QHsm::dispatch( QS_FUN_PRE_(s); // the current state QS_END_PRE_() - r = QEP_TRIG_(s, QEP_EMPTY_SIG_); // find superstate of s + r = hsm_reservedEvt_(this, s, Q_EMPTY_SIG); // find superstate of s } } while (r == Q_RET_SUPER); @@ -258,14 +317,9 @@ void QHsm::dispatch( //! @tr{RQP120C} for (; t != s; t = m_temp.fun) { // exit handled? - if (QEP_TRIG_(t, Q_EXIT_SIG) == Q_RET_HANDLED) { - QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) - QS_OBJ_PRE_(this); // this state machine object - QS_FUN_PRE_(t); // the exited state - QS_END_PRE_() - + if (hsm_state_exit_(this, t, qs_id)) { // find superstate of t - QEP_TRIG_(t, QEP_EMPTY_SIG_); + static_cast(hsm_reservedEvt_(this, t, Q_EMPTY_SIG)); } } @@ -286,14 +340,14 @@ void QHsm::dispatch( // execute state entry actions in the desired order... //! @tr{RQP120B} for (; ip >= 0; --ip) { - QEP_ENTER_(path[ip]); // enter path[ip] + hsm_state_entry_(this, path[ip], qs_id); // enter path[ip] } t = path[0]; // stick the target into register m_temp.fun = t; // update the next state // drill into the target hierarchy... //! @tr{RQP120I} - while (QEP_TRIG_(t, Q_INIT_SIG) == Q_RET_TRAN) { + while (hsm_reservedEvt_(this, t, Q_INIT_SIG) == Q_RET_TRAN) { QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) QS_OBJ_PRE_(this); // this state machine object @@ -305,13 +359,14 @@ void QHsm::dispatch( path[0] = m_temp.fun; // find superstate - QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + static_cast(hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG)); while (m_temp.fun != t) { ++ip; path[ip] = m_temp.fun; // find superstate - QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + static_cast( + hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG)); } m_temp.fun = path[0]; @@ -320,7 +375,7 @@ void QHsm::dispatch( // retrace the entry path in reverse (correct) order... do { - QEP_ENTER_(path[ip]); // enter path[ip] + hsm_state_entry_(this, path[ip], qs_id); // enter path[ip] --ip; } while (ip >= 0); @@ -391,7 +446,7 @@ bool QHsm::isIn(QStateHandler const s) noexcept { r = Q_RET_IGNORED; // cause breaking out of the loop } else { - r = QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + r = hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG); } } while (r != Q_RET_IGNORED); // QHsm::top() state not reached m_temp.fun = m_state.fun; // restore the stable state configuration @@ -415,7 +470,7 @@ QStateHandler QHsm::childState(QStateHandler const parent) noexcept { } else { child = m_temp.fun; - r = QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + r = hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG); } } while (r != Q_RET_IGNORED); // QHsm::top() state not reached m_temp.fun = m_state.fun; // establish stable state configuration @@ -435,19 +490,23 @@ std::int_fast8_t QHsm::hsm_tran( QStateHandler (&path)[MAX_NEST_DEPTH_], std::uint_fast8_t const qs_id) { + #ifndef Q_SPY + Q_UNUSED_PAR(qs_id); + #endif + std::int_fast8_t ip = -1; // transition entry path index QStateHandler t = path[0]; QStateHandler const s = path[2]; - QS_CRIT_STAT_ // (a) check source==target (transition to self) if (s == t) { - QEP_EXIT_(s); // exit the source + // exit the source + static_cast(hsm_state_exit_(this, s, qs_id)); ip = 0; // enter the target } else { // superstate of target - QEP_TRIG_(t, QEP_EMPTY_SIG_); + static_cast(hsm_reservedEvt_(this, t, Q_EMPTY_SIG)); t = m_temp.fun; // (b) check source==target->super @@ -456,17 +515,19 @@ std::int_fast8_t QHsm::hsm_tran( } else { // superstate of src - QEP_TRIG_(s, QEP_EMPTY_SIG_); + static_cast(hsm_reservedEvt_(this, s, Q_EMPTY_SIG)); // (c) check source->super==target->super if (m_temp.fun == t) { - QEP_EXIT_(s); // exit the source + // exit the source + static_cast(hsm_state_exit_(this, s, qs_id)); ip = 0; // enter the target } else { // (d) check source->super==target if (m_temp.fun == path[0]) { - QEP_EXIT_(s); // exit the source + // exit the source + static_cast(hsm_state_exit_(this, s, qs_id)); } else { // (e) check rest of source==target->super->super.. @@ -477,7 +538,7 @@ std::int_fast8_t QHsm::hsm_tran( t = m_temp.fun; // save source->super // find target->super->super - QState r = QEP_TRIG_(path[1], QEP_EMPTY_SIG_); + QState r = hsm_reservedEvt_(this, path[1], Q_EMPTY_SIG); while (r == Q_RET_SUPER) { ++ip; path[ip] = m_temp.fun; // store the entry path @@ -492,7 +553,7 @@ std::int_fast8_t QHsm::hsm_tran( } // it is not the source, keep going up else { - r = QEP_TRIG_(m_temp.fun, QEP_EMPTY_SIG_); + r = hsm_reservedEvt_(this, m_temp.fun, Q_EMPTY_SIG); } } @@ -501,7 +562,8 @@ std::int_fast8_t QHsm::hsm_tran( // entry path must not overflow Q_ASSERT_ID(520, ip < MAX_NEST_DEPTH_); - QEP_EXIT_(s); // exit the source + // exit the source + static_cast(hsm_state_exit_(this, s, qs_id)); // (f) check the rest of source->super // == target->super->super... @@ -527,15 +589,11 @@ std::int_fast8_t QHsm::hsm_tran( // r = Q_RET_IGNORED; // keep looping do { - // exit t unhandled? - if (QEP_TRIG_(t, Q_EXIT_SIG) == Q_RET_HANDLED) - { - QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) - QS_OBJ_PRE_(this); - QS_FUN_PRE_(t); - QS_END_PRE_() - - QEP_TRIG_(t, QEP_EMPTY_SIG_); + // exit from t handled? + if (hsm_state_exit_(this, t, qs_id)) { + // find superstate of t + static_cast( + hsm_reservedEvt_(this, t, Q_EMPTY_SIG)); } t = m_temp.fun; // set to super of t iq = ip; @@ -557,7 +615,6 @@ std::int_fast8_t QHsm::hsm_tran( } } } - Q_UNUSED_PAR(qs_id); // when Q_SPY not defined return ip; } diff --git a/src/qf/qep_msm.cpp b/src/qf/qep_msm.cpp index 2bc23d4b..16d00bcf 100644 --- a/src/qf/qep_msm.cpp +++ b/src/qf/qep_msm.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qep_msm.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qf/qf_act.cpp b/src/qf/qf_act.cpp index 4d51f3b5..3ae9370c 100644 --- a/src/qf/qf_act.cpp +++ b/src/qf/qf_act.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_act.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qf/qf_actq.cpp b/src/qf/qf_actq.cpp index 3932a74c..8bbfd245 100644 --- a/src/qf/qf_actq.cpp +++ b/src/qf/qf_actq.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_actq.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -113,7 +113,7 @@ bool QActive::post_( // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } if (status) { // can post the event? @@ -216,7 +216,7 @@ void QActive::postLIFO(QEvt const * const e) noexcept { // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } --nFree; // one free entry just used up diff --git a/src/qf/qf_defer.cpp b/src/qf/qf_defer.cpp index 691f636d..023d5608 100644 --- a/src/qf/qf_defer.cpp +++ b/src/qf/qf_defer.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_defer.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -113,7 +113,7 @@ bool QActive::recall(QEQueue * const eq) noexcept { // we need to decrement the reference counter once, to account // for removing the event from the deferred event queue. - QF_EVT_REF_CTR_DEC_(e); // decrement the reference counter + QEvt_refCtr_dec_(e); // decrement the reference counter } QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_RECALL, m_prio) diff --git a/src/qf/qf_dyn.cpp b/src/qf/qf_dyn.cpp index df5f25eb..7ea68916 100644 --- a/src/qf/qf_dyn.cpp +++ b/src/qf/qf_dyn.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_dyn.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -198,7 +198,7 @@ void gc(QEvt const * const e) noexcept { QS_2U8_PRE_(e->poolId_, e->refCtr_); // pool Id & refCtr QS_END_NOCRIT_PRE_() - QF_EVT_REF_CTR_DEC_(e); // decrement the ref counter + QEvt_refCtr_dec_(e); // decrement the ref counter QF_CRIT_X_(); } @@ -257,7 +257,7 @@ QEvt const * newRef_( QF_CRIT_STAT_ QF_CRIT_E_(); - QF_EVT_REF_CTR_INC_(e); // increments the ref counter + QEvt_refCtr_inc_(e); // increments the ref counter QS_BEGIN_NOCRIT_PRE_(QS_QF_NEW_REF, static_cast(QS_EP_ID) diff --git a/src/qf/qf_mem.cpp b/src/qf/qf_mem.cpp index f1993515..3c221a3e 100644 --- a/src/qf/qf_mem.cpp +++ b/src/qf/qf_mem.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_mem.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -165,9 +165,13 @@ void * QMPool::get( m_nMin = 0U;// remember that pool got empty } else { - // pool is not empty, so the next free block must be in range - // - // NOTE: the next free block pointer can fall out of range + //! @invariant + //! The pool is not empty, so the next free-block pointer, + //! so the next free block must be in range. + //! + //! @tr{PQP18_3} + + // NOTE: The next free block pointer can fall out of range // when the client code writes past the memory block, thus // corrupting the next block. Q_ASSERT_CRIT_(330, QF_PTR_RANGE_(fb_next, m_start, m_end)); diff --git a/src/qf/qf_ps.cpp b/src/qf/qf_ps.cpp index 53bd6594..1d6ed9b8 100644 --- a/src/qf/qf_ps.cpp +++ b/src/qf/qf_ps.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_ps.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -126,7 +126,7 @@ void QActive::publish_( // recycles the event if the counter drops to zero. This covers the // case when the event was published without any subscribers. // - QF_EVT_REF_CTR_INC_(e); + QEvt_refCtr_inc_(e); } // make a local, modifiable copy of the subscriber list diff --git a/src/qf/qf_qact.cpp b/src/qf/qf_qact.cpp index 3199d56e..08ace7a6 100644 --- a/src/qf/qf_qact.cpp +++ b/src/qf/qf_qact.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_qact.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qf/qf_qeq.cpp b/src/qf/qf_qeq.cpp index 721f7db4..4a0fc8f5 100644 --- a/src/qf/qf_qeq.cpp +++ b/src/qf/qf_qeq.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_qeq.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -114,7 +114,7 @@ bool QEQueue::post( { // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } --nFree; // one free entry just used up @@ -188,7 +188,7 @@ void QEQueue::postLIFO( // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } --nFree; // one free entry just used up diff --git a/src/qf/qf_qmact.cpp b/src/qf/qf_qmact.cpp index 14794627..48b95b78 100644 --- a/src/qf/qf_qmact.cpp +++ b/src/qf/qf_qmact.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_qmact.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qf/qf_time.cpp b/src/qf/qf_time.cpp index be14d823..c645234d 100644 --- a/src/qf/qf_time.cpp +++ b/src/qf/qf_time.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qf::qf_time.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qk/qk.cpp b/src/qk/qk.cpp index 20f0592b..52feffb1 100644 --- a/src/qk/qk.cpp +++ b/src/qk/qk.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qk::qk.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -161,12 +161,13 @@ void init() { // setup the QK scheduler as initially locked and not running QK_attr_.lockCeil = (QF_MAX_ACTIVE + 1U); // scheduler locked - // QK idle AO object (const in ROM) - static void * const idle_ao[(sizeof(QActive)/sizeof(void*)) + 1U] - = { nullptr }; - // register the idle AO object (cast 'const' away) + // storage capable for holding a blank QActive object (const in ROM) + static void* const + idle_ao[((sizeof(QActive) + sizeof(void*)) - 1U) / sizeof(void*)] + = { nullptr }; + // register the blank QActive object as the idle-AO (cast 'const' away) QActive::registry_[0] = QF_CONST_CAST_(QActive*, - reinterpret_cast(&idle_ao[0])); + reinterpret_cast(idle_ao)); #ifdef QK_INIT QK_INIT(); // port-specific initialization of the QK kernel diff --git a/src/qs/qs.cpp b/src/qs/qs.cpp index 563802a9..f173c888 100644 --- a/src/qs/qs.cpp +++ b/src/qs/qs.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qs::qs.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qs/qs_64bit.cpp b/src/qs/qs_64bit.cpp index 72546b8d..c45e3b3e 100644 --- a/src/qs/qs_64bit.cpp +++ b/src/qs/qs_64bit.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qs::qs_64bit.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qs/qs_fp.cpp b/src/qs/qs_fp.cpp index ab200f01..4b8aa71c 100644 --- a/src/qs/qs_fp.cpp +++ b/src/qs/qs_fp.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qs::qs_fp.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qs/qs_rx.cpp b/src/qs/qs_rx.cpp index 6d0cd085..0251dc0e 100644 --- a/src/qs/qs_rx.cpp +++ b/src/qs/qs_rx.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qs::qs_rx.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -613,7 +613,7 @@ void rxHandleGoodFrame_(std::uint8_t const state) { // when the event is just retreived from a queue. // This is expected for the following QF::gc() call. // - QF_EVT_REF_CTR_INC_(l_rx.var.evt.e); + QEvt_refCtr_inc_(l_rx.var.evt.e); static_cast(QS::rxPriv_.currObj[QS::SM_OBJ]) ->dispatch(l_rx.var.evt.e, 0U); @@ -630,7 +630,7 @@ void rxHandleGoodFrame_(std::uint8_t const state) { // when the event is just retreived from a queue. // This is expected for the following QF::gc() call. // - QF_EVT_REF_CTR_INC_(l_rx.var.evt.e); + QEvt_refCtr_inc_(l_rx.var.evt.e); static_cast(QS::rxPriv_.currObj[QS::SM_OBJ]) ->init(l_rx.var.evt.e, 0U); diff --git a/src/qs/qstamp.cpp b/src/qs/qstamp.cpp index dabb7eda..a5dea643 100644 --- a/src/qs/qstamp.cpp +++ b/src/qs/qstamp.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qs::qstamp.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qs/qutest.cpp b/src/qs/qutest.cpp index 9a23c00f..350a920c 100644 --- a/src/qs/qutest.cpp +++ b/src/qs/qutest.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qs::qutest.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -499,7 +499,7 @@ bool QActiveDummy::post_( // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } std::uint_fast8_t const rec = @@ -550,7 +550,7 @@ void QActiveDummy::postLIFO(QEvt const * const e) noexcept { // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, m_prio) diff --git a/src/qv/qv.cpp b/src/qv/qv.cpp index 8af10520..6757367b 100644 --- a/src/qv/qv.cpp +++ b/src/qv/qv.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qv::qv.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qxk/qxk.cpp b/src/qxk/qxk.cpp index 6d25f96f..77ccc91d 100644 --- a/src/qxk/qxk.cpp +++ b/src/qxk/qxk.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qxk::qxk.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -165,12 +165,13 @@ void init() { // setup the QXK scheduler as initially locked and not running QXK_attr_.lockCeil = (QF_MAX_ACTIVE + 1U); // scheduler locked - // QXK idle AO object (const in ROM) - static void * const idle_ao[(sizeof(QActive)/sizeof(void*)) + 1U] - = { nullptr }; - // register the idle AO object (cast 'const' away) + // storage capable for holding a blank QActive object (const in ROM) + static void* const + idle_ao[((sizeof(QActive) + sizeof(void*)) - 1U) / sizeof(void*)] + = { nullptr }; + // register the blank QActive object as the idle-AO (cast 'const' away) QActive::registry_[0] = QF_CONST_CAST_(QActive*, - reinterpret_cast(&idle_ao[0])); + reinterpret_cast(idle_ao)); #ifdef QXK_INIT QXK_INIT(); // port-specific initialization of the QXK kernel diff --git a/src/qxk/qxk_mutex.cpp b/src/qxk/qxk_mutex.cpp index 6123bfb4..6dc9283a 100644 --- a/src/qxk/qxk_mutex.cpp +++ b/src/qxk/qxk_mutex.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qxk::qxk_mutex.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qxk/qxk_sema.cpp b/src/qxk/qxk_sema.cpp index 9914ee23..5504395c 100644 --- a/src/qxk/qxk_sema.cpp +++ b/src/qxk/qxk_sema.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qxk::qxk_sema.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: diff --git a/src/qxk/qxk_xthr.cpp b/src/qxk/qxk_xthr.cpp index 87f6520c..af4e6344 100644 --- a/src/qxk/qxk_xthr.cpp +++ b/src/qxk/qxk_xthr.cpp @@ -3,7 +3,7 @@ // Model: qpcpp.qm // File: ${src::qxk::qxk_xthr.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.3 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // This code is covered by the following QP license: @@ -360,7 +360,7 @@ bool QXThread::post_( // is it a dynamic event? if (e->poolId_ != 0U) { - QF_EVT_REF_CTR_INC_(e); // increment the reference counter + QEvt_refCtr_inc_(e); // increment the reference counter } if (status) { // can post the event?