From 532d29c33d3a5db4c41bd291e7ad28a7f52fce08 Mon Sep 17 00:00:00 2001 From: MMS Date: Fri, 6 Jan 2023 12:56:50 -0500 Subject: [PATCH] 7.2.0 --- 3rd_party | 2 +- doxygen/Doxyfile | 18 +- doxygen/config.hpp | 328 +---------- doxygen/dir.dox | 14 +- doxygen/exa_rtos.dox | 147 +++-- doxygen/gen/metrics.txt | 154 ++--- doxygen/history.dox | 61 +- doxygen/images/hsm.png | Bin 11380 -> 0 bytes ...{qk_oncontextsw.cpp => qf_oncontextsw.cpp} | 7 +- doxygen/snippets/qs_sigDic.cpp | 5 - doxygen/snippets/qxk_oncontextsw.cpp | 19 - .../arm-cm/blinky_efm32-slstk3401a/qk/bsp.cpp | 25 +- .../arm-cm/blinky_efm32-slstk3401a/qv/bsp.cpp | 12 +- .../arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp | 25 +- .../arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp | 12 +- examples/arm-cm/dpp_efm32-slstk3401a/dpp.hpp | 2 +- examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm | 2 +- .../arm-cm/dpp_efm32-slstk3401a/philo.cpp | 6 +- .../arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp | 31 +- .../arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp | 39 +- .../dpp_efm32-slstk3401a/qv/gnu/Makefile | 13 +- .../arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp | 14 +- .../dpp_efm32-slstk3401a/qxk/gnu/Makefile | 14 +- .../qxk/gnu/Makefile-cpp20 | 10 +- .../qxk/gnu/Makefile-nassert | 12 +- .../arm-cm/dpp_efm32-slstk3401a/table.cpp | 6 +- examples/arm-cm/dpp_ek-tm4c123gxl/dpp.hpp | 2 +- examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm | 2 +- examples/arm-cm/dpp_ek-tm4c123gxl/philo.cpp | 6 +- examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp | 25 +- .../qk/gnu_with-stack-prot/bsp_stack-prot.cpp | 25 +- examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp | 10 +- .../qxk/armclang/dpp-qxk.uvoptx | 4 +- .../qxk/armclang/dpp-qxk.uvprojx | 15 +- examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.cpp | 5 +- examples/arm-cm/dpp_ek-tm4c123gxl/table.cpp | 6 +- examples/arm-cm/dpp_mbed-lpc1768/dpp.hpp | 2 +- examples/arm-cm/dpp_mbed-lpc1768/dpp.qm | 2 +- examples/arm-cm/dpp_mbed-lpc1768/philo.cpp | 6 +- examples/arm-cm/dpp_mbed-lpc1768/table.cpp | 6 +- examples/arm-cm/dpp_nucleo-h743zi/dpp.hpp | 2 +- examples/arm-cm/dpp_nucleo-h743zi/dpp.qm | 2 +- examples/arm-cm/dpp_nucleo-h743zi/philo.cpp | 6 +- examples/arm-cm/dpp_nucleo-h743zi/qk/bsp.cpp | 153 ++--- .../arm-cm/dpp_nucleo-h743zi/qk/gnu/Makefile | 16 +- examples/arm-cm/dpp_nucleo-h743zi/qk/main.cpp | 23 +- examples/arm-cm/dpp_nucleo-h743zi/qv/bsp.cpp | 141 +++-- .../arm-cm/dpp_nucleo-h743zi/qv/gnu/Makefile | 14 +- examples/arm-cm/dpp_nucleo-h743zi/qv/main.cpp | 22 +- examples/arm-cm/dpp_nucleo-h743zi/qxk/bsp.cpp | 150 ++--- .../arm-cm/dpp_nucleo-h743zi/qxk/gnu/Makefile | 14 +- .../arm-cm/dpp_nucleo-h743zi/qxk/main.cpp | 19 +- examples/arm-cm/dpp_nucleo-h743zi/table.cpp | 6 +- examples/arm-cm/dpp_nucleo-l053r8/dpp.hpp | 2 +- examples/arm-cm/dpp_nucleo-l053r8/dpp.qm | 2 +- examples/arm-cm/dpp_nucleo-l053r8/philo.cpp | 6 +- examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.cpp | 10 +- .../arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile | 6 +- examples/arm-cm/dpp_nucleo-l053r8/qxk/bsp.cpp | 12 +- .../arm-cm/dpp_nucleo-l053r8/qxk/gnu/Makefile | 8 +- .../dpp_nucleo-l053r8/qxk/iar/dpp-qxk.ewp | 6 +- examples/arm-cm/dpp_nucleo-l053r8/table.cpp | 6 +- examples/arm-cm/dpp_nucleo-l152re/dpp.hpp | 2 +- examples/arm-cm/dpp_nucleo-l152re/dpp.qm | 2 +- examples/arm-cm/dpp_nucleo-l152re/philo.cpp | 6 +- examples/arm-cm/dpp_nucleo-l152re/table.cpp | 6 +- examples/arm-cm/dpp_nucleo-l552ze/dpp.hpp | 2 +- examples/arm-cm/dpp_nucleo-l552ze/dpp.qm | 2 +- examples/arm-cm/dpp_nucleo-l552ze/philo.cpp | 6 +- examples/arm-cm/dpp_nucleo-l552ze/qk/bsp.cpp | 6 +- examples/arm-cm/dpp_nucleo-l552ze/qxk/bsp.cpp | 10 +- examples/arm-cm/dpp_nucleo-l552ze/table.cpp | 6 +- examples/arm-cm/dpp_stm32f4-discovery/dpp.hpp | 2 +- examples/arm-cm/dpp_stm32f4-discovery/dpp.qm | 2 +- .../arm-cm/dpp_stm32f4-discovery/philo.cpp | 6 +- .../arm-cm/dpp_stm32f4-discovery/qk/bsp.cpp | 25 +- .../arm-cm/dpp_stm32f4-discovery/qv/bsp.cpp | 25 +- .../arm-cm/dpp_stm32f4-discovery/qxk/bsp.cpp | 25 +- .../arm-cm/dpp_stm32f4-discovery/table.cpp | 6 +- .../arm-cm/game_efm32-slstk3401a/game.hpp | 8 +- examples/arm-cm/game_efm32-slstk3401a/game.qm | 2 +- .../arm-cm/game_efm32-slstk3401a/mine1.cpp | 6 +- .../arm-cm/game_efm32-slstk3401a/mine2.cpp | 6 +- .../arm-cm/game_efm32-slstk3401a/missile.cpp | 6 +- .../arm-cm/game_efm32-slstk3401a/qk/bsp.cpp | 25 +- .../arm-cm/game_efm32-slstk3401a/qv/bsp.cpp | 10 +- .../arm-cm/game_efm32-slstk3401a/ship.cpp | 6 +- .../arm-cm/game_efm32-slstk3401a/tunnel.cpp | 6 +- .../low-power_ek-tm4c123gxl/blinky0.cpp | 6 +- .../low-power_ek-tm4c123gxl/blinky1.cpp | 6 +- .../low-power_ek-tm4c123gxl/low-power.qm | 2 +- .../low-power_ek-tm4c123gxl/low_power.hpp | 2 +- .../arm-cm/low-power_ek-tm4c123gxl/qk/bsp.cpp | 5 +- .../arm-cm/low-power_ek-tm4c123gxl/qv/bsp.cpp | 27 +- .../low-power_ek-tm4c123gxl/qxk/bsp.cpp | 5 +- .../arm-cr/dpp_launchxl2-tms57012/dpp.hpp | 2 +- examples/arm-cr/dpp_launchxl2-tms57012/dpp.qm | 2 +- .../arm-cr/dpp_launchxl2-tms57012/philo.cpp | 6 +- .../arm-cr/dpp_launchxl2-tms57012/table.cpp | 6 +- .../embos/arm-cm/dpp_nucleo-h743zi/bsp.cpp | 7 +- .../embos/arm-cm/dpp_nucleo-h743zi/dpp.hpp | 2 +- .../embos/arm-cm/dpp_nucleo-h743zi/dpp.qm | 2 +- .../arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp | 2 +- .../embos/arm-cm/dpp_nucleo-h743zi/philo.cpp | 6 +- .../embos/arm-cm/dpp_nucleo-h743zi/table.cpp | 6 +- .../freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.hpp | 2 +- .../freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.qm | 2 +- .../arm-cm/dpp_ek-tm4c123gxl/philo.cpp | 6 +- .../arm-cm/dpp_ek-tm4c123gxl/table.cpp | 6 +- .../dpp_nucleo-h743zi/armclang/dpp.uvprojx | 2 +- .../freertos/arm-cm/dpp_nucleo-h743zi/bsp.cpp | 2 +- .../freertos/arm-cm/dpp_nucleo-h743zi/dpp.hpp | 2 +- .../freertos/arm-cm/dpp_nucleo-h743zi/dpp.qm | 2 +- .../arm-cm/dpp_nucleo-h743zi/philo.cpp | 6 +- .../arm-cm/dpp_nucleo-h743zi/table.cpp | 6 +- .../armclang/start-stop.uvprojx | 2 +- .../arm-cm/start-stop_nucleo-h743zi/bsp.cpp | 6 +- .../start-stop_nucleo-h743zi/launcher.cpp | 6 +- .../start-stop_nucleo-h743zi/start-stop.qm | 2 +- .../start-stop_nucleo-h743zi/worker.cpp | 6 +- .../start-stop_nucleo-h743zi/worker.hpp | 3 +- examples/msp430/dpp_msp-exp430f5529lp/dpp.hpp | 2 +- examples/msp430/dpp_msp-exp430f5529lp/dpp.qm | 2 +- .../msp430/dpp_msp-exp430f5529lp/philo.cpp | 6 +- .../msp430/dpp_msp-exp430f5529lp/table.cpp | 6 +- .../performance/dpp_efm32-slstk3401a/dpp.hpp | 4 +- .../dpp_efm32-slstk3401a/dpp_qhsm.qm | 7 +- .../dpp_efm32-slstk3401a/dpp_qmsm.qm | 2 +- .../dpp_efm32-slstk3401a/philo.cpp | 183 ++---- .../dpp_efm32-slstk3401a/qk/bsp.cpp | 25 +- .../dpp_efm32-slstk3401a/qv/bsp.cpp | 10 +- .../dpp_efm32-slstk3401a/qxk/bsp.cpp | 3 +- .../dpp_efm32-slstk3401a/table.cpp | 164 ++---- .../dpp_efm32-slstk3401a/ucos-ii/bsp.cpp | 6 +- examples/pic32/dpp_microstick2-pic32/dpp.hpp | 2 +- examples/pic32/dpp_microstick2-pic32/dpp.qm | 2 +- .../pic32/dpp_microstick2-pic32/philo.cpp | 6 +- .../pic32/dpp_microstick2-pic32/table.cpp | 6 +- examples/qt/dpp-gui/dpp.hpp | 2 +- examples/qt/dpp-gui/dpp.qm | 7 +- examples/qt/dpp-gui/philo.cpp | 6 +- examples/qt/dpp-gui/table.cpp | 11 +- examples/qt/dpp/bsp.cpp | 11 +- examples/qt/dpp/dpp.hpp | 2 +- examples/qt/dpp/dpp.qm | 7 +- examples/qt/dpp/philo.cpp | 6 +- examples/qt/dpp/table.cpp | 11 +- examples/qt/game-gui/game.hpp | 3 +- examples/qt/game-gui/game.qm | 2 +- examples/qt/game-gui/mine1.cpp | 6 +- examples/qt/game-gui/mine2.cpp | 6 +- examples/qt/game-gui/missile.cpp | 6 +- examples/qt/game-gui/ship.cpp | 6 +- examples/qt/game-gui/tunnel.cpp | 6 +- examples/qt/pelican-gui/pelican.cpp | 20 +- examples/qt/pelican-gui/pelican.hpp | 2 +- examples/qt/pelican-gui/pelican.qm | 16 +- examples/qutest/blinky/blinky.qm | 2 +- examples/qutest/blinky/src/blinky.cpp | 7 +- examples/qutest/blinky/src/blinky.hpp | 3 +- examples/qutest/blinky/test/Makefile | 10 +- examples/qutest/blinky/test/make_efm32 | 8 +- .../qutest/blinky/test/make_nucleo-h743zi | 334 +++++++++++ .../qutest/blinky/test/make_nucleo-l053r8 | 18 +- examples/qutest/blinky/test/make_tm4c123 | 8 +- examples/qutest/blinky/test/test_blinky.cpp | 31 +- examples/qutest/blinky/test/test_blinky.py | 3 +- examples/qutest/dpp-comp/dpp-comp.qm | 2 +- examples/qutest/dpp-comp/src/bsp.cpp | 7 +- examples/qutest/dpp-comp/src/dpp.hpp | 4 +- examples/qutest/dpp-comp/src/philo.cpp | 6 +- examples/qutest/dpp-comp/src/table.cpp | 8 +- examples/qutest/dpp-comp/test_dpp/Makefile | 10 +- examples/qutest/dpp-comp/test_dpp/make_efm32 | 8 +- .../dpp-comp/test_dpp/make_nucleo-l053r8 | 12 +- examples/qutest/dpp-comp/test_dpp/make_posix | 8 +- .../qutest/dpp-comp/test_dpp/make_tm4c123 | 8 +- examples/qutest/dpp-comp/test_philo/Makefile | 10 +- examples/qutest/dpp-comp/test_table/Makefile | 10 +- examples/qutest/dpp/dpp.qm | 2 +- examples/qutest/dpp/src/bsp.cpp | 7 +- examples/qutest/dpp/src/dpp.hpp | 2 +- examples/qutest/dpp/src/philo.cpp | 6 +- examples/qutest/dpp/src/table.cpp | 6 +- examples/qutest/dpp/test_dpp/Makefile | 10 +- examples/qutest/dpp/test_dpp/make_efm32 | 8 +- .../qutest/dpp/test_dpp/make_nucleo-l053r8 | 12 +- examples/qutest/dpp/test_dpp/make_posix | 8 +- examples/qutest/dpp/test_dpp/make_tm4c123 | 8 +- examples/qutest/dpp/test_philo/Makefile | 10 +- examples/qutest/dpp/test_table/Makefile | 10 +- examples/qutest/evt_par/test/Makefile | 10 +- examples/qutest/evt_par/test/make_tm4c123 | 8 +- examples/qutest/qhsmtst/qhsmtst.qm | 2 +- examples/qutest/qhsmtst/src/qhsmtst.cpp | 8 +- examples/qutest/qhsmtst/src/qhsmtst.hpp | 4 +- examples/qutest/qhsmtst/test/Makefile | 10 +- .../qutest/qhsmtst/test/make_nucleo-l053r8 | 12 +- examples/qutest/qhsmtst/test/make_tm4c123 | 8 +- .../qutest/qhsmtst/test/test_qhsm-struct.py | 2 +- examples/qutest/qmsmtst/qmsmtst.qm | 2 +- examples/qutest/qmsmtst/src/qmsmtst.cpp | 6 +- examples/qutest/qmsmtst/src/qmsmtst.hpp | 2 +- examples/qutest/qmsmtst/test/Makefile | 10 +- .../qutest/qmsmtst/test/make_nucleo-l053r8 | 12 +- examples/qutest/qmsmtst/test/make_tm4c123 | 8 +- examples/qutest/self_test/test/Makefile | 10 +- examples/qutest/self_test/test/make_efm32 | 8 +- .../qutest/self_test/test/make_nucleo-l053r8 | 12 +- examples/qutest/self_test/test/make_tm4c123 | 8 +- examples/qutest/self_test/test/test_assert.py | 33 +- .../qutest/self_test/test/test_command.py | 18 +- examples/qutest/self_test/test/test_fp.py | 8 +- .../qutest/self_test/test/test_include.pyi | 2 +- .../qutest/self_test/test/test_last-rec.py | 24 +- .../qutest/self_test/test/test_mem-str.py | 8 +- examples/qutest/self_test/test/test_probe.py | 20 +- .../qutest/self_test/test/test_qutest.cpp | 113 ++-- examples/qutest/start_seq/gizmo.qm | 112 ++++ examples/qutest/start_seq/src/bsp.cpp | 61 ++ examples/qutest/start_seq/src/bsp.hpp | 46 ++ examples/qutest/start_seq/src/gizmo.cpp | 146 +++++ examples/qutest/start_seq/src/gizmo.hpp | 52 ++ examples/qutest/start_seq/test/Makefile | 273 +++++++++ .../qutest/start_seq/test/test_fixture.cpp | 100 ++++ .../qutest/start_seq/test/test_start_seq.py | 53 ++ .../threadx/arm-cm/dpp_ek-tm4c123gxl/bsp.cpp | 5 +- .../threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.hpp | 2 +- .../threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.qm | 2 +- .../arm-cm/dpp_ek-tm4c123gxl/philo.cpp | 6 +- .../arm-cm/dpp_ek-tm4c123gxl/table.cpp | 6 +- .../arm-cm/dpp_stm32f429-discovery/bsp.cpp | 5 +- .../arm-cm/dpp_stm32f429-discovery/dpp.hpp | 2 +- .../arm-cm/dpp_stm32f429-discovery/dpp.qm | 2 +- .../arm-cm/dpp_stm32f429-discovery/philo.cpp | 6 +- .../arm-cm/dpp_stm32f429-discovery/table.cpp | 6 +- .../uc-os2/arm-cm/dpp_ek-tm4c123gxl/bsp.cpp | 10 +- .../uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.hpp | 2 +- .../uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.qm | 2 +- .../uc-os2/arm-cm/dpp_ek-tm4c123gxl/philo.cpp | 6 +- .../uc-os2/arm-cm/dpp_ek-tm4c123gxl/table.cpp | 6 +- .../uc-os2/arm-cm/dpp_nucleo-l053r8/bsp.cpp | 6 +- .../uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.hpp | 2 +- .../uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.qm | 2 +- .../uc-os2/arm-cm/dpp_nucleo-l053r8/philo.cpp | 6 +- .../uc-os2/arm-cm/dpp_nucleo-l053r8/table.cpp | 6 +- examples/workstation/blinky/Makefile | 2 +- examples/workstation/blinky/blinky.cpp | 6 +- examples/workstation/blinky/blinky.qm | 2 +- examples/workstation/calc/Makefile | 2 +- examples/workstation/calc/calc.cpp | 6 +- examples/workstation/calc/calc.hpp | 4 +- examples/workstation/calc/calc.qm | 2 +- examples/workstation/calc1/Makefile | 2 +- examples/workstation/calc1/calc1.cpp | 6 +- examples/workstation/calc1/calc1.hpp | 3 +- examples/workstation/calc1/calc1.qm | 2 +- examples/workstation/calc1_sub/Makefile | 2 +- examples/workstation/calc1_sub/calc1_sub.cpp | 6 +- examples/workstation/calc1_sub/calc1_sub.hpp | 2 +- examples/workstation/calc1_sub/calc1_sub.qm | 2 +- examples/workstation/calc2/Makefile | 2 +- examples/workstation/calc2/calc2.cpp | 6 +- examples/workstation/calc2/calc2.hpp | 3 +- examples/workstation/calc2/calc2.qm | 2 +- examples/workstation/comp/Makefile | 2 +- examples/workstation/comp/alarm.cpp | 6 +- examples/workstation/comp/alarm.hpp | 4 +- examples/workstation/comp/clock.cpp | 6 +- examples/workstation/comp/clock.hpp | 3 +- examples/workstation/comp/comp.qm | 2 +- examples/workstation/defer/Makefile | 2 +- examples/workstation/defer/defer.cpp | 7 +- examples/workstation/defer/defer.qm | 2 +- examples/workstation/dpp-comp/Makefile | 2 +- examples/workstation/dpp-comp/bsp.cpp | 8 +- examples/workstation/dpp-comp/dpp-comp.qm | 2 +- examples/workstation/dpp-comp/dpp.hpp | 4 +- examples/workstation/dpp-comp/philo.cpp | 6 +- examples/workstation/dpp-comp/table.cpp | 8 +- examples/workstation/dpp/Makefile | 7 +- examples/workstation/dpp/Makefile_t | 2 +- examples/workstation/dpp/bsp.cpp | 7 +- examples/workstation/dpp/dpp.hpp | 2 +- examples/workstation/dpp/dpp.qm | 2 +- examples/workstation/dpp/philo.cpp | 6 +- examples/workstation/dpp/table.cpp | 6 +- examples/workstation/history_qhsm/Makefile | 2 +- examples/workstation/history_qhsm/history.cpp | 7 +- examples/workstation/history_qhsm/history.hpp | 4 +- examples/workstation/history_qhsm/history.qm | 2 +- examples/workstation/history_qmsm/Makefile | 2 +- examples/workstation/history_qmsm/history.cpp | 6 +- examples/workstation/history_qmsm/history.hpp | 2 +- examples/workstation/history_qmsm/history.qm | 2 +- examples/workstation/qhsmtst/Makefile | 2 +- examples/workstation/qhsmtst/qhsmtst.cpp | 7 +- examples/workstation/qhsmtst/qhsmtst.hpp | 3 +- examples/workstation/qhsmtst/qhsmtst.qm | 2 +- examples/workstation/qmsmtst/Makefile | 2 +- examples/workstation/qmsmtst/qmsmtst.cpp | 6 +- examples/workstation/qmsmtst/qmsmtst.hpp | 2 +- examples/workstation/qmsmtst/qmsmtst.qm | 2 +- examples/workstation/reminder/Makefile | 2 +- examples/workstation/reminder2/Makefile | 2 +- examples/workstation/reminder2/reminder2.cpp | 6 +- examples/workstation/reminder2/reminder2.qm | 2 +- examples/zephyr/dpp/dpp.qm | 2 +- examples/zephyr/dpp/src/dpp.hpp | 2 +- examples/zephyr/dpp/src/philo.cpp | 6 +- examples/zephyr/dpp/src/table.cpp | 6 +- include/qep.hpp | 28 +- include/qequeue.hpp | 2 +- include/qf.hpp | 94 ++- include/qf_pkg.hpp | 4 +- include/qk.hpp | 28 +- include/qmpool.hpp | 4 +- include/qpcpp.hpp | 9 +- include/qs.hpp | 118 +++- include/qs_dummy.hpp | 5 +- include/qs_pkg.hpp | 2 +- include/qstamp.hpp | 2 +- include/qv.hpp | 2 +- include/qxk.hpp | 34 +- ports/arm-cm/qk/armclang/qk_port.cpp | 47 +- ports/arm-cm/qk/armclang/qk_port.hpp | 18 +- ports/arm-cm/qk/gnu/qk_port.cpp | 52 +- ports/arm-cm/qk/gnu/qk_port.hpp | 15 +- ports/arm-cm/qk/iar/qk_port.cpp | 82 +-- ports/arm-cm/qk/iar/qk_port.hpp | 15 +- ports/arm-cm/qv/armclang/qv_port.cpp | 117 ++-- ports/arm-cm/qv/armclang/qv_port.hpp | 21 +- ports/arm-cm/qv/gnu/qv_port.cpp | 116 ++-- ports/arm-cm/qv/gnu/qv_port.hpp | 21 +- ports/arm-cm/qv/iar/qv_port.cpp | 126 ++-- ports/arm-cm/qv/iar/qv_port.hpp | 21 +- ports/arm-cm/qxk/armclang/qxk_port.cpp | 45 +- ports/arm-cm/qxk/armclang/qxk_port.hpp | 13 +- ports/arm-cm/qxk/gnu/qxk_port.cpp | 57 +- ports/arm-cm/qxk/gnu/qxk_port.hpp | 11 +- ports/arm-cm/qxk/iar/qxk_port.cpp | 89 +-- ports/arm-cm/qxk/iar/qxk_port.hpp | 13 +- ports/freertos/qf_port.hpp | 12 +- ports/lint-plus/32bit/qs_port.hpp | 19 +- ports/lint-plus/qk/qk_port.hpp | 6 +- ports/lint-plus/qpcpp.lnt | 30 +- ports/lint-plus/qxk/qxk_port.hpp | 6 +- ports/posix-qutest/qs_port.hpp | 7 +- ports/posix-qutest/qutest_port.cpp | 22 +- ports/posix-qv/qs_port.hpp | 17 +- ports/posix/qs_port.hpp | 13 +- ports/sample/README.md | 3 + ports/{win32-quit => sample}/qep_port.hpp | 46 +- ports/sample/qf_port.hpp | 308 ++++++++++ ports/sample/qk_port.hpp | 83 +++ ports/{win32-quit => sample}/qs_port.hpp | 32 +- ports/win32-quit/qf_port.hpp | 101 ---- ports/win32-quit/quit_port.cpp | 132 ----- ports/win32-qutest/qs_port.hpp | 7 +- ports/win32-qutest/qutest_port.cpp | 44 +- ports/win32-qv/qs_port.hpp | 11 +- ports/win32/qs_port.hpp | 5 +- qpcpp.qm | 545 +++++++++++------- src/qf/qep_hsm.cpp | 13 +- src/qf/qep_msm.cpp | 24 +- src/qf/qf_act.cpp | 2 +- src/qf/qf_actq.cpp | 6 +- src/qf/qf_defer.cpp | 6 +- src/qf/qf_dyn.cpp | 6 +- src/qf/qf_mem.cpp | 6 +- src/qf/qf_ps.cpp | 6 +- src/qf/qf_qact.cpp | 6 +- src/qf/qf_qeq.cpp | 6 +- src/qf/qf_qmact.cpp | 6 +- src/qf/qf_time.cpp | 6 +- src/qk/qk.cpp | 75 +-- src/qs/qs.cpp | 30 +- src/qs/qs_64bit.cpp | 6 +- src/qs/qs_fp.cpp | 6 +- src/qs/qs_rx.cpp | 10 +- src/qs/qstamp.cpp | 2 +- src/qs/qutest.cpp | 34 +- src/qv/qv.cpp | 53 +- src/qxk/qxk.cpp | 107 ++-- src/qxk/qxk_mutex.cpp | 6 +- src/qxk/qxk_sema.cpp | 6 +- src/qxk/qxk_xthr.cpp | 6 +- test/qk/test_sched/bsp.hpp | 10 +- test/qk/test_sched/bsp_efm32.cpp | 198 ++++++- test/qk/test_sched/bsp_h743zi.cpp | 307 ++++++++++ test/qk/test_sched/bsp_l053r8.cpp | 209 ++++++- test/qk/test_sched/make_efm32 | 10 +- test/qk/test_sched/make_nucleo-h743zi | 346 +++++++++++ test/qk/test_sched/make_nucleo-l053r8 | 14 +- test/qk/test_sched/test_mpu.py | 100 ++++ test/qk/test_sched/test_sched.cpp | 112 +++- test/qk/test_sched/test_sched.py | 39 +- test/qxk/test_sched/bsp.hpp | 10 +- test/qxk/test_sched/bsp_efm32.cpp | 198 ++++++- test/qxk/test_sched/bsp_h743zi.cpp | 307 ++++++++++ test/qxk/test_sched/bsp_l053r8.cpp | 212 ++++++- test/qxk/test_sched/make_efm32 | 10 +- test/qxk/test_sched/make_nucleo-h743zi | 349 +++++++++++ test/qxk/test_sched/make_nucleo-l053r8 | 14 +- test/qxk/test_sched/test_mpu.py | 100 ++++ test/qxk/test_sched/test_sched.cpp | 111 +++- test/qxk/test_sched/test_sched.py | 19 +- test/qxk/test_sched/uvision_efm32.uvprojx | 2 +- zephyr/qf_port.hpp | 20 +- 409 files changed, 7025 insertions(+), 3573 deletions(-) delete mode 100644 doxygen/images/hsm.png rename doxygen/snippets/{qk_oncontextsw.cpp => qf_oncontextsw.cpp} (78%) delete mode 100644 doxygen/snippets/qxk_oncontextsw.cpp create mode 100644 examples/qutest/blinky/test/make_nucleo-h743zi create mode 100644 examples/qutest/start_seq/gizmo.qm create mode 100644 examples/qutest/start_seq/src/bsp.cpp create mode 100644 examples/qutest/start_seq/src/bsp.hpp create mode 100644 examples/qutest/start_seq/src/gizmo.cpp create mode 100644 examples/qutest/start_seq/src/gizmo.hpp create mode 100644 examples/qutest/start_seq/test/Makefile create mode 100644 examples/qutest/start_seq/test/test_fixture.cpp create mode 100644 examples/qutest/start_seq/test/test_start_seq.py create mode 100644 ports/sample/README.md rename ports/{win32-quit => sample}/qep_port.hpp (55%) create mode 100644 ports/sample/qf_port.hpp create mode 100644 ports/sample/qk_port.hpp rename ports/{win32-quit => sample}/qs_port.hpp (73%) delete mode 100644 ports/win32-quit/qf_port.hpp delete mode 100644 ports/win32-quit/quit_port.cpp create mode 100644 test/qk/test_sched/bsp_h743zi.cpp create mode 100644 test/qk/test_sched/make_nucleo-h743zi create mode 100644 test/qk/test_sched/test_mpu.py create mode 100644 test/qxk/test_sched/bsp_h743zi.cpp create mode 100644 test/qxk/test_sched/make_nucleo-h743zi create mode 100644 test/qxk/test_sched/test_mpu.py diff --git a/3rd_party b/3rd_party index cc033393..fa069699 160000 --- a/3rd_party +++ b/3rd_party @@ -1 +1 @@ -Subproject commit cc0333938b9618b5a25394ebd81c8f235f5ff192 +Subproject commit fa06969955bfa96cbdb5b9ff8b05b66f49fad890 diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile index c65a300c..07892b74 100644 --- a/doxygen/Doxyfile +++ b/doxygen/Doxyfile @@ -7,7 +7,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = QP/C++ -PROJECT_NUMBER = 7.1.3 +PROJECT_NUMBER = 7.2.0 PROJECT_BRIEF = "Real-Time Embedded Framework" PROJECT_LOGO = ../../ql-doxygen/images/logo_ql.png OUTPUT_DIRECTORY = @@ -131,6 +131,7 @@ INPUT = main.dox \ ../../cert-pack/sds_sm-cpp.dox \ ../../cert-pack/autosar.dox \ ../../cert-pack/metrics.dox \ + history.dox \ exa.dox \ exa_native.dox \ exa_rtos.dox \ @@ -143,12 +144,12 @@ INPUT = main.dox \ ports_rtos.dox \ ports_os.dox \ api.dox \ - history.dox \ ../../ql-doxygen/help.dox \ dir.dox \ config.hpp \ ../include \ ../src \ + ../ports/sample \ ../ports/lint-plus/std.lnt \ ../ports/lint-plus/qpcpp.lnt \ ../ports/lint-plus/options.lnt @@ -163,8 +164,7 @@ FILE_PATTERNS = *.dox \ *.asm \ *.lnt RECURSIVE = YES -EXCLUDE = ../include/qs_dummy.hpp \ - ../include/quit.hpp +EXCLUDE = ../include/qs_dummy.hpp EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXCLUDE_SYMBOLS = QP_IMPL @@ -288,8 +288,9 @@ SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = Q_SPY \ - QP_IMPL \ Q_UTEST \ + QP_IMPL \ + Q_EVT_CTOR \ QF_MAX_ACTIVE=32 \ QF_MAX_TICK_RATE=2 \ QF_MAX_EPOOL=3 \ @@ -299,11 +300,10 @@ PREDEFINED = Q_SPY \ QF_MPOOL_CTR_SIZE=2 \ QF_TIMEEVT_CTR_SIZE=4 \ QF_ACTIVE_STOP=0 \ + QF_ON_CONTEXT_SW \ QS_TIME_SIZE=4 \ QF_EQUEUE_TYPE=QEQueue \ QF_OS_OBJECT_TYPE=void* \ - QF_THREAD_TYPE=void* \ - QK_ON_CONTEXT_SW \ - QXK_ON_CONTEXT_SW + QF_THREAD_TYPE=void* EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES +SKIP_FUNCTION_MACROS = NO diff --git a/doxygen/config.hpp b/doxygen/config.hpp index f9a19238..39b115b7 100644 --- a/doxygen/config.hpp +++ b/doxygen/config.hpp @@ -15,220 +15,6 @@ //! failures when the switch Q_NASSERT is defined. #define Q_NASSERT -//! The maximum number of active objects in the application. -//! -//! @description -//! This macro *must* be defined in the QF port and should be in range -//! of 1U..64U, inclusive. The value of this macro determines the maximum -//! priority level of an active object in the system. Not all priority -//! levels must be used, but the maximum priority cannot exceed -//! #QF_MAX_ACTIVE. -//! -//! @note Once you choose a certain value of #QF_MAX_ACTIVE, you must -//! consistently use the same value in building all the QP component libraries -//! and your own application code. The consistency is guaranteed if you define -//! this macro only once in the qf_port.hpp header file and henceforth include -//! this header file in all builds. -#define QF_MAX_ACTIVE 32U - -//! The maximum number of clock tick rates in the application. -//! -//! @description -//! This macro can be defined in the QF ports and should be in range -//! of 1U..15U, inclusive. The value of this macro determines the maximum -//! number of clock tick rates for time events (::QTimeEvt). -//! -//! If the macro is not defined, the default value is 1U. -//! -//! @note Once you choose a certain value of #QF_MAX_TICK_RATE, you must -//! consistently use the same value in building all the QP component libraries -//! and your own application code. The consistency is guaranteed if you define -//! this macro only once in the qf_port.h header file and henceforth include -//! this header file in all builds. -#define QF_MAX_TICK_RATE 1U - -//! The maximum number of event pools in the application. -//! -//! This macro should be defined in the QF port and should be in range -//! of 1..255, inclusive. The value of this macro determines the maximum -//! number of event pools in the system. Not all all these event pools must -//! actually be used by the applications, but the maximum number of pools -//! cannot exceed #QF_MAX_EPOOL. -//! -//! If the macro is not defined, the default value is 3 -//! -//! @note Once you choose a certain value of #QF_MAX_EPOOL, you must -//! consistently use the same value in building all the QP component libraries -//! and your own application code. The consistency is guaranteed if you define -//! this macro only once in the qf_port.hpp header file and henceforth include -//! this header file in all builds. -#define QF_MAX_EPOOL 3U - -//! The size (in bytes) of the event-size representation in the QF. -//! Valid values: 1U, 2U, or 4U; default 2U -//! -//! @description -//! This macro can be defined in the QF ports to configure the size -//! of the event-size. -//! -//! @note Once you choose a certain value of #QF_EVENT_SIZ_SIZE, you must -//! consistently use the same value in building all the QP component libraries -//! and your own application code. The consistency is guaranteed if you define -//! this macro only once in the qf_port.hpp header file and henceforth include -//! this header file in all builds. -#define QF_EVENT_SIZ_SIZE 2U - -//! The size (in bytes) of the ring-buffer counters used in the native -//! QF event queue implementation. Valid values: 1U, 2U, or 4U; default 1U -//! -//! @description -//! This macro can be defined in the QF ports to configure the QP::QEQueueCtr -//! type. If the macro is not defined, the default of 1 byte will be chosen -//! in qequeue.hpp. The valid #QF_EQUEUE_CTR_SIZE values of 1U, 2U, or 4U, -//! correspond to QP::QEQueueCtr of uint8_t, uint16_t, and uint32_t, -//! respectively. The QP::QEQueueCtr data type determines the dynamic range -//! of numerical values of ring-buffer counters inside event queues, or, -//! in other words, the maximum number of events that the native QF event -//! queue can manage. -//! @sa QP::QEQueue -//! -//! @note Once you choose a certain value of #QF_EQUEUE_CTR_SIZE, you must -//! consistently use the same value in building all the QP component libraries -//! and your own application code. The consistency is guaranteed if you define -//! this macro only once in the qf_port.hpp header file and henceforth include -//! this header file in all builds. -#define QF_EQUEUE_CTR_SIZE 1U - -//! The size (in bytes) of the block-size representation in the -//! native QF event pool. Valid values: 1U, 2U, or 4U; default 2U. -//! #QF_EVENT_SIZ_SIZE. -//! -//! @description -//! This macro can be defined in the QF ports to configure the QP::QMPoolSize -//! type. If the macro is not defined, the default of #QF_EVENT_SIZ_SIZE -//! will be chosen in qmpool.hpp, because the memory pool is primarily used for -//! implementing event pools. -//! -//! The valid #QF_MPOOL_SIZ_SIZE values of 1U, 2U, or 4U, correspond to -//! QP::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The -//! QP::QMPoolSize data type determines the dynamic range of block-sizes that -//! the native QP::QMPool can hanle. -//! @sa #QF_EVENT_SIZ_SIZE, QP::QMPool -//! -//! @note Once you choose a certain value of #QF_MPOOL_SIZ_SIZE, you must -//! consistently use the same value in building all the QP component libraries -//! and your own application code. The consistency is guaranteed if you define -//! this macro only once in the qf_port.hpp header file and henceforth include -//! this header file in all builds. -#define QF_MPOOL_SIZ_SIZE 2U - -//! The size (in bytes) of the block-counter representation in the -//! native QF event pool. Valid values: 1U, 2U, or 4U; default 2U. -//! -//! @description -//! This macro can be defined in the QF ports to configure the QP::QMPoolCtr -//! type. If the macro is not defined, the default of 2 bytes will be chosen -//! in qmpool.hpp. The valid #QF_MPOOL_CTR_SIZE values of 1, 2, or 4, correspond -//! to QP::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The -//! QP::QMPoolCtr data type determines the dynamic range of block-counters that -//! the native QP::QMPool can handle, or, in other words, the maximum number -//! of blocks that the native QF event pool can manage. -//! @sa QP::QMPool -//! -//! @note Once you choose a certain value of #QF_MPOOL_CTR_SIZE, you must -//! consistently use the same value in building all the QP component libraries -//! and your own application code. The consistency is guaranteed if you define -//! this macro only once in the qf_port.hpp header file and henceforth include -//! this header file in all builds. -#define QF_MPOOL_CTR_SIZE 2U - -//! The size (in bytes) of the time event -counter representation -//! in the QP::QTimeEvt class. Valid values: 1U, 2U, or 4U; default 2U. -//! -//! @description -//! This macro can be defined in the QF ports to configure the internal tick -//! counters of Time Events. If the macro is not defined, the default of 4 -//! bytes will be chosen in qf.hpp. The valid #QF_TIMEEVT_CTR_SIZE values of -//! 1U, 2U, or 4U, correspond to tick counters of uint8_t, uint16_t, and -//! uint32_t, respectively. The tick counter representation determines the -//! dynamic range of time delays that a Time Event can handle. -//! @sa QP::QTimeEvt -//! -//! @note Once you choose a certain value of #QF_TIMEEVT_CTR_SIZE, you must -//! consistently use the same value in building all the QP component libraries -//! and your own application code. The consistency is guaranteed if you define -//! this macro only once in the qf_port.hpp header file and henceforth include -//! this header file in all builds. -#define QF_TIMEEVT_CTR_SIZE 4U - -//! Size (in bytes) of the QS time stamp -//! -//! @description -//! This macro can be defined in the QS port file (qs_port.hpp) to configure -//! the QP::QSTimeCtr type. Valid values 1U, 2U, 4U. Default 4U. -#define QS_TIME_SIZE 4U - -//! Define the interrupt disabling policy. -//! -//! @description -//! This macro encapsulates platform-specific way of disabling interrupts -//! from C++ for a given CPU and compiler. -//! -//! @note the #QF_INT_DISABLE macro should always be used in pair with the -//! macro #QF_INT_ENABLE. -//! -#define QF_INT_DISABLE() intDisable() - -//! Define the interrupt enabling policy. -//! -//! @description -//! This macro encapsulates platform-specific way of enabling interrupts -//! from "C" for a given CPU and compiler. -//! -//! @note the #QF_INT_DISABLE macro should always be used in pair with the -//! macro #QF_INT_ENABLE. -//! -#define QF_INT_ENABLE() intEnable() - -//! Define the type of the critical section status. -//! -//! @description -//! Defining this macro configures the "saving and restoring critical section -//! status" policy. Conversely, if this macro is not defined, the simple -//! "unconditional critical section exit" is used. -//! -#define QF_CRIT_STAT_TYPE unsigned - -//! Define the critical section entry policy. -//! -//! This macro enters a critical section (often by means of disabling -//! interrupts). When the "saving and restoring critical section status" -//! policy is used, the macro sets the \a status_ argument to the critical -//! section status just before the entry. When the policy of "unconditional -//! critical section exit" is used, the macro does not use the \a status_ -//! argument. -//! -//! @note the #QF_CRIT_ENTRY macro should always be used in pair with the -//! macro #QF_CRIT_EXIT. -//! -#define QF_CRIT_ENTRY(stat_) ((stat_) = critEntry()) - -//! Define the critical section exit policy. -//! -//! @description -//! This macro enters a critical section (often by means of disabling -//! interrupts). When the "saving and restoring critical section status" -//! policy is used, the macro restores the critical section status from the -//! @a status_ argument. When the policy of "unconditional critical section -//! exit" is used, the macro does not use the \a status argument and -//! exits the critical section unconditionally (often by means of enabling -//! interrupts). -//! -//! @note the #QF_CRIT_ENTRY macro should always be used in pair with the -//! macro #QF_CRIT_EXIT. -//! -#define QF_CRIT_EXIT(stat_) critExit(stat_) - //! Enable the QActive::stop() API in the QF port. //! //! @description @@ -270,119 +56,9 @@ //! not generate any code. #define Q_SPY -//! The preprocessor switch to activate the QUTest unit testing -//! instrumentation in the code -//! -//! @note -//! This macro requires that #Q_SPY be defined as well. -#define Q_UTEST - -//! This macro defines the type of the thread handle used for AOs -#define QF_THREAD_TYPE void* - -//! This macro defines the type of the event-queue used for AOs -#define QF_EQUEUE_TYPE QEQueue - -//! This macro defines the type of the OS-Object used for blocking -//! the native ::QEQueue when the queue is empty -//! -//! @description -//! This macro is used when ::QEQueue is used as the event-queue for AOs -//! but also the AO queue must *block* when the queue is empty. -//! In that case, #QF_OS_OBJECT_TYPE specifies the blocking mechanism. -//! For examle, in the POSIX port, the blocking mechanism is a condition -//! variable. -//! -#define QF_OS_OBJECT_TYPE pthread_cond_t - -//! Platform-dependent macro defining how QF should block the calling -//! task when the QF native queue is empty -//! -//! @note -//! This is just an example of #QACTIVE_EQUEUE_WAIT_ for the QK-port -//! of QF. QK never activates a task that has no events to process, so in this -//! case the macro asserts that the queue is not empty. In other QF ports you -//! need to define the macro appropriately for the underlying kernel/OS you're -//! using. -#define QACTIVE_EQUEUE_WAIT_(me_) \ - Q_ASSERT((me_)->m_eQueue.m_frontEvt != nullptr) - -//! Platform-dependent macro defining how QF should signal the -//! active object task that an event has just arrived. -//! -//! @description -//! The macro is necessary only when the native QF event queue is used. -//! The signaling of task involves unblocking the task if it is blocked. -//! -//! @note #QACTIVE_EQUEUE_SIGNAL_ is called from a critical section. -//! It might leave the critical section internally, but must restore -//! the critical section before exiting to the caller. -//! -//! @note This is just an example of #QACTIVE_EQUEUE_SIGNAL_ for the QK-port -//! of QF. In other QF ports you need to define the macro appropriately for -//! the underlying kernel/OS you're using. -#define QACTIVE_EQUEUE_SIGNAL_(me_) do { \ - QF::readySet_.insert((me_)->m_prio); \ - if (QF::intNest_ == 0U) { \ - uint8_t p = QK_schedPrio_(); \ - if (p != 0U) { \ - QK_sched_(p); \ - } \ - } \ -} while (false) - -//! This macro defines the type of the event pool used in this QF port. -//! -//! @note -//! This is a specific implementation for the QK-port of QF. -//! In other QF ports you need to define the macro appropriately for -//! the underlying kernel/OS you're using. -#define QF_EPOOL_TYPE_ QMPool - //! This macro enables calling the QK context-switch callback -//! QK_onContextSw() -#define QK_ON_CONTEXT_SW - -//! This macro enables calling the QXK context-switch callback -//! QXK_onContextSw() -#define QXK_ON_CONTEXT_SW - -//! Platform-dependent macro defining the event pool initialization -//! -//! @note -//! This is a specific implementation for the QK-port of QF. -//! In other QF ports you need to define the macro appropriately for -//! the underlying kernel/OS you're using. -#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \ - (p_).init((poolSto_), (poolSize_), static_cast(evtSize_)) - -//! Platform-dependent macro defining how QF should obtain the -//! event pool block-size -//! -//! @note -//! This is a specific implementation for the QK-port of QF. -//! In other QF ports you need to define the macro appropriately for -//! the underlying kernel/OS you're using. -#define QF_EPOOL_EVENT_SIZE_(p_) static_cast((p_).getBlockSize()) - -//! Platform-dependent macro defining how QF should obtain an event -//! @a e_ from the event pool @a p_ -//! -//! @note -//! This is a specific implementation for the QK-port of QF. -//! In other QF ports you need to define the macro appropriately for -//! the underlying kernel/OS you're using. -#define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \ - ((e_) = static_cast((p_).get((m_), (qs_id_)))) - -//! Platform-dependent macro defining how QF should return an event -//! @a e_ to the event pool @a p_ -//! -//! @note -//! This is a specific implementation for the QK-port of QF. -//! In other QF ports you need to define the macro appropriately for -//! the underlying kernel/OS you're using. -#define QF_EPOOL_PUT_(p_, e_, qs_id_) ((p_).put((e_), (qs_id_))) +//! QF_onContextSw() +#define QF_ON_CONTEXT_SW //! Macro that should be defined (typically on the compiler's command line) //! in the Win32-GUI applications that use the @ref win32 or @ref win32-qv diff --git a/doxygen/dir.dox b/doxygen/dir.dox index 4bc91dc2..8a1e2460 100644 --- a/doxygen/dir.dox +++ b/doxygen/dir.dox @@ -16,7 +16,7 @@ The QP™/C++ src directory needs to be adde */ /*##########################################################################*/ /*! @dir src/qf -@brief Platform-independent implementation of the @ref qep and @ref qf components. +@brief Platform-independent implementation of the QEP and QF components. @note Typically, files in this directory need to be added to the application build, but some QP ports might not need all the files in this directory. For example, a QP port to a 3rd-party RTOS kernel might be using a message queue of the RTOS instead of the native QP event queue, in which case the file qf_actq.c would not be needed and should be excluded from the build. @@ -44,15 +44,5 @@ Files in this directory need to be included in the QP application build only if */ /*##########################################################################*/ /*! @dir src/qs -@brief Platform-independent implementation of the @ref qs component (software tracing). -*/ -/*##########################################################################*/ -/*! @dir test -@brief System-level tests of the QP/C++ framework itself. - -@@note -The `qpcpp/test/` directory is planned to contain a growing number of system-level tests, which are based on QUTest, but *without* the QP-stub. The tests take advantage of the new QUTest configuration, where the QP-stub is NOT included (because the actual QP framework is linked). This configuration is activated by defining macro `Q_UTEST=0`. - -@attention -Many tests provided in the `qpcpp/test/` directory run only on embedded targets and cannot run on the host machine. +@brief Platform-independent implementation of the QS component (software tracing). */ diff --git a/doxygen/exa_rtos.dox b/doxygen/exa_rtos.dox index d1e3cf31..f6664136 100644 --- a/doxygen/exa_rtos.dox +++ b/doxygen/exa_rtos.dox @@ -14,7 +14,9 @@ The main purpose of integrating QP/C++ with conventional RTOSes is to enable you @note You do **not** need to use a third-party RTOS just to achieve preemptive multitasking with QP/C++. The framework contains a selection of built-in real-time kernels, such as the cooperative @ref srs_qv "QV kernel", the preemptive non-blocking @ref srs_qk "QK kernel", and the preemptive, dual-mode, blocking @ref srs_qxk "QXK kernel". Specifically, the QXK kernel has been designed specifically for mixing event-driven active objects with traditional **blocking code**, such as commercial middleware (TCP/IP stacks, UDP stacks, embedded file systems, etc.) or legacy software. -@next{exa_embos examples} +@ifnot LATEX +@nav_next{exa_embos} +@endif */ /*##########################################################################*/ @@ -28,14 +30,18 @@ The QP/C++ examples for SEGGER embOS are as follows: @note You can hover the mouse cursor over the    icon in the list below to see the picture of the board. -@next{embos_dpp_nucleo-h743zi} +@ifnot LATEX +@nav_next{embos_dpp_nucleo-h743zi} +@endif */ /*##########################################################################*/ /*! @page embos_dpp_nucleo-h743zi DPP on NUCLEO-H743ZI The @ref dpp "DPP example" for embOS on NUCLEO-H743ZI board is located directory examples/embos/arm-cm/dpp_nucleo-h743zi. -@image html bd_NUCLEO-H743ZI.jpg NUCLEO-H743ZI +@image html bd_NUCLEO-H743ZI.jpg +@image latex bd_NUCLEO-H743ZI.jpg width=4.5in +@caption{NUCLEO-H743ZI} @ref dpp "Dining Philosophers Problem (DPP)" example for NUCLEO-H743ZI MCU (Cortex-M7). @@ -68,7 +74,9 @@ qspy -c COM4 The actual COM port number might be different on your Windows machine. Please check the Device Manager to find the COM port number. -@next{exa_freertos examples} +@ifnot LATEX +@nav_next{exa_freertos} +@endif */ /*##########################################################################*/ @@ -85,12 +93,16 @@ The QP/C++ examples for FreeRTOS are as follows: @note You can hover the mouse cursor over the    icon in the list below to see the picture of the board. -@next{exa_os examples} +@ifnot LATEX +@nav_next{exa_os} +@endif */ /*##########################################################################*/ /*! @page freertos_dpp_ek-tm4c123gxl DPP on EK-TM4C123GXL -@image html bd_EK-TM4C123GXL.jpg EK-TM4C123GXL board +@image html bd_EK-TM4C123GXL.jpg +@image latex bd_EK-TM4C123GXL.jpg width=2.5in +@caption{EK-TM4C123GXL (TivaC LaunchPad)} @ref dpp "DPP example" for @ref freertos "FreeRTOS" on Texas Instruments TivaC123GXL MCU (Cortex-M4F) with the following toolchains: - ARM-Keil @@ -110,12 +122,16 @@ Demonstrated features: - QP/Spy input over the virtual COM port (bi-directional Spy) (Spy build configuration) -@next{freertos_dpp_stm32f746g-disco examples} +@ifnot LATEX +@nav_next{freertos_dpp_stm32f746g-disco} +@endif */ /*##########################################################################*/ /*! @page freertos_dpp_stm32f746g-disco DPP on STM32F746G-Discovery -@image html bd_STM32F746G-Disco.jpg STM32F746G-Discovery +@image html bd_STM32F746G-Disco.jpg +@image latex bd_STM32F746G-Disco.jpg width=4.75in +@caption{STM32F746G-Discovery} @ref dpp "DPP example" for @ref freertos "FreeRTOS" on STM32F746G-Discovery MCU (Cortex-M7) with the following toolchains: - ARM-Keil @@ -134,13 +150,16 @@ Demonstrated features: - QP/Spy output over the virtual COM port (Spy build configuration) - QP/Spy input over the virtual COM port (bi-directional Spy) (Spy build configuration) - -@next{freertos_dpp_nucleo-h743zi} +@ifnot LATEX +@nav_next{freertos_dpp_nucleo-h743zi} +@endif */ /*##########################################################################*/ /*! @page freertos_dpp_nucleo-h743zi DPP on NUCLEO-H743ZI -@image html bd_NUCLEO-H743ZI.jpg NUCLEO-H743ZI +@image html bd_NUCLEO-H743ZI.jpg +@image latex bd_NUCLEO-H743ZI.jpg width=4.5in +@caption{NUCLEO-H743ZI} @ref dpp "Dining Philosophers Problem (DPP)" example for NUCLEO-H743ZI MCU (Cortex-M7). @@ -149,12 +168,16 @@ Features: - [QP/Spy software tracing](https://www.state-machine.com/qtools/qpspy.html) using the virtual COM-port - bi-directional [QP/Spy](https://www.state-machine.com/qtools/qs.html#qs_rx) (sending commands to the target) -@next{freertos_start-stop_nucleo-h743zi} +@ifnot LATEX +@nav_next{freertos_start-stop_nucleo-h743zi} +@endif */ /*##########################################################################*/ /*! @page freertos_start-stop_nucleo-h743zi Start-Stop on NUCLEO-H743ZI -@image html bd_NUCLEO-H743ZI.jpg NUCLEO-H743ZI +@image html bd_NUCLEO-H743ZI.jpg +@image latex bd_NUCLEO-H743ZI.jpg width=4.5in +@caption{NUCLEO-H743ZI} Start-Stop example for NUCLEO-H743ZI MCU (Cortex-M7) demonstrates staring and stopping active objects multiple times during the runtime, as opposed to starting AOs only at the beginning. @@ -167,7 +190,10 @@ The start-stop application consists of two AOs: - the Worker AO is NOT started at the beginning, but instead it is instantiated and started by the Launcher AO. -![Launcher and Worker state machines](start-stop.png) + +@image html start-stop.png +@image latex start-stop.png width=5.0in +@caption{Launcher and Worker state machines} The actual visible work is performed by the Worker AO, which blinks the yellow LED (LD1) on the NUCLEO-H743ZI board. After blinking the LED five times, the Worker AO publishes turns the blue LED (LD2), publishes the DONE event and stops itself (by calling QP::QActive::stop() on itself). @@ -184,7 +210,7 @@ Because this application is intended for embedded real-time systems, it does not It is possible to use the standard **new** and **delete** operators with the standard heap, or some customized memory allocation (overloaded new/delete). This goes beyond the scope of this example. -**Supported Toolchains** @n +**Supported Toolchains**
This example contains sub-directories for building it with various toolchains. The following toolchains are supported: - ARM-Keil MDK @@ -194,7 +220,7 @@ This example contains sub-directories for building it with various toolchains. T Please refer to the README.txt files in these sub-directories for more information about building and running the examples. -**QP/Spy Support** @n +**QP/Spy Support**
This example demonstrates the [QP/Spy software tracing](https://www.state-machine.com/qtools/qpspy.html) in the **Spy build configuration**. The QP/Spy uses the virtual COM port provided by the NUCLEO-H743ZI board. To see the QP/Spy output, you need to launch the qspy host utility, as follows (Windows command prompt): @verbatim @@ -204,7 +230,7 @@ qspy -u -c COM4 where COM4 is the particular virtual serial port registered by your NUCLEO board. You need to adjust the COM port number for your machine. -**Programming the NUCLEO Board** @n +**Programming the NUCLEO Board**
The NUCLEO boards appear as a USB-flash drive in the file system. Programming of the board is done by simply copying the binary into thy flash drive letter. @@ -221,7 +247,9 @@ copy dbg\start-stop.bin E: - [QP/Spy software tracing](https://www.state-machine.com/qtools/qpspy.html) using the virtual COM-port - bi-directional [QP/Spy](https://www.state-machine.com/qtools/qs.html#qs_rx) (sending commands to the target) -@next{exa_threadx examples} +@ifnot LATEX +@nav_next{exa_threadx} +@endif */ /*##########################################################################*/ @@ -235,12 +263,16 @@ The QP/C++ examples for ThreadX (Express Logic) are as follows: @note You can hover the mouse cursor over the    icon in the list below to see the picture of the board. -@next{exa_uc-os2 examples} +@ifnot LATEX +@nav_next{exa_uc-os2} +@endif */ /*##########################################################################*/ /*! @page threadx_dpp_ek-tm4c123gxl DPP on EK-TM4C123GXL -@image html bd_EK-TM4C123GXL.jpg "EK-TM4C123GXL (TivaC LaunchPad) board" +@image html bd_EK-TM4C123GXL.jpg +@image latex bd_EK-TM4C123GXL.jpg width=2.5in +@caption{EK-TM4C123GXL (TivaC LaunchPad)} @ref dpp "DPP example" for ThreadX on Texas Instruments TivaC123GXL MCU (Cortex-M4F) with the following toolchain: - IAR-ARM @@ -250,15 +282,18 @@ Demonstrated features: - QP/Spy output over the virtual COM port (Spy build configuration) - QP/Spy input over the virtual COM port (bi-directional Spy) (Spy build configuration) - -@next{threadx_dpp_stm32f429-discovery examples} +@ifnot LATEX +@nav_next{threadx_dpp_stm32f429-discovery} +@endif */ /*##########################################################################*/ /*! @page threadx_dpp_stm32f429-discovery DPP on STM32F4-Discovery The @ref dpp "DPP example" for ThreadX on STM32F4-Discovery board is located directory examples/threadx/arm-cm/dpp_stm32f429-discovery. -@image html bd_STM32F4-Discovery.jpg "STM32F4-Discovery board" +@image html bd_STM32F4-Disco.jpg +@image latex bd_STM32F4-Disco.jpg width=2.8in +@caption{STM32F4-Discovery} The sub-directory iar contains the workspace and project file that you can open in IAR EWARM IDE. @@ -278,7 +313,9 @@ VDD | VCC GND | GND -@image html bd_STM32F4-Discovery_RS232.jpg STM32F4-Discovery board connected to RS232 level shifter +@image html bd_STM32F4-Disco.jpg +@image latex bd_STM32F4-Disco.jpg width=2.8in +@caption{STM32F4-Discovery} The output is generated at 115200 baud rate. @@ -290,7 +327,9 @@ qspy -cCOM1 The actual COM port number might be different on your Windows machine. Please check the Device Manager to find the COM port number. -@next{exa_uc-os2 examples} +@ifnot LATEX +@nav_next{exa_uc-os2} +@endif */ /*##########################################################################*/ @@ -305,29 +344,41 @@ The QP/C++ examples for uC-OS2 are as follows: @note You can hover the mouse cursor over the    icon in the list below to see the picture of the board. -@next{exa_os examples} +@ifnot LATEX +@nav_next{exa_os} +@endif */ /*##########################################################################*/ /*! @page uc-os2_dpp_ek-tm4c123gxl DPP on EK-TM4C123GXL -@image html bd_EK-TM4C123GXL.jpg "EK-TM4C123GXL board" +@image html bd_EK-TM4C123GXL.jpg +@image latex bd_EK-TM4C123GXL.jpg width=2.5in +@caption{EK-TM4C123GXL (TivaC LaunchPad)} DPP example for Texas Instruments TivaC123GXL MCU (Cortex-M4F) and ARM-CLANG, GNU-ARM and IAR EWARM toolsets. -@image html under_construction.jpg +@image html under-constr.png +@image latex under-constr.png width=1in -@next{uc-os2_dpp_nucleo-l053r8 examples} +@ifnot LATEX +@nav_next{uc-os2_dpp_nucleo-l053r8} +@endif */ /*##########################################################################*/ /*! @page uc-os2_dpp_nucleo-l053r8 DPP on STM32-NUCLEO-L053R8 -@image html bd_NUCLEO-L053R8.jpg "STM32-NUCLEO-L053R8 board" +@image html bd_NUCLEO-L053R8.jpg +@image latex bd_NUCLEO-L053R8.jpg width=2.5in +@caption{NUCLEO-L053R8} DPP example for STM32 L053R8 MCU (Cortex-M0+) and ARM-CLANG, GNU-ARM and IAR EWARM toolsets. -@image html under_construction.jpg +@image html under-constr.png +@image latex under-constr.png width=1in -@next{exa_zephyr examples} +@ifnot LATEX +@nav_next{exa_zephyr} +@endif */ /*##########################################################################*/ @@ -338,7 +389,9 @@ The QP/C++ examples for Zephyr are as follows: - @subpage zephyr_blinky - @subpage zephyr_dpp -@next{zephyr_blinky} +@ifnot LATEX +@nav_next{zephyr_blinky} +@endif */ /*##########################################################################*/ /*! @page zephyr_blinky Blinky @@ -389,12 +442,15 @@ The "Blinky" example blinks an on-board LED once per second. The blinking is don @remark The example has been tested with the following boards: -![STM32-NUCLEO-L053R8 board](bd_NUCLEO-L053R8.jpg) +@image html bd_NUCLEO-L053R8.jpg +@image latex bd_NUCLEO-L053R8.jpg width=2.5in +@caption{NUCLEO-L053R8}
-![STM32-NUCLEO-H743ZI board](bd_NUCLEO-H743ZI.jpg) - +@image html bd_NUCLEO-H743ZI.jpg +@image latex bd_NUCLEO-H743ZI.jpg width=4.5in +@caption{NUCLEO-H743ZI} @note The example should also work with most boards supported by Zephyr. @@ -416,7 +472,9 @@ BSP::ledOff @section zephyr_blinky-limits Limitations The simple Blinky example does not support the QS software tracing. -@next{zephyr_dpp} +@ifnot LATEX +@nav_next{zephyr_dpp} +@endif */ /*##########################################################################*/ /*! @page zephyr_dpp DPP @@ -467,12 +525,15 @@ DPP example with multiple active objects. @remark The example has been tested with the following boards: -![STM32-NUCLEO-L053R8 board](bd_NUCLEO-L053R8.jpg) +@image html bd_NUCLEO-L053R8.jpg +@image latex bd_NUCLEO-L053R8.jpg width=2.5in +@caption{NUCLEO-L053R8}
-![STM32-NUCLEO-H743ZI board](bd_NUCLEO-H743ZI.jpg) - +@image html bd_NUCLEO-H743ZI.jpg +@image latex bd_NUCLEO-H743ZI.jpg width=4.5in +@caption{NUCLEO-H743ZI} @note The example should also work with most boards supported by Zephyr. @@ -545,7 +606,7 @@ qspy -c /dev/ttyACM0 @endverbatim -@subsection @section zephyr_dpp-qs-output QSPY Output Example +@subsection zephyr_dpp-qs-output QSPY Output Example After resetting the board, you should see output similar to the following: @verbatim ########## Trg-RST QP-Ver=701,Build=220810_150847 @@ -619,6 +680,8 @@ After resetting the board, you should see output similar to the following: 0000000371 PHILO_STAT 3 thinking @endverbatim -@next{exa_os} +@ifnot LATEX +@nav_next{exa_os} +@endif */ } // namespace QP diff --git a/doxygen/gen/metrics.txt b/doxygen/gen/metrics.txt index 2e70d548..091a23a5 100644 --- a/doxygen/gen/metrics.txt +++ b/doxygen/gen/metrics.txt @@ -2,31 +2,31 @@ ================================================ 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 13 1 4 QP::QEvt::QEvt@182-185@..\include\qep.hpp + 7 1 27 2 7 QP::QEvt::QEvt@190-196@..\include\qep.hpp + 2 1 6 0 3 QP::QEvt::~QEvt@201-203@..\include\qep.hpp + 2 1 6 0 3 QP::QHsm::~QHsm@373-375@..\include\qep.hpp + 3 1 17 1 3 QP::QHsm::init@404-406@..\include\qep.hpp + 3 1 12 0 3 QP::QHsm::state@453-455@..\include\qep.hpp + 3 1 11 0 3 QP::QHsm::getStateHandler@459-461@..\include\qep.hpp + 4 1 18 1 4 QP::QHsm::tran@491-494@..\include\qep.hpp + 4 1 18 1 4 QP::QHsm::tran_hist@497-500@..\include\qep.hpp + 4 1 18 1 4 QP::QHsm::super@503-506@..\include\qep.hpp + 4 1 30 1 4 QP::QHsm::qm_tran@510-513@..\include\qep.hpp + 4 1 30 1 4 QP::QHsm::qm_tran_init@517-520@..\include\qep.hpp + 8 1 42 2 8 QP::QHsm::qm_tran_hist@524-531@..\include\qep.hpp + 4 1 30 1 4 QP::QHsm::qm_tran_ep@535-538@..\include\qep.hpp + 8 1 40 2 8 QP::QHsm::qm_tran_xp@542-549@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_entry@553-556@..\include\qep.hpp + 4 1 22 1 4 QP::QHsm::qm_entry@561-564@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_exit@569-572@..\include\qep.hpp + 4 1 22 1 4 QP::QHsm::qm_exit@577-580@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_sm_exit@584-587@..\include\qep.hpp + 4 1 20 1 4 QP::QHsm::qm_super_sub@591-594@..\include\qep.hpp + 6 1 26 1 6 QP::QMsm::QMsm@680-685@..\include\qep.hpp + 3 1 20 1 3 QP::QMsm::init@698-700@..\include\qep.hpp + 3 1 12 0 3 QP::QMsm::stateObj@743-745@..\include\qep.hpp + 3 1 14 0 3 QP::QMsm::getStateHandler@774-776@..\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 @@ -37,18 +37,18 @@ 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 + 9 1 49 5 9 QP::QActive::start@481-489@..\include\qf.hpp + 3 1 18 0 3 QP::QActive::getPrio@713-715@..\include\qf.hpp + 4 1 38 1 4 QP::QActive::setPrio@720-723@..\include\qf.hpp + 3 1 9 0 3 QP::QActive::getOsObject@735-737@..\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 + 5 1 20 1 5 QP::QMActive::QMActive@895-899@..\include\qf.hpp + 3 1 12 0 3 QP::QMActive::stateObj@920-922@..\include\qf.hpp + 3 1 10 0 3 QP::QTimeEvt::getAct@1115-1117@..\include\qf.hpp + 3 1 10 0 3 QP::QTimeEvt::getCtr@1120-1122@..\include\qf.hpp + 3 1 10 0 3 QP::QTimeEvt::getInterval@1125-1127@..\include\qf.hpp + 3 1 16 0 3 QP::QTimeEvt::toActive@1182-1184@..\include\qf.hpp + 3 1 16 0 3 QP::QTimeEvt::toTimeEvt@1187-1189@..\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 @@ -56,11 +56,11 @@ 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 18 0 3 QP::QSpyId::getPrio@335-337@..\include\qs.hpp + 7 1 28 1 7 QP::QS::force_cast@417-423@..\include\qs.hpp + 14 3 70 1 14 QP::QS::rxPut@831-844@..\include\qs.hpp + 9 1 49 5 9 QP::QActiveDummy::start@1573-1581@..\include\qs.hpp + 3 1 18 0 3 QP::QSpyId::getPrio@137-139@..\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 @@ -68,19 +68,19 @@ 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 + 54 9 359 2 78 QP::QHsm::init@189-266@..\src\qf\qep_hsm.cpp + 103 15 609 2 158 QP::QHsm::dispatch@269-426@..\src\qf\qep_hsm.cpp + 8 1 31 2 8 QP::QHsm::top@429-436@..\src\qf\qep_hsm.cpp + 16 3 87 1 22 QP::QHsm::isIn@439-460@..\src\qf\qep_hsm.cpp + 20 4 107 1 29 QP::QHsm::childState@463-491@..\src\qf\qep_hsm.cpp + 90 15 487 2 132 QP::QHsm::hsm_tran@494-625@..\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 + 117 21 664 2 169 QP::QMsm::dispatch@119-287@..\src\qf\qep_msm.cpp + 13 3 59 1 14 QP::QMsm::isInState@290-303@..\src\qf\qep_msm.cpp + 28 7 137 1 35 QP::QMsm::childStateObj@306-340@..\src\qf\qep_msm.cpp + 51 9 294 2 62 QP::QMsm::execTatbl_@343-404@..\src\qf\qep_msm.cpp + 22 4 107 3 29 QP::QMsm::exitToTranSource_@407-435@..\src\qf\qep_msm.cpp + 44 6 227 2 55 QP::QMsm::enterHistory_@438-492@..\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 @@ -138,25 +138,25 @@ 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 + 19 6 85 0 34 QP::QF::run@184-217@..\src\qk\qk.cpp + 25 3 146 6 34 QP::QActive::start@228-261@..\src\qk\qk.cpp + 19 4 93 0 24 QK_sched_@274-297@..\src\qk\qk.cpp + 65 17 424 0 112 QK_activate_@300-411@..\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 + 45 15 248 0 92 QP::QF::run@104-195@..\src\qv\qv.cpp + 18 1 114 6 25 QP::QActive::start@206-230@..\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 + 20 6 103 0 36 QP::QF::run@188-223@..\src\qxk\qxk.cpp + 29 5 159 6 40 QP::QActive::start@234-273@..\src\qxk\qxk.cpp + 43 8 230 0 54 QXK_sched_@286-339@..\src\qxk\qxk.cpp + 59 16 382 0 98 QXK_activate_@342-439@..\src\qxk\qxk.cpp + 12 2 69 0 18 QXK_current@442-459@..\src\qxk\qxk.cpp + 19 5 105 1 26 QXK_contextSw@463-488@..\src\qxk\qxk.cpp + 14 2 110 0 23 QXK_threadExit_@492-514@..\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,21 +187,21 @@ 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 + 322 5.1 1.6 34.3 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 + 22 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 + 401 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 + 118 6.0 1.0 30.0 2 ..\include\qxk.hpp + 364 31.3 5.1 182.1 11 ..\src\qf\qep_hsm.cpp + 317 42.9 7.6 236.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 @@ -212,9 +212,9 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file 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 + 209 23.4 5.0 145.8 8 ..\src\qk\qk.cpp + 92 18.2 5.0 109.2 4 ..\src\qv\qv.cpp + 279 23.4 5.0 144.7 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 @@ -224,9 +224,9 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file ================================================ NLOC CCN token PARAM length location ------------------------------------------------ - 116 21 658 2 168 QP::QMsm::dispatch@119-286@..\src\qf\qep_msm.cpp + 117 21 664 2 169 QP::QMsm::dispatch@119-287@..\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 + 4540 18.1 3.3 108.0 178 1 0.01 0.04 @endcode diff --git a/doxygen/history.dox b/doxygen/history.dox index 8e91e4b4..d126ca27 100644 --- a/doxygen/history.dox +++ b/doxygen/history.dox @@ -1,7 +1,64 @@ -/** @page history Revision History +/** @page history Design History File (DHF) + +@image html qcp_banner.jpg +@image latex qcp_banner.jpg width=6.5in + +@remark +This document is part of the @webref{products/qp#CERT,QP Certification Pack}, which has been specifically designed to aid companies in **safety certification** of their software based on the QP real-time embedded frameworks. + +@section qpcpp_7_2_0 Version 7.2.0, 2023-01-06 +__QP/C++ Source Code:__ +- Added "enumeration dictionaries" for QS software tracing (see QS_ENUM_DICTIONARY()) +- Introduced common callback `QF_onContextSw()` used in all built-in kernels (QV, QK, QXK). This callback is enabled by the macro #QF_ON_CONTEXT_SW. +- Removed callback `QK_onContextSW()` and macro QK_ON_CONTEXT_SW and replaced with `QF_onContextSw()`/#QF_ON_CONTEXT_SW. +- Removed callback `QXK_onContextSW()` and macro QXK_ON_CONTEXT_SW and replaced with `QF_onContextSw()`/#QF_ON_CONTEXT_SW. +- Added callback `QF_onContextSW()` and macro #QF_ON_CONTEXT_SW to the QV kernel. +- added configuration macro #QS_CTR_SIZE to determine the size of the type QS::QSCtr (see also [feature#195](https://sourceforge.net/p/qpc/feature-requests/195)) +- Modified QMsm::childStateObj() implementation to correctly handle submachine states (see also [bug#316](https://sourceforge.net/p/qpc/bugs/316)) +- Added automatic generation of the QS function dictionary for the QP::QHsm::top() state handler function. This happens only once on the first call to QP::QHsm::init(). + +@note +It is no longer necessary to generate QS function dictionary for QP::QHsm::top() in the application (although it is still allowed, but wasteful). + +__Ports:__ +- `ports/arm-cm` added setup of the FPU (if configured) to all build-in kernels (QV, QK, QXK) and toolchains (ARMCLANG, GNU-ARM, IAR). +- `ports/arm-cm` all ports now clear the FPCA bit in the CONTROL register (if FPU configured) right before starting the interrupts. That potentially saves the stack space (MSP) for the automatically reserved FPU context. + +@note +This change means that the applications no longer need to setup the FPU, which was done typically in the BSP. + +- `ports/posix` added configuration macro #QS_CTR_SIZE 4U, to allow QS trace buffers > 64KB (see also [feature#195](https://sourceforge.net/p/qpc/feature-requests/195)) +- `ports/win32` added configuration macro #QS_CTR_SIZE 4U, to allow QS trace buffers > 64KB (see also [feature#195](https://sourceforge.net/p/qpc/feature-requests/195)) +- `ports/esp-idf` fixed compilation error caused by obsolete macro `QF_PTR_RANGE_()` +- `ports/sample` added a sample QP/C port for reference and documentation of all available configuration options. +- `zephyr` updated `qf_port.hpp` to include `` rather than `` (see also [bug#321](https://sourceforge.net/p/qpc/bugs/321)) + + +__Examples:__ +- examples for QV: added callback `QF_onContextSw()` +- exampels for QK, QXK: replaced callbacks `QK_onContextSw()/QXK_onContextSw()` with `QF_onContextSw()` +- `examples/arm-cm` removed setting up the FPU from the BSPs (the FPU is now setup in the ports). +- `examples/arm-cm` added setting up the MPU (Memory Protection Unit) to catch [NULL-pointer dereferencing](https://www.state-machine.com/null-pointer-protection-with-arm-cortex-m-mpu) and other incorrect memory access. + + +__Testing:__ +- changed the QUTest assertion handler Q_onAssert() (file qutest.cpp) to reset the target rather than wait for user commands. This allows proper assertion handling even inside exception handlers, where the target really cannot handle interrupts (which were needed for reception of commands). This change matches the updated policy of **assertion failures** in [QUTest 7.2.0](https://www.state-machine.com/qtools/history.html#qtools_7_2_0). +- examples for QUTest (`examples/qutest` and `test` directories): adjusted makefiels to invoke the `qutest.py` utility with the new [command-line parameters](https://www.state-machine.com/qtools/qutest_use.html#qutest_command). +- modified the test fixtures to use "enum dictionaries" for commands +- added example `examples/qutest/start_seq` that demonstrates testing of start sequences. + + +__Bug Fixes:__ +- [bug#316 Using History with Submachines does not work](https://sourceforge.net/p/qpc/bugs/316) +- [bug#321 zephyr port build error](https://sourceforge.net/p/qpc/bugs/321) + +- [bug#325 QSpy shows Sig=NULL if #Q_EVT_CTOR is used](https://sourceforge.net/p/qpc/bugs/325) + +__Feature Requests:__ +- [feature#195 allow > 64K QS trace buffer on target](https://sourceforge.net/p/qpc/feature-requests/195). This is configurable by setting the macro #QS_CTR_SIZE. + @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 diff --git a/doxygen/images/hsm.png b/doxygen/images/hsm.png deleted file mode 100644 index 6f4e90415dcbf80eb1dbd28602d493789beadec4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11380 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 I>Xv^02c!n%;Q#;t diff --git a/doxygen/snippets/qk_oncontextsw.cpp b/doxygen/snippets/qf_oncontextsw.cpp similarity index 78% rename from doxygen/snippets/qk_oncontextsw.cpp rename to doxygen/snippets/qf_oncontextsw.cpp index 35c5a3ef..4e38e9f8 100644 --- a/doxygen/snippets/qk_oncontextsw.cpp +++ b/doxygen/snippets/qf_oncontextsw.cpp @@ -1,9 +1,8 @@ extern "C" { // use the "C" calling convention -#ifdef QK_ON_CONTEXT_SW +#ifdef QF_ON_CONTEXT_SW // NOTE: the context-switch callback is called with interrupts DISABLED -void QK_onContextSw(QActive *prev, QActive *next) { - (void)prev; +void QF_onContextSw(QActive *prev, QActive *next) { if (next != (QActive *)0) { // next is not the QK idle loop? _impure_ptr = next->thread; // switch to next TLS } @@ -14,6 +13,6 @@ void QK_onContextSw(QActive *prev, QActive *next) { QS_OBJ(next); QS_END_NOCRIT() } -#endif // QK_ON_CONTEXT_SW +#endif // QF_ON_CONTEXT_SW } // extern "C" diff --git a/doxygen/snippets/qs_sigDic.cpp b/doxygen/snippets/qs_sigDic.cpp index 16c764aa..7447598b 100644 --- a/doxygen/snippets/qs_sigDic.cpp +++ b/doxygen/snippets/qs_sigDic.cpp @@ -3,11 +3,6 @@ Table Table::inst; Q_STATE_DEF(Table, initial) { QS_OBJ_DICTIONARY(&Table::inst); - QS_FUN_DICTIONARY(&QP::QHsm::top); - QS_FUN_DICTIONARY(&Table::initial); - QS_FUN_DICTIONARY(&Table::active); - QS_FUN_DICTIONARY(&Table::serving); - QS_FUN_DICTIONARY(&Table::paused); QS_SIG_DICTIONARY(DONE_SIG, nullptr); // global signals QS_SIG_DICTIONARY(EAT_SIG, nullptr); diff --git a/doxygen/snippets/qxk_oncontextsw.cpp b/doxygen/snippets/qxk_oncontextsw.cpp deleted file mode 100644 index 6a035304..00000000 --- a/doxygen/snippets/qxk_oncontextsw.cpp +++ /dev/null @@ -1,19 +0,0 @@ -extern "C" { // use the "C" calling convention - -#ifdef QXK_ON_CONTEXT_SW -// NOTE: the context-switch callback is called with interrupts DISABLED -void QXK_onContextSw(QActive *prev, QActive *next) { - (void)prev; - if (next != (QActive *)0) { // next is not the QK idle loop? - _impure_ptr = next->thread; // switch to next TLS - } - - // If you use QS software tracing, use the _NOCRIT() begin/end - QS_BEGIN_NOCRIT(ON_CONTEXT_SW, 0U) - QS_OBJ(prev); - QS_OBJ(next); - QS_END_NOCRIT() -} -#endif // QXK_ON_CONTEXT_SW - -} // extern "C" diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/bsp.cpp b/examples/arm-cm/blinky_efm32-slstk3401a/qk/bsp.cpp index 381ab945..bfb4c38e 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/bsp.cpp +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/bsp.cpp @@ -76,30 +76,7 @@ void BSP_init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif + // NOTE: The VFP (hardware Floating Point) unit is configured by QK // enable clock for to the peripherals used by this application... CMU_ClockEnable(cmuClock_HFPER, true); diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qv/bsp.cpp b/examples/arm-cm/blinky_efm32-slstk3401a/qv/bsp.cpp index b41091d9..aced78d5 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qv/bsp.cpp +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qv/bsp.cpp @@ -74,17 +74,7 @@ void BSP_init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... - // - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used only by active objects - // and NOT in any ISR. This setting is very efficient, but if any ISRs - // start using the FPU, this can lead to corruption of the FPU registers. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); + // NOTE: The VFP (hardware Floating Point) unit is configured by QV // enable clock for to the peripherals used by this application... CMU_ClockEnable(cmuClock_HFPER, true); diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp index cdc29883..6188e037 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp @@ -75,30 +75,7 @@ void BSP_init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif + // NOTE: The VFP (hardware Floating Point) unit is configured by QK // enable clock for to the peripherals used by this application... SYSCTL->RCGCGPIO |= (1U << 5); // enable Run mode for GPIOF diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp index d7284a65..05d3ab82 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp @@ -73,17 +73,7 @@ void BSP_init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... - - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used only by active objects - // and NOT in any ISR. This setting is very efficient, but if any ISRs - // start using the FPU, this can lead to corruption of the FPU registers. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); + // NOTE: The VFP (hardware Floating Point) unit is configured by QV // enable clock for to the peripherals used by this application... SYSCTL->RCGCGPIO |= (1U << 5); // enable Run mode for GPIOF diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.hpp b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.hpp index d5793fb6..a2798d74 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.hpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm index 33043f5d..441f56be 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm +++ b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/philo.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/philo.cpp index d0fd1540..7ea07850 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/philo.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ inline uint8_t PHILO_ID(Philo const * const me) { //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp index 2b187392..d4b00d8a 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp @@ -1,13 +1,13 @@ //============================================================================ // Product: DPP example, EFM32-SLSTK3401A board, preemptive QK kernel -// Last updated for version 7.1.0 -// Last updated on 2022-08-28 +// Last updated for version 7.2.0 +// Last updated on 2022-12-13 // // Q u a n t u m L e a P s // ------------------------ // Modern Embedded Software // -// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved. +// Copyright (C) 2005 Quantum Leaps. 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 @@ -171,9 +171,7 @@ void BSP::init(void) { // SystemCoreClockUpdate(); - /* NOTE: The VFP (hardware Floating Point) unit is configured by QXK */ - //FPU->FPCCR = FPU->FPCCR - // | (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); + // NOTE: The VFP (hardware Floating Point) unit is configured by QXK // enable clock for to the peripherals used by this application... CMU_ClockEnable(cmuClock_HFPER, true); @@ -300,6 +298,21 @@ void QF::onStartup(void) { void QF::onCleanup(void) { } //............................................................................ +#ifdef QF_ON_CONTEXT_SW +// NOTE: the context-switch callback is called with interrupts DISABLED +extern "C" +void QF_onContextSw(QActive *prev, QActive *next) { + (void)prev; + if (next != nullptr) { + //_impure_ptr = next->thread; // switch to next TLS + } + QS_BEGIN_NOCRIT(DPP::CONTEXT_SW, 0U) // no critical section! + QS_OBJ(prev); + QS_OBJ(next); + QS_END_NOCRIT() +} +#endif // QF_ON_CONTEXT_SW +//............................................................................ void QK::onIdle(void) { // toggle the User LED on and then off, see NOTE01 // QF_INT_DISABLE(); @@ -338,9 +351,9 @@ void QK::onIdle(void) { extern "C" { //............................................................................ -#ifdef QK_ON_CONTEXT_SW +#ifdef QF_ON_CONTEXT_SW // NOTE: the context-switch callback is called with interrupts DISABLED -void QK_onContextSw(QActive *prev, QActive *next) { +void QF_onContextSw(QActive *prev, QActive *next) { if (next != nullptr) { //_impure_ptr = next->thread; // switch to next TLS } @@ -349,7 +362,7 @@ void QK_onContextSw(QActive *prev, QActive *next) { QS_OBJ(next); QS_END_NOCRIT() } -#endif // QK_ON_CONTEXT_SW +#endif // QF_ON_CONTEXT_SW //............................................................................ Q_NORETURN Q_onAssert(char const * const module, int_t const loc) { diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp index acfe8ec8..f493a29f 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp @@ -1,13 +1,13 @@ //============================================================================ // Product: DPP example, EFM32-SLSTK3401A board, cooperative QV kernel -// Last updated for version 7.1.0 -// Last updated on 2022-08-28 +// Last updated for version 7.2.0 +// Last updated on 2022-12-13 // // Q u a n t u m L e a P s // ------------------------ // Modern Embedded Software // -// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved. +// Copyright (C) 2005 Quantum Leaps. 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 @@ -99,8 +99,8 @@ void SysTick_Handler(void) { } #endif - //QP::QTimeEvt::TICK_X(0U, &l_SysTick_Handler); // process time evts for rate 0 - DPP::the_Ticker0->POST(0, &l_SysTick_Handler); // post to Ticker0 active object + QP::QTimeEvt::TICK_X(0U, &l_SysTick_Handler); // process time evts for rate 0 + //DPP::the_Ticker0->POST(0, &l_SysTick_Handler); // post to Ticker0 active object // Perform the debouncing of buttons. The algorithm for debouncing // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -156,20 +156,12 @@ void USART0_RX_IRQHandler(void) {} // BSP functions ============================================================= void BSP::init(void) { - // NOTE: SystemInit() already called from the startup code - // but SystemCoreClock needs to be updated + // NOTE: SystemInit() has been already called from the startup code + // but SystemCoreClock needs to be updated // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); + // NOTE: The VFP (hardware Floating Point) unit is configured by QV // enable clock for to the peripherals used by this application... CMU_ClockEnable(cmuClock_HFPER, true); @@ -296,6 +288,21 @@ void QF::onStartup(void) { void QF::onCleanup(void) { } //............................................................................ +#ifdef QF_ON_CONTEXT_SW +// NOTE: the context-switch callback is called with interrupts DISABLED +extern "C" +void QF_onContextSw(QActive *prev, QActive *next) { + (void)prev; + if (next != nullptr) { + //_impure_ptr = next->thread; // switch to next TLS + } + QS_BEGIN_NOCRIT(CONTEXT_SW, 0U) // no critical section! + QS_OBJ(prev); + QS_OBJ(next); + QS_END_NOCRIT() +} +#endif // QF_ON_CONTEXT_SW +//............................................................................ void QV::onIdle(void) { // called with interrupts disabled, see NOTE01 // toggle the User LED on and then off, see NOTE02 GPIO->P[LED_PORT].DOUT |= (1U << LED1_PIN); diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile index b42124f7..d4afd1ab 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ on EMF32-SLSTK3401A, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last Updated for Version: 7.2.0 +# Date of the Last Update: 2022-12-14 # # 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 @@ -45,7 +45,7 @@ # 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/ +# https://github.com/QuantumLeaps/qtools/releases # #----------------------------------------------------------------------------- @@ -138,7 +138,8 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DEFM32PG1B200F256GM48=1 +DEFINES := -DEFM32PG1B200F256GM48=1 \ + -DQF_ON_CONTEXT_SW # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] @@ -179,7 +180,7 @@ MKDIR := mkdir RM := rm #----------------------------------------------------------------------------- -# build options for various configurations for ARM Cortex-M4F +# build options for various configurations for ARM Cortex-M # # combine all the soruces... diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp index 3b37dffc..31602cc6 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp @@ -1,7 +1,7 @@ //============================================================================ // Product: DPP example, EFM32-SLSTK3401A board, preemptive QXK kernel -// Last updated for version 7.1.0 -// Last updated on 2022-08-28 +// Last updated for version 7.2.0 +// Last updated on 2022-12-13 // // Q u a n t u m L e a P s // ------------------------ @@ -173,9 +173,7 @@ void BSP::init(void) { // SystemCoreClockUpdate(); - /* NOTE: The VFP (hardware Floating Point) unit is configured by QXK */ - //FPU->FPCCR = FPU->FPCCR - // | (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); + // NOTE: The VFP (hardware Floating Point) unit is configured by QXK // enable clock for to the peripherals used by this application... CMU_ClockEnable(cmuClock_HFPER, true); @@ -345,9 +343,9 @@ void QXK::onIdle(void) { extern "C" { //............................................................................ -#ifdef QXK_ON_CONTEXT_SW +#ifdef QF_ON_CONTEXT_SW // NOTE: the context-switch callback is called with interrupts DISABLED -void QXK_onContextSw(QActive *prev, QActive *next) { +void QF_onContextSw(QActive *prev, QActive *next) { if (next != nullptr) { //_impure_ptr = next->thread; // switch to next TLS } @@ -356,7 +354,7 @@ void QXK_onContextSw(QActive *prev, QActive *next) { QS_OBJ(next); QS_END_NOCRIT() } -#endif // QXK_ON_CONTEXT_SW +#endif // QF_ON_CONTEXT_SW //............................................................................ Q_NORETURN Q_onAssert(char const * const module, int_t const loc) { diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile index 57b8faba..2eb10b14 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ on EMF32-SLSTK3401A, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last Updated for Version: 7.2.0 +# Date of the Last Update: 2022-12-14 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2022 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 @@ -45,7 +45,7 @@ # 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/ +# https://github.com/QuantumLeaps/qtools/releases # #----------------------------------------------------------------------------- @@ -143,9 +143,9 @@ LIBS := # defines DEFINES := -DEFM32PG1B200F256GM48=1 \ - -DQXK_ON_CONTEXT_SW \ -DQXK_USE_IRQ_HANDLER=CRYPTO_IRQHandler \ - -DQXK_USE_IRQ_NUM=25 + -DQXK_USE_IRQ_NUM=25 \ + -DQF_ON_CONTEXT_SW # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] @@ -186,7 +186,7 @@ MKDIR := mkdir RM := rm #----------------------------------------------------------------------------- -# build options for various configurations for ARM Cortex-M4F +# build options for various configurations for ARM Cortex-M # # combine all the soruces... diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile-cpp20 b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile-cpp20 index 1fa8ac33..10c0d701 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile-cpp20 +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile-cpp20 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C++ on EMF32-SLSTK3401A, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2022-05-13 +# Last Updated for Version: 7.2.0 +# Date of the Last Update: 2022-12-14 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPCPP)/include \ - -I$(QPCPP)/src \ -I$(QP_PORT_DIR) \ -I$(QPCPP)/3rd_party/CMSIS/Include \ -I$(QPCPP)/3rd_party/efm32pg1b @@ -137,15 +136,14 @@ QP_ASMS := \ QS_SRCS := \ qs.cpp \ qs_rx.cpp \ - qs_fp.cpp \ - qs_64bit.cpp + qs_fp.cpp LIB_DIRS := LIBS := # defines DEFINES := -DEFM32PG1B200F256GM48=1 \ - -DQXK_ON_CONTEXT_SW \ + -DQF_ON_CONTEXT_SW \ -DQXK_USE_IRQ_HANDLER=CRYPTO_IRQHandler \ -DQXK_USE_IRQ_NUM=25 diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile-nassert b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile-nassert index 6c7d52ff..c2e8a11b 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile-nassert +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile-nassert @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C++ on EMF32-SLSTK3401A, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last Updated for Version: 7.2.0 +# Date of the Last Update: 2022-12-14 # # Q u a n t u m L e a P s # ------------------------ @@ -45,7 +45,7 @@ # 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/ +# https://github.com/QuantumLeaps/qtools/releases # #----------------------------------------------------------------------------- @@ -142,9 +142,11 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DQ_NASSERT -DEFM32PG1B200F256GM48=1 \ +DEFINES := -DEFM32PG1B200F256GM48=1 \ + -DQF_ON_CONTEXT_SW \ + -DQXK_USE_IRQ_HANDLER=CRYPTO_IRQHandler \ -DQXK_USE_IRQ_NUM=25 \ - -DQXK_USE_IRQ_HANDLER=CRYPTO_IRQHandler + -DQ_NASSERT # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/table.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/table.cpp index 36d60344..abb8b31e 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/table.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ constexpr char const * const EATING = &"eating "[0]; //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.hpp b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.hpp index d5793fb6..a2798d74 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.hpp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm index 33043f5d..441f56be 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/philo.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/philo.cpp index d0fd1540..7ea07850 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/philo.cpp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ inline uint8_t PHILO_ID(Philo const * const me) { //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp index 8d72a98f..578d3841 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.cpp @@ -168,30 +168,7 @@ void BSP::init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif + // NOTE: The VFP (hardware Floating Point) unit is configured by QK // enable clock for to the peripherals used by this application... SYSCTL->RCGCGPIO |= (1U << 5); // enable Run mode for GPIOF diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/bsp_stack-prot.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/bsp_stack-prot.cpp index e5e9842a..279dc233 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/bsp_stack-prot.cpp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/bsp_stack-prot.cpp @@ -168,30 +168,7 @@ void BSP::init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif + // NOTE: The VFP (hardware Floating Point) unit is configured by QK // enable clock for to the peripherals used by this application... SYSCTL->RCGCGPIO |= (1U << 5); // enable Run mode for GPIOF diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp index 44841430..73517c48 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.cpp @@ -162,15 +162,7 @@ void BSP::init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); + // NOTE: The VFP (hardware Floating Point) unit is configured by QV // enable clock for to the peripherals used by this application... SYSCTL->RCGCGPIO |= (1U << 5); // enable Run mode for GPIOF diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/armclang/dpp-qxk.uvoptx b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/armclang/dpp-qxk.uvoptx index 93a7d962..85b680d2 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/armclang/dpp-qxk.uvoptx +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/armclang/dpp-qxk.uvoptx @@ -10,7 +10,7 @@ *.s*; *.src; *.a* *.obj; *.o *.lib - *.txt; *.h; *.inc + *.txt; *.h; *.inc; *.md *.plm *.cpp 0 @@ -103,7 +103,7 @@ 1 0 0 - 8 + 19 diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/armclang/dpp-qxk.uvprojx b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/armclang/dpp-qxk.uvprojx index cff30482..15e152fd 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/armclang/dpp-qxk.uvprojx +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/armclang/dpp-qxk.uvprojx @@ -10,7 +10,7 @@ dpp-dbg 0x4 ARM-ADS - 6130001::V6.13.1::.\ARMCLANG + 6160000::V6.16::ARMCLANG 1 @@ -185,6 +185,7 @@ 0 2 0 + 0 0 0 8 @@ -351,7 +352,7 @@ 0 1 0 - 0 + 4 Stack_Size=2048 Heap_Size=16 @@ -610,7 +611,7 @@ 2 2 2 - 2 + 0 @@ -824,6 +825,7 @@ 0 2 0 + 0 0 0 8 @@ -990,7 +992,7 @@ 0 1 0 - 0 + 4 Stack_Size=2048 Heap_Size=16 @@ -1249,7 +1251,7 @@ 2 2 2 - 2 + 0 @@ -1463,6 +1465,7 @@ 0 2 0 + 0 0 0 8 @@ -1629,7 +1632,7 @@ 0 1 0 - 0 + 4 Stack_Size=2048 Heap_Size=16 diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.cpp index 1b148fc7..39aed8ac 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.cpp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.cpp @@ -169,10 +169,7 @@ void BSP::init(void) { // but SystemCoreClock needs to be updated SystemCoreClockUpdate(); - // FPU ( Floating Point Unit) configuration for QXK - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); + // NOTE: The VFP (hardware Floating Point) unit is configured by QXK // enable clock for to the peripherals used by this application... SYSCTL->RCGCGPIO |= (1U << 5); // enable Run mode for GPIOF diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/table.cpp b/examples/arm-cm/dpp_ek-tm4c123gxl/table.cpp index 36d60344..abb8b31e 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/table.cpp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ constexpr char const * const EATING = &"eating "[0]; //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_mbed-lpc1768/dpp.hpp b/examples/arm-cm/dpp_mbed-lpc1768/dpp.hpp index 63623b56..52e6f085 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/dpp.hpp +++ b/examples/arm-cm/dpp_mbed-lpc1768/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm b/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm index 14912e85..9c4cab1e 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm +++ b/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/arm-cm/dpp_mbed-lpc1768/philo.cpp b/examples/arm-cm/dpp_mbed-lpc1768/philo.cpp index 86d7ddd2..a1019ade 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/philo.cpp +++ b/examples/arm-cm/dpp_mbed-lpc1768/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -96,8 +96,8 @@ QP::QActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO // Philo definition ---------------------------------------------------------- //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_mbed-lpc1768/table.cpp b/examples/arm-cm/dpp_mbed-lpc1768/table.cpp index f57cf2eb..e3dc12fe 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/table.cpp +++ b/examples/arm-cm/dpp_mbed-lpc1768/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -87,8 +87,8 @@ QP::QActive * const AO_Table = &l_table; // "opaque" AO pointer //............................................................................ //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_nucleo-h743zi/dpp.hpp b/examples/arm-cm/dpp_nucleo-h743zi/dpp.hpp index d5793fb6..a2798d74 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/dpp.hpp +++ b/examples/arm-cm/dpp_nucleo-h743zi/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cm/dpp_nucleo-h743zi/dpp.qm b/examples/arm-cm/dpp_nucleo-h743zi/dpp.qm index 33043f5d..441f56be 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/dpp.qm +++ b/examples/arm-cm/dpp_nucleo-h743zi/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/arm-cm/dpp_nucleo-h743zi/philo.cpp b/examples/arm-cm/dpp_nucleo-h743zi/philo.cpp index d0fd1540..7ea07850 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/philo.cpp +++ b/examples/arm-cm/dpp_nucleo-h743zi/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ inline uint8_t PHILO_ID(Philo const * const me) { //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/bsp.cpp b/examples/arm-cm/dpp_nucleo-h743zi/qk/bsp.cpp index 2061494d..3e45cc53 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/bsp.cpp +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/bsp.cpp @@ -1,7 +1,7 @@ //============================================================================ -// Product: DPP example, NUCLEO-H743ZI board, premptive QK kernel -// Last updated for: @qpcpp_7_0_0 -// Last updated on 2022-02-28 +// Product: DPP example, NUCLEO-H743ZI board, preemptive QK kernel +// Last updated for version 7.2.0 +// Last updated on 2022-12-13 // // Q u a n t u m L e a P s // ------------------------ @@ -90,7 +90,8 @@ void SysTick_Handler(void) { } #endif - QP::QTimeEvt::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0 + //QP::QTimeEvt::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0 + DPP::ticker0.POST(nullptr, &l_SysTick_Handler); // Perform the debouncing of buttons. The algorithm for debouncing // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -138,9 +139,62 @@ void USART3_IRQHandler(void) { } // extern "C" // BSP functions ============================================================= +// MPU setup for STM32H743ZI MCU +static void STM32H743ZI_MPU_setup(void) { + // The following MPU configuration contains just a generic ROM + // region (with read-only access) and NULL-pointer protection region. + // Otherwise, the MPU will fall back on the background region (PRIVDEFENA). + // + static struct { + std::uint32_t rbar; + std::uint32_t rasr; + } const mpu_setup[] = { + + { // region #0: Flash: base=0x0000'0000, size=512M=2^(28+1) + 0x00000000U // base address + | MPU_RBAR_VALID_Msk // valid region + | (MPU_RBAR_REGION_Msk & 0U), // region #0 + (28U << MPU_RASR_SIZE_Pos) // 2^(18+1) region + | (0x6U << MPU_RASR_AP_Pos) // PA:ro/UA:ro + | (1U << MPU_RASR_C_Pos) // C=1 + | MPU_RASR_ENABLE_Msk // region enable + }, + + { // region #7: NULL-pointer: base=0x000'0000, size=128M=2^(26+1) + // NOTE: this region extends to 0x080'0000, which is where + // the ROM is re-mapped by STM32 + // + 0x00000000U // base address + | MPU_RBAR_VALID_Msk // valid region + | (MPU_RBAR_REGION_Msk & 7U), // region #7 + (26U << MPU_RASR_SIZE_Pos) // 2^(26+1)=128M region + | (0x0U << MPU_RASR_AP_Pos) // PA:na/UA:na + | (1U << MPU_RASR_XN_Pos) // XN=1 + | MPU_RASR_ENABLE_Msk // region enable + }, + }; + + // enable the MemManage_Handler for MPU exception + SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; + + __DSB(); + MPU->CTRL = 0U; // disable the MPU */ + for (std::uint_fast8_t n = 0U; n < Q_DIM(mpu_setup); ++n) { + MPU->RBAR = mpu_setup[n].rbar; + MPU->RASR = mpu_setup[n].rasr; + } + MPU->CTRL = MPU_CTRL_ENABLE_Msk // enable the MPU */ + | MPU_CTRL_PRIVDEFENA_Msk; // enable background region */ + __ISB(); + __DSB(); +} +//............................................................................ void BSP::init(void) { + // setup the MPU... + STM32H743ZI_MPU_setup(); + // NOTE: SystemInit() has been already called from the startup code - // but SystemCoreClock needs to be updated + // but SystemCoreClock needs to be updated // SystemCoreClockUpdate(); @@ -152,32 +206,7 @@ void BSP::init(void) { __HAL_FLASH_ART_ENABLE(); #endif // ART_ACCLERATOR_ENABLE - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif - - /* Configure the LEDs */ + // Configure the LEDs BSP_LED_Init(LED1); BSP_LED_Init(LED2); BSP_LED_Init(LED3); @@ -193,7 +222,7 @@ void BSP::init(void) { Q_ERROR(); } - /* object dictionaries... */ + // dictionaries... QS_OBJ_DICTIONARY(AO_Table); QS_OBJ_DICTIONARY(AO_Philo[0]); QS_OBJ_DICTIONARY(AO_Philo[1]); @@ -202,21 +231,25 @@ void BSP::init(void) { QS_OBJ_DICTIONARY(AO_Philo[4]); QS_OBJ_DICTIONARY(&l_SysTick_Handler); + QS_OBJ_DICTIONARY(&DPP::ticker0); QS_USR_DICTIONARY(PHILO_STAT); QS_USR_DICTIONARY(PAUSED_STAT); QS_USR_DICTIONARY(COMMAND_STAT); QS_USR_DICTIONARY(CONTEXT_SW); // setup the QS filters... - QS_GLB_FILTER(QP::QS_SM_RECORDS); // state machine records - QS_GLB_FILTER(QP::QS_AO_RECORDS); // active object records - QS_GLB_FILTER(QP::QS_UA_RECORDS); // all user records + QS_GLB_FILTER(QP::QS_ALL_RECORDS); // all records + QS_GLB_FILTER(-QP::QS_QF_TICK); // exclude the clock tick } -/*..........................................................................*/ +//............................................................................ +void BSP::terminate(int16_t result) { + Q_UNUSED_PAR(result); +} +//............................................................................ void BSP::ledOn(void) { BSP_LED_On(LED1); } -/*..........................................................................*/ +//............................................................................ void BSP::ledOff(void) { BSP_LED_Off(LED1); } @@ -264,10 +297,6 @@ void BSP::randomSeed(uint32_t seed) { l_rnd = seed; } -//............................................................................ -void BSP::terminate(int16_t result) { - (void)result; -} } // namespace DPP @@ -283,12 +312,7 @@ void QF::onStartup(void) { // assign all priority bits for preemption-prio. and none to sub-prio. NVIC_SetPriorityGrouping(0U); - // set priorities of ALL ISRs used in the system, see NOTE1 - // - // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority(). - // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE! - // + // set priorities of ALL ISRs used in the system NVIC_SetPriority(USART3_IRQn, 0U); // kernel unaware interrupt NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 1U); // ... @@ -302,21 +326,6 @@ void QF::onStartup(void) { void QF::onCleanup(void) { } -//............................................................................ -#ifdef QK_ON_CONTEXT_SW -// NOTE: the context-switch callback is called with interrupts DISABLED -extern "C" -void QK_onContextSw(QActive *prev, QActive *next) { - (void)prev; - if (next != (QActive *)0) { - //_impure_ptr = next->thread; // switch to next TLS - } - QS_BEGIN_NOCRIT(DPP::CONTEXT_SW, 0U) // no critical section! - QS_OBJ(prev); - QS_OBJ(next); - QS_END_NOCRIT() -} -#endif // QK_ON_CONTEXT_SW //............................................................................ void QK::onIdle(void) { // toggle the User LED on and then off, see NOTE01 @@ -456,10 +465,6 @@ void QS::onCommand(uint8_t cmdId, uint32_t param1, QS_U8(2, cmdId); QS_U32(8, param1); QS_END() - - if (cmdId == 10U) { - assert_failed("QS_onCommand", 11); - } } #endif // Q_SPY @@ -467,6 +472,22 @@ void QS::onCommand(uint8_t cmdId, uint32_t param1, } // namespace QP +extern "C" { +//............................................................................ +#ifdef QF_ON_CONTEXT_SW +// NOTE: the context-switch callback is called with interrupts DISABLED +void QF_onContextSw(QP::QActive *prev, QP::QActive *next) { + if ((prev != &DPP::ticker0) && (next != &DPP::ticker0)) { + QS_BEGIN_NOCRIT(DPP::CONTEXT_SW, 0U) // no critical section! + QS_OBJ(prev); + QS_OBJ(next); + QS_END_NOCRIT() + } +} +#endif // QF_ON_CONTEXT_SW + +} // extern "C" + //============================================================================ // NOTE1: // The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-h743zi/qk/gnu/Makefile index afc2b474..0df4905a 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## -# Product: Makefile for QP/C++ on NUCLEO-H743ZI, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Product: Makefile for QP/C++ on NUCLEO-H743ZI, QK kernel, GNU-ARM +# Last Updated for Version: 7.2.0 +# Date of the Last Update: 2022-12-14 # # 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 @@ -45,7 +45,7 @@ # 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/ +# https://github.com/QuantumLeaps/qtools/releases # #----------------------------------------------------------------------------- @@ -147,7 +147,11 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DQK_ON_CONTEXT_SW -DSTM32H743xx -DUSE_HAL_DRIVER -DUSE_STM32H7XX_NUCLEO_144 +DEFINES := \ + -DSTM32H743xx \ + -DUSE_HAL_DRIVER \ + -DUSE_STM32H7XX_NUCLEO_144 \ + -DQF_ON_CONTEXT_SW # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/main.cpp b/examples/arm-cm/dpp_nucleo-h743zi/qk/main.cpp index 5c6c2d99..62c56e75 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/main.cpp +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/main.cpp @@ -1,13 +1,13 @@ //============================================================================ // DPP example -// Last updated for version 7.1.2 -// Last updated on 2022-10-05 +// Last updated for: @qpcpp_7_2_0 +// Last updated on 2022-12-26 // -// Q u a n t u m L e a P s -// ------------------------ -// Modern Embedded Software +// Q u a n t u m L e a P s +// --------------------------- +// innovating embedded systems // -// Copyright (C) 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 @@ -25,7 +25,7 @@ // 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 . +// along with this program. If not, see . // // Contact information: // @@ -35,6 +35,8 @@ #include "dpp.hpp" #include "bsp.hpp" +QP::QTicker DPP::ticker0(0U); // ticker for tick rate 0 + //............................................................................ int main() { static QP::QEvt const *tableQueueSto[N_PHILO]; @@ -61,8 +63,13 @@ int main() { nullptr, 0U); // no stack storage } + // example of prioritizing the Ticker0 active object + DPP::ticker0.start(N_PHILO + 2U, // priority + nullptr, 0U, nullptr, 0U); // not used + QS_LOC_FILTER(-DPP::ticker0.getPrio()); // don't trace ticker0 + DPP::AO_Table->start( - N_PHILO + 1U, // priority + N_PHILO + 3U, // priority tableQueueSto, Q_DIM(tableQueueSto), nullptr, 0U); diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/bsp.cpp b/examples/arm-cm/dpp_nucleo-h743zi/qv/bsp.cpp index c2b501ee..b3fe84bb 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/bsp.cpp +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/bsp.cpp @@ -1,7 +1,7 @@ //============================================================================ // Product: DPP example, NUCLEO-H743ZI board, cooperative QV kernel -// Last updated for: @qpcpp_7_0_0 -// Last updated on 2022-02-28 +// Last updated for version 7.2.0 +// Last updated on 2022-12-13 // // Q u a n t u m L e a P s // ------------------------ @@ -88,7 +88,8 @@ void SysTick_Handler(void) { } #endif - QP::QTimeEvt::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0 + //QP::QTimeEvt::TICK_X(0U, &l_SysTick_Handler); // process time events for rate 0 + DPP::ticker0.POST(nullptr, &l_SysTick_Handler); // Perform the debouncing of buttons. The algorithm for debouncing // adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -110,6 +111,7 @@ void SysTick_Handler(void) { QP::QF::PUBLISH(&serveEvt, &l_SysTick_Handler); } } + QV_ARM_ERRATUM_838869(); } @@ -134,9 +136,62 @@ void USART3_IRQHandler(void) { } // extern "C" // BSP functions ============================================================= +// MPU setup for STM32H743ZI MCU +static void STM32H743ZI_MPU_setup(void) { + // The following MPU configuration contains just a generic ROM + // region (with read-only access) and NULL-pointer protection region. + // Otherwise, the MPU will fall back on the background region (PRIVDEFENA). + // + static struct { + std::uint32_t rbar; + std::uint32_t rasr; + } const mpu_setup[] = { + + { // region #0: Flash: base=0x0000'0000, size=512M=2^(28+1) + 0x00000000U // base address + | MPU_RBAR_VALID_Msk // valid region + | (MPU_RBAR_REGION_Msk & 0U), // region #0 + (28U << MPU_RASR_SIZE_Pos) // 2^(18+1) region + | (0x6U << MPU_RASR_AP_Pos) // PA:ro/UA:ro + | (1U << MPU_RASR_C_Pos) // C=1 + | MPU_RASR_ENABLE_Msk // region enable + }, + + { // region #7: NULL-pointer: base=0x000'0000, size=128M=2^(26+1) + // NOTE: this region extends to 0x080'0000, which is where + // the ROM is re-mapped by STM32 + // + 0x00000000U // base address + | MPU_RBAR_VALID_Msk // valid region + | (MPU_RBAR_REGION_Msk & 7U), // region #7 + (26U << MPU_RASR_SIZE_Pos) // 2^(26+1)=128M region + | (0x0U << MPU_RASR_AP_Pos) // PA:na/UA:na + | (1U << MPU_RASR_XN_Pos) // XN=1 + | MPU_RASR_ENABLE_Msk // region enable + }, + }; + + // enable the MemManage_Handler for MPU exception + SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; + + __DSB(); + MPU->CTRL = 0U; // disable the MPU */ + for (std::uint_fast8_t n = 0U; n < Q_DIM(mpu_setup); ++n) { + MPU->RBAR = mpu_setup[n].rbar; + MPU->RASR = mpu_setup[n].rasr; + } + MPU->CTRL = MPU_CTRL_ENABLE_Msk // enable the MPU */ + | MPU_CTRL_PRIVDEFENA_Msk; // enable background region */ + __ISB(); + __DSB(); +} +//............................................................................ void BSP::init(void) { + // setup the MPU... + STM32H743ZI_MPU_setup(); + // NOTE: SystemInit() has been already called from the startup code - // but SystemCoreClock needs to be updated + // but SystemCoreClock needs to be updated // SystemCoreClockUpdate(); @@ -148,32 +203,7 @@ void BSP::init(void) { __HAL_FLASH_ART_ENABLE(); #endif // ART_ACCLERATOR_ENABLE - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif - - /* Configure the LEDs */ + // Configure the LEDs BSP_LED_Init(LED1); BSP_LED_Init(LED2); BSP_LED_Init(LED3); @@ -189,7 +219,7 @@ void BSP::init(void) { Q_ERROR(); } - /* object dictionaries... */ + // dictionaries... QS_OBJ_DICTIONARY(AO_Table); QS_OBJ_DICTIONARY(AO_Philo[0]); QS_OBJ_DICTIONARY(AO_Philo[1]); @@ -198,21 +228,25 @@ void BSP::init(void) { QS_OBJ_DICTIONARY(AO_Philo[4]); QS_OBJ_DICTIONARY(&l_SysTick_Handler); + QS_OBJ_DICTIONARY(&DPP::ticker0); QS_USR_DICTIONARY(PHILO_STAT); QS_USR_DICTIONARY(PAUSED_STAT); QS_USR_DICTIONARY(COMMAND_STAT); QS_USR_DICTIONARY(CONTEXT_SW); // setup the QS filters... - QS_GLB_FILTER(QP::QS_SM_RECORDS); // state machine records - QS_GLB_FILTER(QP::QS_AO_RECORDS); // active object records - QS_GLB_FILTER(QP::QS_UA_RECORDS); // all user records + QS_GLB_FILTER(QP::QS_ALL_RECORDS); // all records + QS_GLB_FILTER(-QP::QS_QF_TICK); // exclude the clock tick } -/*..........................................................................*/ +//............................................................................ +void BSP::terminate(int16_t result) { + Q_UNUSED_PAR(result); +} +//............................................................................ void BSP::ledOn(void) { BSP_LED_On(LED1); } -/*..........................................................................*/ +//............................................................................ void BSP::ledOff(void) { BSP_LED_Off(LED1); } @@ -258,10 +292,6 @@ void BSP::randomSeed(uint32_t seed) { l_rnd = seed; } -//............................................................................ -void BSP::terminate(int16_t result) { - (void)result; -} } // namespace DPP @@ -277,12 +307,7 @@ void QF::onStartup(void) { // assign all priority bits for preemption-prio. and none to sub-prio. NVIC_SetPriorityGrouping(0U); - // set priorities of ALL ISRs used in the system, see NOTE1 - // - // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority(). - // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE! - // + // set priorities of ALL ISRs used in the system NVIC_SetPriority(USART3_IRQn, 0U); // kernel unaware interrupt NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 1U); // ... @@ -295,6 +320,7 @@ void QF::onStartup(void) { //............................................................................ void QF::onCleanup(void) { } + //............................................................................ void QV::onIdle(void) { // called with interrupts disabled, see NOTE01 // toggle the User LED on and then off, see NOTE01 @@ -436,10 +462,6 @@ void QS::onCommand(uint8_t cmdId, uint32_t param1, QS_U8(2, cmdId); QS_U32(8, param1); QS_END() - - if (cmdId == 10U) { - assert_failed("QS_onCommand", 11); - } } #endif // Q_SPY @@ -447,6 +469,22 @@ void QS::onCommand(uint8_t cmdId, uint32_t param1, } // namespace QP +extern "C" { +//............................................................................ +#ifdef QF_ON_CONTEXT_SW +// NOTE: the context-switch callback is called with interrupts DISABLED +void QF_onContextSw(QP::QActive *prev, QP::QActive *next) { + if ((prev != &DPP::ticker0) && (next != &DPP::ticker0)) { + QS_BEGIN_NOCRIT(DPP::CONTEXT_SW, 0U) // no critical section! + QS_OBJ(prev); + QS_OBJ(next); + QS_END_NOCRIT() + } +} +#endif // QF_ON_CONTEXT_SW + +} // extern "C" + //============================================================================ // NOTE1: // The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest @@ -461,7 +499,8 @@ void QS::onCommand(uint8_t cmdId, uint32_t param1, // Conversely, any ISRs prioritized above the QF_AWARE_ISR_CMSIS_PRI priority // level (i.e., with the numerical values of priorities less than // QF_AWARE_ISR_CMSIS_PRI) are never disabled and are not aware of the kernel. -// Such "QF-unaware" ISRs cannot call any QF services. The only mechanism +// Such "QF-unaware" ISRs cannot call any QF services. In particular they +// can NOT call the macros QK_ISR_ENTRY/QK_ISR_ENTRY. The only mechanism // by which a "QF-unaware" ISR can communicate with the QF framework is by // triggering a "QF-aware" ISR, which can post/publish events. // diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/gnu/Makefile b/examples/arm-cm/dpp_nucleo-h743zi/qv/gnu/Makefile index 3cfa7525..9e400be6 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ on NUCLEO-H743ZI, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last Updated for Version: 7.2.0 +# Date of the Last Update: 2022-12-14 # # 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 @@ -45,7 +45,7 @@ # 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/ +# https://github.com/QuantumLeaps/qtools/releases # #----------------------------------------------------------------------------- @@ -147,7 +147,11 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DQK_ON_CONTEXT_SW -DSTM32H743xx -DUSE_HAL_DRIVER -DUSE_STM32H7XX_NUCLEO_144 +DEFINES := \ + -DSTM32H743xx \ + -DUSE_HAL_DRIVER \ + -DUSE_STM32H7XX_NUCLEO_144 \ + -DQF_ON_CONTEXT_SW # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/main.cpp b/examples/arm-cm/dpp_nucleo-h743zi/qv/main.cpp index 7e551378..39769ba4 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/main.cpp +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/main.cpp @@ -1,7 +1,7 @@ //============================================================================ // DPP example -// Last updated for: @qpcpp_7_0_0 -// Last updated on 2022-02-28 +// Last updated for: @qpcpp_7_2_0 +// Last updated on 2022-12-26 // // Q u a n t u m L e a P s // --------------------------- @@ -35,6 +35,8 @@ #include "dpp.hpp" #include "bsp.hpp" +QP::QTicker DPP::ticker0(0U); // ticker for tick rate 0 + //............................................................................ int main() { static QP::QEvt const *tableQueueSto[N_PHILO]; @@ -54,12 +56,20 @@ int main() { // start the active objects... for (uint8_t n = 0U; n < N_PHILO; ++n) { - DPP::AO_Philo[n]->start((uint_fast8_t)(n + 1U), // priority - philoQueueSto[n], Q_DIM(philoQueueSto[n]), - nullptr, 0U); + DPP::AO_Philo[n]->start( + n + 1U, // QP priority + philoQueueSto[n], // event queue storage + Q_DIM(philoQueueSto[n]), // queue length [events] + nullptr, 0U); // no stack storage } - DPP::AO_Table->start((uint_fast8_t)(N_PHILO + 1U), // priority + // example of prioritizing the Ticker0 active object + DPP::ticker0.start(N_PHILO + 2U, // priority + nullptr, 0U, nullptr, 0U); // not used + QS_LOC_FILTER(-DPP::ticker0.getPrio()); // don't trace ticker0 + + DPP::AO_Table->start( + N_PHILO + 3U, // priority tableQueueSto, Q_DIM(tableQueueSto), nullptr, 0U); diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/bsp.cpp b/examples/arm-cm/dpp_nucleo-h743zi/qxk/bsp.cpp index cb7122f3..0f1dbfba 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/bsp.cpp +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/bsp.cpp @@ -1,7 +1,7 @@ //============================================================================ // Product: DPP example, NUCLEO-H743ZI board, dual-mode QXK kernel -// Last updated for: @qpcpp_7_0_0 -// Last updated on 2022-02-28 +// Last updated for version 7.2.0 +// Last updated on 2022-12-13 // // Q u a n t u m L e a P s // ------------------------ @@ -139,9 +139,62 @@ void USART3_IRQHandler(void) { } // extern "C" // BSP functions ============================================================= +// MPU setup for STM32H743ZI MCU +static void STM32H743ZI_MPU_setup(void) { + // The following MPU configuration contains just a generic ROM + // region (with read-only access) and NULL-pointer protection region. + // Otherwise, the MPU will fall back on the background region (PRIVDEFENA). + // + static struct { + std::uint32_t rbar; + std::uint32_t rasr; + } const mpu_setup[] = { + + { // region #0: Flash: base=0x0000'0000, size=512M=2^(28+1) + 0x00000000U // base address + | MPU_RBAR_VALID_Msk // valid region + | (MPU_RBAR_REGION_Msk & 0U), // region #0 + (28U << MPU_RASR_SIZE_Pos) // 2^(18+1) region + | (0x6U << MPU_RASR_AP_Pos) // PA:ro/UA:ro + | (1U << MPU_RASR_C_Pos) // C=1 + | MPU_RASR_ENABLE_Msk // region enable + }, + + { // region #7: NULL-pointer: base=0x000'0000, size=128M=2^(26+1) + // NOTE: this region extends to 0x080'0000, which is where + // the ROM is re-mapped by STM32 + // + 0x00000000U // base address + | MPU_RBAR_VALID_Msk // valid region + | (MPU_RBAR_REGION_Msk & 7U), // region #7 + (26U << MPU_RASR_SIZE_Pos) // 2^(26+1)=128M region + | (0x0U << MPU_RASR_AP_Pos) // PA:na/UA:na + | (1U << MPU_RASR_XN_Pos) // XN=1 + | MPU_RASR_ENABLE_Msk // region enable + }, + }; + + // enable the MemManage_Handler for MPU exception + SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; + + __DSB(); + MPU->CTRL = 0U; // disable the MPU */ + for (std::uint_fast8_t n = 0U; n < Q_DIM(mpu_setup); ++n) { + MPU->RBAR = mpu_setup[n].rbar; + MPU->RASR = mpu_setup[n].rasr; + } + MPU->CTRL = MPU_CTRL_ENABLE_Msk // enable the MPU */ + | MPU_CTRL_PRIVDEFENA_Msk; // enable background region */ + __ISB(); + __DSB(); +} +//............................................................................ void BSP::init(void) { + // setup the MPU... + STM32H743ZI_MPU_setup(); + // NOTE: SystemInit() has been already called from the startup code - // but SystemCoreClock needs to be updated + // but SystemCoreClock needs to be updated // SystemCoreClockUpdate(); @@ -153,32 +206,7 @@ void BSP::init(void) { __HAL_FLASH_ART_ENABLE(); #endif // ART_ACCLERATOR_ENABLE - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif - - /* Configure the LEDs */ + // Configure the LEDs BSP_LED_Init(LED1); BSP_LED_Init(LED2); BSP_LED_Init(LED3); @@ -194,13 +222,15 @@ void BSP::init(void) { Q_ERROR(); } - /* object dictionaries... */ + // dictionaries... QS_OBJ_DICTIONARY(AO_Table); QS_OBJ_DICTIONARY(AO_Philo[0]); QS_OBJ_DICTIONARY(AO_Philo[1]); QS_OBJ_DICTIONARY(AO_Philo[2]); QS_OBJ_DICTIONARY(AO_Philo[3]); QS_OBJ_DICTIONARY(AO_Philo[4]); + QS_OBJ_DICTIONARY(XT_Test1); + QS_OBJ_DICTIONARY(XT_Test2); QS_OBJ_DICTIONARY(&l_SysTick_Handler); QS_OBJ_DICTIONARY(&DPP::ticker0); @@ -210,15 +240,18 @@ void BSP::init(void) { QS_USR_DICTIONARY(CONTEXT_SW); // setup the QS filters... - QS_GLB_FILTER(QP::QS_SM_RECORDS); // state machine records - QS_GLB_FILTER(QP::QS_AO_RECORDS); // active object records - QS_GLB_FILTER(QP::QS_UA_RECORDS); // all user records + QS_GLB_FILTER(QP::QS_ALL_RECORDS); // all records + QS_GLB_FILTER(-QP::QS_QF_TICK); // exclude the clock tick } -/*..........................................................................*/ +//............................................................................ +void BSP::terminate(int16_t result) { + Q_UNUSED_PAR(result); +} +//............................................................................ void BSP::ledOn(void) { BSP_LED_On(LED1); } -/*..........................................................................*/ +//............................................................................ void BSP::ledOff(void) { BSP_LED_Off(LED1); } @@ -266,10 +299,6 @@ void BSP::randomSeed(uint32_t seed) { l_rnd = seed; } -//............................................................................ -void BSP::terminate(int16_t result) { - (void)result; -} } // namespace DPP @@ -285,12 +314,7 @@ void QF::onStartup(void) { // assign all priority bits for preemption-prio. and none to sub-prio. NVIC_SetPriorityGrouping(0U); - // set priorities of ALL ISRs used in the system, see NOTE1 - // - // !!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - // Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority(). - // DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE! - // + // set priorities of ALL ISRs used in the system NVIC_SetPriority(USART3_IRQn, 0U); // kernel unaware interrupt NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 1U); // ... @@ -303,22 +327,6 @@ void QF::onStartup(void) { //............................................................................ void QF::onCleanup(void) { } - -//............................................................................ -#ifdef QXK_ON_CONTEXT_SW -// NOTE: the context-switch callback is called with interrupts DISABLED -extern "C" -void QXK_onContextSw(QActive *prev, QActive *next) { - (void)prev; - if (next != (QActive *)0) { - //_impure_ptr = next->thread; // switch to next TLS - } - QS_BEGIN_NOCRIT(DPP::ON_CONTEXT_SW, 0U) // no critical section! - QS_OBJ(prev); - QS_OBJ(next); - QS_END_NOCRIT() -} -#endif // QXK_ON_CONTEXT_SW //............................................................................ void QXK::onIdle(void) { // toggle the User LED on and then off, see NOTE01 @@ -458,10 +466,6 @@ void QS::onCommand(uint8_t cmdId, uint32_t param1, QS_U8(2, cmdId); QS_U32(8, param1); QS_END() - - if (cmdId == 10U) { - assert_failed("QS_onCommand", 11); - } } #endif // Q_SPY @@ -469,6 +473,22 @@ void QS::onCommand(uint8_t cmdId, uint32_t param1, } // namespace QP +extern "C" { +//............................................................................ +#ifdef QF_ON_CONTEXT_SW +// NOTE: the context-switch callback is called with interrupts DISABLED +void QF_onContextSw(QP::QActive *prev, QP::QActive *next) { + if ((prev != &DPP::ticker0) && (next != &DPP::ticker0)) { + QS_BEGIN_NOCRIT(DPP::CONTEXT_SW, 0U) // no critical section! + QS_OBJ(prev); + QS_OBJ(next); + QS_END_NOCRIT() + } +} +#endif // QF_ON_CONTEXT_SW + +} // extern "C" + //============================================================================ // NOTE1: // The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-h743zi/qxk/gnu/Makefile index 942e38b6..a02fe2a7 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ on NUCLEO-H743ZI, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last Updated for Version: 7.2.0 +# Date of the Last Update: 2022-12-14 # # 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 @@ -45,7 +45,7 @@ # 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/ +# https://github.com/QuantumLeaps/qtools/releases # #----------------------------------------------------------------------------- @@ -151,7 +151,11 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DQK_ON_CONTEXT_SW -DSTM32H743xx -DUSE_HAL_DRIVER -DUSE_STM32H7XX_NUCLEO_144 +DEFINES := \ + -DSTM32H743xx \ + -DUSE_HAL_DRIVER \ + -DUSE_STM32H7XX_NUCLEO_144 \ + -DQF_ON_CONTEXT_SW # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/main.cpp b/examples/arm-cm/dpp_nucleo-h743zi/qxk/main.cpp index fa132497..9573b24d 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/main.cpp +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/main.cpp @@ -82,24 +82,25 @@ int main() { // example of prioritizing the Ticker0 active object DPP::ticker0.start(N_PHILO + 3U, // priority nullptr, 0U, nullptr, 0U); // not used + QS_LOC_FILTER(-DPP::ticker0.getPrio()); // don't trace ticker0 // NOTE: leave priority (N_PHILO + 4) free for mutex // start the extended Test2 thread DPP::XT_Test2->start( - N_PHILO + 5U, // QP prio of the thread - test2QueueSto, // event queue storage - Q_DIM(test2QueueSto), // queue length [events] - test2StackSto, // stack storage - sizeof(test2StackSto)); // stack size [bytes] + N_PHILO + 5U, // QP prio of the thread + test2QueueSto, // event queue storage + Q_DIM(test2QueueSto), // queue length [events] + test2StackSto, // stack storage + sizeof(test2StackSto)); // stack size [bytes] // NOTE: leave priority (N_PHILO + 6) free for mutex DPP::AO_Table->start( - N_PHILO + 7U, // QP priority of the AO - tableQueueSto, // event queue storage - Q_DIM(tableQueueSto), // queue length [events] - nullptr, 0U); // no stack storage + N_PHILO + 7U, // QP priority of the AO + tableQueueSto, // event queue storage + Q_DIM(tableQueueSto), // queue length [events] + nullptr, 0U); // no stack storage return QP::QF::run(); // run the QF application } diff --git a/examples/arm-cm/dpp_nucleo-h743zi/table.cpp b/examples/arm-cm/dpp_nucleo-h743zi/table.cpp index 36d60344..abb8b31e 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/table.cpp +++ b/examples/arm-cm/dpp_nucleo-h743zi/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ constexpr char const * const EATING = &"eating "[0]; //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_nucleo-l053r8/dpp.hpp b/examples/arm-cm/dpp_nucleo-l053r8/dpp.hpp index d5793fb6..a2798d74 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/dpp.hpp +++ b/examples/arm-cm/dpp_nucleo-l053r8/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cm/dpp_nucleo-l053r8/dpp.qm b/examples/arm-cm/dpp_nucleo-l053r8/dpp.qm index 33043f5d..441f56be 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/dpp.qm +++ b/examples/arm-cm/dpp_nucleo-l053r8/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/arm-cm/dpp_nucleo-l053r8/philo.cpp b/examples/arm-cm/dpp_nucleo-l053r8/philo.cpp index d0fd1540..7ea07850 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/philo.cpp +++ b/examples/arm-cm/dpp_nucleo-l053r8/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ inline uint8_t PHILO_ID(Philo const * const me) { //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.cpp b/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.cpp index 1f2ff95c..ade4b299 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.cpp +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.cpp @@ -1,7 +1,7 @@ //============================================================================ // Product: DPP example, STM32 NUCLEO-L053R8 board, preemptive QK kernel -// Last updated for version 7.1.0 -// Last updated on 2022-08-26 +// Last updated for version 7.2.0 +// Last updated on 2022-12-13 // // Q u a n t u m L e a P s // ------------------------ @@ -305,15 +305,15 @@ void QK::onIdle(void) { //============================================================================ extern "C" { -#ifdef QK_ON_CONTEXT_SW +#ifdef QF_ON_CONTEXT_SW // NOTE: the context-switch callback is called with interrupts DISABLED -void QK_onContextSw(QP::QActive *prev, QP::QActive *next) { +void QF_onContextSw(QP::QActive *prev, QP::QActive *next) { QS_BEGIN_NOCRIT(DPP::CONTEXT_SW, 0U) // no critical section! QS_OBJ(prev); QS_OBJ(next); QS_END_NOCRIT() } -#endif // QK_ON_CONTEXT_SW +#endif // QF_ON_CONTEXT_SW //............................................................................ Q_NORETURN Q_onAssert(char const * const module, int_t const loc) { diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile index 3bd7bd7f..a23a7e26 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C++ on STM32 NUCLEO-L053R8, QK kernel, GNU-ARM -# Last Updated for Version: 7.1.0 -# Date of the Last Update: 2022-08-26 +# Last Updated for Version: 7.2.0 +# Date of the Last Update: 2022-12-14 # # Q u a n t u m L e a P s # ------------------------ @@ -133,7 +133,7 @@ LIBS := # defines DEFINES := \ - -DQK_ON_CONTEXT_SW \ + -DQF_ON_CONTEXT_SW \ -DQK_USE_IRQ_HANDLER=LCD_IRQHandler \ -DQK_USE_IRQ_NUM=30 diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/bsp.cpp b/examples/arm-cm/dpp_nucleo-l053r8/qxk/bsp.cpp index a33b8260..1b0aaf21 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/bsp.cpp +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/bsp.cpp @@ -1,13 +1,13 @@ //============================================================================ // Product: DPP example, STM32 NUCLEO-L053R8 board, preemptive QXK kernel -// Last updated for: @qpcpp_7_1_0 -// Last updated on 2021-08-26 +// Last updated for: @qpcpp_721_0 +// Last updated on 2022-12-13 // // Q u a n t u m L e a P s // ------------------------ // Modern Embedded Software // -// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved. +// Copyright (C) 2005 Quantum Leaps. 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 @@ -282,10 +282,10 @@ void QF::onCleanup(void) { } //............................................................................ -#ifdef QXK_ON_CONTEXT_SW +#ifdef QF_ON_CONTEXT_SW // NOTE: the context-switch callback is called with interrupts DISABLED extern "C" -void QXK_onContextSw(QActive *prev, QActive *next) { +void QF_onContextSw(QActive *prev, QActive *next) { (void)prev; if (next != (QActive *)0) { //_impure_ptr = next->thread; // switch to next TLS @@ -295,7 +295,7 @@ void QXK_onContextSw(QActive *prev, QActive *next) { QS_OBJ(next); QS_END_NOCRIT() } -#endif // QXK_ON_CONTEXT_SW +#endif // QF_ON_CONTEXT_SW //............................................................................ void QXK::onIdle(void) { // toggle the User LED on and then off (not enough LEDs, see NOTE2) diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l053r8/qxk/gnu/Makefile index 7c1b7c16..b8eed92c 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C++ on NUCLEO-L053R8, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last Updated for Version: 7.2.0 +# Date of the Last Update: 2022-12-14 # # Q u a n t u m L e a P s # ------------------------ @@ -45,7 +45,7 @@ # 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/ +# https://github.com/QuantumLeaps/qtools/releases # #----------------------------------------------------------------------------- @@ -137,7 +137,7 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DQXK_ON_CONTEXT_SW \ +DEFINES := -DQF_ON_CONTEXT_SW \ -DQXK_USE_IRQ_HANDLER=LCD_IRQHandler \ -DQXK_USE_IRQ_NUM=30 diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.ewp b/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.ewp index 7c95e4ec..27eb0819 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.ewp +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.ewp @@ -214,7 +214,7 @@ @@ -2319,7 +2319,7 @@ diff --git a/examples/arm-cm/dpp_nucleo-l053r8/table.cpp b/examples/arm-cm/dpp_nucleo-l053r8/table.cpp index 36d60344..abb8b31e 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/table.cpp +++ b/examples/arm-cm/dpp_nucleo-l053r8/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ constexpr char const * const EATING = &"eating "[0]; //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_nucleo-l152re/dpp.hpp b/examples/arm-cm/dpp_nucleo-l152re/dpp.hpp index d5793fb6..a2798d74 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/dpp.hpp +++ b/examples/arm-cm/dpp_nucleo-l152re/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cm/dpp_nucleo-l152re/dpp.qm b/examples/arm-cm/dpp_nucleo-l152re/dpp.qm index 33043f5d..441f56be 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/dpp.qm +++ b/examples/arm-cm/dpp_nucleo-l152re/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/arm-cm/dpp_nucleo-l152re/philo.cpp b/examples/arm-cm/dpp_nucleo-l152re/philo.cpp index d0fd1540..7ea07850 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/philo.cpp +++ b/examples/arm-cm/dpp_nucleo-l152re/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ inline uint8_t PHILO_ID(Philo const * const me) { //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_nucleo-l152re/table.cpp b/examples/arm-cm/dpp_nucleo-l152re/table.cpp index 36d60344..abb8b31e 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/table.cpp +++ b/examples/arm-cm/dpp_nucleo-l152re/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ constexpr char const * const EATING = &"eating "[0]; //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_nucleo-l552ze/dpp.hpp b/examples/arm-cm/dpp_nucleo-l552ze/dpp.hpp index d5793fb6..a2798d74 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/dpp.hpp +++ b/examples/arm-cm/dpp_nucleo-l552ze/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cm/dpp_nucleo-l552ze/dpp.qm b/examples/arm-cm/dpp_nucleo-l552ze/dpp.qm index 33043f5d..441f56be 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/dpp.qm +++ b/examples/arm-cm/dpp_nucleo-l552ze/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/arm-cm/dpp_nucleo-l552ze/philo.cpp b/examples/arm-cm/dpp_nucleo-l552ze/philo.cpp index d0fd1540..7ea07850 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/philo.cpp +++ b/examples/arm-cm/dpp_nucleo-l552ze/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ inline uint8_t PHILO_ID(Philo const * const me) { //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qk/bsp.cpp b/examples/arm-cm/dpp_nucleo-l552ze/qk/bsp.cpp index b15ed7ac..f076433e 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qk/bsp.cpp +++ b/examples/arm-cm/dpp_nucleo-l552ze/qk/bsp.cpp @@ -321,9 +321,9 @@ void QF::onCleanup(void) { } //............................................................................ -#ifdef QK_ON_CONTEXT_SW +#ifdef QF_ON_CONTEXT_SW /* NOTE: the context-switch callback is called with interrupts DISABLED */ -void QK_onContextSw(QActive *prev, QActive *next) { +void QF_onContextSw(QActive *prev, QActive *next) { (void)prev; if (next != (QActive *)0) { //_impure_ptr = next->thread; /* switch to next TLS */ @@ -333,7 +333,7 @@ void QK_onContextSw(QActive *prev, QActive *next) { QS_OBJ(next); QS_END_NOCRIT() } -#endif /* QK_ON_CONTEXT_SW */ +#endif /* QF_ON_CONTEXT_SW */ //............................................................................ void QK::onIdle(void) { // toggle the User LED on and then off, see NOTE2 diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qxk/bsp.cpp b/examples/arm-cm/dpp_nucleo-l552ze/qxk/bsp.cpp index 1f299728..bde9f46d 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qxk/bsp.cpp +++ b/examples/arm-cm/dpp_nucleo-l552ze/qxk/bsp.cpp @@ -1,7 +1,7 @@ //============================================================================ // Product: DPP example, NUCLEO-L552ZE board, dual-mode QXK kernel -// Last updated for: @qpcpp_7_0_0 -// Last updated on 2022-02-28 +// Last updated for: @qpcpp_7_2_0 +// Last updated on 2022-12-13 // // Q u a n t u m L e a P s // ------------------------ @@ -321,9 +321,9 @@ void QF::onCleanup(void) { } //............................................................................ -#ifdef QXK_ON_CONTEXT_SW +#ifdef QF_ON_CONTEXT_SW /* NOTE: the context-switch callback is called with interrupts DISABLED */ -void QXK_onContextSw(QActive *prev, QActive *next) { +void QF_onContextSw(QActive *prev, QActive *next) { (void)prev; if (next != (QActive *)0) { //_impure_ptr = next->thread; /* switch to next TLS */ @@ -333,7 +333,7 @@ void QXK_onContextSw(QActive *prev, QActive *next) { QS_OBJ(next); QS_END_NOCRIT() } -#endif /* QXK_ON_CONTEXT_SW */ +#endif /* QF_ON_CONTEXT_SW */ //............................................................................ void QXK::onIdle(void) { // toggle the User LED on and then off, see NOTE2 diff --git a/examples/arm-cm/dpp_nucleo-l552ze/table.cpp b/examples/arm-cm/dpp_nucleo-l552ze/table.cpp index 36d60344..abb8b31e 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/table.cpp +++ b/examples/arm-cm/dpp_nucleo-l552ze/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ constexpr char const * const EATING = &"eating "[0]; //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_stm32f4-discovery/dpp.hpp b/examples/arm-cm/dpp_stm32f4-discovery/dpp.hpp index 63623b56..52e6f085 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/dpp.hpp +++ b/examples/arm-cm/dpp_stm32f4-discovery/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cm/dpp_stm32f4-discovery/dpp.qm b/examples/arm-cm/dpp_stm32f4-discovery/dpp.qm index 14912e85..9c4cab1e 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/dpp.qm +++ b/examples/arm-cm/dpp_stm32f4-discovery/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/arm-cm/dpp_stm32f4-discovery/philo.cpp b/examples/arm-cm/dpp_stm32f4-discovery/philo.cpp index 86d7ddd2..a1019ade 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/philo.cpp +++ b/examples/arm-cm/dpp_stm32f4-discovery/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -96,8 +96,8 @@ QP::QActive * const AO_Philo[N_PHILO] = { // "opaque" pointers to Philo AO // Philo definition ---------------------------------------------------------- //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qk/bsp.cpp b/examples/arm-cm/dpp_stm32f4-discovery/qk/bsp.cpp index 50db241e..a68d8daf 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qk/bsp.cpp +++ b/examples/arm-cm/dpp_stm32f4-discovery/qk/bsp.cpp @@ -154,30 +154,7 @@ void BSP::init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif + // NOTE: The VFP (hardware Floating Point) unit is configured by QK GPIO_InitTypeDef GPIO_struct; diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qv/bsp.cpp b/examples/arm-cm/dpp_stm32f4-discovery/qv/bsp.cpp index 42cce34d..c633f515 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qv/bsp.cpp +++ b/examples/arm-cm/dpp_stm32f4-discovery/qv/bsp.cpp @@ -151,30 +151,7 @@ void BSP::init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif + // NOTE: The VFP (hardware Floating Point) unit is configured by QV GPIO_InitTypeDef GPIO_struct; diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/bsp.cpp b/examples/arm-cm/dpp_stm32f4-discovery/qxk/bsp.cpp index f29871e5..c7ef3821 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/bsp.cpp +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/bsp.cpp @@ -154,30 +154,7 @@ void BSP::init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif + // NOTE: The VFP (hardware Floating Point) unit is configured by QXK GPIO_InitTypeDef GPIO_struct; diff --git a/examples/arm-cm/dpp_stm32f4-discovery/table.cpp b/examples/arm-cm/dpp_stm32f4-discovery/table.cpp index f57cf2eb..e3dc12fe 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/table.cpp +++ b/examples/arm-cm/dpp_stm32f4-discovery/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -87,8 +87,8 @@ QP::QActive * const AO_Table = &l_table; // "opaque" AO pointer //............................................................................ //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/game_efm32-slstk3401a/game.hpp b/examples/arm-cm/game_efm32-slstk3401a/game.hpp index 451e04fb..a152ff8a 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/game.hpp +++ b/examples/arm-cm/game_efm32-slstk3401a/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.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -154,12 +154,12 @@ extern QP::QActive * const AO_Ship; extern QP::QActive * const AO_Missile; //${Shared::Mine1_getInst} ................................................... -QP::QHsm * Mine1_getInst(std::uint8_t id) ; +QP::QHsm * Mine1_getInst(std::uint8_t id); //${Shared::Mine2_getInst} ................................................... -QP::QHsm * Mine2_getInst(std::uint8_t id) ; +QP::QHsm * Mine2_getInst(std::uint8_t id); } // namespace GAME //$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -#endif // GAME_HPP \ No newline at end of file +#endif // GAME_HPP diff --git a/examples/arm-cm/game_efm32-slstk3401a/game.qm b/examples/arm-cm/game_efm32-slstk3401a/game.qm index 029ba4e8..045baebc 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/game.qm +++ b/examples/arm-cm/game_efm32-slstk3401a/game.qm @@ -1,5 +1,5 @@ - + "Fly 'n' Shoot" game model from Chapters 1 & 9 of PSiCC2 diff --git a/examples/arm-cm/game_efm32-slstk3401a/mine1.cpp b/examples/arm-cm/game_efm32-slstk3401a/mine1.cpp index 7c6bbdae..19e937e6 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/mine1.cpp +++ b/examples/arm-cm/game_efm32-slstk3401a/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.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -76,8 +76,8 @@ static inline uint8_t MINE_ID(Mine1 const * const me) { // Mine1 class definition ---------------------------------------------------- //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/game_efm32-slstk3401a/mine2.cpp b/examples/arm-cm/game_efm32-slstk3401a/mine2.cpp index 04896fff..673e2313 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/mine2.cpp +++ b/examples/arm-cm/game_efm32-slstk3401a/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.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -76,8 +76,8 @@ static inline std::uint8_t MINE_ID(Mine2 const * const me) { // Mine1 class definition ---------------------------------------------------- //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/game_efm32-slstk3401a/missile.cpp b/examples/arm-cm/game_efm32-slstk3401a/missile.cpp index 1e920ffe..f02ddcc9 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/missile.cpp +++ b/examples/arm-cm/game_efm32-slstk3401a/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.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -63,8 +63,8 @@ protected: // Public-scope shared objects ----------------------------------------------- //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/game_efm32-slstk3401a/qk/bsp.cpp b/examples/arm-cm/game_efm32-slstk3401a/qk/bsp.cpp index a6e61379..50949ec9 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qk/bsp.cpp +++ b/examples/arm-cm/game_efm32-slstk3401a/qk/bsp.cpp @@ -173,30 +173,7 @@ void BSP_init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif + // NOTE: The VFP (hardware Floating Point) unit is configured by QK // enable clock for to the peripherals used by this application... CMU_ClockEnable(cmuClock_HFPER, true); diff --git a/examples/arm-cm/game_efm32-slstk3401a/qv/bsp.cpp b/examples/arm-cm/game_efm32-slstk3401a/qv/bsp.cpp index bd630102..7ba188af 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qv/bsp.cpp +++ b/examples/arm-cm/game_efm32-slstk3401a/qv/bsp.cpp @@ -167,15 +167,7 @@ void BSP_init(void) { // SystemCoreClockUpdate(); - // configure the FPU usage by choosing one of the options... - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); + // NOTE: The VFP (hardware Floating Point) unit is configured by QV // enable clock for to the peripherals used by this application... CMU_ClockEnable(cmuClock_HFPER, true); diff --git a/examples/arm-cm/game_efm32-slstk3401a/ship.cpp b/examples/arm-cm/game_efm32-slstk3401a/ship.cpp index 96699bc6..fc2644c3 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/ship.cpp +++ b/examples/arm-cm/game_efm32-slstk3401a/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.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -69,8 +69,8 @@ protected: // Public-scope shared objects ----------------------------------------------- //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/game_efm32-slstk3401a/tunnel.cpp b/examples/arm-cm/game_efm32-slstk3401a/tunnel.cpp index a8942e8c..f561abb5 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/tunnel.cpp +++ b/examples/arm-cm/game_efm32-slstk3401a/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.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -84,8 +84,8 @@ protected: // Public-scope shared objects ----------------------------------------------- //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/blinky0.cpp b/examples/arm-cm/low-power_ek-tm4c123gxl/blinky0.cpp index 923ac2c8..30304ef8 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/blinky0.cpp +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/blinky0.cpp @@ -3,7 +3,7 @@ // Model: low-power.qm // File: ${.::blinky0.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -61,8 +61,8 @@ protected: //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/blinky1.cpp b/examples/arm-cm/low-power_ek-tm4c123gxl/blinky1.cpp index 235b3330..d928b08d 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/blinky1.cpp +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/blinky1.cpp @@ -3,7 +3,7 @@ // Model: low-power.qm // File: ${.::blinky1.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -59,8 +59,8 @@ protected: //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/low-power.qm b/examples/arm-cm/low-power_ek-tm4c123gxl/low-power.qm index 0a26347c..602c6717 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/low-power.qm +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/low-power.qm @@ -1,5 +1,5 @@ - + Low-Power example diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/low_power.hpp b/examples/arm-cm/low-power_ek-tm4c123gxl/low_power.hpp index 77569f6e..6b8139c0 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/low_power.hpp +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/low_power.hpp @@ -3,7 +3,7 @@ // Model: low-power.qm // File: ${.::low_power.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/bsp.cpp b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/bsp.cpp index 58bf88d4..43addc8a 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/bsp.cpp +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/bsp.cpp @@ -102,10 +102,7 @@ void BSP_init(void) { SYSCTL_XTAL_16MHZ); SystemCoreClock = XTAL_HZ; - // FPU ( Floating Point Unit) configuration for QK - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); + // NOTE: The VFP (hardware Floating Point) unit is configured by QK // enable clock for to the peripherals used by this application... SYSCTL->RCGCGPIO |= (1U << 5); // enable Run mode for GPIOF diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/bsp.cpp b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/bsp.cpp index 31331ab0..05a5d12a 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/bsp.cpp +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/bsp.cpp @@ -99,32 +99,7 @@ void BSP_init(void) { SYSCTL_XTAL_16MHZ); SystemCoreClock = XTAL_HZ; - // FPU ( Floating Point Unit) configuration for QV - // choose one of the options... -#if 1 - // OPTION 1: - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in more than one task or - // in any ISRs. This setting is the safest and recommended, but requires - // extra stack space and CPU cycles. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); -#else - // OPTION 2: - // Do NOT to use the automatic FPU state preservation and - // do NOT to use the FPU lazy stacking. - // - // NOTE: - // Use the following setting when FPU is used in ONE task only and not - // in any ISR. This setting is very efficient, but if more than one task - // (or ISR) start using the FPU, this can lead to corruption of the - // FPU registers. This option should be used with CAUTION. - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) - | (1U << FPU_FPCCR_LSPEN_Pos)); -#endif + // NOTE: The VFP (hardware Floating Point) unit is configured by QV // enable clock for to the peripherals used by this application... SYSCTL->RCGCGPIO |= (1U << 5); // enable Run mode for GPIOF diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/bsp.cpp b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/bsp.cpp index 4e343ca7..1b3c9248 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/bsp.cpp +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/bsp.cpp @@ -103,10 +103,7 @@ void BSP_init(void) { SYSCTL_XTAL_16MHZ); SystemCoreClock = XTAL_HZ; - // FPU ( Floating Point Unit) configuration for QXK - // Use the automatic FPU state preservation and the FPU lazy stacking. - // - FPU->FPCCR |= (1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos); + // NOTE: The VFP (hardware Floating Point) unit is configured by QXK // enable clock for to the peripherals used by this application... SYSCTL->RCGCGPIO |= (1U << 5); // enable Run mode for GPIOF diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/dpp.hpp b/examples/arm-cr/dpp_launchxl2-tms57012/dpp.hpp index d5793fb6..a2798d74 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/dpp.hpp +++ b/examples/arm-cr/dpp_launchxl2-tms57012/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/dpp.qm b/examples/arm-cr/dpp_launchxl2-tms57012/dpp.qm index 33043f5d..441f56be 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/dpp.qm +++ b/examples/arm-cr/dpp_launchxl2-tms57012/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/philo.cpp b/examples/arm-cr/dpp_launchxl2-tms57012/philo.cpp index d0fd1540..7ea07850 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/philo.cpp +++ b/examples/arm-cr/dpp_launchxl2-tms57012/philo.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::philo.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ inline uint8_t PHILO_ID(Philo const * const me) { //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/table.cpp b/examples/arm-cr/dpp_launchxl2-tms57012/table.cpp index 36d60344..abb8b31e 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/table.cpp +++ b/examples/arm-cr/dpp_launchxl2-tms57012/table.cpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::table.cpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,8 +83,8 @@ constexpr char const * const EATING = &"eating "[0]; //$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Check for the minimum required QP version -#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpcpp version 6.9.0 or higher required +#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpcpp version 7.0.0 or higher required #endif //$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/bsp.cpp b/examples/embos/arm-cm/dpp_nucleo-h743zi/bsp.cpp index 1a84d5a9..de8eb1d8 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/bsp.cpp +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/bsp.cpp @@ -161,7 +161,7 @@ void OS_Idle(void) { b = QP::QS::getByte(); QF_INT_ENABLE(); - if (b != QP::QS_EOD) { // not End-Of-Data? + if (b != QS_EOD) { // not End-Of-Data? DPP::l_uartHandle.Instance->TDR = (b & 0xFFU); // put into TDR } } @@ -216,10 +216,7 @@ void BSP::init(void) { __HAL_FLASH_ART_ENABLE(); #endif // ART_ACCLERATOR_ENABLE - // Explictily Disable the automatic FPU state preservation as well as - // the FPU lazy stacking - // - FPU->FPCCR &= ~((1U << FPU_FPCCR_ASPEN_Pos) | (1U << FPU_FPCCR_LSPEN_Pos)); + // NOTE: The VFP (hardware Floating Point) unit is configured by RTOS // Configure the LEDs BSP_LED_Init(LED1); diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.hpp b/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.hpp index d5793fb6..a2798d74 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.hpp +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.hpp @@ -3,7 +3,7 @@ // Model: dpp.qm // File: ${.::dpp.hpp} // -// This code has been generated by QM 5.2.2 . +// This code has been generated by QM 5.2.4 . // DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. // // SPDX-License-Identifier: GPL-3.0-or-later diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.qm b/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.qm index 33043f5d..441f56be 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.qm +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with MSM state machines diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp b/examples/embos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp index 01a6df8f..2cf202f6 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp @@ -2332,7 +2332,7 @@