diff --git a/.gitignore b/.gitignore index 820b6b45..33a5e3e3 100644 --- a/.gitignore +++ b/.gitignore @@ -32,12 +32,11 @@ *.Debug *.Release *.bak -*.qlc JLink*.* version-* -3rd_party/ html/ +cert-pack/ test_priv/ dbg/ rel/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..8c45f353 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "3rd_party"] + path = 3rd_party + url = https://github.com/QuantumLeaps/3rd_party.git diff --git a/3rd_party b/3rd_party new file mode 160000 index 00000000..8a2ebb9e --- /dev/null +++ b/3rd_party @@ -0,0 +1 @@ +Subproject commit 8a2ebb9e76a63a2f46b8ad906657154ab21a15e8 diff --git a/LICENSES/LicenseRef-QL-dual.qlc b/LICENSES/LicenseRef-QL-dual.qlc new file mode 100644 index 00000000..a5df1c2b --- /dev/null +++ b/LICENSES/LicenseRef-QL-dual.qlc @@ -0,0 +1,26 @@ +Any user of the QP/C real-time embedded framework +qpc +2023-12-31 + +Copyright (C) 2005 Quantum Leaps, LLC . + +SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial + +This software is dual-licensed under the terms of the open source GNU +General Public License version 3 (or any later version), or alternatively, +under the terms of one of the closed source Quantum Leaps commercial +licenses. + +The terms of the open source GNU General Public License version 3 +can be found at: + +The terms of the closed source Quantum Leaps commercial licenses +can be found at: + +Redistributions in source code must retain this top-level comment block. +Plagiarizing this software to sidestep the license obligations is illegal. + +Contact information: + + +#F04C7A28E6F84BAFDD11A028A9B7CFE2F4DE1FD7 \ No newline at end of file diff --git a/LICENSES/QM-EVAL-QPC.qlc b/LICENSES/QM-EVAL-QPC.qlc new file mode 100644 index 00000000..9a0423a0 --- /dev/null +++ b/LICENSES/QM-EVAL-QPC.qlc @@ -0,0 +1,25 @@ +Users of QP/C Real-Time Embedded Framework (RTEF) +qpc +2023-12-31 + +SPDX-License-Identifier: GPL-3.0-or-later + +This generated code is free software: you can redistribute it under +the terms of the GNU General Public License as published by the Free +Software Foundation. + +This code is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details. + +NOTE: +Alternatively, this generated code may be distributed under the terms +of Quantum Leaps commercial licenses, which expressly supersede the GNU +General Public License and are specifically designed for licensees +interested in retaining the proprietary status of their code. + +Contact information: + + +#B825C9988DCDDACEDB8D6020A03FCE45174EA0AA \ No newline at end of file diff --git a/LICENSES/QP-Arduino_GPL_Exception.txt b/LICENSES/QP-Arduino_GPL_Exception.txt new file mode 100644 index 00000000..18112ea3 --- /dev/null +++ b/LICENSES/QP-Arduino_GPL_Exception.txt @@ -0,0 +1,46 @@ +QP/C++ and QP-nano FRAMEWORK EXCEPTION FOR ARDUINO + +Version 3.0, December 22, 2021 + +Copyright (c) 2005-2021 Quantum Leaps, LLC. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This QP/C++ and QP-nano Framework Exception for Arduino ("Exception") +is an additional permission under section 7 of the GNU General Public +License, version 3 ("GPLv3"). It applies to the QP/C++ and QP-nano +source code (the "QP Frameworks") that is distributed as part of the +QP-Arduino Support Package. + +When you use QP Frameworks inside your program, the QP Frameworks' code +is combined with your code of the program. The purpose of this Exception +is to allow non-GPL (including proprietary) programs to use, in this way, +the QP Frameworks' code covered by this Exception. + +0. Definitions. +"QP Frameworks" are lightweight real-time embedded frameworks (RTEFs) +as well as all supporting ports and examples, as distributed from: + and + + +"Arduino-Certified Board" means any board with an Arduino-supported +CPU that bears an official Arduino logo and/or is officially certified +under the Arduino Certified Program +(see ). + +"Target Code" refers to output from any compiler and linker in +executable form suitable for execution by an embedded microcontroller. + + +1. Grant of Additional Permission +As a special Exception, the copyright holder of QP Frameworks gives you +permission to propagate a work of Target Code formed by combining +the QP Frameworks with your own source code without the requirement +to expose your proprietary source code, provided that all Target Code +will execute on Arduino-Certified Board(s). + +2. No Weakening of GPL +The availability of this Exception does not imply any general +presumption that third-party software linking to the QP Framework is +unaffected by the copyleft requirements of the GPLv3 license. diff --git a/LICENSES/QP-RasPi_GPL_Exception.txt b/LICENSES/QP-RasPi_GPL_Exception.txt new file mode 100644 index 00000000..2b54e5d4 --- /dev/null +++ b/LICENSES/QP-RasPi_GPL_Exception.txt @@ -0,0 +1,48 @@ +QP/C and QP/C++ FRAMEWORKS EXCEPTION FOR RASPBERRY PI + +Version 2.0, 2 August 2022 + +Copyright (c) 2005-2021 Quantum Leaps, LLC. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This QP/C++ and QP-nano Framework Exception for Arduino ("Exception") +is an additional permission under section 7 of the GNU General Public +License, version 3 ("GPLv3"). It applies to the QP/C++ and QP-nano +source code (the "QP Frameworks") that is distributed as part of the +QP-Arduino Support Package. + +When you use QP Frameworks inside your program, the QP Frameworks' code +is combined with your code of the program. The purpose of this Exception +is to allow non-GPL (including proprietary) programs to use, in this way, +the QP Frameworks' code covered by this Exception. + +0. Definitions. +"QP Frameworks" are lightweight real-time embedded frameworks (RTEFs) +as well as all supporting ports and examples, as distributed from: + and + + +"Raspberry Pi" is a low cost, credit-card sized computer that is +designed by the Raspberry Pi Foundation based in the UK and registered +as UK educational charity under the number 1129409. For the purpose of +this license, Raspberry Pi means only genuine Raspberry Pi computer +bearing the Raspberry Pi logo, as described at +. + +"Target Code" refers to output from any compiler and linker in +executable form suitable for execution by Raspberry Pi. + + +1. Grant of Additional Permission +As a special Exception, the copyright holder of QP Frameworks gives you +permission to propagate a work of Target Code formed by combining the QP +Frameworks with your own source code without the requirement to expose +your propriatory source code, provided that all Target Code will execute +on a genuine Raspberry Pi computer(s). + +2. No Weakening of GPL +The availability of this Exception does not imply any general +presumption that third-party software linking to the QP Framework is +unaffected by the copyleft requirements of the GPLv3 license. diff --git a/LICENSES/QP-mbed_GPL_Exception.txt b/LICENSES/QP-mbed_GPL_Exception.txt new file mode 100644 index 00000000..3ba91f32 --- /dev/null +++ b/LICENSES/QP-mbed_GPL_Exception.txt @@ -0,0 +1,42 @@ +QP/C and QP/C++ FRAMEWORKS EXCEPTION FOR ARM mbed + +Version 2.0, August 2022 + +Copyright (c) 2005-2014 Quantum Leaps, LLC. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This QP/C++ and QP-nano Framework Exception for Arduino ("Exception") +is an additional permission under section 7 of the GNU General Public +License, version 3 ("GPLv3"). It applies to the QP/C++ and QP-nano +source code (the "QP Frameworks") that is distributed as part of the +QP-Arduino Support Package. + +When you use QP Frameworks inside your program, the QP Frameworks' code +is combined with your code of the program. The purpose of this Exception +is to allow non-GPL (including proprietary) programs to use, in this way, +the QP Frameworks' code covered by this Exception. + +0. Definitions. +"QP Frameworks" are lightweight real-time embedded frameworks (RTEFs) +as well as all supporting ports and examples, as distributed from: + and + + +"mbed-Enabled Board" means any board with an ARM Cortex-M CPU that is +listed on the official "mbed platforms" website +. + + +1. Grant of Additional Permission +As a special Exception, the copyright holder of QP Frameworks gives you +permission to propagate a work of Target Code formed by combining +the QP Frameworks with your own source code without the requirement +to expose your proprietary source code, provided that all Target Code will +execute on an "mbed-Enabled Board". + +2. No Weakening of GPL +The availability of this Exception does not imply any general +presumption that third-party software linking to the QP Framework is +unaffected by the copyleft requirements of the GPLv3 license. diff --git a/README.md b/README.md index b5e36cd1..09b8d317 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,9 @@ obtaining QP/C bundled together like that is that you get all components, tools and examples ready to go. ### Getting Started Resources +- ["QP/C Tutorial"][Tutorial] +describes a series of progressively advanced QP/C example applications. + - [Video: "Getting Started with QP Real-Time Embedded Frameworks"][Video] provides instructions on how to download, install, and get started with QP. @@ -26,15 +29,6 @@ provides instructions on how to download, install, and get started with QP. contains also a tutorial, in which you build a simple "Blinky" application. -# Documentation -The online HTML documention for the **latest** version of QP/C is located -at: https://www.state-machine.com/qpc - -The offline HTML documentation for **this** particular version of QP/C -is located in the sub-folder [html](html). To view the offline documentation, -open the file [html/index.html](html/index.html) in your web browser. - - # About QP/C QP/C (Quantum Platform in C) is a lightweight, open source [Real-Time Embedded Framework (RTEF)][RTEF] for building modern embedded @@ -94,7 +88,7 @@ products ranging from implantable medical devices to complex weapon systems. # QP/C Licensing -QP/C is licensed under the increasingly popular [dual licensing model][Lic], +QP/C is licensed under the sustainable [dual licensing model][Lic], in which both the open source software distribution mechanism and traditional closed source software distribution models are combined. @@ -104,7 +98,12 @@ you don't use any open source license and you do not violate your policy. # QP/C Documentation -The **QP/C Manual** is located online at: https://www.state-machine.com/qpc +The online HTML documention for the **latest** version of QP/C is located +at: https://www.state-machine.com/qpc + +The offline HTML documentation for **this** particular version of QP/C +is located in the sub-folder [html](html). To view the offline documentation, +open the file [html/index.html](html/index.html) in your web browser. # How to Get Help? @@ -115,6 +114,13 @@ The **QP/C Manual** is located online at: https://www.state-machine.com/qpc - [Quantum Leaps licensing](https://www.state-machine.com/licensing) - [info@state-machine.com](mailto:info@state-machine.com) + +# How to Help this Project? +If you like this project, please give it a star (in the upper-right corner of your browser window): + +![GitHub star](doxygen/images/github-star.jpg) + + [RTEF]: [QP]: [QP/C]: @@ -125,4 +131,5 @@ The **QP/C Manual** is located online at: https://www.state-machine.com/qpc [Lic]: [Cust]: [AN]: + [Tutorial]: [Video]: diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile index ef92f08c..4ac536c2 100644 --- a/doxygen/Doxyfile +++ b/doxygen/Doxyfile @@ -1,17 +1,18 @@ -# Doxyfile 1.9.3 +# Doxyfile 1.9.4 -@INCLUDE = ../../ql-doxygen/Doxyfile-QL +@INCLUDE = ../../ql-doxygen/ql-doxyfile #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = QP/C -PROJECT_NUMBER = 7.0.0 +PROJECT_NAME = "QP/C" +PROJECT_NUMBER = 7.0.1 PROJECT_BRIEF = "Real-Time Embedded Framework" -PROJECT_LOGO = images/logo_ql.png +PROJECT_LOGO = ../../ql-doxygen/images/logo_ql.png OUTPUT_DIRECTORY = CREATE_SUBDIRS = NO +CREATE_SUBDIRS_LEVEL = 6 ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES @@ -41,7 +42,7 @@ PYTHON_DOCSTRING = YES INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 4 -OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO @@ -116,17 +117,13 @@ WARN_IF_INCOMPLETE_DOC = YES WARN_NO_PARAMDOC = NO WARN_AS_ERROR = NO WARN_FORMAT = "$file:$line: $text" +WARN_LINE_FORMAT = "at line $line of file $file" WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- INPUT = main.dox \ gs.dox \ - ../../cert-pack/srs.dox \ - ../../cert-pack/sas.dox \ - ../../cert-pack/sds.dox \ - ../../cert-pack/misra.dox \ - api.dox \ exa.dox \ exa_native.dox \ exa_rtos.dox \ @@ -138,25 +135,19 @@ INPUT = main.dox \ ports_arm-cm.dox \ ports_rtos.dox \ ports_os.dox \ - metrics.dox \ + api.dox \ history.dox \ - modules.dox \ + ../../ql-doxygen/help.dox \ + ../../cert-pack/srs.dox \ + ../../cert-pack/sas.dox \ + ../../cert-pack/sds.dox \ + ../../cert-pack/misra.dox \ + ../../cert-pack/tr.dox \ + metrics.dox \ dir.dox \ - macros.h \ - ../include/qpc.h \ - ../include/qep.h \ - ../include/qf.h \ - ../include/qequeue.h \ - ../include/qmpool.h \ - ../include/qpset.h \ - ../include/qv.h \ - ../include/qk.h \ - ../include/qxk.h \ - ../include/qxthread.h \ - ../include/qs.h \ + config.h \ ../include \ - ../src \ - ../../ql-doxygen/help.dox + ../src INPUT_ENCODING = UTF-8 FILE_PATTERNS = *.dox \ @@ -169,7 +160,8 @@ FILE_PATTERNS = *.dox \ *.lnt RECURSIVE = YES -EXCLUDE = ../include/qs_dummy.h +EXCLUDE = ../include/qs_dummy.h \ + ../include/quit.h EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = @@ -218,18 +210,24 @@ IGNORE_PREFIX = GENERATE_HTML = YES HTML_OUTPUT = ../html HTML_FILE_EXTENSION = .html -HTML_HEADER = ../../ql-doxygen/header-awesome.html -HTML_FOOTER = ../../ql-doxygen/footer-awesome.html +HTML_HEADER = ../../ql-doxygen/ql-header-awesome.html +HTML_FOOTER = ../../ql-doxygen/ql-footer-awesome.html HTML_STYLESHEET = HTML_EXTRA_STYLESHEET = ../../ql-doxygen/doxygen-awesome.css \ + ../../ql-doxygen/doxygen-awesome-sidebar-only.css \ + ../../ql-doxygen/doxygen-awesome-sidebar-only-darkmode-toggle.css \ ../../ql-doxygen/ql-awesome.css + HTML_EXTRA_FILES = ../../ql-doxygen/doxygen-awesome-darkmode-toggle.js \ - ../../ql-doxygen/preview.js + ../../ql-doxygen/doxygen-awesome-fragment-copy-button.js \ + ../../ql-doxygen/doxygen-awesome-paragraph-link.js \ + ../../ql-doxygen/ql-preview.js + HTML_COLORSTYLE_HUE = 209 HTML_COLORSTYLE_SAT = 255 HTML_COLORSTYLE_GAMMA = 113 HTML_TIMESTAMP = NO -HTML_DYNAMIC_MENUS = NO +HTML_DYNAMIC_MENUS = YES HTML_DYNAMIC_SECTIONS = NO HTML_INDEX_NUM_ENTRIES = 100 GENERATE_DOCSET = NO @@ -255,11 +253,11 @@ QHP_SECT_FILTER_ATTRS = QHG_LOCATION = GENERATE_ECLIPSEHELP = NO ECLIPSE_DOC_ID = com.state-machine.qp -DISABLE_INDEX = YES +DISABLE_INDEX = NO GENERATE_TREEVIEW = YES FULL_SIDEBAR = NO ENUM_VALUES_PER_LINE = 4 -TREEVIEW_WIDTH = 300 +TREEVIEW_WIDTH = 335 EXT_LINKS_IN_WINDOW = NO OBFUSCATE_EMAILS = NO HTML_FORMULA_FORMAT = png @@ -293,15 +291,15 @@ PREDEFINED = Q_SPY \ Q_UTEST \ QK_ON_CONTEXT_SW \ QXK_ON_CONTEXT_SW \ - QF_MAX_ACTIVE \ - QF_MAX_TICK_RATE \ - QF_MAX_EPOOL \ - QF_EVENT_SIZ_SIZE \ - QF_EQUEUE_CTR_SIZE \ - QF_MPOOL_SIZ_SIZE \ - QF_MPOOL_CTR_SIZE \ - QF_TIMEEVT_CTR_SIZE \ - QF_ACTIVE_STOP \ - QS_TIME_SIZE + QF_MAX_ACTIVE=32 \ + QF_MAX_TICK_RATE=2 \ + QF_MAX_EPOOL=3 \ + QF_EVENT_SIZ_SIZE=2 \ + QF_EQUEUE_CTR_SIZE=2 \ + QF_MPOOL_SIZ_SIZE=2 \ + QF_MPOOL_CTR_SIZE=2 \ + QF_TIMEEVT_CTR_SIZE=4 \ + QF_ACTIVE_STOP=0 \ + QS_TIME_SIZE=4 EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES diff --git a/doxygen/Doxyfile-CERT b/doxygen/Doxyfile-CERT index cecbd538..7cc0d69b 100644 --- a/doxygen/Doxyfile-CERT +++ b/doxygen/Doxyfile-CERT @@ -6,5 +6,6 @@ # Configuration options related to the input files #--------------------------------------------------------------------------- -ENABLED_SECTIONS += CERT +ENABLED_SECTIONS += CERT +HTML_OUTPUT = ../cert-pack diff --git a/doxygen/Doxyfile-CHM b/doxygen/Doxyfile-CHM index 703285c0..3755a354 100644 --- a/doxygen/Doxyfile-CHM +++ b/doxygen/Doxyfile-CHM @@ -1,4 +1,4 @@ -# Doxyfile 1.9.3 +# Doxyfile 1.9.4 @INCLUDE = Doxyfile @@ -8,8 +8,8 @@ PROJECT_LOGO = images/logo_ql-comp.png HTML_OUTPUT = tmp -HTML_HEADER = ../../ql-doxygen/header.html -HTML_FOOTER = ../../ql-doxygen/footer.html +HTML_HEADER = ../../ql-doxygen/ql-header.html +HTML_FOOTER = ../../ql-doxygen/ql-footer.html HTML_EXTRA_STYLESHEET = ../../ql-doxygen/ql.css -HTML_EXTRA_FILES = ../../ql-doxygen/preview.js +HTML_EXTRA_FILES = ../../ql-doxygen/ql-preview.js GENERATE_HTMLHELP = YES diff --git a/doxygen/DoxygenLayout.xml b/doxygen/DoxygenLayout.xml new file mode 100644 index 00000000..1cb2df23 --- /dev/null +++ b/doxygen/DoxygenLayout.xml @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doxygen/api.dox b/doxygen/api.dox index 9944267e..1cd4f5e6 100644 --- a/doxygen/api.dox +++ b/doxygen/api.dox @@ -1,6 +1,5 @@ /*! @page api API Reference - -@tableofcontents +@nav_next{deprecated} @section api_qep QEP (Hierarchical State Machines) QEP is a universal, UML-compliant event processor that enables developers to code UML state machines in highly readable ANSI-C, in which every state machine element is mapped to code precisely, unambiguously, and exactly once (traceability). QEP fully supports hierarchical state nesting, which is the fundamental mechanism for reusing behavior across many states instead of repeating the same actions and transitions over and over again. @@ -18,7 +17,7 @@ QEP is a universal, UML-compliant event processor that enables developers to cod - QMsm_ctor() - QMsm_isInState() - QMsm_stateObj() - +- Q_STATE_CAST() @section api_qf QF (Active Object Framework) @@ -49,7 +48,7 @@ QF is a portable, event-driven, real-time framework for execution of active obje - QActive_unsubscribeAll() -@subsection api_qf_evt Dynamic Events +@subsection api_qf_evt Event Management - ::QEvt class - QF_poolInit() - Q_NEW() @@ -57,6 +56,7 @@ QF is a portable, event-driven, real-time framework for execution of active obje - Q_NEW_REF() - Q_DELETE_REF() - QF_gc() +- Q_EVT_CAST() @subsection api_qf_time Time Events @@ -89,8 +89,7 @@ QF is a portable, event-driven, real-time framework for execution of active obje - QMPool_put() - -@section api_qs QS ("Quantum Spy" Software Tracing) +@section api_qs QS (Software Tracing) QS is a software tracing system that enables developers to monitor live event-driven QP applications with minimal target system resources and without stopping or significantly slowing down the code. QS is an ideal tool for testing, troubleshooting, and optimizing QP applications. QS can even be used to support acceptance testing in product manufacturing. @@ -121,6 +120,7 @@ QS is a software tracing system that enables developers to monitor live event-dr @subsection api_qs_dict QS Dictionaries - QS_SIG_DICTIONARY() - QS_OBJ_DICTIONARY() +- QS_OBJ_ARR_DICTIONARY() - QS_FUN_DICTIONARY() - QS_USR_DICTIONARY() @@ -156,8 +156,8 @@ Given the simplicity, portability, and low-resource consumption, the QV schedule - QV_CPU_SLEEP() -@section api_qk QK (Preemptive Run-to-Completion Kernel) -QK is a tiny **preemptive**, priority-based, non-blocking kernel designed specifically for executing active objects. QK runs active objects in the same way as prioritized interrupt controller (such as NVIC in ARM Cortex-M) runs interrupts using the single stack. Active objects process their events in run-to-completion (RTC) fashion and remove themselves from the call stack, the same way as nested interrupts remove themselves from the stack upon completion. At the same time high-priority active objects can preempt lower-priority active objects, just like interrupts can preempt each other under a prioritized interrupt controller. QK meets all the requirement of the Rate Monotonic Scheduling (a.k.a. Rate Monotonic Analysis RMA) and can be used in hard real-time systems. +@section api_qk QK (Preemptive RTC Kernel) +QK is a tiny **preemptive**, run-to-completion (RTC) kernel designed specifically for executing active objects. QK runs active objects in the same way as prioritized interrupt controller (such as NVIC in ARM Cortex-M) runs interrupts using the single stack. Active objects process their events in run-to-completion (RTC) fashion and remove themselves from the call stack, the same way as nested interrupts remove themselves from the stack upon completion. At the same time high-priority active objects can preempt lower-priority active objects, just like interrupts can preempt each other under a prioritized interrupt controller. QK meets all the requirement of the Rate Monotonic Scheduling (a.k.a. Rate Monotonic Analysis RMA) and can be used in hard real-time systems. @subsection api_qk_ctrl Kernel Initialization and Control @@ -173,9 +173,8 @@ QK is a tiny **preemptive**, priority-based, non-blocking kernel designed specif - QK_ISR_EXIT() -@section api_qxk QXK (Preemptive Dual-Mode RTOS Kernel) -QXK is a small, preemptive, priority-based, dual-mode **blocking** kernel that executes active objects like the @ref qk "QK kernel", but can also execute traditional __blocking__ threads (extended threads). In this respect, QXK behaves exactly as a conventional __RTOS__ (Real-Time Operating System). QXK 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. - +@section api_qxk QXK (Dual-Mode Kernel) +QXK is a small, preemptive, priority-based, dual-mode (run-to-completion/**blocking**) kernel that executes active objects like the @ref srs_qk "QK kernel", but can also execute traditional __blocking__ threads (extended threads). In this respect, QXK behaves exactly as a conventional __RTOS__ (Real-Time Operating System). QXK 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. @subsection api_qxk_ctrl Kernel Initialization and Control @@ -200,7 +199,8 @@ QXK is a small, preemptive, priority-based, dual-mode **blocking** kernel that e - QXThread_delay() - QXThread_delayCancel() - QXThread_queueGet() - +- QXK_current() +- QXK_TLS() @subsection api_qxk_sema Semaphores - ::QXSemaphore class (Semaphore Control Block) @@ -224,23 +224,18 @@ QXK is a small, preemptive, priority-based, dual-mode **blocking** kernel that e - QXThread_queueGet() - waiting (blocking) on message queue - @subsection api_qxk_mem Memory Pools - ::QMPool class - QMPool_init() - QMPool_get() - QMPool_put() - -@subsection api_qxk_tls Thread-Local Storage -- QXK_current() -- QXK_TLS() - -@next{deprecated} +
+@nav_next{deprecated} */ -/*##########################################################################*/ +############################################################################## /*! @page deprecated Deprecated APIs -__The following QP/C APIs are now deprecated:__ +**The following QP/C APIs are now deprecated:** */ diff --git a/doxygen/config.h b/doxygen/config.h new file mode 100644 index 00000000..5df361c2 --- /dev/null +++ b/doxygen/config.h @@ -0,0 +1,411 @@ +/** +* @file +* @brief Various macros for configuring and porting QP/C +*/ + +/*! 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.h 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. +* +* @description +* This macro can be defined in the QF ports and should be in range +* of 1U..255U, inclusive. The value of this macro determines the maximum +* event pools in the system. Not all event pools must be actually used, +* but the maximum number of pools cannot exceed #QF_MAX_EPOOL. +* +* If the macro is not defined, the default value is 3U. Defining the value +* below the maximum saves some memory, mostly for the subscriber-lists. +* @sa ::QSubscrList. +* +* @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.h 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.h 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 ::QEQueueCtr +* type. If the macro is not defined, the default of 1 byte will be chosen in +* qequeue.h. The valid #QF_EQUEUE_CTR_SIZE values of 1U, 2U, or 4U, correspond +* to ::QEQueueCtr of uint8_t, uint16_t, and uint32_t, respectively. The +* ::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 ::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.h 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 #QF_EVENT_SIZ_SIZE. +* +* @description +* This macro can be defined in the QF ports to configure the ::QMPoolSize +* type. If the macro is not defined, the default of #QF_EVENT_SIZ_SIZE +* will be chosen in qmpool.h, 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 +* ::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The +* ::QMPoolSize data type determines the dynamic range of block-sizes that +* the native ::QMPool can handle. +* @sa #QF_EVENT_SIZ_SIZE, ::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.h 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 ::QMPoolCtr +* type. If the macro is not defined, the default of 2 bytes will be chosen +* in qmpool.h. The valid #QF_MPOOL_CTR_SIZE values of 1U, 2U, or 4U, +* correspond to ::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. +* The ::QMPoolCtr data type determines the dynamic range of block-counters +* that the native ::QMPool can handle, or, in other words, the maximum number +* of blocks that the native QF event pool can manage. +* @sa ::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.h 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 ::QTimeEvt struct. 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 2 +* bytes will be chosen in qf.h. The valid #QF_TIMEEVT_CTR_SIZE values of 1, +* 2, or 4, 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 ::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.h header file and henceforth include +* this header file in all builds. +*/ +#define QF_TIMEEVT_CTR_SIZE 2U + +/*! 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() + +void intDisable(void); +void intEnable(void); + +/*! Define the type of the critical section status. +* +* @description +* Defining this macro configures the "saving and restoring critical section +* status" policy. Coversely, if this macro is not defined, the simple +* "unconditional critical section exit" is used. +*/ +#define QF_CRIT_STAT_TYPE crit_stat_t + +/*! Define the critical section entry 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 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_) + +typedef unsigned int crit_stat_t; +crit_stat_t critEntry(void); +void critExit(crit_stat_t stat); + +/*! Enable the QActive_stop() API in the QF port. +* +* @description +* Defining this macro enables the QActive_stop() API in a given port. +* This feature should be used with caution, as stopping and re-starting +* active objects **cleanly** can be tricky. +*/ +#define QF_ACTIVE_STOP + +/*! The preprocessor switch to disable checking assertions +* +* @description +* When defined, Q_NASSERT disables the following macros #Q_ASSERT, +* #Q_REQUIRE, #Q_ENSURE, #Q_INVARIANT, #Q_ERROR as well as +* #Q_ASSERT_ID, #Q_REQUIRE_ID, #Q_ENSURE_ID, #Q_INVARIANT_ID, and +* #Q_ERROR_ID do _not_ evaluate the test condition passed as the +* argument to these macros. +* +* @note The notable exceptions are the macros #Q_ALLEGE and +* #Q_ALLEGE_ID, that still evaluate the test condition, but do not +* report assertion failures when the switch #Q_NASSERT is defined. +*/ +#define Q_NASSERT + +/*! The preprocessor switch to activate the QS software tracing +* instrumentation in the code +* +* @description +* When defined, Q_SPY activates the QS software tracing instrumentation. +* When Q_SPY is not defined, the QS instrumentation in the code does +* not generate any code. +*/ +#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 + +/*! The preprocessor switch to enable constructor in the ::QEvt class +* instrumentation in the code +* +* @tr{RQP005} +*/ +#define Q_EVT_CTOR + +/*! 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 example, 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_)->eQueue.frontEvt != (QEvt *)0)) + +#if (QF_MAX_ACTIVE <= 8U) + #define QACTIVE_EQUEUE_SIGNAL_(me_) do { \ + QPSet8_insert(&QF_readySet_, (me_)->prio); \ + if (QF_intNest_ == 0U) { \ + uint_fast8_t p = QK_schedPrio_(); \ + if (p != 0U) { \ + QK_sched_(p); \ + } \ + } \ + } while (0) +#else + /*! 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 { \ + QPSet64_insert(&QF_readySet_, (me_)->prio); \ + if (QF_intNest_ == 0U) { \ + uint_fast8_t p = QK_schedPrio_(); \ + if (p != 0U) { \ + QK_sched_(p); \ + } \ + } \ + } while (0) +#endif + +/*! This macro defines the type of the event pool used in the QK kernel. +* +* @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 an example implementation based on the native ::QMPool class. +* In other QF ports, the port might be using a memory pool from the +* underlying kernel/OS. +*/ +#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \ + (QMPool_init(&(p_), (poolSto_), (poolSize_), (QMPoolSize)(evtSize_))) + +/*! Platform-dependent macro defining how QF should obtain the +* event pool block-size +* +* @note +* This is a specific implementation for the built-in kernels. +* 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_) ((uint32_t)(p_).blockSize) + +/*! Platform-dependent macro defining how QF should obtain an event +* @a e_ from the event pool @a p_ with the free margin @a m_. +* +* @note +* This is an example implementation based on the native ::QMPool class. +* In other QF ports, the port might be using a memory pool from the +* underlying kernel/OS. +*/ +#define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \ + ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) + +/*! Platform-dependent macro defining how QF should return an event +* @a e_ to the event pool @a p_ +* +* @note +* This is an example implementation based on the native ::QMPool class. +* In other QF ports, the port might be using a memory pool from the +* underlying kernel/OS. +*/ +#define QF_EPOOL_PUT_(p_, e_, qs_id_) \ + (QMPool_put(&(p_), (e_), (qs_id_))) + +/*! Macro defined only for the internal QP implementation. It should +* be not defined for the application-level code +*/ +#define QP_IMPL + diff --git a/doxygen/dir.dox b/doxygen/dir.dox index 41f73dd6..965eda7a 100644 --- a/doxygen/dir.dox +++ b/doxygen/dir.dox @@ -1,15 +1,13 @@ /*##########################################################################*/ -/*! @dir ../include - -Platform-independent QP™/C API +/*! @dir include +@brief Platform-independent QP™/C API @attention The QP™/C include directory needs to be added to the compiler's include path in the applications using QP™/C. */ /*##########################################################################*/ -/*! @dir ../src - -Platform-independent QP™/C source code +/*! @dir src +@brief Platform-independent QP™/C source code Files from this directory need to be added to the project, to build the QP™/C framework from source code. @@ -17,44 +15,34 @@ Files from this directory need to be added to the project, to build the QP&trade The QP™/C src directory needs to be added to the compiler's include path in the applications that build QP™/C framework from sources (as opposed to using QP as a pre-built library). */ /*##########################################################################*/ -/*! @dir ../src/qf - -Platform-independent implementation of the @ref qep and @ref qf components. +/*! @dir src/qf +@brief Platform-independent implementation of the @ref qep and @ref 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. */ /*##########################################################################*/ -/*! @dir ../src/qv - -Platform-independent implementation of the @ref qv built-in kernel. +/*! @dir src/qv +@brief Platform-independent implementation of the @ref srs_qv built-in kernel. @attention -Files in this directory need to be included in the QP application build only if the application uses the @ref qv kernel. +Files in this directory need to be included in the QP application build only if the application uses the @ref srs_qv kernel. */ /*##########################################################################*/ -/*! @dir ../src/qk - -Platform-independent implementation of the @ref qk built-in kernel. +/*! @dir src/qk +@brief Platform-independent implementation of the @ref srs_qk built-in kernel. @attention -Files in this directory need to be included in the QP application build only if the application uses the @ref qk kernel. +Files in this directory need to be included in the QP application build only if the application uses the @ref srs_qk kernel. */ /*##########################################################################*/ -/*! @dir ../src/qxk - -Platform-independent implementation of the @ref qxk built-in kernel. +/*! @dir src/qxk +@brief Platform-independent implementation of the @ref srs_qxk built-in kernel. @attention -Files in this directory need to be included in the QP application build only if the application uses the @ref qxk kernel. +Files in this directory need to be included in the QP application build only if the application uses the @ref srs_qxk kernel. */ /*##########################################################################*/ -/*! @dir ../src/qs - -Platform-independent implementation of the @ref qs component (software tracing). -*/ -/*##########################################################################*/ -/*! @dir ../3rd_party - -3rd-Party code used in the QP™/C @ref ports "ports" and @ref exa "examples" +/*! @dir src/qs +@brief Platform-independent implementation of the @ref qs component (software tracing). */ diff --git a/doxygen/exa.dox b/doxygen/exa.dox index b6bc79f8..002d99fa 100644 --- a/doxygen/exa.dox +++ b/doxygen/exa.dox @@ -1,7 +1,5 @@ /*! @page exa Examples -@tableofcontents - @section exa_gen General Comments The QP/C distribution contains many @subpage exa_ref "example projects" to demonstrate various QP/C features. Each example project is described on its own dedicated page that you can find using several criteria (see @ref exa_ref). The example projects have the following main goals: @@ -15,7 +13,6 @@ The QP/C distribution contains many @subpage exa_ref "example projects" to demon It is highly recommended that you create your own projects by **copying and modifying** existing example projects rather than starting your QP/C projects from scratch. - @subsection exa_code Example Code Structure QP/C examples are located in sub-directories of the examples top-level folder, with the hierarchical organization outlined below: @@ -193,7 +190,7 @@ QP/C examples are located in sub-directories of the exa
  • A @subpage exa_native "Native examples" are located in sub-directories named after the CPU architecture, such as arm-cm for ARM Cortex-M. Under that directory, the sub-directories blinky_ek-tm4c123gxl contain the specific example on the specified board, such as "Blinky" on the EK-TM4C123GXL board here. In the specific example folder, you find sub-folders for the @ref comp_qv "QV", @ref comp_qk "QK" and @ref comp_qxk "QXK" kernels, respectively.
  • -
  • B @subpage exa_rtos "Examples for 3rd-party RTOS"/@ref exa_os "OS" are located in sub-directories named after the RTOS/OS, such as ucos-ii for uCOS-II RTOS. Under that directory, the sub-directories, such as arm-cm, contain examples for the specified CPU architecture, such as ARM Cortex-M here. +
  • B @subpage exa_rtos "Examples for 3rd-party RTOS"/@ref exa_os "OS" are located in sub-directories named after the RTOS/OS, such as uc-os2 for uc-os2 RTOS. Under that directory, the sub-directories, such as arm-cm, contain examples for the specified CPU architecture, such as ARM Cortex-M here.
  • C @subpage exa_mware "Examples for 3rd-party Middleware" are located in sub-directories named after the middleware, such as lwIP for the lwIP TCP/IP stack. Under that directory, the sub-directories, such as arm-cm, contain examples for the specified CPU architecture, such as ARM Cortex-M here. @@ -210,7 +207,6 @@ QP/C examples are located in sub-directories of the exa Because the QP distribution contains *all* examples, the number of sub-directories and files in the examples folder may seem daunting. However, knowing the structure of the examples folder, you can simply ignore or even delete the sub-directories that are not interesting to you. - @subsection exa_sec_apps Example Applications To demonstrate QP/C features on an embedded board, you need to create an application that does "something interesting". Instead of inventing this "something interesting" for each and every example, the example projects implement one of the three "example applications", which are described on the @ref gs_tut "QP™/C Tutorial": @@ -228,12 +224,10 @@ Beyond these basic applications for demonstrating and testing the various @ref p While some provided examples can run on your @ref exa_os "desktop computer", most embedded example projects require special hardware in form of @ref exa_sec_boards, which you need to acquire to be able to run the examples. The boards chosen for the examples are generally inexpensive and self-contained with no need for external hardware (such as external JTAG debuggers or power supplies). - @subsection exa_sec_tools Development Tools Most provided examples require special embedded cross-development tools, such as embedded compilers, linkers, debuggers and IDEs, which you need to acquire independently from the QP/C distribution. Generally, the examples work with the free (size limited) evaluation versions of the commercial tools. The examples list the versions of tools they were developed and tested with. Please refer to the @ref exa_ref "cross-reference section" @ref exa_sec_tools to see which embedded toolchains are used. - @subsection exa_sec_conf Build Configurations QP examples @ref ports "QP ports" are provided in the following three **build configurations**: @@ -249,7 +243,6 @@ QP examples @ref ports "QP ports" are provided in the following three **build co The different phases of embedded software life cycle pose different challenges. During the development and maintenance phase, for example, the emphasis is on the ease of debugging and verifying the correctness of the code, which require lower levels of optimization and special scaffolding code. In contrast, for releasing the code in the final product, the emphasis is on small memory footprint and CPU time efficiency, which require high-level of optimization and removal of any scaffolding code. To address these conflicting needs, the same source code is compiled into multiple **build configurations** that differ in the use of compiler options and activation of the scaffolding code. - @subsection exa_sec_qm QM Models Many example projects contain code auto-generated by the QM modeling tool. Such projects always contain the corresponding **QM model** file, which you can open in QM, modify, and re-generate the code. @@ -257,7 +250,6 @@ Many example projects contain code auto-generated by the 3rd_party top-level folder. @@ -272,9 +264,7 @@ The Third-Party software components included in the 3rd sub-folders. - @subsection exa_own Creating your Own QP/C Projects - Perhaps the most important fact of life to remember is that in embedded systems nothing works until everything works. This means that you should always start with a working system and gradually evolve it, changing one thing at a time and making sure that it keeps working every step of the way. Keeping this in mind, the provided QP/C application examples, such as the super-simple Blinky, or a bit more advanced @ref dpp or @ref game, allow you to get started with a working project rather than starting from scratch. You should also always try one of the provided example projects on the same evaluation board that it was designed for, before making any changes. @@ -294,7 +284,6 @@ After copying the project folder, you still need to change the name of the proje By copying and re-naming an existing, working project, as opposed to creating a new one from scratch, you inherit the correct compiler and linker options an other project settings, which will help you get started much faster. - @subsection exa_doc Next Steps and Further Reading About QP and QM To work with QP/C effectively, you need to learn a bit more about active objects and state machines. Below is a list of links to enable you to further your knowledge: @@ -311,9 +300,6 @@ To work with QP/C effectively, you need to learn a bit more about active objects /*##########################################################################*/ /*! @page exa_ref Cross-Reference -@tableofcontents - - @section exa_ref_kernel Native Examples (by Built-in Kernel) - @ref exa_qv - @ref exa_qk @@ -321,11 +307,6 @@ To work with QP/C effectively, you need to learn a bit more about active objects @section exa_ref_tool Native Examples (by Development Toolchain) -@n - - -@subsection exa_ref_arm-keil ARM-Keil Toolchain (ARM Compiler 5) -- @ref arm-cm_blinky_ek-tm4c123gxl   (Cortex-M4) @subsection exa_ref_arm-clang ARM-Clang Toolchain (ARM Compiler 6) @@ -337,10 +318,8 @@ To work with QP/C effectively, you need to learn a bit more about active objects - @ref arm-cm_dpp_nucleo-l152re   (Cortex-M3) - @ref arm-cm_game_efm32-slstk3401a   (Cortex-M4) - @ref arm-cm_dpp_stm32f4-discovery -- @ref arm-cm_dpp_stm32f746g-disco   (Cortex-M7) - @ref arm-cm_dpp_nucleo-l053r8   (Cortex-M0+) - @ref arm-cm_dpp_efm32-slstk3401a   (Cortex-M4) -- @ref arm-cm_dpp_stm32f746g-disco   (Cortex-M7) - @ref arm-cm_dpp_nucleo-h743zi   (Cortex-M7) @@ -354,16 +333,13 @@ To work with QP/C effectively, you need to learn a bit more about active objects - @ref arm-cm_dpp_nucleo-l152re   (Cortex-M3) - @ref arm-cm_game_efm32-slstk3401a   (Cortex-M4) - @ref arm-cm_dpp_stm32f4-discovery -- @ref arm-cm_dpp_stm32f746g-disco   (Cortex-M7) - @ref lwip_ek-lm3s6965   (Cortex-M3) -- @ref arm7-9_dpp_at91sam7s-ek   (ARM7TDMI) @subsection exa_ref_gnu-ccs GNU-ARM with TI CCS IDE - @ref arm-cm_dpp_ek-tm4c123gxl   (Cortex-M4) - @subsection exa_ref_iar-arm IAR EWARM - @ref arm-cm_blinky_ek-tm4c123gxl   (Cortex-M4) - @ref arm-cm_blinky_efm32-slstk3401a   (Cortex-M4) @@ -373,11 +349,9 @@ To work with QP/C effectively, you need to learn a bit more about active objects - @ref arm-cm_dpp_nucleo-l053r8   (Cortex-M0+) - @ref arm-cm_dpp_nucleo-l152re   (Cortex-M3) - @ref arm-cm_game_efm32-slstk3401a   (Cortex-M4) -- @ref arm-cm_dpp_stm32f746g-disco   (Cortex-M7) - @ref arm-cr_blinky_launchxl2-tms57012   (Cortex-R4) - @ref arm-cr_dpp_launchxl2-tms57012   (Cortex-R4) - @ref lwip_ek-lm3s6965   (Cortex-M3) -- @ref arm7-9_dpp_at91sam7s-ek   (ARM7TDMI) @subsection exa_ref_ccs-430 CCS for MSP430 @@ -393,7 +367,6 @@ To work with QP/C effectively, you need to learn a bit more about active objects @section exa_ref_native Native Examples (by Processor) - @ref exa_arm-cm - @ref exa_arm-cr -- @ref exa_arm7-9 ("classic ARM") - @ref exa_msp430 ("classic" MSP430 and "extended" MSP430x) @@ -401,7 +374,7 @@ To work with QP/C effectively, you need to learn a bit more about active objects - @ref exa_embos (SEGGER) - @ref exa_freertos (Amazon Web Services) - @ref exa_threadx (Express Logic) -- @ref exa_ucos-ii (Micrium/SiLabs) +- @ref exa_uc-os2 (Micrium/SiLabs) @section exa_ref_os Examples for Workstations (Windows, Linux, MacOS) @@ -419,7 +392,6 @@ The examples in the "workstation" directory are designed for workstations (runni - @ref exa_emwin (SEGGER, a.k.a. uC/GUI by Micrium) - @section exa_ref_boards Examples by Development Board The boards chosen for the examples are generally inexpensive and self-contained with minimal need for external hardware (such as external JTAG debuggers or power supplies). Also, all the selected boards provide a virtual COM port (ideally) or can be easily connected to a TTL-to-USB serial converter cable for @ref comp_qs "QS software tracing" output. @@ -437,7 +409,7 @@ You can hover the mouse cursor over the    - @ref freertos_dpp_ek-tm4c123gxl (FreeRTOS kernel; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains) - @ref freertos_dpp_nucleo-h743zi (FreeRTOS kernel; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains) - @ref threadx_dpp_ek-tm4c123gxl (ThreadX kernel; IAR-EWARM toolchain) -- @ref ucos-ii_dpp_ek-tm4c123gxl (uC/OS-II kernel; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains) +- @ref uc-os2_dpp_ek-tm4c123gxl (uC/OS-II kernel; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains) @anchor EFM32-SLSTK3401A @@ -447,13 +419,11 @@ You can hover the mouse cursor over the    - @ref arm-cm_game_efm32-slstk3401a (QV, QK kernels; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains; QWin-GUI emulation) - @anchor mbed-LPC1768 ![mbed-LPC1768](bd_mbed-LPC1768.jpg) - @ref arm-cm_dpp_mbed-lpc1768 (QV, QK kernels; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains) - @anchor NUCLEO-L053R8 ![NUCLEO-L053R8](bd_NUCLEO-L053R8.jpg) - @ref arm-cm_dpp_nucleo-l053r8 (QV, QK, QXK kernels; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains) @@ -462,7 +432,7 @@ You can hover the mouse cursor over the    @anchor NUCLEO-L152RE ![NUCLEO-L152RE](bd_NUCLEO-L152RE.jpg) - @ref arm-cm_dpp_nucleo-l152re (QV, QK kernels; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains) -- @ref ucos-ii_dpp_nucleo-l053r8 (uC/OS-II kernel; ARM-KEIL, IAR-EWARM toolchains) +- @ref uc-os2_dpp_nucleo-l053r8 (uC/OS-II kernel; ARM-KEIL, IAR-EWARM toolchains) @anchor exa_EK-LM3S6965 @@ -483,14 +453,12 @@ You can hover the mouse cursor over the    - @ref threadx_dpp_stm32f429-discovery (ThreadX kernel; IAR-EWARM toolchain) - @anchor STM32F746G-Discovery ![STM32F746G-Discovery](bd_STM32F746G-Disco.jpg) - @ref arm-cm_dpp_stm32f746g-disco (QV, QK, QXK kernels; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains) - @ref freertos_dpp_stm32f746g-disco (FreeRTOS kernel; ARM-KEIL, GNU-ARM, IAR-EWARM toolchains) - @subsection exa_ref_arm-cr ARM Cortex-R Boards: @anchor LAUNCHXL2-TMS57012 ![LAUNCHXL2-TMS57012](bd_LAUNCHXL2-TMS57012.jpg) @@ -498,12 +466,6 @@ You can hover the mouse cursor over the    - @ref arm-cr_dpp_launchxl2-tms57012 (QV, QK kernels; CCS-TI-ARM, IAR-EWARM toolchains) -@subsection exa_ref_arm7-9 ARM7 Boards: -@anchor AT91SAM7S-EK -![AT91SAM7S-EK](bd_AT91SAM7S-EK.jpg) -- @ref arm7-9_dpp_at91sam7s-ek (QV, QK kernels; IAR-EWARM toolchains) - - @subsection exa_ref_msp430 MSP430 Boards: @anchor MSP-EXP430F5529LP ![MSP-EXP430F5529LP](bd_MSP-EXP430F5529LP.jpg) @@ -532,16 +494,12 @@ You can hover the mouse cursor over the    - ARM Cortex-R - @ref arm-cr_blinky_launchxl2-tms57012 - @ref arm-cr_dpp_launchxl2-tms57012 -- ARM7 / ARM9 - - @ref arm7-9_dpp_at91sam7s-ek - MSP430 - @ref msp430_blinky_msp-exp430f5529lp - @ref msp430_dpp_msp-exp430f5529lp @section exa_ref_vendor Examples by MCU Vendor -- Atmel - - @ref arm7-9_dpp_at91sam7s-ek - NXP - @ref arm-cm_dpp_mbed-lpc1768 - Silicon Labs diff --git a/doxygen/exa_native.dox b/doxygen/exa_native.dox index cec1bf15..d9d117c6 100644 --- a/doxygen/exa_native.dox +++ b/doxygen/exa_native.dox @@ -34,7 +34,7 @@ You can hover the mouse cursor over the    - @ref arm-cm_dpp_nucleo-h743zi - @ref arm-cm_dpp_nucleo-l552ze - @ref arm-cm_game_efm32-slstk3401a -- @ref arm-cm_low-power +- @ref tut_low - @ref arm-cr_blinky_launchxl2-tms57012 - @ref arm-cr_dpp_launchxl2-tms57012 - @ref arm7-9_dpp_at91sam7s-ek @@ -58,7 +58,7 @@ You can hover the mouse cursor over the    - @ref arm-cm_dpp_stm32f4-discovery - @ref arm-cm_dpp_nucleo-h743zi - @ref arm-cm_dpp_nucleo-l552ze -- @ref arm-cm_low-power +- @ref tut_low - @ref arm-cr_blinky_launchxl2-tms57012 - @ref arm-cr_dpp_launchxl2-tms57012 - @ref arm7-9_dpp_at91sam7s-ek @@ -77,7 +77,7 @@ You can hover the mouse cursor over the    - @ref arm-cm_dpp_stm32f4-discovery - @ref arm-cm_dpp_nucleo-l552ze - @ref arm-cm_dpp_nucleo-h743zi -- @ref arm-cm_low-power +- @ref tut_low */ /*##########################################################################*/ @@ -97,7 +97,7 @@ You can hover the mouse cursor over the    - @subpage arm-cm_dpp_nucleo-h743zi - @subpage arm-cm_dpp_nucleo-l552ze - @subpage arm-cm_game_efm32-slstk3401a -- @subpage arm-cm_low-power +- @ref tut_low */ /*##########################################################################*/ /*! @page exa_arm-cr ARM Cortex-R @@ -130,8 +130,6 @@ You can hover the mouse cursor over the    /*##########################################################################*/ /*! @page arm-cm_blinky_ek-tm4c123gxl Blinky on EK-TM4C123GXL -@tableofcontents -

    This example implements the @ref blinky "Blinky sample application" on the EK-TM4C123GLX board (ARM Cortex-M4F).

    @@ -193,8 +191,6 @@ The Windows emulation is a simple console application that produces the followin /*##########################################################################*/ /*! @page arm-cm_blinky_efm32-slstk3401a Blinky on EFM32-SLSTK3401A -@tableofcontents -

    This example implements the @ref blinky "Blinky sample application" on the EFM32-SLSTK3401A board (ARM Cortex-M4F).

    @@ -260,8 +256,6 @@ The Windows emulation is a simple console application that produces the followin /*##########################################################################*/ /*! @page arm-cm_dpp_ek-tm4c123gxl DPP on EK-TM4C123GXL -@tableofcontents -

    This example implements the @ref dpp "Dining Philosophers Problem" sample application on the EK-TM4C123GLX board (ARM Cortex-M4F).

    @@ -357,14 +351,12 @@ The application also demonstrates @image html bd_EFM32-SLSTK3401A.jpg EFM32-SLSTK3401A board -The DPP example is located in the directory qpc/examples/arm-cm/dpp_efm32-slstk3401a and includes versions for @ref qv "cooperative QV kernel", the @ref qk "preemptive QK kernel", and the @ref qxk "preemptive dual mode QXK RTOS kernel" each provided for the ARM-KEIL, GNU-ARM, and IAR-ARM. The following annotated directory listing describes the contents of the example folder: +The DPP example is located in the directory qpc/examples/arm-cm/dpp_efm32-slstk3401a and includes versions for @ref srs_qv "cooperative QV kernel", the @ref srs_qk "preemptive QK kernel", and the @ref srs_qxk "preemptive dual mode QXK RTOS kernel" each provided for the ARM-KEIL, GNU-ARM, and IAR-ARM. The following annotated directory listing describes the contents of the example folder: @code{c} qpc/ // QP/C installation directory @@ -458,9 +450,9 @@ Dining Philosophers Problem (DPP) example for NXP LPC1768 MCU (Cortex-M3) with @ref dpp "Dining Philosophers Problem (DPP)" example for STM32 NUCLEO-L053R8 MCU (Cortex-M0+). Demonstrated built-in kernels: -- cooperative @ref qv with ARM-Clang, ARM-Keil, GNU-ARM (Makefile and Atollic TRUEstudio), and IAR-ARM toolchains -- preemptive, run-to-completion @ref qk with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains -- dual-mode (run-to-completion/blocking) @ref qxk with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains +- cooperative @ref srs_qv with ARM-Clang, ARM-Keil, GNU-ARM (Makefile and Atollic TRUEstudio), and IAR-ARM toolchains +- preemptive, run-to-completion @ref srs_qk with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains +- dual-mode (run-to-completion/blocking) @ref srs_qxk with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains Features: @@ -477,8 +469,8 @@ Features: @ref dpp "Dining Philosophers Problem (DPP)" example for STM32 NUCLEO-L152RE MCU (Cortex-M3). Demonstrated built-in kernels: -- cooperative @ref qv with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains -- preemptive, run-to-completion @ref qk with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains +- cooperative @ref srs_qv with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains +- preemptive, run-to-completion @ref srs_qk with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains Features: @@ -495,9 +487,9 @@ The @ref dpp "DPP example" for STM32F4-Discovery board is located directory The examples in the qpc/examples/workstation directory are designed for workstations (running Windows, Linux, or MacOS). Currently, the following examples are provided:

    diff --git a/doxygen/exa_qutest.dox b/doxygen/exa_qutest.dox index ca30bf3b..9bcfd3ff 100644 --- a/doxygen/exa_qutest.dox +++ b/doxygen/exa_qutest.dox @@ -1,7 +1,5 @@ /*! @page exa_qutest Examples for QUTest Unit Testing Harness -@tableofcontents -

    The examples in the qpc/examples/qutest directory demonstrate how to test embedded code with the [QUTest](https://www.state-machine.com/qtools/qutest.html) unit testing harness. Currently, the following examples are provided:

    diff --git a/doxygen/exa_rtos.dox b/doxygen/exa_rtos.dox index b08159dc..e5c75187 100644 --- a/doxygen/exa_rtos.dox +++ b/doxygen/exa_rtos.dox @@ -6,10 +6,11 @@ The main purpose of integrating QP/C with conventional RTOSes is to enable you t - @subpage exa_embos (directory examples/embos/) - @subpage exa_freertos (directory examples/freertos/) - @subpage exa_threadx (directory examples/threadx/) -- @subpage exa_ucos-ii (directory examples/ucos-ii/) +- @subpage exa_uc-os2 (directory examples/uc-os2/) +- @subpage exa_zephyr (directory examples/zephyr/) @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 qv "QV kernel", the preemptive non-blocking @ref qk "QK kernel", and the preemptive, dual-mode, blocking @ref 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. +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} */ @@ -232,7 +233,7 @@ 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_ucos-ii examples} +@next{exa_uc-os2 examples} */ /*##########################################################################*/ /*! @page threadx_dpp_ek-tm4c123gxl DPP on EK-TM4C123GXL @@ -262,7 +263,6 @@ The sub-directory iar contains the workspace and After you load the DPP example into the STM32F4-Discovery board, the application should start blinking the 4 on-board LEDs. You can press the User button (blue) to PAUSE the philosophers for as long as the button is depressed. The philosophers resume dining when you release the User button. (In the PAUSED state the Table active object stops granting permissions to eat, so eventually all philosophers end in the "hungry" state.) - @section threadx_dpp_stm32f429-discovery_qs QS Software Tracing The DPP example for ThreadX on STM32F4-Discovery board provides the "Spy" build configuration, which outputs the QS (Quantum Spy) software tracing data through USART2. To get the data out of the board, you need to connect the TTL/RS232 converter as follows: @@ -288,17 +288,17 @@ 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_ucos-ii examples} +@next{exa_uc-os2 examples} */ /*##########################################################################*/ -/*! @page exa_ucos-ii uC/OS-II +/*! @page exa_uc-os2 uC-OS2 -The QP/C examples for uC/OS-II are as follows: +The QP/C examples for uC-OS2 are as follows: - ARM Cortex-M - - @subpage ucos-ii_dpp_ek-tm4c123gxl (Cortex-M4F)

    (ARM-CLANG, GNU-ARM and IAR EWARM toolsets) - - @subpage ucos-ii_dpp_nucleo-l053r8 (Cortex-M0+)
    (ARM-CLANG, GNU-ARM, and IAR EWARM toolsets) + - @subpage uc-os2_dpp_ek-tm4c123gxl (Cortex-M4F)
    (ARM-CLANG, GNU-ARM and IAR EWARM toolsets) + - @subpage uc-os2_dpp_nucleo-l053r8 (Cortex-M0+)
    (ARM-CLANG, GNU-ARM, and IAR EWARM toolsets) @note You can hover the mouse cursor over the    icon in the list below to see the picture of the board. @@ -306,7 +306,7 @@ You can hover the mouse cursor over the    @next{exa_os examples} */ /*##########################################################################*/ -/*! @page ucos-ii_dpp_ek-tm4c123gxl DPP on EK-TM4C123GXL +/*! @page uc-os2_dpp_ek-tm4c123gxl DPP on EK-TM4C123GXL @image html bd_EK-TM4C123GXL.jpg "EK-TM4C123GXL board" @@ -314,10 +314,10 @@ DPP example for Texas Instruments TivaC123GXL MCU (Cortex-M4F) and ARM-CLANG, GN @image html under_construction.jpg -@next{ucos-ii_dpp_nucleo-l053r8 examples} +@next{uc-os2_dpp_nucleo-l053r8 examples} */ /*##########################################################################*/ -/*! @page ucos-ii_dpp_nucleo-l053r8 DPP on STM32-NUCLEO-L053R8 +/*! @page uc-os2_dpp_nucleo-l053r8 DPP on STM32-NUCLEO-L053R8 @image html bd_NUCLEO-L053R8.jpg "STM32-NUCLEO-L053R8 board" @@ -325,6 +325,129 @@ DPP example for STM32 L053R8 MCU (Cortex-M0+) and ARM-CLANG, GNU-ARM and IAR EWA @image html under_construction.jpg -@next{exa_os examples} +@next{exa_zephyr examples} +*/ + +/*##########################################################################*/ +/*! @page exa_zephyr Zephyr + +The QP/C examples for Zephyr are as follows: + +- @subpage zephyr_blinky +- @subpage zephyr_dpp + +@next{zephyr_blinky} +*/ +/*##########################################################################*/ +/*! @page zephyr_blinky Blinky + +Blinks an on-board LED once per second. + +The blinking is done by an Active Object (Blinky) with a state machine. + +@section zephyr_blinky-build Building and Running + +- Linux: +Open a terminal in the blinky directory. + +@verbatim +source ~/zephyrproject/zephyr/zephyr-env.sh + +west build -b + +west flush +@endverbatim + +@section zephyr_blinky-output Sample Output +Once flashed to the board, the application also produces ASCII output to the serial terminal (if supported by the board): + +@verbatim +*** Booting Zephyr OS build v2.6.0-rc2-88-g3d39f72a88b3 *** +BSP_ledOff +QF_onStartup +BSP_ledOn +BSP_ledOff +BSP_ledOn +BSP_ledOff +@endverbatim + +@note +The example has been tested with the following boards: + +![STM32-NUCLEO-L053R8 board](bd_NUCLEO-L053R8.jpg) +
    + +![STM32-NUCLEO-H743ZI board](bd_NUCLEO-H743ZI.jpg) + +@note +The example should also work with most boards supported by Zephyr. + +@section zephyr_blinky-limits Limitations +The simple Blinky example does not support the QS software tracing. + +@next{zephyr_dpp} +*/ +/*##########################################################################*/ +/*! @page zephyr_dpp DPP + +DPP example with multiple active objects. + +@section zephyr_dpp-build Building and Running + +- Linux: +Open a terminal in the dpp directory. + +@verbatim +source ~/zephyrproject/zephyr/zephyr-env.sh + +west build -b + +west flush +@endverbatim + +@section zephyr_dpp-output Sample Output +Once flashed to the board, the application also produces ASCII output to the serial terminal (if supported by the board): + +@verbatim +*** Booting Zephyr OS build v2.6.0-rc2-88-g3d39f72a88b3 *** +Philo[4]->thinking +Philo[3]->eating +Philo[1]->thinking +Philo[0]->eating +Philo[4]->hungry +Philo[3]->thinking +Philo[2]->eating +Philo[1]->hungry +Philo[0]->thinking +Philo[4]->eating +Philo[3]->hungry +Philo[0]->hungry +Philo[4]->thinking +Philo[0]->eating +Philo[2]->thinking +Philo[3]->eating +Philo[4]->hungry +Philo[2]->hungry +Philo[3]->thinking +Philo[2]->eating +Philo[0]->thinking +@endverbatim + +@note +The example has been tested with the following boards: + +![STM32-NUCLEO-L053R8 board](bd_NUCLEO-L053R8.jpg) +
    + +![STM32-NUCLEO-H743ZI board](bd_NUCLEO-H743ZI.jpg) + +@note +The example should also work with most boards supported by Zephyr. + +@section zephyr_dpp-limits Limitations +The DPP example currently does not support the QS software tracing, +because implementation of the QS output over UART is board dependent. However, for a specific board, re-implementing the QS callbacks should be straightforward. + +@next{exa_os} */ diff --git a/doxygen/gs.dox b/doxygen/gs.dox index 2a752929..1bdce2f1 100644 --- a/doxygen/gs.dox +++ b/doxygen/gs.dox @@ -1,21 +1,26 @@ /*! @page gs Getting Started -@nav{index,gs_get} The following sections describe how to get started with QP™/C quickly: - @subpage gs_get -- @subpage gs_over - @subpage gs_tut The YouTube Video Getting Started with QP™ Frameworks provides instructions on how to download, install and get started with QP quickly. [![Video: Getting Started with QP™ Real-Time Embedded Framework](gs-video.jpg)](https://youtu.be/O7ER6_VqIH0) +@note + +Information about the QP/C functionality, architecture, design, and other aspects is provided in the [Certification Package](modules.html): +- @ref srs — QP/C functionality +- @ref sas — QP/C architecture +- @ref sds — QP/C design +- @ref misra — QP/C compliance with MISRA-C + @nav{index,gs_get} */ /*##########################################################################*/ /*! @page gs_get Downloading & Installing QP™/C -@tableofcontents -@nav{gs,gs_over} +@nav{gs,gs_tut} @section gs_bundle Downloading QP™/C in QP™-Bundle The most recommended way of obtaining QP™/C™ is by downloading the @webref{#Downloads, QP-bundle™}, which includes QP™/C as well as other QP™ frameworks and also the @webref{products/qm, QM™ modeling tool} and the @webref{products/qtools, QTools™ collection}. The main advantage of obtaining QP™/C bundled together like that is that you get all components, tools and examples ready to go. @@ -23,20 +28,17 @@ The most recommended way of obtaining QP™/C™ is by downloading the @ [![QP-bundle Downloads](qp-bundle.png)](https://www.state-machine.com/#Downloads) @note - + If you are allergic to installers and GUIs or don't have administrator privileges you can also **download and install QP™/C separately** from the QP™/C GitHub repository, as described in the next section. @section gs_gh Downloading QP™/C from GitHub Go to the QP™/C release page on GitHub, and choose the QP™/C version number you wish to download. You should select the latest QP™/C version, unless you have a very specific reason to go with an older release. -Inside the release directory (e.g., `6.9.3`), you need to choose the QP™/C archive for your platform. QM™ is available for Windows (`qpc_-win32.zip`), Linux (`qpc_-linux64.zip`), and MacOS (`qm_-macx64.dmg`). - ![QP™/C downloads from GitHub](qpc_gh.jpg) @section gs_dir QP™/C Installation Folder - The following annotated directory tree lists the top-level directories provided in the standard QP™/C distribution.
      @@ -56,96 +58,18 @@ The following annotated directory tree lists the top-level directories provided
    +@attention +The QP/C GitHub repository does not contain the `3rd_party` folder, which is needed to build the @ref exa "QP™/C Examples". Therefore, it is highly **recommended** to download the latest [QP/C Release](https://github.com/QuantumLeaps/qpc/releases) as opposed to cloning the repo directly. + @remark -The standard QP™/C distribution contains many @ref exa "Example Projects", which are specifically designed to help you learn to use QP™/C and to serve you as starting points for your own projects. +The standard QP™/C distribution contains the `examples` folder with many @ref exa "Example Projects", which are specifically designed to help you learn to use QP™/C and to serve you as starting points for your own projects. -
    -@nav{gs,gs_over} -*/ -/*##########################################################################*/ -/*! @page gs_over QP™/C Overview -@nav{gs_get,gs_tut} -@tableofcontents - -This section gives a quick, high-level overview of the QP™ framework and its context of use. The main purpose is to provide the links to the more detailed information available in this QP™/C Manual. - -@section gs_struct General System Structure -The block diagram below illustrates the general system architecture based on the QP™/C framework: - -![General system architecture based on QP™/C](qp_comp.jpg) - - -@note -The following sections describe the system structure from top to bottom because this is the order most relevant for the development of **QP™ Applications**. - - -@section gs_app QP™ Application -The **QP™ Application** consists of event-driven @webref{active-object, Active Objects}. The application is not a part of QP™, but rather is *derived* from the QP™ framework that supplies the @ref api "API" for building the application as well as runtime environment to execute it on an embedded target. - -@sa -- @ref srs_app "Application Requirements" -- @ref exa "Application Examples" - - -@section gs_qep QEP State Machine Processor -The QEP component provides services related to event-driven **State Machines**. This is the most relevant QP™ layer for the application developers, because they spend most of their time elaborating the state machines of their Active Objects. - -@sa -- @ref srs_evt "Event Requirements" -- @ref srs_sm "State Machine Overview & Requirements" -- @ref sas_sm "State Machine Architecture" -- @ref sds_sm "State Machine Design & Implementation" - - -@section gs_qf QF Active Object Framework -The QF component provides services related to **Active Objects** like: asynchronous event passing, queuing of events, publish-subscribe, time events, deterministic event pools for mutable events, etc. These services form the core of the QP™ framework, which provides the Run-To-Completion (RTC) execution context for the Active Objects and their internal state machines. The application developers often use the Active Object services in the *actions* executed by the state machines. - -@sa -- @ref srs_ao "Active Object Overview & Requirements" -- @ref sas_ao "Active Object Architecture" -- @ref sds_ao "Active Object Design & Implementation" - - -@section gs_kernel Real-Time Kernels/RTOS/GPOS -The QP™ framework can run standalone with one of the provided built-in kernels or it can run on top of a traditional, 3rd-party RTOS, or on top of a general-purpose OS. - - -@subsubsection gs_kernel-builtin Built-in Real-Time Kernels -The QP™ framework contains a selection of built-in real-time kernels, such as: -- the cooperative QV kernel (see @ref srs_qv_intro "QV Kernel Theory of Operation"), -- the preemptive non-blocking QK kernel (see @ref srs_qk_intro "QK Kernel Theory of Operation"), and -- the preemptive, dual-mode, blocking QXK kernel (see @ref srs_qxk_intro "QXK Kernel Theory of Operation"). - - -@subsection gs_kernel-rtos 3rd-Party RTOS Kernels -QP™ can also work with many 3rd-party RTOSes, such as: -- @ref embos "embOS (SEGGER)" -- @ref freertos "FreeRTOS (AWS)" -- @ref threadx "ThreadX (Microsoft)" -- @ref ucos-ii "uC/OS-II (Silicon Labs)" - - -@subsection gs_kernel-gpos General-Purpose Operating Systems -Finally, QP™ can also work with general-purpose operating systems, such as: -- @ref posix "POSIX (Linux, QNX, VxWorks, Integrity, etc.)" -- @ref win32 "Windows". - - -@section gs_qs QS Software Tracing -The QS component provides special instrumentation inside QP that can produce detailed information from the execution of the QP Application. This information, produced in live system can be valuable for debugging, fine-tuning and testing of the QP Applications. - -@sa -- @ref srs_qs "Software Tracing Overview & Requirements" -- @ref sas_qs "Software Tracing Architecture" -- @ref sds_qs "Software Tracing Design & Implementation" - -
    -@nav{gs_get,gs_tut} +
    +@nav{gs,gs_tut} */ /*##########################################################################*/ /*! @page gs_tut QP™/C Tutorial -@tableofcontents -@nav{gs_over,tut_blinky} +@nav{gs_get,tut_blinky} This Tutorial describes how to use the QP/C™ real-time embedded framework in a series of progressively advancing examples. The first example ("Blinky") uses only one Active Object with a simple non-hierarchical state machine. The following example ("DPP") demonstrates multiple, communicating Active Objects. Finally, the last example ("Fly'n'Shoot" game) demonstrates all features the QP™ framework. It is highly recommended to study the simpler examples before the more advanced ones, as the basic information won't be repeated in the later examples. @@ -170,11 +94,10 @@ By copying and re-naming an existing, working project, as opposed to creating a from scratch, you inherit the correct compiler and linker options an other project settings, which will help you get started much faster.
    -@nav{gs_over,tut_blinky} +@nav{gs_get,tut_blinky} */ /*##########################################################################*/ /*! @page tut_blinky Simple Blinky Application -@tableofcontents @nav{gs_tut,tut_dpp} The ultra-simple Blinky example is the embedded systems' equivalent of the venerable "Hello World!" program, that is, the simplest possible working QP™ application that does "something". In the case of Blinky, this "something" is blinking an LED at the rate of 1Hz, where an LED turns on and remains on for 0.5 seconds on then turns off and remains off for 0.5 seconds. @@ -198,11 +121,11 @@ The details of the Blinky application are describe in the Quantum Leaps Applicat [![Application Note: Getting Started with QP™](AN-getting_started.jpg)](https://www.state-machine.com/doc/AN_Getting_Started_with_QP.pdf) +
    @nav{gs_tut,tut_dpp} */ /*##########################################################################*/ /*! @page tut_dpp Dining Philosophers Problem (DPP) -@tableofcontents @nav{tut_blinky,tut_game} The Dining Philosophers Problem (DPP) example is an intermediate-level application with *multiple* active objects. It illustrates the following QP™ features, such as: @@ -224,11 +147,10 @@ The Dining Philosophers Problem (DPP) example is described in the @webref{doc/AN [![Application Note: Dining Philosophers Problem (DPP) Example](AN_DPP.jpg)](https://www.state-machine.com/doc/AN_Fly-n-Shoot.pdf) - @note There is also a DPP variant that implements the "Philosophers" as passive "Orthogonal Components" of the "Table" active object. That DPP version is located in qpc/examples/examples/workstation/dpp-comp/ -
    +
    @nav{tut_blinky,tut_game} */ /*##########################################################################*/ @@ -259,15 +181,14 @@ The "Fly 'n' Shoot" game example is described in the @webref{doc/AN_Fly-n-Shoot. [!["Fly'n'Shoot" game tutorial video](game-video.jpg)](https://youtu.be/h_u92uLssDo) -
    +
    @nav{tut_dpp,tut_low} */ /*##########################################################################*/ /*! @page tut_low Low-Power Example -@tableofcontents -@nav{tut_game,srs} +@nav{tut_game,exa} -The main principle of low-power design for software is to keep the hardware in the most appropriate low-power sleep mode for as long as possible. Most commonly, the software enters a low-power sleep mode from the **idle callback** (a.k.a. "idle hook"), which is called when the software has nothing left to do and is waiting for an interrupt to deliver more work. The QP/C and QP/C++ Real-Time Embedded Frameworks (RTEFs) support the *idle callback* in all of the built-in real-time kernels, such as the cooperative @ref qv "QV kernel", the preemptive non-blocking @ref qk "QK kernel" and the preemptive blocking @ref qxk "QXK kernel". Also, such an *idle callback* is provided in all 3rd-party traditional RTOS kernels that QP/C/C++ have been @ref ports_rtos "ported to". +The main principle of low-power design for software is to keep the hardware in the most appropriate low-power sleep mode for as long as possible. Most commonly, the software enters a low-power sleep mode from the **idle callback** (a.k.a. "idle hook"), which is called when the software has nothing left to do and is waiting for an interrupt to deliver more work. The QP/C and QP/C++ Real-Time Embedded Frameworks (RTEFs) support the *idle callback* in all of the 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 blocking @ref srs_qxk "QXK kernel". Also, such an *idle callback* is provided in all 3rd-party traditional RTOS kernels that QP/C/C++ have been @ref ports_rtos "ported to". @remark Design for low-power is a broad subject that requires a holistic system approach to achieve a really long battery-powered operation. This example covers only certain *software-related* aspects of the problem. @@ -299,7 +220,6 @@ The support for multiple static clock tick rates is much *simpler* than the "dyn Yet the *multiple clock rates* can deliver similar low-power operation for the system, while keeping the QP framework much simpler and easier to certify than "tickless" kernels. The rest of this example explains how to use the multiple static clock rates in QP/C/C++ and shows how to leverage this feature to achieve low-power software design. - @section arm-cm_low_power_app The Low-Power Example Application The low-power example is located in QP/C and QP/C++ distributions, in the directory with the following structure: @@ -398,7 +318,6 @@ The **Idle** callback turns the **slow tick rate-0** off. The system enters the The **Idle** line (Red-LED) goes down twice as fast as the changes in the state of the **Green-LED** or the **Blue-LED**. This is because the application uses timeouts of **2 clock ticks** for toggling these lines instead of just one clock tick, which then could be slower. This is not quite optimal for the energy dissipation (as the CPU is woken up twice as often as it needs to be), but it illustrates more accurately how the fixed clock rates work as well as the one-tick delay to enter the low-power sleep mode from the idle callback. - @subsection arm-cm_low_power_sm State Machines The versions of this low-power example for the **QK** and **QV** kernels use two active objects **Blinky0** and **Blinky1**, which toggle the **Green-LED** at the slow tick rate 0, and the **Blue-LED** at the fast tick rate 1, respectively. The state machines of the Blinky0 and Blinky1 active objects are shown below: @@ -415,11 +334,10 @@ Similarly, the **Blinky1** state machine, in the entry action to the "active" st
    - @subsection arm-cm_low_power_xt Extended Thread (QXK) The version of this low-power example for the **QXK** kernel uses one active object **Blinky0** (with the state machine shown above), but instead of the Blinky1 active object, the QXK version uses an eXtended thread (::QXThread) called **XBlinky1**, with the code shown below: -@code{c} +@code{.c} #include "qpc.h" #include "low_power.h" #include "bsp.h" @@ -475,7 +393,7 @@ The version of this low-power example for the **QXK** kernel uses one active obj @subsection arm-cm_low_power_idle The Idle Callback (QK/QXK) The most important functionality in this low-power example is implemented in the **idle callback** located in the BSP (Board Support Package). The idle callback QK_onIdle() for the preemptive QK kernel and the idle callback QXK_onIdle() for the QXK kernel are almost identical and are explained in this section. -@code{c} +@code{.c} [0] void QXK_onIdle(void) { [1] QF_INT_DISABLE(); @@ -541,7 +459,7 @@ The most important functionality in this low-power example is implemented in the @subsection arm-cm_low_power_idle-qv The Idle Callback (QV) The idle callback QV_onIdle() for the cooperative QV kernel is slightly different, because it is called with interrupts **disabled**. The following listing shows the complete QV_onIdle() callback, with the most important points explained in the section below: -@code{c} +@code{.c} [0] void QV_onIdle(void) { /* NOTE: called with interrupts DISABLED */ [1] if (((l_activeSet & (1U << SYSTICK_ACTIVE)) != 0U) /* rate-0 enabled? */ @@ -579,7 +497,7 @@ The idle callback QV_onIdle() for the cooperative QV kernel is slightly differen
    3
    The QV_CPU_SLEEP() macro enters **low-power sleep mode** with interrupts still disabled. This port-specific macro is designed to re-anable interrupts **atomically** with entering the sleep mode.
    -
    -@nav{tut_game,srs} +
    +@nav{tut_game,exa} */ diff --git a/doxygen/history.dox b/doxygen/history.dox index 7966fcff..c8437fc4 100644 --- a/doxygen/history.dox +++ b/doxygen/history.dox @@ -1,18 +1,84 @@ -/** -@page history Revision History +/*! @page history Revision History + +@section qpc_7_0_1 Version 7.0.1, 2022-07-31 +This release is the first one that contains the complete [QM model](https://www.state-machine.com/products/qm) of the QP/C framework (in the file `qpc/qpc.qm`). This model is then used to **generate all QP/C source code**: +- `qpc/` + + @ref C:/qp-dev/qpc/include "include" + + @ref C:/qp-dev/qpc/src "src" + +The QM model of QP/C explicitly captures the *logical design* of the framework, which is then mapped to the preexisting [physical design](https://www.state-machine.com/qm/ce.html#ce_phys). The *logical design*, which consists of packages (some associated with namespaces), classes, types, and macros traces explicitly to the @ref sas "Software Architecture Specification (SAS)" and is easier to manipulate and refactor. + +__Source Code Changes:__ +- The whole QP/C source code is now generated from the `qpc.qm` model. +- Refactored classes with only static members (QF, QV, QK, QXK, QS) into "namespaces". +- Refactored: + + QF_TICK_X() -> QTIMEEVT_TICK() (see also QTimeEvt_tick_()) + + QF_PUBLISH() -> QACTIVE_PUBLISH() (see also QActive_publish_()) + + QF_psInit() -> QActive_psInit() + +@note +The old APIs (QF_PUBLISH(), QF_TICK_X(), QF_psInit()) are still provided, but are tagged as [deprecated](deprecated.html). + +- Moved package-scope header files qf_pkg.h and qs_pkg.h from the `qpc/src` directory to `qpc/include`. This allows the build process to specify only the `qpc/include` directory to build applications and QP/C source code. Previously, the build process had to specify additionally `qpc/src`, but this is no longer needed. + +@note +This change allowed all provided examples to be simplified by removing the `qpc/src` include directory from the various project files. + +__Ports/Examples:__ +- Removed port and examples for the older ARM7/ARM9 +- Added port to the @ref zephyr "Zephyr RTOS" +- Added examples for the @ref exa_zephyr "Zephyr RTOS" +- redesigned QP/C @ref freertos "port to FreeRTOS", see `qpc/ports/freertos` +- slightly improved QP/C @ref threadx "port to ThreadX", see `qpc/ports/threadx` + +__Improved Documentation:__ +The Doxygen documentation has been re-structured and improved. Also the more attractive styling of the HTML has been applied. + @section qpc_7_0_0 Version 7.0.0, 2022-04-30 +This QP/C release changes the QP/C implementation from C89 to C99 and also improves compliance of the QP/C source code with MISRA:C-2012 (a.k.a. MISRA3). Also, major focus of this release is the adaptation of the code and documentation to better support safety certification (see [QP Certification Pack](modules.html)) +__Modified QP/C source code:__ +- updated QP/C source code for C99 + +@note +The QP/C source code requires C99 minimum and no longer compiles as C89. + +- made the QP/C source code compliant with MISRA:C-2012, C99 variant +- made the compliant with the updated [Quantum Leaps Embedded C/C++ Coding Style (QL-C/C++:2022)](https://github.com/QuantumLeaps/embedded-coding-style) +- added traceability links between QP/C source code and requirements, architecture, design, and MISRA deviation permits. +- modified the top-level file comments now have standard-compliant license specification (SPDX-License-Identifiers). This allows QP/C to be included in automatic generation of Software Bill Of Materials (SBOM). + +__Modified QP/C ports:__ +- modified the QK and QXK ports to ARM Cortex-M to allow compile-time selection between using either NMI or an unused IRQ (via macro QK_USE_IRQ_HANDLER) as a mechanism to return to the thread mode - removed unused `ARM_ARCH` symbol from Makefiles for GNU-ARM -- restructured the Doxygen documentation - + introudced new styling for the HTML documentation - + updated links in the documentation +- fixed the following bugs in QXK port to ARM Cortex-M + + [bug#305 Floating-point context corruption in QXK](https://sourceforge.net/p/qpc/bugs/305) + + [bug#306 QXK_ON_CONTEXT_SW option is not compatible with soft-float](https://sourceforge.net/p/qpc/bugs/306) + +__Removed QP/C ports:__ +- removed QP/C port to PIC24/dsPIC with XC16 (not compatible with C99) + +__Modified GitHub repository:__ +- removed the `3rd_party` directory from the [qpc GitHub repository](https://github.com/QuantumLeaps/qpc) to avoid tracking changes caused by updates to the 3rd-party components. (The QP/C releases still have the `3rd_party` directory, because it is needed for building the examples). + +__Added/Modified examples:__ +- modified examples for ARM Cortex-M7 (to integrate better with STM32CubeH7) +- added examples for ARM Cortex-M33 (for STM32 NUCLEO-L552ZE and STM32CubeL5) +- added `qutest` examples for Unity (comparison between Unity and QUTest) + +__Modified QP/C documentation:__ +- restructured the Doxygen documentation for traceability +- added the @ref gs_tut "QP/C Tutorial" +- added the @ref srs "QP Certification Pack" + +@remark +The [QP Certification Pack](https://www.state-machine.com/products/qp#CERT) is still work in progress in this release, but the remaining work is limited to documentation only and no code restructuring is anticipated for that. @section qpc_6_9_3 Version 6.9.3, 2021-04-12 - __Feature Requests:__ -- [feature#191 "Add QS local filtering to QF_PUBLISH()"](https://sourceforge.net/p/qpc/feature-requests/191/) +- [feature#191 "Add QS local filtering to QF_PUBLISH()"](https://sourceforge.net/p/qpc/feature-requests/191) The feature has been implemented by means of the "sender" parameter of the `QF_PUBLISH()` macro, which must now be a pointer to a struct that has the `prio` member. This design enables applying QS local filter to the `prio` as the QS-Id. This works for publishing events from active objects. For publishing events outside active objects (e.g., from ISRs), the header file `qs.h` provides a type `QSpyId`, which should be used to define QS ID variables to be used as "sender" in `QF_PUBLISH()`. @@ -20,15 +86,15 @@ The feature has been implemented by means of the "sender" parameter of the `QF_P This change only affects the Spy build configuration, where the QS software tracing instrumentation is enabled. The existing code could require modifications to provide "sender" pointer that can access `prio` directly. For example, AOs would need to call `QF_PUBLISH(e, &me->super)` instead of `QF_PUBLISH(e, me)`. -- [feature#185 "Add possibility of assigning name to AO threads in QP-RTOS ports"](https://sourceforge.net/p/qpc/feature-requests/185/) +- [feature#185 "Add possibility of assigning name to AO threads in QP-RTOS ports"](https://sourceforge.net/p/qpc/feature-requests/185) -This feature request is now implemented uniformely in all QP-ports to 3rd-party RTOSes by means of the generic QP API QActive_setAttr(). Specifically, the QP port will allow you to set the thread name by calling QActive_setAttr() before calling QACTIVE_START(). +This feature request is now implemented uniformly in all QP-ports to 3rd-party RTOSes by means of the generic QP API QActive_setAttr(). Specifically, the QP port will allow you to set the thread name by calling QActive_setAttr() before calling QACTIVE_START(). __Bug Fixes:__ -- [bug#292 "QP-C-C++ on 64 Bit Linux - Setting of Current-Obj - AO_Obj from QView raises segmentation fault"](https://sourceforge.net/p/qpc/bugs/292/) -- [bug#293 "[Qpccp 6.9.2] test of assertion fail now"](https://sourceforge.net/p/qpc/bugs/293/) -- [bug#298 "ARM Cortex-M Erratum 838869 Handled Inconsistently in Ports"](https://sourceforge.net/p/qpc/bugs/298/) +- [bug#292 "QP-C-C++ on 64 Bit Linux - Setting of Current-Obj - AO_Obj from QView raises segmentation fault"](https://sourceforge.net/p/qpc/bugs/292) +- [bug#293 "[Qpccp 6.9.2] test of assertion fail now"](https://sourceforge.net/p/qpc/bugs/293) +- [bug#298 "ARM Cortex-M Erratum 838869 Handled Inconsistently in Ports"](https://sourceforge.net/p/qpc/bugs/298) __Source code changes:__ @@ -39,10 +105,10 @@ __Source code changes:__ __Modified QP/C ports:__ -- `qpc/ports/arm-cm/` - fixed [bug#298](https://sourceforge.net/p/qpc/bugs/298/) -- `qpc/ports/embos/` - implemented [feature#185](https://sourceforge.net/p/qpc/feature-requests/185/) -- `qpc/ports/threadx/` - implemented [feature#185](https://sourceforge.net/p/qpc/feature-requests/185/) -- `qpc/ports/ucos2/` - implemented [feature#185](https://sourceforge.net/p/qpc/feature-requests/185/) +- `qpc/ports/arm-cm/` - fixed [bug#298](https://sourceforge.net/p/qpc/bugs/298) +- `qpc/ports/embos/` - implemented [feature#185](https://sourceforge.net/p/qpc/feature-requests/185) +- `qpc/ports/threadx/` - implemented [feature#185](https://sourceforge.net/p/qpc/feature-requests/185) +- `qpc/ports/ucos2/` - implemented [feature#185](https://sourceforge.net/p/qpc/feature-requests/185) - `qpc/ports/win32/` - added QSpy64 (64-bit) build configuration to the Visual Studio project - `qpc/ports/win32-qv/` - added QSpy64 (64-bit) build configuration to the Visual Studio project - `qpc/ports/win32-quit/` - added "port" used for "QP Unit Internal Testing" (QUIT) @@ -50,7 +116,7 @@ __Modified QP/C ports:__ __Updated examples:__ - all examples using `QF_PUBLISH()` - adjusted the `sender` parameter of the macro to have the `prio` member -- `qpc/examples/arm-cm/` - fixed [bug#298](https://sourceforge.net/p/qpc/bugs/298/) (added calls to `QV|QK|QXK_ARM_ERRATUM_838869()`) +- `qpc/examples/arm-cm/` - fixed [bug#298](https://sourceforge.net/p/qpc/bugs/298) (added calls to `QV|QK|QXK_ARM_ERRATUM_838869()`) - `qpc/examples/qutest/self_test/test/` - added examples of the Python include files (`*.pyi`) for the new [include command](https://www.state-machine.com/qtools/namespacequtest__dsl.html). - `qpc/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/` - corrected handling of user-drawn buttons in `bsp.c` - `qpc/examples/arm-cm/game_efm32-slstk3401a/win32-gui/` - corrected handling of user-drawn buttons in `bsp.c` @@ -60,11 +126,10 @@ __Updated 3rd-Party Components:__ - `qpc/3rd_party/threadx` to version 6.1.6 (latest open source version from [GitHub](https://github.com/azure-rtos/threadx) ) - @section qpc_6_9_2 Version 6.9.2, 2021-01-18 The main purpose of this release is a redesign of the QS-RX (software tracing input) to implement the feature request #187: -- [feature#187 "Make the byte order in QS-RX buffer compatible with DMA"](https://sourceforge.net/p/qpc/feature-requests/187/) +- [feature#187 "Make the byte order in QS-RX buffer compatible with DMA"](https://sourceforge.net/p/qpc/feature-requests/187) Additionally, as part of the re-design of the internal QS-RX implementation, this release fixes the bug #287 ("QS_rxGetNfree() returns too low value", see the "Bug Fixes" section) @@ -108,11 +173,11 @@ __Updated examples:__ __Bug Fixes:__ -- [bug#289 "QS_OBJ_PTR() macro does not compile on 64-bit machine"](https://sourceforge.net/p/qpc/bugs/289/) -- [bug#288 "POSIX port does not compile in Spy build configuration"](https://sourceforge.net/p/qpc/bugs/288/) -- [bug#287 "QS_rxGetNfree() returns too low value"](https://sourceforge.net/p/qpc/bugs/287/) -- [bug#285 "QView bug with querying the state of QMsm-type state machines"](https://sourceforge.net/p/qpc/bugs/285/) -- [bug#284 "Typo in QM generated headers"](https://sourceforge.net/p/qpc/bugs/284/) +- [bug#289 "QS_OBJ_PTR() macro does not compile on 64-bit machine"](https://sourceforge.net/p/qpc/bugs/289) +- [bug#288 "POSIX port does not compile in Spy build configuration"](https://sourceforge.net/p/qpc/bugs/288) +- [bug#287 "QS_rxGetNfree() returns too low value"](https://sourceforge.net/p/qpc/bugs/287) +- [bug#285 "QView bug with querying the state of QMsm-type state machines"](https://sourceforge.net/p/qpc/bugs/285) +- [bug#284 "Typo in QM generated headers"](https://sourceforge.net/p/qpc/bugs/284) __Updated 3rd-Party Components:__ @@ -171,7 +236,7 @@ Additionally, this release introduces the new pre-defined QS record #QS_QF_NEW_A The reversal of #QS_QF_NEW and #QS_QF_MPOOL_GET trace records has implications for the existing [QUTest test scripts](https://www.state-machine.com/qtools/qutest_script.html), where the order of expectations for "QF-New" and "MP-Get" needs to be reversed as well. -Additionally, this release modifies the @ref qxk "QXK" source code, so that the `QActive.prio` attribute is the fixed priority assigned in QActive_start(), while `QActive.dynPrio` is the "dynamic" priority that can be changed when a @ref qxk_extended "QXK extended thread" acquires a @ref ::QXMutex "mutex". +Additionally, this release modifies the @ref srs_qxk "QXK" source code, so that the `QActive.prio` attribute is the fixed priority assigned in QActive_start(), while `QActive.dynPrio` is the "dynamic" priority that can be changed when a @ref srs_qxk_extended "QXK extended thread" acquires a @ref ::QXMutex "mutex". __Updated Ports:__ @@ -240,9 +305,7 @@ __Bug Fixes:__ + [bug#276 "QP/C/C++ POSIX port doesn't set thread priorities correctly"](https://sourceforge.net/p/qpc/bugs/276) - @section qpc_6_8_2 Version 6.8.2, 2020-07-17 - __Source code changes:__ - Changed definitions of ::QMsm, ::QMActive, and ::QTicker "classes" from using typedef's to using struct's. This means that ::QMsm, ::QMActive, and ::QTicker are now **distinct types** different from the respective base classes: ::QHsm, ::QActive, and ::QActive. Consequently, implicit conversions to the base class are *no longer performed*, which improves the type safety. @@ -259,7 +322,7 @@ This change might cause compiler warning in code that assumes equivalence betwee __Updated Ports:__ + enabled #QF_ACTIVE_STOP in the ports: Win32, Win32-QV, Win32-QUTEST, POSIX, POSIX-QV, and POSIX-QUTEST. - + @ref ucos-ii "port to uC/OS-II" has been adapted to the new uC/OS-II v2.93.00 (recently released by Silicon Labs under the open source Apache 2.0 license). + + @ref uc-os2 "port to uC/OS-II" has been adapted to the new uC/OS-II v2.93.00 (recently released by Silicon Labs under the open source Apache 2.0 license). __Updated Examples:__ @@ -267,7 +330,7 @@ __Updated Examples:__ + Modified `Makefile`s for the GNU-ARM projects to use `gcc` as the linker instead of `g++` + Modidfied `Makefile`s for the workstation examples to add the `-no-pie` linker option only when `GCC_OLD` environment variable is NOT defined. This is to accommodates older POSIX platforms with older GCC distribution. + Modified all ARM-KEIL uVision projects for ARM-CLANG to use the startup code in the ARM-ASM syntax. - + New uC/OS-II example @ref ucos-ii_dpp_nucleo-l053r8 (Cortex-M0+) + + New uC/OS-II example @ref uc-os2_dpp_nucleo-l053r8 (Cortex-M0+) + Removed uC/OS-II example for the STM32-NUCLEO-L152RE (Cortex-M3) + Added QM model files: `workstation/defer/defer.qm` and `workstation/reminder2/reminder2.qm` @@ -285,20 +348,18 @@ __Updated 3rd-Party Components:__ __Bug Fixes:__ - + [bug#267 "QP/C Spy build configuration fails on 64-bit target"](https://sourceforge.net/p/qpc/bugs/267/) - + + [bug#267 "QP/C Spy build configuration fails on 64-bit target"](https://sourceforge.net/p/qpc/bugs/267) @section qpc_6_8_1 Version 6.8.1, 2020-04-04 - __Source code changes:__ Improved comments in the QF_stop() function. The comments now make it very clear that after calling QF_stop() the application must terminate and cannot continue. In particular, QF_stop() is **not** intended to be followed by a call to QF_init() to "resurrect" the application. The previous comments apparently were confusing and some developers attempted to "restart" a running application, which led to system crashes. __Bug Fixes:__ -- [bug#261 QTime_disarm() clears the wrong flag](https://sourceforge.net/p/qpc/bugs/261/) -- [bug#262 Ticker0 does not work in QPC 6.8.0](https://sourceforge.net/p/qpc/bugs/262/) +- [bug#261 QTime_disarm() clears the wrong flag](https://sourceforge.net/p/qpc/bugs/261) +- [bug#262 Ticker0 does not work in QPC 6.8.0](https://sourceforge.net/p/qpc/bugs/262) Also, this release updates the QP/C ports and examples for workstations (Windows and POSIX) by consistently applying the "safe" versions of services from `` and ``. The "portable" versions of these services are defined as macros in the `safe_std.h` header file and include the following services: @@ -317,7 +378,6 @@ These "safe" functions are mapped to the best approximation of these services av @section qpc_6_8_0 Version 6.8.0, 2020-03-21 - __Source code changes:__ - Fixed inconsistencies between QP API declarations in the `.h` files and definitions in the `.c` files, such as different parameter names in declarations and definitions (MISRA-C:2012). @@ -347,15 +407,14 @@ Converted most of the examples for ARM-MDK from the no-longer maintained compile The older ARM Compiler-5 is still supported, but will be phased out in the future. The only examples for ARM Compiler-5 are for the EK-TM4C123GXL (TivaC LanuchPad) board. These examples are located in the `arm` sub-directories. - @section qpc_6_7_0 Version 6.7.0, 2019-12-30 -The main purpose of this release is providing improved compliance with MISRA-C:2012 (including MISRA-C:2012-Amendment-1) and also to provide support for the [PC-Lint-Plus](https://www.gimpel.com/) static analysis tool (see also feature request [#169](https://sourceforge.net/p/qpc/feature-requests/169/)). Specifically, the QP/C source code and some examples have been adjusted to comply with MISRA-C:2012-Amendment-1 rules, with all deviations captured in the PC-Lint-Plus configuration files. These PC-Lint-Plus configuration files have been provided in the new "port" to PC-Lint-Plus in the directory qpc/ports/lint-plus/. +The main purpose of this release is providing improved compliance with MISRA-C:2012 (including MISRA-C:2012-Amendment-1) and also to provide support for the [PC-Lint-Plus](https://www.gimpel.com) static analysis tool (see also feature request [#169](https://sourceforge.net/p/qpc/feature-requests/169)). Specifically, the QP/C source code and some examples have been adjusted to comply with MISRA-C:2012-Amendment-1 rules, with all deviations captured in the PC-Lint-Plus configuration files. These PC-Lint-Plus configuration files have been provided in the new "port" to PC-Lint-Plus in the directory qpc/ports/lint-plus/. @note The support for the older PC-Lint 9.x and the older MISRA-C:2004 has been dropped to avoid confusion and conflicts with the newer MISRA-C:2012 and the newer PC-Lint-Plus. -This release also includes the offline documentation for **this** particular version of QP/C (in the `html/` folder). To view the offline documentation, open the file `html/index.html` in your web browser. (The online HTML documention for the **latest** version of QP/C remains located at: https://www.state-machine.com/qpc/ ) +This release also includes the offline documentation for **this** particular version of QP/C (in the `html/` folder). To view the offline documentation, open the file `html/index.html` in your web browser. (The online HTML documentation for the **latest** version of QP/C remains located at: https://www.state-machine.com/qpc/ ) The backwards-compatiblity layer for QP 4.x has been removed. Among others, the macros Q_ROM and Q_ROM_VAR are no longer defined. @@ -363,9 +422,8 @@ Also, this release updates the Windows-GUI examples with the QWIN Prototyping To __Bug Fixes:__ -- [bug#254 "Q_NEW_X_FROM_ISR for FreeRTOS port"](https://sourceforge.net/p/qpc/bugs/254/) -- [bug#255 "IAR-ARM "Multi-file Compilation" fails for QK and QXK applications"](https://sourceforge.net/p/qpc/bugs/255/) - +- [bug#254 "Q_NEW_X_FROM_ISR for FreeRTOS port"](https://sourceforge.net/p/qpc/bugs/254) +- [bug#255 "IAR-ARM "Multi-file Compilation" fails for QK and QXK applications"](https://sourceforge.net/p/qpc/bugs/255) @section qpc_6_6_0 Version 6.6.0, 2019-10-31 @@ -386,20 +444,17 @@ This release brings also the following changes: - removed Tcl test scripts from QUTest examples - @section qpc_6_5_1 Version 6.5.1, 2019-05-24 - __Bug Fixes:__ -- [bug#241 "QUTest produces superfluous Trg-Done QS_RX_EVENT after publish"](https://sourceforge.net/p/qpc/bugs/241/). -- [bug#242 "QUTest fails to process events posted/​published from user commands"](https://sourceforge.net/p/qpc/bugs/242/). +- [bug#241 "QUTest produces superfluous Trg-Done QS_RX_EVENT after publish"](https://sourceforge.net/p/qpc/bugs/241). +- [bug#242 "QUTest fails to process events posted/​published from user commands"](https://sourceforge.net/p/qpc/bugs/242). Also, this release extends the `Makefiles` in the `qpc\examples\qutest` directory to provide the `debug` target. Specificall, the `qpc\examples\qutest\blinky` example has been extended with projects to `build/debug` this example with Visual C++ (on the host) and with ARM-KEIL on embedded target (EK-TM4C123). Finally, this release adds ports and examples for PIC24/dsPIC 16-bit MCUs with MPLAB-X/XC16 and PIC32 with MPLAB-X/XC32 toolchains. - @section qpc_6_5_0 Version 6.5.0, 2019-03-30 This QP/C release matches the [QM release 4.5.0](https://www.state-machine.com/qm/history.html#qm_4_5_0), which introduced new implementation for QP/C++. Even though this has no impact on the QP/C state machine implementation with QM, this release is needed for compatibility checking between QP and QM. @@ -420,8 +475,8 @@ This release brings the following changes: @note These additional assertions require #Q_DEFINE_THIS_FILE or #Q_DEFINE_THIS_MODULE at the top of the .c file that calls QHSM_INIT(), QACTIVE_START() or QXTHREAD_START(). -- modified examples for ThreadX to define BSP_TICKS_PER_SEC as TX_TIMER_TICKS_PER_SECOND instead of a hardcoded value -- modified examples for uC/OS-II to define BSP_TICKS_PER_SEC as OS_TICKS_PER_SEC instead of a hardcoded value +- modified examples for ThreadX to define BSP_TICKS_PER_SEC as TX_TIMER_TICKS_PER_SECOND instead of a hard-coded value +- modified examples for uC/OS-II to define BSP_TICKS_PER_SEC as OS_TICKS_PER_SEC instead of a hard-coded value - modified qassert.h to work correctly when assertions are disabled with #Q_NASSERT and also updated the QP/C source code to build correctly without assertions - improved the QXK semaphores to handle correctly the maximum number of tokens - reduced the size of QPSet in case #QF_MAX_ACTIVE does not exceed 8 or 16. @@ -430,13 +485,11 @@ These additional assertions require #Q_DEFINE_THIS_FILE or #Q_DEFINE_THIS_MODULE - fixed examples for MSP430 with CCS and added QUTest support for MSP430. - @section qpc_6_3_8 Version 6.3.8, 2018-12-31 -The main purpose of this release is the update the `Makefiles` that use the [GNU-ARM Embedded Toolchain](https://developer.arm.com/open-source/gnu-toolchain/gnu-rm) to match the recent update in [QTools for Windows 6.3.8](https://sourceforge.net/projects/qpc/files/QTools/). Specifically, all `Makefiles` in the `examples` directory have been updated to use the GNU-ARM toolchain located in `qtools\gnu_arm-none-eabi` and use the tools prefix **arm-none-eabi-**. +The main purpose of this release is the update the `Makefiles` that use the [GNU-ARM Embedded Toolchain](https://developer.arm.com/open-source/gnu-toolchain/gnu-rm) to match the recent update in [QTools for Windows 6.3.8](https://sourceforge.net/projects/qpc/files/QTools). Specifically, all `Makefiles` in the `examples` directory have been updated to use the GNU-ARM toolchain located in `qtools\gnu_arm-none-eabi` and use the tools prefix **arm-none-eabi-**. @note -The `Makefiles` that use the GNU-ARM included in this release require [QTools for Windows version 6.3.8 or newer](https://sourceforge.net/projects/qpc/files/QTools/) and will **NOT** work with the older QTools collection. - +The `Makefiles` that use the GNU-ARM included in this release require [QTools for Windows version 6.3.8 or newer](https://sourceforge.net/projects/qpc/files/QTools) and will **NOT** work with the older QTools collection. @section qpc_6_3_7 Version 6.3.7, 2018-11-20 @@ -452,7 +505,6 @@ Also, in this release, the prototypes of the internal functions `QActive_start_( Finally, this release updates the internal implementation of QXK function `QXThread_post_()` for software tracing and testing with QUTest. - @section qpc_6_3_6 Version 6.3.6, 2018-10-20 This release brings important changes and improvements to the unit-testing support for [QUTest](https://www.state-machine.com/qtools/qutest.html). Specifically, a new "dummy" active object class ::QActiveDummy for testing has been added. Instances of this "dummy" AO can be now used as test-doubles for active objects that are recipients of events directly posted by the active object under test (AOUT). This, in turn, eliminates the need to alter the existing event-posting implementation, so that more of the actual QP code can be used in the QP test-stub (qutest.c). @@ -460,7 +512,7 @@ This release brings important changes and improvements to the unit-testing suppo The QUTest projects that build QP from sources need to include the qf_time.c file. -As a consequence of the changes in the [QUTest](https://www.state-machine.com/qtools/qutest.html) support, the @ref exa_qutest "QUTest examples" have been re-designed and improved. Here, the most important changes include the new code organization, which reflects the customary separation of the code-under-test (CUT) from the code for testing. Also, the tests based on the ["TDD book" by James Grenning](https://www.amazon.com/Driven-Development-Embedded-Pragmatic-Programmers/dp/193435662X) have been replaced with fully functional tests based on the [Unity testing framework](http://www.throwtheswitch.org/unity/). This is to directly compare the traditional approach (Unity) with QUTest. +As a consequence of the changes in the [QUTest](https://www.state-machine.com/qtools/qutest.html) support, the @ref exa_qutest "QUTest examples" have been re-designed and improved. Here, the most important changes include the new code organization, which reflects the customary separation of the code-under-test (CUT) from the code for testing. Also, the tests based on the ["TDD book" by James Grenning](https://www.amazon.com/Driven-Development-Embedded-Pragmatic-Programmers/dp/193435662X) have been replaced with fully functional tests based on the [Unity testing framework](http://www.throwtheswitch.org/unity). This is to directly compare the traditional approach (Unity) with QUTest. The next change related to unit testing is adding ::QS_RX_QUERY_CURR facility to QS-RX (software tracing input channel) and the reply ::QS_QUERY_DATA to the QS output channel. These two extensions allow you to query the status of the "current object" inside the target. The most important example is querying the current state-machine object (::SM_OBJ), which returns the **current state**. @@ -480,12 +532,10 @@ To facilitate the creation of truly portable, cross-platform examples, the exist Finally, this release fixes a bug in the @ref posix-qv "POSIX-QV port", where the internal condition variable `QV_condVar_` has not been initialized. - @section qpc_6_3_4 Version 6.3.4, 2018-08-10 This release adds new API QTimeEvt_wasDisarmed() for checking the status of a ::QTimeEvt object after it has been disarmed. Specifically, the status of the last call to QTimeEvt_disarm() is kept inside the time event object and can be subsequently checked with the QTimeEvt_wasDisarmed() API. This new function is designed to be used directly as a guard condition on the timeout event, as described in the [PSiCC2 book](/psicc2), Section 7.7.3 "Arming and Disarming a Time Event" on page 359. The QTimeEvt_wasDisarmed() has a side effect of setting the "was disabled" status, so the guard evaluates to 'true' the next time it is checked. - @section qpc_6_3_3a Version 6.3.3a, 2018-07-16 This release adds Python test scripts to the QUTest examples (folder `qpc/examples/qutest`). Specifically, the makefiles have been augmented to accept symbol `SCRIPT=py`, in which case the Python test scripts (`*.py`) are used instead of the default Tcl test scripts (`*.tcl`). @@ -493,24 +543,22 @@ This release adds Python test scripts to the QUTest examples (folder `qpc/exampl This release does not change any QP/C APIs, QP/C implementation, ports, or other examples. - @section qpc_6_3_3 Version 6.3.3, 2018-06-22 This release fixes the following bugs: -- [bug#216 "Generated code for QP version check violates MISRA-C Rule 10.1"](https://sourceforge.net/p/qpc/bugs/216/). +- [bug#216 "Generated code for QP version check violates MISRA-C Rule 10.1"](https://sourceforge.net/p/qpc/bugs/216). -- [bug#217 "GNU-ARM -fstack-protector incompatible with the QP ports to GNU-ARM"](https://sourceforge.net/p/qpc/bugs/217/). +- [bug#217 "GNU-ARM -fstack-protector incompatible with the QP ports to GNU-ARM"](https://sourceforge.net/p/qpc/bugs/217). Also, this release demonstrates the new features of QM 4.3.0 in several example models (qpc/examples/ directory). Finally, this release updates `3rd_party/CMSIS/Include` to the latest version from GitHub. - @section qpc_6_3_2 Version 6.3.2, 2018-06-20 This release fixes the following bugs: -- [bug#215 "QP is internally inconsistent in calling assertion macros"](https://sourceforge.net/p/qpc/bugs/215/). +- [bug#215 "QP is internally inconsistent in calling assertion macros"](https://sourceforge.net/p/qpc/bugs/215). Also, this release improves the QUTest DPP example (directory `qpc/examples/qutest/dpp`) by demonstrating the proper use of QS_TEST_PAUSE() and the corresponding test scripts. This example now matches the [QUTest documentation of this feature](https://www.state-machine.com/qtools/qutest_rtc.html#qutest_pause). @@ -518,16 +566,14 @@ Also, this release improves the QUTest DPP example (directory `qpc/examples/qute Finally, this release modifies the QP/C ports to POSIX and POSIX-QV by allowing to configure the p-thread priority of the ticker thread. This is achieved by adding a `tickPrio` parameter to the `QF_setTickRate()` function. (**NOTE** this modification will require changing existing QP applications for POSIX or POSIX-QV that call `QF_setTickRate()`. - @section qpc_6_3_1 Version 6.3.1, 2018-05-24 This release migrates the [QUTest](https://www.state-machine.com/qtools/qutest.html) examples to [QM 4.2.1](https://www.state-machine.com/qm/history.html#qm_4_2_1), which now can generate QS_FUN_DICTIONARY() records automatically. This release also adds a generic, simple blinky example for QUTest located in `examples/qutest/blinky`. Also, this release fixes a bug in the example `qutest/TDDbook_LedDriver` so that the code compiles cleanly with the updated header file "qassert.h". - @section qpc_6_3_0 Version 6.3.0, 2018-05-10 The main purpose of this release is fixing the sub-machine support in the QP/Spy build configuration. Specifically, this release fixes the following bug: -- [bug#213 "QP/C/C++ applications with submachines occasionally crash in Spy build configuration"](https://sourceforge.net/p/qpc/bugs/213/) +- [bug#213 "QP/C/C++ applications with submachines occasionally crash in Spy build configuration"](https://sourceforge.net/p/qpc/bugs/213) @attention This release matches [QM 4.2.0](https://www.state-machine.com/qm/history.html#qm_4_2_0). @@ -535,7 +581,6 @@ This release matches [QM 4.2.0](https://www.state-machine.com/qm/history.html#qm Additionally, the release contains some re-factoring of the QS-RX input channel. - @section qpc_6_2_0 Version 6.2.0, 2018-03-16 The main purpose of this release is extednding the functionality of the [QUTest unit testing](https://www.state-machine.com/qtools/qutest.html) for QP/C applications. Specifically, this release adds support for testing of **self-posting** of events in active objects, which is an essential element in the [Reminder](https://www.state-machine.com/doc/Pattern_Reminder.pdf) and [Deferred Event](https://www.state-machine.com/doc/Pattern_DeferredEvent.pdf) design patterns. To implement this new feature, the QS-RX (QS receive channel) has been extened by a small scheduler that processes all secondary events gnenerated by dispatching, posting, or publishing events (only active when the #Q_UTEST macro is defined). Also, the implementation of the target resident QUTest components (files `src/qs/qutest.c` and `src/qf/qf_actq.c`) have been modified to allow posting of events during unit testing. @@ -556,9 +601,8 @@ Additionally, this release updates the QP/C ports to win32-qv and posix-qv to al Finally, this release phases out the `qp_port.h` header file. If any of your projects still includes this file, please replace it with the qpc.h heder file. - @section qpc_6_1_1 Version 6.1.1, 2018-02-18 -The main purpose of this release is adding the context-switch callbacks to the preemptive @ref qk "QK" and @ref qxk "QXK" kernels. The QK_onContextSw() and QXK_onContextSw() callback functions provide a mechanism to perform additional custom operations when QK/QXK switches context from one thread to another. To avoid extra overhead when this functionality is not needed and for backwards-compatiblity with the existing applications, the callbacks are enabled only when the macros #QK_ON_CONTEXT_SW (for QK) and #QXK_ON_CONTEXT_SW (for QXK) are defined. These macros can be defined either directly in command-line for the compiler, or in the QK/QXK port files (qk_port.c for QK and qxk_port.c for QXK). Examples for the context-switch callbacks have been provided for for the @ref arm-cm_dpp_nucleo-l053r8 "NUCLEO-L053R8" (Cortex-M0+) and the @ref arm-cm_dpp_nucleo-h743zi "NUCLEO-H743ZI" (Cortex-M7). +The main purpose of this release is adding the context-switch callbacks to the preemptive @ref srs_qk "QK" and @ref srs_qxk "QXK" kernels. The QK_onContextSw() and QXK_onContextSw() callback functions provide a mechanism to perform additional custom operations when QK/QXK switches context from one thread to another. To avoid extra overhead when this functionality is not needed and for backwards-compatiblity with the existing applications, the callbacks are enabled only when the macros #QK_ON_CONTEXT_SW (for QK) and #QXK_ON_CONTEXT_SW (for QXK) are defined. These macros can be defined either directly in command-line for the compiler, or in the QK/QXK port files (qk_port.c for QK and qxk_port.c for QXK). Examples for the context-switch callbacks have been provided for for the @ref arm-cm_dpp_nucleo-l053r8 "NUCLEO-L053R8" (Cortex-M0+) and the @ref arm-cm_dpp_nucleo-h743zi "NUCLEO-H743ZI" (Cortex-M7). Also, this release changes the ARM Cortex-M ports for the IAR-ARM toolchain in that it replaces the assembly modules with the equivalent C implementation. This change enables using the configuration macros #QK_ON_CONTEXT_SW (for QK) and #QXK_ON_CONTEXT_SW (for QXK) in the ports. All existing example projects for IAR-ARM have been updated to use the `q(x)k_port.c` files instead of `q(x)k_port.s` files. @@ -567,9 +611,8 @@ Also, this release adds new project files for the Atollic TRUEstudio for STM32. Finally, this relese updates the CMSIS to version 5.3.0 (see `qpc/3rd_party/CMSIS`) - @section qpc_6_1_0 Version 6.1.0, 2018-02-04 -The main purpose of this release is adding the support for the [ARM Compiler 6 (ARM-Clang)](https://developer.arm.com/products/software-development-tools/compilers/arm-compiler), which is a C/C++ toolchain for ARM processors based on the modern [Clang frontend](https://clang.llvm.org/) and the [LLVM framework](https://llvm.org/). This release adds the ARM-Clang ports and examples for all built-in kernels (QV, QK, and QXK) for the ARM Cortex-M CPU cores. +The main purpose of this release is adding the support for the [ARM Compiler 6 (ARM-Clang)](https://developer.arm.com/products/software-development-tools/compilers/arm-compiler), which is a C/C++ toolchain for ARM processors based on the modern [Clang frontend](https://clang.llvm.org) and the [LLVM framework](https://llvm.org). This release adds the ARM-Clang ports and examples for all built-in kernels (QV, QK, and QXK) for the ARM Cortex-M CPU cores. This release also adds support for the STM32H7 high-performance Cortex-M7 with the **double-precision FPU** (FPv5-DP-D16-M). Specifically, this release provides examples for the [NUCLEO-H743ZI board](http://www.st.com/en/evaluation-tools/nucleo-h743zi.html) (Cortex-M7 with FPv5-DP-D16-M). The @ref arm-cm_dpp_nucleo-h743zi "examples for NUCLEO-H743ZI board" include all built-in kernels with ARM-CLANG, ARM-KEIL, GNU-ARM, and IAR-ARM. Additionally the NUCLEO-H743ZI examples also include the QP FreeRTOS with ARM-KEIL, GNU-ARM, and IAR-ARM. @@ -580,9 +623,8 @@ Also, this release updates the existing projects for the Code Composer Studio (C Also, all examples for MSP430 with CCS have been updated to CCSv7 and re-tested on the supported boards. - @section qpc_6_0_4 Version 6.0.4, 2018-01-10 -The main purpose of this release is the provision of the official @ref freertos "QP/C port to FreeRTOS" (version 10). The QP/C port to FreeRTOS is completely generic and should work on any CPU supported by FreeRTOS. The port comes with the following examples (see examples/freertos/): +The main purpose of this release is the provision of the official @ref freertos "QP/C port to FreeRTOS" (version 10). The QP/C port to FreeRTOS is completely generic and should work on any CPU supported by FreeRTOS. The port comes with the following examples (see examples/freertos): - @ref freertos_dpp_ek-tm4c123gxl "DPP on EK-TM4C123GXL (ARM Cortex-M4F)" with ARM-KEIL, GNU-ARM and IAR-ARM toolchains. - @ref freertos_dpp_stm32f746g-disco "DPP on STM32F746G-Discovery (ARM Cortex-M7)" with ARM-KEIL, GNU-ARM and IAR-ARM toolchains. @@ -590,19 +632,17 @@ This release also replaces assembly with C implementation in the ARM-KEIL ports Additionally, this release fixes some problems with the native examples for STM32F4 and STM32F7 boards. -Additionally, this release adds a generic function QActive_setAttr() to set thread attributes in various QP ports to 3rd-party RTOSes. This function is then used in the @ref embos "embOS port" and the @ref ucos-ii "uC/OS-II port". +Additionally, this release adds a generic function QActive_setAttr() to set thread attributes in various QP ports to 3rd-party RTOSes. This function is then used in the @ref embos "embOS port" and the @ref uc-os2 "uC/OS-II port". Finally, this release fixes the following bug in the @ref threadx "ThreadX port": -- [bug#197 "Problems with scheduler locking in QP/C/C++ ports to ThreadX"](https://sourceforge.net/p/qpc/bugs/197/) - +- [bug#197 "Problems with scheduler locking in QP/C/C++ ports to ThreadX"](https://sourceforge.net/p/qpc/bugs/197) @section qpc_6_0_3 Version 6.0.3, 2017-12-12 - Changes since version 6.0.1: -- fixed [bug#193 "QXK: context switch from extended to basic thread fails"](https://sourceforge.net/p/qpc/bugs/193/) +- fixed [bug#193 "QXK: context switch from extended to basic thread fails"](https://sourceforge.net/p/qpc/bugs/193) - replaced attributes of ::QActive and ::QEQueue classes from type `uint_fastX_t` to `uintX_t`. For the ARM Cortex-M port, these changes reduce the memory footprint of each ::QActive instance from 50 to 38 bytes (25% improvement). @@ -620,16 +660,15 @@ Changes since version 6.0.1: This release does not change any of the QP/C APIs. - @section qpc_6_0_1 Version 6.0.1, 2017-11-10 The main focus of this release is to fix the remaining problems with transitions out of eXit-Points in sub-machines. Specifically, this release modifies the QMsm-based state machine implementation strategy (file src/qf/qep_msm.c to properly handle transitions from eXit-Points to Entry-Points and from eXit-Points to History connectors in sub-machines. These changes are part of fixing the following bugs reported for QM: -- [bug#190 "Exit-Point segment targeting History doesn't work"](https://sourceforge.net/p/qpc/bugs/190/) +- [bug#190 "Exit-Point segment targeting History doesn't work"](https://sourceforge.net/p/qpc/bugs/190) -- [bug#189 "Exit-Point segment targeting an Entry-Point to sub-machine state doesn't work"](https://sourceforge.net/p/qpc/bugs/189/) +- [bug#189 "Exit-Point segment targeting an Entry-Point to sub-machine state doesn't work"](https://sourceforge.net/p/qpc/bugs/189) Additionally, this release fixes the following bug in transitions to "shallow history": -- [bug#191 "Transition to shallow history in QMsm causes assertion qep_msm#810"](https://sourceforge.net/p/qpc/bugs/191/) +- [bug#191 "Transition to shallow history in QMsm causes assertion qep_msm#810"](https://sourceforge.net/p/qpc/bugs/191) The bug#191 is fixed by modifying the function QMsm_childStateObj_() in qep_msm.c to return the parent state in the corner case when the current state is the parent state. @@ -638,27 +677,25 @@ The bug#191 is fixed by modifying the function QMsm_childStateObj_() in qep_msm. This QP/C 6.0.1 release is the minium version required in QM 4.1.0. This is because QM 4.1.0 assumes the modified QMsm-state machine implementation strategy in order to properly handle the various transitions out of eXit-Points in sub-machine states. -Additionally, this release changes the QXK implementation related to the [bug#186 "QXK: Extended thread context switch causes assertion in PendSV_Handler"](https://sourceforge.net/p/qpc/bugs/186/). Specifically, the case of context switching away and back to the same thread (which can arise under specific interrupt preemption scenarios) is now handled as a simple return from PendSV. The QXK scheduler has been modified to set the "next" thread pointer to NULL when it detects switching back to the "current" thread. - +Additionally, this release changes the QXK implementation related to the [bug#186 "QXK: Extended thread context switch causes assertion in PendSV_Handler"](https://sourceforge.net/p/qpc/bugs/186). Specifically, the case of context switching away and back to the same thread (which can arise under specific interrupt preemption scenarios) is now handled as a simple return from PendSV. The QXK scheduler has been modified to set the "next" thread pointer to NULL when it detects switching back to the "current" thread. @section qpc_6_0_0 Version 6.0.0, 2017-10-13 This release fixes two bugs found in the QXK kernel: -- [bug#185](https://sourceforge.net/p/qpc/bugs/185/) "QXK: PendSV_Handler uses inconsistent stack frames for saving and restoring AO for Cortex-M0(+)" -- [bug#186](https://sourceforge.net/p/qpc/bugs/186/) "QXK: Extended thread context switch causes assertion in PendSV_Handler" +- [bug#185](https://sourceforge.net/p/qpc/bugs/185) "QXK: PendSV_Handler uses inconsistent stack frames for saving and restoring AO for Cortex-M0(+)" +- [bug#186](https://sourceforge.net/p/qpc/bugs/186) "QXK: Extended thread context switch causes assertion in PendSV_Handler" Additionally, this release includes a fix for the bug found in ARM Cortex-M0 port with the GNU-ARM compiler: -- [bug#189](https://sourceforge.net/p/qpc/bugs/184/) "QS_END() leaves all interrupts disabled w/​ GNU ARM" +- [bug#189](https://sourceforge.net/p/qpc/bugs/184) "QS_END() leaves all interrupts disabled w/​ GNU ARM" -This specific problem observed in QSpy turned out to be caused by a bug in the GNU-ARM compiler itself. This problem affected the ARMv6-M architecture (Cortex-M0/M0+/M1) and manifested itself in generation of incorrect code for the QP critical section at certain gcc optimization levels (such as -O). This bug was first discovered and filed as [bug#184](https://sourceforge.net/p/qpc/bugs/184/). The bug affected the GNU-ARM ports to all built-in kernels @ref qv "QV", @ref qk "QK", and @ref qxk "QXK". +This specific problem observed in QSpy turned out to be caused by a bug in the GNU-ARM compiler itself. This problem affected the ARMv6-M architecture (Cortex-M0/M0+/M1) and manifested itself in generation of incorrect code for the QP critical section at certain gcc optimization levels (such as -O). This bug was first discovered and filed as [bug#184](https://sourceforge.net/p/qpc/bugs/184). The bug affected the GNU-ARM ports to all built-in kernels @ref srs_qv "QV", @ref srs_qk "QK", and @ref srs_qxk "QXK". @attention This release no longer contains the directory `qpc/source`, which was scheduled to be phased out in QP5. In QP6 the source code is found only in the `qpc/src` directory. - @section qpc_5_9_9 Version 5.9.9, 2017-09-29 -This release implements the feature request [#132 "Extend the QXK mutex to support also simple operation without the priority-ceiling protocol"](https://sourceforge.net/p/qpc/feature-requests/132/). +This release implements the feature request [#132 "Extend the QXK mutex to support also simple operation without the priority-ceiling protocol"](https://sourceforge.net/p/qpc/feature-requests/132). @note This release is completely backwards-compatible with the @ref qpc_5_9_8 "previous QP/C release 5.9.8". @@ -671,9 +708,8 @@ Specifically, the ::QXMutex class has been extended as follows: - when initialized with `ceiling>0`, ::QXMutex WILL use the priority-ceiling protocol, as before. It will require that the ceiling priority be unique and not used by any other thread or mutex. In other words, the previous functionality remains unchanged. - @section qpc_5_9_8 Version 5.9.8, 2017-09-15 -This release fixes the QXK kernel [bug#182 " Inconsistent QXThread_post_() behavior with respect to the 'margin' parameter"](https://sourceforge.net/p/qpc/bugs/182/). +This release fixes the QXK kernel [bug#182 " Inconsistent QXThread_post_() behavior with respect to the 'margin' parameter"](https://sourceforge.net/p/qpc/bugs/182). Also, the pre-condition assertion in the function QF_newRef_() (file `src/qf/qf_dyn.c`) has been modified to allow creating event references only for dynamic events `(e->poolId_ == 0)`. @@ -694,9 +730,8 @@ Modifed ARM Cortex-M examples with the GNU-ARM toolset to be consistent with QP/ @endverbatim - @section qpc_5_9_7 Version 5.9.7, 2017-08-18 -The main focus of this release are new requested features for the @ref qxk "dual-mode QXK kernel": +The main focus of this release are new requested features for the @ref srs_qxk "dual-mode QXK kernel": - feature#129 "Allow blocking while holding a mutex in QXK"; and - feature#130 "Allow QXK mutex locks to nest while acquired by the same thread"; and - feature#131 "Add a non-blocking "tryLock()" operation to the QXK mutex". @@ -705,7 +740,7 @@ Additionally, this release adds also the non-blocking QXSemaphore_tryWait() oper In the process of re-implementing the ::QXMutex class, the previouis non-blocking priority ceiling mutex has been replaced with an equivalent selective QXK scheduler locking up to the specified ceiling priority. Specifically, this feature has been implemented with two new operations QXK_schedLock() and QXK_schedUnlock(). -For consistency, the non-blocking mutex of the @ref qk "QK kernel" has been also replaced by the operations QK_schedLock() and QK_schedUnlock(). +For consistency, the non-blocking mutex of the @ref srs_qk "QK kernel" has been also replaced by the operations QK_schedLock() and QK_schedUnlock(). All related QXK and QK examples have been updated to use the selective scheduler locking instead of the mutex. The new blocking QXK mutex has been demonstrated in the following updated examples: - @ref arm-cm_dpp_efm32-slstk3401a @@ -725,7 +760,6 @@ Finally, this release fixes the following bug: - bug#181 "Win32-qv port and QF_run "idle" time" - @section qpc_5_9_6 Version 5.9.6, 2017-08-04 The main focus of this release are improvements to the "dual-mode" QXK kernel. Specifically, this release implements the featrue request #128 "QP Semaphore Max Value Setting" for QXK. This feature changes the QXK function QXSemaphore_init(), which now takes additional parameter `count`. This parameter specifies the maximum allowed count for the semaphore (e.g., count of 1 makes the semaphore a binary-semaphore). @@ -741,7 +775,6 @@ Also, this release adds protection in the IRQ priorities initialization in QK/QV Finally, this release consistently changes all example projects (for all toolchains) to use the **src/** directory for QP/C source code, instead of the **source/** directory. The source/ directory is now truly obsolete, but is still provided in this release for backwards compatibility with user projects. - @section qpc_5_9_5 Version 5.9.5, 2017-07-20 This release changes the macro QXTHREAD_START() in the QXK kernel so that it can be used only with ::QXThread pointers and not ::QActive pointers. @@ -763,11 +796,9 @@ to `startup_stm32f746xx.c/s`. The change has been also made in the example projects for the STM32F7-Discovery board (for ARM-KEIL and GNU-ARM toolsets). - @section qpc_5_9_4 Version 5.9.4, 2017-07-07 This release adds Thread-Local Storage (TLS) feature for the dual-mode -QXK kernel (see @ref qxk_tls). - +QXK kernel (see @ref srs_qxk_tls). @section qpc_5_9_3 Version 5.9.3, 2017-06-19 @@ -778,7 +809,6 @@ Q_NEW_X() or QACTIVE_POST_X() with the margin argument of zero will no longer assert if the allocation/posting fails. - @section qpc_5_9_2 Version 5.9.2, 2017-06-05 This release adapts the Makefiles for GNU-ARM to the new location of the GNU-ARM toolset, which is now included in the QTools Collection (v 5.9.1) @@ -806,7 +836,6 @@ QXK kernels and ARM-Keil, GNU-ARM, and IAR-ARM toolsets. The demos support bi-directional QP/Spy. - @section qpc_5_9_1 Version 5.9.1, 2017-05-26 This release fixes the following bug: - bug#169 "Submachine-state eXit Point does not work correctly" @@ -842,7 +871,6 @@ phased out in the future QP/C releases. Please use the new source code structure provided in the `qpc/src` directory. - @section qpc_5_9_0 Version 5.9.0, 2017-05-19 The main purpose of this milestone QP/C release is to provide support for the powerful **Unit Testing Framework** called QUTest™ (pronounced *cutest*). @@ -894,7 +922,6 @@ Finally, this release fixes the following bugs: - bug#162 "QF critical sections require modification for M7 core" - @section qpc_5_8_2 Version 5.8.2, 2017-02-08 This release adds examples for the ARM Cortex-M7 CPU. Specifically, the release contains the standard @ref dpp "Dining Philosophers Problem (DPP)" @@ -915,7 +942,6 @@ Finally, this release fixes the following bugs: compilation - @section qpc_5_8_1 Version 5.8.1, 2016-12-16 This release is in response to a recent finding that many QP users of the ports to ARM Cortex-M3/M4 forget to explicitly set their interrupt priorities, @@ -953,7 +979,6 @@ Changes in detail: standard distribution. - @section qpc_5_8_0 Version 5.8.0, 2016-11-30 The main purpose of this milestone QP/C release is to finally provide the baseline framework fully compatible with the upcoming QM 4.0.0. @@ -1000,7 +1025,6 @@ Finally, the complete list of bugs fixed in this release is as follows: - bug#124 "Windows port now cause memory leakage" - @section qpc_5_7_4 Version 5.7.4, 2016-11-04 This release fixes the following bugs: - bug#145 QF_PUBLISH() leaks events that have no subscribers @@ -1008,7 +1032,6 @@ This release fixes the following bugs: - bug#143 QACTIVE_POST_LIFO() on initial transition asserts on QXK - @section qpc_5_7_3 Version 5.7.3, 2016-10-07 This release adds QP ports to the TI-RTOS kernel (SYS/BIOS) with TI-CCS and IAR EWARM toolsets. Examples are provided for the EK-TM4C123GXL @@ -1025,7 +1048,6 @@ Also, this release fixes the following bugs: returning to task). - @section qpc_5_7_2 Version 5.7.2, 2016-09-30 This is the first production release of the "dual-mode" QXK kernel. "Dual-mode" QXK means that QXK supports both basic-threads (BC1 class @@ -1058,7 +1080,6 @@ Finally, this release improves the implementation of scheduler locking in publish-subscribe event delivery. - @section qpc_5_7_0 Version 5.7.0, 2016-08-31 This release adds support for sub-machines and sub-machine states for reusing pieces of state machines (an advanced UML concept) to the QMsm-state machine implementation strategy. This feature is to match the upcoming QM 4.0.0. @@ -1079,7 +1100,6 @@ Changes in detail: 5. Modified the ARM Cortex-M QXK ports (ARM-KEIL, GNU, IAR, and TI) - @section qpc_5_6_5 Version 5.6.5, 2016-06-06 This release adds support for the new board: EFM32-SLSTK3401A (Pearl Gecko Starter Kit from Silicon Labs). This board replaces the Stellaris EK-LM3S811 board, which has been discontinued. (The Stellaris EK-LM3S811 board had been used in the "Fly 'n' Shoot" game example accompanying the PSiCC2 book). @@ -1096,17 +1116,14 @@ This release fixes the following bugs: - bug#131 (QF_newRef_ increments reference counter without QF_CRIT_ENTRY_()). - @section qpc_5_6_4 Version 5.6.4, 2016-04-25 This release fixes a serious Bug #128 (https://sourceforge.net/p/qpc/bugs/128 ) in the QK port to ARM Cortex-M introduced back in QP 5.6.1 - @section qpc_5_6_3 Version 5.6.3, 2016-04-12 This release fixes a serious Bug #126 (https://sourceforge.net/p/qpc/bugs/126 ) in the QK preemptive scheduler introduced in QP 5.6.2. - @section qpc_5_6_2 Version 5.6.2, 2016-03-31 The main purpose of this release is to introduce _atomic event multicasting_, meaning that event publishing to all subscribers is now protected from preemption. This eliminates potential for re-ordering of events under preemptive kernels (such as QK, QXK, or 3rd-party RTOSes), when events are published from low-priority AOs and some higher-priority subscribers can preempt multicasting and post/publish events of their own (before the original event is posted to all subscribers). @@ -1153,9 +1170,8 @@ Changes in detail: 16. Implemented Feature Request #110 as well as the duplicate Request #62 by adding function QActive_flushDeferred() - @section qpc_5_6_1 Version 5.6.1, 2016-01-01 -This release is the first official (production) release of the new blocking @ref qxk "QXK" kernel. +This release is the first official (production) release of the new blocking @ref srs_qxk "QXK" kernel. Changes in detail: @@ -1164,15 +1180,13 @@ Changes in detail: 2. Corrected example projects for the ARM Cortex-M with TI/CCS toolset - @section qpc_5_6_0 Version 5.6.0-beta, 2015-12-24 - -The main purpose of this *beta* release is to introduce a new component of the QP/C framework called @ref qxk "QXK" ("eXtended Quantum Kernel"). QXK is a small, preemptive, priority-based, **blocking** kernel that provides most features you might expect of a traditional blocking RTOS kernel. +The main purpose of this *beta* release is to introduce a new component of the QP/C framework called @ref srs_qxk "QXK" ("eXtended Quantum Kernel"). QXK is a small, preemptive, priority-based, **blocking** kernel that provides most features you might expect of a traditional blocking RTOS kernel. QXK has been designed specifically for applications that need to mix event-driven active objects with traditional blocking code, such as commercial middleware (TCP/IP stacks, UDP stacks, embedded file systems, etc.) or legacy software. The QXK kernel is integrated tightly and optimally with the rest of the QP. It reuses all mechanisms already provided in QP, thus avoiding any code duplication, inefficient layers of indirection, and additional licensing costs, which are inevitable when using 3rd-party RTOS kernels to run QP/C applications. @note -The QXK documentation is available in the QP/C Reference Manual at @ref qxk +The QXK documentation is available in the QP/C Reference Manual at @ref srs_qxk Additionally, this release removes the macros Q_ROM, Q_ROM_BYTE, and Q_ROM_VAR from the QP/C code. These macros have been necessary for odd Harvard-architecture 8-bit CPUs (such as AVR, 8051) to place constant data in ROM. As QP/C stopped supporting those CPUs, the non-standard extensions could be removed from the QP/C code base. @@ -1208,7 +1222,6 @@ Changes in detail: 12. Updated CMSIS from 4.2 to 4.3 in qpc/3rd-party/CMSIS - @section qpc_5_5_1 Version 5.5.1, 2015-10-05 The main focus of this release is to improve the AAPCS compliance of the ARM Cortex-M port to the QK preemptive kernel. Specifically, the PendSV @@ -1230,9 +1243,7 @@ the file `qpc/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.c` did not re-enable interrupts in the QV_onIdle() callback. - @section qpc_5_5_0 Version 5.5.0, 2015-09-04 - The main purpose of this release is the extension of the QS software tracing system to bi-directional communication with embedded Targets. Specifically, the QS-RX (receive channel for QS) has been added with the following capabilities: 1. Set global QS filters inside the Target @@ -1278,7 +1289,7 @@ support the shallow-history mechanism. every build has an up-to-date and unique time stamp. 5. Extended the DPP on TivaC LauchPad example (directory -qpc/examples/arm-cm/dpp_ek-tm4c123gxl/) to demonstrate QS-RX (QS receive +`qpc/examples/arm-cm/dpp_ek-tm4c123gxl/`) to demonstrate QS-RX (QS receive channel). 6. Provided example of customizing the "QspyView" Tcl/Tk script for the @@ -1296,9 +1307,7 @@ Q_onAssert() for each specific project. (SYSCTL->RCGCGPIO rather than the deprecated SYSCTL->RCGC2). - @section qpc_5_4_2 Version 5.4.2, 2015-06-04 - The main focus of this release is to improve the support for "dual targeting" of QP/C applications, which is developing of deeply embedded code as much as possible on the desktop OS, such as Windows. Experience shows that "dual targeting" dramatically improves productivity of embedded systems developers, perhaps more than any other technique. This release makes it possible to use exactly the **same** application code, main function, and the Board Support Package interface (bsp.h) on both deeply embedded target and on Windows. The only differences between these targets can be completely encapsulated in the Board Support Package implementation (bsp.c). @@ -1326,9 +1335,7 @@ Changes in detail: 9. Improved the PC-Lint support for checking the application-level code located in in `examples/arm-cm/dpp_ek-tm4c123gxl/lint` - @section qpc_5_4_1 Version 5.4.1, 2015-05-14 - This release changes the active object class hierarchy so that ::QMActive is now more fundamental and is the base class for ::QActive. (Previously ::QMActive was a subclass of ::QActive). The newly added documentation section about @ref classes "QP/C Design" shows the current class hierarchy. @note @@ -1351,9 +1358,7 @@ Also, this release brings several cosmetic improvements: 7. Several README files have been updated. - @section qpc_5_4_0 Version 5.4.0, 2015-04-26 - This release changes the basic philosophy of distributing the QP frameworks by **combining** the "QP/C Baseline Code" with all currently available "QP/C Development Kits" (QDK/C). This is done to eliminate any potential mistakes in downloading and installing separate pieces of code. Additionally, this release changes the basic philosophy of building your embedded applications with the QP/C framework. Starting with this release, all @ref exa "examples" for embedded boards include the QP/C framework as **source code** within the projects, instead of statically linking with a QP/C library. (**NOTE:** It is still possible to use QP/C as a library, but you need to build such libraries yourself, as they are no longer provided in the QP/C distribution.) @@ -1384,7 +1389,7 @@ Changes in detail: 2. Removed class QFsm (which is now deprecated). Legacy state machines coded in the "QFsm-style" will continue to work, but will use the ::QHsm implementation internally. There is no longer any efficiency advantage in using the "QFsm-style" state machines. -3. Applied a slight performance improvement to the ARM Cortex-M port to the QK preemptive kernel. The QK port now checks for ISR context by looking at the IPSR register, instead of incrementing and decrementing the `QK_intNest_` up-down counter. +3. Applied a slight performance improvement to the ARM Cortex-M port to the QK preemptive kernel. The QK port now checks for ISR context by looking at the IPSR register, instead of incrementing and decrementing the `QF_intNest_` up-down counter. 4. Updated @ref exa_arm-cm "ARM Cortex-M examples" and provided new examples for NXP mbed-LPC1768, and STM32 NUCLEO-L053R8, and NUCLEO-L152RE boards. All examples now use the latest CMSIS (V4.3.0). All ARM Cortex-M exampels are provided for the ARM-KEIL, GNU-ARM, and IAR-ARM toolsets. @@ -1402,7 +1407,7 @@ Changes in detail: 11. Added @ref threadx "port to Thread-X". Example is available for the Thread-X demo with Visual Studio on Windows. -12. Updated port to @ref ucos-ii "uC/OS-II" for the latest version v2.92. Examples are available for TI EK-TM4C123GLX and STM32 NUCLEO-L152RE boards with ARM-KEIL and IAR-ARM toolsets. +12. Updated port to @ref uc-os2 "uC/OS-II" for the latest version v2.92. Examples are available for TI EK-TM4C123GLX and STM32 NUCLEO-L152RE boards with ARM-KEIL and IAR-ARM toolsets. 13. Updated @win32 "port to Win32" (Windows). Modified the port to apply a generous "fudge factor" in over-sizing QP event queues and event pools, to minimize the risk of overflowing queues/pools due to non-deterministic Windows behavior. @@ -1411,9 +1416,7 @@ Changes in detail: 15. Updated the @ref lwip_ek-lm3s6965 "lwIP-QP example for EK-LM3S6965 board". - @section qpc_5_3_1 Version 5.3.1, 2014-09-19 - @note QP/C 5.3.1 remains backwards-compatible with all QP/C ports and applications @@ -1433,9 +1436,7 @@ Additionally, this release improves the uC/OS-II port in that it is now generic Finally, this release improves the "QP/C Reference Manual" generated by Doxygen and available both inside the QP/C baseline distribution (qpc.chm file) and online at: https://www.state-machine.com/qpc - @section qpc_5_3_0 Version 5.3.0, 2014-03-31 - This release adds the "transition to history" (deep history) feature to both QHsm and QMsm state machines and their subclasses. This QP/C release matches the new QM modeling tool version 3.1.0, which now @@ -1534,9 +1535,7 @@ its subclasses like QMActive) "is in" the given state. in the QP/C library builds. - @section qpc_5_2_1 Version 5.2.1, 2014-01-06 - This release fixes two bugs. 1. In file qmsm_dis.c added saving of the action-table into a temporary @@ -1551,9 +1550,7 @@ configurations: Debug, Release, and Spy. trace buffer. - @section qpc_5_2_0 Version 5.2.0, 2013-12-26 - This release matches the new QM 3.0.0, for which it provides model examples based on the new QMsm/QMActive classes. This, in turn demonstrates the new state machine code generation that QM3 was @@ -1644,9 +1641,7 @@ in the Embedded.com article "Are We Shooting Ourselves in the Foot with Stack Overflow?". - @section qpc_5_1_1 Version 5.1.1, 2013-10-10 - This release fixes reversal of logic in the QF_noTimeEvtsActiveX() function as well as sleep mode transition in the ARM Cortex-M3/M4 ports to the cooperative Vanilla kernel. Also, the native QP event queue @@ -1680,9 +1675,7 @@ qpc/examples/arm-cm/qk/iar/dpp-qk_ek-lm3s811-lint). Updated lint files for the latest PC-Lint - @section qpc_5_1_0 Version 5.1.0, 2013-09-23 - This release brings significant improvements to the QS software tracing implementation and also brings important changes the ARM Cortex-M port. @@ -1781,9 +1774,7 @@ ARM Cortex-M Interrupt Priorities in QP 5.1" available at: https://www.state-machine.com/doc/AN_ARM-Cortex-M_Interrupt-Priorities.pdf - @section qpc_5_0_0 Version 5.0.0, 2013-09-10 - @note QP/C 5.0.0 remains backwards-compatible with the existing QP/C 4.x applications. @@ -1952,9 +1943,7 @@ Cortex-M (with the GNU, IAR, and Keil toolsets). - added search box and tree-view panel to the HTML documentation - @section qpc_4_5_04 Version 4.5.04, Feb 08, 2013 - The main purpose of this release is adding support for the ARM Cortex-M4F processors with the hardware Floating-Point Unit (FPU). The QP/C ports to Cortex-M4F take full advantage of the "lazy stacking" feature of the @@ -1992,9 +1981,7 @@ several typos. moved them to the separate QDK/C-Qt. - @section qpc_4_5_03 Version 4.5.03, Nov 27, 2012 - This release changes the directory structure of QP ports to various operating systems, such as POSIX (Linux, BSD, etc.), Win32 (Windows), Qt, etc. The OS ports are moved from the ports/80x86/ directory one @@ -2002,9 +1989,7 @@ level up to ports/. Also, the OS examples are moved from the examples/80x86/ directory one level up to examples/. - @section qpc_4_5_02 Version 4.5.02, Aug 04, 2012 - The main purpose of this release is better, more comprehensive support for (rapid) prototyping of embedded QP applications on the desktop with the Win32 API and with Qt. Among others, this @@ -2093,9 +2078,7 @@ names for user-defined trace records when the target resets. This allows QSPY to reset its internal state. - @section qpc_4_5_01 Version 4.5.01, Jun 14, 2012 - The main purpose of this minor release is providing improved MISRA-compliant state machine implementation. Specifically, a new macro Q_UNHANDLED() has been added for a situation when a guard @@ -2143,9 +2126,7 @@ slot function, but instead to allow defining this slot function in the BSP of the application. - @section qpc_4_5_00 Version 4.5.00, May 29, 2012 - The main pupose of this relase is to improve host-based development of QP applications, which is critical for Test-Driven Development (TDD). Among others, this release provides integration between QP and the popular @@ -2222,9 +2203,7 @@ applications (DPP and PELICAN crossing). P-threads, including QP ports and examples for Linux and Mac OS X. - @section qpc_4_4_01 Version 4.4.01, Mar 23, 2012 - The relase fixes a bug in Q-SPY software tracing, which caused the linking error: "QS_SIG_() not defined". This release also includes a few cosmetic changes, which the Microchip C18 compiler didn't like. @@ -2235,9 +2214,7 @@ a few cosmetic changes, which the Microchip C18 compiler didn't like. qeq_get.c, qeq_init.c, and qa_get_.c. - @section qpc_4_4_00 Version 4.4.00, Jan 30, 2012 - The main pupose of this relase is MISRA-C:2004 compliance, strong-type checking compliance, update of PC-Lint option files and tests, and general cleanup. @@ -2296,9 +2273,7 @@ qpc/doc/, with the following Application notes: "QP and ARM Cortex-M, and QP and Windows", - @section qpc_4_3_00 Version 4.3.00, Nov 01, 2011 - 1. This release changes the names of critical section macros and introduces macros for unconditional interrupt disabling/enabling. This is done to simplify and speed up the built-in Vanilla and QK @@ -2329,9 +2304,7 @@ latest IAR EWARM version 6.30. latest Sourcery CodeBench 2011.07-60. - @section qpc_4_2_04 Version 4.2.04, Sep 24, 2011 - The main pupose of this relase is to provide a bug fix for the QK port to ARM Cortex processors. The bug fix addresses a very rare and undocumented behavior of late-arrival of an interrupt while entering @@ -2346,13 +2319,11 @@ implemented in the qk_port.s file and consists of clearing the PENDSVSET bit programmatically inside PendSV_Handler. - @section qpc_4_2_02 Version 4.2.02, Sep 08, 2011 - 1. The main pupose of this relase is to repackage the default QP/C -distribution to contain the single root directory qpc/ in the +distribution to contain the single root directory `qpc/` in the archive. That way, unziping the archive will produce only one -directory (qpc/), which can be then changed by the user. +directory (`qpc/`), which can be then changed by the user. 2. This release also changes the ARM Cortex QP ports with GNU. The suffix "_cs" has been added to all QP libraries generated by the @@ -2361,9 +2332,7 @@ distinguish libraries generated by different GNU-toolchains (such as CodeRed, Attolic, DevKit ARM, etc.) - @section qpc_4_2_01 Version 4.2.01, Aug 13, 2011 - 1. Modified file qassert.h to add assertion macros #Q_ASSERT_ID, #Q_REQUIRE_ID, #Q_ENSURE_ID, #Q_INVARIANT_ID, and #Q_ERROR_ID, which are better suited for unit testig, because they avoid the @@ -2372,9 +2341,7 @@ volatility of line numbers for indentifying assertions. 2. Added QP port and examples for Mac OS X on 80x86. - @section qpc_4_2_00 Version 4.2.00, Jul 14, 2011 - The goal of this milestone release is to extend the number of event pools (theoretically up to 255 pools) instead of just three event pools available up til now. Also, this release adds several @@ -2444,9 +2411,7 @@ framework. latest IAR EWARM 6.20. - @section qpc_4_1_07 Version 4.1.07, Feb 28, 2011 - The goal of this release is to improve the ease of experimenting with QP/C on the desktop. This release adds support for Windows (Win32) to the baseline code. Two most popular compilers for Windows are supported: @@ -2485,9 +2450,7 @@ on 64-bit targets (such as 64-bit Linux). latest Sourcery G++ 2011.02-2. - @section qpc_4_1_06 Version 4.1.06, Jan 07, 2011 - 1. Made cosmetic improvements to the example QM models of the "Fly 'n' Shoot" game. @@ -2501,9 +2464,7 @@ IAR EWARM version 6.10. latest Sourcery G++ 2010.09-66. - @section qpc_4_1_05 Version 4.1.05, Nov 01, 2010 - This release is adds examples for the QM (QP Modeler) graphical modeling and code generation tool. The examples are based on the "Fly 'n' Shoot" game described in the QP/C Tutorial and in Chapter 1 of the PSiCC2 book. @@ -2525,11 +2486,9 @@ Additionally, the QP/C baseline code has been slighlty modified for better conformance to the MISRA C 2004 rules and the latest PC-Lint 9.x. - @section qpc_4_1_04 Version 4.1.04, Mar 16, 2010 - This release is adds compatibility of all examples for DOS with the DOSBox -emulator (http://www.dosbox.com/) that recreates a MS-DOS compatible +emulator (http://www.dosbox.com) that recreates a MS-DOS compatible environment on all versions of Windows, including 64-bit Windows that don't run 16-bit DOS applications anymore. @@ -2544,9 +2503,7 @@ improvement extends the CMSIS from Sandstorm to Fury, DustDevil, and Tempest Stellaris families. - @section qpc_4_1_03 Version 4.1.03, Jan 21, 2010 - This release is concerned with the ARM Cortex ports and examples. Specifically, this release contains the following improvements: @@ -2573,9 +2530,7 @@ any way, so the release has NO IMPACT on the QP/C applications except for the ARM Cortex ports and applications. - @section qpc_4_1_02 Version 4.1.02, Jan 14, 2010 - The purpose of this minor maintenance release is the change in the directory structure for the ARM Cortex ports and examples. As new ARM Cortex cores are becoming available, the old port name "cortex-m3" could be misleading, because @@ -2588,9 +2543,7 @@ release has NO IMPACT on the QP/C applications except for the ARM Cortex ports and applications. - @section qpc_4_1_01 Version 4.1.01, Nov 05, 2009 - The main purpose of this release is to replace the Turbo C++ 1.01 toolset with the Open Watcom C/C++ toolset, because Turbo C++ 1.01 is no longer available for a free download. In contrast, Open Watcom is distributed under @@ -2609,9 +2562,7 @@ state machine classes with QP 4.x. The SLS example located in new State-Local Storage state design pattern. - @section qpc_4_1_00 Version 4.1.00, Oct 09, 2009 - The release brings a number of improvements to QP/C and updates the QP/C ARM Cortex-M3 examples for the EK-LM3S811 board to the latest IAR EWARM 5.40. @@ -2651,14 +2602,12 @@ tools in different directories than those chosen by Quantum Leaps. - modified the ARM Cortex-M3 examples for the new IAR EWARM 5.40. - modified slighlty the Calculator example to allow extensibility. - in the ARM Cortex-M3 port file qk_port.s added explicit testing of the -QK_readySet_ set for empty condition. This test allows avoiding calling the QK +QF_readySet_ set for empty condition. This test allows avoiding calling the QK scheduler and two contex-switches if the ready-set is empty. - in the game example moved setting up the QS filters from main.c to bsp.c. - @section qpc_4_0_04 Version 4.0.04, Apr 09, 2009 - The maintenance release provides a fix for the compile-time assertions, which did not work correctly for the GNU compiler family. Also, the ARM Cortex-M3 examples have been recompiled with the newer IAR EWARM v5.30. @@ -2672,9 +2621,7 @@ The main changes in QP v4.0.04 with respect to earlier version are as follows: a negative array dimension when the asserted condition is not TRUE. - @section qpc_4_0_03 Version 4.0.03, Dec 27, 2008 - The main purpose of this release is to fix a bug in the QK preemptive kernel, which occurs only when the advanced QK features are used. Specifically, the QK priority-ceiling mutex could interfere with QK thread-local storage (TLS) or @@ -2708,9 +2655,7 @@ when the macro QK_NO_MUTEX is not defined. when the macro QK_NO_MUTEX is not defined. - @section qpc_4_0_02 Version 4.0.02, Nov 15, 2008 - This maintenance release does not change the QP/C API in any way, so the release has NO IMPACT on the QP/C applications. @@ -2723,9 +2668,7 @@ the PC-lint warining about using the comma-operator (MISRA rule 42). HIT_WALL was not declared static. - @section qpc_4_0_01 Version 4.0.01, June 09, 2008 - This maintenace release is made to allow using QS software tracing with the GNU compiler for AVR (WinAVR). Specifically, the output of the strings residing in ROM has been fixed. @@ -2742,9 +2685,7 @@ as static to save stack space, because QF_run() never returns and is not reentrant. - @section qpc_4_0_00 Version 4.0.00, Apr 07, 2008 - This milestone release is made for the book /ref PSiCC2. The book describes in great detail this new release. The older "QP Programmer's Manual" is now phased out and is replaced with this hyper-linked diff --git a/doxygen/images/an-oop_in_c.jpg b/doxygen/images/an-oop_in_c.jpg new file mode 100644 index 00000000..458ccc2e Binary files /dev/null and b/doxygen/images/an-oop_in_c.jpg differ diff --git a/doxygen/images/bd_mbed-LPC1768.jpg b/doxygen/images/bd_mbed-LPC1768.jpg index 6552e469..e39cb054 100644 Binary files a/doxygen/images/bd_mbed-LPC1768.jpg and b/doxygen/images/bd_mbed-LPC1768.jpg differ diff --git a/doxygen/images/github-star.jpg b/doxygen/images/github-star.jpg new file mode 100644 index 00000000..c230ace5 Binary files /dev/null and b/doxygen/images/github-star.jpg differ diff --git a/doxygen/images/logo_embos.png b/doxygen/images/logo_embos.png new file mode 100644 index 00000000..e90f5dd0 Binary files /dev/null and b/doxygen/images/logo_embos.png differ diff --git a/doxygen/images/logo_freertos.png b/doxygen/images/logo_freertos.png new file mode 100644 index 00000000..cfab10ea Binary files /dev/null and b/doxygen/images/logo_freertos.png differ diff --git a/doxygen/images/logo_pclintplus.jpg b/doxygen/images/logo_pclintplus.jpg new file mode 100644 index 00000000..9abfd51b Binary files /dev/null and b/doxygen/images/logo_pclintplus.jpg differ diff --git a/doxygen/images/logo_threadx.jpg b/doxygen/images/logo_threadx.jpg new file mode 100644 index 00000000..1fd0ff90 Binary files /dev/null and b/doxygen/images/logo_threadx.jpg differ diff --git a/doxygen/images/logo_uc-os2.jpg b/doxygen/images/logo_uc-os2.jpg new file mode 100644 index 00000000..c9ef0274 Binary files /dev/null and b/doxygen/images/logo_uc-os2.jpg differ diff --git a/doxygen/images/logo_zephyr.jpg b/doxygen/images/logo_zephyr.jpg new file mode 100644 index 00000000..ef2af6e6 Binary files /dev/null and b/doxygen/images/logo_zephyr.jpg differ diff --git a/doxygen/images/qpc_gh.jpg b/doxygen/images/qpc_gh.jpg index a51be699..f22c00e2 100644 Binary files a/doxygen/images/qpc_gh.jpg and b/doxygen/images/qpc_gh.jpg differ diff --git a/doxygen/img/cert-pack.png b/doxygen/img/cert-pack.png new file mode 100644 index 00000000..39e2ad84 Binary files /dev/null and b/doxygen/img/cert-pack.png differ diff --git a/doxygen/img/help_dark.png b/doxygen/img/help_dark.png index 9d73f0ce..aa30b97d 100644 Binary files a/doxygen/img/help_dark.png and b/doxygen/img/help_dark.png differ diff --git a/doxygen/img/help_light.png b/doxygen/img/help_light.png index 121fcb1a..85e8f4b7 100644 Binary files a/doxygen/img/help_light.png and b/doxygen/img/help_light.png differ diff --git a/doxygen/img/img.htm b/doxygen/img/img.htm index e91b9ae5..70af24d3 100644 --- a/doxygen/img/img.htm +++ b/doxygen/img/img.htm @@ -7,6 +7,7 @@ + @@ -18,8 +19,6 @@ - - diff --git a/doxygen/img/logo_github.png b/doxygen/img/logo_github.png index b5094541..99b38392 100644 Binary files a/doxygen/img/logo_github.png and b/doxygen/img/logo_github.png differ diff --git a/doxygen/main.dox b/doxygen/main.dox index bb9babb2..644f4eb7 100644 --- a/doxygen/main.dox +++ b/doxygen/main.dox @@ -1,75 +1,84 @@ -/*! @mainpage About QP™/C +/*! @mainpage Overview @image html qp_banner.jpg - -@section ab_new What's new? +@remark + To check what's new in QP™/C, please see @ref history "QP/C Revision History". You can also get the latest **QP™/C code**, with the recent enhancements and bug fixes, from the GitHub QP™/C repository.
    -@section ab_about What is it? -@webref{products/qp, QP™/C (Quantum Platform in C)} is a lightweight @webref{rtef, Real-Time Embedded Framework (RTEF)} for building modern, responsive and modular real-time embedded applications as systems of asynchronous event-driven @webref{active-object, active objects} (actors). The QP™/C RTEF is a member of a @webref{products/qp, larger family of real-time embedded frameworks (RTEFs)} consisting of QP™/C and QP™/C++ frameworks, which are strictly quality controlled, thoroughly documented, and available under @ref licensing "dual licensing model". +@section over_about What is it? +QP™/C Real-Time Embedded Framework (RTEF) is a lightweight implementation of the @webref{active-object, Active Object model of computation} specifically tailored for real-time embedded (RTE) systems. QP is both a software infrastructure for building applications consisting of Active Objects (actors) and a runtime environment for executing the Active Objects in a deterministic fashion. Additionally, QP Framework supports @webref{fsm#HSM, Hierarchical State Machines} with which to specify the behavior of Active Objects @ref srs_ref "[ROOM:94], [UML 2.5],[Sutter:10]". -The behavior of active objects is specified in QP™/C by means of @webref{fsm/#HSM, hierarchical state machines} (UML statecharts). The framework supports @ref sm "manual coding of UML state machines in C" as well as automatic code generation by means of the free @webref{products/qm, QM™ model-based design tool}. - -@attention -To use QP™/C effectively, you need to understand the @webref{category/concepts, key concepts} that underline the architecture of the framework and your applications based on the framework. +@note + +The @webref{products/qp#CERT,QP Certification Pack} provides: +- @ref srs "Software Requirements Specification" with a good @ref srs_over "overview" of the QP/C Framework +- @ref sas "Software Architecture Specification" with concise description of QP/C @ref sas_core "architecture" +- @ref sds "Software Design Specification" with detailed description of the QP/C @ref sds "design". -@section ab_goals What does it do? -The main goals of the QP™/C framework are: -- to provide a reusable event-driven **architecture** based on @webref{active-object, active objects (actors)}, which is inherently **safer**, more extensible, and easier to understand than the usual *shared-state concurrency* based on a traditional Real-Time Operating System (RTOS). -- to provide a simple-to-use coding techniques for @webref{fsm/#HSM, hierarchical state machines}, with which to implement the behavior of active objects. -- to provide efficient and thread-safe asynchronous mechanisms for active objects to communicate, such as direct event passing and publish-subscribe. -- to provide event-driven timing services (time events). -- to provide a selection of built-in real-time kernels to run the QP applications, such as the cooperative @ref qv "QV kernel", the preemptive non-blocking @ref qk "QK kernel", and the preemptive blocking @ref qxk "QXK kernel". -- to provide testing support for applications based on software tracing (@ref qs "Q-Spy"). -- to provide **unit testing** support for applications based on software tracing (@webref{qtools/qutest.html, QUTest™}). -- to provide portability layer and ready-to-use ports to @ref ports_rtos "3rd-party RTOSes" and general purpose operating systems such as @ref posix "Linux" and @ref win32 "Windows". -- to provide a target for modeling and automatic code generation from the @webref{products/qm, QM™ modeling tool}. +@section over_goals What does it do? +The main objectives of the QP/C RTEF are: + +- to provide a modern, event-driven model of concurrency based on the best practices of concurrent programming @ref srs_ref "[ROOM:94], [Cummings:10], [Sutter:10]", collectively known as the @webref{active-object, Active Object (Actor) model of computation}, which is inherently *safer* than the traditional "shared-state concurrency, mutual-exclusion, and blocking" approach based on a conventional Real-Time Operating System (RTOS); + +- to provide a *higher-level of abstraction* closer to the problem domain than the "naked" RTOS threads; + +- to provide the *right* abstractions for applying modern techniques like visual modeling, hierarchical state machines, and automatic code generation; + +- to bridge the semantic gap between the higher level modeling concepts (such as UML) and the traditional programming languages like C or C++. -@section ab_special What's special about it? +@section over_special What's special about it? The QP™/C Real-Time Embedded Framework (RTEF) is a unique offering on the embedded software market. It provides a modern, reusable **architecture** of embedded applications, which combines object-orientation with the particular model of concurrency, known as @webref{active-object, active objects} (actors). This architecture is generally **safer**, more responsive and easier to understand than "free threading" with a traditional Real-Time Operating System (RTOS). It also provides sufficiently high level of abstraction and the right abstractions to effectively apply modeling and code generation to deeply embedded systems. -@subsection oop Object Orientation -Even though it is written in @ref misra "MISRA-compliant" ISO-C99, QP™/C is fundamentally an **object-oriented** framework, which means that the framework itself and your applications derived from the framework are fundamentally composed of classes and only classes can have @ref sm "state machines" associated with them. +@subsection over_oop Object Orientation +Even though it is written in @ref misra "MISRA-compliant" ISO-C99, QP™/C is fundamentally an **object-oriented** framework, which means that the framework itself and your applications derived from the framework are fundamentally composed of @ref sas_core "classes" and only classes can have @ref srs_sm "state machines" associated with them. +@anchor oop @note If you program in C and object-oriented programming is new to you, please refer to the article and set of videos @webref{oop, "Object-Oriented Programming"}, which among others describes how you can implement the concepts of *classes*, *inheritance*, and *polymorphism* to portable ISO-C. +@webref{oop, ![Object-Oriented Programming in C](an-oop_in_c.jpg)} -@subsection hsms Hierarchical State Machines -The behavior of active objects is specified in QP™/C by means of @webref{fsm/#HSM, hierarchical state machines (UML statecharts)}. The framework supports @ref sm "manual coding of UML state machines in C" (or C++ in case of QP™/C++) as well as fully **automatic code generation** by means of the free graphical @webref{products/qm, QM™ model-based design (MBD) tool}. - -@remarks -State machines can be an incredibly powerful technique, but they require an event-driven **infrastructure** (framework) that provides, at a minimum: a run-to-completion (RTC) execution context for each state machine, queuing of events, and event-based timing services. This is really the pivotal point. Without an event-driven framework (like QP™/C), state machines are like @webref{rtef, cars without an infrastructure of roads}. +@subsection over_hsms Hierarchical State Machines +The behavior of active objects is specified in QP™/C by means of @webref{fsm/#HSM, hierarchical state machines (UML statecharts)}. The framework supports manual coding of UML state machines in C as well as fully **automatic code generation** by means of the free graphical @webref{products/qm, QM™ model-based design (MBD) tool}. -@subsection kernels Built-in Kernels -The QP™/C framework can run on @ref exa_native "bare-metal single-chip microcontrollers", completely replacing a traditional RTOS. The framework contains a selection of built-in real-time kernels, such as the cooperative @ref qv "QV kernel", the preemptive non-blocking @ref qk "QK kernel", and the preemptive, dual-mode, blocking @ref qxk "QXK kernel". The QXK kernel provides all the features you might expect from a traditional RTOS kernel and has been specifically designed 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. @ref ports_native "Native QP ports" and ready-to-use @ref exa_native "examples" are provided for major @ref exa_ref_mcu "CPU families". +@subsection over_kernels Built-in Kernels +The QP™/C framework can run on @ref exa_native "bare-metal single-chip microcontrollers", completely replacing a traditional RTOS. 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". The QXK kernel provides all the features you might expect from a traditional RTOS kernel and has been specifically designed 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. @ref ports_native "Native QP ports" and ready-to-use @ref exa_native "examples" are provided for major @ref exa_ref_mcu "CPU families". -@subsection light_fast Lightweight and Fast +@subsection over_eff Efficiency Even though QP™/C offers much higher level of abstraction than a traditional RTOS, it typically outperforms equivalent traditional RTOS offerings both in RAM/ROM footprint and in CPU efficiency. The specific measurements and results are reported in the following @webref{doc/AN_QP_Performance.pdf, Application Note: "QP Performance Tests and Results"}: [![Application Note: "QP Performance Tests and Results"](an-qp_performance.png)](https://www.state-machine.com/doc/AN_QP_Performance.pdf) -@subsection inter Interoperability +@subsection over_simple Simplicity +The QP Framework is simple to get started, simple to use and simple to build. The numerous provided @ref exa "examples" come with projects for typical embedded toolchains (e.g., GNU, ARM, IAR, etc.). The framework does not impose any proprietary build or configuring procedures or tooling, just simple makefiles and native projects for the demonstrated toolchains. While these are possibly inadequate for really complex projects, experience shows that bigger teams have their own DevOps (e.g., CI/CD) and imposing a particular process is typically counterproductive. + + +@subsection over_inter Interoperability QP/C can also work with many traditional @ref exa_rtos "RTOSes" and @ref exa_os "general-purpose OSes" (such as Linux and Windows). -@subsection popular Popularity & Maturity +@subsection over_trace Traceability +QP™/C offers unprecedented, bidirectional @ref tr "traceability" among all work artifacts, which gives teams full visibility from requirements through architecture, design, source code, tests, and back again. + + +@subsection over_popular Popularity & Maturity With 20 years of continuous development, over @webref{customers#Customers, 350 commercial licensees}, and many times more open source users worldwide, the QP™ frameworks are the most popular such offering on the market. They power countless electronic products ranging from implantable medical devices to complex weapon systems. -@subsection use Widespread Use + +@subsection over_use Widespread Use The QP™ real-time embedded frameworks address high-reliability applications across a @webref{customers#Markets, wide variety of markets}, such as medical, consumer, IoT, defense, robotics, industrial, communication, transportation, semiconductor IP, and many others. In each of these application areas, the elegant software architecture and modern design philosophy of QP™ have distinct advantages. -@subsection psicc2 Books -The two editions of the book, @webref{psicc2, Practical Statecharts in C/C++} provide a detailed design study of the QP frameworks and explain the related concepts. +@subsection over_psicc2 Books +The two editions of the book, @webref{psicc2, Practical Statecharts in C/C++} provide a detailed design study of the QP™ frameworks and explain the related concepts. [![Practical UML Statecharts in C/C++, 2nd Edition](psicc2.jpg)](https://www.state-machine.com/psicc2) @@ -77,22 +86,22 @@ The two editions of the book, @webref{psicc2, Practical Statecharts in C [![Practical Statecharts in C/C++, 1nd Edition](psicc1.jpg)](https://www.state-machine.com/psicc) -@section licensing How is it licensed? +@section over_licensing How is it licensed? QP™/C is licensed under the sustainable @webref{licensing, dual licensing model}, in which both the open source software distribution mechanism and traditional closed source software distribution models are combined. @note If your company has a policy forbidding open source in your product, all QP frameworks can be @webref{licensing#Commercial, licensed commercially}, in which case you don't use any open source license and you do not violate your policy. -@subsection open-source Open Source Projects +@subsection over_open-source Open Source Projects If you are developing and distributing **open source** applications under the GNU General Public License (GPL), as published by the Free Software Foundation, then you are free to use the Quantum Leaps software under the GPL version 3 of the License, or (at your option) any later version. Please note that GPL requires that all modifications to the original code as well as your application code (Derivative Works as defined in the Copyright Law) must also be released under the terms of the GPL open source license. -@subsection closed-source Closed Source Projects +@subsection over_closed-source Closed Source Projects If you are developing and distributing traditional **closed source** applications, you can purchase one of @webref{licensing/#Commercial, Quantum Leaps commercial licenses}, which are specifically designed for users interested in retaining the proprietary status of their code. All Quantum Leaps commercial licenses expressly supersede the GPL open source license. This means that when you license Quantum Leaps software under a commercial license, you specifically do not use the software under the open source license and therefore you are not subject to any of its terms. -@section support How to get help? +@section over_support How to get help? Please post any **technical questions** to the Free Support Forum hosted on SourceForge.net. Posts to this forum benefit the whole community and are typically answered the same day. Direct **Commercial Support** is available to the commercial licensees. Every commercial license includes one year of Technical Support for the licensed software. The support term can be extended annually. @@ -103,15 +112,12 @@ Training and consulting services are also available from Quantum Leaps. Please r The features of this online help and tips for using it are described in Section @ref help. -@section contact Contact Information - +@section over_contact Contact Information - Quantum Leaps Web site: @webref{,state-machine.com} - - Quantum Leaps licensing: @webref{licensing, state-machine.com/licensing} - -- QP/QM on GitHub: github.com/QuantumLeaps - +- Quantum Leaps on GitHub: github.com/QuantumLeaps - e-mail: info@state-machine.com +
    @next{gs} */ diff --git a/doxygen/make.bat b/doxygen/make.bat index c5776af5..adce36e9 100644 --- a/doxygen/make.bat +++ b/doxygen/make.bat @@ -1,93 +1,93 @@ -@echo off -:: ========================================================================== -:: Product: batch script for generating Doxygen documentation -:: Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. -:: -:: SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial -:: -:: This software is dual-licensed under the terms of the open source GNU -:: General Public License version 3 (or any later version), or alternatively, -:: under the terms of one of the closed source Quantum Leaps commercial -:: licenses. -:: -:: The terms of the open source GNU General Public License version 3 -:: can be found at: -:: -:: The terms of the closed source Quantum Leaps commercial licenses -:: can be found at: -:: -:: Redistributions in source code must retain this top-level comment block. -:: Plagiarizing this software to sidestep the license obligations is illegal. -:: -:: Contact information: -:: -:: -:: ========================================================================== -@setlocal - -@echo usage: -@echo make -@echo make -CHM -@echo make ... - -:: Doxygen tool (adjust to your system) ...................................... -@set DOXYGEN=doxygen - -:: HTML Help tool (needed only with the -CHM option, (adjust to your system) . -@set HHC="C:\tools\HTML Help Workshop\hhc.exe" - -:: Simple complexity metrics tool (adjust to your system) ................... -@set LIZARD=lizard - -:: QP/C directory ............................................................ -@set QPC=.. - -:: HTML outut directory ...................................................... -@set HTML_OUT=%QPC%\html - -:: Generate metrics.dox file... -@set METRICS_INP=%QPC%\include %QPC%\src -x %QPC%\src\qs\* -@set METRICS_OUT=metrics.dox - -@echo /** @page metrics Code Metrics > %METRICS_OUT% -@echo.>> %METRICS_OUT% -@echo @code{cpp} >> %METRICS_OUT% -@echo Code Metrics >> %METRICS_OUT% - -%LIZARD% -m -L500 -a10 -C20 -V %METRICS_INP% >> %METRICS_OUT% - -@echo @endcode >> %METRICS_OUT% -@echo */ >> %METRICS_OUT% - -:: Generate Doxygen Documentation... -if "%1"=="-CHM" ( - @echo Generating HTML... - %DOXYGEN% Doxyfile-CHM - - @echo Adding custom images... - xcopy img tmp\img\ - @echo img\img.htm >> tmp\index.hhp - - @echo Generating CHM... - %HHC% tmp\index.hhp - - @echo. - @echo Cleanup... - @rmdir /S /Q tmp - @echo CHM file generated - -) else ( - @echo. - @echo Cleanup... - rmdir /S /Q %HTML_OUT% - - @echo Generating HTML... - %DOXYGEN% Doxyfile%1 - - @echo Adding custom images... - xcopy img %HTML_OUT%\img\ - xcopy /Y ..\..\ql-doxygen\jquery.js %HTML_OUT% - rem @qclean %HTML_OUT% -) - -@endlocal +@echo off +:: ========================================================================== +:: Product: batch script for generating Doxygen documentation +:: Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +:: +:: SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +:: +:: This software is dual-licensed under the terms of the open source GNU +:: General Public License version 3 (or any later version), or alternatively, +:: under the terms of one of the closed source Quantum Leaps commercial +:: licenses. +:: +:: The terms of the open source GNU General Public License version 3 +:: can be found at: +:: +:: The terms of the closed source Quantum Leaps commercial licenses +:: can be found at: +:: +:: Redistributions in source code must retain this top-level comment block. +:: Plagiarizing this software to sidestep the license obligations is illegal. +:: +:: Contact information: +:: +:: +:: ========================================================================== +@setlocal + +@echo usage: +@echo make +@echo make -CHM +@echo make ... + +:: Doxygen tool (adjust to your system) ...................................... +@set DOXYGEN=doxygen + +:: HTML Help tool (needed only with the -CHM option, (adjust to your system) . +@set HHC="C:\tools\HTML Help Workshop\hhc.exe" + +:: Simple complexity metrics tool (adjust to your system) ................... +@set LIZARD=lizard + +:: QP/C directory ............................................................ +@set QPC=.. + +:: HTML outut directory ...................................................... +@set HTML_OUT=%QPC%\html + +:: Generate metrics.dox file... +@set METRICS_INP=%QPC%\include %QPC%\src -x %QPC%\src\qs\* +@set METRICS_OUT=metrics.dox + +@echo /** @defgroup metrics Code Metrics> %METRICS_OUT% +@echo.>> %METRICS_OUT% +@echo @code{.cpp}>> %METRICS_OUT% +@echo QP/C Code Metrics >> %METRICS_OUT% + +%LIZARD% -m -L500 -a10 -C20 -V %METRICS_INP% >> %METRICS_OUT% + +@echo @endcode>> %METRICS_OUT% +@echo */>> %METRICS_OUT% + +:: Generate Doxygen Documentation... +if "%1"=="-CHM" ( + @echo Generating HTML... + %DOXYGEN% Doxyfile-CHM + + @echo Adding custom images... + xcopy img tmp\img\ + @echo img\img.htm >> tmp\index.hhp + + @echo Generating CHM... + %HHC% tmp\index.hhp + + @echo. + @echo Cleanup... + @rmdir /S /Q tmp + @echo CHM file generated + +) else ( + @echo. + @echo Cleanup... + rmdir /S /Q %HTML_OUT% + + @echo Generating HTML... + %DOXYGEN% Doxyfile%1 + + @echo Adding custom images... + xcopy img %HTML_OUT%\img\ + xcopy /Y ..\..\ql-doxygen\jquery.js %HTML_OUT% + rem @qclean %HTML_OUT% +) + +@endlocal diff --git a/doxygen/metrics.dox b/doxygen/metrics.dox index fb3b6ab6..799aa7d1 100644 --- a/doxygen/metrics.dox +++ b/doxygen/metrics.dox @@ -1,190 +1,175 @@ -/** @page metrics Code Metrics +/** @defgroup metrics Code Metrics -@code{cpp} - Code Metrics +@code{.cpp} + QP/C Code Metrics ================================================ NLOC CCN token PARAM length location ------------------------------------------------ - 3 1 19 1 3 QHsm_state@379-381@..\include\qep.h - 3 1 16 1 3 QMsm_stateObj@470-472@..\include\qep.h - 3 1 14 1 3 QEQueue_getNFree@186-188@..\include\qequeue.h - 3 1 14 1 3 QEQueue_getNMin@201-203@..\include\qequeue.h - 3 1 20 1 3 QEQueue_isEmpty@218-220@..\include\qequeue.h - 3 1 15 1 3 QPSet_setEmpty@71-73@..\include\qpset.h - 3 1 16 1 3 QPSet_isEmpty@76-78@..\include\qpset.h - 3 1 16 1 3 QPSet_notEmpty@81-83@..\include\qpset.h - 3 1 36 2 3 QPSet_hasElement@86-88@..\include\qpset.h - 3 1 31 2 3 QPSet_insert@91-93@..\include\qpset.h - 3 1 36 2 3 QPSet_remove@96-98@..\include\qpset.h - 3 1 17 1 3 QPSet_findMax@103-105@..\include\qpset.h - 4 1 27 1 4 QPSet_setEmpty@120-123@..\include\qpset.h - 5 2 34 1 6 QPSet_isEmpty@126-131@..\include\qpset.h - 5 2 34 1 6 QPSet_notEmpty@134-139@..\include\qpset.h - 5 2 74 2 5 QPSet_hasElement@142-146@..\include\qpset.h - 8 2 66 2 8 QPSet_insert@149-156@..\include\qpset.h - 8 2 76 2 8 QPSet_remove@159-166@..\include\qpset.h - 5 2 45 1 5 QPSet_findMax@171-175@..\include\qpset.h - 6 1 23 1 15 Q_DEFINE_THIS_MODULE@45-59@..\src\qf\qep_hsm.c - 5 1 31 3 5 QHsm_trig_@77-81@..\src\qf\qep_hsm.c - 10 2 56 2 12 QHsm_ctor@142-153@..\src\qf\qep_hsm.c - 48 8 357 2 73 QHsm_init_@173-245@..\src\qf\qep_hsm.c - 5 1 32 2 5 QHsm_top@265-269@..\src\qf\qep_hsm.c - 104 15 670 2 157 QHsm_dispatch_@292-448@..\src\qf\qep_hsm.c - 95 15 500 2 133 QHsm_tran_@472-604@..\src\qf\qep_hsm.c - 3 1 16 1 3 QHsm_getStateHandler_@608-610@..\src\qf\qep_hsm.c - 16 3 107 2 23 QHsm_isIn@630-652@..\src\qf\qep_hsm.c - 22 4 131 2 30 QHsm_childState@678-707@..\src\qf\qep_hsm.c - 10 2 59 2 13 QMsm_ctor@115-127@..\src\qf\qep_msm.c - 24 5 211 2 44 QMsm_init_@146-189@..\src\qf\qep_msm.c - 122 23 847 2 185 QMsm_dispatch_@210-394@..\src\qf\qep_msm.c - 3 1 18 1 3 QMsm_getStateHandler_@398-400@..\src\qf\qep_msm.c - 52 9 328 2 65 QMsm_execTatbl_@425-489@..\src\qf\qep_msm.c - 20 4 120 3 28 QMsm_exitToTranSource_@509-536@..\src\qf\qep_msm.c - 41 6 236 2 50 QMsm_enterHistory_@557-606@..\src\qf\qep_msm.c - 13 3 69 2 14 QMsm_isInState@624-637@..\src\qf\qep_msm.c - 21 4 97 2 27 QMsm_childStateObj@658-684@..\src\qf\qep_msm.c - 10 3 65 1 16 QF_add_@66-81@..\src\qf\qf_act.c - 10 3 79 1 15 QF_remove_@99-113@..\src\qf\qf_act.c - 7 2 46 2 7 QF_bzero@130-136@..\src\qf\qf_act.c - 24 6 143 1 29 QF_LOG2@143-171@..\src\qf\qf_act.c - 79 13 422 3 115 QActive_post_@88-202@..\src\qf\qf_actq.c - 42 7 268 2 65 QActive_postLIFO_@223-287@..\src\qf\qf_actq.c - 34 3 235 1 45 QActive_get_@312-356@..\src\qf\qf_actq.c - 9 2 60 1 12 QF_getQueueMin@378-389@..\src\qf\qf_actq.c - 14 2 78 2 18 QTicker_ctor@421-438@..\src\qf\qf_actq.c - 7 2 39 2 10 QTicker_init_@445-454@..\src\qf\qf_actq.c - 14 3 87 2 20 QTicker_dispatch_@461-480@..\src\qf\qf_actq.c - 27 2 150 4 35 QTicker_post_@487-521@..\src\qf\qf_actq.c - 5 1 30 2 5 QTicker_postLIFO_@524-528@..\src\qf\qf_actq.c - 14 1 84 3 16 QActive_defer@72-87@..\src\qf\qf_defer.c - 32 3 169 2 52 QActive_recall@112-163@..\src\qf\qf_defer.c - 13 2 68 2 13 QActive_flushDeferred@182-194@..\src\qf\qf_defer.c - 5 1 37 2 6 QEvt_ctor@63-68@..\src\qf\qf_dyn.c - 15 3 117 3 24 QF_poolInit@108-131@..\src\qf\qf_dyn.c - 37 7 234 3 55 QF_newX_@161-215@..\src\qf\qf_dyn.c - 30 4 186 1 47 QF_gc@242-288@..\src\qf\qf_dyn.c - 16 2 94 2 24 QF_newRef_@306-329@..\src\qf\qf_dyn.c - 11 1 67 1 13 QF_deleteRef_@343-355@..\src\qf\qf_dyn.c - 3 1 17 1 3 QF_poolGetMaxBlockSize@363-365@..\src\qf\qf_dyn.c - 30 5 235 4 48 QMPool_init@83-130@..\src\qf\qf_mem.c - 16 2 113 3 23 QMPool_put@155-177@..\src\qf\qf_mem.c - 43 4 238 3 66 QMPool_get@213-278@..\src\qf\qf_mem.c - 9 3 59 1 13 QF_getPoolMin@294-306@..\src\qf\qf_mem.c - 5 1 35 2 10 QF_psInit@85-94@..\src\qf\qf_ps.c - 37 5 211 3 64 QF_publish_@120-183@..\src\qf\qf_ps.c - 16 5 113 2 22 QActive_subscribe@205-226@..\src\qf\qf_ps.c - 16 5 113 2 25 QActive_unsubscribe@254-278@..\src\qf\qf_ps.c - 19 5 134 1 24 QActive_unsubscribeAll@304-327@..\src\qf\qf_ps.c - 14 2 71 2 21 QActive_ctor@60-80@..\src\qf\qf_qact.c - 13 2 85 3 13 QEQueue_init@65-77@..\src\qf\qf_qeq.c - 55 8 303 4 74 QEQueue_post@104-177@..\src\qf\qf_qeq.c - 35 5 201 3 45 QEQueue_postLIFO@203-247@..\src\qf\qf_qeq.c - 36 4 221 2 46 QEQueue_get@269-314@..\src\qf\qf_qeq.c - 14 2 78 2 32 QMActive_ctor@68-99@..\src\qf\qf_qmact.c - 66 7 368 1 98 QF_tickX_@89-186@..\src\qf\qf_time.c - 14 3 75 1 17 QF_noTimeEvtsActiveX@203-219@..\src\qf\qf_time.c - 13 2 99 4 30 QTimeEvt_ctorX@240-269@..\src\qf\qf_time.c - 32 8 225 3 58 QTimeEvt_armX@302-359@..\src\qf\qf_time.c - 31 3 173 1 41 QTimeEvt_disarm@381-421@..\src\qf\qf_time.c - 34 8 230 2 62 QTimeEvt_rearm@445-506@..\src\qf\qf_time.c - 5 1 36 1 5 QTimeEvt_wasDisarmed@531-535@..\src\qf\qf_time.c - 7 1 30 1 8 QTimeEvt_currCtr@554-561@..\src\qf\qf_time.c - 11 2 76 1 16 QF_init@65-80@..\src\qk\qk.c - 3 1 10 1 4 QF_stop@99-102@..\src\qk\qk.c - 6 2 26 1 8 initial_events@107-114@..\src\qk\qk.c - 12 3 45 1 19 QF_run@125-143@..\src\qk\qk.c - 21 5 144 7 31 QActive_start_@167-197@..\src\qk\qk.c - 22 2 111 1 33 QK_schedLock@221-253@..\src\qk\qk.c - 21 4 123 1 33 QK_schedUnlock@271-303@..\src\qk\qk.c - 14 3 76 1 17 QK_sched_@320-336@..\src\qk\qk.c - 61 16 353 1 105 QK_activate_@348-452@..\src\qk\qk.c - 9 2 64 1 13 QF_init@66-78@..\src\qv\qv.c - 3 1 10 1 4 QF_stop@97-100@..\src\qv\qv.c - 39 9 197 1 76 QF_run@110-185@..\src\qv\qv.c - 14 3 114 7 20 QActive_start_@209-228@..\src\qv\qv.c - 14 2 108 1 22 QF_init@68-89@..\src\qxk\qxk.c - 3 1 10 1 4 QF_stop@108-111@..\src\qxk\qxk.c - 6 2 26 1 8 initial_events@116-123@..\src\qxk\qxk.c - 12 3 45 1 20 QF_run@133-152@..\src\qxk\qxk.c - 23 6 164 7 33 QActive_start_@177-209@..\src\qxk\qxk.c - 23 3 130 1 34 QXK_schedLock@241-274@..\src\qxk\qxk.c - 20 4 123 1 33 QXK_schedUnlock@297-329@..\src\qxk\qxk.c - 47 7 268 1 65 QXK_sched_@345-409@..\src\qxk\qxk.c - 73 16 474 1 128 QXK_activate_@421-548@..\src\qxk\qxk.c - 12 2 72 1 18 QXK_current@551-568@..\src\qxk\qxk.c - 16 4 113 2 25 QXMutex_init@80-104@..\src\qxk\qxk_mutex.c - 69 12 542 2 110 QXMutex_lock@127-236@..\src\qxk\qxk_mutex.c - 43 10 315 1 67 QXMutex_tryLock@259-325@..\src\qxk\qxk_mutex.c - 64 16 502 1 111 QXMutex_unlock@347-457@..\src\qxk\qxk_mutex.c - 8 1 49 3 10 QXSemaphore_init@72-81@..\src\qxk\qxk_sema.c - 43 7 321 2 69 QXSemaphore_wait@107-175@..\src\qxk\qxk_sema.c - 15 2 61 1 20 QXSemaphore_tryWait@192-211@..\src\qxk\qxk_sema.c - 28 6 195 1 46 QXSemaphore_signal@233-278@..\src\qxk\qxk_sema.c - 20 2 112 3 25 QXThread_ctor@105-129@..\src\qxk\qxk_xthr.c - 8 2 38 3 11 QXThread_init_@136-146@..\src\qxk\qxk_xthr.c - 8 2 38 3 11 QXThread_dispatch_@152-162@..\src\qxk\qxk_xthr.c - 25 6 202 7 47 QXThread_start_@189-235@..\src\qxk\qxk_xthr.c - 97 13 519 3 131 QXThread_post_@280-410@..\src\qxk\qxk_xthr.c - 5 1 30 2 5 QXThread_postLIFO_@423-427@..\src\qxk\qxk_xthr.c - 58 7 497 1 84 QXThread_queueGet@449-532@..\src\qxk\qxk_xthr.c - 5 1 51 1 7 QXThread_block_@542-548@..\src\qxk\qxk_xthr.c - 8 3 58 1 8 QXThread_unblock_@558-565@..\src\qxk\qxk_xthr.c - 19 3 153 3 37 QXThread_teArm_@576-612@..\src\qxk\qxk_xthr.c - 11 2 46 1 13 QXThread_teDisarm_@622-634@..\src\qxk\qxk_xthr.c - 21 4 195 1 38 QXThread_delay@650-687@..\src\qxk\qxk_xthr.c - 14 2 68 1 16 QXThread_delayCancel@699-714@..\src\qxk\qxk_xthr.c - 13 2 106 1 23 QXK_threadRet_@727-749@..\src\qxk\qxk_xthr.c -37 file analyzed. + 3 1 15 1 3 QEQueue_getNFree@310-312@..\include\qequeue.h + 3 1 15 1 3 QEQueue_getNMin@327-329@..\include\qequeue.h + 3 1 21 1 3 QEQueue_isEmpty@346-348@..\include\qequeue.h + 5 2 33 1 8 QPSet_setEmpty@194-201@..\include\qf.h + 4 3 44 1 7 QPSet_isEmpty@204-210@..\include\qf.h + 4 3 44 1 7 QPSet_notEmpty@213-219@..\include\qf.h + 8 3 95 2 11 QPSet_hasElement@222-232@..\include\qf.h + 11 3 105 2 14 QPSet_insert@235-248@..\include\qf.h + 12 3 117 2 15 QPSet_remove@251-265@..\include\qf.h + 6 3 56 1 9 QPSet_findMax@268-276@..\include\qf.h + 3 1 18 1 3 QActive_getPrio@735-737@..\include\qf.h + 5 1 22 2 5 QActive_setPrio@742-746@..\include\qf.h + 6 1 20 2 6 QF_psInit@1368-1373@..\include\qf.h + 14 3 67 1 14 QS_rxPut@810-823@..\include\qs.h + 5 1 20 1 20 Q_DEFINE_THIS_MODULE@58-77@..\src\qf\qep_hsm.c + 18 3 99 2 24 QHsm_isIn@132-155@..\src\qf\qep_hsm.c + 3 1 19 1 3 QHsm_state@158-160@..\src\qf\qep_hsm.c + 22 4 123 2 31 QHsm_childState@163-193@..\src\qf\qep_hsm.c + 12 2 56 2 14 QHsm_ctor@196-209@..\src\qf\qep_hsm.c + 7 1 29 2 7 QHsm_top@212-218@..\src\qf\qep_hsm.c + 51 8 352 3 77 QHsm_init_@221-297@..\src\qf\qep_hsm.c + 105 15 636 3 156 QHsm_dispatch_@300-455@..\src\qf\qep_hsm.c + 3 1 16 1 3 QHsm_getStateHandler_@459-461@..\src\qf\qep_hsm.c + 97 15 471 3 135 QHsm_tran_@465-599@..\src\qf\qep_hsm.c + 15 3 69 2 16 QMsm_isInState@85-100@..\src\qf\qep_msm.c + 3 1 17 1 3 QMsm_stateObj@103-105@..\src\qf\qep_msm.c + 22 4 97 2 29 QMsm_childStateObj@108-136@..\src\qf\qep_msm.c + 12 2 59 2 15 QMsm_ctor@139-153@..\src\qf\qep_msm.c + 27 4 202 3 45 QMsm_init_@156-200@..\src\qf\qep_msm.c + 117 19 728 3 168 QMsm_dispatch_@203-370@..\src\qf\qep_msm.c + 3 1 18 1 3 QMsm_getStateHandler_@374-376@..\src\qf\qep_msm.c + 55 9 316 3 68 QMsm_execTatbl_@380-447@..\src\qf\qep_msm.c + 24 4 130 4 32 QMsm_exitToTranSource_@450-481@..\src\qf\qep_msm.c + 45 6 243 3 54 QMsm_enterHistory_@484-537@..\src\qf\qep_msm.c + 82 13 431 4 118 QActive_post_@74-191@..\src\qf\qf_actq.c + 44 7 266 2 66 QActive_postLIFO_@196-261@..\src\qf\qf_actq.c + 34 3 233 1 44 QActive_get_@266-309@..\src\qf\qf_actq.c + 10 2 60 1 11 QF_getQueueMin@315-325@..\src\qf\qf_actq.c + 16 2 79 2 20 QTicker_ctor@344-363@..\src\qf\qf_actq.c + 10 1 45 3 11 QTicker_init_@366-376@..\src\qf\qf_actq.c + 17 2 92 3 20 QTicker_dispatch_@379-398@..\src\qf\qf_actq.c + 30 2 156 4 37 QTicker_post_@401-437@..\src\qf\qf_actq.c + 8 1 30 2 9 QTicker_postLIFO_@440-448@..\src\qf\qf_actq.c + 15 1 84 3 17 QActive_defer@69-85@..\src\qf\qf_defer.c + 34 3 169 2 54 QActive_recall@90-143@..\src\qf\qf_defer.c + 13 2 68 2 13 QActive_flushDeferred@148-160@..\src\qf\qf_defer.c + 17 3 116 3 26 QF_poolInit@76-101@..\src\qf\qf_dyn.c + 3 1 17 1 3 QF_poolGetMaxBlockSize@104-106@..\src\qf\qf_dyn.c + 9 3 59 1 12 QF_getPoolMin@109-120@..\src\qf\qf_dyn.c + 39 7 234 3 57 QF_newX_@123-179@..\src\qf\qf_dyn.c + 30 4 186 1 46 QF_gc@182-227@..\src\qf\qf_dyn.c + 19 2 94 2 26 QF_newRef_@230-255@..\src\qf\qf_dyn.c + 11 1 67 1 13 QF_deleteRef_@258-270@..\src\qf\qf_dyn.c + 32 5 233 4 50 QMPool_init@71-120@..\src\qf\qf_mem.c + 44 4 238 3 67 QMPool_get@123-189@..\src\qf\qf_mem.c + 19 2 114 3 26 QMPool_put@192-217@..\src\qf\qf_mem.c + 8 1 35 2 13 QActive_psInit@77-89@..\src\qf\qf_ps.c + 41 5 220 3 68 QActive_publish_@94-161@..\src\qf\qf_ps.c + 18 5 111 2 24 QActive_subscribe@166-189@..\src\qf\qf_ps.c + 18 5 111 2 27 QActive_unsubscribe@194-220@..\src\qf\qf_ps.c + 19 5 130 1 24 QActive_unsubscribeAll@225-248@..\src\qf\qf_ps.c + 10 2 46 2 10 QF_bzero@88-97@..\src\qf\qf_qact.c + 16 2 72 2 23 QActive_ctor@104-126@..\src\qf\qf_qact.c + 10 3 66 1 16 QActive_register_@131-146@..\src\qf\qf_qact.c + 10 3 79 1 15 QActive_unregister_@151-165@..\src\qf\qf_qact.c + 24 6 143 1 29 QF_LOG2@173-201@..\src\qf\qf_qact.c + 14 2 85 3 14 QEQueue_init@71-84@..\src\qf\qf_qeq.c + 57 8 301 4 76 QEQueue_post@87-162@..\src\qf\qf_qeq.c + 36 5 199 3 46 QEQueue_postLIFO@165-210@..\src\qf\qf_qeq.c + 38 4 219 2 48 QEQueue_get@213-260@..\src\qf\qf_qeq.c + 16 2 79 2 34 QMActive_ctor@78-111@..\src\qf\qf_qmact.c + 15 2 99 4 32 QTimeEvt_ctorX@82-113@..\src\qf\qf_time.c + 33 8 225 3 59 QTimeEvt_armX@116-174@..\src\qf\qf_time.c + 31 3 173 1 41 QTimeEvt_disarm@177-217@..\src\qf\qf_time.c + 36 8 230 2 64 QTimeEvt_rearm@220-283@..\src\qf\qf_time.c + 5 1 36 1 5 QTimeEvt_wasDisarmed@286-290@..\src\qf\qf_time.c + 7 1 30 1 8 QTimeEvt_currCtr@293-300@..\src\qf\qf_time.c + 69 7 380 2 110 QTimeEvt_tick_@303-412@..\src\qf\qf_time.c + 14 3 75 1 16 QTimeEvt_noActive@415-430@..\src\qf\qf_time.c + 61 16 348 1 106 QK_activate_@78-183@..\src\qk\qk.c + 14 3 74 1 17 QK_sched_@186-202@..\src\qk\qk.c + 22 2 112 1 33 QK_schedLock@205-237@..\src\qk\qk.c + 21 4 124 1 33 QK_schedUnlock@240-272@..\src\qk\qk.c + 11 2 77 1 16 QF_init@277-292@..\src\qk\qk.c + 3 1 10 1 4 QF_stop@295-298@..\src\qk\qk.c + 15 4 61 1 25 QF_run@301-325@..\src\qk\qk.c + 24 5 145 7 34 QActive_start_@332-365@..\src\qk\qk.c + 9 2 64 1 13 QF_init@77-89@..\src\qv\qv.c + 3 1 10 1 4 QF_stop@92-95@..\src\qv\qv.c + 39 9 197 1 76 QF_run@98-173@..\src\qv\qv.c + 17 3 115 7 23 QActive_start_@180-202@..\src\qv\qv.c + 74 16 467 1 129 QXK_activate_@78-206@..\src\qxk\qxk.c + 47 7 264 1 65 QXK_sched_@209-273@..\src\qxk\qxk.c + 23 3 131 1 34 QXK_schedLock@276-309@..\src\qxk\qxk.c + 20 4 124 1 33 QXK_schedUnlock@312-344@..\src\qxk\qxk.c + 12 2 72 1 18 QXK_current@347-364@..\src\qxk\qxk.c + 13 2 106 1 21 QF_init@369-389@..\src\qxk\qxk.c + 3 1 10 1 4 QF_stop@392-395@..\src\qxk\qxk.c + 15 4 61 1 25 QF_run@398-422@..\src\qxk\qxk.c + 26 6 165 7 36 QActive_start_@429-464@..\src\qxk\qxk.c + 13 2 104 1 23 QXK_threadExit_@470-492@..\src\qxk\qxk.c + 18 4 114 2 27 QXMutex_init@78-104@..\src\qxk\qxk_mutex.c + 67 12 536 2 108 QXMutex_lock@107-214@..\src\qxk\qxk_mutex.c + 43 10 311 1 67 QXMutex_tryLock@217-283@..\src\qxk\qxk_mutex.c + 63 16 496 1 110 QXMutex_unlock@286-395@..\src\qxk\qxk_mutex.c + 9 1 51 3 11 QXSemaphore_init@77-87@..\src\qxk\qxk_sema.c + 45 7 319 2 71 QXSemaphore_wait@90-160@..\src\qxk\qxk_sema.c + 15 2 61 1 20 QXSemaphore_tryWait@163-182@..\src\qxk\qxk_sema.c + 29 6 193 1 47 QXSemaphore_signal@185-231@..\src\qxk\qxk_sema.c + 21 2 113 3 26 QXThread_ctor@78-103@..\src\qxk\qxk_xthr.c + 21 4 195 1 38 QXThread_delay@106-143@..\src\qxk\qxk_xthr.c + 14 2 68 1 16 QXThread_delayCancel@146-161@..\src\qxk\qxk_xthr.c + 58 7 493 1 85 QXThread_queueGet@164-248@..\src\qxk\qxk_xthr.c + 10 1 39 3 11 QXThread_init_@251-261@..\src\qxk\qxk_xthr.c + 10 1 39 3 11 QXThread_dispatch_@264-274@..\src\qxk\qxk_xthr.c + 29 6 201 7 50 QXThread_start_@277-326@..\src\qxk\qxk_xthr.c + 101 13 527 4 136 QXThread_post_@329-464@..\src\qxk\qxk_xthr.c + 8 1 30 2 9 QXThread_postLIFO_@467-475@..\src\qxk\qxk_xthr.c + 5 1 49 1 7 QXThread_block_@478-484@..\src\qxk\qxk_xthr.c + 8 3 56 1 8 QXThread_unblock_@487-494@..\src\qxk\qxk_xthr.c + 20 3 157 3 39 QXThread_teArm_@497-535@..\src\qxk\qxk_xthr.c + 11 2 46 1 13 QXThread_teDisarm_@538-550@..\src\qxk\qxk_xthr.c +33 file analyzed. ============================================================== NLOC Avg.NLOC AvgCCN Avg.token function_cnt file -------------------------------------------------------------- - 4 0.0 0.0 0.0 0 ..\include\qassert.h - 108 3.0 1.0 17.5 2 ..\include\qep.h - 28 3.0 1.0 16.0 3 ..\include\qequeue.h - 93 0.0 0.0 0.0 0 ..\include\qf.h - 20 0.0 0.0 0.0 0 ..\include\qk.h - 21 0.0 0.0 0.0 0 ..\include\qmpool.h + 7 0.0 0.0 0.0 0 ..\include\qassert.h + 124 0.0 0.0 0.0 0 ..\include\qep.h + 33 3.0 1.0 17.0 3 ..\include\qequeue.h + 229 6.4 2.3 55.4 10 ..\include\qf.h + 9 0.0 0.0 0.0 0 ..\include\qf_pkg.h + 18 0.0 0.0 0.0 0 ..\include\qk.h + 25 0.0 0.0 0.0 0 ..\include\qmpool.h 8 0.0 0.0 0.0 0 ..\include\qpc.h - 71 4.4 1.4 37.4 14 ..\include\qpset.h - 238 0.0 0.0 0.0 0 ..\include\qs.h + 344 14.0 3.0 67.0 1 ..\include\qs.h 3 0.0 0.0 0.0 0 ..\include\qstamp.c 2 0.0 0.0 0.0 0 ..\include\qstamp.h 0 0.0 0.0 0.0 0 ..\include\qs_dummy.h - 9 0.0 0.0 0.0 0 ..\include\quit.h - 5 0.0 0.0 0.0 0 ..\include\qv.h - 23 0.0 0.0 0.0 0 ..\include\qxk.h - 32 0.0 0.0 0.0 0 ..\include\qxthread.h - 337 31.4 5.1 192.3 10 ..\src\qf\qep_hsm.c - 346 34.0 6.3 220.6 9 ..\src\qf\qep_msm.c - 59 12.8 3.5 83.2 4 ..\src\qf\qf_act.c - 257 25.7 3.9 152.1 9 ..\src\qf\qf_actq.c - 66 19.7 2.0 107.0 3 ..\src\qf\qf_defer.c - 126 16.7 2.7 107.4 7 ..\src\qf\qf_dyn.c - 105 24.5 3.5 161.2 4 ..\src\qf\qf_mem.c - 103 18.6 4.2 121.2 5 ..\src\qf\qf_ps.c - 16 14.0 2.0 71.0 1 ..\src\qf\qf_qact.c - 146 34.8 4.8 202.5 4 ..\src\qf\qf_qeq.c - 16 14.0 2.0 78.0 1 ..\src\qf\qf_qmact.c - 211 25.2 4.1 154.5 8 ..\src\qf\qf_time.c - 180 19.0 4.2 107.1 9 ..\src\qk\qk.c - 73 16.2 3.8 96.2 4 ..\src\qv\qv.c - 243 23.3 4.6 142.0 10 ..\src\qxk\qxk.c - 199 48.0 10.5 368.0 4 ..\src\qxk\qxk_mutex.c - 101 23.5 4.0 156.5 4 ..\src\qxk\qxk_sema.c - 339 22.3 3.6 150.9 14 ..\src\qxk\qxk_xthr.c - 19 0.0 0.0 0.0 0 ..\src\qf_pkg.h - 30 0.0 0.0 0.0 0 ..\src\qs_pkg.h - 16 0.0 0.0 0.0 0 ..\src\qxk_pkg.h + 19 0.0 0.0 0.0 0 ..\include\qs_pkg.h + 7 0.0 0.0 0.0 0 ..\include\qv.h + 97 0.0 0.0 0.0 0 ..\include\qxk.h + 334 32.3 5.1 182.1 10 ..\src\qf\qep_hsm.c + 336 32.3 5.3 187.9 10 ..\src\qf\qep_msm.c + 2 0.0 0.0 0.0 0 ..\src\qf\qf_act.c + 258 27.9 3.7 154.7 9 ..\src\qf\qf_actq.c + 69 20.7 2.0 107.0 3 ..\src\qf\qf_defer.c + 135 18.3 3.0 110.4 7 ..\src\qf\qf_dyn.c + 102 31.7 3.7 195.0 3 ..\src\qf\qf_mem.c + 113 20.8 4.2 121.4 5 ..\src\qf\qf_ps.c + 79 14.0 3.2 81.2 5 ..\src\qf\qf_qact.c + 152 36.2 4.8 201.0 4 ..\src\qf\qf_qeq.c + 18 16.0 2.0 79.0 1 ..\src\qf\qf_qmact.c + 218 26.2 4.1 156.0 8 ..\src\qf\qf_time.c + 179 21.4 4.6 118.9 8 ..\src\qk\qk.c + 75 17.0 3.8 96.5 4 ..\src\qv\qv.c + 254 24.6 4.7 150.4 10 ..\src\qxk\qxk.c + 198 47.8 10.5 364.2 4 ..\src\qxk\qxk_mutex.c + 105 24.5 4.0 156.0 4 ..\src\qxk\qxk_sema.c + 324 24.3 3.5 154.8 13 ..\src\qxk\qxk_xthr.c -========================================================================================================= -!!!! Warnings (cyclomatic_complexity > 20 or length > 500 or nloc > 1000000 or parameter_count > 10) !!!! -================================================ - NLOC CCN token PARAM length location ------------------------------------------------- - 122 23 847 2 185 QMsm_dispatch_@210-394@..\src\qf\qep_msm.c +============================================================================================================= +No thresholds exceeded (cyclomatic_complexity > 20 or length > 500 or nloc > 1000000 or parameter_count > 10) ========================================================================================== Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt ------------------------------------------------------------------------------------------ - 3653 21.6 3.9 137.3 129 1 0.01 0.04 + 3876 23.8 4.1 143.6 122 0 0.00 0.00 @endcode */ diff --git a/doxygen/modules-unused.dox b/doxygen/modules-unused.dox new file mode 100644 index 00000000..e53f03fb --- /dev/null +++ b/doxygen/modules-unused.dox @@ -0,0 +1,271 @@ +/*! @defgroup qp QP + +@brief +QP Framework +*/ +/*##########################################################################*/ +/*! @defgroup qep QEP + +@brief +Hierarchical Event Processor + +QEP is a universal, UML-compliant event processor that enables developers to code UML state machines in highly readable ANSI-C, in which every state machine element is mapped to code precisely, unambiguously, and exactly once (traceability). QEP fully supports hierarchical state nesting, which is the fundamental mechanism for reusing behavior across many states instead of repeating the same actions and transitions over and over again. +*/ +/*##########################################################################*/ +/*! @defgroup qf QF + +@brief +Active Object (Actor) Framework + +QF is a portable, event-driven, real-time framework for execution of active objects (concurrent state machines) specifically designed for real-time embedded (RTE) systems. +*/ +/*##########################################################################*/ +/*! @defgroup qs QS + +@brief +Software Tracing Instrumentation + +QS is software tracing system that enables developers to monitor live QP applications with minimal target system resources and without stopping or significantly slowing down the code. QS is an ideal tool for testing, troubleshooting, and optimizing QP applications. QS can even be used to support acceptance testing in product manufacturing. Please see QS Manual inside the QTools collection for more information. +*/ +/*##########################################################################*/ +/*! @defgroup qv QV + +@brief +Cooperative Kernel + +@description +QV is a simple **cooperative** kernel (previously called "Vanilla" kernel). This kernel executes active objects one at a time, with priority-based scheduling performed before processing of each event. Due to naturally short duration of event processing in state machines, the simple QV kernel is often adequate for many real-time systems. + +@note +The QV scheduler is described in Section 6.3.7 of the book ["Practical UML Statecharts in C/C++, 2nd Ed" (PSiCC2)](https://www.state-machine.com/psicc2/). + + + +@section qv_overview QV Overview +The QV scheduler is engaged after every RTC step of any active object to choose the next active object to execute. The QV scheduler always chooses the highest-priority active object that has any events in its event queue. The QV scheduler then extracts the next event from this queue and dispatches it to the state machine associated with the active object. The state machine runs to completion, after which the QV scheduler runs and the cycle repeats. + +![QV scheduler operation](qv.gif) + +Please note that because the state machines always return to the QV scheduler after each RTC step, a single stack can be used to process all state machines (memory-friendly architecture). + +The QV scheduler can also very easily detect when all event queues are empty, at which point it can call the idle callback to let the application put the CPU and peripherals to a **low-power sleep mode** (power-friendly architecture). + +Given the simplicity, portability, and low-resource consumption, the QV scheduler is very attractive. It allows you to partition the problem into active objects and execute these active objects orderly. The thread-level response of this scheduler is the longest RTC step in the whole system, but because event-driven active objects don’t block, the RTC steps tend to be very short (typically just a few microseconds). Also, often you can break up longer RTC steps into shorter pieces, by posting an event to self and returning (“Reminder” state pattern). The self-posted event then triggers the continuation of longer processing. + +@remarks +Sometimes it is not practical to break up long RTC steps, and consequently the thread-level response of the simple @ref srs_qv "QV kernel" might be too slow. In this cases you need to use a *preemptive* kernel. The big advantage of preemptive kernel is that it effectively decouples high-priority thread from low-priority threads in the time domain. The timeliness of execution of high-priority thread is almost independent on the low-priority threads. But of course there is no such thing as a free lunch. Preemptive kernels open the whole new class of problems related to race conditions. So you need to be very careful about sharing any resources. + +@next{qk} +*/ +/*##########################################################################*/ +/*! @defgroup qk QK + +@brief +Preemptive Run-To-Completion (Non-Blocking) Kernel + +

    The preemptive, non-blocking QK kernel is specifically designed to execute non-blocking active objects (see also [[PSiCC2](https://www.state-machine.com/psicc2/), Chapter 10]). QK runs active objects in the same way as prioritized interrupt controller (such as NVIC in ARM Cortex-M) runs interrupts using **single stack**. Active objects process their events in run-to-completion (RTC) fashion and remove themselves from the call stack, the same way as nested interrupts remove themselves from the stack upon completion. At the same time high-priority active objects can **preempt** lower-priority active objects, just like interrupts can preempt each other under a prioritized interrupt controller. QK meets all the requirement of the Rate Monotonic Scheduling (a.k.a. Rate Monotonic Analysis RMA) and can be used in hard real-time systems. +

    + +@note +The non-blocking, run-to-completion, preemptive threads are known in the literature as "basic threads" (OSEK/AUTOSAR terminology), sometimes also called "fibers" (e.g., Q-Kernel) or "software interrupts" (e.g., TI-RTOS). + + + +@section qk_overview QK Overview +The preemptive, run-to-completion (RTC) QK kernel breaks entirely with the endless-loop structure of the thread routines and instead uses threads structured as one-shot, discrete, run-to-completion functions, very much like ISRs [[PSiCC2](https://www.state-machine.com/psicc2/), Chapter 10]. In fact, the QK kernel views interrupts very much like threads of a “super-high” priority, except that interrupts are prioritized in hardware by the interrupt controller, whereas threads are prioritized in software by the RTC kernel. + +As a fully preemptive multithreading kernel, QK must ensure that at all times the CPU executes the highest-priority thread (active object) that is ready to run. Fortunately, only two scenarios can lead to readying a higher-priority thread: + +
      +
    • 1 +When a lower-priority thread posts an event to a higher-priority thread, the kernel must immediately suspend the execution of the lower-priority thread and start the higher-priority thread. This type of preemption is called synchronous preemption because it happens synchronously with posting an event to the thread's event queue. +> NOTE: The stack usage shown in the bottom panel displays stack growing down (towards lower addresses), as it is the case in ARM Cortex-M. +
    • +
    + +@anchor qk-synch-fig +@image html qk_synch.gif "Synchronous Preemption in QK" + +
      +
    • 2 +When an interrupt posts an event to a higher-priority thread than the interrupted thread, upon completion of the ISR the kernel must start execution of the higher-priority thread instead of resuming the lower-priority thread. This type of preemption is called asynchronous preemption because it can happen asynchronously, any time interrupts are not explicitly disabled. +> NOTE: The stack usage during asynchronous preemption on ARM Cortex-M is slightly simplified in the diagram below. A more detailed stack usage diagram is discussed later in the section explaining the @ref arm-cm_qk_port-asm_pendsv "Detailed stack allocation in QK for ARM Cortex-M". +
    • +
    + +@anchor qk-asynch-fig +@image html qk_asynch.gif "Asynchronous Preemption in QK" + + +@note +A traditional RTOS kernel does not distinguish between the synchronous and asynchronous preemptions and makes all preemptions look like the more stack-intensive asynchronous preemptions. In contrast, a RTC kernel can implement synchronous preemption as a simple function call (to QK_activate_()), which is much more efficient than a full context-switch. + +@next{qxk} +*/ +/*##########################################################################*/ +/*! @defgroup qxk QXK + +@brief +Preemptive Dual-Mode (Run-to-Completion/Blocking) RTOS Kernel + +QXK is a small, preemptive, priority-based, dual-mode **blocking** kernel that executes active objects like the @ref srs_qk "QK kernel" (@ref srs_qxk_basic "basic threads"), but can also execute traditional __blocking__ threads (@ref srs_qxk_extended "extended threads"). In this respect, QXK behaves exactly like a __conventional RTOS__ (Real-Time Operating System). + +QXK 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. To this end, QXK is not only more efficient than running QP on top of a @ref ports_rtos "traditional 3rd-party RTOS" (because non-blocking @ref srs_qxk_basic "basic threads" take far less stack space and CPU cycles for context switch than the much heavier @ref srs_qxk_extended "extended threads"). But the biggest advantage of QXK is that it __protects__ the application-level code from inadvertent mixing of blocking calls inside the event-driven active objects. Specifically, QXK "knows" the type of the thread context (extended/basic) and asserts internally if a blocking call (e.g., semaphore-wait or a time-delay) is attempted in a basic thread (active object). This is something that a QP port to a @ref ports_rtos "conventional 3rd-party RTOS" cannot do, because such an RTOS runs all code (including active objects) in the context of havyweight extended threads. + +Currently, the QXK kernel has been ported to the following CPUs: + +- @ref arm-cm_qxk "Cortex-M (M0/M0+/M1/M3/M4/M4F/M7)"@n +Supported toolchains include: ARM-KEIL MDK, IAR-ARM, GNU-ARM, TI-ARM. + +Currently, the QXK kernel is illustrated by the following examples: + +- @ref arm-cm_dpp_efm32-slstk3401a (ARM Cortex-M4F)@n +Example illustrates: 6 active objects plus two extended threads, QXK blocking delay, QXK semaphore, QXK mutex, QXK blocking message queue. + +- @ref arm-cm_dpp_ek-tm4c123gxl (ARM Cortex-M4F)@n +Example illustrates: 6 active objects plus two extended threads, QXK blocking delay, QXK semaphore, QXK mutex, QXK blocking message queue. + +- @ref arm-cm_dpp_nucleo-l053r8 (ARM Cortex-M0+)@n +Example illustrates: 6 active objects plus two extended threads, QXK blocking delay, QXK semaphore, QXK mutex, QXK blocking message queue. + + +@section qxk_basic Basic Threads +QXK supports **basic**-threads (non-blocking, run-to-completion activations). The basic-threads all nest on the same stack (Main Stack Pointer in ARM Cortex-M), so the stack usage is reduced. The additional advantage of basic-threads is that switching from basic-thread to another basic-thread requires only @ref srs_qxk_activate_() "activation" of the basic-thread, which is much simpler and faster than full context-switch required for @ref srs_qxk_extended "extended"-threads that QXK also supports (see below). + +@remarks +QXK adopts the "basic/exteded thread" terms from the OSEK/AUTOSAR Operating System specification. Other real-time kernels might use different terminology for similar concepts. For example, the Q-Kernel uses the term "fibers", while TI-RTOS uses the term "software interrupts" for concepts closely related to "basic threads". + + +@section qxk_extended Extended Threads +QXK supports **extended**-threads (blocking, typically structrued as endless loops). The extended-threads use private per-thread stacks, as in conventional RTOS kernels. Any switching from basic-to-extended thread or extended-to-extended thread requires full context switch. + +@remarks +QXK is a unique dual-mode kernel on the market that supports interleaving the priorities of basic threads and extended threads. Other dual-mode kernels typically limit the priorities of basic threads to be always higher (more urgent) than any of the extended threads. + +@sa ::QXThread + + +@section qxk_classes Classes in QXK +The figure below shows the main classes introduced in the QXK kernel and their relation to the classes of the QP framework. + +@image html qxk_classes.gif "Classes of the QXK dual-mode kernel" + +
      +
    • 0 The abstract ::QActive class represents active objects in QP. This class contains the @c thread object of the underlying kernel (QXK thread-control-block in this case) as well as the event queue and the unique priority of the active object. +
    • + +
    • 1 The ::QXThread class represents the extended (blocking) threads of the QXK kernel. It inherits ::QActive, so that extended-threads can be treated as active objects internally in the framework. However, the extended-threads **do not implement state machines**. Instead, the data fields used for storing the current state in active objects are re-used to store the private stack of the extended-thread. The ::QXThread class also contains the @c timeEvt object (see ::QTimeEvt) for generating timeouts when the extended-thread is blocked. +
    • + +
    • 2 The ::QXMutex class represents the **priority-ceiling mutex** of the QXK kernel. The mutex can block and can be used only in the extended-threads (in case they share resources that need to be protected). The mutex is recursive, meaning that it can be locked multiple times from the same extended thread (but it needs to be unlocked equal number of times). +
    • + +
    • 3 The ::QXSemaphore class represents the **counting semaphore** of the QXK kernel. The semaphore can be waited on only in the extended-threads and the QXK kernel would assert if an active object thread would attempt to wait on a semaphore. On the other hand, a semaphore can be signaled from anywhere in the code, including active objects and ISRs. +
    • +
    + +@note +The main takeaway from the QXK class diagram is QXK's **optimal, tight integration** with the QP framework. The QXK kernel reuses all mechanisms already provided in QP, thus avoiding any code duplication, inefficient layers of indirection, and additional licensing costs, which are inevitable when using @ref ports_rtos "3rd-party RTOS kernels" to run QP applications. + + +@section qxk_features QXK Feature Summary +As you can see in the list below, QXK provides most features you might expect of a traditional blocking **RTOS** kernel and is recommended as the preferred RTOS kernel for QP applications that need to mix active objects with traditional blocking code. + +
      + +
    • >Preemptive, priority-based scheduling of up to 64 threads. Each thread must be assigned its own unique priority (1 .. #QF_MAX_ACTIVE); +
    • + +> NOTE: QXK always executes the highest-priority thread that is ready to run (is not blocked). The scheduling algorithm used in QXK meets all the requirement of the Rate Monotonic Scheduling (a.k.a. Rate Monotonic Analysis — RMA) and can be used in hard real-time systems. + +
    • >QXK distinguishes between two types of threads: +
    • + +- **basic threads** of active objects that are made ready-to-run by events posted to the active objects. Such basic threads are non-blocking, run-to-completion activations that cannot block in the middle of the RTC step. QXK asserts when a basic thread attempts to use a blocking mechanism, such as a time-delay or a semaphore-wait. All basic threads share the common stack. + +- **extended threads** that can block anywhere in their thread-handler function, whereas QXK provides a typical assortments of blocking primitives for extended-threads, such as time-delay, blocking message queue, counting semaphore, or a mutex. Each extended thread must be provided with its own private stack. + +
    • >Tightly integrated mechanisms for communication between event-driven active objects and extended blocking threads: +
    • + +- Basic threads (Active Objects) can signal semaphores and send messages to extended threads. + +- Extended threads can post or publish events to active objects or other extended threads; + +- Extended threads can subscribe to events and thus can receive events published in the system. + + +
    • >Priority-Ceiling, recursive Mutexes with optional timeout; +
    • + +> **NOTE:** Priority-ceiling protocol implemented in QXK is immune to priority-inversions, but requires a unique QP thread priority level (the ceiling priority) to be assigned to the mutex. This ceiling priority is unavailable to QP threads.@n + +> **NOTE:** A QXK mutex can be configured not to use the priority-ceiling protocol (when initialized with a zero priority-ceiling). In that case, the mutex does not require a separate priority level. + +
    • >Counting Semaphores with optional timeout that can block multiple extended-threads; +
    • + +
    • >Blocking "zero-copy" message queue with optional timeout bound to each extended-thread; +
    • + +
    • >Deterministic fixed-size memory pools for dynamic memory management available both to extended-threads and active objects; +
    • + +
    • >Interrupt management, including "zero-latency", kernel-unaware interrupts that are never disabled; +
    • + +> NOTE: This feature is only supported on CPUs that allow selective interrupt disabling, such as ARM Cortex-M3/M4 (but not ARM Cortex-M0/M0+); + +
    • > @ref srs_qxk_tls "Thread-Local Storage" for all threads (basic threads and extended threads). +
    • +
    + + +@subsection qxk_tls Thread Local Storage +Thread-local storage (TLS) is a programming method that uses static or global memory local to a thread. TLS is specifically useful for writing library-type code, which is used in a multithreaded environment and needs to access per-thread data in an independent way. + +TLS is used in some places where ordinary, single-threaded programs would use static or global variables, but where this would be inappropriate in multithreaded cases. An example of such situations is where library-type functions use a global variable to set an error condition (for example the global variable errno used by many functions of the C library). If errno were simply a global variable, a call of a system function on one thread may overwrite the value previously set by a call of a system function on a different thread, possibly before following code on that different thread could check for the error condition. The solution is to have errno be a variable that looks like it is global, but in fact exists once per thread—i.e., it lives in *thread-local storage*. A second use case would be multiple threads accumulating information into a global variable. To avoid a race condition, every access to this global variable would have to be protected by a mutual-exclusion mechanism. Alternatively, each thread might accumulate into a thread-local variable (that, by definition, cannot be read from or written to from other threads, implying that there can be no race conditions). Threads then only have to synchronize a final accumulation from their own thread-local variable into a single, truly global variable. + +The TLS implementations vary, but many systems, including QXK, implement TLS by providing a pointer-sized variable thread-local. This pointer can be set to arbitrarily sized memory blocks in a thread-local manner, by allocating such a memory block (statically or dynamically) and storing the memory address of that block in the thread-local variable. + +Typical usage of TLS in QXK is illustrated in the example qpc/examples/arm-cm/dpp_efm32-slstk3401a/qxk/, test.c, and consists: + +- define the TLS structure +@code{c} +typedef struct { + uint32_t foo; + uint8_t bar[10]; +} TLS_test; +@endcode + +- allocate the TLS storage for all participating threads (extended or basic threads) +@code{c} +static TLS_test l_tls1; +static TLS_test l_tls2; +@endcode + +- initialize the TLS per-thread pointer in each thread routine (for extended threads) or the top-most initial transition (for basic threads of active objects): +@code{c} +static void Thread1_run(QXThread * const me) { + me->super.thread = &l_tls1; /* initialize the TLS for Thread1 */ + . . . +} +. . . +static void Thread2_run(QXThread * const me) { + me->super.thread = &l_tls2; /* initialize the TLS for Thread2 */ + . . . +} +@endcode + +- access the TLS from your code: +@code{c} +void lib_fun(uint32_t x) { + QXK_TLS(TLS_test *)->foo = x; +} +@endcode + +@sa +- QXK_current() +- QXK_TLS() + +*/ diff --git a/doxygen/ports.dox b/doxygen/ports.dox index 2b1c552a..b3a4bd98 100644 --- a/doxygen/ports.dox +++ b/doxygen/ports.dox @@ -5,14 +5,15 @@ The QP/C framework can be easily adapted to various operating systems, processor The QP/C distribution contains many QP/C ports, which are organized into the three categories: -- @subpage ports_native "Native Ports" adapt QP/C to run on bare-metal processors "natively", using one of the built-in kernels (@ref qv "QV", @ref qk "QK", or @ref qxk "QXK") +- @subpage ports_lint (generic C compiler) QP/C "port" to the PC-Lint Plus static analysis tool (a "compiler") + +- @subpage ports_native "Native Ports" adapt QP/C to run on bare-metal processors "natively", using one of the built-in kernels (@ref srs_qv "QV", @ref srs_qk "QK", or @ref srs_qxk "QXK") - @subpage ports_rtos "3rd-Party RTOS Ports" adapt QP/C to run on top of a 3rd-Party Real-Time Operating System (RTOS) - @subpage ports_os "3rd-Party OS Ports" adapt QP/C to run on top of a 3rd-Party Operating System (OS), such as @ref win32 "Windows" or @ref posix "Linux". - @section ports_code Port Code Structure Starting with QP/C release 5.4.0, **all** available ports are bundled into the QP/C download, as opposed to being distributed as separate QP Development Kits (QDKs). The main benefit is of this approach is that it greatly reduces chances of mistakes in combining the mainline QP/C code with various QDKs. The downside is that the QP/C distribution becomes quite large and that ports cannot be added or updated independently from the QP/C baseline code. @@ -25,7 +26,7 @@ All ports are located in sub-directories of the portsarm-cm/ — Native ports for ARM-Cortex-M (bare-metal)       A
    • -
    • qk/ — Port to the @ref qk "preemptive QK kernel" +
    • qk/ — Port to the @ref srs_qk "preemptive QK kernel"
      • arm — Port to ARM-KEIL toolset @@ -37,7 +38,7 @@ All ports are located in sub-directories of the portsti — Port to TI/CCS toolset
      -
    • qv/ — Port to the @ref qv "cooperative QV kernel" +
    • qv/ — Port to the @ref srs_qv "cooperative QV kernel"
      • arm — Port to ARM-KEIL toolset @@ -49,7 +50,7 @@ All ports are located in sub-directories of the portsti — Port to TI/CCS toolset
      -
    • qxk/ — Port to the @ref qxk "blocing QXK kernel" +
    • qxk/ — Port to the @ref srs_qxk "blocing QXK kernel"
      • arm — Port to ARM-KEIL toolset @@ -58,12 +59,10 @@ All ports are located in sub-directories of the ports
      • iar — Port to IAR toolset
      • -
      • ti — Port to TI/CCS toolset -
    -
  • ucos-ii/ — Port to uCOS-II (3rd-party RTOS)       B +
  • uc-os2/ — Port to uc-os2 (3rd-party RTOS)       B
    • arm-cm — Port to ARM-Cortex-M @@ -110,7 +109,7 @@ All ports are located in sub-directories of the portsA **Native Ports** are located in sub-directories named after the CPU architecture, such as arm-cm for ARM Cortex-M. Under that directory, the sub-directories qk and qv contain ports for the @ref comp_qk "QK" and @ref comp_qv "QV" kernels, respectively.
    • -
    • B **Ports for 3rd-party RTOS** are located in sub-directories named after the RTOS, such as ucos-ii for uCOS-II RTOS. Under that directory, the sub-directories, such as arm-cm, contain examples for the specified CPU architecture, such as ARM Cortex-M here. +
    • B **Ports for 3rd-party RTOS** are located in sub-directories named after the RTOS, such as uc-os2 for uc-os2 RTOS. Under that directory, the sub-directories, such as arm-cm, contain examples for the specified CPU architecture, such as ARM Cortex-M here.
    • C **Ports for 3rd-party OS** are located in sub-directories named after the OS, such as win32 for the Win32 API (Windows OS). (NOTE: The builds for desktop operating systems, such as Windows or Linux contain the pre-build QP libraries for the Debug, Release, and Spy build configurations). @@ -120,6 +119,108 @@ All ports are located in sub-directories of the portsports folder may seem daunting. However, knowing the structure of the ports folder, you can simply **delete** the sub-directories that are not interesting to you. - -@next{ports_native} +@nav_next{ports_lint} +*/ +/*##########################################################################*/ +/*! @page ports_lint PC-Lint-Plus + +![PC-Lint Plus](logo_pclintplus.jpg) + +The QP/C distribution contains a "port" to PC-Lint-Plus static analysis tool from Gimpel Software (now Vector), which is a static analysis tool for C and C++ with one of the longest track records and best value of the money in the industry. The "PC-Lint-Plus port" allows you to statically analyze the QP/C source code and facilitates static analysis of your **application code** based on QP/C. + +The QP/C "port" to PC-Lint-Plus is located in the directory qpc/ports/lint-plus and includes also lint configuration files, as well as an example of "linting" application code in the directory qpc/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus. The following listing describes the most important files in these three directories. + +@code{.x} + qpc\ - QP/C installation directory + +-ports/ - QP/C ports directory + | +-lint-plus/ - QP/C "port" to PC-Lint-Plus + | | +-16bit/ - QP/C++ "port" to 16-bit CPUs + | | | +-cpu.lnt - Lint options for a 16-bit CPU + | | | +-stdint.h - Standard exact-width integers for a 16-bit CPU + | | +-32bit/ - QP/C++ "port" to 32-bit CPUs + | | | +-cpu.lnt - Lint options for a 32-bit CPU + | | | +-stdint.h - Standard exact-width integers for a 32-bit CPU + | | +-qk/ - QP/C port with the QK kernel + | | +-qv/ - QP/C port with the QV kernel + | | +-qxk/ - QP/C port with the QXK kernel + | | +-au-ds.lnt - Dan Saks recommendations + | | +-au-misra3.lnt - MISRA-C:2012 compliance checks + | | +-au-misra3-amd1.lnt - MISRA-C:2012-Amendment-1 additional checks + | | +-qpc.lnt - PC-Lint-Plus options for QP/C applications + | | +-std.lnt - Standard PC-Lint-Plus settings recommended by Quantum Leaps + | | +-lin.bat - Batch file to invoke PC-Lint-Plus to run analysis of QP/C code + | | +-options.lnt - PC/Lint-Plus options for "linting" QP/C source code + | | +-lint_qf.log - PC/Lint-Plus output for the QEP/QF components of QP/C + | | +-lint_qs.log - PC/Lint-Plus output for the QS component of QP/C + | | +-lint_qv.log - PC/Lint-Plus output for the QV component of QP/C + | | +-lint_qk.log - PC/Lint-Plus output for the QK component of QP/C + | | +-lint_qxk.log - PC/Lint-Plus output for the QXK component of QP/C + | | +-qep_port.h - QEP component "port" to a "generic C compiler" + | | +-stdbool.h - Standard Boolean type and constants for a "generic C compiler" + | + +-examples\ - QP/C examples directory (application) + | +-arm-cm\ - QP/C examples for ARM Cortex-M + | | +-dpp_ek-tm4c123gxl\ - DPP example on the EK-TM4C123GLX board + | | | +-lint-plus\ - directory for linting the application + | | | | +-lin.bat - Batch to run PC-Lint-Plus analysis of application code + | | | | +-options.lnt - PC-Lint-Plus options for "linting" of application code +@endcode + + +@section lint_qpc Linting the QP/C Source Code +The directory qpc/ports/lint-plus (see listing above) contains also the **lin.bat** batch file for "linting" the QP/C source code. The `lin.bat` batch file invokes PC-Lint-Plus and generates the lint output files. As shown in the listing above, the lint output is collected into four text files `lint_qf.log`, `lint_qs.log`, `lint_qk.log`, `lint_qv.log`, and `lint_qs.log`, for QEP/QF, QK, QV, QXK and QS components of the QP/C framework, respectively. + +@note +In order to execute the `lin.bat` file on your system, you might need to adjust the symbol `PCLP_DIR` at the top of the batch file, to the PC-Lint-Plus installation directory on your computer. + +@remarks +The `lin.bat` batch file invoked without any command-line options checks the QP/C code in the ::Q_SPY build configuration with software tracing enabled. However, by the nature of software tracing, the ::Q_SPY configuration transgresses many more MISRA-C rules than the standard configuration. However, the ::Q_SPY configuration is never used for production code, so the MISRA-C compliance of the QP/C framework should not be judged by the deviations that happen only in the ::Q_SPY configuration. + + +According to the PC-Lint-Plus guidelines, the `lin.bat` uses two option files: the `qpc.lnt` configuration file discussed before and the `options.lnt` configuration file that covers all deviations from the MISRA-C rules **within the QP/C source code**. These deviations are intentionally localized to QP/C code and are independent from your **application-level** code. In other words, a MISRA-C deviation present in the QP/C code does **not** mean that such deviation is somehow allowed or its detection is somehow suppressed in the **application-level** code. This is because the the `options.lnt` configuration file for internals of QP/C is **not** used to "lint" the application-level code. + + +@section lint_app Linting QP/C Application Code +The QP/C baseline code contains an example of MISRA-C compliance checking with PC-Lint-Plus: the DPP example for the EK-TM4C123GLX Cortex-M4F board, located in the directory qpc/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus. The PC-Lint-Plus analysis is very simple and requires invoking the **lin.bat** file. + +@note +In order to execute the **lin.bat** file on your system, you might need to adjust the symbol `PCLP_DIR` at the top of the batch file, to the PC-Lint-Plus installation directory on your computer. You + + +The `lint-plus` subdirectory contains also the local version of the `options.lnt` configuration file with the PC-Lint-Plus options specific to linting the application. Here, you might include linting options for your specific compiler, as described in the "PC-Lint-Plus Manual", Chapter 2 "Installation and Configuration". + + +@section lint_options Structure of PC-Lint-Plus Options for QP/C +PC-Lint-Plus has several places where it reads its currently valid options: +- From special PC-Lint-Plus option files (usually called `*.lnt`) +- From the command line +- From within the special lint-comments in the source code modules (not recommended) + +The QP/C source code and example application code has been "linted" only by means of the first alternative (option files) with possibility of adding options via command line. The third alternative--lint comments--is not used and Quantum Leaps does not recommend this alternative. + +@note +The QP/C source code is completely free of lint comments, which are viewed as a contamination of the source code. + +The structure of the PC-Lint-Plus option files used for "linting" QP/C follows the Gimpel Software guidelines for configuring PC-Lint-Plus (See Section 2 "Configuration" in the *PC-Lint-Plus Manual*). The design and grouping of the lint options also reflects the fact that static code analysis of a software framework, such as QP/C, has really two major aspects. First, the source code of the framework itself has to be analyzed. But even more important and helpful to the users of the framework is providing the infrastructure to effectively analyze the application-level code based on the framework. With this in mind, the PC-Lint-Plus options for static analysis of QP/C are divided into two groups, located in directories qpc/include and qpc/ports/lint. These two groups are for analyzing QP/C **applications** and QP/C **source code**, respectively. + +As shown in the PC-Lint-Plus "port" files description, the directory qpc/include, contains the PC-Lint-Plus options for "linting" the application code along with all platform-independent QP/C header files required by the applications. This collocation of lint options with header files simplifies "linting", because specifying just `-iqpc/include` include directory to PC-Lint-Plus accomplishes both inclusion of QP/C header files and PC-Lint-Plus options. +Note that the `qpc/include` directory contains all PC-Lint-Plus option files used in "linting" the code, including the standard MISRA-C:2012 `au-misr3.lnt` option file as well as Dan Saks' recommendations `au-ds.lnt`, which are copied from the PC-Lint-Plus distribution. This design freezes the lint options for which the compliance has been checked. + + +@subsection lint_std_lnt The std.lnt option file +According to the Gimpel Software *PC-Lint-Plus Configuration Guidelines*, the file `qpc/include/std.lnt` file, contains the top-level options, which Quantum Leaps recommends for all projects. These options include the formatting of the PC-Lint-Plus messages and making two passes to perform better cross-module analysis. However, the most important option is `-restore_at_end`, which has the effect of surrounding each source file with options `-save` and `-restore`. This precaution prevents options from "bleeding" from one file to another. + +Top-level option file std.lnt +@include std.lnt + + +@subsection lint_qpc_lnt The qpc.lnt option file +The most important file for "linting" QP/C applications is the **qpc.lnt** option file. This file handles all deviations from the MISRA-C:2012 rules, which might arise at the application-level code from the use of the QP/C framework. In other words, the **qpc.lnt** option file allows completely clean "linting" of the application-level code, as long as the application code does not violate any of the MISRA-C:2012 rules. + +At the same time, the **qpc.lnt** option file has been very carefully designed not to suppress any MISRA-C:2012 rule checking outside the very specific context of the QP/C API. In other words, the qpc.lnt option file still supports 100% of the MISRA-C:2012 rule checks that PC-Lint-Plus is capable of performing. + +@remarks +For example, for reasons explained in Section 5.10 of the "QP/C MISRA Compliance Matrix", QP/C extensively uses function-like macros, which deviates from the MISRA-C:2012 advisory Rule 4.9 and which PC-Lint-Plus checks with the warning 9026. However, instead of suppressing this warning globally (with the -e9096 directive), the qpc.lnt option file suppresses warning 9096 only for the specific QP function-like macros that are visible to the application level. So specifically, the qpc.lnt file contains directives `-esym(9026, Q_TRAN, Q_SUPER, ...)`, which suppresses the warning only for the specified macros, but does not disable checking of any other macros in the application-level code. + +@nav_next{ports_native} */ diff --git a/doxygen/ports_arm-cm.dox b/doxygen/ports_arm-cm.dox index a7c91478..8d6619bd 100644 --- a/doxygen/ports_arm-cm.dox +++ b/doxygen/ports_arm-cm.dox @@ -1,14 +1,7 @@ /*##########################################################################*/ /*! @page arm-cm ARM Cortex-M -@htmlonly - -@endhtmlonly - -@tableofcontents - -

      This section describes the QP™ ports to the ARM Cortex-M processor family (Cortex M0/M0+/M3/M4/M7/M33). Three main implementation options are covered: the @subpage arm-cm_qv "cooperative, priority-based QV kernel", the @subpage arm-cm_qk "preemptive, run-to-completion QK kernel", and the @subpage arm-cm_qxk "preemptive, dual-mode blocking QXK kernel". Additionally, the use of the VFP (floating point coprocessor) in the M4F/M7 CPUs is explained as well. This document assumes QP version 7.x or higher. -

      +This section describes the QP™ ports to the ARM Cortex-M processor family (Cortex M0/M0+/M3/M4/M7/M33). Three main implementation options are covered: the @subpage arm-cm_qv "cooperative, priority-based QV kernel", the @subpage arm-cm_qk "preemptive, run-to-completion QK kernel", and the @subpage arm-cm_qxk "preemptive, dual-mode blocking QXK kernel". Additionally, the use of the VFP (floating point coprocessor) in the M4F/M7/M33 CPUs is explained as well. This document assumes QP version 7.x or higher. @note To focus the discussion, this section references the **GNU-ARM toolchain**, the EK-TM4C123GXL (ARM Cortex-M4F) and the Eclipse-based IDE (CCS from Texas Instruments). However, the general implementation strategy applies equally to all toolchains for ARM Cortex-M, such as **ARM-KEIL**, **IAR EWARM**, **GNU-ARM** and **TI-ARM**, which are all supported as well. The QP code downloads contain also examples for other boards, such as STM32 Nucleo, NXP mbed-1768, SilLabs Gecko and others. @@ -18,69 +11,48 @@ To focus the discussion, this section references the **GNU-ARM toolchain**, the @section arm-cm_files Directories and Files The QP ports to ARM Cortex-M are available in the standard QP distribution. Specifically, the ARM Cortex-M ports are placed in the following directories: -
        -
      • /pors/arm-cm/ -
      • -
          -
        • qv/ — QV ports -
        • -
            -
          • arm/ — ARM-KEIL toolchain -
          • -
          • armclang/ — ARM-KEIL toolchain CLANG/LLVM compiler -
          • -
          • gnu/ — GNU-ARM toolchain -
              -
            • qep_port.h — QEP port header -
            • -
            • qf_port.h — QF port header -
            • -
            • qv_port.h — QV port header -
            • -
            • qv_port.c/.cpp — QV port implementation -
            • -
            -
          • -
          • iar/ — IAR-EWARM toolchain -
          • -
          -
        • qk/ — QK ports -
        • -
            -
          • arm/ — ARM-KEIL toolchain -
          • -
          • armclang/ — ARM-KEIL toolchain CLANG/LLVM compiler -
          • -
          • gnu/ — GNU-ARM toolchain -
          • -
          • iar/ — IAR-EWARM toolchain -
          • -
          -
        • qxk/ — QXK ports" -
        • -
            -
          • arm/ — ARM-KEIL toolchain -
          • -
          • armclang/ — ARM-KEIL toolchain CLANG/LLVM compiler -
          • -
          • gnu/ — GNU-ARM toolchain -
          • -
          • iar/ — IAR-EWARM toolchain -
          • -
          -
        • qutest/QUTest Unit Testing port to Cortex-M" -
        • -
        -
      +@verbatim +qpc/ports/arm-cm - QP/C ports to ARM Cortex-M +├───qk - QP/C ports to QK preemptive kernel +│ ├───armclang - ports for ARM-CLANG (LLVM) +│ │ ├───qep_port.h - QEP port +│ │ ├───qf_port.h - QF ports +│ │ ├───qk_port.h - QK ports +│ │ └───qk_port.c - QK port implementation +│ ├───gnu - ports for GNU-ARM +│ │ └───... +│ └───iar - ports for IAR EWARM +│ │ └───... +├───qutest - QP/C ports to QUTest testing harness +├───qv - QP/C ports to QV cooperative kernel +│ ├───armclang - ports for ARM-CLANG (LLVM) +│ │ ├───qep_port.h - QEP port +│ │ ├───qf_port.h - QF ports +│ │ ├───qk_port.h - QK ports +│ │ └───qk_port.c - QK port implementation +│ ├───gnu - ports for GNU-ARM +│ │ └───... +│ └───iar - ports for IAR EWARM +│ │ └───... +└───qxk +│ ├───armclang - ports for ARM-CLANG (LLVM) +│ │ ├───qep_port.h - QEP port +│ │ ├───qf_port.h - QF ports +│ │ ├───qk_port.h - QK ports +│ │ └───qk_port.c - QK port implementation +│ ├───gnu - ports for GNU-ARM +│ │ └───... +│ └───iar - ports for IAR EWARM +│ │ └───... +@endverbatim @section arm-cm_int Interrupts in the QP Ports to ARM Cortex-M The QP real-time framework, like any real-time kernel, needs to disable interrupts in order to access critical sections of code and re-enable interrupts when done. This section describes the general policy used in the ARM Cortex-M ports of all built-in real time kernels in QP, such as QV, QK, and QXK. -
      @subsection arm-cm_kernel-aware "Kernel-Aware" and "Kernel-Unaware" Interrupts -The QP ports to ARM Cortex-M3/M4/M7 **never completely disables interrupts**, even inside the critical sections. On Cortex-M3/M4/M7 (ARMv7-M architecture), the QP port disables interrupts **selectively** using the BASEPRI register. This policy divides interrupts into "kernel-unaware" interrupts, which are never disabled, and "kernel-aware" interrupts, which are disabled in the QP critical sections. +The QP ports to ARMv7M or higher architectures **never completely disables interrupts**, even inside the critical sections. On ARMv7M or higher architectures, the QP port disables interrupts **selectively** using the BASEPRI register. This policy divides interrupts into "kernel-unaware" interrupts, which are never disabled, and "kernel-aware" interrupts, which are disabled in the QP critical sections. @note The BASEPRI register is not implemented in the ARMv6-M architecture (Cortex-M0/M0+), so Cortex-M0/M0+ CPUs need to use the PRIMASK register to disable interrupts globally. In other words, in the QP ports to Cortex-M0/M0+, all interrupts are "kernel-aware". @@ -92,11 +64,12 @@ Only "kernel-aware" interrupts are allowed to call QP services. "Kernel-unaware" As illustrated in the figures below, the number of interrupt priority bits actually available is implementation dependent, meaning that the various ARM Cortex-M silicon vendors can provide different number of priority bits, varying from just 3 bits (which is the minimum for ARMv7-M architecture) up to 8 bits. For example, the TI Tiva-C microcontrollers implement only 3 priority bits (see figure below). -@image html arm-cm_int3bit.png "Kernel-aware and Kernel-unaware interrupts with 3 priority bits +![Kernel-aware and Kernel-unaware interrupts with 3 priority bits](arm-cm_int3bit.png) -On the other hand, the STM32 MCUs implement 4 priority bits (see figure below). The CMSIS standard provides the macro __NVIC_PRIO_BITS, which specifies the number of NVIC priority bits defined in a given ARM Cortex-M implementation. -@image html arm-cm_int4bit.png "Kernel-aware and Kernel-unaware interrupts with 4 priority bits +On the other hand, the STM32 MCUs implement 4 priority bits (see figure below). The CMSIS standard provides the macro **NVIC_PRIO_BITS**, which specifies the number of NVIC priority bits defined in a given ARM Cortex-M implementation. + +![Kernel-aware and Kernel-unaware interrupts with 4 priority bits](arm-cm_int4bit.png) Another important fact to note is that the ARM Cortex-M core stores the interrupt priority values in the *most significant bits* of its eight bit interrupt priority registers inside the NVIC (Nested Vectored Interrupt Controller). For example, if an implementation of a ARM Cortex-M microcontroller only implements three priority bits, then these three bits are shifted to occupy bits five, six and seven respectively. The unimplemented bits can be written as zero or one and always read as zero. @@ -105,24 +78,21 @@ And finally, the NVIC uses an inverted priority numbering scheme for interrupts, @note Starting with QP 5.9.x, the QF_init() call sets interrupt priority of all IRQs to the "kernel aware" value QF_BASEPRI. Still, it is highly recommended to set the priority of all interrupts used by an application **explicitly**, preferably in the `QF_onStartup()`. - @attention Some 3rd-party libraries (e.g., STM32Cube) change the interrupt priorities and sometimes priority grouping internally and unexpectedly, so care must be taken to change the priorities back to the appropriate values right before running the application. - -The CMSIS provides the function @c NVIC_SetPriority() which you should use to set priority of every interrupt. +The CMSIS provides the function `NVIC_SetPriority()` which you should use to set priority of every interrupt. @note The priority scheme passed to `NVIC_SetPriority()` is different again than the values stored in the NVIC registers, as shown in the figures above as "CMSIS priorities" -
      @subsection arm-cm_int-assign Assigning Interrupt Priorities -The @ref exa_arm-cm "example projects" included in the QP distribution the recommended way of assigning interrupt priorities in your applications. The initialization consist of two steps: (1) you enumerate the "kernel-unaware" and "kernel-aware" interrupt priorities, and (2) you assign the priorities by calling the @c NVIC_SetPriority() CMSIS function. The following snippet of code illustrates these steps with the explanation section following immediately after the code. +The @ref exa_arm-cm "example projects" included in the QP distribution the recommended way of assigning interrupt priorities in your applications. The initialization consist of two steps: (1) you enumerate the "kernel-unaware" and "kernel-aware" interrupt priorities, and (2) you assign the priorities by calling the `NVIC_SetPriority()` CMSIS function. The following snippet of code illustrates these steps with the explanation section following immediately after the code. @anchor arm-cm_int-assign-code Listing: Assigning the interrupt priorities (see file bsp.c in the example projects) -@code{c} +@code{.c} /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority(). * DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE! @@ -166,48 +136,48 @@ The @ref exa_arm-cm "example projects" included in the QP distribution the recom } @endcode -
        -
      • 1 +
        +
        1
        The enumeration @c KernelUnawareISRs lists the priority numbers for the "kernel-unaware" interrupts. These priorities start with zero (highest possible). The priorities are suitable as the argument for the @c NVC_SetPriority() CMSIS function. +
        +> NOTE: The NVIC allows you to assign the same priority level to multiple interrupts, so you can have more ISRs than priority levels running as "kernel-unaware" or "kernel-aware" interrupts. -> NOTE: The NVIC allows you to assign the same priority level to multiple interrupts, so you can have more ISRs than priority levels running as "kernel-unaware" or "kernel-aware" interrupts. - -
      • -
      • 2 + +
        2
        The last value in the enumeration MAX_KERNEL_UNAWARE_CMSIS_PRI keeps track of the maximum priority used for a "kernel-unaware" interrupt. -
      • -
      • 3 + +
        3
        The compile-time assertion ensures that the "kernel-unaware" interrupt priorities do not overlap the "kernel-aware" interrupts, which start at QF_AWARE_ISR_CMSIS_PRI. -
      • -
      • 4 + +
        4
        The enumeration KernelAwareISRs lists the priority numbers for the "kernel-aware" interrupts. -
      • -
      • 5 + +
        5
        The "kernel-aware" interrupt priorities start with the QF_AWARE_ISR_CMSIS_PRI offset, which is provided in the qf_port.h header file. -
      • -
      • 6 + +
        6
        The last value in the enumeration MAX_KERNEL_AWARE_CMSIS_PRI keeps track of the maximum priority used for a "kernel-aware" interrupt. -
      • -
      • 7 + +
        7
        The compile-time assertion ensures that the "kernel-aware" interrupt priorities do not overlap the lowest priority level reserved for the PendSV exception. -
      • -
      • 8 + +
        8
        The QF_onStartup() callback function is where you set up the interrupts. -
      • -
      • 9 -This call to the CMIS function @c NVIC_SetPriorityGrouping() assigns all the priority bits to be preempt priority bits, leaving no priority bits as subpriority bits to preserve the direct relationship between the interrupt priorities and the ISR preemption rules. This is the default configuration out of reset for the ARM Cortex-M3/M4 cores, but it can be changed by some vendor-supplied startup code. To avoid any surprises, the call to NVIC_SetPriorityGrouping(0U) is recommended. -
      • -
      • 10-11 -The interrupt priories fall all interrupts ("kernel-unaware" and "kernel-aware" alike) are set explicitly by calls to the CMSIS function @c NVIC_SetPriority(). -
      • -
      • 12 + +
        9
        +This call to the CMIS function `NVIC_SetPriorityGrouping()` assigns all the priority bits to be preempt priority bits, leaving no priority bits as subpriority bits to preserve the direct relationship between the interrupt priorities and the ISR preemption rules. This is the default configuration out of reset for the ARM Cortex-M3/M4 cores, but it can be changed by some vendor-supplied startup code. To avoid any surprises, the call to `NVIC_SetPriorityGrouping(0U)` is recommended. +
        +
        10-11
        +The interrupt priories fall all interrupts ("kernel-unaware" and "kernel-aware" alike) are set explicitly by calls to the CMSIS function `NVIC_SetPriority()`. +
        +
        12
        All used IRQ interrupts need to be explicitly enabled by calling the CMSIS function. -
      • -
      + + -
      -@subsection arm-cm_int-fpu Interrupts and the FPU (Cortex-M4F/M7) -The QP ports described in this section support also the ARM Cortex-M4F/M7. Compared to all other members of the Cortex-M family, these cores includes the single precision variant of the ARMv7-M Floating-Point Unit (Fpv4-SP). The hardware FPU implementation adds an extra floating-point register bank consisting of S0-S31 and some other FPU registers. This FPU register set represents additional context that need to be preserved across interrupts and thread switching (e.g., in the preemptive QK kernel). + +@subsection arm-cm_int-fpu Interrupts and the FPU (ARMv7M or higher architectures) +The QP ports described in this section support also the ARMv7M or higher architectures. Compared to all other members of the Cortex-M family, these cores includes the single precision variant of the ARMv7-M Floating-Point Unit (Fpv4-SP). The hardware FPU implementation adds an extra floating-point register bank consisting of S0-S31 and some other FPU registers. This FPU register set represents additional context that need to be preserved across interrupts and thread switching (e.g., in the preemptive QK kernel). The ARM VFP has a very interesting feature called **lazy stacking** [@ref ARM-AN298]. This feature avoids an increase of interrupt latency by skipping the stacking of floating-point registers, if not required, that is: @@ -221,7 +191,6 @@ All built-in kernels in QP are designed to take advantage of the lazy stacking f @section arm-cm_ref References - @anchor ARM-AN298 - **[ARM AN298]** ARM Application Note 298 "Cortex-M4(F) Lazy Stacking and Context Switching", ARM 2012 @@ -236,10 +205,8 @@ All built-in kernels in QP are designed to take advantage of the lazy stacking f /*##########################################################################*/ /*! @page arm-cm_qv Cooperative QV Kernel -@tableofcontents +The non-preemptive, cooperative QV kernel executes active objects one at a time, with priority-based scheduling performed after run-to-completion (RTC) processing of each event. Due to naturally short duration of event processing in state machines, the simple QV kernel is often adequate for many real-time systems. (NOTE: Long RTC steps can be often broken into shorter pieces by means of the "Reminder" state pattern [@ref Reminder]) -

      The non-preemptive, cooperative QV kernel executes active objects one at a time, with priority-based scheduling performed after run-to-completion (RTC) processing of each event. Due to naturally short duration of event processing in state machines, the simple QV kernel is often adequate for many real-time systems. (NOTE: Long RTC steps can be often broken into shorter pieces by means of the "Reminder" state pattern [@ref Reminder]) -

      @remarks In the QV port, the only components requiring platform-specific porting are QF and QV itself. The other two components: QEP and QS require merely recompilation and will not be discussed here. With the QV port you're not using the QK or QXK kernels. The QV port to ARM Cortex-M is located in the folder /ports/arm-cm/qv/. @@ -255,7 +222,7 @@ The cooperative QV kernel works essentially as the traditional foreground-backgr 3. QV uses only the Main Stack Pointer. The Process Stack Pointer is not used and is not initialized. 4. ARM Cortex-M enters interrupt context without disabling interrupts (without setting the PRIMASK bit or the BASEPRI register). Generally, you should not disable interrupts inside your ISRs. In particular, the QP services QF_PUBLISH(), QF_TICK_X(), and QACTIVE_POST() should be called with **interrupts enabled**, to avoid nesting of critical sections. - +
      > NOTE: If you don't wish an interrupt to be preempted by another interrupt, you can always prioritize that interrupt in the NVIC to a higher level (use a lower numerical value of priority). 5. The `QF_init()` function calls the function `QV_init()` to set the interrupt priority of all IRQs available in the MCU to the safe value of @ref QF_BASEPRI "QF_BASEPRI" (for ARM-v7 architecture). @@ -276,19 +243,17 @@ The QEP header file for the ARM Cortex-M port is located in `/ports/arm-cm/qv/gnu/qf_port.h`. This file specifies the interrupt disabling policy (QF critical section) as well as the configuration constants for QF (see Chapter 8 in [PSiCC2]). @note The ARM Cortex-M allows you to use the simplest "unconditional interrupt disabling"� policy (see Section 7.3.2 in [PSiCC2]), because ARM Cortex-M is equipped with the standard nested vectored interrupt controller (NVIC) and generally runs ISRs with interrupts enabled (so the body of an ISR is not a critical section). - The following listing shows the `qf_port.h` header file for ARM Cortex-M with the GNU-ARM toolchain. Other toolchains use slightly different conditional compilation macros to select the Cortex-M variants, but implement the same policies. @anchor arm-cm_qf_port_h-code Listing: The qf_port.h header file for ARM Cortex-M -@code{c} +@code{.c} /* The maximum number of active objects in the application, see NOTE1 */ [1] #define QF_MAX_ACTIVE 32 @@ -354,92 +319,99 @@ The following listing shows the `qf_port.h` header file for ARM Cortex-M with th #include "qf.h" /* QF platform-independent public interface */ @endcode -
        -
      • 1 +
        +
        1
        The #QF_MAX_ACTIVE specifies the maximum number of active object priorities in the application. You always need to provide this constant. Here, #QF_MAX_ACTIVE is set to 32, but it can be increased up to the maximum limit of 63 active object priorities in the system. - +
        > NOTE: The `qf_port.h` header file does not change the default settings for all the rest of various object sizes inside QF. Please refer to Chapter 8 of [PSiCC2] for discussion of all configurable QF parameters. -
      • -
      • 2 -The #QF_MAX_TICK_RATE specifies the maximum number of clock tick rates for QP time events. If you don't need to specify this limit, in which case the default of a single clock rate will be chosen. -
      • -
      • 3 + + +
        2
        +The macro `QF_MAX_TICK_RATE` specifies the maximum number of clock tick rates for QP time events. If you do not need to specify this limit, in which case the default of a single clock rate will be chosen. +
        +
        3
        As described in the previous @ref arm-cm_int "Section", the interrupt disabling policy for the ARMv6-M architecture (Cortex-M0/M0+) is different than the policy for the ARMv7-M. In GNU-ARM, the macro `__ARM_ARCH` is defined as 6 for the ARMv6-M architecture (Cortex-M0/M0+), and 7 for ARMv7-M (Cortex-M3/M4/M4F). - +
        > NOTE: The `__ARM_ARCH` macro is specific to the GNU-ARM compiler. Other compilers for ARM Cortex-M provide different macros to detect the CPU type. -
      • -
      • 4-5 + + +
        4-5
        For the ARMv6-M architecture, the interrupt disabling policy uses the PRIMASK register to disable interrupts globally. The @c QF_INT_DISABLE() macro resolves in this case to the inline assembly instruction "CPSD i", which sets the PRIMASK. The @c QF_INT_ENABLE() macro resolves to the inline assembly instruction "CPSE i", which clears the PRIMASK. -
      • -
      • 6 + +
        6
        The #QF_CRIT_STAT_TYPE is NOT defined, meaning that the critical section uses the simple policy of "unconditional interrupt disablin". - +
        > NOTE: The "unconditional interrupt disabling" policy precludes nesting of critical sections, but this is not needed for ARM Cortex-M, because this CPU never disables interrupts, even when handling exceptions/interrupts. -
      • -
      • 7 + + +
        7
        The QF_CRIT_ENTRY() enters a critical section. Interrupts are disabled by setting the PRIMASK register. -
      • -
      • 8 + +
        8
        The QF_CRIT_EXIT() macro leaves the critical section. Interrupts are unconditionally re-enabled by clearing the PRIMASK register. -
      • -
      • 9 + +
        9
        For the ARMv6-M architecture, the `QF_AWARE_ISR_CMSIS_PRI` priority level is defined as zero, meaning that all interrupts are "kernel-aware", because all interrupt priorities are disabled by the kernel. -
      • -
      • 10 + +
        10
        The `QF_LOG2()` macro is defined as a call to the function `QF_qlog2()` ("quick log-base-2 logarithm"). This function is coded in hand-optimized assembly, which always takes only 14 CPU cycles to execute (see also label [23]). - +
        > NOTE: ARM Cortex-M0/M0+ does NOT implement the `CLZ` instruction. Therefore the log-base-2 calculation cannot be accelerated in hardware, as it is for ARM Cortex-M3 and higher. -
      • -
      • 11 + + +
        11
        For the ARMv7-M (Cortex-M3/M4/M4F) architecture... -
      • -
      • 12 + +
        12
        The `QF_PRIMASK_DISABLE()` macro resolves to the inline assembly instruction `CPSD i`, which sets the PRIMASK. -
      • -
      • 13 + +
        13
        The `QF_PRIMASK_ENABLE()` macro resolves to the inline assembly instruction `CPSE i`, which clears the PRIMASK. -
      • -
      • 14 -Interrupts are disabled by setting the BASEPRI register to the value defined in the `QF_BASEPRI` macro (see label [19]). This setting of the BASEPRI instruction `msr BASEPRI,...` is surrounded by setting and clearing the PRIMASK register, as a workaround a hardware problem in ARM Cortex-M7 core r0p1: + +
        14
        +Interrupts are disabled by setting the BASEPRI register to the value defined in the `QF_BASEPRI` macro (see label [19]). This setting of the BASEPRI instruction `msr BASEPRI,...` is surrounded by setting and clearing the PRIMASK register, as a workaround a hardware problem in ARMv7M or higher architectures core r0p1: +
        +> NOTE: The selective disabling of "QF-aware" interrupts with the BASEPRI register has a problem on ARMv7M or higher architectures core r0p1 (see [@ref ARM-EPM-064408], Erratum 837070). The workaround recommended by ARM is to surround `MSR BASEPRI,...` with the `CPSID i`/`CPSIE i` pair, which is implemented in the QF_INT_DISABLE() macro. This workaround works also for Cortex-M3/M4 cores. -> NOTE: The selective disabling of "QF-aware" interrupts with the BASEPRI register has a problem on ARM Cortex-M7 core r0p1 (see [@ref ARM-EPM-064408], Erratum 837070). The workaround recommended by ARM is to surround `MSR BASEPRI,...` with the `CPSID i`/`CPSIE i` pair, which is implemented in the QF_INT_DISABLE() macro. This workaround works also for Cortex-M3/M4 cores. -
      • -
      • 15 + +
        15
        The `QF_INT_ENABLE()` macro sets the BASEPRI register to zero, which disables BASEPRI interrupt masking. - +
        > NOTE: this method can never disable interrupt of priority 0 (highest). -
      • -
      • 16 + + +
        16
        The #QF_CRIT_STAT_TYPE is NOT defined, meaning that the critical section uses the simple policy of "unconditional interrupt disabling". - +
        > NOTE: The "unconditional interrupt disabling" policy precludes nesting of critical sections, but this is not needed for ARM Cortex-M, because this CPU never disables interrupts, even when handling exceptions/interrupts. -
      • -
      • 17 + + +
        17
        The QF_CRIT_ENTRY() enters a critical section. Interrupts are disabled with the macro `QF_INT_DISABLE()` defined at label [12]. -
      • -
      • 18 + +
        18
        The QF_CRIT_EXIT() macro leaves the critical section. Interrupts are unconditionally re-enabled with the macro `QF_INT_ENABLE()` defined at label [13]. -
      • -
      • 19 + +
        19
        @anchor QF_BASEPRI -The `QF_BASEPRI` value is defined such that it is the lowest priority for the minimum number of 3 priority-bits that the ARM7-M architecture must provide. This partitions the interrupts as "kernel-unaware" and "kernel-aware" interrupts, as shown in section @ref arm-cm_int-assign. -
      • -
      • 20 +The `QF_BASEPRI` value is defined such that it is the lowest priority for the minimum number of 3 priority-bits that the ARMv7M or higher architectures architecture must provide. This partitions the interrupts as "kernel-unaware" and "kernel-aware" interrupts, as shown in section @ref arm-cm_int-assign. + +
        20
        For the ARMv7-M architecture, the `QF_AWARE_ISR_CMSIS_PRI` priority level suitable for the CMSIS function `NVIC_SetPriority()` is determined by the `QF_BASEPRI` value. -
      • -
      • 21 + +
        21
        The macro `QF_LOG2()` is defined to take advantage of the CLZ instruction (Count Leading Zeroes), which is available in the ARMv7-M architecture. - +
        > NOTE: The `__builtin_cls()` intrinsic function is specific to the GNU-ARM compiler. Other compilers for ARM Cortex-M use different function names for this intrinsic function. -
      • -
      • 22 -The macro @c QF_CRIT_EXIT_NOP() provides the protection against merging two critical sections occurring back-to-back in the QP code. -
      • -
      • 23 -For ARMv6 architecture, the prototype of the quick, hand-optimized log-base-2 function is provided (see also label [10]). -
      • -
      + +
      22
      +The macro @c QF_CRIT_EXIT_NOP() provides the protection against merging two critical sections occurring back-to-back in the QP code. +
      +
      23
      +For ARMv6 architecture, the prototype of the quick, hand-optimized log-base-2 function is provided (see also label [10]). +
      + @section arm-cm_qv_port_h The qv_port.h Header File @@ -451,7 +423,7 @@ To avoid race conditions between interrupts waking up active objects and going t @anchor arm-cm_qv_port_h-code Listing: The qv_port.h header file for ARM Cortex-M -@code{c} +@code{.c} #ifdef ARM_ARCH_V6M /* Cortex-M0/M0+/M1 ? */ [1] #define QV_CPU_SLEEP() do { \ @@ -474,21 +446,19 @@ To avoid race conditions between interrupts waking up active objects and going t void QV_init(); #include "qv.h" /* QV platform-independent public interface */ - @endcode -
        -
      • 1 +
        +
        1
        For the ARMv6-M architecture, the macro `QV_CPU_SLEEP()` stops the CPU with the WFI instruction (Wait For Interrupt). After the CPU is woken up by an interrupt, interrupts are re-enabled with the PRIMASK. -
      • -
      • 2 -For the ARMv7-M architecture, the macro `QV_CPU_SLEEP()` first disables interrupts by setting the PRIMASK, then clears the BASEPRI to enable all "kernel-aware" interrupts and only then stops the CPU with the WFI instruction (Wait For Interrupt). After the CPU is woken up by an interrupt, interrupts are re-enabled with the PRIMASK. This sequence is necessary, because the ARM Cortex-M3/M4/M7 cores cannot be woken up by any interrupt blocked by the BASEPRI register. -
      • -
      • 2 + +
        2
        +For the ARMv7-M architecture, the macro `QV_CPU_SLEEP()` first disables interrupts by setting the PRIMASK, then clears the BASEPRI to enable all "kernel-aware" interrupts and only then stops the CPU with the WFI instruction (Wait For Interrupt). After the CPU is woken up by an interrupt, interrupts are re-enabled with the PRIMASK. This sequence is necessary, because the ARMv7M or higher architectures cannot be woken up by any interrupt blocked by the BASEPRI register. +
        +
        2
        The macro `QV_INIT()` is defined as a call to the `QV_init()` function, which means that this function will be called from `QF_init()`. The `QV_init()` function initializes all available IRQ priorities in the MCU to the safe value of @ref QF_BASEPRI "QF_BASEPRI". -
      • -
      - + + @section arm-cm_qv_port_c The qv_port.c Implementation File @@ -531,27 +501,26 @@ The QV implementation file for the ARM Cortex-M port is located in -
    • 1 +
      +
      1
      For the ARMv7-M architecture (Cortex-M3/M4/M7)... -
    • -
    • 2 + +
      2
      The exception priorities for User-Fault, Bus-Fault, and Mem-Fault are set to the value @ref QF_BASEPRI "QF_BASEPRI". -
    • -
    • 3 + +
      3
      The exception priority for SVCCall is set to the value @ref QF_BASEPRI "QF_BASEPRI". -
    • -
    • 4 + +
      4
      The exception priority for SysTick, PendSV, and Debug is set to the value @ref QF_BASEPRI "QF_BASEPRI". -
    • -
    • 5 + +
      5
      The number of implemented IRQs is read from the @c SCnSCB_ICTR register -
    • -
    • 6 + +
      6
      The interrupt priority of all implemented IRQs is set to the safe value @ref QF_BASEPRI "QF_BASEPRI" in a loop. -
    • -
    - + + @section arm-cm_qv-isr Writing ISRs for QV @@ -579,9 +548,9 @@ The following listing shows an example of the SysTick_Handler() ISR (from the DP The QP port to ARM Cortex-M complies with the CMSIS standard, which dictates the names of all exception handlers and IRQ handlers. +@section arm-cm_qv-fpu Using the FPU in the QV Port -@section arm-cm_qv-fpu Using the FPU in the QV Port (Cortex-M4F/M7) -If you have the Cortex-M4/M7 CPU and your application uses the hardware FPU, it should be enabled because it is turned off out of reset. The CMSIS-compliant way of turning the FPU on looks as follows: +If you use ARMv7M or higher CPU and your application uses the hardware FPU, it should be enabled because it is turned off out of reset. The CMSIS-compliant way of turning the FPU on looks as follows: @verbatim SCB->CPACR |= (0xFU << 20); @@ -594,7 +563,6 @@ The FPU must be enabled before executing any floating point instruction. An atte Depending on whether or not you use the FPU in your ISRs, the QV port allows you to configure the FPU in various ways, as described in the following sub-sections. -
    @subsection arm-cm_qv-fpu_noisr FPU NOT used in the ISRs If you use the FPU only at the thread-level (inside active objects) and none of your ISRs use the FPU, you can setup the FPU not to use the automatic state preservation and not to use the lazy stacking feature as follows: @@ -608,7 +576,6 @@ With this setting, the Cortex-M4F processor handles the ISRs in the exact-same w This FPU setting will lead to FPU errors, if any of the ISRs indeed starts to use the FPU -
    @subsection arm-cm_qv-fpu_isr FPU used in the ISRs If you use the FPU both at the thread-level (inside active objects) and in any of your ISRs as well, you should setup the FPU to use the automatic state preservation and the lazy stacking feature as follows: @@ -622,7 +589,6 @@ This will enable the lazy stacking feature of the Cortex-M4F/M7 processor [@ref As described in the ARM Application Note "Cortex-M4(F) Lazy Stacking and Context Switching" [@ref ARM-AN298], the FPU automatic state saving requires more stack plus additional CPU time to save the FPU registers, but only when the FPU is actually used. - @section arm-cm_qv-idle QV Idle Processing Customization in QV_onIdle() When no events are available, the non-preemptive QV kernel invokes the platform-specific callback function QV_onIdle(), which you can use to save CPU power, or perform any other "idle" processing (such as Quantum Spy software trace output). @@ -648,36 +614,33 @@ Because QV_onIdle() must enable interrupts internally, the signature of the func @endcode -
      -
    • 1 +
      +
      1
      The cooperative QV kernel calls the QV_onIdle() callback with interrupts disabled, to avoid race condition with interrupts that can post events to active objects and thus invalidate the idle condition.
    • -
    • 2 +
      2
      The sleep mode is used only in the non-debug configuration, because sleep mode stops CPU clock, which can interfere with debugging.
    • -
    • 3 +
      3
      The macro QV_CPU_SLEEP() is used to put the CPU to the low-power sleep mode safely. The macro QV_CPU_SLEEP() is defined in the qv_port.h header file for the QV kernel and depends on the interrupt disabling policy used.
    • -
    • 4 +
      4
      When a sleep mode is not used, the QV_onIdle() callback simply re-enables interrupts. -
    • -
    + + @next{arm-cm_qk} */ /*##########################################################################*/ /*! @page arm-cm_qk Preemptive Non-Blocking QK Kernel -@tableofcontents - -

    The @ref qk "preemptive, non-blocking QK kernel" is specifically designed to execute non-blocking active objects. QK runs active objects in the same way as prioritized interrupt controller (such as NVIC in ARM Cortex-M) runs interrupts using the **single stack** (MSP on Cortex-M). This section explains how the @ref qk "preemptive non-blocking QK kernel" works on ARM Cortex-M. +

    The @ref srs_qk "preemptive, non-blocking QK kernel" is specifically designed to execute non-blocking active objects. QK runs active objects in the same way as prioritized interrupt controller (such as NVIC in ARM Cortex-M) runs interrupts using the **single stack** (MSP on Cortex-M). This section explains how the @ref srs_qk "preemptive non-blocking QK kernel" works on ARM Cortex-M.

    @remarks In a QK port, the only components requiring platform-specific porting are QF and QV itself. The other two components: QEP and QS require merely recompilation and will not be discussed here. With the QV port you're not using the QV or QXK kernels. The QK port to ARM Cortex-M is located in the folder /ports/arm-cm/qk/. - @section arm-cm_qk-synopsis Synopsis of the QK Port on ARM Cortex-M The ARM Cortex-M architecture is designed primarily for the traditional real-time kernels that use multiple per-thread stacks. Therefore, implementation of the non-blocking, single-stack kernel like QK is a bit more involved on Cortex-M than other CPUs and works as follows: @@ -687,76 +650,76 @@ The ARM Cortex-M architecture is designed primarily for the traditional real-tim 3. ARM Cortex-M enters interrupt context without disabling interrupts (without setting the PRIMASK bit or the BASEPRI register). Generally, you should not disable interrupts inside your ISRs. In particular, the QP services QF_PUBLISH(), QF_TICK_X(), and QACTIVE_POST() should be called with interrupts enabled, to avoid nesting of critical sections. (NOTE: If you don’t wish an interrupt to be preempted by another interrupt, you can always prioritize that interrupt in the NVIC to a higher level -- use a lower numerical value of priority). +4. The QK port uses the PendSV exception (number 14) to perform asynchronous preemption (see Chapter 10 in @webref{psicc2, PSiCC2}). The startup code must initialize the Interrupt Vector Table with the addresses of @c PendSV_Handler() exception handler. +
    +> NOTE: QK uses only the CMSIS-compliant exception and interrupt names, such as `PendSV_Handler` -4. The QK port uses the PendSV exception (number 14) and the NMI exception (number 2) to perform asynchronous preemption and return to the preempted thread, respectively (see Chapter 10 in [PSiCC2]). The startup code must initialize the Interrupt Vector Table with the addresses of @c PendSV_Handler() and @c NMI_Handler() exception handlers. -@n -> NOTE: QK uses only the CMSIS-compliant exception and interrupt names, such as @c PendSV_Handler, @c NMI_Handler, etc.@n -> NOTE: The QK port specifically does **not** use the SVC exception (Supervisor Call). This makes the QK ports compatible with various "hypervisors" (such as mbed uVisor or Nordic SoftDevice), which use the SVC exception. +5. The QK port uses the NMI exception (number 2) or any unused IRQ interrupt to *return* to the preempted thread (see Chapter 10 in @webref{psicc2, PSiCC2}). The startup code must initialize the Interrupt Vector Table with the addresses of `NMI_Handler()` and `__IRQHandler()` exception handlers. +
    +> NOTE: In case the NMI exception is needed for something else, the QK allows the developers to configure any otherwise unused IRQ to be used instead. This is accomplished by the pair of macros: `QK_USE_IRQ_NUM` and `QK_USE_IRQ_HANDLER`. +
    +> NOTE: The QK port specifically does **not** use the SVC exception (Supervisor Call). This makes the QK ports compatible with various "hypervisors" (such as mbed uVisor or Nordic SoftDevice), which use the SVC exception. + +6. The QF_init() function calls the function QK_init() to set the priority of the PendSV exception to the lowest level in the whole system (0xFF). The function QK_init() additionally sets the interrupt priority of all IRQs available in the MCU to the safe value of @ref QF_BASEPRI "QF_BASEPRI" (for ARM-v7 architecture). + +7. It is strongly recommended that you do not assign the lowest priority (0xFF) to any interrupt in your application. With 3 MSB-bits of priority, this leaves the following 7 priority levels for you (listed from the lowest to the highest urgency): 0xC0, 0xA0, 0x80, 0x60, 0x40, 0x20, and 0x00 (the highest priority). + +8. Before returning, every "kernel aware" ISR must check whether an active object has been activated that has a higher priority than the currently running active object. If this is the case, the ISR must set the PensSV pending flag in the NVIC. All this is accomplished in the macro QK_ISR_EXIT(), which must be called just before exiting every ISRs. + +9. In ARM Cortex-M the whole prioritization of interrupts, including the PendSV exception, is performed entirely by the NVIC. Because the PendSV has the lowest priority in the system, the NVIC tail-chains to the PendSV exception only after exiting the last nested interrupt. + +10. The pushing of the 8 registers comprising the ARM Cortex-M interrupt stack frame upon entry to the to the preempted thread (NMI or IRQ) is wasteful in a single-stack kernel, but is necessary to perform full interrupt return to the preempted context through the exception return. -5. The QF_init() function calls the function QK_init() to set the priority of the PendSV exception to the lowest level in the whole system (0xFF). The function QK_init() additionally sets the interrupt priority of all IRQs available in the MCU to the safe value of @ref QF_BASEPRI "QF_BASEPRI" (for ARM-v7 architecture). - -6. It is strongly recommended that you do not assign the lowest priority (0xFF) to any interrupt in your application. With 3 MSB-bits of priority, this leaves the following 7 priority levels for you (listed from the lowest to the highest urgency): 0xC0, 0xA0, 0x80, 0x60, 0x40, 0x20, and 0x00 (the highest priority). - -7. Before returning, every "kernel aware" ISR must check whether an active object has been activated that has a higher priority than the currently running active object. If this is the case, the ISR must set the PensSV pending flag in the NVIC. All this is accomplished in the macro QK_ISR_EXIT(), which must be called just before exiting every ISRs. - -8. In ARM Cortex-M the whole prioritization of interrupts, including the PendSV exception, is performed entirely by the NVIC. Because the PendSV has the lowest priority in the system, the NVIC tail-chains to the PendSV exception only after exiting the last nested interrupt. - -9. The pushing of the 8 registers comprising the ARM Cortex-M interrupt stack frame upon entry to NMI exception is wasteful in a single-stack kernel, but is necessary to perform full interrupt return to the preempted context through the NMI's return. - - -
    @subsection arm-cm_qk-preempt Preemption Scenarios in QK on ARM Cortex-M - @anchor arm-cm_qk-arm-cm-fig -@image html qk_arm-cm.gif "Several preemption scenarios in QK" +![Several preemption scenarios in QK](qk_arm-cm.gif) -
      -
    • 0 +
      +
      0
      The timeline begins with the QK executing the idle loop. -
    • -
    • 1 + +
      1
      At some point an interrupt occurs and the CPU immediately suspends the idle loop, pushes the interrupt stack frame to the Main Stack and starts executing the ISR. -
    • -
    • 2 + +
      2
      The ISR performs its work, and in QK always must call the QK_ISR_EXIT() macro, which calls the QK scheduler (QK_sched()) to determine if there is a higher-priority AO to run. If so, the macro sets the pending flag for the PendSV exception in the NVIC. The priority of the PendSV exception is configured to be the lowest of all exceptions (0xFF), so the ISR continues executing and PendSV exception remains pending. At the ISR return, the ARM Cortex-M CPU performs tail-chaining to the pending PendSV exception. -
    • -
    • 3 + +
      3
      The PendSV exception synthesize an exception stack frame to return to the QK "activator" (QK_activate_()) to run this new thread. -> NOTE: The QK activator must run in the thread context, while PendSV executes in the exception context. The change of the context is accomplished by returning from the PendSV exception directly to the QK "activator". +> NOTE: The QK activator must run in the thread context, while PendSV executes in the exception context. The change of the context is accomplished by returning from the PendSV exception directly to the QK "activator". To return directly to the QK activator, PendSV synthesizes an exception stack frame, which contains the exception return address set to QK_activate_(). The QK activator activates the Low-priority thread (discovered by the QK scheduler QK_sched()). The QK activator enables interrupts and launches the Low-priority thread, which is simply a C-function call in QK. The Low-priority thread (active object) starts running. -
    • -
    • 4 + +
      4
      Some time later a low-priority interrupt occurs. The Low-priority thread is suspended and the CPU pushes the interrupt stack frame to the Main Stack and starts executing the ISR. -
    • -
    • 5 + +
      5
      Before the Low-priority ISR completes, it too gets preempted by a High-priority ISR. The CPU pushes another interrupt stack frame and starts executing the High-priority ISR. -
    • -
    • 6 + +
      6
      The High-priority ISR sets the pending flag for the PendSV exception by means of the QK_ISR_EXIT() macro. When the High-priority ISR returns, the NVIC does not tail-chain to the PendSV exception, because a higher-priority ISR than PendSV is still active. The NVIC performs an exception return to the preempted Low-priority interrupt, which finally completes. -
    • -
    • 7 + +
      7
      Upon the exit from the Low-priority ISR, it too sets the pending flag for the PendSV exception by means of the QK_ISR_EXIT() macro. The PendSV is already pended from the High-priority interrupt, so pending is again is redundant, but it is not an error. At the ISR return, the ARM Cortex-M CPU performs tail-chaining to the pending PendSV exception. -
    • -
    • 8 + +
      8
      The PendSV exception synthesizes an interrupt stack frame to return to the QK activator. The QK activator detects that the High-priority thread is ready to run and launches the High-priority thread (normal C-function call). The High-priority thread runs to completion and returns to the activator. -
    • -
    • 9 -The QK activator does not find any more higher-priority threads to execute and needs to return to the preempted thread. The only way to restore the interrupted context in ARM Cortex-M is through the interrupt return, but the thread is executing outside of the interrupt context (in fact, threads are executing in the Privileged Thread mode). The thread enters the Handler mode by pending the NMI exception. -> NOTE: The NMI exception is pended while interrupts are still disabled. This is not a problem, because NMI cannot be masked by disabling interrupts, so runs without any problems. -
    • -
    • 10 -The only job of the NMI exception is to discard its own interrupt stack frame, re-enable interrupts, and return using the interrupt stack frame that has been on the stack from the moment of thread preemption. -
    • -
    • 11 -The Low-priority thread, which has been preempted all that time, resumes and finally runs to completion and returns to the QK activator. The QK activaotr does not find any more threads to launch and causes the NMI exception to return to the preempted thread. -
    • -
    • 12 -The NMI exception discards its own interrupt stack frame and returns using the interrupt stack frame from the preempted thread context -
    • -
    - + +
    9
    +The QK activator does not find any more higher-priority threads to execute and needs to return to the preempted thread. The only way to restore the interrupted context in ARM Cortex-M is through the interrupt return, but the thread is executing outside of the interrupt context (in fact, threads are executing in the Privileged Thread mode). The thread enters the Handler mode by pending the NMI or IRQ exception. +
    +
    10
    +The only job of the NMI or IRQ exception is to discard its own interrupt stack frame, re-enable interrupts, and return using the interrupt stack frame that has been on the stack from the moment of thread preemption. +
    +
    11
    +The Low-priority thread, which has been preempted all that time, resumes and finally runs to completion and returns to the QK activator. The QK activaotr does not find any more threads to launch and causes the NMI or IRQ exception to return to the preempted thread. +
    +
    12
    +The NMI or IRQ exception discards its own interrupt stack frame and returns using the interrupt stack frame from the preempted thread context +
    + +
    @section arm-cm_qk-qf_port The qf_port.h Header File @@ -797,55 +760,50 @@ As any preemptive kernel, QK needs to be notified about entering the interrupt c #include "qk.h" /* QK platform-independent public interface */ @endcode -
      -
    • 1 +
      +
      1
      The macro @c QK_ISR_CONTEXT() returns true when the code executes in the ISR context and false otherwise. The macro takes advantage of the ARM Cortex-M register IPSR, which is non-zero when the CPU executes an exception (or interrupt) and is zero when the CPU is executing thread code. -> NOTE: QK needs to distinguish between ISR and thread contexts, because threads need to perform synchronous context switch (when a higher-priority thread becomes ready to run), while ISRs should not do that. -
    • -
    • 2 -The inline function @c QK_get_IPSR() obtains the IPSR register and returns it to the caller. This function is defined explicitly for the GNU-ARM toolchain, but many other toolchains provide this function as an intrinsic, built-in facility. -
    • -
    • 3 -The @c QK_ISR_ENTRY() macro notifies QK about entering an ISR. The macro is empty, because the determination of the ISR vs thread context is performed independently in the @c QK_ISR_CONTEXT() macro (see above). -
    • -
    • 4 -The @c QK_ISR_EXIT() macro notifies QK about exiting an ISR. -
    • -
    • 5 -Interrupts are disabled before calling QK scheduler. -
    • -
    • 6 -The QK scheduler is called to find out whether an active object of a higher priority than the current one needs activation. The @c QK_sched_() function returns non zero value if this is the case. -
    • -
    • 7 -If asynchronous preemption becomes necessary, the code sets the PENDSV Pend bit(28) in the ICSR register (Interrupt Control and State Register). The register is mapped at address 0xE000ED04 in all ARM Cortex-M cores. -
    • -
    • 8 -The interrupts are re-enabled after they have been disabled in step [5]. -> NOTE: Because the priority of the PendSV exception is the lowest of all interrupts, it is actually triggered only after all nested interrupts exit. The PendSV exception is then entered through the efficient **tail-chaining** process, which eliminates the restoring and re-entering the interrupt context. -
    • -
    +> NOTE: QK needs to distinguish between ISR and thread contexts, because threads need to perform synchronous context switch (when a higher-priority thread becomes ready to run), while ISRs should not do that. + +
    2
    +The inline function @c QK_get_IPSR() obtains the IPSR register and returns it to the caller. This function is defined explicitly for the GNU-ARM toolchain, but many other toolchains provide this function as an intrinsic, built-in facility. +
    +
    3
    +The @c QK_ISR_ENTRY() macro notifies QK about entering an ISR. The macro is empty, because the determination of the ISR vs thread context is performed independently in the @c QK_ISR_CONTEXT() macro (see above). +
    +
    4
    +The @c QK_ISR_EXIT() macro notifies QK about exiting an ISR. +
    +
    5
    +Interrupts are disabled before calling QK scheduler. +
    +
    6
    +The QK scheduler is called to find out whether an active object of a higher priority than the current one needs activation. The @c QK_sched_() function returns non zero value if this is the case. +
    +
    7
    +If asynchronous preemption becomes necessary, the code sets the PENDSV Pend bit(28) in the ICSR register (Interrupt Control and State Register). The register is mapped at address 0xE000ED04 in all ARM Cortex-M cores. +
    +
    8
    +The interrupts are re-enabled after they have been disabled in step [5]. +> NOTE: Because the priority of the PendSV exception is the lowest of all interrupts, it is actually triggered only after all nested interrupts exit. The PendSV exception is then entered through the efficient **tail-chaining** process, which eliminates the restoring and re-entering the interrupt context. + +
    + @section arm-cm_qk-qk_impl QK Port Implementation for ARM Cortex-M -The QK port to ARM Cortex-M requires coding the PendSV and NMI exceptions in assembly. This ARM Cortex-M-specific code, as well as QK initialization (@c QK_init()) is located in the file ­ports/arm-cm/­qk/­gnu/qk_port.c +The QK port to ARM Cortex-M requires coding the PendSV and NMI or IRQ exceptions in assembly. This ARM Cortex-M-specific code, as well as QK initialization (@c QK_init()) is located in the file ­ports/arm-cm/­qk/­gnu/qk_port.c @note The single assembly module `qk_port.s` contains common code for all Cortex-M variants (Architecture v6M and v7M) as well as options with and without the VFP. The CPU variants are distinguished by conditional compilation, when necessary. -
    @subsection arm-cm_qk_port-asm_init QK_init() Implementation - Listing: QK_init() function in qk_port.c file -@code{c} +@code{.c} [1] void QK_init(void) { - [2] #if (__ARM_ARCH != 6) /* NOT Cortex-M0/M0+/M1 (v6-M, v6S-M)? */ - - uint32_t n; - /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ @@ -858,55 +816,66 @@ The single assembly module `qk_port.s` contains common code for all Cortex-M var [5] SCB_SYSPRI[3] |= (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI; /* set all implemented IRQ priories to QF_BASEPRI... */ - [6] n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3); /* (# NVIC_PRIO registers)/4 */ - do { - --n; - [7] NVIC_IP[n] = (QF_BASEPRI << 24) | (QF_BASEPRI << 16) - | (QF_BASEPRI << 8) | QF_BASEPRI; - } while (n != 0); + [6] uint8_t nprio = (8U + ((*SCnSCB_ICTR & 0x7U) << 3U))*4; + for (uint8_t n = 0U; n < nprio; ++n) { + [7] NVIC_IP[n] = QF_BASEPRI; + } #endif /* NOT Cortex-M0/M0+/M1(v6-M, v6S-M) */ /* SCB_SYSPRI3: PendSV set to the lowest priority 0xFF */ [8] SCB_SYSPRI[3] |= (0xFFU << 16); + + #ifdef QK_USE_IRQ_NUM + /* The QK port is configured to use a given ARM Cortex-M IRQ # + * to return to thread mode (default is to use the NMI exception) + */ + [9] NVIC_IP[QK_USE_IRQ_NUM] = 0U; /* priority 0 (highest) */ +[10] NVIC_EN[QK_USE_IRQ_NUM / 32U] = (1U << (QK_USE_IRQ_NUM % 32U)); + #endif } @endcode -
      -
    • 1 +
      +
      1
      The QK_init() function is called from QF_init() to perform initialization specific to the QK kernel. -
    • -
    • 2 -If the ARM Architecture is NOT v6 (Cortex-M0/M0+), that is for Cortex-M3/M4/M7, the function initializes the exception priorities of PendSV and NMI as well as interrupt priorities of all IRQs available in a given MCU. (NOTE: for Cortex-M0/M0+, this initialization is not needed, as the CPU does not support the BASEPRI register and the only way to disable interrupts is via the PRIMASK register. In this case, all interrupts are "kernel-aware" and there is no need to initialize interrupt priorities to a safe value. -
    • -
    • 3 + +
      2
      +If the ARM Architecture is NOT v6 (Cortex-M0/M0+), that is for ARMv7M or higher architectures, the function initializes the exception priorities of PendSV and NMI as well as interrupt priorities of all IRQs available in a given MCU. (NOTE: for Cortex-M0/M0+, this initialization is not needed, as the CPU does not support the BASEPRI register and the only way to disable interrupts is via the PRIMASK register. In this case, all interrupts are "kernel-aware" and there is no need to initialize interrupt priorities to a safe value. +
      +
      3
      Exception priorities of Usage-fault, Bus-fault, and Memory-fault are set to @ref QF_BASEPRI "QF_BASEPRI". -
    • -
    • 4 + +
      4
      Exception priorities of SVCall is set to @ref QF_BASEPRI "QF_BASEPRI". -
    • -
    • 5 + +
      5
      Exception priorities of SysTick, PendSV and Debug are set to @ref QF_BASEPRI "QF_BASEPRI". - +
      > NOTE: the exception priority of PedSV is later changed to 0xFF in step [8] -
    • -
    • 6 + + +
      6
      The number of implemented interrupts is extraced fom SCnSCB_ICTR register. -
    • -
    • 7 + +
      7
      Exception priorities of all implemented interrupts are set to @ref QF_BASEPRI "QF_BASEPRI". -
    • -
    • 8 + +
      8
      Exception priority of PendSV is set to 0xFF, which is the lowest interrupt priority in the system. -
    • -
    + +
    9
    +In case a regular IRQ is configured for returning to the thread mode, the priority of the IRQ is set to zero (highest). +
    +
    10
    +In case a regular IRQ is configured for returning to the thread mode, the IRQ is enabled in the NVIC. +
    + -
    @subsection arm-cm_qk_port-asm_pendsv PendSV_Handler() Implementation - Listing: PendSV_Handler() and Thread_ret() functions in qk_port.c file -@code{c} +@code{.c} [1] __attribute__ ((naked)) [2] void PendSV_Handler(void) { [3] __asm volatile ( @@ -942,7 +911,7 @@ Exception priority of PendSV is set to 0xFF, which is the lowest interrupt prior * QK_activate_(). * * returns with interrupts DISABLED. - * NOTE: the QK activator is called with interrupts DISABLED and also + * NOTE: the QK activator is called with interrupts DISABLED and also */ [14] " LSR r3,r1,#3 \n" /* r3 := (r1 >> 3), set the T bit (new xpsr) */ [15] " LDR r2,=QK_activate_ \n" /* address of QK_activate_ */ @@ -968,7 +937,7 @@ Exception priority of PendSV is set to 0xFF, which is the lowest interrupt prior * thread. However, this must be accomplished by a return-from-exception, * while we are still in the thread context. The switch to the exception * context is accomplished by triggering the NMI exception. - * NOTE: The NMI exception is triggered with nterrupts DISABLED, + * NOTE: The NMI exception is triggered with nterrupts DISABLED, * because QK activator disables interrutps before return. */ @@ -983,7 +952,7 @@ Exception priority of PendSV is set to 0xFF, which is the lowest interrupt prior #endif /* VFP available */ /* trigger NMI to return to preempted task... - * NOTE: The NMI exception is triggered with nterrupts DISABLED + * NOTE: The NMI exception is triggered with nterrupts DISABLED */ [29] " LDR r0,=0xE000ED04 \n" /* Interrupt Control and State Register */ [30] " MOV r1,#1 \n" @@ -994,72 +963,78 @@ Exception priority of PendSV is set to 0xFF, which is the lowest interrupt prior } @endcode -
      -
    • 1 +
      +
      1
      Attribute `naked` means that the GNU-ARM compiler won't generate any entry/exit code for this function. -
    • -
    • 2 + +
      2
      `PendSV_Handler` is a CMSIS-complinat name of the PendSV exception handler. The `PendSV_Handler` exception is always entered via tail-chaining from the last nested interrupt. -
    • -
    • 3 + +
      3
      Entire body of this function will be defined in this one inline-assembly instruction. -
    • -
    • 4,5,6 + +
      4,5,6
      Before interrupts are disabled, the following constants are loaded into registers: address of ICSR into r3 and (1<<27) into r1. -
    • +
    • For the ARMv6-M architecture (Cortex-M0/M0+)... -
    • -
    • 7 + +
      7
      Interrupts are globally disabled by setting PRIMASK (see Section 3) -
    • +
    • Otherwise, for the ARMv7-M architecture (Cortex-M3/4/7) and when the `__ARM_FP` macro is defined... -> NOTE: The symbol `__ARM_FP` is defined by the GNU-ARM compiler when the compile options indicate that the ARM FPU is used. -
    • -
    • 8 -The lr register (EXC_RETURN) is pushed to the stack along with r0, to keep the stack aligned at 8-byte boundary. -> NOTE: In the presence of the FPU (Cortex-M4F/M7), the EXC_RETURN[4] bit carries the information about the stack frame format used, whereas EXC_RETURN[4] ==0 means that the stack contains room for the S0-S15 and FPSCR registers in addition to the usual R0-R3,R12,LR,PC,xPSR registers. This information must be preserved, in order to properly return from the exception at the end. -
    • -
    • 9 -For the ARMv7-M architecture (Cortex-M3/M4), interrupts are selectively disabled by setting the BASEPRI register. -> NOTE: The value moved to BASEPRI must be identical to the @ref QF_BASEPRI "QF_BASEPRI" macro defined in `qf_port.h`. -
    • -
    • 10 -Before setting the BASEPRI register, interrupts are disabled with the PRIMASK register, which is the recommended workaround for the Cortex-M7 r0p1 hardware bug, as described in the ARM Ltd. [@ref ARM-EPM-064408], Erratum 837070. -
    • -
    • 11 -The BASEPRI register is set to the @ref QF_BASEPRI "QF_BASEPRI" value. -
    • -
    • 12 -After setting the BASEPRI register, interrupts are re-anabed with the PRIMASK register, which is the recommended workaround for the Cortex-M7 r0p1 hardware bug, as described in the ARM Ltd. [@ref ARM-EPM-064408], Erratum 837070. -
    • -
    • 13 -The PendSV exception is **explicitly** un-pended. -> NOTE: The PendSV exception handler can be preempted by an interrupt, which might pend PendSV exception again. This would trigger PendSV incorrectly again immediately after calling QK activator. -
    • +> NOTE: The symbol `__ARM_FP` is defined by the GNU-ARM compiler when the compile options indicate that the ARM FPU is used. -
    • The following code [14-23] fabricates an exception stack frame, to perform an exception-return to the QK activator without destroying the original exception stack frame of the PendSV exception. This is necessary to preserve the context of the preempted code. -
    • -
    • 14 + +
      8
      +The lr register (EXC_RETURN) is pushed to the stack along with r0, to keep the stack aligned at 8-byte boundary. +> NOTE: In the presence of the FPU (ARMv7M or higher architectures), the EXC_RETURN[4] bit carries the information about the stack frame format used, whereas EXC_RETURN[4] ==0 means that the stack contains room for the S0-S15 and FPSCR registers in addition to the usual R0-R3,R12,LR,PC,xPSR registers. This information must be preserved, in order to properly return from the exception at the end. + +
      +
      9
      +For the ARMv7-M architecture (Cortex-M3/M4), interrupts are selectively disabled by setting the BASEPRI register. +> NOTE: The value moved to BASEPRI must be identical to the @ref QF_BASEPRI "QF_BASEPRI" macro defined in `qf_port.h`. + +
      +
      10
      +Before setting the BASEPRI register, interrupts are disabled with the PRIMASK register, which is the recommended workaround for the Cortex-M7 r0p1 hardware bug, as described in the ARM Ltd. [@ref ARM-EPM-064408], Erratum 837070. +
      +
      11
      +The BASEPRI register is set to the @ref QF_BASEPRI "QF_BASEPRI" value. +
      +
      12
      +After setting the BASEPRI register, interrupts are re-anabed with the PRIMASK register, which is the recommended workaround for the Cortex-M7 r0p1 hardware bug, as described in the ARM Ltd. [@ref ARM-EPM-064408], Erratum 837070. +
      +
      13
      +The PendSV exception is **explicitly** un-pended. +> NOTE: The PendSV exception handler can be preempted by an interrupt, which might pend PendSV exception again. This would trigger PendSV incorrectly again immediately after calling QK activator. + +
      + +
      14-23
      This code fabricates an exception stack frame, to perform an exception-return to the QK activator without destroying the original exception stack frame of the PendSV exception. This is necessary to preserve the context of the preempted code. +
      +
      14
      The value (1 << 24) is synthesized in r3 from the value (1 << 27) already available in r1. This value is going to be stacked and later restored to xPSR register (only the T bit set). -
    • -
    • 15 + +
      15
      The address of the QK activator function `QK_activate_()` is loaded into r2. This will be pushed to the stack as the PC register value. -
    • -
    • 16 + +
      16
      The address of the QK activator function `QK_activate_()` in r2 is adjusted to be half-word aligned instead of being an odd THUMB address. -> NOTE: This is necessary, because the value will be loaded directly to the PC, which cannot accept odd values. -
    • -
    • 17 +> NOTE: This is necessary, because the value will be loaded directly to the PC, which cannot accept odd values. + + +
      17
      The address of the `Thread_ret()` function is loaded into r1. This will be pushed to the stack as the lr register value. -> NOTE: The address of the @c Thread_ret label must be a THUMB address, that is, the least-significant bit of this address must be set (this address must be odd number). This is essential for the correct return of the QK activator with setting the THUMB bit in the PSR. Without the LS-bit set, the ARM Cortex-M CPU will clear the T bit in the PSR and cause the Hard Fault. The GNU-ARM assembler/linker will synthesize the correct THUMB address of the svc_ret label only if this label is declared with the `.type Thread_ret , %function` attribute (see step [23]). -
    • -
    • 18 +> NOTE: The address of the @c Thread_ret label must be a THUMB address, that is, the least-significant bit of this address must be set (this address must be odd number). This is essential for the correct return of the QK activator with setting the THUMB bit in the PSR. Without the LS-bit set, the ARM Cortex-M CPU will clear the T bit in the PSR and cause the Hard Fault. The GNU-ARM assembler/linker will synthesize the correct THUMB address of the svc_ret label only if this label is declared with the `.type Thread_ret , %function` attribute (see step [23]). + + +
      18
      The stack pointer is adjusted to leave room for 8 registers. -
    • -
    • 19 + +
      19
      The top of stack, adjusted by 5 registers, (r0, r1, r2, r3, and r12) is stored to r0. -
    • -
    • 20 + +
      20
      The values of xpsr, pc, and lr prepared in r3, r2, and r1, respectively, are pushed on the top of stack (now in r0). This operation completes the synthesis of the exception stack frame. After this step the stack looks as follows:
       Hi memory
      @@ -1084,40 +1059,40 @@ old SP --> "aligner"  (pushed in step [7] if FPU is present)
           SP --> r0   don't care
       Low memory
       
      -
    • -
    • 21-22 + +
      21-22
      The special exception-return value 0xFFFFFFF9 is synthesized in r0 (two instructions are used to make the code compatible with Cortex-M0, which has no barrel shifter). -> NOTE: the r0 register is used instead of lr because the Cortex-M0 instruction set cannot manipulate the higher-registers (r9-r15). -> NOTE: The exception-return value is consistent with the synthesized stack-frame with the lr[4] bit set to 1, which means that the FPU registers are not included in this stack frame. -
    • +> NOTE: the r0 register is used instead of lr because the Cortex-M0 instruction set cannot manipulate the higher-registers (r9-r15). +> NOTE: The exception-return value is consistent with the synthesized stack-frame with the lr[4] bit set to 1, which means that the FPU registers are not included in this stack frame. -
    • 23 + +
      23
      PendSV exception returns using the special value of the r0 register of 0xFFFFFFF9 (return to Privileged Thread mode using the Main Stack pointer). The synthesized stack frame causes actually a function call to QK_sched_ function in C. -> NOTE: The return from the PendSV exception just executed switches the ARM Cortex-M core to the Privileged Thread mode. The QK_sched_ function internally re-enables interrupts before launching any thread, so the threads always run in the Thread mode with interrupts enabled and can be preempted by interrupts of any priority. -> NOTE: In the presence of the FPU, the exception-return to the QK activator does not change any of the FPU status bit, such as CONTROL.FPCA or LSPACT. -
    • +> NOTE: The return from the PendSV exception just executed switches the ARM Cortex-M core to the Privileged Thread mode. The QK_sched_ function internally re-enables interrupts before launching any thread, so the threads always run in the Thread mode with interrupts enabled and can be preempted by interrupts of any priority. +> NOTE: In the presence of the FPU, the exception-return to the QK activator does not change any of the FPU status bit, such as CONTROL.FPCA or LSPACT. -
    • 24 + +
      24
      The @c Thread_ret function is the place, where the QK activator `QK_activate_()` returns to, because this return address is pushed to the stack in step [16]. Please note that the address of the @c Thread_ret label must be a THUMB address. -
    • -
    • 25-28 + +
      25-28
      If the FPU is present, the read-modify-write code clears the CONTROL[2] bit [2]. This bit, called CONTROL.FPCA (Floating Point Active), would cause generating the FPU-type stack frame, which you want to avoid in this case (because the NMI exception will certainly not use the FPU). -> NOTE: Clearing the CONTROL.FPCA bit occurs with interrupts disabled, so it is protected from a context switch. -
    • -
    • 28-32 +> NOTE: Clearing the CONTROL.FPCA bit occurs with interrupts disabled, so it is protected from a context switch. + + +
      28-32
      The asynchronous NMI exception is triggered by setting ICSR[31]. The job of this exception is to put the CPU into the exception mode and correctly return to the thread level. -
    • -
    • 33 + +
      33
      This endless loop should not be reached, because the NMI exception should preempt the code immediately after step [31] -
    • -
    + + -
    @subsection arm-cm_qk_port-asm_nmi NMI_Handler() Implementation Listing: NMI_Handler() function in qk_port.c file -@code{c} +@code{.c} __attribute__ ((naked)) [1] void NMI_Handler(void) { __asm volatile ( @@ -1140,8 +1115,8 @@ This endless loop should not be reached, because the NMI exception should preemp } @endcode -
      -
    • 1 +
      +
      1
      The @c NMI_Handler is the CMSIS-compliant name of the NMI exception handler. This exception is triggered after returning from the QK activator in step [31] of the previous listing. The job of NMI is to discard its own stack frame and cause the exception-return to the original preempted thread context. The stack contents just after entering NMI is shown below:
       Hi memory
      @@ -1166,31 +1141,29 @@ old SP --> EXC_RETURN (pushed in PendSV [7] if FPU is present)
           SP --> r0   don't care
       Low memory
       
      -
    • -
    • 2 + +
      2
      The stack pointer is adjusted to un-stack the 8 registers of the interrupt stack frame corresponding to the NMI exception itself. This moves the stack pointer from the "old SP" to "SP" in the picture above, which "uncovers" the original exception stack frame left by the PendSV exception. -
    • -
    • 3 + +
      3
      For ARMv6-M, interrupts are enabled by clearing the PRIMASK. -
    • -
    • 4 + +
      4
      For ARMv6-M, The NMI exception returns to the preempted thread using the standard EXC_RETURN, which is in lr. -
    • -
    • 5-6 + +
      5-6
      For the ARMv7-M, interrupts are enabled by writing 0 into the BASEPRI register. -
    • -
    • 7 + +
      7
      If the FPU is used, the EXC_RETURN and the "stack aligner" saved in PendSV step [7] are popped from the stack into r0 and pc, respectively. Updating the pc causes the return from PendSV. -
    • -
    • 8 + +
      8
      Otherwise, NMI returns to the preempted thread using the standard EXC_RETURN, which is in lr. -
    • -
    + + @anchor qk_stack-detail -@image html qk_stack-detail.gif "Detailed stack allocation in QK for ARM Cortex-M" - - +![Detailed stack allocation in QK for ARM Cortex-M](qk_stack-detail.gif) @section arm-cm_qk-isr Writing ISRs for QK @@ -1206,7 +1179,7 @@ The following listing shows an example of the `SysTick_Handler()` ISR (from the @anchor arm-cm_qk-isr-code Listing: An ISR header for QK -@code{c} +@code{.c} void SysTick_Handler(void) __attribute__((__interrupt__)); void SysTick_Handler(void) { ~ ~ ~ @@ -1218,22 +1191,20 @@ The following listing shows an example of the `SysTick_Handler()` ISR (from the } @endcode -
      -
    • 1 +
      +
      1
      Every ISR for QK must call `QK_ISR_ENTRY()` before calling any QP API -
    • -
    • 2 + +
      2
      Every ISR for QK must call `QK_ISR_EXIT()` right before exiting to let the QK kernel schedule an asynchronous preemption, if necessary. -
    • -
    + + @note The QK port to ARM Cortex-M complies with the requirement of the ARM-EABI to preserve stack pointer alignment at **8-byte boundary**. Also, all QP examples for ARM Cortex-M comply with the CMSIS naming convention for all exception handlers and IRQ handlers. - -@section arm-cm_qk-fpu Using the FPU in the QK Port (Cortex-M4F/M7) -If you have the Cortex-M4F CPU and your application uses the hardware FPU, it should be enabled because it is turned off out of reset. The CMSIS-compliant way of turning the FPU on looks as follows: +@section arm-cm_qk-fpu Using the FPU in the QK Port (ARMv7M or higher architectures) If you have the Cortex-M4F CPU and your application uses the hardware FPU, it should be enabled because it is turned off out of reset. The CMSIS-compliant way of turning the FPU on looks as follows: @verbatim SCB->CPACR |= (0xFU << 20); @@ -1245,7 +1216,6 @@ The FPU must be enabled before executing any floating point instruction. An atte Depending on wheter or not you use the FPU in your ISRs, the "Vanilla" QP port allows you to configure the FPU in various ways, as described in the following sub-sections. -
    @subsection arm-cm_qk-fpu_1thread FPU used in ONE thread only and not in any ISR If you use the FPU only at a single thread (active object) and none of your ISRs use the FPU, you can setup the FPU not to use the automatic state preservation and not to use the lazy stacking feature as follows: @@ -1259,7 +1229,6 @@ With this setting, the Cortex-M4F processor handles the ISRs in the exact-same w This FPU setting will lead to FPU errors, if more than one thread or any of the ISRs indeed start to use the FPU -
    @subsection arm-cm_qk-fpu_nthreadd FPU used in more than one thread only or the ISR If you use the FPU in more than one of the threads (active objects) or in any of your ISRs, you should setup the FPU to use the automatic state preservation and the lazy stacking feature as follows: @@ -1271,7 +1240,6 @@ This is actually the default setting of the hardware FPU and is recommended for As described in the ARM Application Note "Cortex-M4(F) Lazy Stacking and Context Switching" [@ref ARM-AN298], the FPU automatic state saving requires more stack plus additional CPU time to save the FPU registers, but only when the FPU is actually used. - @section arm-cm_qk-idle QK Idle Processing Customization in QK_onIdle() QK can very easily detect the situation when no events are available, in which case QK calls the `QK_onIdle()` callback. You can use `QK_onIdle()` to suspended the CPU to save power, if your CPU supports such a power-saving mode. Please note that `QK_onIdle()` is called repetitively from an endless loop, which is the QK idle-thread. The `QK_onIdle()` callback is called with interrupts **enabled** (which is in contrast to the @ref arm-cm_qv-idle "QV_onIdle() callback" used in the non-preemptive configuration). @@ -1293,18 +1261,17 @@ The THUMB-2 instruction set used exclusively in ARM Cortex-M provides a special } @endcode -
      -
    • 1 +
      +
      1
      The preemptive QK kernel calls the `QK_onIdle()` callback with interrupts enabled. -
    • -
    • 2 +
    • +
      2
      The sleep mode is used only in the non-debug configuration, because sleep mode stops CPU clock, which can interfere with debugging. -
    • -
    • 3 +
    • +
      3
      The `WFI` instruction is generated using inline assembly. -
    • -
    - + + @section arm-cm_qk-testing Testing QK Preemption Scenarios @@ -1331,7 +1298,6 @@ The figure below hows how to trigger the GPIOA interrupt from the CCS debugger. The general testing strategy is to break into the application at an interesting place for preemption, set breakpoints to verify which path through the code is taken, and trigger the GPIO interrupt. Next, you need to free-run the code (don’t use single stepping) so that the NVIC can perform prioritization. You observe the order in which the breakpoints are hit. This procedure will become clearer after a few examples. -
    @subsection arm-cm_qk-test-isr Interrupt Nesting Test The first interesting test is verifying the correct tail-chaining to the PendSV exception after the interrupt nesting occurs, as shown in @ref arm-cm_qk-synch-fig "Synchronous Preemption in QK". To test this scenario, you place a breakpoint inside the `GPIOPortA_IRQHandler()` and also inside the `SysTick_Handler()` ISR. When the breakpoint is hit, you remove the original breakpoint and place another breakpoint at the very next machine instruction (use the Disassembly window) and also another breakpoint on the first instruction of the `QK_PendSV` handler. Next you trigger the PIOINT0 interrupt per the instructions given in the previous section. You hit the Run button. @@ -1344,7 +1310,6 @@ The pass criteria of this test are as follows: 3. The last breakpoint hit is the one in `PendSV_Handler()` exception handler, which means that the PendSV exception is tail-chained only after all interrupts are processed. You need to remove all breakpoints before proceeding to the next test. -
    @subsection arm-cm_qk-test-thread Thread Preemption Test The next interesting test is verifying that threads can preempt each other. You set a breakpoint anywhere in the Philosopher state machine code. You run the application until the breakpoint is hit. After this happens, you remove the original breakpoint and place another breakpoint at the very next machine instruction (use the Disassembly window). You also place a breakpoint inside the `GPIOPortA_IRQHandler()` interrupt handler and on the first instruction of the `PendSV_Handler()` handler. Next you trigger the GPIOA interrupt per the instructions given in the previous section. You hit the Run button. @@ -1359,9 +1324,8 @@ The pass criteria of this test are as follows: 4. After this you free-run the application and verify that the next breakpoint hit is the one inside the Philosopher state machine. This validates that the preempted thread continues executing only after the preempting thread (the Table state machine) completes. -
    -@subsection arm-cm_qk-test-fpu Testing the FPU (Cortex-M4F/M7) -In order to test the FPU, the Board Support Package (BSP) for the Cortex-M4F EK-TM4C123GXL board uses the FPU in the following contexts: +@subsection arm-cm_qk-test-fpu Testing the FPU +In order to test the FPU (ARMv7M or higher architectures), the Board Support Package (BSP) for the Cortex-M4F EK-TM4C123GXL board uses the FPU in the following contexts: - In the idle loop via the `QK_onIdle()` callback (QP priority 0) @@ -1376,7 +1340,6 @@ To test the FPU, you could step through the code in the debugger and verify that Next, you can selectively comment out the FPU code at various levels of priority and verify that the QK context switching works as expected with both types of exception stak frames (with and without the FPU). -
    @subsection arm-cm_qk-test-other Other Tests Other interesting tests that you can perform include changing priority of the GPIOA interrupt to be lower than the priority of SysTick to verify that the PendSV is still activated only after all interrupts complete. @@ -1387,54 +1350,47 @@ In yet another test you could post an event to Philosopher active object rather /*##########################################################################*/ /*! @page arm-cm_qxk Preemptive "Dual-Mode" QXK Kernel -@tableofcontents - -

    This section describes how to use QP on ARM Cortex-M with the @ref qxk "preemptive, dual-mode QXK real-time kernel", which combines the lightweight non-blocking @ref qxk_basic "basic threads" of QK with traditional blocking @ref qxk_extended "extended threads" found in conventional RTOS kernels. QXK provides all typical services of a conventional blocking RTOS, such as blocking time-delays, semaphores, mutextes, and message queues. -

    +This section describes how to use QP on ARM Cortex-M with the @ref srs_qxk "preemptive, dual-mode QXK real-time kernel", which combines the lightweight non-blocking @ref srs_qxk_basic "basic threads" of QK with traditional blocking @ref srs_qxk_extended "extended threads" found in conventional RTOS kernels. QXK provides all typical services of a conventional blocking RTOS, such as blocking time-delays, semaphores, mutextes, and message queues. QXK 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. @note -If you are currently using QP on top of a conventional 3rd-party RTOS, consider moving your application to the QXK kernel. QXK is not only more efficient than running QP on top of a @ref ports_rtos "traditional 3rd-party RTOS" (because non-blocking @ref qxk_basic "basic threads" take far less stack space and CPU cycles for context switch than the much heavier @ref qxk_extended "extended threads"). But the biggest advantage of QXK is that it __protects__ the application-level code from inadvertent mixing of blocking calls inside the event-driven active objects. Specifically, QXK "knows" the type of the thread context (extended/basic) and asserts internally if a blocking call (e.g., semaphore-wait or a time-delay) is attempted in a basic thread (active object). This is something that a QP port to a @ref ports_rtos "conventional 3rd-party RTOS" cannot do, because such an RTOS runs all code (including active objects) in the context of havyweight extended threads. - +If you are currently using QP on top of a conventional 3rd-party RTOS, consider moving your application to the QXK kernel. QXK is not only more efficient than running QP on top of a @ref ports_rtos "traditional 3rd-party RTOS" (because non-blocking @ref srs_qxk_basic "basic threads" take far less stack space and CPU cycles for context switch than the much heavier @ref srs_qxk_extended "extended threads"). But the biggest advantage of QXK is that it __protects__ the application-level code from inadvertent mixing of blocking calls inside the event-driven active objects. Specifically, QXK "knows" the type of the thread context (extended/basic) and asserts internally if a blocking call (e.g., semaphore-wait or a time-delay) is attempted in a basic thread (active object). This is something that a QP port to a @ref ports_rtos "conventional 3rd-party RTOS" cannot do, because such an RTOS runs all code (including active objects) in the context of heavyweight extended threads. @section arm-cm_qxk-synopsis Synopsis of the QXK Port on ARM Cortex-M - -

    The preemptive, blocking QXK kernel works on ARM Cortex-M as follows: -

    +The preemptive, blocking QXK kernel works on ARM Cortex-M as follows: 1. The ARM Cortex-M processor executes application code in the Privileged Thread mode, which is exactly the mode entered out of reset. The exceptions (including all interrupts) are always processed in the Privileged Handler mode. -2. QXK uses the Main Stack Pointer (MSP) for @ref qxk_basic "basic threads", interrupts and exceptions (such as the PendSV exception). The MSP is also used for the QXK idle thread (which is a non-blocking basic thread). +2. QXK uses the Main Stack Pointer (MSP) for @ref srs_qxk_basic "basic threads", interrupts and exceptions (such as the PendSV exception). The MSP is also used for the QXK idle thread (which is a non-blocking basic thread). -3. QXK uses the Process Stack Pointer (PSP) for handling @ref qxk_extended "extended threads". Each extended thread must provide a private stack space to be associated with the PSP. +3. QXK uses the Process Stack Pointer (PSP) for handling @ref srs_qxk_extended "extended threads". Each extended thread must provide a private stack space to be associated with the PSP. -4. The QXK port uses the @c PendSV (exception number 14) and the NMI exception (number 2) to perform context switch. The application code (your code) must initialize the Interrupt Vector Table with the addresses of the @c PendSV_Handler and @c NMI_Handler exception handlers. -@n -> NOTE: QXK uses only the CMSIS-compliant exception and interrupt names, such as @c PendSV_Handler, @c NMI_Handler, etc.@n +4. The QXK port uses the @c PendSV (exception number 14) and the NMI or the IRQ exception (number 2) to perform context switch. The application code (your code) must initialize the Interrupt Vector Table with the addresses of the `PendSV_Handler` and `NMI_Handler` exception handlers. +
    +> NOTE: QXK uses only the CMSIS-compliant exception and interrupt names, such as `PendSV_Handler`, `NMI_Handler`, etc.@n > NOTE: The QXK port specifically does **not** use the SVC exception (Supervisor Call). This makes the QXK ports compatible with various "hypervisors" (such as mbed uVisor or Nordic SoftDevice), which use the SVC exception. 5. You need to explicitly **assign priorities of the all interrupts** used in your application, as described in @ref arm-cm_int. -@n -> NOTE: For Cortex-M3/M4/M7 (ARMv7M architecture), the QXK initialization code (executed from the QF initialization) initializes all interrupt priorities to the safe value maskable with the BASEPRI register. However, this is just a safety precaution not to leave the interrupts kernel-unaware, which they are out of reset. It is highly recommended to set the priorities of all interrupts explicitly in the application-level code. +
    +> NOTE: For ARMv7M or higher architectures (M3/M4/M7/M33...), the QXK initialization code (executed from the QF initialization) initializes all interrupt priorities to the safe value maskable with the BASEPRI register. However, this is just a safety precaution not to leave the interrupts kernel-unaware, which they are out of reset. It is highly recommended to set the priorities of all interrupts explicitly in the application-level code. 6. It is strongly recommended that you do not assign the lowest NVIC priority (0xFF) to any interrupt in your application, because it is used by the PendSV handler. For example, with 3 bits of priority implemented in the NVIC, this leaves the following 7 priority levels for you (listed from the lowest to the highest urgency): 0xC0, 0xA0, 0x80, 0x60, 0x40, 0x20, and 0x00 (the highest priority). -@n -> NOTE: The prioritization of interrupts, including the PendSV exception, is performed entirely by the NVIC. Because the PendSV has the lowest priority in the system, the NVIC tail-chains to the PendSV exception only after exiting the last nested interrupt. +
    +> NOTE: The prioritization of interrupts, including the PendSV exception, is performed entirely by the NVIC. Because the PendSV has the lowest priority in the system, the NVIC tail-chains to the PendSV exception only after exiting the last nested interrupt. 7. ISRs are written as regular C functions, but they need to call QXK_ISR_ENTRY() before using any QF services, and they must call QXK_ISR_EXIT() after using any of the QF services. 8. ARM Cortex-M enters interrupt context without disabling interrupts. Generally, you should not disable interrupts inside your ISRs. In particular, the QF services (such as QF_PUBLISH(), QF_TICK_X(), and QACTIVE_POST()) should be called with interrupts enabled, to avoid nesting of critical sections. -@n -> NOTE: If you don't wish an interrupt to be preempted by another interrupt, you can always prioritize that interrupt in the NVIC to a higher or equal level as other interrupts (use a lower numerical value of priority). +
    +> NOTE: If you don't wish an interrupt to be preempted by another interrupt, you can always prioritize that interrupt in the NVIC to a higher or equal level as other interrupts (use a lower numerical value of priority). 9. In compliance with the ARM Application Procedure Call Standard (AAPCS), the QXK kernel always preserves the 8-byte alignment of the stack (both MSP and PSP). -
    @subsection arm-com_qxk_vfp Using the VFP -If you have the Cortex-M4F/M7 CPU and your application is compiled with the VFP present, the QXK kernel will enable the VFP along with the VFP automatic state preservation and lazy stacking features. This will cause the NVIC to automatically use the VFP-exception stack frame (with additional 18 VFP registers S0-S15 plus VFP status and stack "aligner"). The QXK context switch will add to this the rest of the VFP registers (S16-S31) on context switches to and from extended threads. +If you have the ARMv7M or higher architectures (ARMv7M or higher architectures) and your application is compiled with the VFP present, the QXK kernel will enable the VFP along with the VFP automatic state preservation and lazy stacking features. This will cause the NVIC to automatically use the VFP-exception stack frame (with additional 18 VFP registers S0-S15 plus VFP status and stack "aligner"). The QXK context switch will add to this the rest of the VFP registers (S16-S31) on context switches to and from extended threads. @note With VFP enabled, any QXK thread (both a basic and an extended thread) will use 136 more bytes of its stack space, regardless if VFP is actually used by this thread. However, due to the "lazy-stacking" hardware feature, only a thread that actually uses the VFP will save and restore the VFP registers on the stack (which will cost some additional CPU cycles to perform a context switch). diff --git a/doxygen/ports_native.dox b/doxygen/ports_native.dox index 3d182d04..3c3b04aa 100644 --- a/doxygen/ports_native.dox +++ b/doxygen/ports_native.dox @@ -1,7 +1,6 @@ /*##########################################################################*/ /*! @page ports_native Native (Bare-Metal) Ports -- @subpage lint (generic C compiler) - @subpage arm-cm (Cortex-M0/M0+/M3/M4/M4/M7) - @ref arm-cm_qv (ARM-CLANG, ARM-KEIL, GNU-ARM, IAR-ARM ) - @ref arm-cm_qk (ARM-CLANG, ARM-KEIL, GNU-ARM, IAR-ARM) @@ -16,148 +15,37 @@ - @ref msp430_qv (TI-CCS, IAR toolchains) - @ref msp430_qk (TI-CCS, IAR toolchains) -*/ -/*##########################################################################*/ -/*! @page lint PC-Lint-Plus - -@tableofcontents - -

    The QP/C distribution contains a "port" to PC-Lint-Plus static analysis tool from Gimpel Software, which is a static analysis tool for C and C++ with one of the longest track records and best value of the money in the industry. The "PC-Lint-Plus port" allows you to statically analyze the QP/C source code and facilitates static analysis of your **application code** based on QP/C. -

    -The QP/C "port" to PC-Lint-Plus is located in the directory qpc/ports/lint-plus and includes also lint configuration files, as well as an example of "linting" application code in the directory qpc/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus. The following listing describes the most important files in these three directories. - -@code{.x} - qpc\ - QP/C installation directory - +-ports/ - QP/C ports directory - | +-lint-plus/ - QP/C "port" to PC-Lint-Plus - | | +-16bit/ - QP/C++ "port" to 16-bit CPUs - | | | +-cpu.lnt - Lint options for a 16-bit CPU - | | | +-stdint.h - Standard exact-width integers for a 16-bit CPU - | | +-32bit/ - QP/C++ "port" to 32-bit CPUs - | | | +-cpu.lnt - Lint options for a 32-bit CPU - | | | +-stdint.h - Standard exact-width integers for a 32-bit CPU - | | +-qk/ - QP/C port with the QK kernel - | | +-qv/ - QP/C port with the QV kernel - | | +-qxk/ - QP/C port with the QXK kernel - | | +-au-ds.lnt - Dan Saks recommendations - | | +-au-misra3.lnt - MISRA-C:2012 compliance checks - | | +-au-misra3-amd1.lnt - MISRA-C:2012-Amendment-1 additional checks - | | +-qpc.lnt - PC-Lint-Plus options for QP/C applications - | | +-std.lnt - Standard PC-Lint-Plus settings recommended by Quantum Leaps - | | +-lin.bat - Batch file to invoke PC-Lint-Plus to run analysis of QP/C code - | | +-options.lnt - PC/Lint-Plus options for "linting" QP/C source code - | | +-lint_qf.log - PC/Lint-Plus output for the QEP/QF components of QP/C - | | +-lint_qs.log - PC/Lint-Plus output for the QS component of QP/C - | | +-lint_qv.log - PC/Lint-Plus output for the QV component of QP/C - | | +-lint_qk.log - PC/Lint-Plus output for the QK component of QP/C - | | +-lint_qxk.log - PC/Lint-Plus output for the QXK component of QP/C - | | +-qep_port.h - QEP component "port" to a "generic C compiler" - | | +-stdbool.h - Standard Boolean type and constants for a "generic C compiler" - | - +-examples\ - QP/C examples directory (application) - | +-arm-cm\ - QP/C examples for ARM Cortex-M - | | +-dpp_ek-tm4c123gxl\ - DPP example on the EK-TM4C123GLX board - | | | +-lint-plus\ - directory for linting the application - | | | | +-lin.bat - Batch to run PC-Lint-Plus analysis of application code - | | | | +-options.lnt - PC-Lint-Plus options for "linting" of application code -@endcode - - - -@section lint_qpc Linting the QP/C Source Code -The directory qpc/ports/lint-plus (see listing above) contains also the **lin.bat** batch file for "linting" the QP/C source code. The `lin.bat` batch file invokes PC-Lint-Plus and generates the lint output files. As shown in the listing above, the lint output is collected into four text files `lint_qf.log`, `lint_qs.log`, `lint_qk.log`, `lint_qv.log`, and `lint_qs.log`, for QEP/QF, QK, QV, QXK and QS components of the QP/C framework, respectively. - -@note -In order to execute the `lin.bat` file on your system, you might need to adjust the symbol `PCLP_DIR` at the top of the batch file, to the PC-Lint-Plus installation directory on your computer. - -@remarks -The `lin.bat` batch file invoked without any command-line options checks the QP/C code in the ::Q_SPY build configuration with software tracing enabled. However, by the nature of software tracing, the ::Q_SPY configuration transgresses many more MISRA-C rules than the standard configuration. However, the ::Q_SPY configuration is never used for production code, so the MISRA-C compliance of the QP/C framework should not be judged by the deviations that happen only in the ::Q_SPY configuration. - - -According to the PC-Lint-Plus guidelines, the `lin.bat` uses two option files: the `qpc.lnt` configuration file discussed before and the `options.lnt` configuration file that covers all deviations from the MISRA-C rules **within the QP/C source code**. These deviations are intentionally localized to QP/C code and are independent from your **application-level** code. In other words, a MISRA-C deviation present in the QP/C code does **not** mean that such deviation is somehow allowed or its detection is somehow suppressed in the **application-level** code. This is because the the `options.lnt` configuration file for internals of QP/C is **not** used to "lint" the application-level code. - - - -@section lint_app Linting QP/C Application Code -The QP/C baseline code contains an example of MISRA-C compliance checking with PC-Lint-Plus: the DPP example for the EK-TM4C123GLX Cortex-M4F board, located in the directory qpc/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus. The PC-Lint-Plus analysis is very simple and requires invoking the **lin.bat** file. - -@note -In order to execute the **lin.bat** file on your system, you might need to adjust the symbol `PCLP_DIR` at the top of the batch file, to the PC-Lint-Plus installation directory on your computer. You - - -The `lint-plus` subdirectory contains also the local version of the `options.lnt` configuration file with the PC-Lint-Plus options specific to linting the application. Here, you might include linting options for your specific compiler, as described in the "PC-Lint-Plus Manual", Chapter 2 "Installation and Configuration". - - - -@section lint_options Structure of PC-Lint-Plus Options for QP/C -PC-Lint-Plus has several places where it reads its currently valid options: -- From special PC-Lint-Plus option files (usually called `*.lnt`) -- From the command line -- From within the special lint-comments in the source code modules (not recommended) - -The QP/C source code and example application code has been "linted" only by means of the first alternative (option files) with possibility of adding options via command line. The third alternative--lint comments--is not used and Quantum Leaps does not recommend this alternative. - -@note -The QP/C source code is completely free of lint comments, which are viewed as a contamination of the source code. - -The structure of the PC-Lint-Plus option files used for "linting" QP/C follows the Gimpel Software guidelines for configuring PC-Lint-Plus (See Section 2 "Configuration" in the *PC-Lint-Plus Manual*). The design and grouping of the lint options also reflects the fact that static code analysis of a software framework, such as QP/C, has really two major aspects. First, the source code of the framework itself has to be analyzed. But even more important and helpful to the users of the framework is providing the infrastructure to effectively analyze the application-level code based on the framework. With this in mind, the PC-Lint-Plus options for static analysis of QP/C are divided into two groups, located in directories qpc/include and qpc/ports/lint. These two groups are for analyzing QP/C **applications** and QP/C **source code**, respectively. - -As shown in the PC-Lint-Plus "port" files description, the directory qpc/include, contains the PC-Lint-Plus options for "linting" the application code along with all platform-independent QP/C header files required by the applications. This collocation of lint options with header files simplifies "linting", because specifying just `-iqpc/include` include directory to PC-Lint-Plus accomplishes both inclusion of QP/C header files and PC-Lint-Plus options. -Note that the `qpc/include` directory contains all PC-Lint-Plus option files used in "linting" the code, including the standard MISRA-C:2012 `au-misr3.lnt` option file as well as Dan Saks' recommendations `au-ds.lnt`, which are copied from the PC-Lint-Plus distribution. This design freezes the lint options for which the compliance has been checked. - - - -@subsection lint_std_lnt The std.lnt option file -According to the Gimpel Software *PC-Lint-Plus Configuration Guidelines*, the file `qpc/include/std.lnt` file, contains the top-level options, which Quantum Leaps recommends for all projects. These options include the formatting of the PC-Lint-Plus messages and making two passes to perform better cross-module analysis. However, the most important option is `-restore_at_end`, which has the effect of surrounding each source file with options `-save` and `-restore`. This precaution prevents options from "bleeding" from one file to another. - -Top-level option file std.lnt -@include std.lnt - - - -@subsection lint_qpc_lnt The qpc.lnt option file -The most important file for "linting" QP/C applications is the **qpc.lnt** option file. This file handles all deviations from the MISRA-C:2012 rules, which might arise at the application-level code from the use of the QP/C framework. In other words, the **qpc.lnt** option file allows completely clean "linting" of the application-level code, as long as the application code does not violate any of the MISRA-C:2012 rules. - -At the same time, the **qpc.lnt** option file has been very carefully designed not to suppress any MISRA-C:2012 rule checking outside the very specific context of the QP/C API. In other words, the qpc.lnt option file still supports 100% of the MISRA-C:2012 rule checks that PC-Lint-Plus is capable of performing. - -@remarks -For example, for reasons explained in Section 5.10 of the "QP/C MISRA Compliance Matrix", QP/C extensively uses function-like macros, which deviates from the MISRA-C:2012 advisory Rule 4.9 and which PC-Lint-Plus checks with the warning 9026. However, instead of suppressing this warning globally (with the -e9096 directive), the qpc.lnt option file suppresses warning 9096 only for the specific QP function-like macros that are visible to the application level. So specifically, the qpc.lnt file contains directives `-esym(9026, Q_TRAN, Q_SUPER, ...)`, which suppresses the warning only for the specified macros, but does not disable checking of any other macros in the application-level code. - -@next{arm-cm} +@nav_next{arm-cm} */ /*##########################################################################*/ /*! @page arm-cr ARM Cortex-R -@image html under_construction.jpg +The QP/C/C++ ports and examples for ARM Cortex-R are described in the Quantum Leaps Application Note @webref{doc/AN_QP_and_ARM-Cortex-R.pdf, QP and ARM Cortex-R}. -@section arm-cr_qk Preemptive QK Kernel - -@includelineno ports/arm-cr/qk/gnu/qk_port.h - -@section arm-cr_qv Cooperative QV Kernel +[![QP and ARM Cortex-R](img/AN.jpg)](https://www.state-machine.com/doc/AN_QP_and_ARM-Cortex-R.pdf) +@caption{[Application Note: "QP and ARM Cortex-R"](https://www.state-machine.com/doc/AN_QP_and_ARM-Cortex-R.pdf)} @next{arm7-9} */ /*##########################################################################*/ /*! @page arm7-9 ARM7/ARM9 -@image html under_construction.jpg +The QP/C/C++ ports and examples for ARM7/ARM9 are described in the Quantum Leaps Application Note @webref{doc/AN_QP_and_ARM-Cortex-R.pdf, QP and ARM7/ARM9}. -@section arm7-9_qk Preemptive QK Kernel - -@includelineno ports/arm7-9/qk/gnu/qk_port.s - -@section arm7-9_qv Cooperative QV Kernel +[![QP and ARM Cortex-R](img/AN.jpg)](https://www.state-machine.com/doc/AN_QP_and_ARM7_ARM9-GNU.pdf) +@caption{[Application Note: "QP and ARM7/ARM9"](https://www.state-machine.com/doc/AN_QP_and_ARM7_ARM9-GNU.pdf)} @next{msp430} */ /*##########################################################################*/ /*! @page msp430 MSP430 -@image html under_construction.jpg +The QP/C/C++ ports and examples for MSP430 are described in the Quantum Leaps Development Kit @webref{doc/QDK_MSP430-CCS.pdf, QP and MSP430 with CCS} and @webref{doc/QDK_MSP430-IAR.pdf, QP and MSP430 with IAR}. -@section msp430_qk Preemptive QK Kernel +[![QP and QP and MSP430 with CCS](img/AN.jpg)](https://www.state-machine.com/doc/QDK_MSP430-CCS.pdf) +@caption{[Application Note: "QP and MSP430-CCS"](https://www.state-machine.com/doc/QDK_MSP430-CCS.pdf)} -@section msp430_qv Cooperative QV Kernel +[![QP and QP and MSP430 with IAR](img/AN.jpg)](https://www.state-machine.com/doc/QDK_MSP430-IAR.pdf) +@caption{[Application Note: "QP and MSP430-IAR"](https://www.state-machine.com/doc/QDK_MSP430-IAR.pdf)} */ diff --git a/doxygen/ports_os.dox b/doxygen/ports_os.dox index 10aa7be0..5fad50d8 100644 --- a/doxygen/ports_os.dox +++ b/doxygen/ports_os.dox @@ -49,7 +49,7 @@ The standard QP/C distribution contains the POSIX port and @ref exa_os. /*##########################################################################*/ /*! @page win32-qv Win32-QV (Windows with QV) -

    The QP/C/C++ ports and examples for Windows with single-thread (like the @ref qv "QV cooperative kernel") are described in the Quantum Leaps Application Note QP and Win32 (Windows). +

    The QP/C/C++ ports and examples for Windows with single-thread (like the @ref srs_qv "QV cooperative kernel") are described in the Quantum Leaps Application Note QP and Win32 (Windows).

    @htmlonly diff --git a/doxygen/ports_rtos.dox b/doxygen/ports_rtos.dox index f8b492eb..d1032b54 100644 --- a/doxygen/ports_rtos.dox +++ b/doxygen/ports_rtos.dox @@ -10,7 +10,7 @@ Another reason you might be interested in running QP/C on top of a conventional You do **not** need to use a traditional RTOS just to achieve preemptive multitasking with QP. The @ref comp_qk "preemptive QK kernel", available as part of the QP package, supports preemptive priority-based multitasking and is fully compatible with Rate Monotonic Scheduling to achieve guaranteed, hard real-time performance. The preemptive, run-to-completion QK kernel perfectly matches the run-to-completion execution semantics of active objects, yet it is simpler, faster, and more efficient than any traditional blocking kernel. @attention -QP/C 6.x includes a small, preemptive, priority-based, @ref qxk "dual-mode blocking QXK kernel" that executes active objects like the QK kernel (@ref qxk_basic "basic threads"), but can also execute traditional blocking threads (@ref qxk_extended "extended threads"). In this respect, QXK behaves exactly like a conventional RTOS. The QXK kernel is recommended as the preferred RTOS kernel for applications that need to mix active objects with traditional blocking code. Due to the tight and optimal integration between QXK and the rest of QP, QXK offers better performance and smaller memory footprint than any @ref ports_rtos "QP port to a 3rd-party RTOS". Additionally, QXK is already included in QP, so you avoid additional licensing costs of 3rd-party kernels. +QP/C 6.x includes a small, preemptive, priority-based, @ref srs_qxk "dual-mode blocking QXK kernel" that executes active objects like the QK kernel (@ref srs_qxk_basic "basic threads"), but can also execute traditional blocking threads (@ref srs_qxk_extended "extended threads"). In this respect, QXK behaves exactly like a conventional RTOS. The QXK kernel is recommended as the preferred RTOS kernel for applications that need to mix active objects with traditional blocking code. Due to the tight and optimal integration between QXK and the rest of QP, QXK offers better performance and smaller memory footprint than any @ref ports_rtos "QP port to a 3rd-party RTOS". Additionally, QXK is already included in QP, so you avoid additional licensing costs of 3rd-party kernels. The QP/C framework can work with virtually any traditional real-time operating @@ -20,6 +20,7 @@ system (RTOS). The currently supported 3rd-party RTOS kernels are: - @subpage freertos - @subpage threadx - @subpage uc-os2 +- @subpage zephyr - OSEK/VDX RTOS ERIKA Enterprise Combined with a conventional RTOS, QP/C takes full advantage of the multitasking capabilities of the RTOS by executing each active object in a separate RTOS task. The QP/C Platform Abstraction Layer (PAL) includes an abstract RTOS interface to enable integration between QP/C and the underlying RTOS. Specifically, the PAL allows adapting most message queue variants as event queues of active objects as well as most memory partitions as QP/C event pools. @@ -30,17 +31,12 @@ Combined with a conventional RTOS, QP/C takes full advantage of the multitasking /*##########################################################################*/ /*! @page embos embOS -

    The QP/C/C++ ports and examples for embOS are described in the Quantum Leaps Application Note @webref{doc/AN_RTOS-embOS.pdf, QP and embOS}. -

    +![SEGGER embOS](logo_embos.png) -@htmlonly -
    - -
    -Application Note: QP and embOS -
    -
    -@endhtmlonly +The QP/C/C++ ports and examples for embOS are described in the Quantum Leaps Application Note @webref{doc/AN_RTOS-embOS.pdf, QP and embOS}. + +[![Application Note: QP and embOS](img/AN.jpg)](https://www.state-machine.com/doc/AN_RTOS-embOS.pdf) +@caption{[Application Note: "QP and embOS"](https://www.state-machine.com/doc/AN_RTOS-embOS.pdf)} @next{freertos} */ @@ -48,7 +44,7 @@ Application Note: QP and embOS /*##########################################################################*/ /*! @page freertos FreeRTOS -@tableofcontents +![FreeRTOS](logo_freertos.png) @section freertos_about About the QP Port to FreeRTOS The ports/freertos/ directory contains a generic platform-independent QP/C port to FreeRTOS kernel (version 10). The provided QP port to FreeRTOS has been designed *generically* to rely exclusively on the existing FreeRTOS API. This means that the port should run without changes on any CPU/compiler platform supported by FreeRTOS. @@ -57,7 +53,7 @@ The QP-FreeRTOS port works as follows: - The QP port uses the [static memory allocation of FreeRTOS](https://freertos.org/Static_Vs_Dynamic_Memory_Allocation.html). This requires the FreeRTOS configuration to define the [configSUPPORT_STATIC_ALLOCATION](https://freertos.org/a00110.html#configSUPPORT_STATIC_ALLOCATION) -- Each QP active object executes in a separate FreeRTOS task and requires a private stack space. +- Each QP active object executes in a separate FreeRTOS task (`StaticTask_t`) and requires a private stack space. - The task-level critical section used in QF and QS is based on the FreeRTOS APIs `taskENTER_CRITICAL()`/`taskEXIT_CRITICAL()`. @@ -69,9 +65,7 @@ The QP-FreeRTOS port works as follows: The design of FreeRTOS requires the use of special "FromISR" API inside ISRs, which imposes the requirement to also provide the "FromISR" variants of the QP APIs, such as `QACTIVE_POST_FROM_ISR()`, `QF_PUBLISH_FROM_ISR()`, etc. These "FromISR" QP APIs must be used inside ISRs instead of the task-level APIs (`QACTIVE_POST()`, `QF_PUBLISH()`, etc.) and conversely, they cannot be used inside tasks and active objects. Unfortunately, FreeRTOS provides no generic way to enforce the proper API use via assertions. -- The QP port uses the native event queue (::QEQueue) for active object event queues and internally calls the FreeRTOS API `xTaskNotifyGive()` to notify an active object when an event is posted to its event queue. - -- The QP port internally calls the FreeRTOS API `ulTaskNotifyTake(pdTRUE, portMAX_DELAY)` to block an active object task when it waits for posting an event. +- The QP port uses the FreeRTOS message queue (`StaticQueue_t`) for active object event queues. - The QP port uses the native QF memory pool (::QMPool) to implement event pools. @@ -79,19 +73,18 @@ The design of FreeRTOS requires the use of special "FromISR" API inside ISRs, wh @section freertos_examples Example Code -The QP port to FreeRTOS comes with examples located in the directory `qpc/examples/freertos/`. Currently, the examples are provided for the following boards and development toolchains: +The QP port to FreeRTOS comes with examples located in the directory `qpc/examples/freertos`. Currently, the examples are provided for the following boards and development toolchains: - EK-TM4C123GXL (ARM Cortex-M4F), ARM-KEIL, GNU-ARM, IAR-ARM - STM32F746G-Discovery (ARM Cortex-M7), ARM-KEIL, GNU-ARM, IAR-ARM - @subsection freertos_isr Writing ISRs for QP/FreeRTOS The provided examples show how to write regular "kernel-aware" ISRs as well as "kernel-unaware" ISRs for QP/FreeRTOS. (See also the FreeRTOS documentation for [configMAX_SYSCALL_INTERRUPT_PRIORITY](https://www.freertos.org/a00110.html#kernel_priority). -Here is an example of a regular "kernel-aware" ISR (note the use of the "FromISR" QP APIs"): +Here is an example of a regular "kernel-aware" ISR (note the use of the `FromISR` suffix in the QP APIs): -@code{c} +@code{.c} /* NOTE: only the "FromISR" API variants are allowed in the ISRs! */ void GPIOPortA_IRQHandler(void) { BaseType_t xHigherPriorityTaskWoken = pdFALSE; @@ -107,9 +100,9 @@ void GPIOPortA_IRQHandler(void) { } @endcode -Here is an example of a "kernel-unaware" ISR (See also the FreeRTOS documentation for [configMAX_SYSCALL_INTERRUPT_PRIORITY](https://www.freertos.org/a00110.html#kernel_priority): +Here is an example of a "kernel-unaware" ISR (See also the FreeRTOS documentation for [configMAX_SYSCALL_INTERRUPT_PRIORITY](https://www.freertos.org/a00110.html#kernel_priority) ): -@code{c} +@code{.c} /* * ISR for receiving bytes from the QSPY Back-End * NOTE: This ISR is "kernel-unaware" meaning that it does not interact with @@ -132,7 +125,7 @@ void UART0_IRQHandler(void) { @subsection freertos_hook Writing FreeRTOS Hooks Running in ISR Context FreeRTOS provides "hooks" that are user functions that execute in the ISR context (e.g., `vApplicationTickHook()`). Such ISR-level functions are closely related to ISRs and should also use exclusively only the "FromISR" APIs. Here is an example of the `vApplicationTickHook()`: -@code{c} +@code{.c} /* NOTE: only the "FromISR" API variants are allowed in vApplicationTickHook */ void vApplicationTickHook(void) { BaseType_t xHigherPriorityTaskWoken = pdFALSE; @@ -149,7 +142,7 @@ void vApplicationTickHook(void) { @subsection freertos_ao Starting Active Objects in QP/FreeRTOS As mentioned in the @ref freertos_about "FreeRTOS port summary", the QP port to FreeRTOS uses the [static memory allocation of FreeRTOS](https://freertos.org/Static_Vs_Dynamic_Memory_Allocation.html). This means that all memory for an active object, including the private queue buffer and the private **stack** for the the associated FreeRTOS task must be allocated by the user. Here is an example code that starts an active object: -@code{c} +@code{.c} int main() { . . . static QEvt const *tableQueueSto[N_PHILO]; @@ -172,36 +165,29 @@ int main() { @next{threadx} */ - /*##########################################################################*/ /*! @page threadx ThreadX -

    The QP/C/C++ ports and examples for ThreadX are described in the Quantum Leaps Application Note @webref{doc/AN_RTOS-ThreadX.pdf, QP and ThreadX}. -

    +![ThreadX](logo_threadx.jpg) -@htmlonly -
    - -
    -Application Note: QP and ThreadX -
    -
    -@endhtmlonly +The QP/C/C++ ports and examples for ThreadX (now Azure RTOS) are described in the Quantum Leaps Application Note @webref{doc/AN_RTOS-ThreadX.pdf, QP and ThreadX}. + +[![Application Note: QP and ThreadX](img/AN.jpg)](https://www.state-machine.com/doc/AN_RTOS-ThreadX.pdf) +@caption{[Application Note: "QP and ThreadX"](https://www.state-machine.com/doc/AN_RTOS-ThreadX.pdf)} @next{uc-os2} */ /*##########################################################################*/ -/*! @page uc-os2 uC-OS +/*! @page uc-os2 uC-OS2 + +![uC-OS2](logo_uc-os2.jpg) @section uc-os2_about About the QP Port to uC-OS2 This directory contains a generic platform-independent QP/C port to uC-OS2 V2.92. Typically, you should not need to change the files in this directory to adapt the QP-uC-OS2 port on any CPU/Compiler to which uC-OS2 has been ported, because all the CPU and compiler specifics are handled by the uC-OS2 RTOS. -@note -Currently, the port has been tested only on ARM Cortex-M3 and M4F. - @section uc-os2_source uC-OS2 Source and ARM Cortex-M3/M4 Ports The uC-OS2 V2.92 source code and ports are located in `3rd_party/uc-os2`. Please make sure to read about uC-OS2 licensing in the README file found in this directory. @@ -240,8 +226,8 @@ qpc/ | | | +-qf_time.c | | | | +-qs/ -| | | +-qs.c - included only in the Spy build configuration -| | | +-qs_fp.c - included only in the Spy build configuration +| | | +-qs.c - included only in the Spy build configuration +| | | +-qs_fp.c - included only in the Spy build configuration | +-ports | +-uc-os2 @@ -254,14 +240,84 @@ Specifically, the QP source files qf_actq.c and qf_mem.c must **NOT** be include The QP/C/C++ ports and examples for uC-OS2 are described in the Quantum Leaps Application Note @webref{doc/AN_RTOS-uCOS2.pdf, QP and uC-OS2}. -@htmlonly -
    - -
    -Application Note: QP and uC-OS2 -
    -
    -@endhtmlonly +[![QP and uC-OS2](img/AN.jpg)](https://www.state-machine.com/doc/AN_RTOS-uCOS2.pdf) +@caption{[Application Note: QP and uC-OS2](https://www.state-machine.com/doc/AN_RTOS-uCOS2.pdf)} + +@next{zephyr} +*/ + +/*##########################################################################*/ +/*! @page zephyr Zephyr + +![Zephyr Project](logo_zephyr.jpg) + +@section zephyr_about About the QP Port to Zephyr +This directory contains a generic platform-independent QP/C port to the [Zephyr RTOS](https://zephyrproject.org). + +Typically, you should not need to change the files in this directory to adapt the QP-Zephyr port on any CPU/Compiler to which Zephyr has been ported, because all the CPU and compiler specifics are handled by the Zephyr RTOS. + + +The QP-Zephyr port works as follows: + +- The critical section used in this port is based on `k_spin_lock()/k_spin_unlock()` Zephyr API. This is the modern Zephyr critical section API, which is ready for SMP (symmetric multiprocessing). + +- Each QP active object executes in a separate Zephyr thread (`struct k_thread`) and requires a private stack space. + +@note +As demonstrated in the @ref exa_zephyr "provided examples", the private stacks for active objects in this port must be allocated with the Zephyr `K_THREAD_STACK_DEFINE()` macro. Also, the stack size passed to QACTIVE_START() must be calculated with the Zephyr `K_THREAD_STACK_SIZEOF()` macro. Failure to use these macros can lead to memory corruption in the application. + + +- The active object event queue is implemented with the Zephyr message queue (`struct k_msgq`). + +@note +The Zephyr message queue currently supports only the FIFO policy and does NOT support the LIFO policy. For that reason, the QActive_postLIFO_() implementation in this port uses the FIFO policy. A feature request has been filed in the Zephyr project for adding the LIFO policy, so perhaps this can be improved, if the feature is added. + + +- The QP port uses Zephyr scheduler locking (`k_sched_lock()/k_sched_unlock()`), which locks all threads indiscriminately. Currently Zephyr does not provide a selective scheduler locking. + +- The QP port uses the native QF memory pool (::QMPool) to implement event pools. + +- The QP port does not mandate any specific method to manage the QP time events, but the provided examples use the Zephyr timer (`struct k_timer`) to tick periodically and invoke QF_TICK_X(). + + +@subsection zephyr_build QP Source Files Needed in this QP Port +It is important to note that **NOT** all QP source files should be included. Here is the list of QP source files needed: + +@verbatim +qpc/ ++-src/ +| | +-qf/ +| | | +-qep_hsm.c +| | | +-qep_msm.c +| | | +-qf_act.c +| | | +-qf_actq.c - NOT included (implemented in Zephyr) +| | | +-qf_defer.c +| | | +-qf_dyn.c +| | | +-qf_mem.c +| | | +-qf_ps.c +| | | +-qf_qeq.c +| | | +-qf_qmact.c +| | | +-qf_time.c +| | +| | +-qs/ +| | | +-qs.c - included only in the Spy build configuration +| | | +-qs_fp.c - included only in the Spy build configuration +| ++-ports +| +-zephyr +| | +-qep_port.h +| | +-qf_port.h +| | +-qf_port.c - implementation of the Zephyr port +| | +-qs_port.h +| +@endverbatim + +@note +Specifically, the QP source files qf_actq.c must **NOT** be included in the build, because this functionality is taken from Zephyr. + + +@section zephyr_exa Examples for the Zephyr port +The example projects for this port are located in @ref exa_zephyr "examples/zephyr". @next{ports_os} */ diff --git a/doxygen/rsm.bat b/doxygen/rsm.bat index b593d3d5..521e3ad8 100644 --- a/doxygen/rsm.bat +++ b/doxygen/rsm.bat @@ -1,44 +1,44 @@ -@echo off -:: ========================================================================== -:: Product: QP/C script for running MSquared Resource Standard Metrics (RSM) -:: Last Updated for Version: 5.5.0 -:: Date of the Last Update: 2015-09-01 -:: -:: Q u a n t u m L e a P s -:: --------------------------- -:: innovating embedded systems -:: -:: Copyright (C) Quantum Leaps, LLC. All rights reserved. -:: -:: This program is open source software: you can redistribute it and/or -:: modify it under the terms of the GNU General Public License as published -:: by the Free Software Foundation, either version 3 of the License, or -:: (at your option) any later version. -:: -:: Alternatively, this program may be distributed and modified under the -:: terms of Quantum Leaps commercial licenses, which expressly supersede -:: the GNU General Public License and are specifically designed for -:: licensees interested in retaining the proprietary status of their code. -:: -:: This program is distributed in the hope that it will be useful, -:: but WITHOUT ANY WARRANTY; without even the implied warranty of -:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -:: GNU General Public License for more details. -:: -:: You should have received a copy of the GNU General Public License -:: along with this program. If not, see . -:: -:: Contact information: -:: https://state-machine.com -:: mailto:info@state-machine.com -:: ========================================================================== -setlocal - -set RCMHOME="C:\tools\MSquared\M2 RSM" - -set RSM_OUTPUT=qpc_metrics.txt -set RSM_INPUT=..\include\*.h ..\source\*.h ..\source\*.c - -%RCMHOME%\rsm.exe -fd -n -xNOCOMMAND -xNOCONFIG -u"File cfg rsm_qpc.cfg" %RSM_INPUT% > %RSM_OUTPUT% - -endlocal +@echo off +:: ========================================================================== +:: Product: QP/C script for running MSquared Resource Standard Metrics (RSM) +:: Last Updated for Version: 5.5.0 +:: Date of the Last Update: 2015-09-01 +:: +:: Q u a n t u m L e a P s +:: --------------------------- +:: innovating embedded systems +:: +:: Copyright (C) Quantum Leaps, LLC. All rights reserved. +:: +:: This program is open source software: you can redistribute it and/or +:: modify it under the terms of the GNU General Public License as published +:: by the Free Software Foundation, either version 3 of the License, or +:: (at your option) any later version. +:: +:: Alternatively, this program may be distributed and modified under the +:: terms of Quantum Leaps commercial licenses, which expressly supersede +:: the GNU General Public License and are specifically designed for +:: licensees interested in retaining the proprietary status of their code. +:: +:: This program is distributed in the hope that it will be useful, +:: but WITHOUT ANY WARRANTY; without even the implied warranty of +:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +:: GNU General Public License for more details. +:: +:: You should have received a copy of the GNU General Public License +:: along with this program. If not, see . +:: +:: Contact information: +:: https://state-machine.com +:: mailto:info@state-machine.com +:: ========================================================================== +setlocal + +set RCMHOME="C:\tools\MSquared\M2 RSM" + +set RSM_OUTPUT=qpc_metrics.txt +set RSM_INPUT=..\include\*.h ..\source\*.h ..\source\*.c + +%RCMHOME%\rsm.exe -fd -n -xNOCOMMAND -xNOCONFIG -u"File cfg rsm_qpc.cfg" %RSM_INPUT% > %RSM_OUTPUT% + +endlocal diff --git a/doxygen/rsm_qpc.cfg b/doxygen/rsm_qpc.cfg index 858fbe62..9043e313 100644 --- a/doxygen/rsm_qpc.cfg +++ b/doxygen/rsm_qpc.cfg @@ -1,7 +1,7 @@ -# ========================================================================== -# Product: Configuration file for MSquared Resource Standard Metrics (RSM) -# Last Updated for Version: 5.2.0 -# Date of the Last Update: Dec 20, 2013 +# ========================================================================== +# Product: Configuration file for MSquared Resource Standard Metrics (RSM) +# Last Updated for Version: 5.2.0 +# Date of the Last Update: Dec 20, 2013 # # Q u a n t u m L e a P s # --------------------------- @@ -31,7 +31,7 @@ # Quantum Leaps Web sites: http://www.quantum-leaps.com # http://www.state-machine.com # e-mail: info@quantum-leaps.com -# ========================================================================== +# ========================================================================== #################################################################### # RSM Operational Configuration #################################### @@ -261,7 +261,7 @@ Maximum Function Name Length : 32 # Emit a quality notice when a file does not contain # the specified key string. Quality Notice 21 : No -RSM KEY String : +RSM KEY String : # RSM Quality Notices For Stability and Maintainability ################ @@ -579,7 +579,7 @@ Quality Notice 57 : No Quality Notice 58 : No # RSM Quality Notices Miscellaneous #################################### - + # Quality Notice No. 25 # Deprecated in Version 6.70 # See settings under language extensions. diff --git a/doxygen/snippets/qa_run.c b/doxygen/snippets/qa_run.c index 51b71076..ae88fee1 100644 --- a/doxygen/snippets/qa_run.c +++ b/doxygen/snippets/qa_run.c @@ -10,7 +10,7 @@ static void __cdecl run(void *me) { /* the exact signature for _beginthread */ } while (((QActive *)me)->prio > (uint8_t)0); QActive_unsubscribeAll((QActive *)me); /* unsubscribe from all signals */ - QF_remove_((QActive *)me); /* remove this object from any subscriptions */ + QActive_unregister_((QActive *)me); /* un-register this active object */ _endthread(); /* cleanup after the thead and close the thread handle */ } diff --git a/doxygen/snippets/qep_qfsm_use.c b/doxygen/snippets/qep_qfsm_use.c index 484f4402..277f6983 100644 --- a/doxygen/snippets/qep_qfsm_use.c +++ b/doxygen/snippets/qep_qfsm_use.c @@ -8,14 +8,14 @@ static Bomb l_bomb; /* an instance of Bomb HSM */ int main() { Bomb_ctor(&l_bomb); /* Bomb "constructor" invokes QFsm_ctor() */ - QMSM_INIT(&l_bomb.super, (QEvt *)0); /* trigger initial transition */ + QHSM_INIT(&l_bomb.super, (QEvt *)0); /* trigger initial transition */ for (;;) { /* event loop */ QEvt e; . . . /* wait for the next event and assign it to the event object e */ . . . - QMSM_DISPATCH(&l_bomb.super, &e); /* dispatch e */ + QHSM_DISPATCH(&l_bomb.super, &e); /* dispatch e */ } return 0; /* never reached, needed for some compilers */ } diff --git a/doxygen/snippets/qep_qhsm_use.c b/doxygen/snippets/qep_qhsm_use.c index f4d8fc06..569f02a6 100644 --- a/doxygen/snippets/qep_qhsm_use.c +++ b/doxygen/snippets/qep_qhsm_use.c @@ -8,14 +8,14 @@ static Calc Calc_inst; /* an instance of Calc SM */ int main() { Calc_ctor(&Calc_inst); /* Calc "constructor" invokes QHsm_ctor() */ - QMSM_INIT(&Calc_inst.super, (QEvt *)0); /* trigger initial transition */ + QHSM_INIT(&Calc_inst.super, (QEvt *)0); /* trigger initial transition */ for (;;) { /* event loop */ QEvt e; . . . /* wait for the next event and assign it to the event object e */ . . . - QMSM_DISPATCH(&Calc_inst.super, &e); /* dispatch e */ + QHSM_DISPATCH(&Calc_inst.super, &e); /* dispatch e */ } return 0; } diff --git a/doxygen/snippets/qf_tevt.c b/doxygen/snippets/qf_tevt.c new file mode 100644 index 00000000..e3dca72c --- /dev/null +++ b/doxygen/snippets/qf_tevt.c @@ -0,0 +1,18 @@ +static QState Game_show_logo(Tunnel * const me, QEvt const * const e) { + QState status_; + switch (e->sig) { + /*.${AOs::Tunnel::SM::active::show_logo} */ + case Q_ENTRY_SIG: { + /* arm periodic time event */ + QTimeEvt_armX(&me->blinkTimeEvt, + BSP_TICKS_PER_SEC/2U, /* one-time delay */ + BSP_TICKS_PER_SEC/2U); /* interval */ + /* arm a one-shot time event */ + QTimeEvt_armX(&me->screenTimeEvt, + BSP_TICKS_PER_SEC*5U, /* one-time delay */ + 0U); /* interval (0 == no interval) */ + . . . + status_ = Q_HANDLED(); + break; + } + . . . diff --git a/doxygen/snippets/qf_tick.c b/doxygen/snippets/qf_tick.c index 9c6c0ef1..a33ff812 100644 --- a/doxygen/snippets/qf_tick.c +++ b/doxygen/snippets/qf_tick.c @@ -10,7 +10,7 @@ interrupt void ISR_timer() { /* entered with interrupts disabled in hardware */ QF_INT_ENABLE(); /* enable interrupts */ - QF_TICK(&l_ISR_timer); /* <--- call the QF tick processing */ + QTIMEEVT_TICK_X(0U, &l_ISR_timer); /* <--- call the QF tick processing */ QF_INT_DISABLE(); /* disable interrupts again */ /* send the EOI instruction to the Interrupt Controller */ @@ -21,5 +21,5 @@ interrupt void ISR_timer() { /* entered with interrupts disabled in hardware */ * (nesting of critical sections allowed) */ interrupt void ISR_timer() { - QF_TICK(&l_ISR_timer); /* <--- call the QF tick processing */ + QTIMEEVT_TICK_X(0U, &l_ISR_timer); /* <--- call the QF tick processing */ } diff --git a/doxygen/snippets/qf_tickx.c b/doxygen/snippets/qf_tickx.c index 2e614d5f..8eecbd26 100644 --- a/doxygen/snippets/qf_tickx.c +++ b/doxygen/snippets/qf_tickx.c @@ -10,7 +10,7 @@ interrupt void ISR_timer() { /* entered with interrupts disabled in hardware */ QF_INT_ENABLE(); /* enable interrupts */ - QF_TICK_X(0U, &l_ISR_timer); /* <--- call the QF tick processing */ + QTIMEEVT_TICK_X(0U, &l_ISR_timer); /* <--- call the QF tick processing */ QF_INT_DISABLE(); /* disable interrupts again */ /* send the EOI instruction to the Interrupt Controller */ @@ -21,5 +21,5 @@ interrupt void ISR_timer() { /* entered with interrupts disabled in hardware */ * (nesting of critical sections allowed) */ interrupt void ISR_timer() { - QF_TICK_X(1U, &l_ISR_timer); /* <--- call the QF tick processing */ + QTIMEEVT_TICK_X(1U, &l_ISR_timer); /* <--- call the QF tick processing */ } diff --git a/doxygen/snippets/qs_objArrDic.c b/doxygen/snippets/qs_objArrDic.c new file mode 100644 index 00000000..1d465f4f --- /dev/null +++ b/doxygen/snippets/qs_objArrDic.c @@ -0,0 +1,6 @@ +Philo Philo_inst[N_PHILO]; +. . . +for (uint8_t n = 0U; n < N_PHILO; ++n) { + QS_OBJ_ARR_DICTIONARY(&Philo_inst[n], n); + QS_OBJ_ARR_DICTIONARY(&Philo_inst[n].timeEvt, n); +} diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/README.md b/examples/arm-cm/blinky_efm32-slstk3401a/README.md new file mode 100644 index 00000000..0502853f --- /dev/null +++ b/examples/arm-cm/blinky_efm32-slstk3401a/README.md @@ -0,0 +1,5 @@ +![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_EFM32-SLSTK3401A.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_blinky_efm32-slstk3401a.html diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/armclang/blinky-qk.uvoptx b/examples/arm-cm/blinky_efm32-slstk3401a/qk/armclang/blinky-qk.uvoptx index 8e9d00ee..7d914f56 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/armclang/blinky-qk.uvoptx +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/armclang/blinky-qk.uvoptx @@ -103,7 +103,7 @@ 1 0 0 - 3 + 4 diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/armclang/blinky-qk.uvprojx b/examples/arm-cm/blinky_efm32-slstk3401a/qk/armclang/blinky-qk.uvprojx index f1de65e3..7f9a52b1 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/armclang/blinky-qk.uvprojx +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/armclang/blinky-qk.uvprojx @@ -10,13 +10,13 @@ blinky-dbg 0x4 ARM-ADS - 6130001::V6.13.1::.\ARMCLANG + 6160000::V6.16::ARMCLANG 1 EFM32PG1B200F256GM48 Silicon Labs - SiliconLabs.EFM32PG1B_DFP.5.5.0 + SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0 https://www.silabs.com/documents/public/cmsis-packs/ IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -339,7 +339,7 @@ EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -641,7 +641,7 @@ EFM32PG1B200F256GM48 Silicon Labs - SiliconLabs.EFM32PG1B_DFP.5.5.0 + SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0 https://www.silabs.com/documents/public/cmsis-packs/ IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -964,7 +964,7 @@ NDEBUG EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1266,7 +1266,7 @@ EFM32PG1B200F256GM48 Silicon Labs - SiliconLabs.EFM32PG1B_DFP.5.5.0 + SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0 https://www.silabs.com/documents/public/cmsis-packs/ IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -1589,7 +1589,7 @@ Q_SPY EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/bsp.c b/examples/arm-cm/blinky_efm32-slstk3401a/qk/bsp.c index b62bd9b3..1ee3743b 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/bsp.c +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/bsp.c @@ -62,7 +62,7 @@ void SysTick_Handler(void); /* ISRs used in this project ===============================================*/ void SysTick_Handler(void) { QK_ISR_ENTRY(); /* inform QK about entering an ISR */ - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ QK_ISR_EXIT(); /* inform QK about exiting an ISR */ } diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/gnu/Makefile b/examples/arm-cm/blinky_efm32-slstk3401a/qk/gnu/Makefile index a13c5166..f708ac68 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/gnu/Makefile +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32-SLSTK3401A, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/gnu/flash.bat b/examples/arm-cm/blinky_efm32-slstk3401a/qk/gnu/flash.bat index 5cbe3607..0ca15c72 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/gnu/flash.bat +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/gnu/flash.bat @@ -1,49 +1,49 @@ -::============================================================================ -:: Batch file to program the flash of EFM32-SLSTK3401A board -:: -:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: -:: https://www.segger.com/j-link-commander.html -:: -setlocal - -@echo off -@echo Load a given binary file to the flash of EFM32-SLSTK3401A -@echo usage: flash bin-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: JLink utility on your machine -:: -if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink -if not exist "%JLINK%\JLink.exe" ( - @echo The JLink tool not found. Please adjust flash.bat - @goto end -) - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -:: generate the Jlink command file depending on the first parameter %1 -@echo si 1 >flash.jlink -@echo speed 4000 >>flash.jlink -@echo r >>flash.jlink -@echo h >>flash.jlink -@echo loadbin %1, 0 >>flash.jlink -@echo exit >>flash.jlink - -@echo on -%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink -@echo off - -@del flash.jlink - -:end - +::============================================================================ +:: Batch file to program the flash of EFM32-SLSTK3401A board +:: +:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: +:: https://www.segger.com/j-link-commander.html +:: +setlocal + +@echo off +@echo Load a given binary file to the flash of EFM32-SLSTK3401A +@echo usage: flash bin-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: JLink utility on your machine +:: +if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink +if not exist "%JLINK%\JLink.exe" ( + @echo The JLink tool not found. Please adjust flash.bat + @goto end +) + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +:: generate the Jlink command file depending on the first parameter %1 +@echo si 1 >flash.jlink +@echo speed 4000 >>flash.jlink +@echo r >>flash.jlink +@echo h >>flash.jlink +@echo loadbin %1, 0 >>flash.jlink +@echo exit >>flash.jlink + +@echo on +%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink +@echo off + +@del flash.jlink + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.ewd b/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.ewd index cdfd1002..3d290294 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.ewd +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.ewp b/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.ewp index f60ea4c0..772f3589 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.ewp +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.ewp @@ -1,3187 +1,3184 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky.c - - - $PROJ_DIR$\..\..\blinky.h - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - - efm32pg1b - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky.c + + + $PROJ_DIR$\..\..\blinky.h + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + + efm32pg1b + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.eww b/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.eww index ac3c18a2..c9924856 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.eww +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\blinky-qk.ewp - - - - - + + + + + $WS_DIR$\blinky-qk.ewp + + + + + diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.icf b/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.icf +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qk/iar/blinky-qk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qv/armclang/blinky-qv.uvprojx b/examples/arm-cm/blinky_efm32-slstk3401a/qv/armclang/blinky-qv.uvprojx index c66b9772..20459ea7 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qv/armclang/blinky-qv.uvprojx +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qv/armclang/blinky-qv.uvprojx @@ -338,7 +338,7 @@ EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -962,7 +962,7 @@ NDEBUG EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1586,7 +1586,7 @@ Q_SPY EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qv/bsp.c b/examples/arm-cm/blinky_efm32-slstk3401a/qv/bsp.c index 271f389a..274acbbb 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qv/bsp.c +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qv/bsp.c @@ -61,7 +61,7 @@ void SysTick_Handler(void); /* ISRs used in this project ===============================================*/ void SysTick_Handler(void) { - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ QV_ARM_ERRATUM_838869(); } diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qv/gnu/Makefile b/examples/arm-cm/blinky_efm32-slstk3401a/qv/gnu/Makefile index 4301eb45..24d184a6 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qv/gnu/Makefile +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32-SLSTK3401A, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qv/gnu/flash.bat b/examples/arm-cm/blinky_efm32-slstk3401a/qv/gnu/flash.bat index 5cbe3607..0ca15c72 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qv/gnu/flash.bat +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qv/gnu/flash.bat @@ -1,49 +1,49 @@ -::============================================================================ -:: Batch file to program the flash of EFM32-SLSTK3401A board -:: -:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: -:: https://www.segger.com/j-link-commander.html -:: -setlocal - -@echo off -@echo Load a given binary file to the flash of EFM32-SLSTK3401A -@echo usage: flash bin-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: JLink utility on your machine -:: -if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink -if not exist "%JLINK%\JLink.exe" ( - @echo The JLink tool not found. Please adjust flash.bat - @goto end -) - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -:: generate the Jlink command file depending on the first parameter %1 -@echo si 1 >flash.jlink -@echo speed 4000 >>flash.jlink -@echo r >>flash.jlink -@echo h >>flash.jlink -@echo loadbin %1, 0 >>flash.jlink -@echo exit >>flash.jlink - -@echo on -%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink -@echo off - -@del flash.jlink - -:end - +::============================================================================ +:: Batch file to program the flash of EFM32-SLSTK3401A board +:: +:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: +:: https://www.segger.com/j-link-commander.html +:: +setlocal + +@echo off +@echo Load a given binary file to the flash of EFM32-SLSTK3401A +@echo usage: flash bin-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: JLink utility on your machine +:: +if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink +if not exist "%JLINK%\JLink.exe" ( + @echo The JLink tool not found. Please adjust flash.bat + @goto end +) + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +:: generate the Jlink command file depending on the first parameter %1 +@echo si 1 >flash.jlink +@echo speed 4000 >>flash.jlink +@echo r >>flash.jlink +@echo h >>flash.jlink +@echo loadbin %1, 0 >>flash.jlink +@echo exit >>flash.jlink + +@echo on +%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink +@echo off + +@del flash.jlink + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.ewd b/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.ewd index a20e498b..b3ebdf84 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.ewd +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.ewd @@ -1,4459 +1,4459 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 32 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 1 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 7 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8b.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8bBE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 32 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 0 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 7 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8b.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8bBE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 32 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 1 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 7 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8b.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8bBE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 32 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 1 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 7 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8b.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8bBE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 32 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 0 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 7 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8b.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8bBE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 32 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 1 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 7 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8b.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8bBE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.ewp b/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.ewp index 98c6b97c..3d0ec8a9 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.ewp +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.ewp @@ -1,3325 +1,3322 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 36 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 36 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 36 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - - Application - - $PROJ_DIR$\..\..\blinky.c - - - $PROJ_DIR$\..\..\blinky.h - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - - efm32pg1b - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 36 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 36 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 36 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + + Application + + $PROJ_DIR$\..\..\blinky.c + + + $PROJ_DIR$\..\..\blinky.h + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + + efm32pg1b + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.eww b/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.eww index 109eebbd..fa7c7731 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.eww +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\blinky-qv.ewp - - - - - + + + + + $WS_DIR$\blinky-qv.ewp + + + + + diff --git a/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.icf b/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.icf index 02e3a787..565bb4c0 100644 --- a/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.icf +++ b/examples/arm-cm/blinky_efm32-slstk3401a/qv/iar/blinky-qv.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 512; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 512; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/README.md b/examples/arm-cm/blinky_ek-tm4c123gxl/README.md new file mode 100644 index 00000000..9409465a --- /dev/null +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/README.md @@ -0,0 +1,5 @@ +![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_EK-TM4C123GXL.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_blinky_ek-tm4c123gxl.html diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/armclang/blinky-qk.uvprojx b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/armclang/blinky-qk.uvprojx index 42d13b45..6aea1735 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/armclang/blinky-qk.uvprojx +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/armclang/blinky-qk.uvprojx @@ -338,7 +338,7 @@ __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -957,7 +957,7 @@ NDEBUG __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -1576,7 +1576,7 @@ Q_SPY __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.c b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.c index ce2739d8..e0bec97c 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.c +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.c @@ -62,7 +62,7 @@ void GPIOPortA_IRQHandler(void); /* ISRs used in this project ===============================================*/ void SysTick_Handler(void) { QK_ISR_ENTRY(); /* inform QK about entering an ISR */ - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ QK_ISR_EXIT(); /* inform QK about exiting an ISR */ } diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile index c8df0838..cdab6888 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/flash.bat b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/flash.bat index 7fa47fc2..8f88a12e 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/flash.bat +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewd b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewd index 504eef52..3566d6b2 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewd +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewp b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewp index 02b0aeb9..3d75eebb 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewp +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.ewp @@ -1,3176 +1,3173 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky.c - - - $PROJ_DIR$\..\..\blinky.h - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky.c + + + $PROJ_DIR$\..\..\blinky.h + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.eww b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.eww index ac3c18a2..c9924856 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.eww +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\blinky-qk.ewp - - - - - + + + + + $WS_DIR$\blinky-qk.ewp + + + + + diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.icf b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.icf +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/iar/blinky-qk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/armclang/blinky-qv.uvprojx b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/armclang/blinky-qv.uvprojx index 247f2e01..61664877 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/armclang/blinky-qv.uvprojx +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/armclang/blinky-qv.uvprojx @@ -339,7 +339,7 @@ __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -959,7 +959,7 @@ NDEBUG __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -1579,7 +1579,7 @@ Q_SPY __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.c b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.c index bbaef051..49b8cb79 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.c +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.c @@ -61,7 +61,7 @@ void GPIOPortA_IRQHandler(void); /* ISRs used in this project ===============================================*/ void SysTick_Handler(void) { - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ QV_ARM_ERRATUM_838869(); } diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile index 935bf293..e6b31df4 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/flash.bat b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/flash.bat index 7fa47fc2..8f88a12e 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/flash.bat +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewd b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewd index 7fb0635d..3c81d8df 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewd +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewd @@ -1,4462 +1,4462 @@ - - - - 2 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 26 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - XDS100_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 26 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 0 - - - - - - - - - IJET_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - XDS100_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 26 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - XDS100_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - - + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewp b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewp index 08161581..9879444e 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewp +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.ewp @@ -1,3026 +1,3023 @@ - - - - 2 - - Debug - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 24 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky.c - - - $PROJ_DIR$\..\..\blinky.h - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qv_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - - + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 24 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky.c + + + $PROJ_DIR$\..\..\blinky.h + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qv_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + + diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.eww b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.eww index 109eebbd..fa7c7731 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.eww +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\blinky-qv.ewp - - - - - + + + + + $WS_DIR$\blinky-qv.ewp + + + + + diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.icf b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.icf +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/iar/blinky-qv.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/README.md b/examples/arm-cm/dpp_efm32-slstk3401a/README.md new file mode 100644 index 00000000..5aa38775 --- /dev/null +++ b/examples/arm-cm/dpp_efm32-slstk3401a/README.md @@ -0,0 +1,5 @@ +![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_EFM32-SLSTK3401A.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_dpp_efm32-slstk3401a.html diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.h b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.h index fdaed5f9..75a30818 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.h +++ b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -36,8 +48,9 @@ enum { N_PHILO = 5 /* number of Philos */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -45,26 +58,30 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ -void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::Table_ctor} .......................................................*/ +void Table_ctor(void); +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ /* opaque pointer to the Table AO */ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(uint8_t n); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ /* opaque pointers to the Philo AOs */ extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -74,3 +91,4 @@ extern QActive * const AO_Philo[N_PHILO]; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm index eb7d5413..91961614 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm +++ b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -111,7 +110,7 @@ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); @@ -190,7 +189,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -213,7 +212,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -255,7 +254,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -266,7 +265,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/philo.c b/examples/arm-cm/dpp_efm32-slstk3401a/philo.c index 1c84fc10..8e5bdb91 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/philo.c +++ b/examples/arm-cm/dpp_efm32-slstk3401a/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("philo") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct Philo { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* helper macros to provide a randomized think time for Philos */ #define THINK_TIME \ @@ -53,16 +66,16 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); #define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) /* Global objects ----------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointers to the Philo AOs */ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { &Philo_inst[0].super, &Philo_inst[1].super, @@ -70,23 +83,26 @@ QActive * const AO_Philo[N_PHILO] = { &Philo_inst[3].super, &Philo_inst[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Philo definition --------------------------------------------------------*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(uint8_t n) { Philo *me = &Philo_inst[n]; QActive_ctor(&me->super, Q_STATE_CAST(&Philo_initial)); QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ Philo Philo_inst[N_PHILO]; -/*.${AOs::Philo::SM} .......................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ (void)par; /* unused parameter */ static bool registered = false; @@ -114,28 +130,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -150,11 +167,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -162,9 +180,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -173,7 +191,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -187,31 +205,32 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -226,4 +245,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.uvoptx b/examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.uvoptx index bcaaf851..62271c53 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.uvoptx +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.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 - 3 + 4 @@ -117,6 +117,11 @@ Segger\JL2CM3.dll + + 0 + DLGUARM + + 0 JL2CM3 @@ -135,7 +140,7 @@ 0 DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + (1010=1121,593,1571,1150,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) 0 @@ -975,7 +980,7 @@ 4 30 1 - 0 + 1 0 0 ..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.c diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.uvprojx b/examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.uvprojx index cdbb3a2d..5701d538 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.uvprojx +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.uvprojx @@ -10,13 +10,13 @@ dpp-dbg 0x4 ARM-ADS - 6130001::V6.13.1::.\ARMCLANG + 6160000::V6.16::ARMCLANG 1 EFM32PG1B200F256GM48 Silicon Labs - SiliconLabs.EFM32PG1B_DFP.5.5.0 + SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0 https://www.silabs.com/documents/public/cmsis-packs/ IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -185,6 +185,7 @@ 0 2 0 + 0 0 0 8 @@ -338,7 +339,7 @@ EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -351,7 +352,7 @@ 0 1 0 - 0 + 4 Stack_Size=1024 Heap_Size=16 @@ -546,6 +547,57 @@ qk_port.c 1 ..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.c + + + 2 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + + QK_USE_IRQ_NUM=25 QK_USE_IRQ_HANDLER=CRYPTO_IRQHandler + + + + + + qk_port.h @@ -620,7 +672,7 @@ 2 2 2 - 2 + 0 @@ -665,7 +717,7 @@ EFM32PG1B200F256GM48 Silicon Labs - SiliconLabs.EFM32PG1B_DFP.5.5.0 + SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0 https://www.silabs.com/documents/public/cmsis-packs/ IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -834,6 +886,7 @@ 0 2 0 + 0 0 0 8 @@ -987,7 +1040,7 @@ NDEBUG EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1000,7 +1053,7 @@ 0 1 0 - 0 + 4 Stack_Size=1024 Heap_Size=16 @@ -1269,7 +1322,7 @@ 2 2 2 - 2 + 0 @@ -1314,7 +1367,7 @@ EFM32PG1B200F256GM48 Silicon Labs - SiliconLabs.EFM32PG1B_DFP.5.5.0 + SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0 https://www.silabs.com/documents/public/cmsis-packs/ IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -1483,6 +1536,7 @@ 0 2 0 + 0 0 0 8 @@ -1636,7 +1690,7 @@ Q_SPY EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1649,7 +1703,7 @@ 0 1 0 - 0 + 4 Stack_Size=1024 Heap_Size=16 diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.c b/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.c index 0963c057..c66534d4 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.c +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.c @@ -96,7 +96,7 @@ void SysTick_Handler(void) { } #endif - //QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + //QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ QACTIVE_POST(the_Ticker0, 0, &l_SysTick_Handler); /* post to Ticker0 */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -112,11 +112,11 @@ void SysTick_Handler(void) { if ((tmp & (1U << PB0_PIN)) != 0U) { /* debounced PB0 state changed? */ if ((buttons.depressed & (1U << PB0_PIN)) != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/Makefile b/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/Makefile index e24d0bfc..42d8cba6 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32-SLSTK3401A, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b @@ -138,7 +137,9 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DEFM32PG1B200F256GM48=1 +DEFINES := -DEFM32PG1B200F256GM48=1 \ + -DQK_USE_IRQ_NUM=25 \ + -DQK_USE_IRQ_HANDLER=CRYPTO_IRQHandler # 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/qk/gnu/flash.bat b/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/flash.bat index 5cbe3607..0ca15c72 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/flash.bat +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/flash.bat @@ -1,49 +1,49 @@ -::============================================================================ -:: Batch file to program the flash of EFM32-SLSTK3401A board -:: -:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: -:: https://www.segger.com/j-link-commander.html -:: -setlocal - -@echo off -@echo Load a given binary file to the flash of EFM32-SLSTK3401A -@echo usage: flash bin-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: JLink utility on your machine -:: -if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink -if not exist "%JLINK%\JLink.exe" ( - @echo The JLink tool not found. Please adjust flash.bat - @goto end -) - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -:: generate the Jlink command file depending on the first parameter %1 -@echo si 1 >flash.jlink -@echo speed 4000 >>flash.jlink -@echo r >>flash.jlink -@echo h >>flash.jlink -@echo loadbin %1, 0 >>flash.jlink -@echo exit >>flash.jlink - -@echo on -%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink -@echo off - -@del flash.jlink - -:end - +::============================================================================ +:: Batch file to program the flash of EFM32-SLSTK3401A board +:: +:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: +:: https://www.segger.com/j-link-commander.html +:: +setlocal + +@echo off +@echo Load a given binary file to the flash of EFM32-SLSTK3401A +@echo usage: flash bin-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: JLink utility on your machine +:: +if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink +if not exist "%JLINK%\JLink.exe" ( + @echo The JLink tool not found. Please adjust flash.bat + @goto end +) + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +:: generate the Jlink command file depending on the first parameter %1 +@echo si 1 >flash.jlink +@echo speed 4000 >>flash.jlink +@echo r >>flash.jlink +@echo h >>flash.jlink +@echo loadbin %1, 0 >>flash.jlink +@echo exit >>flash.jlink + +@echo on +%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink +@echo off + +@del flash.jlink + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.ewd b/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.ewd index f6eedd1b..42451eb1 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.ewd +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.ewp index 4c623b5c..0445cbd3 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.ewp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.ewp @@ -1,3283 +1,3529 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - efm32pg1b - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + efm32pg1b + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + Debug + + ICCARM + + 37 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.eww b/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.eww index b41c128d..c261124a 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.eww +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qk.ewp - - - - - + + + + + $WS_DIR$\dpp-qk.ewp + + + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.icf b/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.icf +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/armclang/dpp-qv.uvprojx b/examples/arm-cm/dpp_efm32-slstk3401a/qv/armclang/dpp-qv.uvprojx index c5469eb3..fce050c0 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/armclang/dpp-qv.uvprojx +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/armclang/dpp-qv.uvprojx @@ -338,7 +338,7 @@ EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -987,7 +987,7 @@ NDEBUG EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1636,7 +1636,7 @@ Q_SPY EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.c b/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.c index 4ff03758..1b5e4d7f 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.c +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.c @@ -94,7 +94,7 @@ void SysTick_Handler(void) { } #endif - //QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + //QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ QACTIVE_POST(the_Ticker0, 0, &l_SysTick_Handler); /* post to Ticker0 */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -110,11 +110,11 @@ void SysTick_Handler(void) { if ((tmp & (1U << PB0_PIN)) != 0U) { /* debounced PB0 state changed? */ if ((buttons.depressed & (1U << PB0_PIN)) != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } QV_ARM_ERRATUM_838869(); diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile index 3a39367f..33ee9d08 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32-SLSTK3401A, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/flash.bat b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/flash.bat index 5cbe3607..0ca15c72 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/flash.bat +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/flash.bat @@ -1,49 +1,49 @@ -::============================================================================ -:: Batch file to program the flash of EFM32-SLSTK3401A board -:: -:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: -:: https://www.segger.com/j-link-commander.html -:: -setlocal - -@echo off -@echo Load a given binary file to the flash of EFM32-SLSTK3401A -@echo usage: flash bin-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: JLink utility on your machine -:: -if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink -if not exist "%JLINK%\JLink.exe" ( - @echo The JLink tool not found. Please adjust flash.bat - @goto end -) - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -:: generate the Jlink command file depending on the first parameter %1 -@echo si 1 >flash.jlink -@echo speed 4000 >>flash.jlink -@echo r >>flash.jlink -@echo h >>flash.jlink -@echo loadbin %1, 0 >>flash.jlink -@echo exit >>flash.jlink - -@echo on -%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink -@echo off - -@del flash.jlink - -:end - +::============================================================================ +:: Batch file to program the flash of EFM32-SLSTK3401A board +:: +:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: +:: https://www.segger.com/j-link-commander.html +:: +setlocal + +@echo off +@echo Load a given binary file to the flash of EFM32-SLSTK3401A +@echo usage: flash bin-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: JLink utility on your machine +:: +if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink +if not exist "%JLINK%\JLink.exe" ( + @echo The JLink tool not found. Please adjust flash.bat + @goto end +) + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +:: generate the Jlink command file depending on the first parameter %1 +@echo si 1 >flash.jlink +@echo speed 4000 >>flash.jlink +@echo r >>flash.jlink +@echo h >>flash.jlink +@echo loadbin %1, 0 >>flash.jlink +@echo exit >>flash.jlink + +@echo on +%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink +@echo off + +@del flash.jlink + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewd b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewd index f6eedd1b..42451eb1 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewd +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewp index 4af2989f..2e7dfdcf 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.ewp @@ -1,3190 +1,3187 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - efm32pg1b - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + efm32pg1b + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.eww index 8999816a..b96f3f62 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.eww +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qv.ewp - - - - - + + + + + $WS_DIR$\dpp-qv.ewp + + + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.icf b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.icf +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/iar/dpp-qv.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qview/qview-dpp.bat b/examples/arm-cm/dpp_efm32-slstk3401a/qview/qview-dpp.bat index 3ac56aa6..b36e43d6 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qview/qview-dpp.bat +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qview/qview-dpp.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp.py + +@endlocal diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qview/qview-dpp1.bat b/examples/arm-cm/dpp_efm32-slstk3401a/qview/qview-dpp1.bat index e4180394..8bdb9ce5 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qview/qview-dpp1.bat +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qview/qview-dpp1.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp1.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp1.py + +@endlocal diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvoptx b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvoptx index 5262d039..aa91b798 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvoptx +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvoptx @@ -103,7 +103,7 @@ 1 0 0 - 3 + 4 @@ -120,7 +120,7 @@ 0 DLGUARM - / + 0 @@ -491,7 +491,7 @@ 1 0 0 - 3 + 4 diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvprojx b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvprojx index 0e42e569..03154910 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvprojx +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvprojx @@ -16,7 +16,7 @@ EFM32PG1B200F256GM48 Silicon Labs - SiliconLabs.EFM32PG1B_DFP.5.5.0 + SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0 https://www.silabs.com/documents/public/cmsis-packs/ IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -339,7 +339,7 @@ EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -572,6 +572,57 @@ qxk_port.c 1 ..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.c + + + 2 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + + QXK_USE_IRQ_NUM=25 QXK_USE_IRQ_HANDLER=CRYPTO_IRQHandler + + + + + + qxk_port.h @@ -686,7 +737,7 @@ EFM32PG1B200F256GM48 Silicon Labs - SiliconLabs.EFM32PG1B_DFP.5.5.0 + SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0 https://www.silabs.com/documents/public/cmsis-packs/ IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -1009,7 +1060,7 @@ NDEBUG EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1350,13 +1401,13 @@ dpp-spy 0x4 ARM-ADS - 6070000::V6.7::.\ARMCLANG + 6160000::V6.16::ARMCLANG 1 EFM32PG1B200F256GM48 Silicon Labs - SiliconLabs.EFM32PG1B_DFP.5.5.0 + SiliconLabs.GeckoPlatform_EFM32PG1B_DFP.4.0.0 https://www.silabs.com/documents/public/cmsis-packs/ IRAM(0x20000000,0x00008000) IROM(0x00000000,0x00020000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -1679,7 +1730,7 @@ Q_SPY EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.c b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.c index 8fd3105a..d12cc00a 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.c +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.c @@ -97,7 +97,7 @@ void SysTick_Handler(void) { } #endif - /*QF_TICK_X(0U, &l_SysTick_Handler);*/ /* process time events for rate 0 */ + /*QTIMEEVT_TICK_X(0U, &l_SysTick_Handler);*/ /* process time events for rate 0 */ QACTIVE_POST(the_Ticker0, 0, &l_SysTick_Handler); /* post to Ticker0 */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -113,11 +113,11 @@ void SysTick_Handler(void) { if ((tmp & (1U << PB0_PIN)) != 0U) { /* debounced PB0 state changed? */ if ((buttons.depressed & (1U << PB0_PIN)) != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } @@ -131,7 +131,7 @@ void GPIO_EVEN_IRQHandler(void) { /* for testing, NOTE03 */ QACTIVE_POST(AO_Table, Q_NEW(QEvt, TEST_SIG), &l_GPIO_EVEN_IRQHandler); */ - QF_PUBLISH(Q_NEW(QEvt, TEST_SIG), /* for testing... */ + QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG), /* for testing... */ &l_GPIO_EVEN_IRQHandler); QXK_ISR_EXIT(); /* inform QXK about exiting an ISR */ diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile index d93f2055..e78023c4 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.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005-2022 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 @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b @@ -142,7 +141,9 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DEFM32PG1B200F256GM48=1 +DEFINES := -DEFM32PG1B200F256GM48=1 \ + -DQXK_USE_IRQ_NUM=25 \ + -DQXK_USE_IRQ_HANDLER=CRYPTO_IRQHandler # 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/qxk/gnu/flash.bat b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/flash.bat index 5cbe3607..0ca15c72 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/flash.bat +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/flash.bat @@ -1,49 +1,49 @@ -::============================================================================ -:: Batch file to program the flash of EFM32-SLSTK3401A board -:: -:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: -:: https://www.segger.com/j-link-commander.html -:: -setlocal - -@echo off -@echo Load a given binary file to the flash of EFM32-SLSTK3401A -@echo usage: flash bin-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: JLink utility on your machine -:: -if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink -if not exist "%JLINK%\JLink.exe" ( - @echo The JLink tool not found. Please adjust flash.bat - @goto end -) - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -:: generate the Jlink command file depending on the first parameter %1 -@echo si 1 >flash.jlink -@echo speed 4000 >>flash.jlink -@echo r >>flash.jlink -@echo h >>flash.jlink -@echo loadbin %1, 0 >>flash.jlink -@echo exit >>flash.jlink - -@echo on -%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink -@echo off - -@del flash.jlink - -:end - +::============================================================================ +:: Batch file to program the flash of EFM32-SLSTK3401A board +:: +:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: +:: https://www.segger.com/j-link-commander.html +:: +setlocal + +@echo off +@echo Load a given binary file to the flash of EFM32-SLSTK3401A +@echo usage: flash bin-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: JLink utility on your machine +:: +if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink +if not exist "%JLINK%\JLink.exe" ( + @echo The JLink tool not found. Please adjust flash.bat + @goto end +) + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +:: generate the Jlink command file depending on the first parameter %1 +@echo si 1 >flash.jlink +@echo speed 4000 >>flash.jlink +@echo r >>flash.jlink +@echo h >>flash.jlink +@echo loadbin %1, 0 >>flash.jlink +@echo exit >>flash.jlink + +@echo on +%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink +@echo off + +@del flash.jlink + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.ewd b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.ewd index f6eedd1b..42451eb1 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.ewd +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.ewp b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.ewp index d1406338..6be6ae09 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.ewp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.ewp @@ -1,3298 +1,3544 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - $PROJ_DIR$\..\test.c - - - - efm32pg1b - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + $PROJ_DIR$\..\test.c + + + + efm32pg1b + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c + + Debug + + ICCARM + + 37 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.eww b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.eww index e7d75f8b..38808ca3 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.eww +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qxk.ewp - - - - - + + + + + $WS_DIR$\dpp-qxk.ewp + + + + + diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.icf b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.icf +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/iar/dpp-qxk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/test.c b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/test.c index 72f586b9..3754ec42 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/test.c +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/test.c @@ -88,7 +88,7 @@ static void Thread1_run(QXThread * const me) { QXThread_delay(BSP_TICKS_PER_SEC/7); /* BLOCK */ /* publish to thread2 */ - //QF_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); + //QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); /* test TLS */ lib_fun(1U); diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/table.c b/examples/arm-cm/dpp_efm32-slstk3401a/table.c index fc6ec47e..6a07175b 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/table.c +++ b/examples/arm-cm/dpp_efm32-slstk3401a/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("table") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -42,7 +55,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -50,22 +63,23 @@ static QState Table_paused(Table * const me, QEvt const * const e); #define USED ((uint8_t)1) /* Global-scope objects ----------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointer to the Table AO */ -/*.${AOs::AO_Table} ........................................................*/ +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &Table_inst.super; -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*..........................................................................*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { Table *me = &Table_inst; @@ -76,13 +90,15 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ Table Table_inst; -/*.${AOs::Table::SM} .......................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ (void)par; /* unused parameter */ QS_OBJ_DICTIONARY(&Table_inst); @@ -104,11 +120,12 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR_ID(60); status_ = Q_HANDLED(); @@ -121,11 +138,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -139,7 +157,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -147,7 +165,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -157,25 +175,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -199,7 +217,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -210,13 +228,13 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -228,28 +246,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -259,7 +278,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -284,4 +303,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/bsp.c b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/bsp.c index 0e4f067f..a17410a4 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/bsp.c +++ b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/bsp.c @@ -226,7 +226,7 @@ void QF_onCleanup(void) { } /*..........................................................................*/ void QF_onClockTick(void) { - QF_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ QS_RX_INPUT(); /* handle the QS-RX input */ QS_OUTPUT(); /* handle the QS output */ diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.sln b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.sln index 3c880063..2daa822a 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.sln +++ b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.sln @@ -1,23 +1,23 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpp-gui", "dpp-gui.vcxproj", "{79027B25-0949-4F66-9765-4EFBCBBEFB94}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - QSpy|Win32 = QSpy|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.ActiveCfg = Debug|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.Build.0 = Debug|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.ActiveCfg = Release|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.Build.0 = Release|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.Build.0 = QSpy|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpp-gui", "dpp-gui.vcxproj", "{79027B25-0949-4F66-9765-4EFBCBBEFB94}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + QSpy|Win32 = QSpy|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.ActiveCfg = Debug|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.Build.0 = Debug|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.ActiveCfg = Release|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.Build.0 = Release|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.ActiveCfg = QSpy|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.Build.0 = QSpy|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj index af1e295e..d63f8441 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj +++ b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj @@ -1,274 +1,274 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - QSpy - Win32 - - - - {79027B25-0949-4F66-9765-4EFBCBBEFB94} - dpp-gui - 10.0 - - - - Application - false - NotSet - v142 - - - Application - false - NotSet - v142 - - - Application - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(Configuration)\ - $(Configuration)\ - false - false - $(Configuration)\ - $(Configuration)\ - false - false - $(Configuration)\ - $(Configuration)\ - false - false - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/dpp-gui.tlb - - - - - MaxSpeed - OnlyExplicitInline - .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;QWIN_GUI;_WINDOWS;%(PreprocessorDefinitions) - false - - - MultiThreaded - true - - - $(IntDir) - $(IntDir) - $(IntDir) - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - Windows - false - - - MachineX86 - - - true - .\Release/dpp-gui.bsc - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\QSpy/dpp-gui.tlb - - - - - Disabled - .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - - - $(IntDir) - $(IntDir) - $(IntDir) - true - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - false - - - Windows - false - - - MachineX86 - - - true - .\QSpy/dpp-gui.bsc - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/dpp-gui.tlb - - - - - Disabled - .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - - - $(IntDir) - $(IntDir) - $(IntDir) - true - Level3 - true - ProgramDatabase - Default - - - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - false - - - Windows - false - - - MachineX86 - - - true - .\Debug/dpp-gui.bsc - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + QSpy + Win32 + + + + {79027B25-0949-4F66-9765-4EFBCBBEFB94} + dpp-gui + 10.0 + + + + Application + false + NotSet + v142 + + + Application + false + NotSet + v142 + + + Application + false + NotSet + v142 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(Configuration)\ + $(Configuration)\ + false + false + $(Configuration)\ + $(Configuration)\ + false + false + $(Configuration)\ + $(Configuration)\ + false + false + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/dpp-gui.tlb + + + + + MaxSpeed + OnlyExplicitInline + .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) + NDEBUG;QWIN_GUI;_WINDOWS;%(PreprocessorDefinitions) + false + + + MultiThreaded + true + + + $(IntDir) + $(IntDir) + $(IntDir) + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + true + ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + Windows + false + + + MachineX86 + + + true + .\Release/dpp-gui.bsc + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\QSpy/dpp-gui.tlb + + + + + Disabled + .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + + + $(IntDir) + $(IntDir) + $(IntDir) + true + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + true + ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + false + + + Windows + false + + + MachineX86 + + + true + .\QSpy/dpp-gui.bsc + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/dpp-gui.tlb + + + + + Disabled + .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) + QWIN_GUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + + + $(IntDir) + $(IntDir) + $(IntDir) + true + Level3 + true + ProgramDatabase + Default + + + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + true + ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + false + + + Windows + false + + + MachineX86 + + + true + .\Debug/dpp-gui.bsc + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj.filters b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj.filters index aa3d9f0f..dbe18d91 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj.filters +++ b/examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/dpp-gui.vcxproj.filters @@ -1,46 +1,46 @@ - - - - - - - - - - - - - - - - - Res - - - Res - - - Res - - - Res - - - Res - - - Res - - - Res - - - - - {c8d4d732-dcf8-4466-ad8e-3f15ab6fe204} - - - - - + + + + + + + + + + + + + + + + + Res + + + Res + + + Res + + + Res + + + Res + + + Res + + + Res + + + + + {c8d4d732-dcf8-4466-ad8e-3f15ab6fe204} + + + + + \ No newline at end of file diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/README.md b/examples/arm-cm/dpp_ek-tm4c123gxl/README.md new file mode 100644 index 00000000..475bd03a --- /dev/null +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/README.md @@ -0,0 +1,5 @@ +![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_EK-TM4C123GXL.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_dpp_ek-tm4c123gxl.html diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.h b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.h index ac653632..6a215191 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.h +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.4 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm index cc0aea5c..2d91c7d0 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 @@ -120,7 +120,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -213,7 +213,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -236,7 +236,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -278,7 +278,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -289,7 +289,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/lin.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/lin.bat index ed50edff..0d3e52e3 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/lin.bat +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/lin.bat @@ -1,64 +1,64 @@ -@echo off -:: =========================================================================== -:: Batch script for running PC-Lint-Plus -:: Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. -:: -:: SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial -:: -:: This software is dual-licensed under the terms of the open source GNU -:: General Public License version 3 (or any later version), or alternatively, -:: under the terms of one of the closed source Quantum Leaps commercial -:: licenses. -:: -:: The terms of the open source GNU General Public License version 3 -:: can be found at: -:: -:: The terms of the closed source Quantum Leaps commercial licenses -:: can be found at: -:: -:: Redistributions in source code must retain this top-level comment block. -:: Plagiarizing this software to sidestep the license obligations is illegal. -:: -:: Contact information: -:: -:: -:: =========================================================================== -@setlocal - -:: usage of lin.bat -@echo Usage: lin [16bit] [-d...] [files...] -@echo examples: -@echo lin ..\table.c : use 32bit CPU (default) for linting ..\table.c -@echo lin 16bit -dQ_SPY ..\philo.c : use 16bit CPU and define Q_SPY for linting ..\philo.c -@echo lin ..\philo.c ..\table.c : use 32bit CPU for linting ..\philo.c and ..\table.c -@echo. - -:: NOTE: adjust to for your installation directory of PC-Lint-Plus -@set PCLP=C:\tools\lint-plus\windows\pclp32.exe - -if NOT exist "%PCLP%" ( - @echo The PC-Lint-Plus toolset not found. Please adjust lin.bat - @goto end -) - -:: set the QP/C directory -set QPC=..\..\..\.. -set QPC_LINT=%QPC%\ports\lint-plus - -if "%1"=="16bit" ( - set LINTFLAGS=%QPC_LINT%\std.lnt -i%QPC_LINT%\16bit options.lnt %2 %3 %4 %5 %6 %7 %8 - @echo 16bit CPU -) else ( - set LINTFLAGS=%QPC_LINT%\std.lnt -i%QPC_LINT%\32bit options.lnt %1 %2 %3 %4 %6 %7 %8 - @echo 32bit CPU (default) -) - -:: cleanup -@del *.log - - -:: linting ------------------------------------------------------------------- -%PCLP% -os(lint_out.log) %LINTFLAGS% - -:end -@endlocal +@echo off +:: =========================================================================== +:: Batch script for running PC-Lint-Plus +:: Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +:: +:: SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +:: +:: This software is dual-licensed under the terms of the open source GNU +:: General Public License version 3 (or any later version), or alternatively, +:: under the terms of one of the closed source Quantum Leaps commercial +:: licenses. +:: +:: The terms of the open source GNU General Public License version 3 +:: can be found at: +:: +:: The terms of the closed source Quantum Leaps commercial licenses +:: can be found at: +:: +:: Redistributions in source code must retain this top-level comment block. +:: Plagiarizing this software to sidestep the license obligations is illegal. +:: +:: Contact information: +:: +:: +:: =========================================================================== +@setlocal + +:: usage of lin.bat +@echo Usage: lin [16bit] [-d...] [files...] +@echo examples: +@echo lin ..\table.c : use 32bit CPU (default) for linting ..\table.c +@echo lin 16bit -dQ_SPY ..\philo.c : use 16bit CPU and define Q_SPY for linting ..\philo.c +@echo lin ..\philo.c ..\table.c : use 32bit CPU for linting ..\philo.c and ..\table.c +@echo. + +:: NOTE: adjust to for your installation directory of PC-Lint-Plus +@set PCLP=C:\tools\lint-plus\windows\pclp64.exe + +if NOT exist "%PCLP%" ( + @echo The PC-Lint-Plus toolset not found. Please adjust lin.bat + @goto end +) + +:: set the QP/C directory +set QPC=..\..\..\.. +set QPC_LINT=%QPC%\ports\lint-plus + +if "%1"=="16bit" ( + set LINTFLAGS=%QPC_LINT%\std.lnt -i%QPC_LINT%\16bit options.lnt %2 %3 %4 %5 %6 %7 %8 + @echo 16bit CPU +) else ( + set LINTFLAGS=%QPC_LINT%\std.lnt -i%QPC_LINT%\32bit options.lnt %1 %2 %3 %4 %6 %7 %8 + @echo 32bit CPU (default) +) + +:: cleanup +@del *.log + + +:: linting ------------------------------------------------------------------- +%PCLP% -os(lint_out.log) %LINTFLAGS% + +:end +@endlocal diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/philo.c b/examples/arm-cm/dpp_ek-tm4c123gxl/philo.c index 11f20797..08d07639 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/philo.c +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.4 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct Philo { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define THINK_TIME \ (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + (BSP_TICKS_PER_SEC/2U)) @@ -53,14 +66,16 @@ static inline uint8_t PHILO_ID(Philo * const me) { return (uint8_t)(me - &Philo_inst[0]); } -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[0].super, &Philo_inst[1].super, @@ -68,9 +83,10 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[3].super, &Philo_inst[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -80,13 +96,15 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, (enum_t)TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ Philo Philo_inst[N_PHILO]; -/*.${AOs::Philo::SM} .......................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ (void)par; /* unused parameter */ static bool registered = false; @@ -116,28 +134,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, (enum_t)TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { (void)QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -145,7 +164,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -157,11 +176,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -169,9 +189,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -180,7 +200,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -194,30 +214,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -232,4 +253,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/armclang/dpp-qk.uvprojx b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/armclang/dpp-qk.uvprojx index 718184f9..02e1d421 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/armclang/dpp-qk.uvprojx +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/armclang/dpp-qk.uvprojx @@ -338,7 +338,7 @@ __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -967,7 +967,7 @@ NDEBUG TARGET_IS_TM4C123_RB1 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -1596,7 +1596,7 @@ Q_SPY TARGET_IS_TM4C123_RB1 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.c b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.c index bc0beb94..fd4c2772 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.c +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.c @@ -99,7 +99,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -114,11 +114,11 @@ void SysTick_Handler(void) { if ((tmp & BTN_SW1) != 0U) { /* debounced SW1 state changed? */ if ((buttons.depressed & BTN_SW1) != 0U) { /* is SW1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile index 72f4f538..fa5f1e61 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/flash.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/flash.bat index 7fa47fc2..8f88a12e 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/flash.bat +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/Makefile index 04a7cd00..284a109b 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/bsp_stack-prot.c b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/bsp_stack-prot.c index da929b0f..4cee42fd 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/bsp_stack-prot.c +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/bsp_stack-prot.c @@ -99,7 +99,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -114,11 +114,11 @@ void SysTick_Handler(void) { if ((tmp & BTN_SW1) != 0U) { /* debounced SW1 state changed? */ if ((buttons.depressed & BTN_SW1) != 0U) { /* is SW1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/flash.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/flash.bat index 7fa47fc2..8f88a12e 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/flash.bat +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu_with-stack-prot/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewd b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewd index 2738edc9..1587ed94 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewd +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewp index e046e2cf..7a72fbe1 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.ewp @@ -1,3326 +1,3323 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 36 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 36 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 36 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 36 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 36 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 36 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.eww b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.eww index b41c128d..c261124a 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.eww +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qk.ewp - - - - - + + + + + $WS_DIR$\dpp-qk.ewp + + + + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.icf b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.icf +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/iar/dpp-qk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/armclang/dpp-qv.uvprojx b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/armclang/dpp-qv.uvprojx index ec2b89b8..3b8c229f 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/armclang/dpp-qv.uvprojx +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/armclang/dpp-qv.uvprojx @@ -338,7 +338,7 @@ __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -967,7 +967,7 @@ NDEBUG __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -1596,7 +1596,7 @@ Q_SPY __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.c b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.c index 7bc9d047..8bd3e95c 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.c +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.c @@ -98,7 +98,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -113,11 +113,11 @@ void SysTick_Handler(void) { if ((tmp & BTN_SW1) != 0U) { /* debounced SW1 state changed? */ if ((buttons.depressed & BTN_SW1) != 0U) { /* is SW1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } } diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile index c339fc2f..e3584d6b 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/flash.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/flash.bat index 7fa47fc2..8f88a12e 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/flash.bat +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewd b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewd index d7c84b91..71e2f66a 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewd +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewp index 98cac0e3..9bfcccc0 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.ewp @@ -1,3188 +1,3185 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\table.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\table.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.eww index 8999816a..b96f3f62 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.eww +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qv.ewp - - - - - + + + + + $WS_DIR$\dpp-qv.ewp + + + + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.icf b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.icf +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/iar/dpp-qv.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qview/qview-dpp.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/qview/qview-dpp.bat index 3ac56aa6..b36e43d6 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qview/qview-dpp.bat +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qview/qview-dpp.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp.py + +@endlocal diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qview/qview-dpp1.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/qview/qview-dpp1.bat index e4180394..8bdb9ce5 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qview/qview-dpp1.bat +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qview/qview-dpp1.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp1.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp1.py + +@endlocal 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 d59592d4..62e9a8ef 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 @@ -338,7 +338,7 @@ TARGET_IS_TM4C123_RB1 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -987,7 +987,7 @@ NDEBUG TARGET_IS_TM4C123_RB1 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -1636,7 +1636,7 @@ Q_SPY TARGET_IS_TM4C123_RB1 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.c b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.c index cb4893a7..daa88ceb 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.c +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/bsp.c @@ -80,6 +80,7 @@ static uint32_t l_rnd; /* random seed */ #endif + /*..........................................................................*/ void SysTick_Handler(void) { /* state of the button debouncing, see below */ @@ -99,7 +100,7 @@ void SysTick_Handler(void) { } #endif - //QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + //QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ QACTIVE_POST(the_Ticker0, 0, &l_SysTick_Handler); // post to Ticker0 */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -115,11 +116,11 @@ void SysTick_Handler(void) { if ((tmp & BTN_SW1) != 0U) { /* debounced SW1 state changed? */ if ((buttons.depressed & BTN_SW1) != 0U) { /* is SW1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } @@ -131,7 +132,7 @@ void GPIOPortA_IRQHandler(void) { //QACTIVE_POST(AO_Table, Q_NEW(QEvt, MAX_PUB_SIG), /* for testing... */ // &l_GPIOPortA_IRQHandler); - QF_PUBLISH(Q_NEW(QEvt, TEST_SIG), /* for testing... */ + QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG), /* for testing... */ &l_GPIOPortA_IRQHandler); QXK_ISR_EXIT(); /* inform QXK about exiting an ISR */ @@ -456,7 +457,6 @@ void QS_onCommand(uint8_t cmdId, QS_U32(8, param2); QS_U32(8, param3); QS_END() - if (cmdId == 10U) { Q_ERROR(); } diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/Makefile index d0bc1d60..7c3977e7 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/flash.bat b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/flash.bat index 7fa47fc2..8f88a12e 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/flash.bat +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.ewd b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.ewd index db2ff59d..cdc33eb5 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.ewd +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.ewp b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.ewp index ab7be077..009e953d 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.ewp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.ewp @@ -1,3322 +1,3319 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Debug - Release - Spy - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - $PROJ_DIR$\..\test.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Debug + Release + Spy + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + $PROJ_DIR$\..\test.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.eww b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.eww index e7d75f8b..38808ca3 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.eww +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qxk.ewp - - - - - + + + + + $WS_DIR$\dpp-qxk.ewp + + + + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.icf b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.icf +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/iar/dpp-qxk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/test.c b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/test.c index 7f4d96fd..487288ef 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/test.c +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/test.c @@ -82,7 +82,7 @@ static void Thread1_run(QXThread * const me) { QXThread_delay(BSP_TICKS_PER_SEC/7); /* BLOCK */ /* publish to thread2 */ - //QF_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); + //QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); /* test TLS */ lib_fun(1U); diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/table.c b/examples/arm-cm/dpp_ek-tm4c123gxl/table.c index 70919b83..ac2e1880 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/table.c +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.4 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -42,25 +55,28 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) #define FREE ((uint8_t)0) #define USED ((uint8_t)1) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Table} ........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &Table_inst.super; /* "opaque" pointer to Table AO */ -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { Table *me = &Table_inst; uint8_t n; @@ -72,13 +88,15 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ Table Table_inst; -/*.${AOs::Table::SM} .......................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -109,16 +127,17 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -131,11 +150,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -149,7 +169,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -157,7 +177,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -167,25 +187,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -209,7 +229,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -220,19 +240,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -244,28 +264,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -275,7 +296,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -300,4 +321,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_mbed-lpc1768/README.md b/examples/arm-cm/dpp_mbed-lpc1768/README.md new file mode 100644 index 00000000..f4042baf --- /dev/null +++ b/examples/arm-cm/dpp_mbed-lpc1768/README.md @@ -0,0 +1,5 @@ +![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_mbed-LPC1768.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_dpp_mbed-lpc1768.html diff --git a/examples/arm-cm/dpp_mbed-lpc1768/dpp.h b/examples/arm-cm/dpp_mbed-lpc1768/dpp.h index 40a4fc56..cd9689f8 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/dpp.h +++ b/examples/arm-cm/dpp_mbed-lpc1768/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,30 +54,34 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ /* opaque pointers to the Philo AOs */ extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::AO_Table} .........................................................*/ /* opaque pointer to the Table AO */ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -74,3 +91,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm b/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm index 61cec11e..83371250 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm +++ b/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -105,7 +104,7 @@ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); @@ -187,7 +186,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -210,7 +209,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -252,7 +251,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -263,7 +262,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/arm-cm/dpp_mbed-lpc1768/philo.c b/examples/arm-cm/dpp_mbed-lpc1768/philo.c index cd99e60f..4a8b3412 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/philo.c +++ b/examples/arm-cm/dpp_mbed-lpc1768/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("philo") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -52,16 +65,16 @@ static Philo l_philo[N_PHILO]; /* storage for all Philos */ #define PHILO_ID(me_) ((uint8_t)((me_) - l_philo)) /* Global objects ----------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointers to the Philo AOs */ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { &l_philo[0].super, &l_philo[1].super, @@ -69,11 +82,12 @@ QActive * const AO_Philo[N_PHILO] = { &l_philo[3].super, &l_philo[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Philo definition --------------------------------------------------------*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -83,12 +97,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +128,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -148,11 +165,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -160,9 +178,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -171,7 +189,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -185,31 +203,32 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -224,4 +243,5 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/armclang/dpp-qk.uvprojx b/examples/arm-cm/dpp_mbed-lpc1768/qk/armclang/dpp-qk.uvprojx index a91e8e58..4259f8d3 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qk/armclang/dpp-qk.uvprojx +++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/armclang/dpp-qk.uvprojx @@ -338,7 +338,7 @@ rvmdk __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 @@ -977,7 +977,7 @@ NDEBUG __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 @@ -1616,7 +1616,7 @@ Q_SPY __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.c b/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.c index 96d98a70..eb03933b 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.c +++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.c @@ -93,7 +93,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* get state of the buttons */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -109,11 +109,11 @@ void SysTick_Handler(void) { if ((tmp & BTN_EXT) != 0U) { /* debounced BTN_EXT state changed? */ if ((buttons.depressed & BTN_EXT) != 0U) { /* is BTN_EXT depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile b/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile index 9d93d763..4d9107bf 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on mbed-LPC1768, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/mbed-lpc1768 diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewd b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewd index 5f62db51..be6e11ed 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewd +++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewd @@ -1,4462 +1,4462 @@ - - - - 2 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 26 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - XDS100_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 26 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 0 - - - - - - - - - IJET_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - XDS100_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 26 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - XDS100_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - - + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewp index f69eaa08..c015ed95 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewp +++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.ewp @@ -1,3011 +1,3008 @@ - - - - 2 - - Debug - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 24 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - mbed-lpc1768 - - $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\LPC17xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\iar\startup_LPC17xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_pkg.h - - - - - + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 24 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + mbed-lpc1768 + + $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\LPC17xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\iar\startup_LPC17xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_pkg.h + + + + + diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.eww b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.eww index b41c128d..c261124a 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.eww +++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qk.ewp - - - - - + + + + + $WS_DIR$\dpp-qk.ewp + + + + + diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.icf b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.icf index 2057443a..3980901d 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.icf +++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/iar/dpp-qk.icf @@ -1,39 +1,39 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x10007FDF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define symbol __CRP_start__ = 0x000002FC; -define symbol __CRP_end__ = 0x000002FF; - -define symbol __RAM1_start__ = 0x2007C000; -define symbol __RAM1_end__ = 0x20083FFF; - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] - mem:[from __CRP_start__ to __CRP_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; -define region CRP_region = mem:[from __CRP_start__ to __CRP_end__]; -define region RAM1_region = mem:[from __RAM1_start__ to __RAM1_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; -place in CRP_region { section .crp }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x10007FDF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define symbol __CRP_start__ = 0x000002FC; +define symbol __CRP_end__ = 0x000002FF; + +define symbol __RAM1_start__ = 0x2007C000; +define symbol __RAM1_end__ = 0x20083FFF; + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] - mem:[from __CRP_start__ to __CRP_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region CRP_region = mem:[from __CRP_start__ to __CRP_end__]; +define region RAM1_region = mem:[from __RAM1_start__ to __RAM1_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; +place in CRP_region { section .crp }; place in RAM1_region { section .sram }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/armclang/dpp-qv.uvprojx b/examples/arm-cm/dpp_mbed-lpc1768/qv/armclang/dpp-qv.uvprojx index 00a8c63b..4a87f55d 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qv/armclang/dpp-qv.uvprojx +++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/armclang/dpp-qv.uvprojx @@ -338,7 +338,7 @@ rvmdk __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 @@ -967,7 +967,7 @@ NDEBUG __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 @@ -1596,7 +1596,7 @@ Q_SPY __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\mbed-lpc1768 diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.c b/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.c index 23491047..9e7a894a 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.c +++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.c @@ -91,7 +91,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* get state of the buttons */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -107,11 +107,11 @@ void SysTick_Handler(void) { if ((tmp & BTN_EXT) != 0U) { /* debounced BTN_EXT state changed? */ if ((buttons.depressed & BTN_EXT) != 0U) { /* is BTN_EXT depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } QV_ARM_ERRATUM_838869(); diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile b/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile index 54f9e5f3..3b356ddc 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on mbed-LPC1768, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/mbed-lpc1768 diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewd b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewd index 5f62db51..be6e11ed 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewd +++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewd @@ -1,4462 +1,4462 @@ - - - - 2 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 26 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - XDS100_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 26 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 0 - - - - - - - - - IJET_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - XDS100_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 26 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - XDS100_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - - + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewp index adf40ce3..c1ac0d82 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewp +++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.ewp @@ -1,3020 +1,3017 @@ - - - - 2 - - Debug - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 24 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - mbed-lpc1768 - - $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\LPC17xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\iar\startup_LPC17xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - - - + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 24 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + mbed-lpc1768 + + $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\LPC17xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\iar\startup_LPC17xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\mbed-lpc1768\system_LPC17xx.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + + + diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.eww index 8999816a..b96f3f62 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.eww +++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qv.ewp - - - - - + + + + + $WS_DIR$\dpp-qv.ewp + + + + + diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.icf b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.icf index 2057443a..3980901d 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.icf +++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/iar/dpp-qv.icf @@ -1,39 +1,39 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x10007FDF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define symbol __CRP_start__ = 0x000002FC; -define symbol __CRP_end__ = 0x000002FF; - -define symbol __RAM1_start__ = 0x2007C000; -define symbol __RAM1_end__ = 0x20083FFF; - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] - mem:[from __CRP_start__ to __CRP_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; -define region CRP_region = mem:[from __CRP_start__ to __CRP_end__]; -define region RAM1_region = mem:[from __RAM1_start__ to __RAM1_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; -place in CRP_region { section .crp }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x10000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x10007FDF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define symbol __CRP_start__ = 0x000002FC; +define symbol __CRP_end__ = 0x000002FF; + +define symbol __RAM1_start__ = 0x2007C000; +define symbol __RAM1_end__ = 0x20083FFF; + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] - mem:[from __CRP_start__ to __CRP_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region CRP_region = mem:[from __CRP_start__ to __CRP_end__]; +define region RAM1_region = mem:[from __RAM1_start__ to __RAM1_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; +place in CRP_region { section .crp }; place in RAM1_region { section .sram }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_mbed-lpc1768/table.c b/examples/arm-cm/dpp_mbed-lpc1768/table.c index af075d69..54e8a2e6 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/table.c +++ b/examples/arm-cm/dpp_mbed-lpc1768/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("table") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -50,22 +63,23 @@ static QState Table_paused(Table * const me, QEvt const * const e); static Table l_table; /* the single instance of the Table active object */ /* Global-scope objects ----------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointer to the Table AO */ -/*.${AOs::AO_Table} ........................................................*/ +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &l_table.super; -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*..........................................................................*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -77,12 +91,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -111,11 +127,12 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR_ID(60); status_ = Q_HANDLED(); @@ -128,11 +145,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -146,7 +164,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -154,7 +172,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -164,25 +182,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -206,7 +224,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -217,13 +235,13 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -235,28 +253,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -266,7 +285,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -291,4 +310,5 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/README.md b/examples/arm-cm/dpp_nucleo-h743zi/README.md new file mode 100644 index 00000000..c695beba --- /dev/null +++ b/examples/arm-cm/dpp_nucleo-h743zi/README.md @@ -0,0 +1,5 @@ +![STM32 NUCLEO-H743ZI Q](../../../doxygen/images/bd_NUCLEO-H743ZI.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_dpp_nucleo-h743zi.html diff --git a/examples/arm-cm/dpp_nucleo-h743zi/dpp.h b/examples/arm-cm/dpp_nucleo-h743zi/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/dpp.h +++ b/examples/arm-cm/dpp_nucleo-h743zi/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/dpp.qm b/examples/arm-cm/dpp_nucleo-h743zi/dpp.qm index 43ad83c4..08fafb97 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 @@ -119,7 +119,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -212,7 +212,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -235,7 +235,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -277,7 +277,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -288,7 +288,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/arm-cm/dpp_nucleo-h743zi/philo.c b/examples/arm-cm/dpp_nucleo-h743zi/philo.c index 2210d649..9bc4c4f1 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/philo.c +++ b/examples/arm-cm/dpp_nucleo-h743zi/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct Philo { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define THINK_TIME \ (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + (BSP_TICKS_PER_SEC/2U)) @@ -51,14 +64,16 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); /* helper macro to provide the ID of Philo "me_" */ #define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[0].super, &Philo_inst[1].super, @@ -66,9 +81,10 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[3].super, &Philo_inst[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,13 +94,15 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ Philo Philo_inst[N_PHILO]; -/*.${AOs::Philo::SM} .......................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -113,28 +131,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -142,7 +161,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -154,11 +173,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -166,9 +186,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -177,7 +197,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -191,30 +211,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -229,4 +250,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/armclang/dpp-qk.uvprojx b/examples/arm-cm/dpp_nucleo-h743zi/qk/armclang/dpp-qk.uvprojx index 1ad3978d..e14992a3 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/armclang/dpp-qk.uvprojx +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/armclang/dpp-qk.uvprojx @@ -339,7 +339,7 @@ STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc @@ -1024,7 +1024,7 @@ NDEBUG,STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc @@ -1709,7 +1709,7 @@ Q_SPY,STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/bsp.c b/examples/arm-cm/dpp_nucleo-h743zi/qk/bsp.c index f115d7a2..b3e60b01 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/bsp.c +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/bsp.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example, NUCLEO-H743ZIE board, preemptive QK kernel */ #include "qpc.h" @@ -86,7 +85,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -101,11 +100,11 @@ void SysTick_Handler(void) { if (tmp != 0U) { /* debounced Key button state changed? */ if (buttons.depressed != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-h743zi/qk/gnu/Makefile index a7671e6a..83656950 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-H743ZI, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2022-02-28 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -82,7 +82,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/STM32CubeH7/Drivers/CMSIS/Device/ST/STM32H7xx/Include \ @@ -147,7 +146,8 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DSTM32H743xx -DUSE_HAL_DRIVER -DUSE_STM32H7XX_NUCLEO_144 \ +DEFINES := -DQP_API_VERSION=9999 \ + -DSTM32H743xx -DUSE_HAL_DRIVER -DUSE_STM32H7XX_NUCLEO_144 \ -DQK_ON_CONTEXT_SW # ARM CPU, ARCH, FPU, and Float-ABI types... diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.ewp index 68b8ad69..35eff009 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.ewp +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.ewp @@ -1,3316 +1,3313 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - nucleo-h743zi - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\iar\startup_stm32h743xx.s - - - $PROJ_DIR$\..\..\stm32h7xx_hal_conf.h - - - $PROJ_DIR$\..\..\stm32h7xx_hal_msp.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - STM32H7xx_HAL_Driver - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + nucleo-h743zi + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\iar\startup_stm32h743xx.s + + + $PROJ_DIR$\..\..\stm32h7xx_hal_conf.h + + + $PROJ_DIR$\..\..\stm32h7xx_hal_msp.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + STM32H7xx_HAL_Driver + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c + + + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.eww b/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.eww index b41c128d..c261124a 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.eww +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qk.ewp - - - - - + + + + + $WS_DIR$\dpp-qk.ewp + + + + + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.icf b/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.icf index b1879b8d..8d3950cc 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.icf +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/iar/dpp-qk.icf @@ -1,84 +1,84 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\linker\ST\IcfEditor\stm32h7xx.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_FLASH1_start__ = 0x08000000; -define symbol __ICFEDIT_region_FLASH1_end__ = 0x080FFFFF; -define symbol __ICFEDIT_region_FLASH2_start__ = 0x08100000; -define symbol __ICFEDIT_region_FLASH2_end__ = 0x081FFFFF; -define symbol __ICFEDIT_region_NORPSR_start__ = 0x0; -define symbol __ICFEDIT_region_NORPSR_end__ = 0x0; -define symbol __ICFEDIT_region_NAND_start__ = 0x0; -define symbol __ICFEDIT_region_NAND_end__ = 0x0; -define symbol __ICFEDIT_region_QSPI_start__ = 0x0; -define symbol __ICFEDIT_region_QSPI_end__ = 0x0; -define symbol __ICFEDIT_region_ITCMR_start__ = 0x00000000; -define symbol __ICFEDIT_region_ITCMR_end__ = 0x0000FFFF; -define symbol __ICFEDIT_region_DTCMR_start__ = 0x20000000; -define symbol __ICFEDIT_region_DTCMR_end__ = 0x2001FFFF; -define symbol __ICFEDIT_region_AXISR_start__ = 0x24000000; -define symbol __ICFEDIT_region_AXISR_end__ = 0x2407FFFF; -define symbol __ICFEDIT_region_SRAM1_start__ = 0x30000000; -define symbol __ICFEDIT_region_SRAM1_end__ = 0x3001FFFF; -define symbol __ICFEDIT_region_SRAM2_start__ = 0x30020000; -define symbol __ICFEDIT_region_SRAM2_end__ = 0x3003FFFF; -define symbol __ICFEDIT_region_SRAM3_start__ = 0x30040000; -define symbol __ICFEDIT_region_SRAM3_end__ = 0x30047FFF; -define symbol __ICFEDIT_region_SRAM4_start__ = 0x38000000; -define symbol __ICFEDIT_region_SRAM4_end__ = 0x3800FFFF; -define symbol __ICFEDIT_region_BKPR_start__ = 0x38800000; -define symbol __ICFEDIT_region_BKPR_end__ = 0x38800FFF; -define symbol __ICFEDIT_region_SDR1_start__ = 0x0; -define symbol __ICFEDIT_region_SDR1_end__ = 0x0; -define symbol __ICFEDIT_region_SDR2_start__ = 0x0; -define symbol __ICFEDIT_region_SDR2_end__ = 0x0; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 2048; -define symbol __ICFEDIT_size_proc_stack__ = 0; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region FLASH_region = mem:[from __ICFEDIT_region_FLASH1_start__ to __ICFEDIT_region_FLASH1_end__] - | mem:[from __ICFEDIT_region_FLASH2_start__ to __ICFEDIT_region_FLASH2_end__]; -define region NORPSR_region = mem:[from __ICFEDIT_region_NORPSR_start__ to __ICFEDIT_region_NORPSR_end__]; -define region NAND_region = mem:[from __ICFEDIT_region_NAND_start__ to __ICFEDIT_region_NAND_end__ ]; -define region QSPI_region = mem:[from __ICFEDIT_region_QSPI_start__ to __ICFEDIT_region_QSPI_end__ ]; -define region ITCMR_region = mem:[from __ICFEDIT_region_ITCMR_start__ to __ICFEDIT_region_ITCMR_end__ ]; -define region DTCMR_region = mem:[from __ICFEDIT_region_DTCMR_start__ to __ICFEDIT_region_DTCMR_end__ ]; -define region AXISR_region = mem:[from __ICFEDIT_region_AXISR_start__ to __ICFEDIT_region_AXISR_end__ ]; -define region SRAM_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__ ] - | mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__ ] - | mem:[from __ICFEDIT_region_SRAM3_start__ to __ICFEDIT_region_SRAM3_end__ ] - | mem:[from __ICFEDIT_region_SRAM4_start__ to __ICFEDIT_region_SRAM4_end__ ]; -define region BKPR_region = mem:[from __ICFEDIT_region_BKPR_start__ to __ICFEDIT_region_BKPR_end__ ]; -define region SDR_region = mem:[from __ICFEDIT_region_SDR1_start__ to __ICFEDIT_region_SDR1_end__ ] - | mem:[from __ICFEDIT_region_SDR2_start__ to __ICFEDIT_region_SDR2_end__ ]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) -{ - // Required in a multi-threaded application - initialize by copy with packing = none { section __DLIB_PERTHREAD }; -} - -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in FLASH_region { readonly }; -place in QSPI_region { readonly section application_specific_ro }; -//place in NORPSR_region { }; -//place in NAND_region { }; -place in ITCMR_region { section .textrw }; -place in DTCMR_region { section .dtcm_ram, block CSTACK, block PROC_STACK }; -place in SRAM_region { section .axi_sram, block HEAP }; -place in AXISR_region { readwrite }; -place in BKPR_region { section .backup_sram }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\linker\ST\IcfEditor\stm32h7xx.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_FLASH1_start__ = 0x08000000; +define symbol __ICFEDIT_region_FLASH1_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_FLASH2_start__ = 0x08100000; +define symbol __ICFEDIT_region_FLASH2_end__ = 0x081FFFFF; +define symbol __ICFEDIT_region_NORPSR_start__ = 0x0; +define symbol __ICFEDIT_region_NORPSR_end__ = 0x0; +define symbol __ICFEDIT_region_NAND_start__ = 0x0; +define symbol __ICFEDIT_region_NAND_end__ = 0x0; +define symbol __ICFEDIT_region_QSPI_start__ = 0x0; +define symbol __ICFEDIT_region_QSPI_end__ = 0x0; +define symbol __ICFEDIT_region_ITCMR_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMR_end__ = 0x0000FFFF; +define symbol __ICFEDIT_region_DTCMR_start__ = 0x20000000; +define symbol __ICFEDIT_region_DTCMR_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_AXISR_start__ = 0x24000000; +define symbol __ICFEDIT_region_AXISR_end__ = 0x2407FFFF; +define symbol __ICFEDIT_region_SRAM1_start__ = 0x30000000; +define symbol __ICFEDIT_region_SRAM1_end__ = 0x3001FFFF; +define symbol __ICFEDIT_region_SRAM2_start__ = 0x30020000; +define symbol __ICFEDIT_region_SRAM2_end__ = 0x3003FFFF; +define symbol __ICFEDIT_region_SRAM3_start__ = 0x30040000; +define symbol __ICFEDIT_region_SRAM3_end__ = 0x30047FFF; +define symbol __ICFEDIT_region_SRAM4_start__ = 0x38000000; +define symbol __ICFEDIT_region_SRAM4_end__ = 0x3800FFFF; +define symbol __ICFEDIT_region_BKPR_start__ = 0x38800000; +define symbol __ICFEDIT_region_BKPR_end__ = 0x38800FFF; +define symbol __ICFEDIT_region_SDR1_start__ = 0x0; +define symbol __ICFEDIT_region_SDR1_end__ = 0x0; +define symbol __ICFEDIT_region_SDR2_start__ = 0x0; +define symbol __ICFEDIT_region_SDR2_end__ = 0x0; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 2048; +define symbol __ICFEDIT_size_proc_stack__ = 0; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region FLASH_region = mem:[from __ICFEDIT_region_FLASH1_start__ to __ICFEDIT_region_FLASH1_end__] + | mem:[from __ICFEDIT_region_FLASH2_start__ to __ICFEDIT_region_FLASH2_end__]; +define region NORPSR_region = mem:[from __ICFEDIT_region_NORPSR_start__ to __ICFEDIT_region_NORPSR_end__]; +define region NAND_region = mem:[from __ICFEDIT_region_NAND_start__ to __ICFEDIT_region_NAND_end__ ]; +define region QSPI_region = mem:[from __ICFEDIT_region_QSPI_start__ to __ICFEDIT_region_QSPI_end__ ]; +define region ITCMR_region = mem:[from __ICFEDIT_region_ITCMR_start__ to __ICFEDIT_region_ITCMR_end__ ]; +define region DTCMR_region = mem:[from __ICFEDIT_region_DTCMR_start__ to __ICFEDIT_region_DTCMR_end__ ]; +define region AXISR_region = mem:[from __ICFEDIT_region_AXISR_start__ to __ICFEDIT_region_AXISR_end__ ]; +define region SRAM_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__ ] + | mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__ ] + | mem:[from __ICFEDIT_region_SRAM3_start__ to __ICFEDIT_region_SRAM3_end__ ] + | mem:[from __ICFEDIT_region_SRAM4_start__ to __ICFEDIT_region_SRAM4_end__ ]; +define region BKPR_region = mem:[from __ICFEDIT_region_BKPR_start__ to __ICFEDIT_region_BKPR_end__ ]; +define region SDR_region = mem:[from __ICFEDIT_region_SDR1_start__ to __ICFEDIT_region_SDR1_end__ ] + | mem:[from __ICFEDIT_region_SDR2_start__ to __ICFEDIT_region_SDR2_end__ ]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) +{ + // Required in a multi-threaded application + initialize by copy with packing = none { section __DLIB_PERTHREAD }; +} + +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in FLASH_region { readonly }; +place in QSPI_region { readonly section application_specific_ro }; +//place in NORPSR_region { }; +//place in NAND_region { }; +place in ITCMR_region { section .textrw }; +place in DTCMR_region { section .dtcm_ram, block CSTACK, block PROC_STACK }; +place in SRAM_region { section .axi_sram, block HEAP }; +place in AXISR_region { readwrite }; +place in BKPR_region { section .backup_sram }; place in SDR_region { readwrite section application_specific_rw }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qk/main.c b/examples/arm-cm/dpp_nucleo-h743zi/qk/main.c index 213edabd..5a601fa3 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qk/main.c +++ b/examples/arm-cm/dpp_nucleo-h743zi/qk/main.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example */ #include "qpc.h" diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/armclang/dpp-qv.uvprojx b/examples/arm-cm/dpp_nucleo-h743zi/qv/armclang/dpp-qv.uvprojx index 5e729623..c3728ec5 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/armclang/dpp-qv.uvprojx +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/armclang/dpp-qv.uvprojx @@ -339,7 +339,7 @@ STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc @@ -1024,7 +1024,7 @@ NDEBUG,STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc @@ -1709,7 +1709,7 @@ Q_SPY,STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/bsp.c b/examples/arm-cm/dpp_nucleo-h743zi/qv/bsp.c index 30ff3f0c..a4457f72 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/bsp.c +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/bsp.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example, NUCLEO-H743ZIE board, cooperative QV kernel */ #include "qpc.h" @@ -82,7 +81,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -97,11 +96,11 @@ void SysTick_Handler(void) { if (tmp != 0U) { /* debounced Key button state changed? */ if (buttons.depressed != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } QV_ARM_ERRATUM_838869(); diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/gnu/Makefile b/examples/arm-cm/dpp_nucleo-h743zi/qv/gnu/Makefile index e45e2910..06fa4dea 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-H743ZI, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -82,7 +82,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/STM32CubeH7/Drivers/CMSIS/Device/ST/STM32H7xx/Include \ diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.ewd b/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.ewd index 763669f3..3c928e16 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.ewd +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.ewd @@ -1,4249 +1,4249 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 29 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 29 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.ewp index ab11833c..6744dd74 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.ewp +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.ewp @@ -1,3316 +1,3313 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - nucleo-h743zi - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\iar\startup_stm32h743xx.s - - - $PROJ_DIR$\..\..\stm32h7xx_hal_conf.h - - - $PROJ_DIR$\..\..\stm32h7xx_hal_msp.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - STM32H7xx_HAL_Driver - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + nucleo-h743zi + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\iar\startup_stm32h743xx.s + + + $PROJ_DIR$\..\..\stm32h7xx_hal_conf.h + + + $PROJ_DIR$\..\..\stm32h7xx_hal_msp.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + STM32H7xx_HAL_Driver + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c + + + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.eww index 8999816a..b96f3f62 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.eww +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qv.ewp - - - - - + + + + + $WS_DIR$\dpp-qv.ewp + + + + + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.icf b/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.icf index b1879b8d..8d3950cc 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.icf +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/iar/dpp-qv.icf @@ -1,84 +1,84 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\linker\ST\IcfEditor\stm32h7xx.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_FLASH1_start__ = 0x08000000; -define symbol __ICFEDIT_region_FLASH1_end__ = 0x080FFFFF; -define symbol __ICFEDIT_region_FLASH2_start__ = 0x08100000; -define symbol __ICFEDIT_region_FLASH2_end__ = 0x081FFFFF; -define symbol __ICFEDIT_region_NORPSR_start__ = 0x0; -define symbol __ICFEDIT_region_NORPSR_end__ = 0x0; -define symbol __ICFEDIT_region_NAND_start__ = 0x0; -define symbol __ICFEDIT_region_NAND_end__ = 0x0; -define symbol __ICFEDIT_region_QSPI_start__ = 0x0; -define symbol __ICFEDIT_region_QSPI_end__ = 0x0; -define symbol __ICFEDIT_region_ITCMR_start__ = 0x00000000; -define symbol __ICFEDIT_region_ITCMR_end__ = 0x0000FFFF; -define symbol __ICFEDIT_region_DTCMR_start__ = 0x20000000; -define symbol __ICFEDIT_region_DTCMR_end__ = 0x2001FFFF; -define symbol __ICFEDIT_region_AXISR_start__ = 0x24000000; -define symbol __ICFEDIT_region_AXISR_end__ = 0x2407FFFF; -define symbol __ICFEDIT_region_SRAM1_start__ = 0x30000000; -define symbol __ICFEDIT_region_SRAM1_end__ = 0x3001FFFF; -define symbol __ICFEDIT_region_SRAM2_start__ = 0x30020000; -define symbol __ICFEDIT_region_SRAM2_end__ = 0x3003FFFF; -define symbol __ICFEDIT_region_SRAM3_start__ = 0x30040000; -define symbol __ICFEDIT_region_SRAM3_end__ = 0x30047FFF; -define symbol __ICFEDIT_region_SRAM4_start__ = 0x38000000; -define symbol __ICFEDIT_region_SRAM4_end__ = 0x3800FFFF; -define symbol __ICFEDIT_region_BKPR_start__ = 0x38800000; -define symbol __ICFEDIT_region_BKPR_end__ = 0x38800FFF; -define symbol __ICFEDIT_region_SDR1_start__ = 0x0; -define symbol __ICFEDIT_region_SDR1_end__ = 0x0; -define symbol __ICFEDIT_region_SDR2_start__ = 0x0; -define symbol __ICFEDIT_region_SDR2_end__ = 0x0; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 2048; -define symbol __ICFEDIT_size_proc_stack__ = 0; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region FLASH_region = mem:[from __ICFEDIT_region_FLASH1_start__ to __ICFEDIT_region_FLASH1_end__] - | mem:[from __ICFEDIT_region_FLASH2_start__ to __ICFEDIT_region_FLASH2_end__]; -define region NORPSR_region = mem:[from __ICFEDIT_region_NORPSR_start__ to __ICFEDIT_region_NORPSR_end__]; -define region NAND_region = mem:[from __ICFEDIT_region_NAND_start__ to __ICFEDIT_region_NAND_end__ ]; -define region QSPI_region = mem:[from __ICFEDIT_region_QSPI_start__ to __ICFEDIT_region_QSPI_end__ ]; -define region ITCMR_region = mem:[from __ICFEDIT_region_ITCMR_start__ to __ICFEDIT_region_ITCMR_end__ ]; -define region DTCMR_region = mem:[from __ICFEDIT_region_DTCMR_start__ to __ICFEDIT_region_DTCMR_end__ ]; -define region AXISR_region = mem:[from __ICFEDIT_region_AXISR_start__ to __ICFEDIT_region_AXISR_end__ ]; -define region SRAM_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__ ] - | mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__ ] - | mem:[from __ICFEDIT_region_SRAM3_start__ to __ICFEDIT_region_SRAM3_end__ ] - | mem:[from __ICFEDIT_region_SRAM4_start__ to __ICFEDIT_region_SRAM4_end__ ]; -define region BKPR_region = mem:[from __ICFEDIT_region_BKPR_start__ to __ICFEDIT_region_BKPR_end__ ]; -define region SDR_region = mem:[from __ICFEDIT_region_SDR1_start__ to __ICFEDIT_region_SDR1_end__ ] - | mem:[from __ICFEDIT_region_SDR2_start__ to __ICFEDIT_region_SDR2_end__ ]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) -{ - // Required in a multi-threaded application - initialize by copy with packing = none { section __DLIB_PERTHREAD }; -} - -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in FLASH_region { readonly }; -place in QSPI_region { readonly section application_specific_ro }; -//place in NORPSR_region { }; -//place in NAND_region { }; -place in ITCMR_region { section .textrw }; -place in DTCMR_region { section .dtcm_ram, block CSTACK, block PROC_STACK }; -place in SRAM_region { section .axi_sram, block HEAP }; -place in AXISR_region { readwrite }; -place in BKPR_region { section .backup_sram }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\linker\ST\IcfEditor\stm32h7xx.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_FLASH1_start__ = 0x08000000; +define symbol __ICFEDIT_region_FLASH1_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_FLASH2_start__ = 0x08100000; +define symbol __ICFEDIT_region_FLASH2_end__ = 0x081FFFFF; +define symbol __ICFEDIT_region_NORPSR_start__ = 0x0; +define symbol __ICFEDIT_region_NORPSR_end__ = 0x0; +define symbol __ICFEDIT_region_NAND_start__ = 0x0; +define symbol __ICFEDIT_region_NAND_end__ = 0x0; +define symbol __ICFEDIT_region_QSPI_start__ = 0x0; +define symbol __ICFEDIT_region_QSPI_end__ = 0x0; +define symbol __ICFEDIT_region_ITCMR_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMR_end__ = 0x0000FFFF; +define symbol __ICFEDIT_region_DTCMR_start__ = 0x20000000; +define symbol __ICFEDIT_region_DTCMR_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_AXISR_start__ = 0x24000000; +define symbol __ICFEDIT_region_AXISR_end__ = 0x2407FFFF; +define symbol __ICFEDIT_region_SRAM1_start__ = 0x30000000; +define symbol __ICFEDIT_region_SRAM1_end__ = 0x3001FFFF; +define symbol __ICFEDIT_region_SRAM2_start__ = 0x30020000; +define symbol __ICFEDIT_region_SRAM2_end__ = 0x3003FFFF; +define symbol __ICFEDIT_region_SRAM3_start__ = 0x30040000; +define symbol __ICFEDIT_region_SRAM3_end__ = 0x30047FFF; +define symbol __ICFEDIT_region_SRAM4_start__ = 0x38000000; +define symbol __ICFEDIT_region_SRAM4_end__ = 0x3800FFFF; +define symbol __ICFEDIT_region_BKPR_start__ = 0x38800000; +define symbol __ICFEDIT_region_BKPR_end__ = 0x38800FFF; +define symbol __ICFEDIT_region_SDR1_start__ = 0x0; +define symbol __ICFEDIT_region_SDR1_end__ = 0x0; +define symbol __ICFEDIT_region_SDR2_start__ = 0x0; +define symbol __ICFEDIT_region_SDR2_end__ = 0x0; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 2048; +define symbol __ICFEDIT_size_proc_stack__ = 0; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region FLASH_region = mem:[from __ICFEDIT_region_FLASH1_start__ to __ICFEDIT_region_FLASH1_end__] + | mem:[from __ICFEDIT_region_FLASH2_start__ to __ICFEDIT_region_FLASH2_end__]; +define region NORPSR_region = mem:[from __ICFEDIT_region_NORPSR_start__ to __ICFEDIT_region_NORPSR_end__]; +define region NAND_region = mem:[from __ICFEDIT_region_NAND_start__ to __ICFEDIT_region_NAND_end__ ]; +define region QSPI_region = mem:[from __ICFEDIT_region_QSPI_start__ to __ICFEDIT_region_QSPI_end__ ]; +define region ITCMR_region = mem:[from __ICFEDIT_region_ITCMR_start__ to __ICFEDIT_region_ITCMR_end__ ]; +define region DTCMR_region = mem:[from __ICFEDIT_region_DTCMR_start__ to __ICFEDIT_region_DTCMR_end__ ]; +define region AXISR_region = mem:[from __ICFEDIT_region_AXISR_start__ to __ICFEDIT_region_AXISR_end__ ]; +define region SRAM_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__ ] + | mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__ ] + | mem:[from __ICFEDIT_region_SRAM3_start__ to __ICFEDIT_region_SRAM3_end__ ] + | mem:[from __ICFEDIT_region_SRAM4_start__ to __ICFEDIT_region_SRAM4_end__ ]; +define region BKPR_region = mem:[from __ICFEDIT_region_BKPR_start__ to __ICFEDIT_region_BKPR_end__ ]; +define region SDR_region = mem:[from __ICFEDIT_region_SDR1_start__ to __ICFEDIT_region_SDR1_end__ ] + | mem:[from __ICFEDIT_region_SDR2_start__ to __ICFEDIT_region_SDR2_end__ ]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) +{ + // Required in a multi-threaded application + initialize by copy with packing = none { section __DLIB_PERTHREAD }; +} + +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in FLASH_region { readonly }; +place in QSPI_region { readonly section application_specific_ro }; +//place in NORPSR_region { }; +//place in NAND_region { }; +place in ITCMR_region { section .textrw }; +place in DTCMR_region { section .dtcm_ram, block CSTACK, block PROC_STACK }; +place in SRAM_region { section .axi_sram, block HEAP }; +place in AXISR_region { readwrite }; +place in BKPR_region { section .backup_sram }; place in SDR_region { readwrite section application_specific_rw }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qv/main.c b/examples/arm-cm/dpp_nucleo-h743zi/qv/main.c index 8c8652df..39e90679 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qv/main.c +++ b/examples/arm-cm/dpp_nucleo-h743zi/qv/main.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example */ #include "qpc.h" diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qview/qview-dpp.bat b/examples/arm-cm/dpp_nucleo-h743zi/qview/qview-dpp.bat index 3ac56aa6..b36e43d6 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qview/qview-dpp.bat +++ b/examples/arm-cm/dpp_nucleo-h743zi/qview/qview-dpp.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp.py + +@endlocal diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qview/qview-dpp1.bat b/examples/arm-cm/dpp_nucleo-h743zi/qview/qview-dpp1.bat index e4180394..8bdb9ce5 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qview/qview-dpp1.bat +++ b/examples/arm-cm/dpp_nucleo-h743zi/qview/qview-dpp1.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp1.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp1.py + +@endlocal diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/armclang/dpp-qxk.uvprojx b/examples/arm-cm/dpp_nucleo-h743zi/qxk/armclang/dpp-qxk.uvprojx index 150e4a10..9540e772 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/armclang/dpp-qxk.uvprojx +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/armclang/dpp-qxk.uvprojx @@ -339,7 +339,7 @@ STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc @@ -1044,7 +1044,7 @@ NDEBUG,STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc @@ -1749,7 +1749,7 @@ -Wno-padded Q_SPY,QXK_ON_CONTEXT_SW,STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/bsp.c b/examples/arm-cm/dpp_nucleo-h743zi/qxk/bsp.c index 72341429..0d9308d8 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/bsp.c +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/bsp.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example, NUCLEO-H743ZIE board, dual-mode QXK kernel */ #include "qpc.h" @@ -87,7 +86,7 @@ void SysTick_Handler(void) { } #endif - //QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + //QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ QACTIVE_POST(&ticker0.super, 0, &l_SysTick_Handler); /* post to ticker0 */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -103,11 +102,11 @@ void SysTick_Handler(void) { if (tmp != 0U) { /* debounced Key button state changed? */ if (buttons.depressed != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-h743zi/qxk/gnu/Makefile index ca2d5177..60690c13 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-H743ZI, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -82,7 +82,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/STM32CubeH7/Drivers/CMSIS/Device/ST/STM32H7xx/Include \ diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.ewd b/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.ewd index 763669f3..3c928e16 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.ewd +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.ewd @@ -1,4249 +1,4249 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 29 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 29 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.ewp b/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.ewp index 32816fa7..b22a8fa3 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.ewp +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.ewp @@ -1,3329 +1,3326 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - $PROJ_DIR$\..\test.c - - - - nucleo-h743zi - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\iar\startup_stm32h743xx.s - - - $PROJ_DIR$\..\..\stm32h7xx_hal_conf.h - - - $PROJ_DIR$\..\..\stm32h7xx_hal_msp.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - STM32H7xx_HAL_Driver - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + $PROJ_DIR$\..\test.c + + + + nucleo-h743zi + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\iar\startup_stm32h743xx.s + + + $PROJ_DIR$\..\..\stm32h7xx_hal_conf.h + + + $PROJ_DIR$\..\..\stm32h7xx_hal_msp.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + STM32H7xx_HAL_Driver + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c + + + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.eww b/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.eww index e7d75f8b..38808ca3 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.eww +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qxk.ewp - - - - - + + + + + $WS_DIR$\dpp-qxk.ewp + + + + + diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.icf b/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.icf index b1879b8d..8d3950cc 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.icf +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/iar/dpp-qxk.icf @@ -1,84 +1,84 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\linker\ST\IcfEditor\stm32h7xx.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_FLASH1_start__ = 0x08000000; -define symbol __ICFEDIT_region_FLASH1_end__ = 0x080FFFFF; -define symbol __ICFEDIT_region_FLASH2_start__ = 0x08100000; -define symbol __ICFEDIT_region_FLASH2_end__ = 0x081FFFFF; -define symbol __ICFEDIT_region_NORPSR_start__ = 0x0; -define symbol __ICFEDIT_region_NORPSR_end__ = 0x0; -define symbol __ICFEDIT_region_NAND_start__ = 0x0; -define symbol __ICFEDIT_region_NAND_end__ = 0x0; -define symbol __ICFEDIT_region_QSPI_start__ = 0x0; -define symbol __ICFEDIT_region_QSPI_end__ = 0x0; -define symbol __ICFEDIT_region_ITCMR_start__ = 0x00000000; -define symbol __ICFEDIT_region_ITCMR_end__ = 0x0000FFFF; -define symbol __ICFEDIT_region_DTCMR_start__ = 0x20000000; -define symbol __ICFEDIT_region_DTCMR_end__ = 0x2001FFFF; -define symbol __ICFEDIT_region_AXISR_start__ = 0x24000000; -define symbol __ICFEDIT_region_AXISR_end__ = 0x2407FFFF; -define symbol __ICFEDIT_region_SRAM1_start__ = 0x30000000; -define symbol __ICFEDIT_region_SRAM1_end__ = 0x3001FFFF; -define symbol __ICFEDIT_region_SRAM2_start__ = 0x30020000; -define symbol __ICFEDIT_region_SRAM2_end__ = 0x3003FFFF; -define symbol __ICFEDIT_region_SRAM3_start__ = 0x30040000; -define symbol __ICFEDIT_region_SRAM3_end__ = 0x30047FFF; -define symbol __ICFEDIT_region_SRAM4_start__ = 0x38000000; -define symbol __ICFEDIT_region_SRAM4_end__ = 0x3800FFFF; -define symbol __ICFEDIT_region_BKPR_start__ = 0x38800000; -define symbol __ICFEDIT_region_BKPR_end__ = 0x38800FFF; -define symbol __ICFEDIT_region_SDR1_start__ = 0x0; -define symbol __ICFEDIT_region_SDR1_end__ = 0x0; -define symbol __ICFEDIT_region_SDR2_start__ = 0x0; -define symbol __ICFEDIT_region_SDR2_end__ = 0x0; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 2048; -define symbol __ICFEDIT_size_proc_stack__ = 0; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region FLASH_region = mem:[from __ICFEDIT_region_FLASH1_start__ to __ICFEDIT_region_FLASH1_end__] - | mem:[from __ICFEDIT_region_FLASH2_start__ to __ICFEDIT_region_FLASH2_end__]; -define region NORPSR_region = mem:[from __ICFEDIT_region_NORPSR_start__ to __ICFEDIT_region_NORPSR_end__]; -define region NAND_region = mem:[from __ICFEDIT_region_NAND_start__ to __ICFEDIT_region_NAND_end__ ]; -define region QSPI_region = mem:[from __ICFEDIT_region_QSPI_start__ to __ICFEDIT_region_QSPI_end__ ]; -define region ITCMR_region = mem:[from __ICFEDIT_region_ITCMR_start__ to __ICFEDIT_region_ITCMR_end__ ]; -define region DTCMR_region = mem:[from __ICFEDIT_region_DTCMR_start__ to __ICFEDIT_region_DTCMR_end__ ]; -define region AXISR_region = mem:[from __ICFEDIT_region_AXISR_start__ to __ICFEDIT_region_AXISR_end__ ]; -define region SRAM_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__ ] - | mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__ ] - | mem:[from __ICFEDIT_region_SRAM3_start__ to __ICFEDIT_region_SRAM3_end__ ] - | mem:[from __ICFEDIT_region_SRAM4_start__ to __ICFEDIT_region_SRAM4_end__ ]; -define region BKPR_region = mem:[from __ICFEDIT_region_BKPR_start__ to __ICFEDIT_region_BKPR_end__ ]; -define region SDR_region = mem:[from __ICFEDIT_region_SDR1_start__ to __ICFEDIT_region_SDR1_end__ ] - | mem:[from __ICFEDIT_region_SDR2_start__ to __ICFEDIT_region_SDR2_end__ ]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) -{ - // Required in a multi-threaded application - initialize by copy with packing = none { section __DLIB_PERTHREAD }; -} - -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in FLASH_region { readonly }; -place in QSPI_region { readonly section application_specific_ro }; -//place in NORPSR_region { }; -//place in NAND_region { }; -place in ITCMR_region { section .textrw }; -place in DTCMR_region { section .dtcm_ram, block CSTACK, block PROC_STACK }; -place in SRAM_region { section .axi_sram, block HEAP }; -place in AXISR_region { readwrite }; -place in BKPR_region { section .backup_sram }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\linker\ST\IcfEditor\stm32h7xx.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_FLASH1_start__ = 0x08000000; +define symbol __ICFEDIT_region_FLASH1_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_FLASH2_start__ = 0x08100000; +define symbol __ICFEDIT_region_FLASH2_end__ = 0x081FFFFF; +define symbol __ICFEDIT_region_NORPSR_start__ = 0x0; +define symbol __ICFEDIT_region_NORPSR_end__ = 0x0; +define symbol __ICFEDIT_region_NAND_start__ = 0x0; +define symbol __ICFEDIT_region_NAND_end__ = 0x0; +define symbol __ICFEDIT_region_QSPI_start__ = 0x0; +define symbol __ICFEDIT_region_QSPI_end__ = 0x0; +define symbol __ICFEDIT_region_ITCMR_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMR_end__ = 0x0000FFFF; +define symbol __ICFEDIT_region_DTCMR_start__ = 0x20000000; +define symbol __ICFEDIT_region_DTCMR_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_AXISR_start__ = 0x24000000; +define symbol __ICFEDIT_region_AXISR_end__ = 0x2407FFFF; +define symbol __ICFEDIT_region_SRAM1_start__ = 0x30000000; +define symbol __ICFEDIT_region_SRAM1_end__ = 0x3001FFFF; +define symbol __ICFEDIT_region_SRAM2_start__ = 0x30020000; +define symbol __ICFEDIT_region_SRAM2_end__ = 0x3003FFFF; +define symbol __ICFEDIT_region_SRAM3_start__ = 0x30040000; +define symbol __ICFEDIT_region_SRAM3_end__ = 0x30047FFF; +define symbol __ICFEDIT_region_SRAM4_start__ = 0x38000000; +define symbol __ICFEDIT_region_SRAM4_end__ = 0x3800FFFF; +define symbol __ICFEDIT_region_BKPR_start__ = 0x38800000; +define symbol __ICFEDIT_region_BKPR_end__ = 0x38800FFF; +define symbol __ICFEDIT_region_SDR1_start__ = 0x0; +define symbol __ICFEDIT_region_SDR1_end__ = 0x0; +define symbol __ICFEDIT_region_SDR2_start__ = 0x0; +define symbol __ICFEDIT_region_SDR2_end__ = 0x0; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 2048; +define symbol __ICFEDIT_size_proc_stack__ = 0; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region FLASH_region = mem:[from __ICFEDIT_region_FLASH1_start__ to __ICFEDIT_region_FLASH1_end__] + | mem:[from __ICFEDIT_region_FLASH2_start__ to __ICFEDIT_region_FLASH2_end__]; +define region NORPSR_region = mem:[from __ICFEDIT_region_NORPSR_start__ to __ICFEDIT_region_NORPSR_end__]; +define region NAND_region = mem:[from __ICFEDIT_region_NAND_start__ to __ICFEDIT_region_NAND_end__ ]; +define region QSPI_region = mem:[from __ICFEDIT_region_QSPI_start__ to __ICFEDIT_region_QSPI_end__ ]; +define region ITCMR_region = mem:[from __ICFEDIT_region_ITCMR_start__ to __ICFEDIT_region_ITCMR_end__ ]; +define region DTCMR_region = mem:[from __ICFEDIT_region_DTCMR_start__ to __ICFEDIT_region_DTCMR_end__ ]; +define region AXISR_region = mem:[from __ICFEDIT_region_AXISR_start__ to __ICFEDIT_region_AXISR_end__ ]; +define region SRAM_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__ ] + | mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__ ] + | mem:[from __ICFEDIT_region_SRAM3_start__ to __ICFEDIT_region_SRAM3_end__ ] + | mem:[from __ICFEDIT_region_SRAM4_start__ to __ICFEDIT_region_SRAM4_end__ ]; +define region BKPR_region = mem:[from __ICFEDIT_region_BKPR_start__ to __ICFEDIT_region_BKPR_end__ ]; +define region SDR_region = mem:[from __ICFEDIT_region_SDR1_start__ to __ICFEDIT_region_SDR1_end__ ] + | mem:[from __ICFEDIT_region_SDR2_start__ to __ICFEDIT_region_SDR2_end__ ]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) +{ + // Required in a multi-threaded application + initialize by copy with packing = none { section __DLIB_PERTHREAD }; +} + +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in FLASH_region { readonly }; +place in QSPI_region { readonly section application_specific_ro }; +//place in NORPSR_region { }; +//place in NAND_region { }; +place in ITCMR_region { section .textrw }; +place in DTCMR_region { section .dtcm_ram, block CSTACK, block PROC_STACK }; +place in SRAM_region { section .axi_sram, block HEAP }; +place in AXISR_region { readwrite }; +place in BKPR_region { section .backup_sram }; place in SDR_region { readwrite section application_specific_rw }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/main.c b/examples/arm-cm/dpp_nucleo-h743zi/qxk/main.c index 9fb873fa..418b25e6 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/main.c +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/main.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example */ #include "qpc.h" diff --git a/examples/arm-cm/dpp_nucleo-h743zi/qxk/test.c b/examples/arm-cm/dpp_nucleo-h743zi/qxk/test.c index 87a2e8de..5a38d409 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/qxk/test.c +++ b/examples/arm-cm/dpp_nucleo-h743zi/qxk/test.c @@ -88,7 +88,7 @@ static void Thread1_run(QXThread * const me) { QXThread_delay(BSP_TICKS_PER_SEC/7); /* BLOCK */ /* publish to thread2 */ - //QF_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); + //QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); /* test TLS */ lib_fun(1U); diff --git a/examples/arm-cm/dpp_nucleo-h743zi/table.c b/examples/arm-cm/dpp_nucleo-h743zi/table.c index 33f68997..778dc408 100644 --- a/examples/arm-cm/dpp_nucleo-h743zi/table.c +++ b/examples/arm-cm/dpp_nucleo-h743zi/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -42,25 +55,28 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) #define FREE ((uint8_t)0) #define USED ((uint8_t)1) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Table} ........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &Table_inst.super; /* "opaque" pointer to Table AO */ -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { Table *me = &Table_inst; uint8_t n; @@ -72,13 +88,15 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ Table Table_inst; -/*.${AOs::Table::SM} .......................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -109,16 +127,17 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -131,11 +150,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -149,7 +169,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -157,7 +177,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -167,25 +187,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -209,7 +229,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -220,19 +240,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -244,28 +264,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -275,7 +296,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -300,4 +321,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_nucleo-l053r8/README.md b/examples/arm-cm/dpp_nucleo-l053r8/README.md new file mode 100644 index 00000000..034987a1 --- /dev/null +++ b/examples/arm-cm/dpp_nucleo-l053r8/README.md @@ -0,0 +1,5 @@ +![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_NUCLEO-L053R8.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_dpp_nucleo-l053r8.html diff --git a/examples/arm-cm/dpp_nucleo-l053r8/dpp.h b/examples/arm-cm/dpp_nucleo-l053r8/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/dpp.h +++ b/examples/arm-cm/dpp_nucleo-l053r8/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/arm-cm/dpp_nucleo-l053r8/dpp.qm b/examples/arm-cm/dpp_nucleo-l053r8/dpp.qm index 43ad83c4..08fafb97 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 @@ -119,7 +119,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -212,7 +212,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -235,7 +235,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -277,7 +277,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -288,7 +288,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/arm-cm/dpp_nucleo-l053r8/philo.c b/examples/arm-cm/dpp_nucleo-l053r8/philo.c index 2210d649..9bc4c4f1 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/philo.c +++ b/examples/arm-cm/dpp_nucleo-l053r8/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct Philo { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define THINK_TIME \ (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + (BSP_TICKS_PER_SEC/2U)) @@ -51,14 +64,16 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); /* helper macro to provide the ID of Philo "me_" */ #define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[0].super, &Philo_inst[1].super, @@ -66,9 +81,10 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[3].super, &Philo_inst[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,13 +94,15 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ Philo Philo_inst[N_PHILO]; -/*.${AOs::Philo::SM} .......................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -113,28 +131,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -142,7 +161,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -154,11 +173,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -166,9 +186,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -177,7 +197,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -191,30 +211,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -229,4 +250,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/armclang/dpp-qk.uvoptx b/examples/arm-cm/dpp_nucleo-l053r8/qk/armclang/dpp-qk.uvoptx index 9c686b1e..49a7484f 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/armclang/dpp-qk.uvoptx +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/armclang/dpp-qk.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 - 5 + 6 @@ -140,7 +140,7 @@ 0 DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0) + (1010=979,559,1390,1061,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0) 0 @@ -148,7 +148,24 @@ - + + + 0 + 0 + 96 + 1 +
    134221926
    + 0 + 0 + 0 + 0 + 0 + 1 + ..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.c + + \\dpp_qk\../../../../../ports/arm-cm/qk/armclang/qk_port.c\96 +
    +
    1 diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/armclang/dpp-qk.uvprojx b/examples/arm-cm/dpp_nucleo-l053r8/qk/armclang/dpp-qk.uvprojx index 2048b5b8..395f2402 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/armclang/dpp-qk.uvprojx +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/armclang/dpp-qk.uvprojx @@ -10,13 +10,13 @@ dpp-dbg 0x4 ARM-ADS - 6130001::V6.13.1::.\ARMCLANG + 6160000::V6.16::ARMCLANG 1 STM32L053R8Tx STMicroelectronics - Keil.STM32L0xx_DFP.2.0.0 + Keil.STM32L0xx_DFP.2.2.0 http://www.keil.com/pack/ IRAM(0x20000000,0x00002000) IROM(0x08000000,0x00010000) CPUTYPE("Cortex-M0+") CLOCK(12000000) ELITTLE @@ -185,6 +185,7 @@ 0 0 0 + 0 0 0 8 @@ -338,7 +339,7 @@ - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 @@ -351,7 +352,7 @@ 0 1 0 - 0 + 4 Stack_Size=1024 Heap_Size=16 @@ -551,6 +552,57 @@ qk_port.c 1 ..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.c + + + 2 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + + QK_USE_IRQ_NUM=30 QK_USE_IRQ_HANDLER=LCD_IRQHandler + + + + + + @@ -615,7 +667,7 @@ 2 2 2 - 2 + 0 @@ -665,7 +717,7 @@ STM32L053R8Tx STMicroelectronics - Keil.STM32L0xx_DFP.2.0.0 + Keil.STM32L0xx_DFP.2.2.0 http://www.keil.com/pack/ IRAM(0x20000000,0x00002000) IROM(0x08000000,0x00010000) CPUTYPE("Cortex-M0+") CLOCK(12000000) ELITTLE @@ -834,6 +886,7 @@ 0 0 0 + 0 0 0 8 @@ -987,7 +1040,7 @@ NDEBUG - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 @@ -1000,7 +1053,7 @@ 0 1 0 - 0 + 4 Stack_Size=1024 Heap_Size=16 @@ -1264,7 +1317,7 @@ 2 2 2 - 2 + 0 @@ -1314,7 +1367,7 @@ STM32L053R8Tx STMicroelectronics - Keil.STM32L0xx_DFP.2.0.0 + Keil.STM32L0xx_DFP.2.2.0 http://www.keil.com/pack/ IRAM(0x20000000,0x00002000) IROM(0x08000000,0x00010000) CPUTYPE("Cortex-M0+") CLOCK(12000000) ELITTLE @@ -1483,6 +1536,7 @@ 0 0 0 + 0 0 0 8 @@ -1636,7 +1690,7 @@ Q_SPY - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 @@ -1649,7 +1703,7 @@ 0 1 0 - 0 + 4 Stack_Size=1024 Heap_Size=16 diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.c b/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.c index 08782db0..2870ce7f 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.c +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/bsp.c @@ -86,7 +86,7 @@ void SysTick_Handler(void) { /* system clock tick ISR */ } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ //QACTIVE_POST(the_Ticker0, 0, &l_SysTick_Handler); /* post to Ticker0 */ /* get state of the user button */ @@ -103,11 +103,11 @@ void SysTick_Handler(void) { /* system clock tick ISR */ if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu/Makefile index 15820183..d654d868 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 NUCLEO-L053R8, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 @@ -134,7 +133,9 @@ LIB_DIRS := LIBS := # defines -DEFINES := +DEFINES := \ + -DQK_USE_IRQ_NUM=30 \ + -DQK_USE_IRQ_HANDLER=LCD_IRQHandler # 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-l053r8/qk/gnu_with-stack-prot/Makefile b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu_with-stack-prot/Makefile index 738ac217..bc86d558 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu_with-stack-prot/Makefile +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu_with-stack-prot/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu_with-stack-prot/bsp_stack-prot.c b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu_with-stack-prot/bsp_stack-prot.c index a7da286e..8ffa9beb 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu_with-stack-prot/bsp_stack-prot.c +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/gnu_with-stack-prot/bsp_stack-prot.c @@ -86,7 +86,7 @@ void SysTick_Handler(void) { /* system clock tick ISR */ } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ //QACTIVE_POST(the_Ticker0, 0, &l_SysTick_Handler); /* post to Ticker0 */ /* get state of the user button */ @@ -103,11 +103,11 @@ void SysTick_Handler(void) { /* system clock tick ISR */ if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewd b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewd index cfd4de08..473da05f 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewd +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewp index 72c031f0..71a7e385 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewp +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.ewp @@ -1,3317 +1,3535 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - nucleo-l053r8 - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\iar\startup_stm32l053xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + nucleo-l053r8 + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\iar\startup_stm32l053xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + Debug + + ICCARM + + 37 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.eww b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.eww index b41c128d..c261124a 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.eww +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qk.ewp - - - - - + + + + + $WS_DIR$\dpp-qk.ewp + + + + + diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.icf b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.icf index 51f3a2ec..9cf38ef5 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.icf +++ b/examples/arm-cm/dpp_nucleo-l053r8/qk/iar/dpp-qk.icf @@ -1,37 +1,37 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; - -define symbol __region_EEPROM_start__ = 0x08080000; -define symbol __region_EEPROM_end__ = 0x080807FF; -define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; - -place in EEPROM_region { section .eeprom }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; + +define symbol __region_EEPROM_start__ = 0x08080000; +define symbol __region_EEPROM_end__ = 0x080807FF; +define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; + +place in EEPROM_region { section .eeprom }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qv/armclang/dpp-qv.uvprojx b/examples/arm-cm/dpp_nucleo-l053r8/qv/armclang/dpp-qv.uvprojx index e25ebe0f..b1c8d7e1 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qv/armclang/dpp-qv.uvprojx +++ b/examples/arm-cm/dpp_nucleo-l053r8/qv/armclang/dpp-qv.uvprojx @@ -338,7 +338,7 @@ - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 @@ -987,7 +987,7 @@ NDEBUG - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 @@ -1636,7 +1636,7 @@ Q_SPY - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qv/bsp.c b/examples/arm-cm/dpp_nucleo-l053r8/qv/bsp.c index 69dd53ad..79c52062 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qv/bsp.c +++ b/examples/arm-cm/dpp_nucleo-l053r8/qv/bsp.c @@ -84,7 +84,7 @@ void SysTick_Handler(void) { /* system clock tick ISR */ } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ //QACTIVE_POST(the_Ticker0, 0, &l_SysTick_Handler); /* post to Ticker0 */ /* get state of the user button */ @@ -101,11 +101,11 @@ void SysTick_Handler(void) { /* system clock tick ISR */ if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } QV_ARM_ERRATUM_838869(); diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qv/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l053r8/qv/gnu/Makefile index 6de0248a..51956a16 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l053r8/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.ewd b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.ewd index 47267071..07f57330 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.ewd +++ b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.ewp index f6479a1d..2a1cc44e 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.ewp +++ b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.ewp @@ -1,3308 +1,3305 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - nucleo-l053r8 - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\iar\startup_stm32l053xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + nucleo-l053r8 + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\iar\startup_stm32l053xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.eww index 8999816a..b96f3f62 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.eww +++ b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qv.ewp - - - - - + + + + + $WS_DIR$\dpp-qv.ewp + + + + + diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.icf b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.icf index 51f3a2ec..9cf38ef5 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.icf +++ b/examples/arm-cm/dpp_nucleo-l053r8/qv/iar/dpp-qv.icf @@ -1,37 +1,37 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; - -define symbol __region_EEPROM_start__ = 0x08080000; -define symbol __region_EEPROM_end__ = 0x080807FF; -define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; - -place in EEPROM_region { section .eeprom }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; + +define symbol __region_EEPROM_start__ = 0x08080000; +define symbol __region_EEPROM_end__ = 0x080807FF; +define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; + +place in EEPROM_region { section .eeprom }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qview/qview-dpp.bat b/examples/arm-cm/dpp_nucleo-l053r8/qview/qview-dpp.bat index 3ac56aa6..b36e43d6 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qview/qview-dpp.bat +++ b/examples/arm-cm/dpp_nucleo-l053r8/qview/qview-dpp.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp.py + +@endlocal diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qview/qview-dpp1.bat b/examples/arm-cm/dpp_nucleo-l053r8/qview/qview-dpp1.bat index e4180394..8bdb9ce5 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qview/qview-dpp1.bat +++ b/examples/arm-cm/dpp_nucleo-l053r8/qview/qview-dpp1.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp1.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp1.py + +@endlocal diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/armclang/dpp-qxk.uvoptx b/examples/arm-cm/dpp_nucleo-l053r8/qxk/armclang/dpp-qxk.uvoptx index 76aa8700..4a810aa6 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/armclang/dpp-qxk.uvoptx +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/armclang/dpp-qxk.uvoptx @@ -125,7 +125,7 @@ 0 ST-LINKIII-KEIL_SWO - -U066CFF484951775087074312 -O8431 -SF480 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC800 -FN1 -FF0STM32L0xx_64.FLM -FS08000000 -FL010000 -FP0($$Device:STM32L053R8Tx$CMSIS\Flash\STM32L0xx_64.FLM) + -U066CFF484951775087074312 -O8431 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC800 -FN1 -FF0STM32L0xx_64.FLM -FS08000000 -FL010000 -FP0($$Device:STM32L053R8Tx$CMSIS\Flash\STM32L0xx_64.FLM) 0 @@ -510,7 +510,7 @@ 0 ST-LINKIII-KEIL_SWO - -U066CFF484951775087074312 -I0 -O8431 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32L0xx_64.FLM -FS08000000 -FL010000 -FP0($$Device:STM32L053R8Tx$CMSIS\Flash\STM32L0xx_64.FLM) + -U066CFF484951775087074312 -O8431 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32L0xx_64.FLM -FS08000000 -FL010000 -FP0($$Device:STM32L053R8Tx$CMSIS\Flash\STM32L0xx_64.FLM) 0 diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/armclang/dpp-qxk.uvprojx b/examples/arm-cm/dpp_nucleo-l053r8/qxk/armclang/dpp-qxk.uvprojx index bcc3f4fc..5fbeb796 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/armclang/dpp-qxk.uvprojx +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/armclang/dpp-qxk.uvprojx @@ -339,7 +339,7 @@ QXK_ON_CONTEXT_SW - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 @@ -572,6 +572,57 @@ qxk_port.c 1 ..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.c + + + 2 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + + QXK_USE_IRQ_NUM=30 QXK_USE_IRQ_HANDLER=LCD_IRQHandler + + + + + + qxk_port.h @@ -1014,7 +1065,7 @@ NDEBUG - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 @@ -1689,7 +1740,7 @@ Q_SPY,QXK_ON_CONTEXT_SW - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/bsp.c b/examples/arm-cm/dpp_nucleo-l053r8/qxk/bsp.c index ff8b0dd0..f9961bdc 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/bsp.c +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/bsp.c @@ -87,7 +87,7 @@ void SysTick_Handler(void) { /* system clock tick ISR */ } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ //QACTIVE_POST(the_Ticker0, 0, &l_SysTick_Handler); /* post to Ticker0 */ /* get state of the user button */ @@ -104,11 +104,11 @@ void SysTick_Handler(void) { /* system clock tick ISR */ if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l053r8/qxk/gnu/Makefile index cdcfbe06..263bd100 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C, DPP on NUCLEO-L053R8, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005-2022 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 @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 @@ -138,7 +137,9 @@ LIB_DIRS := LIBS := # defines -DEFINES := -DQXK_ON_CONTEXT_SW +DEFINES := -DQXK_ON_CONTEXT_SW \ + -DQXK_USE_IRQ_NUM=30 \ + -DQXK_USE_IRQ_HANDLER=LCD_IRQHandler # 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-l053r8/qxk/iar/dpp-qxk.ewd b/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.ewd index cfd4de08..473da05f 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.ewd +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + 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 a777bcd5..30a6a50e 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 @@ -1,3330 +1,3548 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - $PROJ_DIR$\..\test.c - - - - nucleo-l053r8 - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\iar\startup_stm32l053xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + $PROJ_DIR$\..\test.c + + + + nucleo-l053r8 + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\iar\startup_stm32l053xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l053xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\stm32l0xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l053r8\system_stm32l0xx.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c + + Debug + + ICCARM + + 37 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.eww b/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.eww index e7d75f8b..38808ca3 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.eww +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qxk.ewp - - - - - + + + + + $WS_DIR$\dpp-qxk.ewp + + + + + diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.icf b/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.icf index 51f3a2ec..9cf38ef5 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.icf +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/iar/dpp-qxk.icf @@ -1,37 +1,37 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; - -define symbol __region_EEPROM_start__ = 0x08080000; -define symbol __region_EEPROM_end__ = 0x080807FF; -define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; - -place in EEPROM_region { section .eeprom }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0800FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20001FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; + +define symbol __region_EEPROM_start__ = 0x08080000; +define symbol __region_EEPROM_end__ = 0x080807FF; +define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; + +place in EEPROM_region { section .eeprom }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l053r8/qxk/test.c b/examples/arm-cm/dpp_nucleo-l053r8/qxk/test.c index 26ebf247..56a1ba20 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/qxk/test.c +++ b/examples/arm-cm/dpp_nucleo-l053r8/qxk/test.c @@ -60,6 +60,8 @@ QXThread * const XT_Test2 = &l_test2; /*..........................................................................*/ static void Thread1_run(QXThread * const me) { + QS_OBJ_DICTIONARY(&l_test1); + me->super.thread = &l_tls1; /* initialize the TLS for Thread1 */ for (;;) { @@ -80,7 +82,7 @@ static void Thread1_run(QXThread * const me) { QXThread_delay(BSP_TICKS_PER_SEC/7); /* BLOCK */ /* publish to thread2 */ - //QF_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); + //QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); /* test TLS */ lib_fun(1U); @@ -95,6 +97,8 @@ void Test1_ctor(void) { /*..........................................................................*/ static void Thread2_run(QXThread * const me) { + QS_OBJ_DICTIONARY(&l_test2); + /* initialize the semaphore before using it * NOTE: the semaphore is initialized in the highest-priority thread * that uses it. Alternatively, the semaphore can be initialized diff --git a/examples/arm-cm/dpp_nucleo-l053r8/table.c b/examples/arm-cm/dpp_nucleo-l053r8/table.c index 33f68997..778dc408 100644 --- a/examples/arm-cm/dpp_nucleo-l053r8/table.c +++ b/examples/arm-cm/dpp_nucleo-l053r8/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -42,25 +55,28 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) #define FREE ((uint8_t)0) #define USED ((uint8_t)1) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Table} ........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &Table_inst.super; /* "opaque" pointer to Table AO */ -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { Table *me = &Table_inst; uint8_t n; @@ -72,13 +88,15 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ Table Table_inst; -/*.${AOs::Table::SM} .......................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -109,16 +127,17 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -131,11 +150,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -149,7 +169,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -157,7 +177,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -167,25 +187,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -209,7 +229,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -220,19 +240,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -244,28 +264,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -275,7 +296,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -300,4 +321,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_nucleo-l152re/dpp.h b/examples/arm-cm/dpp_nucleo-l152re/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/dpp.h +++ b/examples/arm-cm/dpp_nucleo-l152re/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/arm-cm/dpp_nucleo-l152re/dpp.qm b/examples/arm-cm/dpp_nucleo-l152re/dpp.qm index 43ad83c4..08fafb97 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 @@ -119,7 +119,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -212,7 +212,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -235,7 +235,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -277,7 +277,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -288,7 +288,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/arm-cm/dpp_nucleo-l152re/philo.c b/examples/arm-cm/dpp_nucleo-l152re/philo.c index 2210d649..9bc4c4f1 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/philo.c +++ b/examples/arm-cm/dpp_nucleo-l152re/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct Philo { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define THINK_TIME \ (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + (BSP_TICKS_PER_SEC/2U)) @@ -51,14 +64,16 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); /* helper macro to provide the ID of Philo "me_" */ #define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[0].super, &Philo_inst[1].super, @@ -66,9 +81,10 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[3].super, &Philo_inst[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,13 +94,15 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ Philo Philo_inst[N_PHILO]; -/*.${AOs::Philo::SM} .......................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -113,28 +131,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -142,7 +161,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -154,11 +173,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -166,9 +186,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -177,7 +197,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -191,30 +211,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -229,4 +250,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/armclang/dpp-qk.uvprojx b/examples/arm-cm/dpp_nucleo-l152re/qk/armclang/dpp-qk.uvprojx index 0f290778..fb317d02 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/armclang/dpp-qk.uvprojx +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/armclang/dpp-qk.uvprojx @@ -338,7 +338,7 @@ HSE_VALUE=4000000 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re @@ -982,7 +982,7 @@ NDEBUG - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re @@ -1626,7 +1626,7 @@ Q_SPY - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/bsp.c b/examples/arm-cm/dpp_nucleo-l152re/qk/bsp.c index 9b1e8387..430edfde 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/bsp.c +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/bsp.c @@ -85,7 +85,7 @@ void SysTick_Handler(void) { /* system clock tick ISR -- kernel aware */ } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* get state of the user button */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -101,11 +101,11 @@ void SysTick_Handler(void) { /* system clock tick ISR -- kernel aware */ if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/Makefile index 60a0eaba..7955ce92 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L152RE, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l152re diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewd b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewd index 6df81f7c..fe187d7a 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewd +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewd @@ -1,4249 +1,4249 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 29 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 29 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewp index e0798c40..eec6876e 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewp +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.ewp @@ -1,3308 +1,3305 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - nucleo-l152re - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\iar\startup_stm32l1xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + nucleo-l152re + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\iar\startup_stm32l1xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.eww b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.eww index b41c128d..c261124a 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.eww +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qk.ewp - - - - - + + + + + $WS_DIR$\dpp-qk.ewp + + + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.icf b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.icf index 233e1dbc..b20f68a4 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.icf +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/iar/dpp-qk.icf @@ -1,36 +1,36 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; - -define symbol __region_EEPROM_start__ = 0x08080000; -define symbol __region_EEPROM_end__ = 0x08083FFF; -define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; - +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; + +define symbol __region_EEPROM_start__ = 0x08080000; +define symbol __region_EEPROM_end__ = 0x08083FFF; +define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; + place in EEPROM_region { section .eeprom }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk-Spy.vgdbsettings b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk-Spy.vgdbsettings index 58087c13..7c9fe82c 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk-Spy.vgdbsettings +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk-Spy.vgdbsettings @@ -1,134 +1,134 @@ - - - Spy - - - - MinGWUnixSlash - $(ToolchainDir) - - $(ProjectDir) - false - stm32.xml - - - - - 0 - - - dpp-qk.vcxproj - - - - 1 - true - - - - - - - - - - - - - Default - - - - true - - - - - Unknown - - true - true - true - - - - false - - - VisualGDB\VisualGDBCache - - - - - - - false - false - false - false - false - false - false - false - false - - false - false - false - false - false - false - true - false - None - false - false - main - true - false - false - false - 0 - - - com.sysprogs.arm.openocd - stlink-v2-1 - 066EFF495056805087184715 - - -f interface/stlink-v2-1.cfg -f target/stm32l1.cfg -c init -c "reset init" - - - - false - - 131072 - Enabled - - set remotetimeout 60 - target remote :$$SYS:GDB_PORT$$ - mon halt - mon reset init - load - - false - 0 - 0 - false - - - - true - Auto - 0 - false - false - true - false - false - - _estack - 0 - false - true - + + + Spy + + + + MinGWUnixSlash + $(ToolchainDir) + + $(ProjectDir) + false + stm32.xml + + + + + 0 + + + dpp-qk.vcxproj + + + + 1 + true + + + + + + + + + + + + + Default + + + + true + + + + + Unknown + + true + true + true + + + + false + + + VisualGDB\VisualGDBCache + + + + + + + false + false + false + false + false + false + false + false + false + + false + false + false + false + false + false + true + false + None + false + false + main + true + false + false + false + 0 + + + com.sysprogs.arm.openocd + stlink-v2-1 + 066EFF495056805087184715 + + -f interface/stlink-v2-1.cfg -f target/stm32l1.cfg -c init -c "reset init" + + + + false + + 131072 + Enabled + + set remotetimeout 60 + target remote :$$SYS:GDB_PORT$$ + mon halt + mon reset init + load + + false + 0 + 0 + false + + + + true + Auto + 0 + false + false + true + false + false + + _estack + 0 + false + true + \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.sln b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.sln index b4f6ad19..065c42fa 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.sln +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.sln @@ -1,28 +1,28 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30517.126 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpp-qk", "dpp-qk.vcxproj", "{33464F24-9B0F-4276-89FF-8D462C1392EE}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|VisualGDB = Debug|VisualGDB - Release|VisualGDB = Release|VisualGDB - Spy|VisualGDB = Spy|VisualGDB - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {33464F24-9B0F-4276-89FF-8D462C1392EE}.Debug|VisualGDB.ActiveCfg = Debug|VisualGDB - {33464F24-9B0F-4276-89FF-8D462C1392EE}.Debug|VisualGDB.Build.0 = Debug|VisualGDB - {33464F24-9B0F-4276-89FF-8D462C1392EE}.Release|VisualGDB.ActiveCfg = Release|VisualGDB - {33464F24-9B0F-4276-89FF-8D462C1392EE}.Release|VisualGDB.Build.0 = Release|VisualGDB - {33464F24-9B0F-4276-89FF-8D462C1392EE}.Spy|VisualGDB.ActiveCfg = Spy|VisualGDB - {33464F24-9B0F-4276-89FF-8D462C1392EE}.Spy|VisualGDB.Build.0 = Spy|VisualGDB - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {35222B4D-B267-427E-8293-873EDD0720C0} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30517.126 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpp-qk", "dpp-qk.vcxproj", "{33464F24-9B0F-4276-89FF-8D462C1392EE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|VisualGDB = Debug|VisualGDB + Release|VisualGDB = Release|VisualGDB + Spy|VisualGDB = Spy|VisualGDB + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {33464F24-9B0F-4276-89FF-8D462C1392EE}.Debug|VisualGDB.ActiveCfg = Debug|VisualGDB + {33464F24-9B0F-4276-89FF-8D462C1392EE}.Debug|VisualGDB.Build.0 = Debug|VisualGDB + {33464F24-9B0F-4276-89FF-8D462C1392EE}.Release|VisualGDB.ActiveCfg = Release|VisualGDB + {33464F24-9B0F-4276-89FF-8D462C1392EE}.Release|VisualGDB.Build.0 = Release|VisualGDB + {33464F24-9B0F-4276-89FF-8D462C1392EE}.Spy|VisualGDB.ActiveCfg = Spy|VisualGDB + {33464F24-9B0F-4276-89FF-8D462C1392EE}.Spy|VisualGDB.Build.0 = Spy|VisualGDB + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {35222B4D-B267-427E-8293-873EDD0720C0} + EndGlobalSection +EndGlobal diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.vcxproj b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.vcxproj index bd1f10e5..f660bdb7 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.vcxproj +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.vcxproj @@ -1,148 +1,148 @@ - - - - - Debug - VisualGDB - - - Release - VisualGDB - - - Spy - VisualGDB - - - - 16.0 - {33464F24-9B0F-4276-89FF-8D462C1392EE} - com.sysprogs.arm.stm32 - 2020.06 - - - - $(ProjectDir)stm32.props - - - $(ProjectDir)stm32.props - - - $(ProjectDir)stm32.props - - - - - - - - - Debug - d883dc4a-545e-4d48-bba0-41645b13fd69 - 9.3.1/(GNU/r0 - - - Debug - d883dc4a-545e-4d48-bba0-41645b13fd69 - 9.3.1/(GNU/r0 - - - d883dc4a-545e-4d48-bba0-41645b13fd69 - 9.3.1/(GNU/r0 - - - - ..;../..;../../../../../include;../../../../../src;../../../../../ports/arm-cm/qk/gnu;../../../../../3rd_party/CMSIS/Include;../../../../../3rd_party/nucleo-l152re;%(ClCompile.AdditionalIncludeDirectories) - DEBUG=1;%(ClCompile.PreprocessorDefinitions) - - - ;%(Link.AdditionalLinkerInputs) - ;%(Link.LibrarySearchDirectories) - ;%(Link.AdditionalLibraryNames) - dpp-qk.ld - - - - - ..;../..;../../../../../include;../../../../../src;../../../../../ports/arm-cm/qk/gnu;../../../../../3rd_party/CMSIS/Include;../../../../../3rd_party/nucleo-l152re;%(ClCompile.AdditionalIncludeDirectories) - DEBUG=1;Q_SPY;%(ClCompile.PreprocessorDefinitions) - O3 - - - ;%(Link.AdditionalLinkerInputs) - ;%(Link.LibrarySearchDirectories) - ;%(Link.AdditionalLibraryNames) - dpp-qk.ld - - - - - ..;../..;../../../../../include;../../../../../src;../../../../../ports/arm-cm/qk/gnu;../../../../../3rd_party/CMSIS/Include;../../../../../3rd_party/nucleo-l152re;%(ClCompile.AdditionalIncludeDirectories) - NDEBUG=1;RELEASE=1;%(ClCompile.PreprocessorDefinitions) - - - ;%(Link.AdditionalLinkerInputs) - ;%(Link.LibrarySearchDirectories) - ;%(Link.AdditionalLibraryNames) - dpp-qk.ld - - - - - - - - - - - - - - - - - - - - - - true - true - false - - - true - false - true - - - true - false - true - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + VisualGDB + + + Release + VisualGDB + + + Spy + VisualGDB + + + + 16.0 + {33464F24-9B0F-4276-89FF-8D462C1392EE} + com.sysprogs.arm.stm32 + 2020.06 + + + + $(ProjectDir)stm32.props + + + $(ProjectDir)stm32.props + + + $(ProjectDir)stm32.props + + + + + + + + + Debug + d883dc4a-545e-4d48-bba0-41645b13fd69 + 9.3.1/(GNU/r0 + + + Debug + d883dc4a-545e-4d48-bba0-41645b13fd69 + 9.3.1/(GNU/r0 + + + d883dc4a-545e-4d48-bba0-41645b13fd69 + 9.3.1/(GNU/r0 + + + + ..;../..;../../../../../include;../../../../../src;../../../../../ports/arm-cm/qk/gnu;../../../../../3rd_party/CMSIS/Include;../../../../../3rd_party/nucleo-l152re;%(ClCompile.AdditionalIncludeDirectories) + DEBUG=1;%(ClCompile.PreprocessorDefinitions) + + + ;%(Link.AdditionalLinkerInputs) + ;%(Link.LibrarySearchDirectories) + ;%(Link.AdditionalLibraryNames) + dpp-qk.ld + + + + + ..;../..;../../../../../include;../../../../../src;../../../../../ports/arm-cm/qk/gnu;../../../../../3rd_party/CMSIS/Include;../../../../../3rd_party/nucleo-l152re;%(ClCompile.AdditionalIncludeDirectories) + DEBUG=1;Q_SPY;%(ClCompile.PreprocessorDefinitions) + O3 + + + ;%(Link.AdditionalLinkerInputs) + ;%(Link.LibrarySearchDirectories) + ;%(Link.AdditionalLibraryNames) + dpp-qk.ld + + + + + ..;../..;../../../../../include;../../../../../src;../../../../../ports/arm-cm/qk/gnu;../../../../../3rd_party/CMSIS/Include;../../../../../3rd_party/nucleo-l152re;%(ClCompile.AdditionalIncludeDirectories) + NDEBUG=1;RELEASE=1;%(ClCompile.PreprocessorDefinitions) + + + ;%(Link.AdditionalLinkerInputs) + ;%(Link.LibrarySearchDirectories) + ;%(Link.AdditionalLibraryNames) + dpp-qk.ld + + + + + + + + + + + + + + + + + + + + + + true + true + false + + + true + false + true + + + true + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.vcxproj.filters b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.vcxproj.filters index 1820c834..b13e5aec 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.vcxproj.filters +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/dpp-qk.vcxproj.filters @@ -1,137 +1,137 @@ - - - - - {c6017ab7-6299-4b81-acee-c1763a48750d} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {c919b77d-bd4e-42dd-90aa-1ccb1597d180} - - - {d32a0836-a71c-48cd-a0dc-003d1237eae2} - - - {546cf9df-d280-46a0-8461-b51c82a3baa5} - - - {0d86c7f6-a92e-4327-835c-5bbf87534465} - - - {3c579ef5-dace-45b5-8c74-75413c8bb3b6} - - - - - nucleo-l152re - - - VisualGDB settings - - - VisualGDB settings - - - VisualGDB settings - - - - - Source files - - - Source files - - - Source files - - - Source files - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QS - - - QS - - - QS - - - QP-port - - - nucleo-l152re - - - nucleo-l152re - - - Source files - - - - - Source files - - - Source files - - - QP-port - - - QP-port - - - QP-port - - - QP-port - - - - - Source files - - + + + + + {c6017ab7-6299-4b81-acee-c1763a48750d} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {c919b77d-bd4e-42dd-90aa-1ccb1597d180} + + + {d32a0836-a71c-48cd-a0dc-003d1237eae2} + + + {546cf9df-d280-46a0-8461-b51c82a3baa5} + + + {0d86c7f6-a92e-4327-835c-5bbf87534465} + + + {3c579ef5-dace-45b5-8c74-75413c8bb3b6} + + + + + nucleo-l152re + + + VisualGDB settings + + + VisualGDB settings + + + VisualGDB settings + + + + + Source files + + + Source files + + + Source files + + + Source files + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QS + + + QS + + + QS + + + QP-port + + + nucleo-l152re + + + nucleo-l152re + + + Source files + + + + + Source files + + + Source files + + + QP-port + + + QP-port + + + QP-port + + + QP-port + + + + + Source files + + \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/stm32.props b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/stm32.props index e08cbdb4..80190729 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/stm32.props +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/stm32.props @@ -1,31 +1,31 @@ - - - - - - - ARM_MATH_CM3;flash_layout;STM32L152RE;STM32L152xE;%(ClCompile.PreprocessorDefinitions) - %(ClCompile.AdditionalIncludeDirectories);$(ProjectDir);$(BSP_ROOT)/STM32L1xxxx/STM32L1xx_HAL_Driver/Inc;$(BSP_ROOT)/STM32L1xxxx/STM32L1xx_HAL_Driver/Inc/Legacy;$(BSP_ROOT)/STM32L1xxxx/CMSIS_HAL/Device/ST/STM32L1xx/Include;$(BSP_ROOT)/STM32L1xxxx/CMSIS_HAL/Core/Include;$(BSP_ROOT)/STM32L1xxxx/CMSIS_HAL/Include - - - - - $(BSP_ROOT)/STM32L1xxxx/LinkerScripts/STM32L152RE_flash.lds - - - - $(BSP_ROOT)/STM32L1xxxx/LinkerScripts/STM32L152RE_flash.lds - - - - - cortex-m3 - THUMB - - - + + + + + + + ARM_MATH_CM3;flash_layout;STM32L152RE;STM32L152xE;%(ClCompile.PreprocessorDefinitions) + %(ClCompile.AdditionalIncludeDirectories);$(ProjectDir);$(BSP_ROOT)/STM32L1xxxx/STM32L1xx_HAL_Driver/Inc;$(BSP_ROOT)/STM32L1xxxx/STM32L1xx_HAL_Driver/Inc/Legacy;$(BSP_ROOT)/STM32L1xxxx/CMSIS_HAL/Device/ST/STM32L1xx/Include;$(BSP_ROOT)/STM32L1xxxx/CMSIS_HAL/Core/Include;$(BSP_ROOT)/STM32L1xxxx/CMSIS_HAL/Include + + + + + $(BSP_ROOT)/STM32L1xxxx/LinkerScripts/STM32L152RE_flash.lds + + + + $(BSP_ROOT)/STM32L1xxxx/LinkerScripts/STM32L152RE_flash.lds + + + + + cortex-m3 + THUMB + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/stm32.xml b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/stm32.xml index 510f8537..63349b32 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/stm32.xml +++ b/examples/arm-cm/dpp_nucleo-l152re/qk/visualgdb/stm32.xml @@ -1,39 +1,39 @@ - - - d883dc4a-545e-4d48-bba0-41645b13fd69 - - 9.3.1 - (GNU - 0 - - com.sysprogs.arm.stm32 - 2020.06 - STM32L152RE - STM32L1xxxx/DeviceDefinitions/stm32l152xe.xml - - - - com.sysprogs.bspoptions.primary_memory - flash - - - com.sysprogs.mcuoptions.ignore_startup_file - - - - Device-specific files - stm32.mak - - com.sysprogs.arm.stm32.ll - - - - - com.sysprogs.bspoptions.stm32.ll_driver - - - - - - + + + d883dc4a-545e-4d48-bba0-41645b13fd69 + + 9.3.1 + (GNU + 0 + + com.sysprogs.arm.stm32 + 2020.06 + STM32L152RE + STM32L1xxxx/DeviceDefinitions/stm32l152xe.xml + + + + com.sysprogs.bspoptions.primary_memory + flash + + + com.sysprogs.mcuoptions.ignore_startup_file + + + + Device-specific files + stm32.mak + + com.sysprogs.arm.stm32.ll + + + + + com.sysprogs.bspoptions.stm32.ll_driver + + + + + + \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l152re/qspy200824_123412.seq b/examples/arm-cm/dpp_nucleo-l152re/qspy200824_123412.seq index a765c69d..9f4c2883 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qspy200824_123412.seq +++ b/examples/arm-cm/dpp_nucleo-l152re/qspy200824_123412.seq @@ -1,126 +1,126 @@ --g l_SysTick_Handler,Table_inst,Philo_inst[0],Philo_inst[1],Philo_inst[2],Philo_inst[3],Philo_inst[4] - - +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ - |l_SysTick_Handl| | Table_inst | | Philo_inst[0] | | Philo_inst[1] | | Philo_inst[2] | | Philo_inst[3] | | Philo_inst[4] | - +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ -4294946722 . . . . * .SERVE_SIG. . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294947277 *--SERVE_SIG------->| | | | | | -4294947535 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+-------------------+------------------>| -4294952081 | |<------------------+-------------------+-------------------+-------------------+-------HUNGRY_SIG--* -4294955759 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294956667 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| -4294957464 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | -4294958261 | *--EAT_SIG----------+-------------------+------------------>| | | -4294959058 | *--EAT_SIG----------+------------------>| | | | -4294959855 | *--EAT_SIG--------->| | | | | -4294964080 | | | | | | -4294946874 | | | | | | -4294947628 *--TIMEOUT_SIG------+------------------>| | | | | -4294952066 | |<------HUNGRY_SIG--* | | | | -4294956967 | | | | | | -4294947560 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | -4294952034 | |<------------------+-------------------+-------HUNGRY_SIG--* | | -4294955712 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294956620 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| -4294957416 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | -4294958212 | *--EAT_SIG----------+-------------------+------------------>| | | -4294959008 | *--EAT_SIG----------+------------------>| | | | -4294959804 | *--EAT_SIG--------->| | | | | -4294948109 | | | | | | -4294951527 | | | | | | -4294947560 *--TIMEOUT_SIG------+-------------------+------------------>| | | | -4294952034 | |<------------------+-------HUNGRY_SIG--* | | | -4294956932 | | | | | | -4294947535 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+------------------>| | -4294952009 | |<------------------+-------------------+-------------------+-------HUNGRY_SIG--* | -4294956907 | | | | | | -4294947530 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+-------------------+------------------>| -4294950987 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . -4294951895 | |<------------------+-------------------+-------------------+-------------------+---------DONE_SIG--* -4294956005 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294956913 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| -4294957725 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | -4294958521 | *--EAT_SIG----------+-------------------+------------------>| | | -4294959317 | *--EAT_SIG----------+------------------>| | | | -4294960113 | *--EAT_SIG--------->| | | | | -4294965793 | | | | | | -4294959029 | | | | | | -4294946649 . . . . * .PAUSE_SIG. . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294947203 *--PAUSE_SIG------->| | | | | | -4294950125 | | | | | | -4294947520 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | -4294950997 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . . -4294951905 | |<------------------+-------------------+---------DONE_SIG--* | | -4294958730 | | | | | | -4294947521 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+-------------------+------------------>| -4294951995 | |<------------------+-------------------+-------------------+-------------------+-------HUNGRY_SIG--* -4294956867 | | | | | | -4294947520 *--TIMEOUT_SIG------+------------------>| | | | | -4294950961 . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294951869 | |<--------DONE_SIG--* | | | | -4294958646 | | | | | | -4294947524 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | -4294951962 | |<------------------+-------------------+-------HUNGRY_SIG--* | | -4294956834 | | | | | | -4294947537 *--TIMEOUT_SIG------+------------------>| | | | | -4294951939 | |<------HUNGRY_SIG--* | | | | -4294956811 | | | | | | -4294946542 . . . . * .SERVE_SIG. . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294947096 *--SERVE_SIG------->| | | | | | -4294950966 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294951874 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| -4294952670 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | -4294953466 | *--EAT_SIG----------+-------------------+------------------>| | | -4294954262 | *--EAT_SIG----------+------------------>| | | | -4294955058 | *--EAT_SIG--------->| | | | | -4294958067 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294958976 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| -4294959752 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | -4294960528 | *--EAT_SIG----------+-------------------+------------------>| | | -4294961304 | *--EAT_SIG----------+------------------>| | | | -4294962080 | *--EAT_SIG--------->| | | | | -4294964514 | | | | | | -4294961504 | | | | | | -4294950324 | | | | | | -4294947523 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | -4294950964 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . . -4294951872 | |<------------------+-------------------+---------DONE_SIG--* | | -4294955992 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294956900 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| -4294957696 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | -4294958508 | *--EAT_SIG----------+-------------------+------------------>| | | -4294959304 | *--EAT_SIG----------+------------------>| | | | -4294960100 | *--EAT_SIG--------->| | | | | -4294947872 | | | | | | -4294951644 | | | | | | -4294947527 *--TIMEOUT_SIG------+------------------>| | | | | -4294949289 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | -4294953727 | |<------------------+-------------------+-------HUNGRY_SIG--* | | -4294958625 | | | | | | -4294961848 . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294962756 | |<--------DONE_SIG--* | | | | -4294966866 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . - +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ - |l_SysTick_Handl| | Table_inst | | Philo_inst[0] | | Philo_inst[1] | | Philo_inst[2] | | Philo_inst[3] | | Philo_inst[4] | - +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ -4294946999 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| -4294947795 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | -4294948591 | *--EAT_SIG----------+-------------------+------------------>| | | -4294949387 | *--EAT_SIG----------+------------------>| | | | -4294950183 | *--EAT_SIG--------->| | | | | -4294964009 | | | | | | -4294947090 | | | | | | -4294947559 *--TIMEOUT_SIG------+------------------>| | | | | -4294951997 | |<------HUNGRY_SIG--* | | | | -4294956911 | | | | | | -4294947520 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+------------------>| | -4294950961 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . -4294951869 | |<------------------+-------------------+-------------------+---------DONE_SIG--* | -4294955979 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . -4294956887 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| -4294957683 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | -4294958479 | *--EAT_SIG----------+-------------------+------------------>| | | -4294959275 | *--EAT_SIG----------+------------------>| | | | -4294960071 | *--EAT_SIG--------->| | | | | -4294965770 | | | | | | -4294948812 | | | | | | +-g l_SysTick_Handler,Table_inst,Philo_inst[0],Philo_inst[1],Philo_inst[2],Philo_inst[3],Philo_inst[4] + + +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ + |l_SysTick_Handl| | Table_inst | | Philo_inst[0] | | Philo_inst[1] | | Philo_inst[2] | | Philo_inst[3] | | Philo_inst[4] | + +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +4294946722 . . . . * .SERVE_SIG. . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294947277 *--SERVE_SIG------->| | | | | | +4294947535 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+-------------------+------------------>| +4294952081 | |<------------------+-------------------+-------------------+-------------------+-------HUNGRY_SIG--* +4294955759 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294956667 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| +4294957464 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | +4294958261 | *--EAT_SIG----------+-------------------+------------------>| | | +4294959058 | *--EAT_SIG----------+------------------>| | | | +4294959855 | *--EAT_SIG--------->| | | | | +4294964080 | | | | | | +4294946874 | | | | | | +4294947628 *--TIMEOUT_SIG------+------------------>| | | | | +4294952066 | |<------HUNGRY_SIG--* | | | | +4294956967 | | | | | | +4294947560 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | +4294952034 | |<------------------+-------------------+-------HUNGRY_SIG--* | | +4294955712 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294956620 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| +4294957416 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | +4294958212 | *--EAT_SIG----------+-------------------+------------------>| | | +4294959008 | *--EAT_SIG----------+------------------>| | | | +4294959804 | *--EAT_SIG--------->| | | | | +4294948109 | | | | | | +4294951527 | | | | | | +4294947560 *--TIMEOUT_SIG------+-------------------+------------------>| | | | +4294952034 | |<------------------+-------HUNGRY_SIG--* | | | +4294956932 | | | | | | +4294947535 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+------------------>| | +4294952009 | |<------------------+-------------------+-------------------+-------HUNGRY_SIG--* | +4294956907 | | | | | | +4294947530 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+-------------------+------------------>| +4294950987 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . +4294951895 | |<------------------+-------------------+-------------------+-------------------+---------DONE_SIG--* +4294956005 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294956913 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| +4294957725 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | +4294958521 | *--EAT_SIG----------+-------------------+------------------>| | | +4294959317 | *--EAT_SIG----------+------------------>| | | | +4294960113 | *--EAT_SIG--------->| | | | | +4294965793 | | | | | | +4294959029 | | | | | | +4294946649 . . . . * .PAUSE_SIG. . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294947203 *--PAUSE_SIG------->| | | | | | +4294950125 | | | | | | +4294947520 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | +4294950997 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . . +4294951905 | |<------------------+-------------------+---------DONE_SIG--* | | +4294958730 | | | | | | +4294947521 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+-------------------+------------------>| +4294951995 | |<------------------+-------------------+-------------------+-------------------+-------HUNGRY_SIG--* +4294956867 | | | | | | +4294947520 *--TIMEOUT_SIG------+------------------>| | | | | +4294950961 . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294951869 | |<--------DONE_SIG--* | | | | +4294958646 | | | | | | +4294947524 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | +4294951962 | |<------------------+-------------------+-------HUNGRY_SIG--* | | +4294956834 | | | | | | +4294947537 *--TIMEOUT_SIG------+------------------>| | | | | +4294951939 | |<------HUNGRY_SIG--* | | | | +4294956811 | | | | | | +4294946542 . . . . * .SERVE_SIG. . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294947096 *--SERVE_SIG------->| | | | | | +4294950966 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294951874 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| +4294952670 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | +4294953466 | *--EAT_SIG----------+-------------------+------------------>| | | +4294954262 | *--EAT_SIG----------+------------------>| | | | +4294955058 | *--EAT_SIG--------->| | | | | +4294958067 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294958976 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| +4294959752 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | +4294960528 | *--EAT_SIG----------+-------------------+------------------>| | | +4294961304 | *--EAT_SIG----------+------------------>| | | | +4294962080 | *--EAT_SIG--------->| | | | | +4294964514 | | | | | | +4294961504 | | | | | | +4294950324 | | | | | | +4294947523 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | +4294950964 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . . +4294951872 | |<------------------+-------------------+---------DONE_SIG--* | | +4294955992 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294956900 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| +4294957696 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | +4294958508 | *--EAT_SIG----------+-------------------+------------------>| | | +4294959304 | *--EAT_SIG----------+------------------>| | | | +4294960100 | *--EAT_SIG--------->| | | | | +4294947872 | | | | | | +4294951644 | | | | | | +4294947527 *--TIMEOUT_SIG------+------------------>| | | | | +4294949289 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | | +4294953727 | |<------------------+-------------------+-------HUNGRY_SIG--* | | +4294958625 | | | | | | +4294961848 . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294962756 | |<--------DONE_SIG--* | | | | +4294966866 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . + +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ + |l_SysTick_Handl| | Table_inst | | Philo_inst[0] | | Philo_inst[1] | | Philo_inst[2] | | Philo_inst[3] | | Philo_inst[4] | + +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +4294946999 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| +4294947795 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | +4294948591 | *--EAT_SIG----------+-------------------+------------------>| | | +4294949387 | *--EAT_SIG----------+------------------>| | | | +4294950183 | *--EAT_SIG--------->| | | | | +4294964009 | | | | | | +4294947090 | | | | | | +4294947559 *--TIMEOUT_SIG------+------------------>| | | | | +4294951997 | |<------HUNGRY_SIG--* | | | | +4294956911 | | | | | | +4294947520 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+------------------>| | +4294950961 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . +4294951869 | |<------------------+-------------------+-------------------+---------DONE_SIG--* | +4294955979 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . +4294956887 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>| +4294957683 | *--EAT_SIG----------+-------------------+-------------------+------------------>| | +4294958479 | *--EAT_SIG----------+-------------------+------------------>| | | +4294959275 | *--EAT_SIG----------+------------------>| | | | +4294960071 | *--EAT_SIG--------->| | | | | +4294965770 | | | | | | +4294948812 | | | | | | diff --git a/examples/arm-cm/dpp_nucleo-l152re/qspy200824_123438.seq b/examples/arm-cm/dpp_nucleo-l152re/qspy200824_123438.seq index 9e9c3084..81d33a92 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qspy200824_123438.seq +++ b/examples/arm-cm/dpp_nucleo-l152re/qspy200824_123438.seq @@ -1,99 +1,99 @@ --g l_SysTick_Handler,Table_inst,? - - +-------+-------+ +-------+-------+ +-------+-------+ - |l_SysTick_Handl| | Table_inst | | ? | - +-------+-------+ +-------+-------+ +-------+-------+ -4294946722 . . . . * .SERVE_SIG. . . . | . . . . . . . . . / . . . -4294947277 *--SERVE_SIG------->| / -4294947535 *--TIMEOUT_SIG------+------------------>/ -4294952081 | |<------HUNGRY_SIG--* -4294955759 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . -4294956667 | *--EAT_SIG--------->/ -4294957464 | *--EAT_SIG--------->/ -4294958261 | *--EAT_SIG--------->/ -4294959058 | *--EAT_SIG--------->/ -4294959855 | *--EAT_SIG--------->/ -4294947628 *--TIMEOUT_SIG------+------------------>/ -4294952066 | |<------HUNGRY_SIG--* -4294947560 *--TIMEOUT_SIG------+------------------>/ -4294952034 | |<------HUNGRY_SIG--* -4294955712 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . -4294956620 | *--EAT_SIG--------->/ -4294957416 | *--EAT_SIG--------->/ -4294958212 | *--EAT_SIG--------->/ -4294959008 | *--EAT_SIG--------->/ -4294959804 | *--EAT_SIG--------->/ -4294947560 *--TIMEOUT_SIG------+------------------>/ -4294952034 | |<------HUNGRY_SIG--* -4294947535 *--TIMEOUT_SIG------+------------------>/ -4294952009 | |<------HUNGRY_SIG--* -4294947530 *--TIMEOUT_SIG------+------------------>/ -4294950987 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . -4294951895 | |<--------DONE_SIG--* -4294956005 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . -4294956913 | *--EAT_SIG--------->/ -4294957725 | *--EAT_SIG--------->/ -4294958521 | *--EAT_SIG--------->/ -4294959317 | *--EAT_SIG--------->/ -4294960113 | *--EAT_SIG--------->/ -4294946649 . . . . * .PAUSE_SIG. . . . | . . . . . . . . . / . . . -4294947203 *--PAUSE_SIG------->| / -4294950125 | / -4294947520 *--TIMEOUT_SIG------+------------------>/ -4294950997 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . -4294951905 | |<--------DONE_SIG--* -4294947521 *--TIMEOUT_SIG------+------------------>/ -4294951995 | |<------HUNGRY_SIG--* -4294947520 *--TIMEOUT_SIG------+------------------>/ -4294950961 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . -4294951869 | |<--------DONE_SIG--* -4294947524 *--TIMEOUT_SIG------+------------------>/ -4294951962 | |<------HUNGRY_SIG--* -4294947537 *--TIMEOUT_SIG------+------------------>/ -4294951939 | |<------HUNGRY_SIG--* -4294946542 . . . . * .SERVE_SIG. . . . | . . . . . . . . . / . . . -4294947096 *--SERVE_SIG------->| / -4294950966 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . -4294951874 | *--EAT_SIG--------->/ -4294952670 | *--EAT_SIG--------->/ -4294953466 | *--EAT_SIG--------->/ -4294954262 | *--EAT_SIG--------->/ -4294955058 | *--EAT_SIG--------->/ -4294958067 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . -4294958976 | *--EAT_SIG--------->/ -4294959752 | *--EAT_SIG--------->/ -4294960528 | *--EAT_SIG--------->/ -4294961304 | *--EAT_SIG--------->/ -4294962080 | *--EAT_SIG--------->/ -4294964514 | / -4294947523 *--TIMEOUT_SIG------+------------------>/ -4294950964 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . -4294951872 | |<--------DONE_SIG--* -4294955992 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . -4294956900 | *--EAT_SIG--------->/ -4294957696 | *--EAT_SIG--------->/ -4294958508 | *--EAT_SIG--------->/ -4294959304 | *--EAT_SIG--------->/ -4294960100 | *--EAT_SIG--------->/ -4294947527 *--TIMEOUT_SIG------+------------------>/ -4294949289 *--TIMEOUT_SIG------+------------------>/ -4294953727 | |<------HUNGRY_SIG--* -4294961848 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . -4294962756 | |<--------DONE_SIG--* -4294966866 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . -4294946999 | *--EAT_SIG--------->/ -4294947795 | *--EAT_SIG--------->/ -4294948591 | *--EAT_SIG--------->/ -4294949387 | *--EAT_SIG--------->/ -4294950183 | *--EAT_SIG--------->/ -4294947559 *--TIMEOUT_SIG------+------------------>/ -4294951997 | |<------HUNGRY_SIG--* -4294947520 *--TIMEOUT_SIG------+------------------>/ -4294950961 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . -4294951869 | |<--------DONE_SIG--* -4294955979 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . -4294956887 | *--EAT_SIG--------->/ -4294957683 | *--EAT_SIG--------->/ -4294958479 | *--EAT_SIG--------->/ -4294959275 | *--EAT_SIG--------->/ -4294960071 | *--EAT_SIG--------->/ +-g l_SysTick_Handler,Table_inst,? + + +-------+-------+ +-------+-------+ +-------+-------+ + |l_SysTick_Handl| | Table_inst | | ? | + +-------+-------+ +-------+-------+ +-------+-------+ +4294946722 . . . . * .SERVE_SIG. . . . | . . . . . . . . . / . . . +4294947277 *--SERVE_SIG------->| / +4294947535 *--TIMEOUT_SIG------+------------------>/ +4294952081 | |<------HUNGRY_SIG--* +4294955759 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . +4294956667 | *--EAT_SIG--------->/ +4294957464 | *--EAT_SIG--------->/ +4294958261 | *--EAT_SIG--------->/ +4294959058 | *--EAT_SIG--------->/ +4294959855 | *--EAT_SIG--------->/ +4294947628 *--TIMEOUT_SIG------+------------------>/ +4294952066 | |<------HUNGRY_SIG--* +4294947560 *--TIMEOUT_SIG------+------------------>/ +4294952034 | |<------HUNGRY_SIG--* +4294955712 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . +4294956620 | *--EAT_SIG--------->/ +4294957416 | *--EAT_SIG--------->/ +4294958212 | *--EAT_SIG--------->/ +4294959008 | *--EAT_SIG--------->/ +4294959804 | *--EAT_SIG--------->/ +4294947560 *--TIMEOUT_SIG------+------------------>/ +4294952034 | |<------HUNGRY_SIG--* +4294947535 *--TIMEOUT_SIG------+------------------>/ +4294952009 | |<------HUNGRY_SIG--* +4294947530 *--TIMEOUT_SIG------+------------------>/ +4294950987 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . +4294951895 | |<--------DONE_SIG--* +4294956005 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . +4294956913 | *--EAT_SIG--------->/ +4294957725 | *--EAT_SIG--------->/ +4294958521 | *--EAT_SIG--------->/ +4294959317 | *--EAT_SIG--------->/ +4294960113 | *--EAT_SIG--------->/ +4294946649 . . . . * .PAUSE_SIG. . . . | . . . . . . . . . / . . . +4294947203 *--PAUSE_SIG------->| / +4294950125 | / +4294947520 *--TIMEOUT_SIG------+------------------>/ +4294950997 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . +4294951905 | |<--------DONE_SIG--* +4294947521 *--TIMEOUT_SIG------+------------------>/ +4294951995 | |<------HUNGRY_SIG--* +4294947520 *--TIMEOUT_SIG------+------------------>/ +4294950961 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . +4294951869 | |<--------DONE_SIG--* +4294947524 *--TIMEOUT_SIG------+------------------>/ +4294951962 | |<------HUNGRY_SIG--* +4294947537 *--TIMEOUT_SIG------+------------------>/ +4294951939 | |<------HUNGRY_SIG--* +4294946542 . . . . * .SERVE_SIG. . . . | . . . . . . . . . / . . . +4294947096 *--SERVE_SIG------->| / +4294950966 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . +4294951874 | *--EAT_SIG--------->/ +4294952670 | *--EAT_SIG--------->/ +4294953466 | *--EAT_SIG--------->/ +4294954262 | *--EAT_SIG--------->/ +4294955058 | *--EAT_SIG--------->/ +4294958067 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . +4294958976 | *--EAT_SIG--------->/ +4294959752 | *--EAT_SIG--------->/ +4294960528 | *--EAT_SIG--------->/ +4294961304 | *--EAT_SIG--------->/ +4294962080 | *--EAT_SIG--------->/ +4294964514 | / +4294947523 *--TIMEOUT_SIG------+------------------>/ +4294950964 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . +4294951872 | |<--------DONE_SIG--* +4294955992 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . +4294956900 | *--EAT_SIG--------->/ +4294957696 | *--EAT_SIG--------->/ +4294958508 | *--EAT_SIG--------->/ +4294959304 | *--EAT_SIG--------->/ +4294960100 | *--EAT_SIG--------->/ +4294947527 *--TIMEOUT_SIG------+------------------>/ +4294949289 *--TIMEOUT_SIG------+------------------>/ +4294953727 | |<------HUNGRY_SIG--* +4294961848 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . +4294962756 | |<--------DONE_SIG--* +4294966866 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . +4294946999 | *--EAT_SIG--------->/ +4294947795 | *--EAT_SIG--------->/ +4294948591 | *--EAT_SIG--------->/ +4294949387 | *--EAT_SIG--------->/ +4294950183 | *--EAT_SIG--------->/ +4294947559 *--TIMEOUT_SIG------+------------------>/ +4294951997 | |<------HUNGRY_SIG--* +4294947520 *--TIMEOUT_SIG------+------------------>/ +4294950961 . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . . +4294951869 | |<--------DONE_SIG--* +4294955979 . . . . | . . . . . . . . . * .EAT_SIG. . . . . / . . . +4294956887 | *--EAT_SIG--------->/ +4294957683 | *--EAT_SIG--------->/ +4294958479 | *--EAT_SIG--------->/ +4294959275 | *--EAT_SIG--------->/ +4294960071 | *--EAT_SIG--------->/ diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/armclang/dpp-qv.uvoptx b/examples/arm-cm/dpp_nucleo-l152re/qv/armclang/dpp-qv.uvoptx index 0a6014e9..231fca7c 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qv/armclang/dpp-qv.uvoptx +++ b/examples/arm-cm/dpp_nucleo-l152re/qv/armclang/dpp-qv.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 - 5 + 6 @@ -140,12 +140,12 @@ 0 ST-LINKIII-KEIL_SWO - -U066EFF495056805087184715 -I0 -O8398 -S1 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512.FLM -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM) + -U066EFF495056805087184715 -I0 -O8398 -S1 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512.FLM -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$CMSIS\Flash\STM32L1xx_512.FLM) 0 UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$Flash\STM32L1xx_512.FLM)) + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L1xx_512 -FS08000000 -FL080000 -FP0($$Device:STM32L152RE$CMSIS\Flash\STM32L1xx_512.FLM)) @@ -207,6 +207,13 @@ + + 1 + 1 + 0 + 2 + 10000000 + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/armclang/dpp-qv.uvprojx b/examples/arm-cm/dpp_nucleo-l152re/qv/armclang/dpp-qv.uvprojx index f9c0c6d9..dc6ce4b0 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qv/armclang/dpp-qv.uvprojx +++ b/examples/arm-cm/dpp_nucleo-l152re/qv/armclang/dpp-qv.uvprojx @@ -10,13 +10,13 @@ dpp-dbg 0x4 ARM-ADS - 6130001::V6.13.1::.\ARMCLANG + 6160000::V6.16::ARMCLANG 1 STM32L152RE STMicroelectronics - Keil.STM32L1xx_DFP.1.0.2 + Keil.STM32L1xx_DFP.1.4.1 http://www.keil.com/pack/ IROM(0x08000000,0x80000) IRAM(0x20000000,0x14000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE @@ -185,6 +185,7 @@ 0 0 0 + 0 0 0 8 @@ -338,7 +339,7 @@ - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re @@ -351,7 +352,7 @@ 0 1 0 - 0 + 4 Stack_Size=1024 Heap_Size=16 @@ -620,7 +621,7 @@ 2 2 2 - 2 + 0 @@ -660,7 +661,7 @@ STM32L152RE STMicroelectronics - Keil.STM32L1xx_DFP.1.0.2 + Keil.STM32L1xx_DFP.1.4.1 http://www.keil.com/pack/ IROM(0x08000000,0x80000) IRAM(0x20000000,0x14000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE @@ -829,6 +830,7 @@ 0 0 0 + 0 0 0 8 @@ -982,7 +984,7 @@ NDEBUG - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re @@ -995,7 +997,7 @@ 0 1 0 - 0 + 4 Stack_Size=1024 Heap_Size=16 @@ -1264,7 +1266,7 @@ 2 2 2 - 2 + 0 @@ -1304,7 +1306,7 @@ STM32L152RE STMicroelectronics - Keil.STM32L1xx_DFP.1.0.2 + Keil.STM32L1xx_DFP.1.4.1 http://www.keil.com/pack/ IROM(0x08000000,0x80000) IRAM(0x20000000,0x14000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE @@ -1473,6 +1475,7 @@ 0 0 0 + 0 0 0 8 @@ -1626,7 +1629,7 @@ Q_SPY - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re @@ -1639,7 +1642,7 @@ 0 1 0 - 0 + 4 Stack_Size=1024 Heap_Size=16 diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/bsp.c b/examples/arm-cm/dpp_nucleo-l152re/qv/bsp.c index a100c6be..6c4b6132 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qv/bsp.c +++ b/examples/arm-cm/dpp_nucleo-l152re/qv/bsp.c @@ -83,7 +83,7 @@ void SysTick_Handler(void) { /* system clock tick ISR -- kernel aware */ } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* get state of the user button */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -99,11 +99,11 @@ void SysTick_Handler(void) { /* system clock tick ISR -- kernel aware */ if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } QV_ARM_ERRATUM_838869(); diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/Makefile index f5bcfeb3..edced21f 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l152re/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L152RE, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l152re diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewd b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewd index da4e3c7c..0f2b25ed 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewd +++ b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewd @@ -1,4459 +1,4459 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 32 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 1 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 32 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 0 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 32 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 1 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 32 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 1 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 32 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 0 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 32 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 1 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewp index f7ef84f0..6455938d 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewp +++ b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.ewp @@ -1,3311 +1,3308 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - nucleo-l152re - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\iar\startup_stm32l1xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + nucleo-l152re + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\iar\startup_stm32l1xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.eww index 8999816a..b96f3f62 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.eww +++ b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qv.ewp - - - - - + + + + + $WS_DIR$\dpp-qv.ewp + + + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.icf b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.icf index 233e1dbc..b20f68a4 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.icf +++ b/examples/arm-cm/dpp_nucleo-l152re/qv/iar/dpp-qv.icf @@ -1,36 +1,36 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; - -define symbol __region_EEPROM_start__ = 0x08080000; -define symbol __region_EEPROM_end__ = 0x08083FFF; -define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; - +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; + +define symbol __region_EEPROM_start__ = 0x08080000; +define symbol __region_EEPROM_end__ = 0x08083FFF; +define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; + place in EEPROM_region { section .eeprom }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l152re/qview/qview-dpp.bat b/examples/arm-cm/dpp_nucleo-l152re/qview/qview-dpp.bat index 3ac56aa6..b36e43d6 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qview/qview-dpp.bat +++ b/examples/arm-cm/dpp_nucleo-l152re/qview/qview-dpp.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp.py + +@endlocal diff --git a/examples/arm-cm/dpp_nucleo-l152re/qview/qview-dpp1.bat b/examples/arm-cm/dpp_nucleo-l152re/qview/qview-dpp1.bat index e4180394..8bdb9ce5 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qview/qview-dpp1.bat +++ b/examples/arm-cm/dpp_nucleo-l152re/qview/qview-dpp1.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp1.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp1.py + +@endlocal diff --git a/examples/arm-cm/dpp_nucleo-l152re/qxk/armclang/dpp-qxk.uvprojx b/examples/arm-cm/dpp_nucleo-l152re/qxk/armclang/dpp-qxk.uvprojx index 761c9542..d034f967 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qxk/armclang/dpp-qxk.uvprojx +++ b/examples/arm-cm/dpp_nucleo-l152re/qxk/armclang/dpp-qxk.uvprojx @@ -339,7 +339,7 @@ HSE_VALUE=4000000 - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re @@ -1004,7 +1004,7 @@ NDEBUG - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re @@ -1669,7 +1669,7 @@ Q_SPY - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\nucleo-l152re diff --git a/examples/arm-cm/dpp_nucleo-l152re/qxk/bsp.c b/examples/arm-cm/dpp_nucleo-l152re/qxk/bsp.c index 734c940a..92ec7122 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qxk/bsp.c +++ b/examples/arm-cm/dpp_nucleo-l152re/qxk/bsp.c @@ -85,7 +85,7 @@ void SysTick_Handler(void) { /* system clock tick ISR -- kernel aware */ } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* get state of the user button */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -101,11 +101,11 @@ void SysTick_Handler(void) { /* system clock tick ISR -- kernel aware */ if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_nucleo-l152re/qxk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l152re/qxk/gnu/Makefile index 7b440eda..b74c7294 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l152re/qxk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L152RE, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l152re diff --git a/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.ewd b/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.ewd index 6df81f7c..fe187d7a 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.ewd +++ b/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.ewd @@ -1,4249 +1,4249 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 29 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 29 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 29 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.ewp b/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.ewp index 575bef52..8f3f3532 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.ewp +++ b/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.ewp @@ -1,3320 +1,3317 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - $PROJ_DIR$\..\test.c - - - - nucleo-l152re - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\iar\startup_stm32l1xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + $PROJ_DIR$\..\test.c + + + + nucleo-l152re + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\iar\startup_stm32l1xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\stm32l1xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\nucleo-l152re\system_stm32l1xx.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.eww b/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.eww index e7d75f8b..38808ca3 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.eww +++ b/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qxk.ewp - - - - - + + + + + $WS_DIR$\dpp-qxk.ewp + + + + + diff --git a/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.icf b/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.icf index 233e1dbc..b20f68a4 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.icf +++ b/examples/arm-cm/dpp_nucleo-l152re/qxk/iar/dpp-qxk.icf @@ -1,36 +1,36 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; - -define symbol __region_EEPROM_start__ = 0x08080000; -define symbol __region_EEPROM_end__ = 0x08083FFF; -define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; - +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; + +define symbol __region_EEPROM_start__ = 0x08080000; +define symbol __region_EEPROM_end__ = 0x08083FFF; +define region EEPROM_region = mem:[from __region_EEPROM_start__ to __region_EEPROM_end__]; + place in EEPROM_region { section .eeprom }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_nucleo-l152re/qxk/test.c b/examples/arm-cm/dpp_nucleo-l152re/qxk/test.c index 7f4d96fd..487288ef 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/qxk/test.c +++ b/examples/arm-cm/dpp_nucleo-l152re/qxk/test.c @@ -82,7 +82,7 @@ static void Thread1_run(QXThread * const me) { QXThread_delay(BSP_TICKS_PER_SEC/7); /* BLOCK */ /* publish to thread2 */ - //QF_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); + //QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); /* test TLS */ lib_fun(1U); diff --git a/examples/arm-cm/dpp_nucleo-l152re/table.c b/examples/arm-cm/dpp_nucleo-l152re/table.c index 33f68997..778dc408 100644 --- a/examples/arm-cm/dpp_nucleo-l152re/table.c +++ b/examples/arm-cm/dpp_nucleo-l152re/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -42,25 +55,28 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) #define FREE ((uint8_t)0) #define USED ((uint8_t)1) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Table} ........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &Table_inst.super; /* "opaque" pointer to Table AO */ -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { Table *me = &Table_inst; uint8_t n; @@ -72,13 +88,15 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ Table Table_inst; -/*.${AOs::Table::SM} .......................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -109,16 +127,17 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -131,11 +150,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -149,7 +169,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -157,7 +177,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -167,25 +187,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -209,7 +229,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -220,19 +240,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -244,28 +264,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -275,7 +296,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -300,4 +321,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_nucleo-l552ze/dpp.h b/examples/arm-cm/dpp_nucleo-l552ze/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/dpp.h +++ b/examples/arm-cm/dpp_nucleo-l552ze/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/arm-cm/dpp_nucleo-l552ze/dpp.qm b/examples/arm-cm/dpp_nucleo-l552ze/dpp.qm index 43ad83c4..08fafb97 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 @@ -119,7 +119,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -212,7 +212,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -235,7 +235,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -277,7 +277,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -288,7 +288,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/arm-cm/dpp_nucleo-l552ze/philo.c b/examples/arm-cm/dpp_nucleo-l552ze/philo.c index 2210d649..9bc4c4f1 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/philo.c +++ b/examples/arm-cm/dpp_nucleo-l552ze/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct Philo { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define THINK_TIME \ (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + (BSP_TICKS_PER_SEC/2U)) @@ -51,14 +64,16 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); /* helper macro to provide the ID of Philo "me_" */ #define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[0].super, &Philo_inst[1].super, @@ -66,9 +81,10 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[3].super, &Philo_inst[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,13 +94,15 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ Philo Philo_inst[N_PHILO]; -/*.${AOs::Philo::SM} .......................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -113,28 +131,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -142,7 +161,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -154,11 +173,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -166,9 +186,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -177,7 +197,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -191,30 +211,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -229,4 +250,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qk/bsp.c b/examples/arm-cm/dpp_nucleo-l552ze/qk/bsp.c index 93b61155..e88221cd 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qk/bsp.c +++ b/examples/arm-cm/dpp_nucleo-l552ze/qk/bsp.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example, NUCLEO-L552ZE board, preemptive QK kernel */ #include "qpc.h" @@ -84,7 +83,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -99,11 +98,11 @@ void SysTick_Handler(void) { if (tmp != 0U) { /* debounced Key button state changed? */ if (buttons.depressed != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l552ze/qk/gnu/Makefile index 92333990..6f0f2d7e 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l552ze/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEOL552ZE, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -84,7 +84,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/STM32CubeL5/Drivers/STM32L5xx_HAL_Driver/Inc \ diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_nucleo-l552ze/qk/iar/dpp-qk.ewp index 1aa98a27..2d8eae88 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qk/iar/dpp-qk.ewp +++ b/examples/arm-cm/dpp_nucleo-l552ze/qk/iar/dpp-qk.ewp @@ -339,7 +339,6 @@ $PROJ_DIR$\.. $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeL5\Drivers\STM32L5xx_HAL_Driver\Inc @@ -1397,7 +1396,6 @@ $PROJ_DIR$\.. $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeL5\Drivers\STM32L5xx_HAL_Driver\Inc @@ -2455,7 +2453,6 @@ $PROJ_DIR$\.. $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeL5\Drivers\STM32L5xx_HAL_Driver\Inc diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qk/main.c b/examples/arm-cm/dpp_nucleo-l552ze/qk/main.c index 213edabd..5a601fa3 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qk/main.c +++ b/examples/arm-cm/dpp_nucleo-l552ze/qk/main.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example */ #include "qpc.h" diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qv/bsp.c b/examples/arm-cm/dpp_nucleo-l552ze/qv/bsp.c index f0ceed99..d7bd130e 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qv/bsp.c +++ b/examples/arm-cm/dpp_nucleo-l552ze/qv/bsp.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example, NUCLEO-L552ZE board, cooperative QV kernel */ #include "qpc.h" @@ -82,7 +81,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -97,11 +96,11 @@ void SysTick_Handler(void) { if (tmp != 0U) { /* debounced Key button state changed? */ if (buttons.depressed != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } QV_ARM_ERRATUM_838869(); diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qv/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l552ze/qv/gnu/Makefile index 633c93cf..806e2c45 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l552ze/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEOL552ZE, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -84,7 +84,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/STM32CubeL5/Drivers/STM32L5xx_HAL_Driver/Inc \ diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_nucleo-l552ze/qv/iar/dpp-qv.ewp index f98a3a85..2d0b4e9f 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qv/iar/dpp-qv.ewp +++ b/examples/arm-cm/dpp_nucleo-l552ze/qv/iar/dpp-qv.ewp @@ -339,7 +339,6 @@ $PROJ_DIR$\.. $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeL5\Drivers\STM32L5xx_HAL_Driver\Inc @@ -1397,7 +1396,6 @@ $PROJ_DIR$\.. $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeL5\Drivers\STM32L5xx_HAL_Driver\Inc @@ -2455,7 +2453,6 @@ $PROJ_DIR$\.. $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeL5\Drivers\STM32L5xx_HAL_Driver\Inc diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qv/main.c b/examples/arm-cm/dpp_nucleo-l552ze/qv/main.c index 213edabd..5a601fa3 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qv/main.c +++ b/examples/arm-cm/dpp_nucleo-l552ze/qv/main.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example */ #include "qpc.h" diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qxk/bsp.c b/examples/arm-cm/dpp_nucleo-l552ze/qxk/bsp.c index 879b7831..5aacf1fa 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qxk/bsp.c +++ b/examples/arm-cm/dpp_nucleo-l552ze/qxk/bsp.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example, NUCLEO-L552ZE board, dual-mode QXK kernel */ #include "qpc.h" @@ -86,7 +85,7 @@ void SysTick_Handler(void) { } #endif - //QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + //QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ QACTIVE_POST(&ticker0.super, 0, &l_SysTick_Handler); /* post to ticker0 */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -102,11 +101,11 @@ void SysTick_Handler(void) { if (tmp != 0U) { /* debounced Key button state changed? */ if (buttons.depressed != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qxk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-l552ze/qxk/gnu/Makefile index 09b028ea..6b612b55 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-l552ze/qxk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEOL552ZE, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -84,7 +84,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/STM32CubeL5/Drivers/STM32L5xx_HAL_Driver/Inc \ diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qxk/iar/dpp-qxk.ewp b/examples/arm-cm/dpp_nucleo-l552ze/qxk/iar/dpp-qxk.ewp index 995b3502..b275bc3b 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qxk/iar/dpp-qxk.ewp +++ b/examples/arm-cm/dpp_nucleo-l552ze/qxk/iar/dpp-qxk.ewp @@ -339,7 +339,6 @@ $PROJ_DIR$\.. $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeL5\Drivers\STM32L5xx_HAL_Driver\Inc @@ -1397,7 +1396,6 @@ $PROJ_DIR$\.. $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeL5\Drivers\STM32L5xx_HAL_Driver\Inc @@ -2455,7 +2453,6 @@ $PROJ_DIR$\.. $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeL5\Drivers\STM32L5xx_HAL_Driver\Inc diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qxk/main.c b/examples/arm-cm/dpp_nucleo-l552ze/qxk/main.c index 289e67e3..5cc50d85 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qxk/main.c +++ b/examples/arm-cm/dpp_nucleo-l552ze/qxk/main.c @@ -27,7 +27,6 @@ * @version Last updated for: @ref qpc_7_0_0 * * @file -* @ingroup examples * @brief DPP example */ #include "qpc.h" diff --git a/examples/arm-cm/dpp_nucleo-l552ze/qxk/test.c b/examples/arm-cm/dpp_nucleo-l552ze/qxk/test.c index 87a2e8de..5a38d409 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/qxk/test.c +++ b/examples/arm-cm/dpp_nucleo-l552ze/qxk/test.c @@ -88,7 +88,7 @@ static void Thread1_run(QXThread * const me) { QXThread_delay(BSP_TICKS_PER_SEC/7); /* BLOCK */ /* publish to thread2 */ - //QF_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); + //QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); /* test TLS */ lib_fun(1U); diff --git a/examples/arm-cm/dpp_nucleo-l552ze/table.c b/examples/arm-cm/dpp_nucleo-l552ze/table.c index 33f68997..778dc408 100644 --- a/examples/arm-cm/dpp_nucleo-l552ze/table.c +++ b/examples/arm-cm/dpp_nucleo-l552ze/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -42,25 +55,28 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) #define FREE ((uint8_t)0) #define USED ((uint8_t)1) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Table} ........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &Table_inst.super; /* "opaque" pointer to Table AO */ -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { Table *me = &Table_inst; uint8_t n; @@ -72,13 +88,15 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ Table Table_inst; -/*.${AOs::Table::SM} .......................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -109,16 +127,17 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -131,11 +150,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -149,7 +169,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -157,7 +177,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -167,25 +187,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -209,7 +229,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -220,19 +240,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -244,28 +264,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -275,7 +296,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -300,4 +321,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_stm32f4-discovery/README.md b/examples/arm-cm/dpp_stm32f4-discovery/README.md new file mode 100644 index 00000000..82e5c44b --- /dev/null +++ b/examples/arm-cm/dpp_stm32f4-discovery/README.md @@ -0,0 +1,5 @@ +![STM32F4-Discovery](../../../doxygen/images/bd_STM32F4-Disco.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_dpp_stm32f4-discovery.html diff --git a/examples/arm-cm/dpp_stm32f4-discovery/dpp.h b/examples/arm-cm/dpp_stm32f4-discovery/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/dpp.h +++ b/examples/arm-cm/dpp_stm32f4-discovery/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/dpp.qm b/examples/arm-cm/dpp_stm32f4-discovery/dpp.qm index 5b1603f1..37fa5e83 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/dpp.qm +++ b/examples/arm-cm/dpp_stm32f4-discovery/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -116,7 +115,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -210,7 +209,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -233,7 +232,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -275,7 +274,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -286,7 +285,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/arm-cm/dpp_stm32f4-discovery/philo.c b/examples/arm-cm/dpp_stm32f4-discovery/philo.c index e6c85eb9..9bf65092 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/philo.c +++ b/examples/arm-cm/dpp_stm32f4-discovery/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -61,14 +74,16 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ }; /* Philo definition --------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,12 +93,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +129,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -141,7 +159,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -153,11 +171,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -165,9 +184,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -176,7 +195,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -190,30 +209,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -228,4 +248,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qk/armclang/dpp-qk.uvprojx b/examples/arm-cm/dpp_stm32f4-discovery/qk/armclang/dpp-qk.uvprojx index 3ba963af..efde8084 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qk/armclang/dpp-qk.uvprojx +++ b/examples/arm-cm/dpp_stm32f4-discovery/qk/armclang/dpp-qk.uvprojx @@ -338,7 +338,7 @@ - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc @@ -997,7 +997,7 @@ NDEBUG - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc @@ -1656,7 +1656,7 @@ Q_SPY - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qk/bsp.c b/examples/arm-cm/dpp_stm32f4-discovery/qk/bsp.c index acf8bf86..9a3a8584 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qk/bsp.c +++ b/examples/arm-cm/dpp_stm32f4-discovery/qk/bsp.c @@ -96,7 +96,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick); /* process time events for tick rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick); /* process time events for tick rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -111,11 +111,11 @@ void SysTick_Handler(void) { if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick); } } diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qk/gnu/Makefile b/examples/arm-cm/dpp_stm32f4-discovery/qk/gnu/Makefile index e7b3cfca..a9721398 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_stm32f4-discovery/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on STM32F4-Discovery, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -81,7 +81,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/stm32f4-discovery \ diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qk/gnu/flash.bat b/examples/arm-cm/dpp_stm32f4-discovery/qk/gnu/flash.bat index b5be2cf0..637ee704 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qk/gnu/flash.bat +++ b/examples/arm-cm/dpp_stm32f4-discovery/qk/gnu/flash.bat @@ -1,23 +1,23 @@ -::============================================================================ -:: Batch file to load the DPP program to the flash of STM32 boards -:: -:: NOTE: requires the ST-LINK utlity from ST, see: -:: http://www.st.com/en/embedded-software/stsw-link004.html -:: -@echo off -setlocal - -@echo Load the program to the flash of STM32 board -@echo usage: flash dbg\dpp.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: STLINK utility on your machine -:: -set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" - -@echo on -%STLINK% -P %1 0x08000000 - -@echo off -endlocal +::============================================================================ +:: Batch file to load the DPP program to the flash of STM32 boards +:: +:: NOTE: requires the ST-LINK utlity from ST, see: +:: http://www.st.com/en/embedded-software/stsw-link004.html +:: +@echo off +setlocal + +@echo Load the program to the flash of STM32 board +@echo usage: flash dbg\dpp.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: STLINK utility on your machine +:: +set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" + +@echo on +%STLINK% -P %1 0x08000000 + +@echo off +endlocal diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.ewd b/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.ewd index a9313410..f3025db5 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.ewd +++ b/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.ewp index 32f6df33..3f8b9d0d 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.ewp +++ b/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.ewp @@ -1,3200 +1,3197 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c - - - - stm32f4-discovery - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\iar\startup_stm32f4xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\stm32f4xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_rcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.h - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c + + + + stm32f4-discovery + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\iar\startup_stm32f4xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\stm32f4xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_rcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.h + + + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.eww b/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.eww index b41c128d..c261124a 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.eww +++ b/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qk.ewp - - - - - + + + + + $WS_DIR$\dpp-qk.ewp + + + + + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.icf b/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.icf index 82c7aca5..9dfb7040 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.icf +++ b/examples/arm-cm/dpp_stm32f4-discovery/qk/iar/dpp-qk.icf @@ -1,35 +1,35 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define symbol __region_RAM1_start__ = 0x10000000; -define symbol __region_RAM1_end__ = 0x1000FFFF; - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; -define region RAM1_region = mem:[from __region_RAM1_start__ to __region_RAM1_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define symbol __region_RAM1_start__ = 0x10000000; +define symbol __region_RAM1_end__ = 0x1000FFFF; + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region RAM1_region = mem:[from __region_RAM1_start__ to __region_RAM1_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; place in RAM1_region { section .sram }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qv/armclang/dpp-qv.uvprojx b/examples/arm-cm/dpp_stm32f4-discovery/qv/armclang/dpp-qv.uvprojx index 4177a4a3..1290b180 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qv/armclang/dpp-qv.uvprojx +++ b/examples/arm-cm/dpp_stm32f4-discovery/qv/armclang/dpp-qv.uvprojx @@ -338,7 +338,7 @@ -Wno-padded - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc @@ -997,7 +997,7 @@ NDEBUG - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc @@ -1656,7 +1656,7 @@ Q_SPY - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qv/bsp.c b/examples/arm-cm/dpp_stm32f4-discovery/qv/bsp.c index eeed6d1e..edbdfc4a 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qv/bsp.c +++ b/examples/arm-cm/dpp_stm32f4-discovery/qv/bsp.c @@ -94,7 +94,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick); /* process time events for tick rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick); /* process time events for tick rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -109,11 +109,11 @@ void SysTick_Handler(void) { if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick); } } QV_ARM_ERRATUM_838869(); diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qv/gnu/Makefile b/examples/arm-cm/dpp_stm32f4-discovery/qv/gnu/Makefile index db941c9c..393d3ed8 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_stm32f4-discovery/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on STM32F4-Discovery, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -81,7 +81,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/stm32f4-discovery \ diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qv/gnu/flash.bat b/examples/arm-cm/dpp_stm32f4-discovery/qv/gnu/flash.bat index b5be2cf0..637ee704 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qv/gnu/flash.bat +++ b/examples/arm-cm/dpp_stm32f4-discovery/qv/gnu/flash.bat @@ -1,23 +1,23 @@ -::============================================================================ -:: Batch file to load the DPP program to the flash of STM32 boards -:: -:: NOTE: requires the ST-LINK utlity from ST, see: -:: http://www.st.com/en/embedded-software/stsw-link004.html -:: -@echo off -setlocal - -@echo Load the program to the flash of STM32 board -@echo usage: flash dbg\dpp.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: STLINK utility on your machine -:: -set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" - -@echo on -%STLINK% -P %1 0x08000000 - -@echo off -endlocal +::============================================================================ +:: Batch file to load the DPP program to the flash of STM32 boards +:: +:: NOTE: requires the ST-LINK utlity from ST, see: +:: http://www.st.com/en/embedded-software/stsw-link004.html +:: +@echo off +setlocal + +@echo Load the program to the flash of STM32 board +@echo usage: flash dbg\dpp.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: STLINK utility on your machine +:: +set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" + +@echo on +%STLINK% -P %1 0x08000000 + +@echo off +endlocal diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.ewd b/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.ewd index a9313410..f3025db5 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.ewd +++ b/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.ewp b/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.ewp index 1ef09cd9..e76013f3 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.ewp +++ b/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.ewp @@ -1,3188 +1,3185 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c - - - - stm32f4-discovery - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\iar\startup_stm32f4xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\stm32f4xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_rcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.h - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c + + + + stm32f4-discovery + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\iar\startup_stm32f4xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\stm32f4xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_rcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.h + + + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.eww b/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.eww index 8999816a..b96f3f62 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.eww +++ b/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qv.ewp - - - - - + + + + + $WS_DIR$\dpp-qv.ewp + + + + + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.icf b/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.icf index 82c7aca5..9dfb7040 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.icf +++ b/examples/arm-cm/dpp_stm32f4-discovery/qv/iar/dpp-qv.icf @@ -1,35 +1,35 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define symbol __region_RAM1_start__ = 0x10000000; -define symbol __region_RAM1_end__ = 0x1000FFFF; - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; -define region RAM1_region = mem:[from __region_RAM1_start__ to __region_RAM1_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define symbol __region_RAM1_start__ = 0x10000000; +define symbol __region_RAM1_end__ = 0x1000FFFF; + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region RAM1_region = mem:[from __region_RAM1_start__ to __region_RAM1_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; place in RAM1_region { section .sram }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/armclang/dpp-qxk.uvprojx b/examples/arm-cm/dpp_stm32f4-discovery/qxk/armclang/dpp-qxk.uvprojx index ae8491ec..47038f67 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/armclang/dpp-qxk.uvprojx +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/armclang/dpp-qxk.uvprojx @@ -339,7 +339,7 @@ - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc @@ -1019,7 +1019,7 @@ NDEBUG - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc @@ -1699,7 +1699,7 @@ Q_SPY - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include; ..\..\..\..\..\3rd_party\stm32f4-discovery; ..\..\..\..\..\3rd_party\stm32f4-discovery\inc diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/bsp.c b/examples/arm-cm/dpp_stm32f4-discovery/qxk/bsp.c index b6c43546..5075ac59 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/bsp.c +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/bsp.c @@ -96,7 +96,7 @@ void SysTick_Handler(void) { } #endif - QF_TICK_X(0U, &l_SysTick); /* process time events for tick rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick); /* process time events for tick rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -111,11 +111,11 @@ void SysTick_Handler(void) { if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick); } } diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/gnu/Makefile b/examples/arm-cm/dpp_stm32f4-discovery/qxk/gnu/Makefile index e32814a0..6399d028 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on STM32F4-Discovery, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -81,7 +81,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/stm32f4-discovery \ diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/gnu/flash.bat b/examples/arm-cm/dpp_stm32f4-discovery/qxk/gnu/flash.bat index b5be2cf0..637ee704 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/gnu/flash.bat +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/gnu/flash.bat @@ -1,23 +1,23 @@ -::============================================================================ -:: Batch file to load the DPP program to the flash of STM32 boards -:: -:: NOTE: requires the ST-LINK utlity from ST, see: -:: http://www.st.com/en/embedded-software/stsw-link004.html -:: -@echo off -setlocal - -@echo Load the program to the flash of STM32 board -@echo usage: flash dbg\dpp.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: STLINK utility on your machine -:: -set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" - -@echo on -%STLINK% -P %1 0x08000000 - -@echo off -endlocal +::============================================================================ +:: Batch file to load the DPP program to the flash of STM32 boards +:: +:: NOTE: requires the ST-LINK utlity from ST, see: +:: http://www.st.com/en/embedded-software/stsw-link004.html +:: +@echo off +setlocal + +@echo Load the program to the flash of STM32 board +@echo usage: flash dbg\dpp.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: STLINK utility on your machine +:: +set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" + +@echo on +%STLINK% -P %1 0x08000000 + +@echo off +endlocal diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.ewd b/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.ewd index a9313410..f3025db5 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.ewd +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.ewp b/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.ewp index 5a0c5669..49f512d0 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.ewp +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.ewp @@ -1,3212 +1,3209 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - $PROJ_DIR$\..\test.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c - - - - stm32f4-discovery - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\iar\startup_stm32f4xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\stm32f4xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_rcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.h - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + $PROJ_DIR$\..\test.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c + + + + stm32f4-discovery + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\iar\startup_stm32f4xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\stm32f4xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_rcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.h + + + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.eww b/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.eww index e7d75f8b..38808ca3 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.eww +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qxk.ewp - - - - - + + + + + $WS_DIR$\dpp-qxk.ewp + + + + + diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.icf b/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.icf index 82c7aca5..9dfb7040 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.icf +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/iar/dpp-qxk.icf @@ -1,35 +1,35 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define symbol __region_RAM1_start__ = 0x10000000; -define symbol __region_RAM1_end__ = 0x1000FFFF; - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; -define region RAM1_region = mem:[from __region_RAM1_start__ to __region_RAM1_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define symbol __region_RAM1_start__ = 0x10000000; +define symbol __region_RAM1_end__ = 0x1000FFFF; + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; +define region RAM1_region = mem:[from __region_RAM1_start__ to __region_RAM1_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block HEAP }; place in RAM1_region { section .sram }; \ No newline at end of file diff --git a/examples/arm-cm/dpp_stm32f4-discovery/qxk/test.c b/examples/arm-cm/dpp_stm32f4-discovery/qxk/test.c index 72f586b9..3754ec42 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/qxk/test.c +++ b/examples/arm-cm/dpp_stm32f4-discovery/qxk/test.c @@ -88,7 +88,7 @@ static void Thread1_run(QXThread * const me) { QXThread_delay(BSP_TICKS_PER_SEC/7); /* BLOCK */ /* publish to thread2 */ - //QF_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); + //QACTIVE_PUBLISH(Q_NEW(QEvt, TEST_SIG), &l_test1.super); /* test TLS */ lib_fun(1U); diff --git a/examples/arm-cm/dpp_stm32f4-discovery/table.c b/examples/arm-cm/dpp_stm32f4-discovery/table.c index 39d09a9e..d10b8d5e 100644 --- a/examples/arm-cm/dpp_stm32f4-discovery/table.c +++ b/examples/arm-cm/dpp_stm32f4-discovery/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -53,14 +66,16 @@ static Table l_table; /* the single instance of the Table active object */ QActive * const AO_Table = &l_table.super; /* "opaque" AO pointer */ /*..........................................................................*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -72,12 +87,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -108,16 +125,17 @@ static QState Table_initial(Table * const me, void const * const par) { } return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -130,11 +148,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -148,7 +167,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -156,7 +175,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -166,25 +185,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -208,7 +227,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -219,19 +238,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -243,28 +262,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -274,7 +294,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -299,4 +319,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/game_efm32-slstk3401a/README.md b/examples/arm-cm/game_efm32-slstk3401a/README.md new file mode 100644 index 00000000..3b1e9ed5 --- /dev/null +++ b/examples/arm-cm/game_efm32-slstk3401a/README.md @@ -0,0 +1,72 @@ +![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_EFM32-SLSTK3401A.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_game_efm32-slstk3401a + +# About this Example +This directory contains the "Fly 'n' Shoot" game example application for +the EFM32-SLSTK3401A board (Pearl Gecko evaluation kit) board. This +directory contains portable code that should compile with any C compiler +for ARM Cortex-M. + +The sub-directories contain code and project files, which are specific to +the particular ARM toolchains, such as ARM (MDK-ARM), GCC, and IAR. + +Please refer to the README files in the sub-directories for specific +instructions how to use and customize the example to your needs. + + +# Support Code for EFM32-SLSTK3401A Board +The directory qpc\3rd_party\efm32pg1b\ contains the CMSIS-compliant +device code for the LM3S811 MCU. Please see the README file in this +folder for more details. + + +# QS Software Tracing Instrumentation +The example provides the "Spy" build configuration, which outputs the +QS (Quantum Spy) software tracing data through UART0, which is connected +to the virtual COM port of the board. + +The output is generated at 115200 baud rate. + +Here is an example invocation of the QSPY host application to receive +the QS data from EFM32-SLSTK3401A: + +``` +qspy -c COM1 (Windows) + +qspy -c /dev/ttyS1 (POSIX) +``` + +The actual serial-port number might be different on your workstation. +Please check the Device Manager to find the COM port number. + + +# Win32-GUI Emulation +The sub-directory "win32-gui" provides the emulation of the example +on Windows GUI, either single-threaded (win32-qv) or multithreded (win32). +This sub-directory contains the Makefile for the GNU-GCC toolset (MinGW) +and Visual Studio solution file (game-gui.sln) for Visual C++. + +The Win32-GUI emulation is based on the QWin™ GUI Prototyping Toolkit, see: + +- https://www.state-machine.com/products/qtools#QWIN + +The emulation uses exactly the same code as the embedded board and differs +only in the Board Support Package (bsp.c). This example demonstrates the +"dual targeting" development approach, where most of the embedded code is +developed on the workstation (Windows), but is intended for a deeply +embedded target (EFM32-SLSTK3401A here). + + +# QS Software Tracing Instrumentation +The "win32-gui" emulation also supports the "Spy" build configuration, +in which case it attempts to connect to the QSPY host application via +a TCP/IP socket (default). Here is how you launch the QSPY host utility: + + +``` +qspy +``` + diff --git a/examples/arm-cm/game_efm32-slstk3401a/game.h b/examples/arm-cm/game_efm32-slstk3401a/game.h index 5492cf82..78b7a66c 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/game.h +++ b/examples/arm-cm/game_efm32-slstk3401a/game.h @@ -1,21 +1,33 @@ -/*.$file${.::game.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::game.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: game.qm * File: ${.::game.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::game.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::game.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef GAME_H #define GAME_H @@ -76,8 +88,9 @@ enum GameBitmapIds { }; /* declare shared facilities */ -/*.$declare${Shared} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::ObjectPosEvt} .................................................*/ +/*$declare${Shared} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::ObjectPosEvt} ..................................................*/ typedef struct { /* protected: */ QEvt super; @@ -86,7 +99,8 @@ typedef struct { uint8_t x; uint8_t y; } ObjectPosEvt; -/*.${Shared::ObjectImageEvt} ...............................................*/ + +/*${Shared::ObjectImageEvt} ................................................*/ typedef struct { /* protected: */ QEvt super; @@ -96,7 +110,8 @@ typedef struct { int8_t y; uint8_t bmp; } ObjectImageEvt; -/*.${Shared::MineEvt} ......................................................*/ + +/*${Shared::MineEvt} .......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -104,7 +119,8 @@ typedef struct { /* public: */ uint8_t id; } MineEvt; -/*.${Shared::ScoreEvt} .....................................................*/ + +/*${Shared::ScoreEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -113,24 +129,33 @@ typedef struct { uint16_t score; } ScoreEvt; +/*${Shared::AO_Tunnel} .....................................................*/ /* opaque AO pointer */ extern QActive * const AO_Tunnel; +/*${Shared::AO_Ship} .......................................................*/ /* opaque AO pointer */ extern QActive * const AO_Ship; +/*${Shared::AO_Missile} ....................................................*/ /* opaque AO pointer */ extern QActive * const AO_Missile; -/*.${Shared::Tunnel_ctor_call} .............................................*/ + +/*${Shared::Tunnel_ctor_call} ..............................................*/ void Tunnel_ctor_call(void); -/*.${Shared::Ship_ctor_call} ...............................................*/ + +/*${Shared::Ship_ctor_call} ................................................*/ void Ship_ctor_call(void); -/*.${Shared::Missile_ctor_call} ............................................*/ + +/*${Shared::Missile_ctor_call} .............................................*/ void Missile_ctor_call(void); -/*.${Shared::Mine1_ctor_call} ..............................................*/ + +/*${Shared::Mine1_ctor_call} ...............................................*/ QHsm * Mine1_ctor_call(uint8_t id); -/*.${Shared::Mine2_ctor_call} ..............................................*/ + +/*${Shared::Mine2_ctor_call} ...............................................*/ QHsm * Mine2_ctor_call(uint8_t id); -/*.$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* GAME_H */ + diff --git a/examples/arm-cm/game_efm32-slstk3401a/game.qm b/examples/arm-cm/game_efm32-slstk3401a/game.qm index 6db0d0f6..665c0738 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/game.qm +++ b/examples/arm-cm/game_efm32-slstk3401a/game.qm @@ -1,8 +1,6 @@ - - "Fly 'n' Shoot" game model from Chapters 1 & 9 of PSiCC2 - -NOTE: Requries QP6. + + "Fly 'n' Shoot" game model from Chapters 1 & 9 of PSiCC2 diff --git a/examples/arm-cm/game_efm32-slstk3401a/mine1.c b/examples/arm-cm/game_efm32-slstk3401a/mine1.c index 137927b0..79d64c5d 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/mine1.c +++ b/examples/arm-cm/game_efm32-slstk3401a/mine1.c @@ -1,21 +1,33 @@ -/*.$file${.::mine1.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::mine1.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: game.qm * File: ${.::mine1.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::mine1.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::mine1.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "bsp.h" #include "game.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* encapsulated delcaration of the Mine1 HSM -------------------------------*/ -/*.$declare${AOs::Mine1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Mine1} ...........................................................*/ +/*$declare${AOs::Mine1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Mine1} ............................................................*/ typedef struct Mine1 { /* protected: */ QHsm super; @@ -47,38 +60,42 @@ static QState Mine1_unused(Mine1 * const me, QEvt const * const e); static QState Mine1_used(Mine1 * const me, QEvt const * const e); static QState Mine1_planted(Mine1 * const me, QEvt const * const e); static QState Mine1_exploding(Mine1 * const me, QEvt const * const e); -/*.$enddecl${AOs::Mine1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Mine1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* helper macro to provide the ID of this mine */ #define MINE_ID(me_) ((uint8_t)((me_) - &Mine1_inst[0])) /* Mine1 class definition --------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::Mine1_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::Mine1_ctor_call} ..............................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Shared::Mine1_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::Mine1_ctor_call} ...............................................*/ QHsm * Mine1_ctor_call(uint8_t id) { Q_REQUIRE(id < GAME_MINES_MAX); Mine1_ctor(&Mine1_inst[id]); return &Mine1_inst[id].super; } -/*.$enddef${Shared::Mine1_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Mine1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Mine1} ...........................................................*/ +/*$enddef${Shared::Mine1_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Mine1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Mine1} ............................................................*/ Mine1 Mine1_inst[GAME_MINES_MAX]; -/*.${AOs::Mine1::ctor} .....................................................*/ + +/*${AOs::Mine1::ctor} ......................................................*/ static void Mine1_ctor(Mine1 * const me) { /* superclass' ctor */ QHsm_ctor(&me->super, Q_STATE_CAST(&Mine1_initial)); } -/*.${AOs::Mine1::SM} .......................................................*/ +/*${AOs::Mine1::SM} ........................................................*/ static QState Mine1_initial(Mine1 * const me, void const * const par) { - /*.${AOs::Mine1::SM::initial} */ + /*${AOs::Mine1::SM::initial} */ static uint8_t dict_sent; if (!dict_sent) { @@ -106,11 +123,12 @@ static QState Mine1_initial(Mine1 * const me, void const * const par) { (void)par; /* unused parameter */ return Q_TRAN(&Mine1_unused); } -/*.${AOs::Mine1::SM::unused} ...............................................*/ + +/*${AOs::Mine1::SM::unused} ................................................*/ static QState Mine1_unused(Mine1 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Mine1::SM::unused::MINE_PLANT} */ + /*${AOs::Mine1::SM::unused::MINE_PLANT} */ case MINE_PLANT_SIG: { me->x = Q_EVT_CAST(ObjectPosEvt)->x; me->y = Q_EVT_CAST(ObjectPosEvt)->y; @@ -124,11 +142,12 @@ static QState Mine1_unused(Mine1 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Mine1::SM::used} .................................................*/ + +/*${AOs::Mine1::SM::used} ..................................................*/ static QState Mine1_used(Mine1 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Mine1::SM::used} */ + /*${AOs::Mine1::SM::used} */ case Q_EXIT_SIG: { /* tell the Tunnel that this mine is becoming disabled */ MineEvt *mev = Q_NEW(MineEvt, MINE_DISABLED_SIG); @@ -137,7 +156,7 @@ static QState Mine1_used(Mine1 * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Mine1::SM::used::MINE_RECYCLE} */ + /*${AOs::Mine1::SM::used::MINE_RECYCLE} */ case MINE_RECYCLE_SIG: { status_ = Q_TRAN(&Mine1_unused); break; @@ -149,13 +168,14 @@ static QState Mine1_used(Mine1 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Mine1::SM::used::planted} ........................................*/ + +/*${AOs::Mine1::SM::used::planted} .........................................*/ static QState Mine1_planted(Mine1 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Mine1::SM::used::planted::TIME_TICK} */ + /*${AOs::Mine1::SM::used::planted::TIME_TICK} */ case TIME_TICK_SIG: { - /*.${AOs::Mine1::SM::used::planted::TIME_TICK::[me->x>=GAME_SPEED_X]} */ + /*${AOs::Mine1::SM::used::planted::TIME_TICK::[me->x>=GAME_SPEED_X]} */ if (me->x >= GAME_SPEED_X) { ObjectImageEvt *oie; me->x -= GAME_SPEED_X; /* move the mine 1 step */ @@ -167,18 +187,18 @@ static QState Mine1_planted(Mine1 * const me, QEvt const * const e) { QACTIVE_POST(AO_Tunnel, (QEvt *)oie, me); status_ = Q_HANDLED(); } - /*.${AOs::Mine1::SM::used::planted::TIME_TICK::[else]} */ + /*${AOs::Mine1::SM::used::planted::TIME_TICK::[else]} */ else { status_ = Q_TRAN(&Mine1_unused); } break; } - /*.${AOs::Mine1::SM::used::planted::SHIP_IMG} */ + /*${AOs::Mine1::SM::used::planted::SHIP_IMG} */ case SHIP_IMG_SIG: { uint8_t x = Q_EVT_CAST(ObjectImageEvt)->x; uint8_t y = Q_EVT_CAST(ObjectImageEvt)->y; uint8_t bmp = Q_EVT_CAST(ObjectImageEvt)->bmp; - /*.${AOs::Mine1::SM::used::planted::SHIP_IMG::[collisionwithMINE1_BMP?]} */ + /*${AOs::Mine1::SM::used::planted::SHIP_IMG::[collisionwithMINE1_BMP?]} */ if (BSP_doBitmapsOverlap(MINE1_BMP, me->x, me->y, bmp, x, y)) { static MineEvt const mine1_hit = { { HIT_MINE_SIG, 0U, 0U }, /* the QEvt base instance */ @@ -194,12 +214,12 @@ static QState Mine1_planted(Mine1 * const me, QEvt const * const e) { } break; } - /*.${AOs::Mine1::SM::used::planted::MISSILE_IMG} */ + /*${AOs::Mine1::SM::used::planted::MISSILE_IMG} */ case MISSILE_IMG_SIG: { uint8_t x = Q_EVT_CAST(ObjectImageEvt)->x; uint8_t y = Q_EVT_CAST(ObjectImageEvt)->y; uint8_t bmp = Q_EVT_CAST(ObjectImageEvt)->bmp; - /*.${AOs::Mine1::SM::used::planted::MISSILE_IMG::[collisionwithMINE1_BMP?]} */ + /*${AOs::Mine1::SM::used::planted::MISSILE_IMG::[collisionwithMINE1_BMP?]} */ if (BSP_doBitmapsOverlap(MINE1_BMP, me->x, me->y, bmp, x, y)) { static ScoreEvt const mine1_destroyed = { { DESTROYED_MINE_SIG, 0U, 0U }, /* the QEvt base instance */ @@ -220,19 +240,20 @@ static QState Mine1_planted(Mine1 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Mine1::SM::used::exploding} ......................................*/ + +/*${AOs::Mine1::SM::used::exploding} .......................................*/ static QState Mine1_exploding(Mine1 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Mine1::SM::used::exploding} */ + /*${AOs::Mine1::SM::used::exploding} */ case Q_ENTRY_SIG: { me->exp_ctr = 0U; status_ = Q_HANDLED(); break; } - /*.${AOs::Mine1::SM::used::exploding::TIME_TICK} */ + /*${AOs::Mine1::SM::used::exploding::TIME_TICK} */ case TIME_TICK_SIG: { - /*.${AOs::Mine1::SM::used::exploding::TIME_TICK::[stillonscreen?]} */ + /*${AOs::Mine1::SM::used::exploding::TIME_TICK::[stillonscreen?]} */ if ((me->x >= GAME_SPEED_X) && (me->exp_ctr < 15)) { ObjectImageEvt *oie; ++me->exp_ctr; /* advance the explosion counter */ @@ -246,7 +267,7 @@ static QState Mine1_exploding(Mine1 * const me, QEvt const * const e) { QACTIVE_POST(AO_Tunnel, (QEvt *)oie, me); status_ = Q_HANDLED(); } - /*.${AOs::Mine1::SM::used::exploding::TIME_TICK::[else]} */ + /*${AOs::Mine1::SM::used::exploding::TIME_TICK::[else]} */ else { status_ = Q_TRAN(&Mine1_unused); } @@ -259,4 +280,4 @@ static QState Mine1_exploding(Mine1 * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Mine1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Mine1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/game_efm32-slstk3401a/mine2.c b/examples/arm-cm/game_efm32-slstk3401a/mine2.c index 138dd237..7b3c6c9c 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/mine2.c +++ b/examples/arm-cm/game_efm32-slstk3401a/mine2.c @@ -1,21 +1,33 @@ -/*.$file${.::mine2.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::mine2.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: game.qm * File: ${.::mine2.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::mine2.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::mine2.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "bsp.h" #include "game.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* encapsulated delcaration of the Mine2 HSM -------------------------------*/ -/*.$declare${AOs::Mine2} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Mine2} ...........................................................*/ +/*$declare${AOs::Mine2} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Mine2} ............................................................*/ typedef struct Mine2 { /* protected: */ QHsm super; @@ -47,38 +60,42 @@ static QState Mine2_unused(Mine2 * const me, QEvt const * const e); static QState Mine2_used(Mine2 * const me, QEvt const * const e); static QState Mine2_planted(Mine2 * const me, QEvt const * const e); static QState Mine2_exploding(Mine2 * const me, QEvt const * const e); -/*.$enddecl${AOs::Mine2} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Mine2} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* helper macro to provide the ID of this mine */ #define MINE_ID(me_) ((uint8_t)((me_) - &Mine2_inst[0])) /* Mine2 class definition --------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::Mine2_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::Mine2_ctor_call} ..............................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Shared::Mine2_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::Mine2_ctor_call} ...............................................*/ QHsm * Mine2_ctor_call(uint8_t id) { Q_REQUIRE(id < GAME_MINES_MAX); Mine2_ctor(&Mine2_inst[id]); return &Mine2_inst[id].super; } -/*.$enddef${Shared::Mine2_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Mine2} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Mine2} ...........................................................*/ +/*$enddef${Shared::Mine2_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Mine2} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Mine2} ............................................................*/ Mine2 Mine2_inst[GAME_MINES_MAX]; -/*.${AOs::Mine2::ctor} .....................................................*/ + +/*${AOs::Mine2::ctor} ......................................................*/ static void Mine2_ctor(Mine2 * const me) { /* superclass' ctor */ QHsm_ctor(&me->super, Q_STATE_CAST(&Mine2_initial)); } -/*.${AOs::Mine2::SM} .......................................................*/ +/*${AOs::Mine2::SM} ........................................................*/ static QState Mine2_initial(Mine2 * const me, void const * const par) { - /*.${AOs::Mine2::SM::initial} */ + /*${AOs::Mine2::SM::initial} */ static uint8_t dict_sent; if (!dict_sent) { @@ -108,11 +125,12 @@ static QState Mine2_initial(Mine2 * const me, void const * const par) { (void)par; /* unused parameter */ return Q_TRAN(&Mine2_unused); } -/*.${AOs::Mine2::SM::unused} ...............................................*/ + +/*${AOs::Mine2::SM::unused} ................................................*/ static QState Mine2_unused(Mine2 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Mine2::SM::unused::MINE_PLANT} */ + /*${AOs::Mine2::SM::unused::MINE_PLANT} */ case MINE_PLANT_SIG: { me->x = Q_EVT_CAST(ObjectPosEvt)->x; me->y = Q_EVT_CAST(ObjectPosEvt)->y; @@ -126,11 +144,12 @@ static QState Mine2_unused(Mine2 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Mine2::SM::used} .................................................*/ + +/*${AOs::Mine2::SM::used} ..................................................*/ static QState Mine2_used(Mine2 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Mine2::SM::used} */ + /*${AOs::Mine2::SM::used} */ case Q_EXIT_SIG: { /* tell the Tunnel that this mine is becoming disabled */ MineEvt *mev = Q_NEW(MineEvt, MINE_DISABLED_SIG); @@ -139,7 +158,7 @@ static QState Mine2_used(Mine2 * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Mine2::SM::used::MINE_RECYCLE} */ + /*${AOs::Mine2::SM::used::MINE_RECYCLE} */ case MINE_RECYCLE_SIG: { status_ = Q_TRAN(&Mine2_unused); break; @@ -151,13 +170,14 @@ static QState Mine2_used(Mine2 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Mine2::SM::used::planted} ........................................*/ + +/*${AOs::Mine2::SM::used::planted} .........................................*/ static QState Mine2_planted(Mine2 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Mine2::SM::used::planted::TIME_TICK} */ + /*${AOs::Mine2::SM::used::planted::TIME_TICK} */ case TIME_TICK_SIG: { - /*.${AOs::Mine2::SM::used::planted::TIME_TICK::[me->x>=GAME_SPEED_X]} */ + /*${AOs::Mine2::SM::used::planted::TIME_TICK::[me->x>=GAME_SPEED_X]} */ if (me->x >= GAME_SPEED_X) { ObjectImageEvt *oie; me->x -= GAME_SPEED_X; /* move the mine 1 step */ @@ -169,18 +189,18 @@ static QState Mine2_planted(Mine2 * const me, QEvt const * const e) { QACTIVE_POST(AO_Tunnel, (QEvt *)oie, me); status_ = Q_HANDLED(); } - /*.${AOs::Mine2::SM::used::planted::TIME_TICK::[else]} */ + /*${AOs::Mine2::SM::used::planted::TIME_TICK::[else]} */ else { status_ = Q_TRAN(&Mine2_unused); } break; } - /*.${AOs::Mine2::SM::used::planted::SHIP_IMG} */ + /*${AOs::Mine2::SM::used::planted::SHIP_IMG} */ case SHIP_IMG_SIG: { uint8_t x = Q_EVT_CAST(ObjectImageEvt)->x; uint8_t y = Q_EVT_CAST(ObjectImageEvt)->y; uint8_t bmp = Q_EVT_CAST(ObjectImageEvt)->bmp; - /*.${AOs::Mine2::SM::used::planted::SHIP_IMG::[collisionwithMINE2_BMP?]} */ + /*${AOs::Mine2::SM::used::planted::SHIP_IMG::[collisionwithMINE2_BMP?]} */ if (BSP_doBitmapsOverlap(MINE2_BMP, me->x, me->y, bmp, x, y)) { static MineEvt const mine1_hit = { { HIT_MINE_SIG, 0U, 0U }, /* the QEvt base instance */ @@ -196,12 +216,12 @@ static QState Mine2_planted(Mine2 * const me, QEvt const * const e) { } break; } - /*.${AOs::Mine2::SM::used::planted::MISSILE_IMG} */ + /*${AOs::Mine2::SM::used::planted::MISSILE_IMG} */ case MISSILE_IMG_SIG: { uint8_t x = Q_EVT_CAST(ObjectImageEvt)->x; uint8_t y = Q_EVT_CAST(ObjectImageEvt)->y; uint8_t bmp = Q_EVT_CAST(ObjectImageEvt)->bmp; - /*.${AOs::Mine2::SM::used::planted::MISSILE_IMG::[collisionwithMINE2_MISSILE_BMP?~} */ + /*${AOs::Mine2::SM::used::planted::MISSILE_IMG::[collisionwithMINE2_MISSILE_BMP?~} */ if (BSP_doBitmapsOverlap(MINE2_MISSILE_BMP, me->x, me->y, bmp, x, y)) { /* NOTE: Mine type-2 is nastier than Mine type-1. * The type-2 mine can hit the Ship with any of its @@ -228,19 +248,20 @@ static QState Mine2_planted(Mine2 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Mine2::SM::used::exploding} ......................................*/ + +/*${AOs::Mine2::SM::used::exploding} .......................................*/ static QState Mine2_exploding(Mine2 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Mine2::SM::used::exploding} */ + /*${AOs::Mine2::SM::used::exploding} */ case Q_ENTRY_SIG: { me->exp_ctr = 0U; status_ = Q_HANDLED(); break; } - /*.${AOs::Mine2::SM::used::exploding::TIME_TICK} */ + /*${AOs::Mine2::SM::used::exploding::TIME_TICK} */ case TIME_TICK_SIG: { - /*.${AOs::Mine2::SM::used::exploding::TIME_TICK::[stillonscreen?]} */ + /*${AOs::Mine2::SM::used::exploding::TIME_TICK::[stillonscreen?]} */ if ((me->x >= GAME_SPEED_X) && (me->exp_ctr < 15U)) { ObjectImageEvt *oie; ++me->exp_ctr; /* advance the explosion counter */ @@ -254,7 +275,7 @@ static QState Mine2_exploding(Mine2 * const me, QEvt const * const e) { QACTIVE_POST(AO_Tunnel, (QEvt *)oie, me); status_ = Q_HANDLED(); } - /*.${AOs::Mine2::SM::used::exploding::TIME_TICK::[else]} */ + /*${AOs::Mine2::SM::used::exploding::TIME_TICK::[else]} */ else { status_ = Q_TRAN(&Mine2_unused); } @@ -267,4 +288,4 @@ static QState Mine2_exploding(Mine2 * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Mine2} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Mine2} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/game_efm32-slstk3401a/missile.c b/examples/arm-cm/game_efm32-slstk3401a/missile.c index c35cff49..514c7729 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/missile.c +++ b/examples/arm-cm/game_efm32-slstk3401a/missile.c @@ -1,21 +1,33 @@ -/*.$file${.::missile.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::missile.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: game.qm * File: ${.::missile.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::missile.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::missile.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "bsp.h" #include "game.h" @@ -23,8 +35,9 @@ /* Q_DEFINE_THIS_FILE */ /* local objects -----------------------------------------------------------*/ -/*.$declare${AOs::Missile} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Missile} .........................................................*/ +/*$declare${AOs::Missile} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Missile} ..........................................................*/ typedef struct Missile { /* protected: */ QActive super; @@ -46,40 +59,43 @@ static QState Missile_initial(Missile * const me, void const * const par); static QState Missile_armed(Missile * const me, QEvt const * const e); static QState Missile_flying(Missile * const me, QEvt const * const e); static QState Missile_exploding(Missile * const me, QEvt const * const e); -/*.$enddecl${AOs::Missile} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Missile} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Public-scope objects ----------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::AO_Missile} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque AO pointer */ -/*.${Shared::AO_Missile} ...................................................*/ +/*$define${Shared::AO_Missile} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::AO_Missile} ....................................................*/ QActive * const AO_Missile = &Missile_inst.super; -/*.$enddef${Shared::AO_Missile} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Shared::AO_Missile} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Active object definition ------------------------------------------------*/ -/*.$define${Shared::Missile_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::Missile_ctor_call} ............................................*/ +/*$define${Shared::Missile_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::Missile_ctor_call} .............................................*/ void Missile_ctor_call(void) { Missile_ctor(&Missile_inst); } -/*.$enddef${Shared::Missile_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Missile} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Missile} .........................................................*/ +/*$enddef${Shared::Missile_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Missile} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Missile} ..........................................................*/ Missile Missile_inst; -/*.${AOs::Missile::ctor} ...................................................*/ + +/*${AOs::Missile::ctor} ....................................................*/ static void Missile_ctor(Missile * const me) { QActive_ctor(&me->super, Q_STATE_CAST(&Missile_initial)); } -/*.${AOs::Missile::SM} .....................................................*/ +/*${AOs::Missile::SM} ......................................................*/ static QState Missile_initial(Missile * const me, void const * const par) { - /*.${AOs::Missile::SM::initial} */ + /*${AOs::Missile::SM::initial} */ (void)par; /* unused parameter */ QActive_subscribe(&me->super, TIME_TICK_SIG); @@ -94,11 +110,12 @@ static QState Missile_initial(Missile * const me, void const * const par) { return Q_TRAN(&Missile_armed); } -/*.${AOs::Missile::SM::armed} ..............................................*/ + +/*${AOs::Missile::SM::armed} ...............................................*/ static QState Missile_armed(Missile * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Missile::SM::armed::MISSILE_FIRE} */ + /*${AOs::Missile::SM::armed::MISSILE_FIRE} */ case MISSILE_FIRE_SIG: { me->x = Q_EVT_CAST(ObjectPosEvt)->x; me->y = Q_EVT_CAST(ObjectPosEvt)->y; @@ -112,13 +129,14 @@ static QState Missile_armed(Missile * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Missile::SM::flying} .............................................*/ + +/*${AOs::Missile::SM::flying} ..............................................*/ static QState Missile_flying(Missile * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Missile::SM::flying::TIME_TICK} */ + /*${AOs::Missile::SM::flying::TIME_TICK} */ case TIME_TICK_SIG: { - /*.${AOs::Missile::SM::flying::TIME_TICK::[me->x+GAME_MISSILE_SPEED_Xx+GAME_MISSILE_SPEED_Xx + GAME_MISSILE_SPEED_X < GAME_TUNNEL_WIDTH) { ObjectImageEvt *oie; me->x += GAME_MISSILE_SPEED_X; @@ -130,18 +148,18 @@ static QState Missile_flying(Missile * const me, QEvt const * const e) { QACTIVE_POST(AO_Tunnel, (QEvt *)oie, me); status_ = Q_HANDLED(); } - /*.${AOs::Missile::SM::flying::TIME_TICK::[else]} */ + /*${AOs::Missile::SM::flying::TIME_TICK::[else]} */ else { status_ = Q_TRAN(&Missile_armed); } break; } - /*.${AOs::Missile::SM::flying::HIT_WALL} */ + /*${AOs::Missile::SM::flying::HIT_WALL} */ case HIT_WALL_SIG: { status_ = Q_TRAN(&Missile_exploding); break; } - /*.${AOs::Missile::SM::flying::DESTROYED_MINE} */ + /*${AOs::Missile::SM::flying::DESTROYED_MINE} */ case DESTROYED_MINE_SIG: { QACTIVE_POST(AO_Ship, e, me); status_ = Q_TRAN(&Missile_armed); @@ -154,19 +172,20 @@ static QState Missile_flying(Missile * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Missile::SM::exploding} ..........................................*/ + +/*${AOs::Missile::SM::exploding} ...........................................*/ static QState Missile_exploding(Missile * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Missile::SM::exploding} */ + /*${AOs::Missile::SM::exploding} */ case Q_ENTRY_SIG: { me->exp_ctr = 0U; status_ = Q_HANDLED(); break; } - /*.${AOs::Missile::SM::exploding::TIME_TICK} */ + /*${AOs::Missile::SM::exploding::TIME_TICK} */ case TIME_TICK_SIG: { - /*.${AOs::Missile::SM::exploding::TIME_TICK::[(me->x>=GAME_SPEED_X)&&(me->exp~} */ + /*${AOs::Missile::SM::exploding::TIME_TICK::[(me->x>=GAME_SPEED_X)&&(me->exp~} */ if ((me->x >= GAME_SPEED_X) && (me->exp_ctr < 15U)) { ObjectImageEvt *oie; @@ -181,7 +200,7 @@ static QState Missile_exploding(Missile * const me, QEvt const * const e) { QACTIVE_POST(AO_Tunnel, (QEvt *)oie, me); status_ = Q_HANDLED(); } - /*.${AOs::Missile::SM::exploding::TIME_TICK::[else]} */ + /*${AOs::Missile::SM::exploding::TIME_TICK::[else]} */ else { status_ = Q_TRAN(&Missile_armed); } @@ -194,4 +213,4 @@ static QState Missile_exploding(Missile * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Missile} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Missile} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/game_efm32-slstk3401a/qk/armclang/game-qk.uvprojx b/examples/arm-cm/game_efm32-slstk3401a/qk/armclang/game-qk.uvprojx index aea2b33d..b99891a4 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qk/armclang/game-qk.uvprojx +++ b/examples/arm-cm/game_efm32-slstk3401a/qk/armclang/game-qk.uvprojx @@ -339,7 +339,7 @@ EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1014,7 +1014,7 @@ NDEBUG EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1689,7 +1689,7 @@ Q_SPY EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b diff --git a/examples/arm-cm/game_efm32-slstk3401a/qk/bsp.c b/examples/arm-cm/game_efm32-slstk3401a/qk/bsp.c index 95a878c9..7103e6c7 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qk/bsp.c +++ b/examples/arm-cm/game_efm32-slstk3401a/qk/bsp.c @@ -102,10 +102,10 @@ void SysTick_Handler(void) { } #endif - //QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + //QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ QACTIVE_POST(the_Ticker0, 0, 0); /* post a don't-care event to Ticker0 */ - QF_PUBLISH(&tickEvt, &l_SysTick_Handler); /* publish to all subscribers */ + QACTIVE_PUBLISH(&tickEvt, &l_SysTick_Handler); /* publish to all subscribers */ { /* state of the button debouncing, see below */ @@ -129,7 +129,7 @@ void SysTick_Handler(void) { if ((tmp & (1U << PB0_PIN)) != 0U) { /* debounced PB0 state changed? */ if ((buttons.depressed & (1U << PB0_PIN)) != 0U) {/*PB0 depressed?*/ static QEvt const trigEvt = { PLAYER_TRIGGER_SIG, 0U, 0U}; - QF_PUBLISH(&trigEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&trigEvt, &l_SysTick_Handler); } } } diff --git a/examples/arm-cm/game_efm32-slstk3401a/qk/gnu/Makefile b/examples/arm-cm/game_efm32-slstk3401a/qk/gnu/Makefile index b548b5b5..03824449 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qk/gnu/Makefile +++ b/examples/arm-cm/game_efm32-slstk3401a/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32-SLSTK3401A, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/arm-cm/game_efm32-slstk3401a/qk/gnu/flash.bat b/examples/arm-cm/game_efm32-slstk3401a/qk/gnu/flash.bat index 5cbe3607..0ca15c72 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qk/gnu/flash.bat +++ b/examples/arm-cm/game_efm32-slstk3401a/qk/gnu/flash.bat @@ -1,49 +1,49 @@ -::============================================================================ -:: Batch file to program the flash of EFM32-SLSTK3401A board -:: -:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: -:: https://www.segger.com/j-link-commander.html -:: -setlocal - -@echo off -@echo Load a given binary file to the flash of EFM32-SLSTK3401A -@echo usage: flash bin-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: JLink utility on your machine -:: -if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink -if not exist "%JLINK%\JLink.exe" ( - @echo The JLink tool not found. Please adjust flash.bat - @goto end -) - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -:: generate the Jlink command file depending on the first parameter %1 -@echo si 1 >flash.jlink -@echo speed 4000 >>flash.jlink -@echo r >>flash.jlink -@echo h >>flash.jlink -@echo loadbin %1, 0 >>flash.jlink -@echo exit >>flash.jlink - -@echo on -%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink -@echo off - -@del flash.jlink - -:end - +::============================================================================ +:: Batch file to program the flash of EFM32-SLSTK3401A board +:: +:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: +:: https://www.segger.com/j-link-commander.html +:: +setlocal + +@echo off +@echo Load a given binary file to the flash of EFM32-SLSTK3401A +@echo usage: flash bin-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: JLink utility on your machine +:: +if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink +if not exist "%JLINK%\JLink.exe" ( + @echo The JLink tool not found. Please adjust flash.bat + @goto end +) + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +:: generate the Jlink command file depending on the first parameter %1 +@echo si 1 >flash.jlink +@echo speed 4000 >>flash.jlink +@echo r >>flash.jlink +@echo h >>flash.jlink +@echo loadbin %1, 0 >>flash.jlink +@echo exit >>flash.jlink + +@echo on +%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink +@echo off + +@del flash.jlink + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.ewd b/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.ewd index a1141c87..99524260 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.ewd +++ b/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.ewd @@ -1,4582 +1,4582 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 32 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 1 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 7 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 32 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 0 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 7 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 32 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 1 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 7 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 32 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 1 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 7 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 32 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 0 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 7 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 32 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 1 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 7 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.ewp b/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.ewp index ed1972e4..c08ff410 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.ewp +++ b/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.ewp @@ -1,3319 +1,3316 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\game.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\mine1.c - - - $PROJ_DIR$\..\..\mine2.c - - - $PROJ_DIR$\..\..\missile.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\ship.c - - - $PROJ_DIR$\..\..\tunnel.c - - - - efm32pg1b - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\display_ls013b7dh03.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\display_ls013b7dh03.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\displaypalemlib.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_int.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_prs.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_rtcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\udelay.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\game.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\mine1.c + + + $PROJ_DIR$\..\..\mine2.c + + + $PROJ_DIR$\..\..\missile.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\ship.c + + + $PROJ_DIR$\..\..\tunnel.c + + + + efm32pg1b + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\display_ls013b7dh03.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\display_ls013b7dh03.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\displaypalemlib.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_int.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_prs.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_rtcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\udelay.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.eww b/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.eww index 9ad882cb..ac60d2e0 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.eww +++ b/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\game-qk.ewp - - - - - + + + + + $WS_DIR$\game-qk.ewp + + + + + diff --git a/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.icf b/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.icf +++ b/examples/arm-cm/game_efm32-slstk3401a/qk/iar/game-qk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/game_efm32-slstk3401a/qv/armclang/game-qv.uvprojx b/examples/arm-cm/game_efm32-slstk3401a/qv/armclang/game-qv.uvprojx index e79f82c8..c2aabba8 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qv/armclang/game-qv.uvprojx +++ b/examples/arm-cm/game_efm32-slstk3401a/qv/armclang/game-qv.uvprojx @@ -338,7 +338,7 @@ EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1012,7 +1012,7 @@ NDEBUG EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b @@ -1686,7 +1686,7 @@ Q_SPY EFM32PG1B200F256GM48=1 __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b diff --git a/examples/arm-cm/game_efm32-slstk3401a/qv/bsp.c b/examples/arm-cm/game_efm32-slstk3401a/qv/bsp.c index 82ac00b6..3303d3ad 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qv/bsp.c +++ b/examples/arm-cm/game_efm32-slstk3401a/qv/bsp.c @@ -99,9 +99,9 @@ void SysTick_Handler(void) { } #endif - //QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + //QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ QACTIVE_POST(the_Ticker0, 0, 0); /* post a don't-care event to Ticker0 */ - QF_PUBLISH(&tickEvt, &l_SysTick_Handler); /* publish to all subscribers */ + QACTIVE_PUBLISH(&tickEvt, &l_SysTick_Handler); /* publish to all subscribers */ { /* state of the button debouncing, see below */ @@ -125,7 +125,7 @@ void SysTick_Handler(void) { if ((tmp & (1U << PB0_PIN)) != 0U) { /* debounced PB0 state changed? */ if ((buttons.depressed & (1U << PB0_PIN)) != 0U) {/*PB0 depressed?*/ static QEvt const trigEvt = { PLAYER_TRIGGER_SIG, 0U, 0U}; - QF_PUBLISH(&trigEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&trigEvt, &l_SysTick_Handler); } } } diff --git a/examples/arm-cm/game_efm32-slstk3401a/qv/gnu/Makefile b/examples/arm-cm/game_efm32-slstk3401a/qv/gnu/Makefile index d9b781df..09d5510c 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qv/gnu/Makefile +++ b/examples/arm-cm/game_efm32-slstk3401a/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32-SLSTK3401A, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/arm-cm/game_efm32-slstk3401a/qv/gnu/flash.bat b/examples/arm-cm/game_efm32-slstk3401a/qv/gnu/flash.bat index 5cbe3607..0ca15c72 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qv/gnu/flash.bat +++ b/examples/arm-cm/game_efm32-slstk3401a/qv/gnu/flash.bat @@ -1,49 +1,49 @@ -::============================================================================ -:: Batch file to program the flash of EFM32-SLSTK3401A board -:: -:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: -:: https://www.segger.com/j-link-commander.html -:: -setlocal - -@echo off -@echo Load a given binary file to the flash of EFM32-SLSTK3401A -@echo usage: flash bin-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: JLink utility on your machine -:: -if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink -if not exist "%JLINK%\JLink.exe" ( - @echo The JLink tool not found. Please adjust flash.bat - @goto end -) - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -:: generate the Jlink command file depending on the first parameter %1 -@echo si 1 >flash.jlink -@echo speed 4000 >>flash.jlink -@echo r >>flash.jlink -@echo h >>flash.jlink -@echo loadbin %1, 0 >>flash.jlink -@echo exit >>flash.jlink - -@echo on -%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink -@echo off - -@del flash.jlink - -:end - +::============================================================================ +:: Batch file to program the flash of EFM32-SLSTK3401A board +:: +:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: +:: https://www.segger.com/j-link-commander.html +:: +setlocal + +@echo off +@echo Load a given binary file to the flash of EFM32-SLSTK3401A +@echo usage: flash bin-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: JLink utility on your machine +:: +if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink +if not exist "%JLINK%\JLink.exe" ( + @echo The JLink tool not found. Please adjust flash.bat + @goto end +) + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +:: generate the Jlink command file depending on the first parameter %1 +@echo si 1 >flash.jlink +@echo speed 4000 >>flash.jlink +@echo r >>flash.jlink +@echo h >>flash.jlink +@echo loadbin %1, 0 >>flash.jlink +@echo exit >>flash.jlink + +@echo on +%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink +@echo off + +@del flash.jlink + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.ewd b/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.ewd index 3e40dff6..a1aba753 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.ewd +++ b/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.ewd @@ -1,4741 +1,4741 @@ - - - - 2 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 0 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - - + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.ewp b/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.ewp index ec87f698..01fae0ae 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.ewp +++ b/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.ewp @@ -1,3070 +1,3067 @@ - - - - 2 - - Debug - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 24 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\game.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\mine1.c - - - $PROJ_DIR$\..\..\mine2.c - - - $PROJ_DIR$\..\..\missile.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\ship.c - - - $PROJ_DIR$\..\..\tunnel.c - - - - efm32pg1b - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\display_ls013b7dh03.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\display_ls013b7dh03.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\displaypalemlib.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_int.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_prs.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_rtcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\udelay.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - - + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 24 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\game.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\mine1.c + + + $PROJ_DIR$\..\..\mine2.c + + + $PROJ_DIR$\..\..\missile.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\ship.c + + + $PROJ_DIR$\..\..\tunnel.c + + + + efm32pg1b + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\display_ls013b7dh03.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\display_ls013b7dh03.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\displaypalemlib.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_assert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_cmu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_emu.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_int.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_prs.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_rtcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_system.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\em_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\iar\startup_efm32pg1b.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\system_efm32pg1b.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\efm32pg1b\udelay.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + + diff --git a/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.eww b/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.eww index 5ce53117..a2a678d1 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.eww +++ b/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\game-qv.ewp - - - - - + + + + + $WS_DIR$\game-qv.ewp + + + + + diff --git a/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.icf b/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.icf index 02e3a787..565bb4c0 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.icf +++ b/examples/arm-cm/game_efm32-slstk3401a/qv/iar/game-qv.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 512; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 512; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/game_efm32-slstk3401a/ship.c b/examples/arm-cm/game_efm32-slstk3401a/ship.c index 23373444..d0ccb3d5 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/ship.c +++ b/examples/arm-cm/game_efm32-slstk3401a/ship.c @@ -1,21 +1,33 @@ -/*.$file${.::ship.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::ship.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: game.qm * File: ${.::ship.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::ship.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::ship.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "bsp.h" #include "game.h" @@ -26,8 +38,9 @@ #define SHIP_HEIGHT 3 /* encapsulated delcaration of the Ship active object ----------------------*/ -/*.$declare${AOs::Ship} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Ship} ............................................................*/ +/*$declare${AOs::Ship} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Ship} .............................................................*/ typedef struct Ship { /* protected: */ QActive super; @@ -51,42 +64,45 @@ static QState Ship_active(Ship * const me, QEvt const * const e); static QState Ship_parked(Ship * const me, QEvt const * const e); static QState Ship_flying(Ship * const me, QEvt const * const e); static QState Ship_exploding(Ship * const me, QEvt const * const e); -/*.$enddecl${AOs::Ship} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Ship} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Public-scope objects ----------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::AO_Ship} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque AO pointer */ -/*.${Shared::AO_Ship} ......................................................*/ +/*$define${Shared::AO_Ship} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::AO_Ship} .......................................................*/ QActive * const AO_Ship = &Ship_inst.super; -/*.$enddef${Shared::AO_Ship} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Shared::AO_Ship} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Active object definition ------------------------------------------------*/ -/*.$define${Shared::Ship_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::Ship_ctor_call} ...............................................*/ +/*$define${Shared::Ship_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::Ship_ctor_call} ................................................*/ void Ship_ctor_call(void) { Ship_ctor(&Ship_inst); } -/*.$enddef${Shared::Ship_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Ship} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Ship} ............................................................*/ +/*$enddef${Shared::Ship_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Ship} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Ship} .............................................................*/ Ship Ship_inst; -/*.${AOs::Ship::ctor} ......................................................*/ + +/*${AOs::Ship::ctor} .......................................................*/ static void Ship_ctor(Ship * const me) { QActive_ctor(&me->super, Q_STATE_CAST(&Ship_initial)); me->x = GAME_SHIP_X; me->y = (GAME_SHIP_Y << 2); } -/*.${AOs::Ship::SM} ........................................................*/ +/*${AOs::Ship::SM} .........................................................*/ static QState Ship_initial(Ship * const me, void const * const par) { - /*.${AOs::Ship::SM::initial} */ + /*${AOs::Ship::SM::initial} */ (void)par; /* usused parameter */ QActive_subscribe(&me->super, TIME_TICK_SIG); @@ -106,11 +122,12 @@ static QState Ship_initial(Ship * const me, void const * const par) { return Q_TRAN(&Ship_active); } -/*.${AOs::Ship::SM::active} ................................................*/ + +/*${AOs::Ship::SM::active} .................................................*/ static QState Ship_active(Ship * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Ship::SM::active::initial} */ + /*${AOs::Ship::SM::active::initial} */ case Q_INIT_SIG: { status_ = Q_TRAN(&Ship_parked); break; @@ -122,11 +139,12 @@ static QState Ship_active(Ship * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Ship::SM::active::parked} ........................................*/ + +/*${AOs::Ship::SM::active::parked} .........................................*/ static QState Ship_parked(Ship * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Ship::SM::active::parked::TAKE_OFF} */ + /*${AOs::Ship::SM::active::parked::TAKE_OFF} */ case TAKE_OFF_SIG: { status_ = Q_TRAN(&Ship_flying); break; @@ -138,11 +156,12 @@ static QState Ship_parked(Ship * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Ship::SM::active::flying} ........................................*/ + +/*${AOs::Ship::SM::active::flying} .........................................*/ static QState Ship_flying(Ship * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Ship::SM::active::flying} */ + /*${AOs::Ship::SM::active::flying} */ case Q_ENTRY_SIG: { ScoreEvt *sev; me->score = 0U; /* reset the score */ @@ -156,7 +175,7 @@ static QState Ship_flying(Ship * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Ship::SM::active::flying::TIME_TICK} */ + /*${AOs::Ship::SM::active::flying::TIME_TICK} */ case TIME_TICK_SIG: { ObjectImageEvt *oie; @@ -188,7 +207,7 @@ static QState Ship_flying(Ship * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Ship::SM::active::flying::PLAYER_TRIGGER} */ + /*${AOs::Ship::SM::active::flying::PLAYER_TRIGGER} */ case PLAYER_TRIGGER_SIG: { ObjectPosEvt *ope = Q_NEW(ObjectPosEvt, MISSILE_FIRE_SIG); ope->x = me->x; @@ -197,19 +216,19 @@ static QState Ship_flying(Ship * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Ship::SM::active::flying::DESTROYED_MINE} */ + /*${AOs::Ship::SM::active::flying::DESTROYED_MINE} */ case DESTROYED_MINE_SIG: { me->score += Q_EVT_CAST(ScoreEvt)->score; /* the score will be sent to the Tunnel by the next TIME_TICK */ status_ = Q_HANDLED(); break; } - /*.${AOs::Ship::SM::active::flying::HIT_WALL} */ + /*${AOs::Ship::SM::active::flying::HIT_WALL} */ case HIT_WALL_SIG: { status_ = Q_TRAN(&Ship_exploding); break; } - /*.${AOs::Ship::SM::active::flying::HIT_MINE} */ + /*${AOs::Ship::SM::active::flying::HIT_MINE} */ case HIT_MINE_SIG: { status_ = Q_TRAN(&Ship_exploding); break; @@ -221,19 +240,20 @@ static QState Ship_flying(Ship * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Ship::SM::active::exploding} .....................................*/ + +/*${AOs::Ship::SM::active::exploding} ......................................*/ static QState Ship_exploding(Ship * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Ship::SM::active::exploding} */ + /*${AOs::Ship::SM::active::exploding} */ case Q_ENTRY_SIG: { me->exp_ctr = 0U; status_ = Q_HANDLED(); break; } - /*.${AOs::Ship::SM::active::exploding::TIME_TICK} */ + /*${AOs::Ship::SM::active::exploding::TIME_TICK} */ case TIME_TICK_SIG: { - /*.${AOs::Ship::SM::active::exploding::TIME_TICK::[me->exp_ctr<15U]} */ + /*${AOs::Ship::SM::active::exploding::TIME_TICK::[me->exp_ctr<15U]} */ if (me->exp_ctr < 15U) { ObjectImageEvt *oie; ++me->exp_ctr; @@ -245,7 +265,7 @@ static QState Ship_exploding(Ship * const me, QEvt const * const e) { QACTIVE_POST(AO_Tunnel, (QEvt *)oie, me); status_ = Q_HANDLED(); } - /*.${AOs::Ship::SM::active::exploding::TIME_TICK::[else]} */ + /*${AOs::Ship::SM::active::exploding::TIME_TICK::[else]} */ else { ScoreEvt *gameOver = Q_NEW(ScoreEvt, GAME_OVER_SIG); gameOver->score = me->score; @@ -261,4 +281,4 @@ static QState Ship_exploding(Ship * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Ship} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Ship} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/game_efm32-slstk3401a/tunnel.c b/examples/arm-cm/game_efm32-slstk3401a/tunnel.c index c00be096..d84fd64e 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/tunnel.c +++ b/examples/arm-cm/game_efm32-slstk3401a/tunnel.c @@ -1,21 +1,33 @@ -/*.$file${.::tunnel.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::tunnel.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: game.qm * File: ${.::tunnel.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::tunnel.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::tunnel.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "bsp.h" #include "game.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* local objects -----------------------------------------------------------*/ -/*.$declare${AOs::Tunnel} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Tunnel} ..........................................................*/ +/*$declare${AOs::Tunnel} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Tunnel} ...........................................................*/ typedef struct Tunnel { /* protected: */ QActive super; @@ -48,7 +61,8 @@ typedef struct Tunnel { /* private: */ static void Tunnel_advance(Tunnel * const me); static void Tunnel_plantMine(Tunnel * const me); -static void Tunnel_dispatchToAllMines(Tunnel * const me, QEvt const * e); +static void Tunnel_dispatchToAllMines(Tunnel * const me, + QEvt const * e); /* public: */ static void Tunnel_ctor(Tunnel * const me); @@ -65,33 +79,36 @@ static QState Tunnel_screen_saver(Tunnel * const me, QEvt const * const e); static QState Tunnel_screen_saver_hide(Tunnel * const me, QEvt const * const e); static QState Tunnel_screen_saver_show(Tunnel * const me, QEvt const * const e); static QState Tunnel_final(Tunnel * const me, QEvt const * const e); -/*.$enddecl${AOs::Tunnel} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Tunnel} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Public-scope objects ----------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::AO_Tunnel} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque AO pointer */ -/*.${Shared::AO_Tunnel} ....................................................*/ +/*$define${Shared::AO_Tunnel} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::AO_Tunnel} .....................................................*/ QActive * const AO_Tunnel = &Tunnel_inst.super; -/*.$enddef${Shared::AO_Tunnel} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Shared::AO_Tunnel} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Active object definition ================================================*/ -/*.$define${Shared::Tunnel_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::Tunnel_ctor_call} .............................................*/ +/*$define${Shared::Tunnel_ctor_call} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::Tunnel_ctor_call} ..............................................*/ void Tunnel_ctor_call(void) { Tunnel_ctor(&Tunnel_inst); } -/*.$enddef${Shared::Tunnel_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Tunnel} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Tunnel} ..........................................................*/ +/*$enddef${Shared::Tunnel_ctor_call} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Tunnel} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Tunnel} ...........................................................*/ Tunnel Tunnel_inst; -/*.${AOs::Tunnel::advance} .................................................*/ + +/*${AOs::Tunnel::advance} ..................................................*/ static void Tunnel_advance(Tunnel * const me) { uint32_t rnd; @@ -133,7 +150,7 @@ static void Tunnel_advance(Tunnel * const me) { BSP_advanceWalls(me->wall_thickness_top, me->wall_thickness_bottom); } -/*.${AOs::Tunnel::plantMine} ...............................................*/ +/*${AOs::Tunnel::plantMine} ................................................*/ static void Tunnel_plantMine(Tunnel * const me) { uint32_t rnd = (BSP_random() & 0xFFU); @@ -179,8 +196,10 @@ static void Tunnel_plantMine(Tunnel * const me) { } } -/*.${AOs::Tunnel::dispatchToAllMines} ......................................*/ -static void Tunnel_dispatchToAllMines(Tunnel * const me, QEvt const * e) { +/*${AOs::Tunnel::dispatchToAllMines} .......................................*/ +static void Tunnel_dispatchToAllMines(Tunnel * const me, + QEvt const * e) +{ uint8_t n; for (n = 0U; n < GAME_MINES_MAX; ++n) { if (me->mines[n] != (QHsm *)0) { /* is the mine used? */ @@ -189,7 +208,7 @@ static void Tunnel_dispatchToAllMines(Tunnel * const me, QEvt const * e) { } } -/*.${AOs::Tunnel::ctor} ....................................................*/ +/*${AOs::Tunnel::ctor} .....................................................*/ static void Tunnel_ctor(Tunnel * const me) { uint8_t n; QActive_ctor(&me->super, Q_STATE_CAST(&Tunnel_initial)); @@ -204,9 +223,9 @@ static void Tunnel_ctor(Tunnel * const me) { me->last_mine_y = 0; } -/*.${AOs::Tunnel::SM} ......................................................*/ +/*${AOs::Tunnel::SM} .......................................................*/ static QState Tunnel_initial(Tunnel * const me, void const * const par) { - /*.${AOs::Tunnel::SM::initial} */ + /*${AOs::Tunnel::SM::initial} */ uint8_t n; for (n = 0U; n < GAME_MINES_MAX; ++n) { QHSM_INIT(me->mine1_pool[n], (void *)0, me->super.prio); @@ -246,11 +265,12 @@ static QState Tunnel_initial(Tunnel * const me, void const * const par) { return Q_TRAN(&Tunnel_show_logo); } -/*.${AOs::Tunnel::SM::active} ..............................................*/ + +/*${AOs::Tunnel::SM::active} ...............................................*/ static QState Tunnel_active(Tunnel * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Tunnel::SM::active::MINE_DISABLED} */ + /*${AOs::Tunnel::SM::active::MINE_DISABLED} */ case MINE_DISABLED_SIG: { Q_ASSERT((Q_EVT_CAST(MineEvt)->id < GAME_MINES_MAX) && (me->mines[Q_EVT_CAST(MineEvt)->id] != (QHsm *)0)); @@ -258,7 +278,7 @@ static QState Tunnel_active(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::PLAYER_QUIT} */ + /*${AOs::Tunnel::SM::active::PLAYER_QUIT} */ case PLAYER_QUIT_SIG: { status_ = Q_TRAN(&Tunnel_final); break; @@ -270,11 +290,12 @@ static QState Tunnel_active(Tunnel * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Tunnel::SM::active::show_logo} ...................................*/ + +/*${AOs::Tunnel::SM::active::show_logo} ....................................*/ static QState Tunnel_show_logo(Tunnel * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Tunnel::SM::active::show_logo} */ + /*${AOs::Tunnel::SM::active::show_logo} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->blinkTimeEvt, BSP_TICKS_PER_SEC/2U, BSP_TICKS_PER_SEC/2U); @@ -290,28 +311,28 @@ static QState Tunnel_show_logo(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::show_logo} */ + /*${AOs::Tunnel::SM::active::show_logo} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->blinkTimeEvt); QTimeEvt_disarm(&me->screenTimeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::show_logo::SCREEN_TIMEOUT} */ + /*${AOs::Tunnel::SM::active::show_logo::SCREEN_TIMEOUT} */ case SCREEN_TIMEOUT_SIG: { status_ = Q_TRAN(&Tunnel_demo); break; } - /*.${AOs::Tunnel::SM::active::show_logo::BLINK_TIMEOUT} */ + /*${AOs::Tunnel::SM::active::show_logo::BLINK_TIMEOUT} */ case BLINK_TIMEOUT_SIG: { me->blink_ctr ^= 1U; /* toggle the blink counter */ - /*.${AOs::Tunnel::SM::active::show_logo::BLINK_TIMEOUT::[me->blink_ctr==0U]} */ + /*${AOs::Tunnel::SM::active::show_logo::BLINK_TIMEOUT::[me->blink_ctr==0U]} */ if (me->blink_ctr == 0U) { BSP_paintString(24U + 8U*6U, (GAME_TUNNEL_HEIGHT / 2U) - 8U, "LeAps"); BSP_updateScreen(); status_ = Q_HANDLED(); } - /*.${AOs::Tunnel::SM::active::show_logo::BLINK_TIMEOUT::[else]} */ + /*${AOs::Tunnel::SM::active::show_logo::BLINK_TIMEOUT::[else]} */ else { BSP_paintString(24U + 8U*6U, (GAME_TUNNEL_HEIGHT / 2U) - 8U, "LeaPs"); BSP_updateScreen(); @@ -326,11 +347,12 @@ static QState Tunnel_show_logo(Tunnel * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Tunnel::SM::active::demo} ........................................*/ + +/*${AOs::Tunnel::SM::active::demo} .........................................*/ static QState Tunnel_demo(Tunnel * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Tunnel::SM::active::demo} */ + /*${AOs::Tunnel::SM::active::demo} */ case Q_ENTRY_SIG: { me->last_mine_x = 0U; /* last mine at right edge of the tunnel */ me->last_mine_y = 0U; @@ -350,25 +372,25 @@ static QState Tunnel_demo(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::demo} */ + /*${AOs::Tunnel::SM::active::demo} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->blinkTimeEvt); QTimeEvt_disarm(&me->screenTimeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::demo::BLINK_TIMEOUT} */ + /*${AOs::Tunnel::SM::active::demo::BLINK_TIMEOUT} */ case BLINK_TIMEOUT_SIG: { me->blink_ctr ^= 1U; /* toggle the blink cunter */ status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::demo::SCREEN_TIMEOUT} */ + /*${AOs::Tunnel::SM::active::demo::SCREEN_TIMEOUT} */ case SCREEN_TIMEOUT_SIG: { status_ = Q_TRAN(&Tunnel_screen_saver); break; } - /*.${AOs::Tunnel::SM::active::demo::TIME_TICK} */ + /*${AOs::Tunnel::SM::active::demo::TIME_TICK} */ case TIME_TICK_SIG: { Tunnel_advance(me); if (me->blink_ctr != 0U) { @@ -381,7 +403,7 @@ static QState Tunnel_demo(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::demo::PLAYER_TRIGGER} */ + /*${AOs::Tunnel::SM::active::demo::PLAYER_TRIGGER} */ case PLAYER_TRIGGER_SIG: { status_ = Q_TRAN(&Tunnel_playing); break; @@ -393,11 +415,12 @@ static QState Tunnel_demo(Tunnel * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Tunnel::SM::active::playing} .....................................*/ + +/*${AOs::Tunnel::SM::active::playing} ......................................*/ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Tunnel::SM::active::playing} */ + /*${AOs::Tunnel::SM::active::playing} */ case Q_ENTRY_SIG: { static QEvt const takeoff = { TAKE_OFF_SIG, 0U, 0U }; me->wall_gap = GAME_WALLS_GAP_Y; @@ -405,7 +428,7 @@ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::playing} */ + /*${AOs::Tunnel::SM::active::playing} */ case Q_EXIT_SIG: { QEvt recycle; recycle.sig = MINE_RECYCLE_SIG; @@ -413,7 +436,7 @@ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::playing::TIME_TICK} */ + /*${AOs::Tunnel::SM::active::playing::TIME_TICK} */ case TIME_TICK_SIG: { /* render this frame on the display */ BSP_updateScreen(); @@ -423,7 +446,7 @@ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::playing::SHIP_IMG} */ + /*${AOs::Tunnel::SM::active::playing::SHIP_IMG} */ case SHIP_IMG_SIG: { uint8_t x = Q_EVT_CAST(ObjectImageEvt)->x; int8_t y = Q_EVT_CAST(ObjectImageEvt)->y; @@ -439,7 +462,7 @@ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::playing::MISSILE_IMG} */ + /*${AOs::Tunnel::SM::active::playing::MISSILE_IMG} */ case MISSILE_IMG_SIG: { uint8_t x = Q_EVT_CAST(ObjectImageEvt)->x; int8_t y = Q_EVT_CAST(ObjectImageEvt)->y; @@ -455,7 +478,7 @@ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::playing::MINE_IMG} */ + /*${AOs::Tunnel::SM::active::playing::MINE_IMG} */ case MINE_IMG_SIG: { BSP_paintBitmap(Q_EVT_CAST(ObjectImageEvt)->x, Q_EVT_CAST(ObjectImageEvt)->y, @@ -463,7 +486,7 @@ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::playing::EXPLOSION} */ + /*${AOs::Tunnel::SM::active::playing::EXPLOSION} */ case EXPLOSION_SIG: { BSP_paintBitmap(Q_EVT_CAST(ObjectImageEvt)->x, Q_EVT_CAST(ObjectImageEvt)->y, @@ -471,7 +494,7 @@ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::playing::SCORE} */ + /*${AOs::Tunnel::SM::active::playing::SCORE} */ case SCORE_SIG: { BSP_updateScore(Q_EVT_CAST(ScoreEvt)->score); /* increase difficulty of the game: @@ -485,7 +508,7 @@ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::playing::GAME_OVER} */ + /*${AOs::Tunnel::SM::active::playing::GAME_OVER} */ case GAME_OVER_SIG: { BSP_clearWalls(); BSP_updateScore(Q_EVT_CAST(ScoreEvt)->score); @@ -500,11 +523,12 @@ static QState Tunnel_playing(Tunnel * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Tunnel::SM::active::game_over} ...................................*/ + +/*${AOs::Tunnel::SM::active::game_over} ....................................*/ static QState Tunnel_game_over(Tunnel * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Tunnel::SM::active::game_over} */ + /*${AOs::Tunnel::SM::active::game_over} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->blinkTimeEvt, BSP_TICKS_PER_SEC/2U, BSP_TICKS_PER_SEC/2U); /* every 1/2 sec */ @@ -517,7 +541,7 @@ static QState Tunnel_game_over(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::game_over} */ + /*${AOs::Tunnel::SM::active::game_over} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->blinkTimeEvt); QTimeEvt_disarm(&me->screenTimeEvt); @@ -525,7 +549,7 @@ static QState Tunnel_game_over(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::game_over::BLINK_TIMEOUT} */ + /*${AOs::Tunnel::SM::active::game_over::BLINK_TIMEOUT} */ case BLINK_TIMEOUT_SIG: { me->blink_ctr ^= 1U; /* toggle the blink counter */ BSP_paintString((GAME_TUNNEL_WIDTH - 6U*9U) / 2U, @@ -537,7 +561,7 @@ static QState Tunnel_game_over(Tunnel * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::game_over::SCREEN_TIMEOUT} */ + /*${AOs::Tunnel::SM::active::game_over::SCREEN_TIMEOUT} */ case SCREEN_TIMEOUT_SIG: { status_ = Q_TRAN(&Tunnel_demo); break; @@ -549,16 +573,17 @@ static QState Tunnel_game_over(Tunnel * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Tunnel::SM::active::screen_saver} ................................*/ + +/*${AOs::Tunnel::SM::active::screen_saver} .................................*/ static QState Tunnel_screen_saver(Tunnel * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Tunnel::SM::active::screen_saver::initial} */ + /*${AOs::Tunnel::SM::active::screen_saver::initial} */ case Q_INIT_SIG: { status_ = Q_TRAN(&Tunnel_screen_saver_hide); break; } - /*.${AOs::Tunnel::SM::active::screen_saver::PLAYER_TRIGGER} */ + /*${AOs::Tunnel::SM::active::screen_saver::PLAYER_TRIGGER} */ case PLAYER_TRIGGER_SIG: { status_ = Q_TRAN(&Tunnel_demo); break; @@ -570,25 +595,26 @@ static QState Tunnel_screen_saver(Tunnel * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Tunnel::SM::active::screen_saver::screen_saver_hide} .............*/ + +/*${AOs::Tunnel::SM::active::screen_saver::screen_saver_hide} ..............*/ static QState Tunnel_screen_saver_hide(Tunnel * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Tunnel::SM::active::screen_saver::screen_saver_hide} */ + /*${AOs::Tunnel::SM::active::screen_saver::screen_saver_hide} */ case Q_ENTRY_SIG: { BSP_displayOff(); /* power down the display */ QTimeEvt_armX(&me->screenTimeEvt, BSP_TICKS_PER_SEC*3U, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::screen_saver::screen_saver_hide} */ + /*${AOs::Tunnel::SM::active::screen_saver::screen_saver_hide} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->screenTimeEvt); BSP_displayOn(); /* power up the display */ status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::screen_saver::screen_saver_hid~::SCREEN_TIMEOUT} */ + /*${AOs::Tunnel::SM::active::screen_saver::screen_saver_hid~::SCREEN_TIMEOUT} */ case SCREEN_TIMEOUT_SIG: { status_ = Q_TRAN(&Tunnel_screen_saver_show); break; @@ -600,11 +626,12 @@ static QState Tunnel_screen_saver_hide(Tunnel * const me, QEvt const * const e) } return status_; } -/*.${AOs::Tunnel::SM::active::screen_saver::screen_saver_show} .............*/ + +/*${AOs::Tunnel::SM::active::screen_saver::screen_saver_show} ..............*/ static QState Tunnel_screen_saver_show(Tunnel * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Tunnel::SM::active::screen_saver::screen_saver_show} */ + /*${AOs::Tunnel::SM::active::screen_saver::screen_saver_show} */ case Q_ENTRY_SIG: { uint32_t rnd = BSP_random(); /* clear the screen frame buffer */ @@ -617,7 +644,7 @@ static QState Tunnel_screen_saver_show(Tunnel * const me, QEvt const * const e) status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::screen_saver::screen_saver_show} */ + /*${AOs::Tunnel::SM::active::screen_saver::screen_saver_show} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->screenTimeEvt); BSP_clearFB(); @@ -625,7 +652,7 @@ static QState Tunnel_screen_saver_show(Tunnel * const me, QEvt const * const e) status_ = Q_HANDLED(); break; } - /*.${AOs::Tunnel::SM::active::screen_saver::screen_saver_sho~::SCREEN_TIMEOUT} */ + /*${AOs::Tunnel::SM::active::screen_saver::screen_saver_sho~::SCREEN_TIMEOUT} */ case SCREEN_TIMEOUT_SIG: { status_ = Q_TRAN(&Tunnel_screen_saver_hide); break; @@ -637,11 +664,12 @@ static QState Tunnel_screen_saver_show(Tunnel * const me, QEvt const * const e) } return status_; } -/*.${AOs::Tunnel::SM::final} ...............................................*/ + +/*${AOs::Tunnel::SM::final} ................................................*/ static QState Tunnel_final(Tunnel * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Tunnel::SM::final} */ + /*${AOs::Tunnel::SM::final} */ case Q_ENTRY_SIG: { /* clear the screen */ BSP_clearFB(); @@ -657,4 +685,4 @@ static QState Tunnel_final(Tunnel * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Tunnel} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Tunnel} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/bsp.c b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/bsp.c index 3ef638e7..d76d8a05 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/bsp.c +++ b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/bsp.c @@ -86,7 +86,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, /*..........................................................................*/ static void playerTrigger(void) { static QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0U, 0U }; - QF_PUBLISH(&fireEvt, (void*)0); + QACTIVE_PUBLISH(&fireEvt, (void*)0); } /*--------------------------------------------------------------------------*/ @@ -99,8 +99,8 @@ void QF_onCleanup(void) { /*..........................................................................*/ void QF_onClockTick(void) { static QEvt const tickEvt = { TIME_TICK_SIG, 0U, 0U }; - QF_TICK_X(0U, &l_clock_tick); /* process time events for rate 0 */ - QF_PUBLISH(&tickEvt, &l_clock_tick); /* publish the tick event */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* process time events for rate 0 */ + QACTIVE_PUBLISH(&tickEvt, &l_clock_tick); /* publish the tick event */ QS_RX_INPUT(); /* handle the QS-RX input */ QS_OUTPUT(); /* handle the QS output */ diff --git a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.sln b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.sln index e4f1c294..0886f8f5 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.sln +++ b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.sln @@ -1,23 +1,23 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game-gui", "game-gui.vcxproj", "{79027B25-0949-4F66-9765-4EFBCBBEFB94}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - QSpy|Win32 = QSpy|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.ActiveCfg = Debug|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.Build.0 = Debug|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.ActiveCfg = Release|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.Build.0 = Release|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.Build.0 = QSpy|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game-gui", "game-gui.vcxproj", "{79027B25-0949-4F66-9765-4EFBCBBEFB94}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + QSpy|Win32 = QSpy|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.ActiveCfg = Debug|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.Build.0 = Debug|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.ActiveCfg = Release|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.Build.0 = Release|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.ActiveCfg = QSpy|Win32 + {79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.Build.0 = QSpy|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj index cd24c047..d8664a76 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj +++ b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj @@ -1,294 +1,294 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - QSpy - Win32 - - - - {79027B25-0949-4F66-9765-4EFBCBBEFB94} - game-gui - 10.0 - - - - Application - false - NotSet - v142 - - - Application - false - NotSet - v142 - - - Application - false - NotSet - v142 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(Configuration)\ - $(Configuration)\ - false - false - $(Configuration)\ - $(Configuration)\ - false - false - $(Configuration)\ - $(Configuration)\ - false - false - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/game-gui.tlb - - - - - MaxSpeed - OnlyExplicitInline - .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;QWIN_GUI;_WINDOWS;%(PreprocessorDefinitions) - false - - - MultiThreaded - true - - - $(IntDir) - $(IntDir) - $(IntDir) - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - Windows - false - - - MachineX86 - - - true - .\Release/game-gui.bsc - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\QSpy/game-gui.tlb - - - - - Disabled - .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - - - $(IntDir) - $(IntDir) - $(IntDir) - true - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - false - - - Windows - false - - - MachineX86 - - - true - .\QSpy/game-gui.bsc - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/game-gui.tlb - - - - - Disabled - .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - - - $(IntDir) - $(IntDir) - $(IntDir) - true - Level3 - true - ProgramDatabase - Default - - - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).exe - true - ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - false - - - Windows - false - - - MachineX86 - - - true - .\Debug/game-gui.bsc - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - - - - - - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + QSpy + Win32 + + + + {79027B25-0949-4F66-9765-4EFBCBBEFB94} + game-gui + 10.0 + + + + Application + false + NotSet + v142 + + + Application + false + NotSet + v142 + + + Application + false + NotSet + v142 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(Configuration)\ + $(Configuration)\ + false + false + $(Configuration)\ + $(Configuration)\ + false + false + $(Configuration)\ + $(Configuration)\ + false + false + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/game-gui.tlb + + + + + MaxSpeed + OnlyExplicitInline + .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) + NDEBUG;QWIN_GUI;_WINDOWS;%(PreprocessorDefinitions) + false + + + MultiThreaded + true + + + $(IntDir) + $(IntDir) + $(IntDir) + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + true + ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + Windows + false + + + MachineX86 + + + true + .\Release/game-gui.bsc + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\QSpy/game-gui.tlb + + + + + Disabled + .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + + + $(IntDir) + $(IntDir) + $(IntDir) + true + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + true + ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + false + + + Windows + false + + + MachineX86 + + + true + .\QSpy/game-gui.bsc + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/game-gui.tlb + + + + + Disabled + .;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories) + QWIN_GUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + + + $(IntDir) + $(IntDir) + $(IntDir) + true + Level3 + true + ProgramDatabase + Default + + + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + true + ../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + false + + + Windows + false + + + MachineX86 + + + true + .\Debug/game-gui.bsc + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + + + + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj.filters b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj.filters index 15bba641..ea2a2a31 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj.filters +++ b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/game-gui.vcxproj.filters @@ -1,66 +1,66 @@ - - - - - - - - - - - - - - - - - - - - Res - - - Res - - - Res - - - Res - - - Res - - - Res - - - Res - - - - - {c8d4d732-dcf8-4466-ad8e-3f15ab6fe204} - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + Res + + + Res + + + Res + + + Res + + + Res + + + Res + + + Res + + + + + {c8d4d732-dcf8-4466-ad8e-3f15ab6fe204} + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/make.bat b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/make.bat index dad94b3f..b4a17512 100644 --- a/examples/arm-cm/game_efm32-slstk3401a/win32-gui/make.bat +++ b/examples/arm-cm/game_efm32-slstk3401a/win32-gui/make.bat @@ -1,24 +1,24 @@ -:: Batch file for building the specified PROJ (solution) prepared for -:: Microsoft Visual Studio -:: -:: usage: -:: make -:: -@setlocal - -:: specifiy project and build configuration (Debug|Release|Spy) -@set PROJ=game-gui -@set CONF=Debug - -:: adjust the MSBuild location for your system -@set MSBuild="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" - -:: execute the build... -%MSBuild% %PROJ%.sln -t:Build -p:Configuration=%CONF% -p:Platform=Win32 - -:: cleanup after the build... -::rmdir /S /Q %CONF%\%PROJ%.tlog -::del %CONF%\%PROJ%.vcxproj* %CONF%\%PROJ%.log %CONF%\*.obj %CONF%\*.pdb - -@endlocal - +:: Batch file for building the specified PROJ (solution) prepared for +:: Microsoft Visual Studio +:: +:: usage: +:: make +:: +@setlocal + +:: specifiy project and build configuration (Debug|Release|Spy) +@set PROJ=game-gui +@set CONF=Debug + +:: adjust the MSBuild location for your system +@set MSBuild="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" + +:: execute the build... +%MSBuild% %PROJ%.sln -t:Build -p:Configuration=%CONF% -p:Platform=Win32 + +:: cleanup after the build... +::rmdir /S /Q %CONF%\%PROJ%.tlog +::del %CONF%\%PROJ%.vcxproj* %CONF%\%PROJ%.log %CONF%\*.obj %CONF%\*.pdb + +@endlocal + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/README.md b/examples/arm-cm/low-power_ek-tm4c123gxl/README.md new file mode 100644 index 00000000..f186bd10 --- /dev/null +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/README.md @@ -0,0 +1,5 @@ +![EK-TM4C123GXL](../../../doxygen/images/bd_EK-TM4C123GXL.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cm_low-power.html diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/blinky0.c b/examples/arm-cm/low-power_ek-tm4c123gxl/blinky0.c index 8d4460dd..f7d15b5d 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/blinky0.c +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/blinky0.c @@ -1,29 +1,42 @@ -/*.$file${.::blinky0.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::blinky0.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: low-power.qm * File: ${.::blinky0.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::blinky0.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::blinky0.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "low_power.h" #include "bsp.h" //Q_DEFINE_THIS_FILE -/*.$declare${AOs::Blinky0} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky0} .........................................................*/ +/*$declare${AOs::Blinky0} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky0} ..........................................................*/ typedef struct Blinky0 { /* protected: */ QActive super; @@ -44,25 +57,29 @@ static QState Blinky0_active(Blinky0 * const me, QEvt const * const e); static QState Blinky0_on(Blinky0 * const me, QEvt const * const e); static QState Blinky0_off(Blinky0 * const me, QEvt const * const e); static QState Blinky0_inactive(Blinky0 * const me, QEvt const * const e); -/*.$enddecl${AOs::Blinky0} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Blinky0} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Blinky0} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Blinky0} ......................................................*/ -QActive * const AO_Blinky0 = &Blinky0_instance.super; -/*.$enddef${AOs::AO_Blinky0} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Blinky0} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky0} .........................................................*/ +/*$define${AOs::AO_Blinky0} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Blinky0} .......................................................*/ +QActive * const AO_Blinky0 = &Blinky0_instance.super; +/*$enddef${AOs::AO_Blinky0} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Blinky0} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky0} ..........................................................*/ Blinky0 Blinky0_instance; -/*.${AOs::Blinky0::SM} .....................................................*/ + +/*${AOs::Blinky0::SM} ......................................................*/ static QState Blinky0_initial(Blinky0 * const me, void const * const par) { - /*.${AOs::Blinky0::SM::initial} */ + /*${AOs::Blinky0::SM::initial} */ (void)par; /* unused parameter */ QActive_subscribe(&me->super, BTN_PRESSED_SIG); @@ -73,11 +90,12 @@ static QState Blinky0_initial(Blinky0 * const me, void const * const par) { return Q_TRAN(&Blinky0_active); } -/*.${AOs::Blinky0::SM::active} .............................................*/ + +/*${AOs::Blinky0::SM::active} ..............................................*/ static QState Blinky0_active(Blinky0 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky0::SM::active} */ + /*${AOs::Blinky0::SM::active} */ case Q_ENTRY_SIG: { BSP_tickRate0_on(); me->count = 4U; @@ -85,13 +103,13 @@ static QState Blinky0_active(Blinky0 * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky0::SM::active} */ + /*${AOs::Blinky0::SM::active} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt0); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky0::SM::active::initial} */ + /*${AOs::Blinky0::SM::active::initial} */ case Q_INIT_SIG: { status_ = Q_TRAN(&Blinky0_on); break; @@ -103,30 +121,31 @@ static QState Blinky0_active(Blinky0 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Blinky0::SM::active::on} .........................................*/ + +/*${AOs::Blinky0::SM::active::on} ..........................................*/ static QState Blinky0_on(Blinky0 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky0::SM::active::on} */ + /*${AOs::Blinky0::SM::active::on} */ case Q_ENTRY_SIG: { BSP_led0_on(); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky0::SM::active::on} */ + /*${AOs::Blinky0::SM::active::on} */ case Q_EXIT_SIG: { BSP_led0_off(); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky0::SM::active::on::TIMEOUT0} */ + /*${AOs::Blinky0::SM::active::on::TIMEOUT0} */ case TIMEOUT0_SIG: { --me->count; - /*.${AOs::Blinky0::SM::active::on::TIMEOUT0::[me->count>0]} */ + /*${AOs::Blinky0::SM::active::on::TIMEOUT0::[me->count>0]} */ if (me->count > 0) { status_ = Q_TRAN(&Blinky0_off); } - /*.${AOs::Blinky0::SM::active::on::TIMEOUT0::[else]} */ + /*${AOs::Blinky0::SM::active::on::TIMEOUT0::[else]} */ else { status_ = Q_TRAN(&Blinky0_inactive); } @@ -139,11 +158,12 @@ static QState Blinky0_on(Blinky0 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Blinky0::SM::active::off} ........................................*/ + +/*${AOs::Blinky0::SM::active::off} .........................................*/ static QState Blinky0_off(Blinky0 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky0::SM::active::off::TIMEOUT0} */ + /*${AOs::Blinky0::SM::active::off::TIMEOUT0} */ case TIMEOUT0_SIG: { status_ = Q_TRAN(&Blinky0_on); break; @@ -155,11 +175,12 @@ static QState Blinky0_off(Blinky0 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Blinky0::SM::inactive} ...........................................*/ + +/*${AOs::Blinky0::SM::inactive} ............................................*/ static QState Blinky0_inactive(Blinky0 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky0::SM::inactive::BTN_PRESSED} */ + /*${AOs::Blinky0::SM::inactive::BTN_PRESSED} */ case BTN_PRESSED_SIG: { status_ = Q_TRAN(&Blinky0_active); break; @@ -171,13 +192,15 @@ static QState Blinky0_inactive(Blinky0 * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Blinky0} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Blinky0} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Blinky0_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky0_ctor} ....................................................*/ +/*$define${AOs::Blinky0_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky0_ctor} .....................................................*/ void Blinky0_ctor(void) { Blinky0 *me = &Blinky0_instance; QActive_ctor(&me->super, Q_STATE_CAST(&Blinky0_initial)); QTimeEvt_ctorX(&me->timeEvt0, &me->super, TIMEOUT0_SIG, 0U); } -/*.$enddef${AOs::Blinky0_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Blinky0_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/blinky1.c b/examples/arm-cm/low-power_ek-tm4c123gxl/blinky1.c index afbf255b..bd1f01a7 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/blinky1.c +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/blinky1.c @@ -1,29 +1,42 @@ -/*.$file${.::blinky1.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::blinky1.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: low-power.qm * File: ${.::blinky1.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::blinky1.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::blinky1.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "low_power.h" #include "bsp.h" //Q_DEFINE_THIS_FILE -/*.$declare${AOs::Blinky1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky1} .........................................................*/ +/*$declare${AOs::Blinky1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky1} ..........................................................*/ typedef struct Blinky1 { /* protected: */ QActive super; @@ -42,25 +55,29 @@ static QState Blinky1_inactive(Blinky1 * const me, QEvt const * const e); static QState Blinky1_active(Blinky1 * const me, QEvt const * const e); static QState Blinky1_off(Blinky1 * const me, QEvt const * const e); static QState Blinky1_on(Blinky1 * const me, QEvt const * const e); -/*.$enddecl${AOs::Blinky1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Blinky1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Blinky1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Blinky1} ......................................................*/ -QActive * const AO_Blinky1 = &Blinky1_instance.super; -/*.$enddef${AOs::AO_Blinky1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Blinky1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky1} .........................................................*/ +/*$define${AOs::AO_Blinky1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Blinky1} .......................................................*/ +QActive * const AO_Blinky1 = &Blinky1_instance.super; +/*$enddef${AOs::AO_Blinky1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Blinky1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky1} ..........................................................*/ Blinky1 Blinky1_instance; -/*.${AOs::Blinky1::SM} .....................................................*/ + +/*${AOs::Blinky1::SM} ......................................................*/ static QState Blinky1_initial(Blinky1 * const me, void const * const par) { - /*.${AOs::Blinky1::SM::initial} */ + /*${AOs::Blinky1::SM::initial} */ (void)par; /* unused parameter */ QActive_subscribe(&me->super, BTN_PRESSED_SIG); @@ -71,11 +88,12 @@ static QState Blinky1_initial(Blinky1 * const me, void const * const par) { return Q_TRAN(&Blinky1_inactive); } -/*.${AOs::Blinky1::SM::inactive} ...........................................*/ + +/*${AOs::Blinky1::SM::inactive} ............................................*/ static QState Blinky1_inactive(Blinky1 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky1::SM::inactive::BTN_PRESSED} */ + /*${AOs::Blinky1::SM::inactive::BTN_PRESSED} */ case BTN_PRESSED_SIG: { status_ = Q_TRAN(&Blinky1_active); break; @@ -87,11 +105,12 @@ static QState Blinky1_inactive(Blinky1 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Blinky1::SM::active} .............................................*/ + +/*${AOs::Blinky1::SM::active} ..............................................*/ static QState Blinky1_active(Blinky1 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky1::SM::active} */ + /*${AOs::Blinky1::SM::active} */ case Q_ENTRY_SIG: { BSP_tickRate1_on(); me->count = 13U; @@ -99,13 +118,13 @@ static QState Blinky1_active(Blinky1 * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky1::SM::active} */ + /*${AOs::Blinky1::SM::active} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt1); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky1::SM::active::initial} */ + /*${AOs::Blinky1::SM::active::initial} */ case Q_INIT_SIG: { status_ = Q_TRAN(&Blinky1_on); break; @@ -117,11 +136,12 @@ static QState Blinky1_active(Blinky1 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Blinky1::SM::active::off} ........................................*/ + +/*${AOs::Blinky1::SM::active::off} .........................................*/ static QState Blinky1_off(Blinky1 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky1::SM::active::off::TIMEOUT1} */ + /*${AOs::Blinky1::SM::active::off::TIMEOUT1} */ case TIMEOUT1_SIG: { status_ = Q_TRAN(&Blinky1_on); break; @@ -133,30 +153,31 @@ static QState Blinky1_off(Blinky1 * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Blinky1::SM::active::on} .........................................*/ + +/*${AOs::Blinky1::SM::active::on} ..........................................*/ static QState Blinky1_on(Blinky1 * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky1::SM::active::on} */ + /*${AOs::Blinky1::SM::active::on} */ case Q_ENTRY_SIG: { BSP_led1_on(); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky1::SM::active::on} */ + /*${AOs::Blinky1::SM::active::on} */ case Q_EXIT_SIG: { BSP_led1_off(); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky1::SM::active::on::TIMEOUT1} */ + /*${AOs::Blinky1::SM::active::on::TIMEOUT1} */ case TIMEOUT1_SIG: { --me->count; - /*.${AOs::Blinky1::SM::active::on::TIMEOUT1::[me->count>0]} */ + /*${AOs::Blinky1::SM::active::on::TIMEOUT1::[me->count>0]} */ if (me->count > 0) { status_ = Q_TRAN(&Blinky1_off); } - /*.${AOs::Blinky1::SM::active::on::TIMEOUT1::[else]} */ + /*${AOs::Blinky1::SM::active::on::TIMEOUT1::[else]} */ else { status_ = Q_TRAN(&Blinky1_inactive); } @@ -169,13 +190,15 @@ static QState Blinky1_on(Blinky1 * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Blinky1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Blinky1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Blinky1_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky1_ctor} ....................................................*/ +/*$define${AOs::Blinky1_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky1_ctor} .....................................................*/ void Blinky1_ctor(void) { Blinky1 *me = &Blinky1_instance; QActive_ctor(&me->super, Q_STATE_CAST(&Blinky1_initial)); QTimeEvt_ctorX(&me->timeEvt1, &me->super, TIMEOUT1_SIG, 1U); } -/*.$enddef${AOs::Blinky1_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Blinky1_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + 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 85f172d2..8fb8953f 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/low-power.qm +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/low-power.qm @@ -1,6 +1,6 @@ - - Blinky Low-Power example + + Low-Power example with multiple clock rates diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/low_power.h b/examples/arm-cm/low-power_ek-tm4c123gxl/low_power.h index ca763ede..5acef026 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/low_power.h +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/low_power.h @@ -1,21 +1,33 @@ -/*.$file${.::low_power.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::low_power.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: low-power.qm * File: ${.::low_power.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::low_power.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::low_power.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef LOW_POWER_H #define LOW_POWER_H @@ -28,13 +40,16 @@ enum BlinkySignals { MAX_SIG /* the last signal */ }; -/*.$declare${AOs::AO_Blinky0} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$declare${AOs::AO_Blinky0} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Blinky0} .......................................................*/ extern QActive * const AO_Blinky0; -/*.$enddecl${AOs::AO_Blinky0} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Blinky0_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky0_ctor} ....................................................*/ +/*$enddecl${AOs::AO_Blinky0} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Blinky0_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky0_ctor} .....................................................*/ void Blinky0_ctor(void); -/*.$enddecl${AOs::Blinky0_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Blinky0_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H /* QXK kernel? */ @@ -44,14 +59,18 @@ extern QXSemaphore XSEM_sw1; #else /* QV or QK kernels */ -/*.$declare${AOs::AO_Blinky1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$declare${AOs::AO_Blinky1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Blinky1} .......................................................*/ extern QActive * const AO_Blinky1; -/*.$enddecl${AOs::AO_Blinky1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Blinky1_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky1_ctor} ....................................................*/ +/*$enddecl${AOs::AO_Blinky1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Blinky1_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky1_ctor} .....................................................*/ void Blinky1_ctor(void); -/*.$enddecl${AOs::Blinky1_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Blinky1_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif #endif /* LOW_POWER_H */ + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/armclang/low-power-qk.uvprojx b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/armclang/low-power-qk.uvprojx index 33f34e2f..c4afbe7a 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/armclang/low-power-qk.uvprojx +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/armclang/low-power-qk.uvprojx @@ -338,7 +338,7 @@ __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -967,7 +967,7 @@ NDEBUG __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -1596,7 +1596,7 @@ Q_SPY __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/bsp.c b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/bsp.c index 63043fb0..23923af4 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/bsp.c +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/bsp.c @@ -75,14 +75,14 @@ enum { /* ISRs used in this project ===============================================*/ void SysTick_Handler(void) { QK_ISR_ENTRY(); /* inform QK about entering an ISR */ - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ QK_ISR_EXIT(); /* inform QK about exiting an ISR */ } /*..........................................................................*/ void Timer0A_IRQHandler(void) { QK_ISR_ENTRY(); /* inform QK about entering an ISR */ TIMER0->ICR |= (1U << 0); /* clear the Timer0 interrupt source */ - QF_TICK_X(1U, (void *)0); /* process time events for rate 1 */ + QTIMEEVT_TICK_X(1U, (void *)0); /* process time events for rate 1 */ QK_ISR_EXIT(); /* inform QK about exiting an ISR */ } /*..........................................................................*/ @@ -90,7 +90,7 @@ void GPIOPortF_IRQHandler(void) { QK_ISR_ENTRY(); /* inform QK about entering an ISR */ if ((GPIOF->RIS & BTN_SW1) != 0U) { /* interrupt caused by SW1? */ static QEvt const pressedEvt = { BTN_PRESSED_SIG, 0U, 0U}; - QF_PUBLISH(&pressedEvt, (void *)0); + QACTIVE_PUBLISH(&pressedEvt, (void *)0); } GPIOF->ICR = 0xFFU; /* clear interrupt sources */ QK_ISR_EXIT(); /* inform QK about exiting an ISR */ diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/gnu/Makefile b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/gnu/Makefile index b29e0644..374739a6 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/gnu/Makefile +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/gnu/flash.bat b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/gnu/flash.bat index 7fa47fc2..8f88a12e 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/gnu/flash.bat +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.ewd b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.ewd index 2738edc9..1587ed94 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.ewd +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.ewp b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.ewp index 0496245b..eee295bd 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.ewp +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.ewp @@ -1,3266 +1,3263 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 22 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 22 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 22 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky0.c - - - $PROJ_DIR$\..\..\blinky1.c - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\low_power.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky0.c + + + $PROJ_DIR$\..\..\blinky1.c + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\low_power.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.eww b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.eww index 21c9cd97..a988ab7f 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.eww +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\low-power-qk.ewp - - - - - + + + + + $WS_DIR$\low-power-qk.ewp + + + + + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.icf b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.icf +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qk/iar/low-power-qk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/armclang/low-power-qv.uvprojx b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/armclang/low-power-qv.uvprojx index 72f4ae18..37ab6cb4 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/armclang/low-power-qv.uvprojx +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/armclang/low-power-qv.uvprojx @@ -338,7 +338,7 @@ __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -967,7 +967,7 @@ NDEBUG __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -1596,7 +1596,7 @@ Q_SPY __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qv\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/bsp.c b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/bsp.c index 09a8070a..d7215024 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/bsp.c +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/bsp.c @@ -74,19 +74,19 @@ enum { /* ISRs used in this project ===============================================*/ void SysTick_Handler(void) { - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ } /*..........................................................................*/ void Timer0A_IRQHandler(void) { TIMER0->ICR |= (1U << 0); /* clear the Timer0 interrupt source */ - QF_TICK_X(1U, (void *)0); /* process time events for rate 1 */ + QTIMEEVT_TICK_X(1U, (void *)0); /* process time events for rate 1 */ QV_ARM_ERRATUM_838869(); } /*..........................................................................*/ void GPIOPortF_IRQHandler(void) { if ((GPIOF->RIS & BTN_SW1) != 0U) { /* interrupt caused by SW1? */ static QEvt const pressedEvt = { BTN_PRESSED_SIG, 0U, 0U}; - QF_PUBLISH(&pressedEvt, (void *)0); + QACTIVE_PUBLISH(&pressedEvt, (void *)0); } GPIOF->ICR = 0xFFU; /* clear interrupt sources */ QV_ARM_ERRATUM_838869(); diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/gnu/Makefile b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/gnu/Makefile index e2e95d68..662889af 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/gnu/Makefile +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/gnu/flash.bat b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/gnu/flash.bat index 7fa47fc2..8f88a12e 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/gnu/flash.bat +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.ewd b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.ewd index d7c84b91..71e2f66a 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.ewd +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.ewp b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.ewp index bd5ec45a..f745f1c2 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.ewp +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.ewp @@ -1,3263 +1,3260 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 22 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 22 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 22 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky0.c - - - $PROJ_DIR$\..\..\blinky1.c - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\low_power.h - - - $PROJ_DIR$\..\..\main.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky0.c + + + $PROJ_DIR$\..\..\blinky1.c + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\low_power.h + + + $PROJ_DIR$\..\..\main.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.eww b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.eww index 465d5f56..fb3e97b4 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.eww +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\low-power-qv.ewp - - - - - + + + + + $WS_DIR$\low-power-qv.ewp + + + + + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.icf b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.icf +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qv/iar/low-power-qv.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/armclang/low-power-qxk.uvprojx b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/armclang/low-power-qxk.uvprojx index eb070fc9..b1f1d4b3 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/armclang/low-power-qxk.uvprojx +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/armclang/low-power-qxk.uvprojx @@ -338,7 +338,7 @@ __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -982,7 +982,7 @@ NDEBUG __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -1626,7 +1626,7 @@ Q_SPY __FPU_PRESENT - ..\..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/bsp.c b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/bsp.c index 7b4d1fe9..f54046a6 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/bsp.c +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/bsp.c @@ -75,14 +75,14 @@ enum { /* ISRs used in this project ===============================================*/ void SysTick_Handler(void) { QXK_ISR_ENTRY(); /* inform QXK about entering an ISR */ - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ QXK_ISR_EXIT(); /* inform QXK about exiting an ISR */ } /*..........................................................................*/ void Timer0A_IRQHandler(void) { QXK_ISR_ENTRY(); /* inform QXK about entering an ISR */ TIMER0->ICR |= (1U << 0); /* clear the Timer0 interrupt source */ - QF_TICK_X(1U, (void *)0); /* process time events for rate 1 */ + QTIMEEVT_TICK_X(1U, (void *)0); /* process time events for rate 1 */ QXK_ISR_EXIT(); /* inform QXK about exiting an ISR */ } /*..........................................................................*/ @@ -90,7 +90,7 @@ void GPIOPortF_IRQHandler(void) { QXK_ISR_ENTRY(); /* inform QXK about entering an ISR */ if ((GPIOF->RIS & BTN_SW1) != 0U) { /* interrupt caused by SW1? */ static QEvt const pressedEvt = { BTN_PRESSED_SIG, 0U, 0U}; - QF_PUBLISH(&pressedEvt, (void *)0); + QACTIVE_PUBLISH(&pressedEvt, (void *)0); QXSemaphore_signal(&XSEM_sw1); } GPIOF->ICR = 0xFFU; /* clear interrupt sources */ diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/gnu/Makefile b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/gnu/Makefile index 5cdb0ba7..1f4bcb40 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/gnu/Makefile +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, QXK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -80,7 +80,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/gnu/flash.bat b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/gnu/flash.bat index 7fa47fc2..8f88a12e 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/gnu/flash.bat +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.ewd b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.ewd index 504eef52..3566d6b2 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.ewd +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.ewp b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.ewp index d767fe6b..541f84bf 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.ewp +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.ewp @@ -1,3272 +1,3269 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 22 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 22 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 22 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky0.c - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\low_power.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\xblinky1.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c - - - $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky0.c + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\low_power.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\xblinky1.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_mutex.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_sema.c + + + $PROJ_DIR$\..\..\..\..\..\src\qxk\qxk_xthr.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cm\qxk\iar\qxk_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.eww b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.eww index 68a2146a..4959d641 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.eww +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\low-power-qxk.ewp - - - - - + + + + + $WS_DIR$\low-power-qxk.ewp + + + + + diff --git a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.icf b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.icf +++ b/examples/arm-cm/low-power_ek-tm4c123gxl/qxk/iar/low-power-qxk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/README.md b/examples/arm-cr/blinky_launchxl2-tms57012/README.md new file mode 100644 index 00000000..34ada591 --- /dev/null +++ b/examples/arm-cr/blinky_launchxl2-tms57012/README.md @@ -0,0 +1,5 @@ +![LAUNCHXL2-TMS57012](../../../doxygen/images/bd_LAUNCHXL2-TMS57012.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cr_blinky_launchxl2-tms57012.html diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qk/bsp.c b/examples/arm-cr/blinky_launchxl2-tms57012/qk/bsp.c index a99fb27f..8a20759e 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qk/bsp.c +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qk/bsp.c @@ -73,7 +73,7 @@ Q_DEFINE_THIS_FILE /* ISRs used in this project ===============================================*/ QK_IRQ_BEGIN(rtiCompare0) rtiREG1->INTFLAG = 1U; /* clear the interrutp source */ - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ QK_IRQ_END() /* BSP functions ===========================================================*/ diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.ewd b/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.ewd index 0e71b170..55042ab7 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.ewd +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.ewd @@ -1,4900 +1,4900 @@ - - - - 2 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 0 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - - + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.ewp b/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.ewp index 428d4900..deaf0096 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.ewp +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.ewp @@ -1,3080 +1,3077 @@ - - - - 2 - - Debug - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 24 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky.c - - - $PROJ_DIR$\..\..\blinky.h - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - - launchxl2-tms57012 - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\dabort.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\esm.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\exceptions.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\gio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\het.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\notification.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\pinmux.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\rti.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sci.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_core.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_intvecs.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_mpu.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pcr.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_phantom.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmm.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmu.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_selftest.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_startup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_vim.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\system.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - - + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 24 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky.c + + + $PROJ_DIR$\..\..\blinky.h + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + + launchxl2-tms57012 + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\dabort.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\esm.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\exceptions.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\gio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\het.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\notification.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\pinmux.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\rti.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sci.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_core.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_intvecs.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_mpu.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pcr.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_phantom.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmm.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmu.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_selftest.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_startup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_vim.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\system.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + + diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.eww b/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.eww index ac3c18a2..c9924856 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.eww +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\blinky-qk.ewp - - - - - + + + + + $WS_DIR$\blinky-qk.ewp + + + + + diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.icf b/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.icf index 3ea60c9c..46b1bf98 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.icf +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qk/iar/blinky-qk.icf @@ -1,46 +1,46 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000040; -define symbol __ICFEDIT_region_ROM_end__ = 0x0013FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x08000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x0802FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 0x1000; -define symbol __ICFEDIT_size_svcstack__ = 0x100; -define symbol __ICFEDIT_size_irqstack__ = 0; -define symbol __ICFEDIT_size_fiqstack__ = 0x100; -define symbol __ICFEDIT_size_undstack__ = 0x100; -define symbol __ICFEDIT_size_abtstack__ = 0x100; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define symbol __region_DRAM_start__ = 0x80000000; -define symbol __region_DRAM_end__ = 0x83FFFFFF; -define region DRAM_region = mem:[from __region_DRAM_start__ to __region_DRAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { }; -define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { }; -define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { }; -define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { }; -define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvecs }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK, - block UND_STACK, block ABT_STACK, block HEAP }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000040; +define symbol __ICFEDIT_region_ROM_end__ = 0x0013FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x08000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x0802FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x1000; +define symbol __ICFEDIT_size_svcstack__ = 0x100; +define symbol __ICFEDIT_size_irqstack__ = 0; +define symbol __ICFEDIT_size_fiqstack__ = 0x100; +define symbol __ICFEDIT_size_undstack__ = 0x100; +define symbol __ICFEDIT_size_abtstack__ = 0x100; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define symbol __region_DRAM_start__ = 0x80000000; +define symbol __region_DRAM_end__ = 0x83FFFFFF; +define region DRAM_region = mem:[from __region_DRAM_start__ to __region_DRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { }; +define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { }; +define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { }; +define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { }; +define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvecs }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK, + block UND_STACK, block ABT_STACK, block HEAP }; place in DRAM_region { section DRAM }; \ No newline at end of file diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qk/ti/.cproject b/examples/arm-cr/blinky_launchxl2-tms57012/qk/ti/.cproject index 09df5f11..cc17c548 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qk/ti/.cproject +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qk/ti/.cproject @@ -1,282 +1,282 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qk/ti/.project b/examples/arm-cr/blinky_launchxl2-tms57012/qk/ti/.project index d2588096..6d586f52 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qk/ti/.project +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qk/ti/.project @@ -1,75 +1,75 @@ - - - blinky-qk - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QK - 2 - PARENT-5-PROJECT_LOC/src/qk - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - blinky.c - 1 - PARENT-2-PROJECT_LOC/blinky.c - - - blinky.h - 1 - PARENT-2-PROJECT_LOC/blinky.h - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - launchxl2-tms57012 - 2 - PARENT-5-PROJECT_LOC/3rd_party/launchxl2-tms57012/ti/source - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - + + + blinky-qk + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QK + 2 + PARENT-5-PROJECT_LOC/src/qk + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + blinky.c + 1 + PARENT-2-PROJECT_LOC/blinky.c + + + blinky.h + 1 + PARENT-2-PROJECT_LOC/blinky.h + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + launchxl2-tms57012 + 2 + PARENT-5-PROJECT_LOC/3rd_party/launchxl2-tms57012/ti/source + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qv/bsp.c b/examples/arm-cr/blinky_launchxl2-tms57012/qv/bsp.c index 221c4c23..44ab55a3 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qv/bsp.c +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qv/bsp.c @@ -78,7 +78,7 @@ */ void rtiNotification(uint32 notification) { if (notification == rtiNOTIFICATION_COMPARE0) { - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ } } diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.ewd b/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.ewd index 0e71b170..55042ab7 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.ewd +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.ewd @@ -1,4900 +1,4900 @@ - - - - 2 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 0 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - - + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.ewp b/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.ewp index 356c9b75..71e99e47 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.ewp +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.ewp @@ -1,3074 +1,3071 @@ - - - - 2 - - Debug - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 24 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky.c - - - $PROJ_DIR$\..\..\blinky.h - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - - launchxl2-tms57012 - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\dabort.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\esm.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\exceptions.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\gio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\notification.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\pinmux.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\rti.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sci.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_core.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_intvecs.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_mpu.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pcr.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_phantom.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmm.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmu.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_selftest.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_startup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_vim.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\system.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qv_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - - + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 24 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky.c + + + $PROJ_DIR$\..\..\blinky.h + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + + launchxl2-tms57012 + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\dabort.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\esm.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\exceptions.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\gio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\notification.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\pinmux.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\rti.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sci.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_core.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_intvecs.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_mpu.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pcr.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_phantom.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmm.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmu.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_selftest.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_startup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_vim.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\system.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qv_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + + diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.eww b/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.eww index 109eebbd..fa7c7731 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.eww +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\blinky-qv.ewp - - - - - + + + + + $WS_DIR$\blinky-qv.ewp + + + + + diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.icf b/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.icf index 052d2969..31a2ad66 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.icf +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qv/iar/blinky-qv.icf @@ -1,46 +1,46 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000040; -define symbol __ICFEDIT_region_ROM_end__ = 0x0013FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x08000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x0802FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 0x1000; -define symbol __ICFEDIT_size_svcstack__ = 0x100; -define symbol __ICFEDIT_size_irqstack__ = 0x200; -define symbol __ICFEDIT_size_fiqstack__ = 0x100; -define symbol __ICFEDIT_size_undstack__ = 0x100; -define symbol __ICFEDIT_size_abtstack__ = 0x100; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define symbol __region_DRAM_start__ = 0x80000000; -define symbol __region_DRAM_end__ = 0x83FFFFFF; -define region DRAM_region = mem:[from __region_DRAM_start__ to __region_DRAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { }; -define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { }; -define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { }; -define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { }; -define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvecs }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK, - block UND_STACK, block ABT_STACK, block HEAP }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000040; +define symbol __ICFEDIT_region_ROM_end__ = 0x0013FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x08000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x0802FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x1000; +define symbol __ICFEDIT_size_svcstack__ = 0x100; +define symbol __ICFEDIT_size_irqstack__ = 0x200; +define symbol __ICFEDIT_size_fiqstack__ = 0x100; +define symbol __ICFEDIT_size_undstack__ = 0x100; +define symbol __ICFEDIT_size_abtstack__ = 0x100; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define symbol __region_DRAM_start__ = 0x80000000; +define symbol __region_DRAM_end__ = 0x83FFFFFF; +define region DRAM_region = mem:[from __region_DRAM_start__ to __region_DRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { }; +define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { }; +define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { }; +define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { }; +define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvecs }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK, + block UND_STACK, block ABT_STACK, block HEAP }; place in DRAM_region { section DRAM }; \ No newline at end of file diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qv/ti/.cproject b/examples/arm-cr/blinky_launchxl2-tms57012/qv/ti/.cproject index 74ae03ed..6c8f8668 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qv/ti/.cproject +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qv/ti/.cproject @@ -1,300 +1,300 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/arm-cr/blinky_launchxl2-tms57012/qv/ti/.project b/examples/arm-cr/blinky_launchxl2-tms57012/qv/ti/.project index a369372b..e46e3a2a 100644 --- a/examples/arm-cr/blinky_launchxl2-tms57012/qv/ti/.project +++ b/examples/arm-cr/blinky_launchxl2-tms57012/qv/ti/.project @@ -1,75 +1,75 @@ - - - blinky-qv - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - QV - 2 - PARENT-5-PROJECT_LOC/src/qv - - - blinky.c - 1 - PARENT-2-PROJECT_LOC/blinky.c - - - blinky.h - 1 - PARENT-2-PROJECT_LOC/blinky.h - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - launchxl2-tms57012 - 2 - PARENT-5-PROJECT_LOC/3rd_party/launchxl2-tms57012/ti/source - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - + + + blinky-qv + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + QV + 2 + PARENT-5-PROJECT_LOC/src/qv + + + blinky.c + 1 + PARENT-2-PROJECT_LOC/blinky.c + + + blinky.h + 1 + PARENT-2-PROJECT_LOC/blinky.h + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + launchxl2-tms57012 + 2 + PARENT-5-PROJECT_LOC/3rd_party/launchxl2-tms57012/ti/source + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/README.md b/examples/arm-cr/dpp_launchxl2-tms57012/README.md new file mode 100644 index 00000000..8a155d18 --- /dev/null +++ b/examples/arm-cr/dpp_launchxl2-tms57012/README.md @@ -0,0 +1,5 @@ +![LAUNCHXL2-TMS57012](../../../doxygen/images/bd_LAUNCHXL2-TMS57012.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/arm-cr_dpp_launchxl2-tms57012.html diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/dpp.h b/examples/arm-cr/dpp_launchxl2-tms57012/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/dpp.h +++ b/examples/arm-cr/dpp_launchxl2-tms57012/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/dpp.qm b/examples/arm-cr/dpp_launchxl2-tms57012/dpp.qm index 43ad83c4..08fafb97 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 @@ -119,7 +119,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -212,7 +212,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -235,7 +235,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -277,7 +277,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -288,7 +288,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/philo.c b/examples/arm-cr/dpp_launchxl2-tms57012/philo.c index 2210d649..9bc4c4f1 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/philo.c +++ b/examples/arm-cr/dpp_launchxl2-tms57012/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct Philo { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define THINK_TIME \ (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + (BSP_TICKS_PER_SEC/2U)) @@ -51,14 +64,16 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); /* helper macro to provide the ID of Philo "me_" */ #define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[0].super, &Philo_inst[1].super, @@ -66,9 +81,10 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ &Philo_inst[3].super, &Philo_inst[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,13 +94,15 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ Philo Philo_inst[N_PHILO]; -/*.${AOs::Philo::SM} .......................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -113,28 +131,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -142,7 +161,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -154,11 +173,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -166,9 +186,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -177,7 +197,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -191,30 +211,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -229,4 +250,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qk/bsp.c b/examples/arm-cr/dpp_launchxl2-tms57012/qk/bsp.c index 15f0d5a7..31545d23 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qk/bsp.c +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qk/bsp.c @@ -95,7 +95,7 @@ QK_IRQ_BEGIN(rtiCompare0) uint32_t tmp; rtiREG1->INTFLAG = 1U; /* clear the interrutp source */ - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -110,11 +110,11 @@ QK_IRQ_BEGIN(rtiCompare0) if ((tmp & (1U << SWB_PIN)) != 0U) { /* debounced SWB state changed? */ if ((buttons.depressed & (1U << SWB_PIN)) != 0U) { /* SWB depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_rtiCompare0); + QACTIVE_PUBLISH(&pauseEvt, &l_rtiCompare0); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_rtiCompare0); + QACTIVE_PUBLISH(&serveEvt, &l_rtiCompare0); } } QK_IRQ_END() diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.ewd b/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.ewd index 7c94f936..dc1d7bd0 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.ewd +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.ewd @@ -1,4459 +1,4459 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 32 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 1 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 32 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 0 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 32 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 1 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 32 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 1 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 32 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 0 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 32 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 1 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.ewp b/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.ewp index cedac81c..7837221f 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.ewp +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.ewp @@ -1,3347 +1,3344 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 23 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - launchxl2-tms57012 - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\dabort.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\esm.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\exceptions.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\gio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\notification.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\pinmux.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\rti.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sci.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_core.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_intvecs.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_mpu.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_phantom.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmu.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_selftest.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_startup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_vim.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\system.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 35 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + launchxl2-tms57012 + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\dabort.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\esm.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\exceptions.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\gio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\notification.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\pinmux.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\rti.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sci.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_core.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_intvecs.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_mpu.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_phantom.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmu.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_selftest.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_startup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_vim.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\system.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qk\iar\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.eww b/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.eww index b41c128d..c261124a 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.eww +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qk.ewp - - - - - + + + + + $WS_DIR$\dpp-qk.ewp + + + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.icf b/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.icf index 3ea60c9c..46b1bf98 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.icf +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qk/iar/dpp-qk.icf @@ -1,46 +1,46 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000040; -define symbol __ICFEDIT_region_ROM_end__ = 0x0013FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x08000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x0802FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 0x1000; -define symbol __ICFEDIT_size_svcstack__ = 0x100; -define symbol __ICFEDIT_size_irqstack__ = 0; -define symbol __ICFEDIT_size_fiqstack__ = 0x100; -define symbol __ICFEDIT_size_undstack__ = 0x100; -define symbol __ICFEDIT_size_abtstack__ = 0x100; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define symbol __region_DRAM_start__ = 0x80000000; -define symbol __region_DRAM_end__ = 0x83FFFFFF; -define region DRAM_region = mem:[from __region_DRAM_start__ to __region_DRAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { }; -define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { }; -define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { }; -define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { }; -define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvecs }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK, - block UND_STACK, block ABT_STACK, block HEAP }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000040; +define symbol __ICFEDIT_region_ROM_end__ = 0x0013FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x08000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x0802FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x1000; +define symbol __ICFEDIT_size_svcstack__ = 0x100; +define symbol __ICFEDIT_size_irqstack__ = 0; +define symbol __ICFEDIT_size_fiqstack__ = 0x100; +define symbol __ICFEDIT_size_undstack__ = 0x100; +define symbol __ICFEDIT_size_abtstack__ = 0x100; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define symbol __region_DRAM_start__ = 0x80000000; +define symbol __region_DRAM_end__ = 0x83FFFFFF; +define region DRAM_region = mem:[from __region_DRAM_start__ to __region_DRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { }; +define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { }; +define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { }; +define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { }; +define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvecs }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK, + block UND_STACK, block ABT_STACK, block HEAP }; place in DRAM_region { section DRAM }; \ No newline at end of file diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qk/ti/.cproject b/examples/arm-cr/dpp_launchxl2-tms57012/qk/ti/.cproject index 7b66e952..f33f0892 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qk/ti/.cproject +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qk/ti/.cproject @@ -1,281 +1,281 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qk/ti/.project b/examples/arm-cr/dpp_launchxl2-tms57012/qk/ti/.project index c1bee45b..f32613b8 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qk/ti/.project +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qk/ti/.project @@ -1,84 +1,84 @@ - - - dpp-qk - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QK - 2 - PARENT-5-PROJECT_LOC/src/qk - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - dpp.h - 1 - PARENT-2-PROJECT_LOC/dpp.h - - - launchxl2-tms57012 - 2 - PARENT-5-PROJECT_LOC/3rd_party/launchxl2-tms57012/ti/source - - - main.c - 1 - PARENT-1-PROJECT_LOC/main.c - - - philo.c - 1 - PARENT-2-PROJECT_LOC/philo.c - - - qstamp.c - 1 - PARENT-5-PROJECT_LOC/include/qstamp.c - - - table.c - 1 - PARENT-2-PROJECT_LOC/table.c - - - + + + dpp-qk + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QK + 2 + PARENT-5-PROJECT_LOC/src/qk + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + dpp.h + 1 + PARENT-2-PROJECT_LOC/dpp.h + + + launchxl2-tms57012 + 2 + PARENT-5-PROJECT_LOC/3rd_party/launchxl2-tms57012/ti/source + + + main.c + 1 + PARENT-1-PROJECT_LOC/main.c + + + philo.c + 1 + PARENT-2-PROJECT_LOC/philo.c + + + qstamp.c + 1 + PARENT-5-PROJECT_LOC/include/qstamp.c + + + table.c + 1 + PARENT-2-PROJECT_LOC/table.c + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qv/bsp.c b/examples/arm-cr/dpp_launchxl2-tms57012/qv/bsp.c index a53dc164..3b753c20 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qv/bsp.c +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qv/bsp.c @@ -100,7 +100,7 @@ void rtiNotification(uint32 notification) { uint32_t tmp; rtiREG1->INTFLAG = 1U; /* clear the interrutp source */ - QF_TICK_X(0U, (void *)0); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -115,11 +115,11 @@ void rtiNotification(uint32 notification) { if ((tmp & (1U << SWB_PIN)) != 0U) { /* debounced SWB state changed? */ if ((buttons.depressed & (1U << SWB_PIN)) != 0U) { /* SWB depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_rtiCompare0); + QACTIVE_PUBLISH(&pauseEvt, &l_rtiCompare0); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_rtiCompare0); + QACTIVE_PUBLISH(&serveEvt, &l_rtiCompare0); } } } diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.ewd b/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.ewd index 0e71b170..55042ab7 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.ewd +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.ewd @@ -1,4900 +1,4900 @@ - - - - 2 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 0 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 5 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - - + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\middleware\PercepioTraceExporter\PercepioTraceExportPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.ewp b/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.ewp index 99ce2575..4b1fcc57 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.ewp +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.ewp @@ -1,3071 +1,3068 @@ - - - - 2 - - Debug - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 24 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 24 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 17 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - launchxl2-tms57012 - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\dabort.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\esm.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\exceptions.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\gio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\notification.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\pinmux.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\rti.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sci.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_core.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_intvecs.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_mpu.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_phantom.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmu.asm - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_selftest.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_startup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_vim.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\system.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qv_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - - + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 24 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 24 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + launchxl2-tms57012 + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\dabort.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\esm.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\exceptions.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\gio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\notification.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\pinmux.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\rti.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sci.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_core.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_intvecs.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_mpu.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_phantom.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_pmu.asm + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_selftest.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_startup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\sys_vim.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\launchxl2-tms57012\iar\source\system.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qv_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\arm-cr\qv\iar\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.eww b/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.eww index 8999816a..b96f3f62 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.eww +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qv.ewp - - - - - + + + + + $WS_DIR$\dpp-qv.ewp + + + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.icf b/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.icf index 3ea60c9c..46b1bf98 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.icf +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qv/iar/dpp-qv.icf @@ -1,46 +1,46 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000040; -define symbol __ICFEDIT_region_ROM_end__ = 0x0013FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x08000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x0802FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 0x1000; -define symbol __ICFEDIT_size_svcstack__ = 0x100; -define symbol __ICFEDIT_size_irqstack__ = 0; -define symbol __ICFEDIT_size_fiqstack__ = 0x100; -define symbol __ICFEDIT_size_undstack__ = 0x100; -define symbol __ICFEDIT_size_abtstack__ = 0x100; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define symbol __region_DRAM_start__ = 0x80000000; -define symbol __region_DRAM_end__ = 0x83FFFFFF; -define region DRAM_region = mem:[from __region_DRAM_start__ to __region_DRAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { }; -define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { }; -define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { }; -define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { }; -define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvecs }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK, - block UND_STACK, block ABT_STACK, block HEAP }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000040; +define symbol __ICFEDIT_region_ROM_end__ = 0x0013FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x08000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x0802FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 0x1000; +define symbol __ICFEDIT_size_svcstack__ = 0x100; +define symbol __ICFEDIT_size_irqstack__ = 0; +define symbol __ICFEDIT_size_fiqstack__ = 0x100; +define symbol __ICFEDIT_size_undstack__ = 0x100; +define symbol __ICFEDIT_size_abtstack__ = 0x100; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define symbol __region_DRAM_start__ = 0x80000000; +define symbol __region_DRAM_end__ = 0x83FFFFFF; +define region DRAM_region = mem:[from __region_DRAM_start__ to __region_DRAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { }; +define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { }; +define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { }; +define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { }; +define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvecs }; + +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK, + block UND_STACK, block ABT_STACK, block HEAP }; place in DRAM_region { section DRAM }; \ No newline at end of file diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qv/ti/.cproject b/examples/arm-cr/dpp_launchxl2-tms57012/qv/ti/.cproject index 8f2d8cd2..83c3e740 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qv/ti/.cproject +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qv/ti/.cproject @@ -1,281 +1,281 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qv/ti/.project b/examples/arm-cr/dpp_launchxl2-tms57012/qv/ti/.project index 8bd9d433..e93a4299 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qv/ti/.project +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qv/ti/.project @@ -1,84 +1,84 @@ - - - dpp-qv - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - QV - 2 - PARENT-5-PROJECT_LOC/src/qv - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - dpp.h - 1 - PARENT-2-PROJECT_LOC/dpp.h - - - launchxl2-tms57012 - 2 - PARENT-5-PROJECT_LOC/3rd_party/launchxl2-tms57012/ti/source - - - main.c - 1 - PARENT-1-PROJECT_LOC/main.c - - - philo.c - 1 - PARENT-2-PROJECT_LOC/philo.c - - - qstamp.c - 1 - PARENT-5-PROJECT_LOC/include/qstamp.c - - - table.c - 1 - PARENT-2-PROJECT_LOC/table.c - - - + + + dpp-qv + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + QV + 2 + PARENT-5-PROJECT_LOC/src/qv + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + dpp.h + 1 + PARENT-2-PROJECT_LOC/dpp.h + + + launchxl2-tms57012 + 2 + PARENT-5-PROJECT_LOC/3rd_party/launchxl2-tms57012/ti/source + + + main.c + 1 + PARENT-1-PROJECT_LOC/main.c + + + philo.c + 1 + PARENT-2-PROJECT_LOC/philo.c + + + qstamp.c + 1 + PARENT-5-PROJECT_LOC/include/qstamp.c + + + table.c + 1 + PARENT-2-PROJECT_LOC/table.c + + + diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qview/qview-dpp.bat b/examples/arm-cr/dpp_launchxl2-tms57012/qview/qview-dpp.bat index 3ac56aa6..b36e43d6 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qview/qview-dpp.bat +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qview/qview-dpp.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp.py + +@endlocal diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/qview/qview-dpp1.bat b/examples/arm-cr/dpp_launchxl2-tms57012/qview/qview-dpp1.bat index e4180394..8bdb9ce5 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/qview/qview-dpp1.bat +++ b/examples/arm-cr/dpp_launchxl2-tms57012/qview/qview-dpp1.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp1.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp1.py + +@endlocal diff --git a/examples/arm-cr/dpp_launchxl2-tms57012/table.c b/examples/arm-cr/dpp_launchxl2-tms57012/table.c index 33f68997..778dc408 100644 --- a/examples/arm-cr/dpp_launchxl2-tms57012/table.c +++ b/examples/arm-cr/dpp_launchxl2-tms57012/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -42,25 +55,28 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) #define FREE ((uint8_t)0) #define USED ((uint8_t)1) -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::AO_Table} ........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &Table_inst.super; /* "opaque" pointer to Table AO */ -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { Table *me = &Table_inst; uint8_t n; @@ -72,13 +88,15 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ Table Table_inst; -/*.${AOs::Table::SM} .......................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -109,16 +127,17 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -131,11 +150,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -149,7 +169,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -157,7 +177,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -167,25 +187,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -209,7 +229,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -220,19 +240,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -244,28 +264,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -275,7 +296,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -300,4 +321,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/README.md b/examples/embos/arm-cm/dpp_nucleo-h743zi/README.md new file mode 100644 index 00000000..61a9b134 --- /dev/null +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/README.md @@ -0,0 +1,5 @@ +![STM32 NUCLEO-H743ZI Q](../../../../doxygen/images/bd_NUCLEO-H743ZI.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/embos_dpp_nucleo-h743zi.html diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/bsp.c b/examples/embos/arm-cm/dpp_nucleo-h743zi/bsp.c index ec214668..a189ef7b 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/bsp.c +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/bsp.c @@ -89,7 +89,7 @@ static void tick_handler(void) { /* signature of embOS tick hook routine */ /* scale down the 1000Hz embOS tick to the desired BSP_TICKS_PER_SEC */ if (--ctr == 0U) { ctr = 1000U/BSP_TICKS_PER_SEC; - QF_TICK_X(0U, &l_embos_ticker); + QTIMEEVT_TICK_X(0U, &l_embos_ticker); /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -104,11 +104,11 @@ static void tick_handler(void) { /* signature of embOS tick hook routine */ if (tmp != 0U) { /* debounced Key button state changed? */ if (buttons.depressed != 0U) { /* PB0 depressed?*/ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&pauseEvt, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_SysTick_Handler); + QACTIVE_PUBLISH(&serveEvt, &l_SysTick_Handler); } } } diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.h b/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.h +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.qm b/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.qm index 5b1603f1..37fa5e83 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.qm +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -116,7 +115,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -210,7 +209,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -233,7 +232,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -275,7 +274,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -286,7 +285,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/gnu/Makefile b/examples/embos/arm-cm/dpp_nucleo-h743zi/gnu/Makefile index 7e70a227..9d153705 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/gnu/Makefile +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-H743ZI, embOS RTOS, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2022-02-28 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = \ -I../.. \ -ISEGGER \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/embOS-gnu/Start/Inc \ -I$(QPC)/3rd_party/CMSIS/Include \ 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 cbdc583d..1defef89 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp @@ -341,7 +341,6 @@ $PROJ_DIR$\SEGGER $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\embos $PROJ_DIR$\..\..\..\..\..\3rd_party\embOS-iar\Start\Inc $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include @@ -1401,7 +1400,6 @@ $PROJ_DIR$\SEGGER $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\embos $PROJ_DIR$\..\..\..\..\..\3rd_party\embOS-iar\Start\Inc $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include @@ -2462,7 +2460,6 @@ $PROJ_DIR$\SEGGER $PROJ_DIR$\..\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\embos $PROJ_DIR$\..\..\..\..\..\3rd_party\embOS-iar\Start\Inc $PROJ_DIR$\..\..\..\..\..\3rd_party\CMSIS\Include diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/philo.c b/examples/embos/arm-cm/dpp_nucleo-h743zi/philo.c index e6c85eb9..9bf65092 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/philo.c +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -61,14 +74,16 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ }; /* Philo definition --------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,12 +93,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +129,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -141,7 +159,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -153,11 +171,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -165,9 +184,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -176,7 +195,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -190,30 +209,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -228,4 +248,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/embos/arm-cm/dpp_nucleo-h743zi/table.c b/examples/embos/arm-cm/dpp_nucleo-h743zi/table.c index 39d09a9e..d10b8d5e 100644 --- a/examples/embos/arm-cm/dpp_nucleo-h743zi/table.c +++ b/examples/embos/arm-cm/dpp_nucleo-h743zi/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -53,14 +66,16 @@ static Table l_table; /* the single instance of the Table active object */ QActive * const AO_Table = &l_table.super; /* "opaque" AO pointer */ /*..........................................................................*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -72,12 +87,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -108,16 +125,17 @@ static QState Table_initial(Table * const me, void const * const par) { } return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -130,11 +148,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -148,7 +167,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -156,7 +175,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -166,25 +185,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -208,7 +227,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -219,19 +238,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -243,28 +262,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -274,7 +294,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -299,4 +319,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/emwin/demo_no_wm/bsp.c b/examples/emwin/demo_no_wm/bsp.c index c4c04efc..bae5d24b 100644 --- a/examples/emwin/demo_no_wm/bsp.c +++ b/examples/emwin/demo_no_wm/bsp.c @@ -99,7 +99,7 @@ void QF_onCleanup(void) { } /*..........................................................................*/ void QF_onClockTick(void) { - QF_TICK(&l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* QF clock tick processing */ } /*..........................................................................*/ diff --git a/examples/emwin/demo_no_wm/demo_no_wm.sln b/examples/emwin/demo_no_wm/demo_no_wm.sln index f99440f4..5ac9bc81 100644 --- a/examples/emwin/demo_no_wm/demo_no_wm.sln +++ b/examples/emwin/demo_no_wm/demo_no_wm.sln @@ -1,24 +1,24 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29709.97 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_no_wm", "demo_no_wm.vcxproj", "{5A1F2953-14F0-4676-8E36-1C759C4AE2A1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Debug|Win32.ActiveCfg = Debug|Win32 - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Debug|Win32.Build.0 = Debug|Win32 - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Release|Win32.ActiveCfg = Release|Win32 - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {0B2739F7-EC74-4A06-AA74-9C33F52AD9BA} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_no_wm", "demo_no_wm.vcxproj", "{5A1F2953-14F0-4676-8E36-1C759C4AE2A1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Debug|Win32.Build.0 = Debug|Win32 + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Release|Win32.ActiveCfg = Release|Win32 + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0B2739F7-EC74-4A06-AA74-9C33F52AD9BA} + EndGlobalSection +EndGlobal diff --git a/examples/emwin/demo_no_wm/demo_no_wm.vcxproj b/examples/emwin/demo_no_wm/demo_no_wm.vcxproj index 3b6ce30f..a48fcd27 100644 --- a/examples/emwin/demo_no_wm/demo_no_wm.vcxproj +++ b/examples/emwin/demo_no_wm/demo_no_wm.vcxproj @@ -1,250 +1,250 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - QSpy - Win32 - - - - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1} - 10.0 - - - - Application - v142 - false - MultiByte - - - Application - v142 - false - MultiByte - - - Application - v142 - false - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.60610.1 - - - .\Release\ - .\Release\ - false - - - .\Debug\ - .\Debug\ - false - - - .\QSpy\ - .\QSpy\ - false - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/demo_no_wm.tlb - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreaded - true - .\Release/demo_no_wm.pch - .\Release/ - .\Release/ - .\Release/ - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) - .\Release/demo_no_wm.exe - true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) - false - .\Release/demo_no_wm.pdb - true - .\Release/demo_no_wm.map - Windows - false - - MachineX86 - false - LIBC.lib;LIBCMTD.lib - - - true - .\Release/demo_no_wm.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/demo_no_wm.tlb - - - - Disabled - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - Default - MultiThreadedDebug - .\Debug/demo_no_wm.pch - .\Debug/ - .\Debug/ - .\Debug/ - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) - .\Debug/demo_no_wm.exe - true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) - false - true - .\Debug/demo_no_wm.pdb - true - .\Debug/demo_no_wm.map - Windows - false - - MachineX86 - false - LIBC.lib;LIBCMTD.lib - - - true - .\Debug/demo_no_wm.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\QSpy/demo_no_wm.tlb - - - - Disabled - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;Q_SPY;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreaded - .\QSpy/demo_no_wm.pch - .\QSpy/ - .\QSpy/ - .\QSpy/ - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;ws2_32.lib;%(AdditionalDependencies) - .\QSpy/demo_no_wm.exe - true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) - false - true - .\QSpy/demo_no_wm.pdb - true - .\QSpy/demo_no_wm.map - Windows - false - - MachineX86 - false - LIBC.lib;LIBCMTD.lib - - - true - .\QSpy/demo_no_wm.bsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + QSpy + Win32 + + + + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1} + 10.0 + + + + Application + v142 + false + MultiByte + + + Application + v142 + false + MultiByte + + + Application + v142 + false + MultiByte + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>11.0.60610.1 + + + .\Release\ + .\Release\ + false + + + .\Debug\ + .\Debug\ + false + + + .\QSpy\ + .\QSpy\ + false + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/demo_no_wm.tlb + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/demo_no_wm.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) + .\Release/demo_no_wm.exe + true + ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + false + .\Release/demo_no_wm.pdb + true + .\Release/demo_no_wm.map + Windows + false + + MachineX86 + false + LIBC.lib;LIBCMTD.lib + + + true + .\Release/demo_no_wm.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/demo_no_wm.tlb + + + + Disabled + ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + Default + MultiThreadedDebug + .\Debug/demo_no_wm.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) + .\Debug/demo_no_wm.exe + true + ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + false + true + .\Debug/demo_no_wm.pdb + true + .\Debug/demo_no_wm.map + Windows + false + + MachineX86 + false + LIBC.lib;LIBCMTD.lib + + + true + .\Debug/demo_no_wm.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\QSpy/demo_no_wm.tlb + + + + Disabled + ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;Q_SPY;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreaded + .\QSpy/demo_no_wm.pch + .\QSpy/ + .\QSpy/ + .\QSpy/ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;ws2_32.lib;%(AdditionalDependencies) + .\QSpy/demo_no_wm.exe + true + ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + false + true + .\QSpy/demo_no_wm.pdb + true + .\QSpy/demo_no_wm.map + Windows + false + + MachineX86 + false + LIBC.lib;LIBCMTD.lib + + + true + .\QSpy/demo_no_wm.bsc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/emwin/demo_no_wm/demo_no_wm.vcxproj.filters b/examples/emwin/demo_no_wm/demo_no_wm.vcxproj.filters index 37a970ba..a653b0b9 100644 --- a/examples/emwin/demo_no_wm/demo_no_wm.vcxproj.filters +++ b/examples/emwin/demo_no_wm/demo_no_wm.vcxproj.filters @@ -1,80 +1,80 @@ - - - - - {39b51785-bb27-4d42-b439-073a1a9a910b} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {016d9e72-83bc-45de-a3be-7a1ddadcf0d0} - h;hpp;hxx;hm;inl - - - {e2b2644d-3a90-49b2-907a-2c90edbd53d5} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {edb4bdd4-7822-4812-b677-b21cb00121b0} - *.lib - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - emWin - - - emWin - - - emWin - - - Source Files - - - - - Header Files - - - Header Files - - - emWin - - - emWin - - - - - Resource Files - - - - - emWin - - - emWin - - + + + + + {39b51785-bb27-4d42-b439-073a1a9a910b} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {016d9e72-83bc-45de-a3be-7a1ddadcf0d0} + h;hpp;hxx;hm;inl + + + {e2b2644d-3a90-49b2-907a-2c90edbd53d5} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + {edb4bdd4-7822-4812-b677-b21cb00121b0} + *.lib + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + emWin + + + emWin + + + emWin + + + Source Files + + + + + Header Files + + + Header Files + + + emWin + + + emWin + + + + + Resource Files + + + + + emWin + + + emWin + + \ No newline at end of file diff --git a/examples/emwin/demo_no_wm/philo.c b/examples/emwin/demo_no_wm/philo.c index e7e6797c..6e41fcf7 100644 --- a/examples/emwin/demo_no_wm/philo.c +++ b/examples/emwin/demo_no_wm/philo.c @@ -159,7 +159,7 @@ QState Philo_eating(Philo *me, QEvt const *e) { case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); return Q_HANDLED(); } case TIMEOUT_SIG: { diff --git a/examples/emwin/demo_no_wm/table.c b/examples/emwin/demo_no_wm/table.c index 460b8d51..c94e9e93 100644 --- a/examples/emwin/demo_no_wm/table.c +++ b/examples/emwin/demo_no_wm/table.c @@ -231,7 +231,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->fork[LEFT(n)] = me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); me->isHungry[n] = 0; displyPhilStat(n, "eating "); } @@ -247,7 +247,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->fork[m] = me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); displyPhilStat(n, "eating "); } else { @@ -266,7 +266,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->isHungry[m] = 0; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); displyPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -276,7 +276,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->isHungry[m] = 0; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); displyPhilStat(m, "eating "); } return Q_HANDLED(); diff --git a/examples/emwin/demo_with_wm/bsp.c b/examples/emwin/demo_with_wm/bsp.c index 28456725..cbbd3475 100644 --- a/examples/emwin/demo_with_wm/bsp.c +++ b/examples/emwin/demo_with_wm/bsp.c @@ -99,7 +99,7 @@ void QF_onCleanup(void) { } /*..........................................................................*/ void QF_onClockTick(void) { - QF_TICK(&l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* QF clock tick processing */ } /*..........................................................................*/ diff --git a/examples/emwin/demo_with_wm/demo_with_wm.sln b/examples/emwin/demo_with_wm/demo_with_wm.sln index 563bbeab..5ac5191b 100644 --- a/examples/emwin/demo_with_wm/demo_with_wm.sln +++ b/examples/emwin/demo_with_wm/demo_with_wm.sln @@ -1,24 +1,24 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29709.97 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_with_wm", "demo_with_wm.vcxproj", "{5A1F2953-14F0-4676-8E36-1C759C4AE2A1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Debug|Win32.ActiveCfg = Debug|Win32 - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Debug|Win32.Build.0 = Debug|Win32 - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Release|Win32.ActiveCfg = Release|Win32 - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {0B2739F7-EC74-4A06-AA74-9C33F52AD9BA} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_with_wm", "demo_with_wm.vcxproj", "{5A1F2953-14F0-4676-8E36-1C759C4AE2A1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Debug|Win32.Build.0 = Debug|Win32 + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Release|Win32.ActiveCfg = Release|Win32 + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0B2739F7-EC74-4A06-AA74-9C33F52AD9BA} + EndGlobalSection +EndGlobal diff --git a/examples/emwin/demo_with_wm/demo_with_wm.vcxproj b/examples/emwin/demo_with_wm/demo_with_wm.vcxproj index 2d3a24c0..e1394af1 100644 --- a/examples/emwin/demo_with_wm/demo_with_wm.vcxproj +++ b/examples/emwin/demo_with_wm/demo_with_wm.vcxproj @@ -1,250 +1,250 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - QSpy - Win32 - - - - {5A1F2953-14F0-4676-8E36-1C759C4AE2A1} - 10.0 - - - - Application - v142 - false - MultiByte - - - Application - v142 - false - MultiByte - - - Application - v142 - false - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.60610.1 - - - .\Release\ - .\Release\ - false - - - .\Debug\ - .\Debug\ - false - - - .\QSpy\ - .\QSpy\ - false - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/demo_with_wm.tlb - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreaded - true - .\Release/demo_with_wm.pch - .\Release/ - .\Release/ - .\Release/ - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) - .\Release/demo_with_wm.exe - true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) - false - .\Release/demo_with_wm.pdb - true - .\Release/demo_with_wm.map - Windows - false - - MachineX86 - false - LIBC.lib;LIBCMTD.lib - - - true - .\Release/demo_with_wm.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/demo_with_wm.tlb - - - - Disabled - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - Default - MultiThreadedDebug - .\Debug/demo_with_wm.pch - .\Debug/ - .\Debug/ - .\Debug/ - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) - .\Debug/demo_with_wm.exe - true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) - false - true - .\Debug/demo_with_wm.pdb - true - .\Debug/demo_with_wm.map - Windows - false - - MachineX86 - false - LIBC.lib;LIBCMTD.lib - - - true - .\Debug/demo_with_wm.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\QSpy/demo_with_wm.tlb - - - - Disabled - ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;Q_SPY;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreaded - .\QSpy/demo_with_wm.pch - .\QSpy/ - .\QSpy/ - .\QSpy/ - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;ws2_32.lib;%(AdditionalDependencies) - .\QSpy/demo_with_wm.exe - true - ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) - false - true - .\QSpy/demo_with_wm.pdb - true - .\QSpy/demo_with_wm.map - Windows - false - - MachineX86 - false - LIBC.lib;LIBCMTD.lib - - - true - .\QSpy/demo_with_wm.bsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + QSpy + Win32 + + + + {5A1F2953-14F0-4676-8E36-1C759C4AE2A1} + 10.0 + + + + Application + v142 + false + MultiByte + + + Application + v142 + false + MultiByte + + + Application + v142 + false + MultiByte + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>11.0.60610.1 + + + .\Release\ + .\Release\ + false + + + .\Debug\ + .\Debug\ + false + + + .\QSpy\ + .\QSpy\ + false + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/demo_with_wm.tlb + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/demo_with_wm.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) + .\Release/demo_with_wm.exe + true + ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + false + .\Release/demo_with_wm.pdb + true + .\Release/demo_with_wm.map + Windows + false + + MachineX86 + false + LIBC.lib;LIBCMTD.lib + + + true + .\Release/demo_with_wm.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/demo_with_wm.tlb + + + + Disabled + ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + Default + MultiThreadedDebug + .\Debug/demo_with_wm.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies) + .\Debug/demo_with_wm.exe + true + ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + false + true + .\Debug/demo_with_wm.pdb + true + .\Debug/demo_with_wm.map + Windows + false + + MachineX86 + false + LIBC.lib;LIBCMTD.lib + + + true + .\Debug/demo_with_wm.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\QSpy/demo_with_wm.tlb + + + + Disabled + ..\..\..\include;..\..\..\ports\win32;.\Config;..\..\..\3rd_party\emWin\GUI\Include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;Q_SPY;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreaded + .\QSpy/demo_with_wm.pch + .\QSpy/ + .\QSpy/ + .\QSpy/ + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + qp.lib;legacy_stdio_definitions.lib;ws2_32.lib;winmm.lib;libcmt.lib;ws2_32.lib;%(AdditionalDependencies) + .\QSpy/demo_with_wm.exe + true + ..\..\..\ports\win32\$(Configuration);%(AdditionalLibraryDirectories) + false + true + .\QSpy/demo_with_wm.pdb + true + .\QSpy/demo_with_wm.map + Windows + false + + MachineX86 + false + LIBC.lib;LIBCMTD.lib + + + true + .\QSpy/demo_with_wm.bsc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/emwin/demo_with_wm/demo_with_wm.vcxproj.filters b/examples/emwin/demo_with_wm/demo_with_wm.vcxproj.filters index 37a970ba..a653b0b9 100644 --- a/examples/emwin/demo_with_wm/demo_with_wm.vcxproj.filters +++ b/examples/emwin/demo_with_wm/demo_with_wm.vcxproj.filters @@ -1,80 +1,80 @@ - - - - - {39b51785-bb27-4d42-b439-073a1a9a910b} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {016d9e72-83bc-45de-a3be-7a1ddadcf0d0} - h;hpp;hxx;hm;inl - - - {e2b2644d-3a90-49b2-907a-2c90edbd53d5} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {edb4bdd4-7822-4812-b677-b21cb00121b0} - *.lib - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - emWin - - - emWin - - - emWin - - - Source Files - - - - - Header Files - - - Header Files - - - emWin - - - emWin - - - - - Resource Files - - - - - emWin - - - emWin - - + + + + + {39b51785-bb27-4d42-b439-073a1a9a910b} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {016d9e72-83bc-45de-a3be-7a1ddadcf0d0} + h;hpp;hxx;hm;inl + + + {e2b2644d-3a90-49b2-907a-2c90edbd53d5} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + {edb4bdd4-7822-4812-b677-b21cb00121b0} + *.lib + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + emWin + + + emWin + + + emWin + + + Source Files + + + + + Header Files + + + Header Files + + + emWin + + + emWin + + + + + Resource Files + + + + + emWin + + + emWin + + \ No newline at end of file diff --git a/examples/emwin/demo_with_wm/philo.c b/examples/emwin/demo_with_wm/philo.c index e7e6797c..6e41fcf7 100644 --- a/examples/emwin/demo_with_wm/philo.c +++ b/examples/emwin/demo_with_wm/philo.c @@ -159,7 +159,7 @@ QState Philo_eating(Philo *me, QEvt const *e) { case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); return Q_HANDLED(); } case TIMEOUT_SIG: { diff --git a/examples/emwin/demo_with_wm/table.c b/examples/emwin/demo_with_wm/table.c index 3166b0af..54d6808b 100644 --- a/examples/emwin/demo_with_wm/table.c +++ b/examples/emwin/demo_with_wm/table.c @@ -257,7 +257,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->fork[LEFT(n)] = me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); me->isHungry[n] = 0; displyPhilStat(n, "eating "); } @@ -273,7 +273,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->fork[m] = me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); displyPhilStat(n, "eating "); } else { @@ -292,7 +292,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->isHungry[m] = 0; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); displyPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -302,7 +302,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->isHungry[m] = 0; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); displyPhilStat(m, "eating "); } return Q_HANDLED(); diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/FreeRTOSConfig.h b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/FreeRTOSConfig.h index 46ea2dfa..473ef386 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/FreeRTOSConfig.h +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/FreeRTOSConfig.h @@ -75,8 +75,8 @@ /* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */ -#define INCLUDE_vTaskPrioritySet 0 -#define INCLUDE_uxTaskPriorityGet 0 +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_uxTaskPriorityGet 1 #define INCLUDE_vTaskDelete 1 #define INCLUDE_vTaskCleanUpResources 0 #define INCLUDE_vTaskSuspend 0 diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/README.md b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/README.md new file mode 100644 index 00000000..f8adddda --- /dev/null +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/README.md @@ -0,0 +1,5 @@ +![EK-TM4C123GXL](../../../../doxygen/images/bd_EK-TM4C123GXL.jpg) + +Documentation for this example is available in the QP/C Manual at: + +- https://www.state-machine.com/qpc/freertos_dpp_ek-tm4c123gxl.html diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvoptx b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvoptx new file mode 100644 index 00000000..588bd5aa --- /dev/null +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvoptx @@ -0,0 +1,1071 @@ + + + + 1.0 + +
    ### uVision Project, (C) Keil Software
    + + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc; *.md + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + dpp-dbg + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 1 + 0 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\dbg\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 4 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 19 + + + + + + + + + + + BIN\lmidk-agdi.dll + + + + 0 + ARMRTXEVENTFLAGS + -L70 -Z18 -C0 -M0 -T1 + + + 0 + UL2CM3 + UL2CM3(-O207 -S0 -C0 -FO7 -FN1 -FC1000 -FD20000000 -FF0TM4C123_256 -FL040000 -FS00 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM) + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + lmidk-agdi + -U0E2006F4 -O4622 -S4 -FO61 + + + + + + 0 + 1 + OSTCBPrioTbl + + + + + 1 + 2 + 0x20000200 + 0 + + + + + 2 + 0 + 0x400 + 0 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + + + + dpp-rel + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 1 + 0 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\rel\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 0 + + 4 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 19 + + + + + + + + + + + BIN\lmidk-agdi.dll + + + + 0 + ARMRTXEVENTFLAGS + -L70 -Z18 -C0 -M0 -T1 + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + lmidk-agdi + -U0E10259B -O4622 -S4 -FO61 + + + 0 + UL2CM3 + -O207 -S0 -C0 -FO7 -FN1 -FC1000 -FD20000000 -FF0TM4C123_256 -FL040000 -FS00 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM) + + + + + + 1 + 2 + 0x20000200 + 0 + + + + + 2 + 0 + 0x400 + 0 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + + + + dpp-spy + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 1 + 0 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\spy\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 0 + + 4 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 19 + + + + + + + + + + + BIN\lmidk-agdi.dll + + + + 0 + ARMRTXEVENTFLAGS + -L70 -Z18 -C0 -M0 -T1 + + + 0 + UL2CM3 + UL2CM3(-O207 -S0 -C0 -FO7 -FN1 -FC1000 -FD20000000 -FF0TM4C123_256 -FL040000 -FS00 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM) + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + lmidk-agdi + -U0E2006F4 -O4622 -S4 -FO61 + + + + + + 1 + 2 + 0x20000200 + 0 + + + + + 2 + 0 + 0x400 + 0 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + + + + Applicatioin + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + ..\bsp.c + bsp.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\..\..\..\..\include\qstamp.c + qstamp.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\main.c + main.c + 0 + 0 + + + 1 + 4 + 5 + 0 + 0 + 0 + ..\dpp.h + dpp.h + 0 + 0 + + + 1 + 5 + 5 + 0 + 0 + 0 + ..\bsp.h + bsp.h + 0 + 0 + + + 1 + 6 + 1 + 0 + 0 + 0 + ..\philo.c + philo.c + 0 + 0 + + + 1 + 7 + 1 + 0 + 0 + 0 + ..\table.c + table.c + 0 + 0 + + + + + ek-tm4c123gxl + 1 + 0 + 0 + 0 + + 2 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + system_TM4C123GH6PM.c + 0 + 0 + + + 2 + 9 + 5 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + TM4C123GH6PM.h + 0 + 0 + + + 2 + 10 + 5 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h + gpio.h + 0 + 0 + + + 2 + 11 + 5 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h + rom.h + 0 + 0 + + + 2 + 12 + 5 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h + sysctl.h + 0 + 0 + + + 2 + 13 + 5 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + system_TM4C123GH6PM.h + 0 + 0 + + + 2 + 14 + 2 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s + startup_TM4C123GH6PM.s + 0 + 0 + + + + + QP + 1 + 0 + 0 + 0 + + 3 + 15 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qep_hsm.c + qep_hsm.c + 0 + 0 + + + 3 + 16 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qep_msm.c + qep_msm.c + 0 + 0 + + + 3 + 17 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_act.c + qf_act.c + 0 + 0 + + + 3 + 18 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_defer.c + qf_defer.c + 0 + 0 + + + 3 + 19 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_dyn.c + qf_dyn.c + 0 + 0 + + + 3 + 20 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_ps.c + qf_ps.c + 0 + 0 + + + 3 + 21 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_qact.c + qf_qact.c + 0 + 0 + + + 3 + 22 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_qeq.c + qf_qeq.c + 0 + 0 + + + 3 + 23 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_qmact.c + qf_qmact.c + 0 + 0 + + + 3 + 24 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_time.c + qf_time.c + 0 + 0 + + + 3 + 25 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_mem.c + qf_mem.c + 0 + 0 + + + + + QP_port + 1 + 0 + 0 + 0 + + 4 + 26 + 1 + 0 + 0 + 0 + ..\..\..\..\..\ports\freertos\qf_port.c + qf_port.c + 0 + 0 + + + 4 + 27 + 5 + 0 + 0 + 0 + ..\..\..\..\..\ports\freertos\qf_port.h + qf_port.h + 0 + 0 + + + 4 + 28 + 5 + 0 + 0 + 0 + ..\..\..\..\..\ports\freertos\qs_port.h + qs_port.h + 0 + 0 + + + + + QS + 1 + 0 + 0 + 0 + + 5 + 29 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qs\qs.c + qs.c + 0 + 0 + + + 5 + 30 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qs\qs_64bit.c + qs_64bit.c + 0 + 0 + + + 5 + 31 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qs\qs_fp.c + qs_fp.c + 0 + 0 + + + 5 + 32 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qs\qs_rx.c + qs_rx.c + 0 + 0 + + + + + FreeRTOS + 1 + 0 + 0 + 0 + + 6 + 33 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + list.c + 0 + 0 + + + 6 + 34 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + queue.c + 0 + 0 + + + 6 + 35 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + tasks.c + 0 + 0 + + + + + FreeRTOS_port + 1 + 0 + 0 + 0 + + 7 + 36 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c + port.c + 0 + 0 + + + +
    diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvprojx b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvprojx new file mode 100644 index 00000000..fda42d58 --- /dev/null +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvprojx @@ -0,0 +1,1928 @@ + + + + 2.1 + +
    ### uVision Project, (C) Keil Software
    + + + + dpp-dbg + 0x4 + ARM-ADS + 6160000::V6.16::ARMCLANG + 1 + + + TM4C123GH6PM + Texas Instruments + Keil.TM4C_DFP.1.1.0 + http://www.keil.com/pack/ + IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM)) + 0 + $$Device:TM4C123GH6PM$Device\Include\TM4C123\TM4C123.h + + + + + + + + + + $$Device:TM4C123GH6PM$SVD\TM4C123\TM4C123GH6PM.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\dbg\ + dpp + 1 + 0 + 0 + 1 + 1 + .\dbg\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 1 + 0 + cmd /c "del .\dbg\qstamp.o" + + 0 + 0 + 0 + 0 + + + 1 + 0 + fromelf --bin --output .\dbg\dpp.bin .\dbg\dpp.axf + + 0 + 0 + 0 + 0 + + 1 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4097 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 1 + 0x0 + 0x40000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x40000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 0 + 0x0 + 0x0 + + + + + + 0 + 7 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 3 + 0 + 1 + 1 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + + + __FPU_PRESENT + + ..;..\..\..\..\..\include;..\..\..\..\..\ports\freertos;..\..\..\..\..\3rd_party\FreeRTOS\Source\include;..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM4F;..\..\..\..\..\3rd_party\ek-tm4c123gxl;..\..\..\..\..\3rd_party\CMSIS\Include + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 4 + + + Stack_Size=1024 Heap_Size=16 + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x00000000 + 0x20000000 + + + + + --entry Reset_Handler + + + + + + + + Applicatioin + + + bsp.c + 1 + ..\bsp.c + + + qstamp.c + 1 + ..\..\..\..\..\include\qstamp.c + + + main.c + 1 + ..\main.c + + + dpp.h + 5 + ..\dpp.h + + + bsp.h + 5 + ..\bsp.h + + + philo.c + 1 + ..\philo.c + + + table.c + 1 + ..\table.c + + + + + ek-tm4c123gxl + + + system_TM4C123GH6PM.c + 1 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + TM4C123GH6PM.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + gpio.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h + + + rom.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h + + + sysctl.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h + + + system_TM4C123GH6PM.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + startup_TM4C123GH6PM.s + 2 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s + + + + + QP + + + qep_hsm.c + 1 + ..\..\..\..\..\src\qf\qep_hsm.c + + + qep_msm.c + 1 + ..\..\..\..\..\src\qf\qep_msm.c + + + qf_act.c + 1 + ..\..\..\..\..\src\qf\qf_act.c + + + qf_defer.c + 1 + ..\..\..\..\..\src\qf\qf_defer.c + + + qf_dyn.c + 1 + ..\..\..\..\..\src\qf\qf_dyn.c + + + qf_ps.c + 1 + ..\..\..\..\..\src\qf\qf_ps.c + + + qf_qact.c + 1 + ..\..\..\..\..\src\qf\qf_qact.c + + + qf_qeq.c + 1 + ..\..\..\..\..\src\qf\qf_qeq.c + + + qf_qmact.c + 1 + ..\..\..\..\..\src\qf\qf_qmact.c + + + qf_time.c + 1 + ..\..\..\..\..\src\qf\qf_time.c + + + qf_mem.c + 1 + ..\..\..\..\..\src\qf\qf_mem.c + + + + + QP_port + + + qf_port.c + 1 + ..\..\..\..\..\ports\freertos\qf_port.c + + + qf_port.h + 5 + ..\..\..\..\..\ports\freertos\qf_port.h + + + qs_port.h + 5 + ..\..\..\..\..\ports\freertos\qs_port.h + + + + + QS + + + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + + + + + + + + + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + + + + + + + + + + + + qs.c + 1 + ..\..\..\..\..\src\qs\qs.c + + + qs_64bit.c + 1 + ..\..\..\..\..\src\qs\qs_64bit.c + + + qs_fp.c + 1 + ..\..\..\..\..\src\qs\qs_fp.c + + + qs_rx.c + 1 + ..\..\..\..\..\src\qs\qs_rx.c + + + + + FreeRTOS + + + list.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + + + queue.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + + + tasks.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + + + + + FreeRTOS_port + + + port.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c + + + + + + + dpp-rel + 0x4 + ARM-ADS + 6160000::V6.16::ARMCLANG + 1 + + + TM4C123GH6PM + Texas Instruments + Keil.TM4C_DFP.1.1.0 + http://www.keil.com/pack/ + IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM)) + 0 + $$Device:TM4C123GH6PM$Device\Include\TM4C123\TM4C123.h + + + + + + + + + + $$Device:TM4C123GH6PM$SVD\TM4C123\TM4C123GH6PM.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\rel\ + dpp + 1 + 0 + 0 + 0 + 0 + .\rel\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 1 + 0 + cmd /c "del .\rel\qstamp.o" + + 0 + 0 + 0 + 0 + + + 1 + 0 + fromelf --bin --output .\rel\dpp.bin .\rel\dpp.axf + + 0 + 0 + 0 + 0 + + 1 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4097 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 1 + 0x0 + 0x40000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x40000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 0 + 0x0 + 0x0 + + + + + + 0 + 7 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 3 + 0 + 1 + 1 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + + + NDEBUG __FPU_PRESENT + + ..;..\..\..\..\..\include;..\..\..\..\..\ports\freertos;..\..\..\..\..\3rd_party\FreeRTOS\Source\include;..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM4F;..\..\..\..\..\3rd_party\ek-tm4c123gxl;..\..\..\..\..\3rd_party\CMSIS\Include + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 4 + + + Stack_Size=1024 Heap_Size=16 + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x00000000 + 0x20000000 + + dpp-qv.sct + + + --entry Reset_Handler + + + + + + + + Applicatioin + + + bsp.c + 1 + ..\bsp.c + + + qstamp.c + 1 + ..\..\..\..\..\include\qstamp.c + + + main.c + 1 + ..\main.c + + + dpp.h + 5 + ..\dpp.h + + + bsp.h + 5 + ..\bsp.h + + + philo.c + 1 + ..\philo.c + + + table.c + 1 + ..\table.c + + + + + ek-tm4c123gxl + + + system_TM4C123GH6PM.c + 1 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + TM4C123GH6PM.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + gpio.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h + + + rom.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h + + + sysctl.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h + + + system_TM4C123GH6PM.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + startup_TM4C123GH6PM.s + 2 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s + + + + + QP + + + qep_hsm.c + 1 + ..\..\..\..\..\src\qf\qep_hsm.c + + + qep_msm.c + 1 + ..\..\..\..\..\src\qf\qep_msm.c + + + qf_act.c + 1 + ..\..\..\..\..\src\qf\qf_act.c + + + qf_defer.c + 1 + ..\..\..\..\..\src\qf\qf_defer.c + + + qf_dyn.c + 1 + ..\..\..\..\..\src\qf\qf_dyn.c + + + qf_ps.c + 1 + ..\..\..\..\..\src\qf\qf_ps.c + + + qf_qact.c + 1 + ..\..\..\..\..\src\qf\qf_qact.c + + + qf_qeq.c + 1 + ..\..\..\..\..\src\qf\qf_qeq.c + + + qf_qmact.c + 1 + ..\..\..\..\..\src\qf\qf_qmact.c + + + qf_time.c + 1 + ..\..\..\..\..\src\qf\qf_time.c + + + qf_mem.c + 1 + ..\..\..\..\..\src\qf\qf_mem.c + + + + + QP_port + + + qf_port.c + 1 + ..\..\..\..\..\ports\freertos\qf_port.c + + + qf_port.h + 5 + ..\..\..\..\..\ports\freertos\qf_port.h + + + qs_port.h + 5 + ..\..\..\..\..\ports\freertos\qs_port.h + + + + + QS + + + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + + + + + + + + + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + + + + + + + + + + + + qs.c + 1 + ..\..\..\..\..\src\qs\qs.c + + + qs_64bit.c + 1 + ..\..\..\..\..\src\qs\qs_64bit.c + + + qs_fp.c + 1 + ..\..\..\..\..\src\qs\qs_fp.c + + + qs_rx.c + 1 + ..\..\..\..\..\src\qs\qs_rx.c + + + + + FreeRTOS + + + list.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + + + queue.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + + + tasks.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + + + + + FreeRTOS_port + + + port.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c + + + + + + + dpp-spy + 0x4 + ARM-ADS + 6160000::V6.16::ARMCLANG + 1 + + + TM4C123GH6PM + Texas Instruments + Keil.TM4C_DFP.1.1.0 + http://www.keil.com/pack/ + IROM(0x00000000,0x040000) IRAM(0x20000000,0x008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C123_256 -FS00 -FL040000 -FP0($$Device:TM4C123GH6PM$Flash\TM4C123_256.FLM)) + 0 + $$Device:TM4C123GH6PM$Device\Include\TM4C123\TM4C123.h + + + + + + + + + + $$Device:TM4C123GH6PM$SVD\TM4C123\TM4C123GH6PM.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\spy\ + dpp + 1 + 0 + 0 + 1 + 1 + .\spy\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 1 + 0 + cmd /c "del .\spy\qstamp.o" + + 0 + 0 + 0 + 0 + + + 1 + 0 + fromelf --bin --output .\spy\dpp.bin .\spy\dpp.axf + + 0 + 0 + 0 + 0 + + 1 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4097 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 1 + 0x0 + 0x40000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x40000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 0 + 0x0 + 0x0 + + + + + + 0 + 7 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 3 + 0 + 1 + 1 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + + + Q_SPY __FPU_PRESENT + + ..;..\..\..\..\..\include;..\..\..\..\..\ports\freertos;..\..\..\..\..\3rd_party\FreeRTOS\Source\include;..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM4F;..\..\..\..\..\3rd_party\ek-tm4c123gxl;..\..\..\..\..\3rd_party\CMSIS\Include + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 4 + + + Stack_Size=1024 Heap_Size=16 + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x00000000 + 0x20000000 + + + + + --entry Reset_Handler + + + + + + + + Applicatioin + + + bsp.c + 1 + ..\bsp.c + + + qstamp.c + 1 + ..\..\..\..\..\include\qstamp.c + + + main.c + 1 + ..\main.c + + + dpp.h + 5 + ..\dpp.h + + + bsp.h + 5 + ..\bsp.h + + + philo.c + 1 + ..\philo.c + + + table.c + 1 + ..\table.c + + + + + ek-tm4c123gxl + + + system_TM4C123GH6PM.c + 1 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + TM4C123GH6PM.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + gpio.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h + + + rom.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h + + + sysctl.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h + + + system_TM4C123GH6PM.h + 5 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + startup_TM4C123GH6PM.s + 2 + ..\..\..\..\..\3rd_party\ek-tm4c123gxl\arm\startup_TM4C123GH6PM.s + + + + + QP + + + qep_hsm.c + 1 + ..\..\..\..\..\src\qf\qep_hsm.c + + + qep_msm.c + 1 + ..\..\..\..\..\src\qf\qep_msm.c + + + qf_act.c + 1 + ..\..\..\..\..\src\qf\qf_act.c + + + qf_defer.c + 1 + ..\..\..\..\..\src\qf\qf_defer.c + + + qf_dyn.c + 1 + ..\..\..\..\..\src\qf\qf_dyn.c + + + qf_ps.c + 1 + ..\..\..\..\..\src\qf\qf_ps.c + + + qf_qact.c + 1 + ..\..\..\..\..\src\qf\qf_qact.c + + + qf_qeq.c + 1 + ..\..\..\..\..\src\qf\qf_qeq.c + + + qf_qmact.c + 1 + ..\..\..\..\..\src\qf\qf_qmact.c + + + qf_time.c + 1 + ..\..\..\..\..\src\qf\qf_time.c + + + qf_mem.c + 1 + ..\..\..\..\..\src\qf\qf_mem.c + + + + + QP_port + + + qf_port.c + 1 + ..\..\..\..\..\ports\freertos\qf_port.c + + + qf_port.h + 5 + ..\..\..\..\..\ports\freertos\qf_port.h + + + qs_port.h + 5 + ..\..\..\..\..\ports\freertos\qs_port.h + + + + + QS + + + qs.c + 1 + ..\..\..\..\..\src\qs\qs.c + + + qs_64bit.c + 1 + ..\..\..\..\..\src\qs\qs_64bit.c + + + qs_fp.c + 1 + ..\..\..\..\..\src\qs\qs_fp.c + + + qs_rx.c + 1 + ..\..\..\..\..\src\qs\qs_rx.c + + + + + FreeRTOS + + + list.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + + + queue.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + + + tasks.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + + + + + FreeRTOS_port + + + port.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c + + + + + + + + + + + + + +
    diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/bsp.c b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/bsp.c index a98c3d8d..4bb05fb8 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/bsp.c +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/bsp.c @@ -144,7 +144,7 @@ void vApplicationTickHook(void) { BaseType_t xHigherPriorityTaskWoken = pdFALSE; /* process time events for rate 0 */ - QF_TICK_X_FROM_ISR(0U, &xHigherPriorityTaskWoken, &l_TickHook); + QTIMEEVT_TICK_FROM_ISR(0U, &xHigherPriorityTaskWoken, &l_TickHook); #ifdef Q_SPY { @@ -165,8 +165,10 @@ void vApplicationTickHook(void) { tmp ^= buttons.depressed; /* changed debounced depressed */ if ((tmp & BTN_SW1) != 0U) { /* debounced SW1 state changed? */ if ((buttons.depressed & BTN_SW1) != 0U) { /* is SW1 depressed? */ - /* demonstrate the ISR APIs: QF_PUBLISH_FROM_ISR and Q_NEW_FROM_ISR */ - QF_PUBLISH_FROM_ISR(Q_NEW_FROM_ISR(QEvt, PAUSE_SIG), + /* demonstrate the "FromISR APIs: + * QACTIVE_PUBLISH_FROM_ISR() and Q_NEW_FROM_ISR() + */ + QACTIVE_PUBLISH_FROM_ISR(Q_NEW_FROM_ISR(QEvt, PAUSE_SIG), &xHigherPriorityTaskWoken, &l_TickHook); } @@ -192,7 +194,7 @@ void vApplicationIdleHook(void) { GPIOF->DATA_Bits[LED_BLUE] = 0U; /* turn the Blue LED off */ QF_INT_ENABLE(); - /* Some flating point code is to exercise the VFP... */ + /* Some floating point code is to exercise the VFP... */ x = 1.73205F; x = x * 1.73205F; @@ -362,7 +364,6 @@ void QF_onStartup(void) { * Assign a priority to EVERY ISR explicitly by calling NVIC_SetPriority(). * DO NOT LEAVE THE ISR PRIORITIES AT THE DEFAULT VALUE! */ - NVIC_SetPriority(UART0_IRQn, 0U); /* kernel unaware interrupt */ NVIC_SetPriority(GPIOA_IRQn, RTOS_AWARE_ISR_CMSIS_PRI); NVIC_SetPriority(SysTick_IRQn, RTOS_AWARE_ISR_CMSIS_PRI + 1U); /* ... */ @@ -371,6 +372,7 @@ void QF_onStartup(void) { NVIC_EnableIRQ(GPIOA_IRQn); #ifdef Q_SPY + NVIC_SetPriority(UART0_IRQn, 0U); /* kernel unaware interrupt */ NVIC_EnableIRQ(UART0_IRQn); /* UART0 interrupt used for QS-RX */ #endif } diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.h b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.h +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.qm b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.qm index 5b1603f1..37fa5e83 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.qm +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -116,7 +115,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -210,7 +209,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -233,7 +232,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -275,7 +274,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -286,7 +285,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/gnu/Makefile b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/gnu/Makefile index 80f409c9..178946be 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/gnu/Makefile +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, FreeRTOS kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-06-13 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ VPATH = \ INCLUDES = \ -I.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(FREERTOS)/Source/include \ -I$(FREERTOS)/Source/portable/GCC/ARM_CM4F \ @@ -118,7 +117,6 @@ QP_SRCS := \ qep_hsm.c \ qep_msm.c \ qf_act.c \ - qf_actq.c \ qf_defer.c \ qf_dyn.c \ qf_mem.c \ @@ -130,8 +128,9 @@ QP_SRCS := \ qf_port.c RTOS_SRCS := \ - list.c \ tasks.c \ + queue.c \ + list.c \ port.c QS_SRCS := \ diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/gnu/flash.bat b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/gnu/flash.bat index 7b2522a7..1c5dee5c 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/gnu/flash.bat +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program to the flash of EK-TM4C123GXL -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-TM4C123GXL -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program to the flash of EK-TM4C123GXL +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-TM4C123GXL +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-tm4c123gxl -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewd b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewd index acb39520..1af6df07 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewd +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp index ebfdc843..3eea3f2b 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp @@ -1,3244 +1,3313 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 30 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\bsp.h - - - $PROJ_DIR$\..\dpp.h - - - $PROJ_DIR$\..\FreeRTOSConfig.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\table.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - FreeRTOS - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM4F\port.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM4F\portasm.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM4F\portmacro.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\freertos\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\freertos\qf_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\freertos\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\freertos\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\bsp.h + + + $PROJ_DIR$\..\dpp.h + + + $PROJ_DIR$\..\FreeRTOSConfig.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\table.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\gpio.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\rom.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\sysctl.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + FreeRTOS + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM4F\port.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM4F\portasm.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM4F\portmacro.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\freertos\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\freertos\qf_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\freertos\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\freertos\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qutest.c + + + diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.eww b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.eww index 7a61d220..461ce6e0 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.eww +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp.ewp - - - - - + + + + + $WS_DIR$\dpp.ewp + + + + + diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.icf b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.icf +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/main.c b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/main.c index 2b87599e..ae3b25ce 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/main.c +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/main.c @@ -1,7 +1,7 @@ /***************************************************************************** * Product: DPP example, FreeRTOS kernel -* Last updated for version 6.4.0 -* Last updated on 2019-02-08 +* Last updated for version 7.0.1 +* Last updated on 2022-06-13 * * Q u a n t u m L e a P s * ------------------------ @@ -47,11 +47,6 @@ int main() { static StackType_t philoStack[N_PHILO][configMINIMAL_STACK_SIZE]; static StackType_t tableStack[configMINIMAL_STACK_SIZE]; - uint8_t n; - - Philo_ctor(); /* instantiate all Philosopher active objects */ - Table_ctor(); /* instantiate the Table active object */ - QF_init(); /* initialize the framework and the underlying RT kernel */ /* initialize publish-subscribe... */ @@ -69,7 +64,8 @@ int main() { BSP_init(); /* start the active objects... */ - for (n = 0U; n < N_PHILO; ++n) { + Philo_ctor(); /* instantiate all Philosopher active objects */ + for (uint8_t n = 0U; n < N_PHILO; ++n) { QActive_setAttr(AO_Philo[n], TASK_NAME_ATTR, "Philo"); QACTIVE_START(AO_Philo[n], /* AO to start */ (uint_fast8_t)(n + 1), /* QP priority of the AO */ @@ -80,6 +76,7 @@ int main() { (QEvt *)0); /* initialization event (not used) */ } + Table_ctor(); /* instantiate the Table active object */ QActive_setAttr(AO_Table, TASK_NAME_ATTR, "Table"); QACTIVE_START(AO_Table, /* AO to start */ (uint_fast8_t)(N_PHILO + 1), /* QP priority of the AO */ diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/philo.c b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/philo.c index e6c85eb9..9bf65092 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/philo.c +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -61,14 +74,16 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ }; /* Philo definition --------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,12 +93,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +129,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -141,7 +159,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -153,11 +171,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -165,9 +184,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -176,7 +195,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -190,30 +209,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -228,4 +248,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/table.c b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/table.c index 39d09a9e..d10b8d5e 100644 --- a/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/table.c +++ b/examples/freertos/arm-cm/dpp_ek-tm4c123gxl/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -53,14 +66,16 @@ static Table l_table; /* the single instance of the Table active object */ QActive * const AO_Table = &l_table.super; /* "opaque" AO pointer */ /*..........................................................................*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -72,12 +87,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -108,16 +125,17 @@ static QState Table_initial(Table * const me, void const * const par) { } return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -130,11 +148,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -148,7 +167,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -156,7 +175,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -166,25 +185,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -208,7 +227,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -219,19 +238,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -243,28 +262,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -274,7 +294,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -299,4 +319,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/FreeRTOSConfig.h b/examples/freertos/arm-cm/dpp_nucleo-h743zi/FreeRTOSConfig.h index 70247516..5ee4348b 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/FreeRTOSConfig.h +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/FreeRTOSConfig.h @@ -75,8 +75,8 @@ /* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */ -#define INCLUDE_vTaskPrioritySet 0 -#define INCLUDE_uxTaskPriorityGet 0 +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_uxTaskPriorityGet 1 #define INCLUDE_vTaskDelete 1 #define INCLUDE_vTaskCleanUpResources 0 #define INCLUDE_vTaskSuspend 0 diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/armclang/dpp.uvoptx b/examples/freertos/arm-cm/dpp_nucleo-h743zi/armclang/dpp.uvoptx new file mode 100644 index 00000000..8c9d80c2 --- /dev/null +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/armclang/dpp.uvoptx @@ -0,0 +1,1237 @@ + + + + 1.0 + +
    ### uVision Project, (C) Keil Software
    + + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc; *.md + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + dpp-dbg + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 1 + 0 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\dbg\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 18 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 6 + + + + + + + + + + + STLink\ST-LINKIII-KEIL_SWO.dll + + + + 0 + UL2CM3 + UL2CM3(-O207 -S0 -C0 -FO7 -FN1 -FC1000 -FD20000000 -FF0STM32H7x_2048 -FL0200000 -FS08000000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM) + + + 0 + ST-LINKIII-KEIL_SWO + -U0675FF504955857567065746 -O8399 -SF4000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP") -D00(6BA02477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32H7x_2048.FLM -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM) + + + 0 + DLGUARM + (105=-1,-1,-1,-1,0) + + + 0 + ARMRTXEVENTFLAGS + -L70 -Z18 -C0 -M0 -T1 + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(6017=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(6016=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + + + + 1 + 2 + 0x20000200 + 0 + + + + + 2 + 0 + 0x400 + 0 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + 1 + 0 + 0 + 2 + 10000000 + + + + + + dbg-rel + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 1 + 0 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\rel\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 0 + + 18 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 6 + + + + + + + + + + + STLink\ST-LINKIII-KEIL_SWO.dll + + + + 0 + UL2CM3 + UL2CM3(-O207 -S0 -C0 -FO7 -FN1 -FC1000 -FD20000000 -FF0STM32H7x_2048 -FL0200000 -FS08000000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM) + + + 0 + ST-LINKIII-KEIL_SWO + -U0675FF504955857567065746 -O207 -SF4000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP") -D00(6BA02477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32H7x_2048 -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM) + + + 0 + DLGUARM + (105=-1,-1,-1,-1,0) + + + 0 + ARMRTXEVENTFLAGS + -L70 -Z18 -C0 -M0 -T1 + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + + + + 1 + 2 + 0x20000200 + 0 + + + + + 2 + 0 + 0x400 + 0 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + 1 + 0 + 0 + 2 + 10000000 + + + + + + dpp-spy + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 1 + 0 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\spy\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 0 + + 18 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 6 + + + + + + + + + + + STLink\ST-LINKIII-KEIL_SWO.dll + + + + 0 + UL2CM3 + UL2CM3(-O207 -S0 -C0 -FO7 -FN1 -FC1000 -FD20000000 -FF0STM32H7x_2048 -FL0200000 -FS08000000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM) + + + 0 + ST-LINKIII-KEIL_SWO + -U0675FF504955857567065746 -O8399 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P2 -N00("ARM CoreSight SW-DP (ARM Core") -D00(6BA02477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20010000 -FC1000 -FN1 -FF0STM32H7x_2048.FLM -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM) + + + 0 + DLGUARM + (105=-1,-1,-1,-1,0) + + + 0 + ARMRTXEVENTFLAGS + -L70 -Z18 -C0 -M0 -T1 + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(6017=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(6016=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + + + 0 + 0 + 279 + 1 +
    0
    + 0 + 0 + 0 + 0 + 0 + 0 + ..\bsp.c + + +
    + + 1 + 0 + 280 + 1 +
    0
    + 0 + 0 + 0 + 0 + 0 + 0 + ..\bsp.c + + +
    +
    + + + 1 + 2 + 0x20000200 + 0 + + + + + 2 + 0 + 0x400 + 0 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + 1 + 0 + 0 + 2 + 10000000 + +
    +
    + + + Applicatioin + 0 + 0 + 0 + 0 + + 1 + 1 + 5 + 0 + 0 + 0 + ..\stm32h7xx_hal_conf.h + stm32h7xx_hal_conf.h + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\stm32h7xx_hal_msp.c + stm32h7xx_hal_msp.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\bsp.c + bsp.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + ..\main.c + main.c + 0 + 0 + + + 1 + 5 + 8 + 0 + 0 + 0 + ..\..\..\..\..\include\qstamp.c + qstamp.c + 0 + 0 + + + 1 + 6 + 5 + 0 + 0 + 0 + ..\bsp.h + bsp.h + 0 + 0 + + + 1 + 7 + 5 + 0 + 0 + 0 + ..\dpp.h + dpp.h + 0 + 0 + + + 1 + 8 + 5 + 0 + 0 + 0 + ..\FreeRTOSConfig.h + FreeRTOSConfig.h + 0 + 0 + + + 1 + 9 + 1 + 0 + 0 + 0 + ..\philo.c + philo.c + 0 + 0 + + + 1 + 10 + 1 + 0 + 0 + 0 + ..\table.c + table.c + 0 + 0 + + + + + nucleo-h743zi + 0 + 0 + 0 + 0 + + 2 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\arm\startup_stm32h743xx.s + startup_stm32h743xx.s + 0 + 0 + + + 2 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c + stm32h7xx_nucleo_144.c + 0 + 0 + + + 2 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c + system_stm32h7xx.c + 0 + 0 + + + + + STM32H7xx_HAL_Driver + 0 + 0 + 0 + 0 + + 3 + 14 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c + stm32h7xx_hal_uart.c + 0 + 0 + + + 3 + 15 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c + stm32h7xx_hal.c + 0 + 0 + + + 3 + 16 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c + stm32h7xx_hal_cortex.c + 0 + 0 + + + 3 + 17 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c + stm32h7xx_hal_dma.c + 0 + 0 + + + 3 + 18 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c + stm32h7xx_hal_gpio.c + 0 + 0 + + + 3 + 19 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c + stm32h7xx_hal_pwr.c + 0 + 0 + + + 3 + 20 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c + stm32h7xx_hal_rcc.c + 0 + 0 + + + 3 + 21 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c + stm32h7xx_hal_rcc_ex.c + 0 + 0 + + + + + QP + 0 + 0 + 0 + 0 + + 4 + 22 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qep_hsm.c + qep_hsm.c + 0 + 0 + + + 4 + 23 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qep_msm.c + qep_msm.c + 0 + 0 + + + 4 + 24 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_defer.c + qf_defer.c + 0 + 0 + + + 4 + 25 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_dyn.c + qf_dyn.c + 0 + 0 + + + 4 + 26 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_mem.c + qf_mem.c + 0 + 0 + + + 4 + 27 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_ps.c + qf_ps.c + 0 + 0 + + + 4 + 28 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_qact.c + qf_qact.c + 0 + 0 + + + 4 + 29 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_qeq.c + qf_qeq.c + 0 + 0 + + + 4 + 30 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_qmact.c + qf_qmact.c + 0 + 0 + + + 4 + 31 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qf\qf_time.c + qf_time.c + 0 + 0 + + + + + QP_port + 0 + 0 + 0 + 0 + + 5 + 32 + 5 + 0 + 0 + 0 + ..\..\..\..\..\ports\freertos\qep_port.h + qep_port.h + 0 + 0 + + + 5 + 33 + 1 + 0 + 0 + 0 + ..\..\..\..\..\ports\freertos\qf_port.c + qf_port.c + 0 + 0 + + + 5 + 34 + 5 + 0 + 0 + 0 + ..\..\..\..\..\ports\freertos\qf_port.h + qf_port.h + 0 + 0 + + + 5 + 35 + 5 + 0 + 0 + 0 + ..\..\..\..\..\ports\freertos\qs_port.h + qs_port.h + 0 + 0 + + + + + QS + 0 + 0 + 0 + 0 + + 6 + 36 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qs\qs.c + qs.c + 0 + 0 + + + 6 + 37 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qs\qs_64bit.c + qs_64bit.c + 0 + 0 + + + 6 + 38 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qs\qs_fp.c + qs_fp.c + 0 + 0 + + + 6 + 39 + 1 + 0 + 0 + 0 + ..\..\..\..\..\src\qs\qs_rx.c + qs_rx.c + 0 + 0 + + + + + FreeRTOS + 1 + 0 + 0 + 0 + + 7 + 40 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + list.c + 0 + 0 + + + 7 + 41 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + queue.c + 0 + 0 + + + 7 + 42 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + tasks.c + 0 + 0 + + + + + FreeRTOS_port + 1 + 0 + 0 + 0 + + 8 + 43 + 1 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1\port.c + port.c + 0 + 0 + + + 8 + 44 + 5 + 0 + 0 + 0 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1\portmacro.h + portmacro.h + 0 + 0 + + + +
    diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/armclang/dpp.uvprojx b/examples/freertos/arm-cm/dpp_nucleo-h743zi/armclang/dpp.uvprojx new file mode 100644 index 00000000..050278f1 --- /dev/null +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/armclang/dpp.uvprojx @@ -0,0 +1,2141 @@ + + + + 2.1 + +
    ### uVision Project, (C) Keil Software
    + + + + dpp-dbg + 0x4 + ARM-ADS + 6160000::V6.16::ARMCLANG + 1 + + + STM32H743ZITx + STMicroelectronics + Keil.STM32H7xx_DFP.3.0.0 + http://www.keil.com/pack/ + IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32H7x_2048 -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM)) + 0 + $$Device:STM32H743ZITx$Drivers\CMSIS\Device\ST\STM32H7xx\Include\stm32h7xx.h + + + + + + + + + + $$Device:STM32H743ZITx$CMSIS\SVD\STM32H7x3.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\dbg\ + dpp + 1 + 0 + 0 + 1 + 1 + .\dbg\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 1 + 0 + cmd /c "if exist .\dbg\qstamp.o del .\dbg\qstamp.o" + + 0 + 0 + 0 + 0 + + + 1 + 0 + fromelf --bin --output .\dbg\dpp.bin .\dbg\dpp.axf + + 0 + 0 + 0 + 0 + + 1 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM7 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM7 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4096 + + 1 + BIN\UL2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M7" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 3 + 0 + 0 + 1 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 1 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x200000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x200000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x24000000 + 0x80000 + + + + + + 0 + 2 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 3 + 0 + 1 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + + + STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 + + ..;..\..\..\..\..\include;..\..\..\..\..\ports\freertos;..\..\..\..\..\3rd_party\FreeRTOS\Source\include;..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 4 + + + Stack_Size=1024 Heap_Size=16 + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x00000000 + 0x20000000 + + + + + --entry Reset_Handler + + + + + + + + Applicatioin + + + stm32h7xx_hal_conf.h + 5 + ..\stm32h7xx_hal_conf.h + + + stm32h7xx_hal_msp.c + 1 + ..\stm32h7xx_hal_msp.c + + + bsp.c + 1 + ..\bsp.c + + + main.c + 1 + ..\main.c + + + qstamp.c + 8 + ..\..\..\..\..\include\qstamp.c + + + bsp.h + 5 + ..\bsp.h + + + dpp.h + 5 + ..\dpp.h + + + FreeRTOSConfig.h + 5 + ..\FreeRTOSConfig.h + + + philo.c + 1 + ..\philo.c + + + table.c + 1 + ..\table.c + + + + + nucleo-h743zi + + + startup_stm32h743xx.s + 2 + ..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\arm\startup_stm32h743xx.s + + + stm32h7xx_nucleo_144.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c + + + system_stm32h7xx.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c + + + + + STM32H7xx_HAL_Driver + + + stm32h7xx_hal_uart.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c + + + stm32h7xx_hal.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c + + + stm32h7xx_hal_cortex.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c + + + stm32h7xx_hal_dma.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c + + + stm32h7xx_hal_gpio.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c + + + stm32h7xx_hal_pwr.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c + + + stm32h7xx_hal_rcc.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c + + + stm32h7xx_hal_rcc_ex.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c + + + + + QP + + + qep_hsm.c + 1 + ..\..\..\..\..\src\qf\qep_hsm.c + + + qep_msm.c + 1 + ..\..\..\..\..\src\qf\qep_msm.c + + + qf_defer.c + 1 + ..\..\..\..\..\src\qf\qf_defer.c + + + qf_dyn.c + 1 + ..\..\..\..\..\src\qf\qf_dyn.c + + + qf_mem.c + 1 + ..\..\..\..\..\src\qf\qf_mem.c + + + qf_ps.c + 1 + ..\..\..\..\..\src\qf\qf_ps.c + + + qf_qact.c + 1 + ..\..\..\..\..\src\qf\qf_qact.c + + + qf_qeq.c + 1 + ..\..\..\..\..\src\qf\qf_qeq.c + + + qf_qmact.c + 1 + ..\..\..\..\..\src\qf\qf_qmact.c + + + qf_time.c + 1 + ..\..\..\..\..\src\qf\qf_time.c + + + + + QP_port + + + qep_port.h + 5 + ..\..\..\..\..\ports\freertos\qep_port.h + + + qf_port.c + 1 + ..\..\..\..\..\ports\freertos\qf_port.c + + + qf_port.h + 5 + ..\..\..\..\..\ports\freertos\qf_port.h + + + qs_port.h + 5 + ..\..\..\..\..\ports\freertos\qs_port.h + + + + + QS + + + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + + + + + + + + + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + + + + + + + + + + + + qs.c + 1 + ..\..\..\..\..\src\qs\qs.c + + + qs_64bit.c + 1 + ..\..\..\..\..\src\qs\qs_64bit.c + + + qs_fp.c + 1 + ..\..\..\..\..\src\qs\qs_fp.c + + + qs_rx.c + 1 + ..\..\..\..\..\src\qs\qs_rx.c + + + + + FreeRTOS + + + list.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + + + queue.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + + + tasks.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + + + + + FreeRTOS_port + + + port.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1\port.c + + + portmacro.h + 5 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1\portmacro.h + + + + + + + dbg-rel + 0x4 + ARM-ADS + 6160000::V6.16::ARMCLANG + 1 + + + STM32H743ZITx + STMicroelectronics + Keil.STM32H7xx_DFP.3.0.0 + http://www.keil.com/pack/ + IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32H7x_2048 -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM)) + 0 + $$Device:STM32H743ZITx$Drivers\CMSIS\Device\ST\STM32H7xx\Include\stm32h7xx.h + + + + + + + + + + $$Device:STM32H743ZITx$CMSIS\SVD\STM32H7x3.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\rel\ + dpp + 1 + 0 + 0 + 0 + 1 + .\rel\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 1 + 0 + cmd /c "if exist .\rel\qstamp.o del .\rel\qstamp.o" + + 0 + 0 + 0 + 0 + + + 1 + 0 + fromelf --bin --output .\rel\dpp.bin .\rel\dpp.axf + + 0 + 0 + 0 + 0 + + 1 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM7 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM7 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4097 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M7" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 3 + 0 + 0 + 1 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 1 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x200000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x200000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x24000000 + 0x80000 + + + + + + 0 + 7 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 3 + 0 + 1 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + + + NDEBUG,STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 + + ..;..\..\..\..\..\include;..\..\..\..\..\ports\freertos;..\..\..\..\..\3rd_party\FreeRTOS\Source\include;..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 4 + + + Stack_Size=1024 Heap_Size=16 + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x00000000 + 0x20000000 + + + + + --entry Reset_Handler + + + + + + + + Applicatioin + + + stm32h7xx_hal_conf.h + 5 + ..\stm32h7xx_hal_conf.h + + + stm32h7xx_hal_msp.c + 1 + ..\stm32h7xx_hal_msp.c + + + bsp.c + 1 + ..\bsp.c + + + main.c + 1 + ..\main.c + + + qstamp.c + 8 + ..\..\..\..\..\include\qstamp.c + + + bsp.h + 5 + ..\bsp.h + + + dpp.h + 5 + ..\dpp.h + + + FreeRTOSConfig.h + 5 + ..\FreeRTOSConfig.h + + + philo.c + 1 + ..\philo.c + + + table.c + 1 + ..\table.c + + + + + nucleo-h743zi + + + startup_stm32h743xx.s + 2 + ..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\arm\startup_stm32h743xx.s + + + stm32h7xx_nucleo_144.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c + + + system_stm32h7xx.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c + + + + + STM32H7xx_HAL_Driver + + + stm32h7xx_hal_uart.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c + + + stm32h7xx_hal.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c + + + stm32h7xx_hal_cortex.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c + + + stm32h7xx_hal_dma.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c + + + stm32h7xx_hal_gpio.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c + + + stm32h7xx_hal_pwr.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c + + + stm32h7xx_hal_rcc.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c + + + stm32h7xx_hal_rcc_ex.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c + + + + + QP + + + qep_hsm.c + 1 + ..\..\..\..\..\src\qf\qep_hsm.c + + + qep_msm.c + 1 + ..\..\..\..\..\src\qf\qep_msm.c + + + qf_defer.c + 1 + ..\..\..\..\..\src\qf\qf_defer.c + + + qf_dyn.c + 1 + ..\..\..\..\..\src\qf\qf_dyn.c + + + qf_mem.c + 1 + ..\..\..\..\..\src\qf\qf_mem.c + + + qf_ps.c + 1 + ..\..\..\..\..\src\qf\qf_ps.c + + + qf_qact.c + 1 + ..\..\..\..\..\src\qf\qf_qact.c + + + qf_qeq.c + 1 + ..\..\..\..\..\src\qf\qf_qeq.c + + + qf_qmact.c + 1 + ..\..\..\..\..\src\qf\qf_qmact.c + + + qf_time.c + 1 + ..\..\..\..\..\src\qf\qf_time.c + + + + + QP_port + + + qep_port.h + 5 + ..\..\..\..\..\ports\freertos\qep_port.h + + + qf_port.c + 1 + ..\..\..\..\..\ports\freertos\qf_port.c + + + qf_port.h + 5 + ..\..\..\..\..\ports\freertos\qf_port.h + + + qs_port.h + 5 + ..\..\..\..\..\ports\freertos\qs_port.h + + + + + QS + + + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + + + + + + + + + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + + + + + + + + + + + + qs.c + 1 + ..\..\..\..\..\src\qs\qs.c + + + qs_64bit.c + 1 + ..\..\..\..\..\src\qs\qs_64bit.c + + + qs_fp.c + 1 + ..\..\..\..\..\src\qs\qs_fp.c + + + qs_rx.c + 1 + ..\..\..\..\..\src\qs\qs_rx.c + + + + + FreeRTOS + + + list.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + + + queue.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + + + tasks.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + + + + + FreeRTOS_port + + + port.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1\port.c + + + portmacro.h + 5 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1\portmacro.h + + + + + + + dpp-spy + 0x4 + ARM-ADS + 6160000::V6.16::ARMCLANG + 1 + + + STM32H743ZITx + STMicroelectronics + Keil.STM32H7xx_DFP.3.0.0 + http://www.keil.com/pack/ + IRAM(0x20000000,0x00020000) IRAM2(0x24000000,0x00080000) IROM(0x08000000,0x00200000) CPUTYPE("Cortex-M7") FPU3(DFPU) CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32H7x_2048 -FS08000000 -FL0200000 -FP0($$Device:STM32H743ZITx$CMSIS\Flash\STM32H7x_2048.FLM)) + 0 + $$Device:STM32H743ZITx$Drivers\CMSIS\Device\ST\STM32H7xx\Include\stm32h7xx.h + + + + + + + + + + $$Device:STM32H743ZITx$CMSIS\SVD\STM32H7x3.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\spy\ + dpp + 1 + 0 + 0 + 1 + 1 + .\spy\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 1 + 0 + cmd /c "if exist .\spy\qstamp.o del .\spy\qstamp.o" + + 0 + 0 + 0 + 0 + + + 1 + 0 + fromelf --bin --output .\spy\dpp.bin .\spy\dpp.axf + + 0 + 0 + 0 + 0 + + 1 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM7 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM7 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4096 + + 1 + BIN\UL2CM3.DLL + "" () + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M7" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 3 + 0 + 0 + 1 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 1 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 1 + 0x8000000 + 0x200000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x200000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x20000 + + + 0 + 0x24000000 + 0x80000 + + + + + + 0 + 2 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 3 + 0 + 1 + 0 + 0 + 0 + 5 + 3 + 0 + 0 + 0 + 0 + 0 + + -Wno-padded + Q_SPY,QXK_ON_CONTEXT_SW,STM32H743xx,USE_HAL_DRIVER,USE_STM32H7XX_NUCLEO_144 + + ..;..\..\..\..\..\include;..\..\..\..\..\ports\freertos;..\..\..\..\..\3rd_party\FreeRTOS\Source\include;..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST/STM32H7xx\Include;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144;..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Inc + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 4 + + + Stack_Size=1024 Heap_Size=16 + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x00000000 + 0x20000000 + + + + + --entry Reset_Handler + + + + + + + + Applicatioin + + + stm32h7xx_hal_conf.h + 5 + ..\stm32h7xx_hal_conf.h + + + stm32h7xx_hal_msp.c + 1 + ..\stm32h7xx_hal_msp.c + + + bsp.c + 1 + ..\bsp.c + + + main.c + 1 + ..\main.c + + + qstamp.c + 8 + ..\..\..\..\..\include\qstamp.c + + + bsp.h + 5 + ..\bsp.h + + + dpp.h + 5 + ..\dpp.h + + + FreeRTOSConfig.h + 5 + ..\FreeRTOSConfig.h + + + philo.c + 1 + ..\philo.c + + + table.c + 1 + ..\table.c + + + + + nucleo-h743zi + + + startup_stm32h743xx.s + 2 + ..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\arm\startup_stm32h743xx.s + + + stm32h7xx_nucleo_144.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c + + + system_stm32h7xx.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c + + + + + STM32H7xx_HAL_Driver + + + stm32h7xx_hal_uart.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c + + + stm32h7xx_hal.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c + + + stm32h7xx_hal_cortex.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c + + + stm32h7xx_hal_dma.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_dma.c + + + stm32h7xx_hal_gpio.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c + + + stm32h7xx_hal_pwr.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c + + + stm32h7xx_hal_rcc.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c + + + stm32h7xx_hal_rcc_ex.c + 1 + ..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c + + + + + QP + + + qep_hsm.c + 1 + ..\..\..\..\..\src\qf\qep_hsm.c + + + qep_msm.c + 1 + ..\..\..\..\..\src\qf\qep_msm.c + + + qf_defer.c + 1 + ..\..\..\..\..\src\qf\qf_defer.c + + + qf_dyn.c + 1 + ..\..\..\..\..\src\qf\qf_dyn.c + + + qf_mem.c + 1 + ..\..\..\..\..\src\qf\qf_mem.c + + + qf_ps.c + 1 + ..\..\..\..\..\src\qf\qf_ps.c + + + qf_qact.c + 1 + ..\..\..\..\..\src\qf\qf_qact.c + + + qf_qeq.c + 1 + ..\..\..\..\..\src\qf\qf_qeq.c + + + qf_qmact.c + 1 + ..\..\..\..\..\src\qf\qf_qmact.c + + + qf_time.c + 1 + ..\..\..\..\..\src\qf\qf_time.c + + + + + QP_port + + + qep_port.h + 5 + ..\..\..\..\..\ports\freertos\qep_port.h + + + qf_port.c + 1 + ..\..\..\..\..\ports\freertos\qf_port.c + + + qf_port.h + 5 + ..\..\..\..\..\ports\freertos\qf_port.h + + + qs_port.h + 5 + ..\..\..\..\..\ports\freertos\qs_port.h + + + + + QS + + + 0 + 0 + 0 + 0 + 0 + 1 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + + + + + + + + + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + + + + + + + + + + + + qs.c + 1 + ..\..\..\..\..\src\qs\qs.c + + + qs_64bit.c + 1 + ..\..\..\..\..\src\qs\qs_64bit.c + + + qs_fp.c + 1 + ..\..\..\..\..\src\qs\qs_fp.c + + + qs_rx.c + 1 + ..\..\..\..\..\src\qs\qs_rx.c + + + + + FreeRTOS + + + list.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + + + queue.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + + + tasks.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + + + + + FreeRTOS_port + + + port.c + 1 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1\port.c + + + portmacro.h + 5 + ..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1\portmacro.h + + + + + + + + + + + + + + + + + dpp + 1 + + + + +
    diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/bsp.c b/examples/freertos/arm-cm/dpp_nucleo-h743zi/bsp.c index 1d9bd022..db7bbf30 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/bsp.c +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/bsp.c @@ -117,7 +117,7 @@ void vApplicationTickHook(void) { BaseType_t xHigherPriorityTaskWoken = pdFALSE; /* process time events for rate 0 */ - QF_TICK_X_FROM_ISR(0U, &xHigherPriorityTaskWoken, &l_TickHook); + QTIMEEVT_TICK_FROM_ISR(0U, &xHigherPriorityTaskWoken, &l_TickHook); #ifdef Q_SPY { @@ -138,8 +138,10 @@ void vApplicationTickHook(void) { tmp ^= buttons.depressed; /* changed debounced depressed */ if (tmp != 0U) { /* debounced Key button state changed? */ if (buttons.depressed != 0U) { /* PB0 depressed?*/ - /* demonstrate the ISR APIs: QF_PUBLISH_FROM_ISR and Q_NEW_FROM_ISR */ - QF_PUBLISH_FROM_ISR(Q_NEW_FROM_ISR(QEvt, PAUSE_SIG), + /* demonstrate the "FromISR APIs: + * QACTIVE_PUBLISH_FROM_ISR() and Q_NEW_FROM_ISR() + */ + QACTIVE_PUBLISH_FROM_ISR(Q_NEW_FROM_ISR(QEvt, PAUSE_SIG), &xHigherPriorityTaskWoken, &l_TickHook); } diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/dpp.h b/examples/freertos/arm-cm/dpp_nucleo-h743zi/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/dpp.h +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/dpp.qm b/examples/freertos/arm-cm/dpp_nucleo-h743zi/dpp.qm index 5b1603f1..37fa5e83 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/dpp.qm +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -116,7 +115,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -210,7 +209,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -233,7 +232,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -275,7 +274,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -286,7 +285,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/gnu/Makefile b/examples/freertos/arm-cm/dpp_nucleo-h743zi/gnu/Makefile index bd9d05d5..590d589b 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/gnu/Makefile +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-H743ZI, FreeRTOS, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-06-13 # # Q u a n t u m L e a P s # ------------------------ @@ -87,7 +87,6 @@ VPATH = \ INCLUDES = \ -I.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(FREERTOS)/Source/include \ -I$(FREERTOS)/Source/portable/GCC/ARM_CM4F \ @@ -131,7 +130,6 @@ QP_SRCS := \ qep_hsm.c \ qep_msm.c \ qf_act.c \ - qf_actq.c \ qf_defer.c \ qf_dyn.c \ qf_mem.c \ @@ -143,8 +141,9 @@ QP_SRCS := \ qf_port.c RTOS_SRCS := \ - list.c \ tasks.c \ + queue.c \ + list.c \ port.c QS_SRCS := \ diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewd b/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewd index 6804bebf..e3b3a198 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewd +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp b/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp index 045a4ecd..3fa69052 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.ewp @@ -1,3349 +1,3346 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\dpp.h - - - $PROJ_DIR$\..\FreeRTOSConfig.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\table.c - - - - FreeRTOS - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM7\r0p1\port.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM7\r0p1\portasm.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM7\r0p1\portmacro.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c - - - - nucleo-h743zi - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\iar\startup_stm32h743xx.s - - - $PROJ_DIR$\..\stm32h7xx_hal_conf.h - - - $PROJ_DIR$\..\stm32h7xx_hal_msp.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\freertos\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\freertos\qf_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\freertos\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\freertos\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - STM32H7xx_HAL_Driver - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\dpp.h + + + $PROJ_DIR$\..\FreeRTOSConfig.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\table.c + + + + FreeRTOS + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\list.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM7\r0p1\port.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM7\r0p1\portasm.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\portable\IAR\ARM_CM7\r0p1\portmacro.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\queue.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\FreeRTOS\Source\tasks.c + + + + nucleo-h743zi + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\nucleo-h743zi\iar\startup_stm32h743xx.s + + + $PROJ_DIR$\..\stm32h7xx_hal_conf.h + + + $PROJ_DIR$\..\stm32h7xx_hal_msp.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\BSP\STM32H7xx_Nucleo_144\stm32h7xx_nucleo_144.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\CMSIS\Device\ST\STM32H7xx\Source\Templates\system_stm32h7xx.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\freertos\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\freertos\qf_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\freertos\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\freertos\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + STM32H7xx_HAL_Driver + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_cortex.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_pwr.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_rcc_ex.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\STM32CubeH7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_hal_uart.c + + + diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.eww b/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.eww index 7a61d220..461ce6e0 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.eww +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp.ewp - - - - - + + + + + $WS_DIR$\dpp.ewp + + + + + diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.icf b/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.icf index b1879b8d..8d3950cc 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.icf +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/iar/dpp.icf @@ -1,84 +1,84 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\linker\ST\IcfEditor\stm32h7xx.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_FLASH1_start__ = 0x08000000; -define symbol __ICFEDIT_region_FLASH1_end__ = 0x080FFFFF; -define symbol __ICFEDIT_region_FLASH2_start__ = 0x08100000; -define symbol __ICFEDIT_region_FLASH2_end__ = 0x081FFFFF; -define symbol __ICFEDIT_region_NORPSR_start__ = 0x0; -define symbol __ICFEDIT_region_NORPSR_end__ = 0x0; -define symbol __ICFEDIT_region_NAND_start__ = 0x0; -define symbol __ICFEDIT_region_NAND_end__ = 0x0; -define symbol __ICFEDIT_region_QSPI_start__ = 0x0; -define symbol __ICFEDIT_region_QSPI_end__ = 0x0; -define symbol __ICFEDIT_region_ITCMR_start__ = 0x00000000; -define symbol __ICFEDIT_region_ITCMR_end__ = 0x0000FFFF; -define symbol __ICFEDIT_region_DTCMR_start__ = 0x20000000; -define symbol __ICFEDIT_region_DTCMR_end__ = 0x2001FFFF; -define symbol __ICFEDIT_region_AXISR_start__ = 0x24000000; -define symbol __ICFEDIT_region_AXISR_end__ = 0x2407FFFF; -define symbol __ICFEDIT_region_SRAM1_start__ = 0x30000000; -define symbol __ICFEDIT_region_SRAM1_end__ = 0x3001FFFF; -define symbol __ICFEDIT_region_SRAM2_start__ = 0x30020000; -define symbol __ICFEDIT_region_SRAM2_end__ = 0x3003FFFF; -define symbol __ICFEDIT_region_SRAM3_start__ = 0x30040000; -define symbol __ICFEDIT_region_SRAM3_end__ = 0x30047FFF; -define symbol __ICFEDIT_region_SRAM4_start__ = 0x38000000; -define symbol __ICFEDIT_region_SRAM4_end__ = 0x3800FFFF; -define symbol __ICFEDIT_region_BKPR_start__ = 0x38800000; -define symbol __ICFEDIT_region_BKPR_end__ = 0x38800FFF; -define symbol __ICFEDIT_region_SDR1_start__ = 0x0; -define symbol __ICFEDIT_region_SDR1_end__ = 0x0; -define symbol __ICFEDIT_region_SDR2_start__ = 0x0; -define symbol __ICFEDIT_region_SDR2_end__ = 0x0; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 2048; -define symbol __ICFEDIT_size_proc_stack__ = 0; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region FLASH_region = mem:[from __ICFEDIT_region_FLASH1_start__ to __ICFEDIT_region_FLASH1_end__] - | mem:[from __ICFEDIT_region_FLASH2_start__ to __ICFEDIT_region_FLASH2_end__]; -define region NORPSR_region = mem:[from __ICFEDIT_region_NORPSR_start__ to __ICFEDIT_region_NORPSR_end__]; -define region NAND_region = mem:[from __ICFEDIT_region_NAND_start__ to __ICFEDIT_region_NAND_end__ ]; -define region QSPI_region = mem:[from __ICFEDIT_region_QSPI_start__ to __ICFEDIT_region_QSPI_end__ ]; -define region ITCMR_region = mem:[from __ICFEDIT_region_ITCMR_start__ to __ICFEDIT_region_ITCMR_end__ ]; -define region DTCMR_region = mem:[from __ICFEDIT_region_DTCMR_start__ to __ICFEDIT_region_DTCMR_end__ ]; -define region AXISR_region = mem:[from __ICFEDIT_region_AXISR_start__ to __ICFEDIT_region_AXISR_end__ ]; -define region SRAM_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__ ] - | mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__ ] - | mem:[from __ICFEDIT_region_SRAM3_start__ to __ICFEDIT_region_SRAM3_end__ ] - | mem:[from __ICFEDIT_region_SRAM4_start__ to __ICFEDIT_region_SRAM4_end__ ]; -define region BKPR_region = mem:[from __ICFEDIT_region_BKPR_start__ to __ICFEDIT_region_BKPR_end__ ]; -define region SDR_region = mem:[from __ICFEDIT_region_SDR1_start__ to __ICFEDIT_region_SDR1_end__ ] - | mem:[from __ICFEDIT_region_SDR2_start__ to __ICFEDIT_region_SDR2_end__ ]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) -{ - // Required in a multi-threaded application - initialize by copy with packing = none { section __DLIB_PERTHREAD }; -} - -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in FLASH_region { readonly }; -place in QSPI_region { readonly section application_specific_ro }; -//place in NORPSR_region { }; -//place in NAND_region { }; -place in ITCMR_region { section .textrw }; -place in DTCMR_region { section .dtcm_ram, block CSTACK, block PROC_STACK }; -place in SRAM_region { section .axi_sram, block HEAP }; -place in AXISR_region { readwrite }; -place in BKPR_region { section .backup_sram }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\linker\ST\IcfEditor\stm32h7xx.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_FLASH1_start__ = 0x08000000; +define symbol __ICFEDIT_region_FLASH1_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_FLASH2_start__ = 0x08100000; +define symbol __ICFEDIT_region_FLASH2_end__ = 0x081FFFFF; +define symbol __ICFEDIT_region_NORPSR_start__ = 0x0; +define symbol __ICFEDIT_region_NORPSR_end__ = 0x0; +define symbol __ICFEDIT_region_NAND_start__ = 0x0; +define symbol __ICFEDIT_region_NAND_end__ = 0x0; +define symbol __ICFEDIT_region_QSPI_start__ = 0x0; +define symbol __ICFEDIT_region_QSPI_end__ = 0x0; +define symbol __ICFEDIT_region_ITCMR_start__ = 0x00000000; +define symbol __ICFEDIT_region_ITCMR_end__ = 0x0000FFFF; +define symbol __ICFEDIT_region_DTCMR_start__ = 0x20000000; +define symbol __ICFEDIT_region_DTCMR_end__ = 0x2001FFFF; +define symbol __ICFEDIT_region_AXISR_start__ = 0x24000000; +define symbol __ICFEDIT_region_AXISR_end__ = 0x2407FFFF; +define symbol __ICFEDIT_region_SRAM1_start__ = 0x30000000; +define symbol __ICFEDIT_region_SRAM1_end__ = 0x3001FFFF; +define symbol __ICFEDIT_region_SRAM2_start__ = 0x30020000; +define symbol __ICFEDIT_region_SRAM2_end__ = 0x3003FFFF; +define symbol __ICFEDIT_region_SRAM3_start__ = 0x30040000; +define symbol __ICFEDIT_region_SRAM3_end__ = 0x30047FFF; +define symbol __ICFEDIT_region_SRAM4_start__ = 0x38000000; +define symbol __ICFEDIT_region_SRAM4_end__ = 0x3800FFFF; +define symbol __ICFEDIT_region_BKPR_start__ = 0x38800000; +define symbol __ICFEDIT_region_BKPR_end__ = 0x38800FFF; +define symbol __ICFEDIT_region_SDR1_start__ = 0x0; +define symbol __ICFEDIT_region_SDR1_end__ = 0x0; +define symbol __ICFEDIT_region_SDR2_start__ = 0x0; +define symbol __ICFEDIT_region_SDR2_end__ = 0x0; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 2048; +define symbol __ICFEDIT_size_proc_stack__ = 0; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region FLASH_region = mem:[from __ICFEDIT_region_FLASH1_start__ to __ICFEDIT_region_FLASH1_end__] + | mem:[from __ICFEDIT_region_FLASH2_start__ to __ICFEDIT_region_FLASH2_end__]; +define region NORPSR_region = mem:[from __ICFEDIT_region_NORPSR_start__ to __ICFEDIT_region_NORPSR_end__]; +define region NAND_region = mem:[from __ICFEDIT_region_NAND_start__ to __ICFEDIT_region_NAND_end__ ]; +define region QSPI_region = mem:[from __ICFEDIT_region_QSPI_start__ to __ICFEDIT_region_QSPI_end__ ]; +define region ITCMR_region = mem:[from __ICFEDIT_region_ITCMR_start__ to __ICFEDIT_region_ITCMR_end__ ]; +define region DTCMR_region = mem:[from __ICFEDIT_region_DTCMR_start__ to __ICFEDIT_region_DTCMR_end__ ]; +define region AXISR_region = mem:[from __ICFEDIT_region_AXISR_start__ to __ICFEDIT_region_AXISR_end__ ]; +define region SRAM_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__ ] + | mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__ ] + | mem:[from __ICFEDIT_region_SRAM3_start__ to __ICFEDIT_region_SRAM3_end__ ] + | mem:[from __ICFEDIT_region_SRAM4_start__ to __ICFEDIT_region_SRAM4_end__ ]; +define region BKPR_region = mem:[from __ICFEDIT_region_BKPR_start__ to __ICFEDIT_region_BKPR_end__ ]; +define region SDR_region = mem:[from __ICFEDIT_region_SDR1_start__ to __ICFEDIT_region_SDR1_end__ ] + | mem:[from __ICFEDIT_region_SDR2_start__ to __ICFEDIT_region_SDR2_end__ ]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block PROC_STACK with alignment = 8, size = __ICFEDIT_size_proc_stack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) +{ + // Required in a multi-threaded application + initialize by copy with packing = none { section __DLIB_PERTHREAD }; +} + +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in FLASH_region { readonly }; +place in QSPI_region { readonly section application_specific_ro }; +//place in NORPSR_region { }; +//place in NAND_region { }; +place in ITCMR_region { section .textrw }; +place in DTCMR_region { section .dtcm_ram, block CSTACK, block PROC_STACK }; +place in SRAM_region { section .axi_sram, block HEAP }; +place in AXISR_region { readwrite }; +place in BKPR_region { section .backup_sram }; place in SDR_region { readwrite section application_specific_rw }; \ No newline at end of file diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/philo.c b/examples/freertos/arm-cm/dpp_nucleo-h743zi/philo.c index e6c85eb9..9bf65092 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/philo.c +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -61,14 +74,16 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ }; /* Philo definition --------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,12 +93,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +129,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -141,7 +159,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -153,11 +171,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -165,9 +184,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -176,7 +195,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -190,30 +209,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -228,4 +248,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/freertos/arm-cm/dpp_nucleo-h743zi/table.c b/examples/freertos/arm-cm/dpp_nucleo-h743zi/table.c index 39d09a9e..d10b8d5e 100644 --- a/examples/freertos/arm-cm/dpp_nucleo-h743zi/table.c +++ b/examples/freertos/arm-cm/dpp_nucleo-h743zi/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -53,14 +66,16 @@ static Table l_table; /* the single instance of the Table active object */ QActive * const AO_Table = &l_table.super; /* "opaque" AO pointer */ /*..........................................................................*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -72,12 +87,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -108,16 +125,17 @@ static QState Table_initial(Table * const me, void const * const par) { } return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -130,11 +148,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -148,7 +167,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -156,7 +175,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -166,25 +185,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -208,7 +227,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -219,19 +238,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -243,28 +262,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -274,7 +294,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -299,4 +319,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/lwipmgr.c b/examples/lwip/arm-cm/lwip_ek-lm3s6965/lwipmgr.c index e810f9ed..1f3613a4 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/lwipmgr.c +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/lwipmgr.c @@ -1,7 +1,7 @@ /***************************************************************************** * Product: lwIP-Manager Active Object -* Last updated for version 6.9.1 -* Last updated on 2020-09-11 +* Last updated for version 7.0.1 +* Last updated on 2022-06-06 * * Q u a n t u m L e a P s * ------------------------ @@ -45,8 +45,8 @@ Q_DEFINE_THIS_FILE - /* the LwIP driver signal group must fit the actual number of signals */ -Q_ASSERT_COMPILE((LWIP_DRIVER_END - LWIP_DRIVER_GROUP) >= LWIP_MAX_OFFSET); +/* the LwIP driver signal group must fit the actual number of signals */ +Q_ASSERT_STATIC((LWIP_DRIVER_END - LWIP_DRIVER_GROUP) >= LWIP_MAX_OFFSET); #define FLASH_USERREG0 (*(uint32_t const *)0x400FE1E0) #define FLASH_USERREG1 (*(uint32_t const *)0x400FE1E4) @@ -228,7 +228,7 @@ QState LwIPMgr_running(LwIPMgr *me, QEvt const *e) { (int)(((ip_net) >> 16) & 0xFFU), (int)(((ip_net) >> 8) & 0xFFU), (int)(ip_net & 0xFFU)); - QF_PUBLISH((QEvt *)te, &me->super); + QACTIVE_PUBLISH((QEvt *)te, &me->super); } #if LWIP_TCP @@ -330,7 +330,7 @@ static char const *cgi_display(int index, int numParams, if (strstr(param[i], "text") != (char *)0) { /* param text found? */ TextEvt *te = Q_NEW(TextEvt, DISPLAY_CGI_SIG); strncpy(te->text, value[i], Q_DIM(te->text)); - QF_PUBLISH((QEvt *)te, AO_LwIPMgr); + QACTIVE_PUBLISH((QEvt *)te, AO_LwIPMgr); return "/thank_you.htm"; } } @@ -343,7 +343,7 @@ static void udp_rx_handler(void *arg, struct udp_pcb *upcb, { TextEvt *te = Q_NEW(TextEvt, DISPLAY_UDP_SIG); strncpy(te->text, (char *)p->payload, Q_DIM(te->text)); - QF_PUBLISH((QEvt *)te, AO_LwIPMgr); + QACTIVE_PUBLISH((QEvt *)te, AO_LwIPMgr); udp_connect(upcb, addr, port); /* connect to the remote host */ pbuf_free(p); /* don't leak the pbuf! */ diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/philo.c b/examples/lwip/arm-cm/lwip_ek-lm3s6965/philo.c index 4d3773f5..5ce395d5 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/philo.c +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/philo.c @@ -162,7 +162,7 @@ QState Philo_eating(Philo *me, QEvt const *e) { case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); return Q_HANDLED(); } case TIMEOUT_SIG: { diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/bsp.c b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/bsp.c index 99b38b0c..b326a4d0 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/bsp.c +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/bsp.c @@ -84,7 +84,7 @@ void SysTick_Handler(void) { QS_tickTime_ += QS_tickPeriod_; /* account for the clock rollover */ #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -99,11 +99,11 @@ void SysTick_Handler(void) { if ((tmp & USER_BTN) != 0U) { /* debounced USER_BTN state changed? */ if ((buttons.depressed & USER_BTN) != 0U) { /* is BTN depressed? */ static QEvt const bd = { BTN_DOWN_SIG, 0U, 0U }; - QF_PUBLISH(&bd, &l_SysTick_Handler); + QACTIVE_PUBLISH(&bd, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const bu = { BTN_UP_SIG, 0U, 0U }; - QF_PUBLISH(&bu, &l_SysTick_Handler); + QACTIVE_PUBLISH(&bu, &l_SysTick_Handler); } } diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/gnu/Makefile b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/gnu/Makefile index 44d45fae..4b933af1 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/gnu/Makefile +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for lwIP on EK-LM3S6965, QK kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -82,7 +82,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-lm3s6965 \ diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/gnu/flash.bat b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/gnu/flash.bat index 3ad74756..1e07aad3 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/gnu/flash.bat +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program to the flash of EK-LM3S6965 -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-LM3S6965 -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-lm3s6965 -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program to the flash of EK-LM3S6965 +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-LM3S6965 +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-lm3s6965 -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.ewd b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.ewd index 9f221db9..95b9e57c 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.ewd +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.ewp b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.ewp index 8381f70f..0bc557a2 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.ewp +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.ewp @@ -1,3242 +1,3242 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\..\fsdata.h - - - $PROJ_DIR$\..\..\lwip.c - - - $PROJ_DIR$\..\..\lwip.h - - - $PROJ_DIR$\..\..\lwipmgr.c - - - $PROJ_DIR$\..\..\lwipopts.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - ek-lm3s6965 - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\lwip_driver\netif\eth_driver.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\lwip_driver\netif\eth_driver.h - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\LM3S6965.h - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\rit128x96x4.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\rit128x96x4.h - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\iar\startup_LM3S6965.s - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\system_LM3S6965.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\system_LM3S6965.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qk\qk.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c - - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_pkg.h - - - - webserver_raw - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\fs.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\fs.h - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\httpd.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\httpd.h - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\..\fsdata.h + + + $PROJ_DIR$\..\..\lwip.c + + + $PROJ_DIR$\..\..\lwip.h + + + $PROJ_DIR$\..\..\lwipmgr.c + + + $PROJ_DIR$\..\..\lwipopts.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + ek-lm3s6965 + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\lwip_driver\netif\eth_driver.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\lwip_driver\netif\eth_driver.h + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\LM3S6965.h + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\rit128x96x4.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\rit128x96x4.h + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\iar\startup_LM3S6965.s + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\system_LM3S6965.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\system_LM3S6965.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qk\qk.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qk_port.c + + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qk\iar\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_pkg.h + + + + webserver_raw + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\fs.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\fs.h + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\httpd.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\httpd.h + + + diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.eww b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.eww index 54cb1e0e..4bf87493 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.eww +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\lwip-qk.ewp - - - - - + + + + + $WS_DIR$\lwip-qk.ewp + + + + + diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.icf b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.icf index ecdd846d..8d92b3e6 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.icf +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qk/iar/lwip-qk.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 2048; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 2048; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/bsp.c b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/bsp.c index 96f82871..1930db63 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/bsp.c +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/bsp.c @@ -82,7 +82,7 @@ void SysTick_Handler(void) { QS_tickTime_ += QS_tickPeriod_; /* account for the clock rollover */ #endif - QF_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_SysTick_Handler); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -97,11 +97,11 @@ void SysTick_Handler(void) { if ((tmp & USER_BTN) != 0U) { /* debounced USER_BTN state changed? */ if ((buttons.depressed & USER_BTN) != 0U) { /* is BTN depressed? */ static QEvt const bd = { BTN_DOWN_SIG, 0U, 0U }; - QF_PUBLISH(&bd, &l_SysTick_Handler); + QACTIVE_PUBLISH(&bd, &l_SysTick_Handler); } else { /* the button is released */ static QEvt const bu = { BTN_UP_SIG, 0U, 0U }; - QF_PUBLISH(&bu, &l_SysTick_Handler); + QACTIVE_PUBLISH(&bu, &l_SysTick_Handler); } } } diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/gnu/Makefile b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/gnu/Makefile index 2b6a70b6..a3140c98 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/gnu/Makefile +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for lwIP on EK-LM3S6965, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -82,7 +82,6 @@ VPATH = \ INCLUDES = \ -I../.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-lm3s6965 \ diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/gnu/flash.bat b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/gnu/flash.bat index 3ad74756..1e07aad3 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/gnu/flash.bat +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/gnu/flash.bat @@ -1,33 +1,33 @@ -::============================================================================ -:: Batch file to program to the flash of EK-LM3S6965 -:: -:: NOTE: requires the LMFlash programmer (included in QTools for Windows) -:: -@echo off -setlocal - -@echo Load a given binary file to the flash of EK-LM3S6965 -@echo usage: flash binary-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can -:: be found on the PATH. You might need to adjust this symbol to the -:: location of the LMFlash utility on your machine -:: -set LMFLASH=LMFlash.exe - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -%LMFLASH% -q ek-lm3s6965 -e -v -r %1 - -:end - +::============================================================================ +:: Batch file to program to the flash of EK-LM3S6965 +:: +:: NOTE: requires the LMFlash programmer (included in QTools for Windows) +:: +@echo off +setlocal + +@echo Load a given binary file to the flash of EK-LM3S6965 +@echo usage: flash binary-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +:: be found on the PATH. You might need to adjust this symbol to the +:: location of the LMFlash utility on your machine +:: +set LMFLASH=LMFlash.exe + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +%LMFLASH% -q ek-lm3s6965 -e -v -r %1 + +:end + endlocal \ No newline at end of file diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.ewd b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.ewd index 9f221db9..95b9e57c 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.ewd +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.ewp b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.ewp index 45c07ba7..c459ee9a 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.ewp +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.ewp @@ -1,3245 +1,3245 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\..\fsdata.h - - - $PROJ_DIR$\..\..\lwip.c - - - $PROJ_DIR$\..\..\lwip.h - - - $PROJ_DIR$\..\..\lwipmgr.c - - - $PROJ_DIR$\..\..\lwipopts.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - ek-lm3s6965 - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\lwip_driver\netif\eth_driver.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\lwip_driver\netif\eth_driver.h - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\LM3S6965.h - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\rit128x96x4.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\rit128x96x4.h - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\iar\startup_LM3S6965.s - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\system_LM3S6965.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\system_LM3S6965.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c - - - $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\..\src\qs_pkg.h - - - - webserver_raw - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\fs.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\fs.h - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\httpd.c - - - $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\httpd.h - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 20 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + Coder + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\..\fsdata.h + + + $PROJ_DIR$\..\..\lwip.c + + + $PROJ_DIR$\..\..\lwip.h + + + $PROJ_DIR$\..\..\lwipmgr.c + + + $PROJ_DIR$\..\..\lwipopts.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + ek-lm3s6965 + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\lwip_driver\netif\eth_driver.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\lwip_driver\netif\eth_driver.h + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\LM3S6965.h + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\rit128x96x4.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\rit128x96x4.h + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\iar\startup_LM3S6965.s + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\system_LM3S6965.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\ek-lm3s6965\system_LM3S6965.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.c + + + $PROJ_DIR$\..\..\..\..\..\..\ports\arm-cm\qv\iar\qv_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\..\src\qs_pkg.h + + + + webserver_raw + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\fs.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\fs.h + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\httpd.c + + + $PROJ_DIR$\..\..\..\..\..\..\3rd_party\lwip\apps\webserver_raw\httpd.h + + + diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.eww b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.eww index cde20986..4df7ad4c 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.eww +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\lwip-qv.ewp - - - - - + + + + + $WS_DIR$\lwip-qv.ewp + + + + + diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.icf b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.icf index ecdd846d..8d92b3e6 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.icf +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/qv/iar/lwip-qv.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 2048; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 2048; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/table.c b/examples/lwip/arm-cm/lwip_ek-lm3s6965/table.c index feb34e47..1833d9c3 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/table.c +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/table.c @@ -159,7 +159,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->fork[m] = me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); Table_displayPhilStat(me, n, "eating "); } else { @@ -184,7 +184,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->isHungry[m] = 0; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); Table_displayPhilStat(me, m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -194,7 +194,7 @@ QState Table_serving(Table *me, QEvt const *e) { me->isHungry[m] = 0; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH((QEvt *)pe, &me->super); + QACTIVE_PUBLISH((QEvt *)pe, &me->super); Table_displayPhilStat(me, m, "eating "); } return Q_HANDLED(); diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/website.bat b/examples/lwip/arm-cm/lwip_ek-lm3s6965/website.bat index 5c93ba21..5e61226f 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/website.bat +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/website.bat @@ -1,8 +1,8 @@ -:: batch file to re-generate the fsdata.h header file from -:: the contents of the "website" directory. -:: -:: The qfsgen utility is provided in the Qtools collection -:: (see http://sourceforge.net/projects/qpc/files/Qtools/). -:: The qfsgen utility is assumed to be in the PATH. - +:: batch file to re-generate the fsdata.h header file from +:: the contents of the "website" directory. +:: +:: The qfsgen utility is provided in the Qtools collection +:: (see http://sourceforge.net/projects/qpc/files/Qtools/). +:: The qfsgen utility is assumed to be in the PATH. + qfsgen.exe website %1 %2 %3 \ No newline at end of file diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/website/ssi_demo.shtm b/examples/lwip/arm-cm/lwip_ek-lm3s6965/website/ssi_demo.shtm index 1b33e94e..84111ded 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/website/ssi_demo.shtm +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/website/ssi_demo.shtm @@ -1,98 +1,98 @@ - - - - -QP/lwIP--SSI Demo - - - - - - - - - - - - - - - -
    Quantum Leaps - innovating embedded systems - - Quantum Leaps, LLC
    - info@state-machine.com
    - www.state-machine.com -
    - - - -

    About SSI Support

    - -QP-lwIP - -

    The HTTP server that comes with lwIP has been extended to support rudimentary Server Side Include (SSI) facility. To enable the SSI support in the lwIP-HTTP server, you need to define the macro INCLUDE_HTTPD_SSI in the lwipopts.h header file. - -Application Note (1.4MB PDF) - -You must also provide your SSI callback function and register it by calling the http_set_ssi_handler() function. The HTTP server will then scan each file with extension .shtml, .shtm or .ssi for the SSI tags of the form <!--#tag--> and will replace on-the-fly every recognized SSI tag with the string composed by your SSI callback function. See the HTML source code for this web page (ssi_demo.shtm) and the SSI callback function definition in lwipmgr.c. -

    -

    While designing your own SSI tags, remember that the tag names are limited to 8 characters and the length of the replacement strings cannot exceed 192 characters. You can re-define these limits by changing the macros MAX_TAG_NAME_LEN and MAX_TAG_INSERT_LEN, respectively, in the http.h header file. -

    -

    Please refer to the Quantum Leaps Application Note: "QP and lwIP TCP/IP Stack" for more information. The Application Note is included in the QP-lwIP example code download. -

    - - -

    SSI Example

    -

    The following table contains SSI tags embedded in the HTML of this web page. Client browsers never see these tags, as the lwIP-HTTP server replaces them on-the-fly while serving this page. These particular SSI tags cause the target to generate various lwIP link statistics. Please click the Refresh button on your browser to cause re-loading of this page and updating the statistics: -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SSI Example -
    Packets sent:
    Packets received:
    Packets forwared:
    Packets dropped:
    Checksum errors:
    Packets with invalid length:
    Memory errors:
    Routing errors:
    Protocol errors:
    Option errors:
    Miscallaneous errors:
    -
    -

    NOTE: the webpage loads much slower than the others, because it contains 12 SSI tags, and each tag is sent is a separate TCP/IP packet. -

    -
    - - + + + diff --git a/examples/lwip/arm-cm/lwip_ek-lm3s6965/website/style.css b/examples/lwip/arm-cm/lwip_ek-lm3s6965/website/style.css index a68dfe86..126c71aa 100644 --- a/examples/lwip/arm-cm/lwip_ek-lm3s6965/website/style.css +++ b/examples/lwip/arm-cm/lwip_ek-lm3s6965/website/style.css @@ -17,9 +17,9 @@ h1 {font-size:22px; font-weight:normal; color:#000099; padding:10px 0 0px 0;} h2 {font-size:18px; font-weight:normal; color:#000099; padding:10px 0 0px 0;} h3 {font-size:14px; font-weight:bold; color:#000099; padding:10px 0 0px 0;} ul {list-style-position:outside; margin-left:20px;} -ol {list-style-position:outside; margin-left:20px;} +ol {list-style-position:outside; margin-left:20px;} strong {font-weight:bold; color:#009; } - + #menu {color: #fff; } #menu a {color: #fff; } #footer {margin:0 auto; padding-top:1px; text-align:center; background:url(bg_footer.gif) no-repeat top center;} diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qk/bsp.c b/examples/msp430/blinky_msp-exp430f5529lp/qk/bsp.c index 5b949211..b70eebf1 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qk/bsp.c +++ b/examples/msp430/blinky_msp-exp430f5529lp/qk/bsp.c @@ -69,7 +69,7 @@ Q_DEFINE_THIS_FILE { QK_ISR_ENTRY(); /* inform QK about entering the ISR */ - QF_TICK_X(0U, (void *)0); /* process all time events at rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process all time events at rate 0 */ QK_ISR_EXIT(); /* inform QK about exiting the ISR */ diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-gnu/.cproject b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-gnu/.cproject index ed39b3a1..25013c9b 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-gnu/.cproject +++ b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-gnu/.cproject @@ -1,282 +1,282 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-gnu/.project b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-gnu/.project index 82f09a8d..61a3a267 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-gnu/.project +++ b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-gnu/.project @@ -1,79 +1,79 @@ - - - blinky-qk_msp-exp430f5529lp - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_include - 2 - PARENT-5-PROJECT_LOC/include - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/msp430/qk - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - blinky.c - 1 - PARENT-2-PROJECT_LOC/blinky.c - - - blinky.h - 1 - PARENT-2-PROJECT_LOC/blinky.h - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - qk - 2 - PARENT-5-PROJECT_LOC/src/qk - - - + + + blinky-qk_msp-exp430f5529lp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QP_include + 2 + PARENT-5-PROJECT_LOC/include + + + QP_port + 2 + PARENT-5-PROJECT_LOC/ports/msp430/qk + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + blinky.c + 1 + PARENT-2-PROJECT_LOC/blinky.c + + + blinky.h + 1 + PARENT-2-PROJECT_LOC/blinky.h + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + qk + 2 + PARENT-5-PROJECT_LOC/src/qk + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.cproject b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.cproject index 242946af..bcd65a33 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.cproject +++ b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.cproject @@ -1,322 +1,322 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.launches/blinky-qk_msp-exp430f5529lp.launch b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.launches/blinky-qk_msp-exp430f5529lp.launch index 8c76ef3b..8d58b85a 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.launches/blinky-qk_msp-exp430f5529lp.launch +++ b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.launches/blinky-qk_msp-exp430f5529lp.launch @@ -1,16 +1,16 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.project b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.project index 0a009639..008c5343 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.project +++ b/examples/msp430/blinky_msp-exp430f5529lp/qk/ccs-ti/.project @@ -1,74 +1,74 @@ - - - blinky-qk_msp-exp430f5529lp - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QK - 2 - PARENT-5-PROJECT_LOC/src/qk - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_include - 2 - PARENT-5-PROJECT_LOC/include - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/msp430/qk - - - blinky.c - 1 - PARENT-2-PROJECT_LOC/blinky.c - - - blinky.h - 1 - PARENT-2-PROJECT_LOC/blinky.h - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - + + + blinky-qk_msp-exp430f5529lp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QK + 2 + PARENT-5-PROJECT_LOC/src/qk + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QP_include + 2 + PARENT-5-PROJECT_LOC/include + + + QP_port + 2 + PARENT-5-PROJECT_LOC/ports/msp430/qk + + + blinky.c + 1 + PARENT-2-PROJECT_LOC/blinky.c + + + blinky.h + 1 + PARENT-2-PROJECT_LOC/blinky.h + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.ewd b/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.ewd index 6d016e89..e19cf414 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.ewd +++ b/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.ewd @@ -1,1186 +1,1186 @@ - - - 3 - - Debug - - MSP430 - - 1 - - C-SPY - 5 - - 27 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 1 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - MSP430 - - 0 - - C-SPY - 5 - - 27 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 0 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - MSP430 - - 1 - - C-SPY - 5 - - 27 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 1 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + MSP430 + + 1 + + C-SPY + 5 + + 27 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 1 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + MSP430 + + 0 + + C-SPY + 5 + + 27 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 0 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + MSP430 + + 1 + + C-SPY + 5 + + 27 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 1 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.ewp b/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.ewp index a85e3f4d..255d3e89 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.ewp +++ b/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.ewp @@ -1,3565 +1,3562 @@ - - - 3 - - Debug - - MSP430 - - 1 - - General - 22 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 1 - - - - - - - ULP430 - 1 - - 1 - 1 - 1 - - - - - - - - - BILINK - 0 - - - - - Release - - MSP430 - - 0 - - General - 22 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 0 - - - - - - - ULP430 - 1 - - 1 - 1 - 0 - - - - - - - - - BILINK - 0 - - - - - Spy - - MSP430 - - 1 - - General - 22 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 1 - - - - - - - ULP430 - 1 - - 1 - 1 - 1 - - - - - - - - - BILINK - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky.c - - - $PROJ_DIR$\..\..\blinky.h - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + MSP430 + + 1 + + General + 22 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 1 + + + + + + + ULP430 + 1 + + 1 + 1 + 1 + + + + + + + + + BILINK + 0 + + + + + Release + + MSP430 + + 0 + + General + 22 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 0 + + + + + + + ULP430 + 1 + + 1 + 1 + 0 + + + + + + + + + BILINK + 0 + + + + + Spy + + MSP430 + + 1 + + General + 22 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 1 + + + + + + + ULP430 + 1 + + 1 + 1 + 1 + + + + + + + + + BILINK + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky.c + + + $PROJ_DIR$\..\..\blinky.h + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.eww b/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.eww index ac3c18a2..c9924856 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.eww +++ b/examples/msp430/blinky_msp-exp430f5529lp/qk/iar/blinky-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\blinky-qk.ewp - - - - - + + + + + $WS_DIR$\blinky-qk.ewp + + + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qv/bsp.c b/examples/msp430/blinky_msp-exp430f5529lp/qv/bsp.c index 16051d4b..1ccca746 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qv/bsp.c +++ b/examples/msp430/blinky_msp-exp430f5529lp/qv/bsp.c @@ -75,7 +75,7 @@ __low_power_mode_off_on_exit(); /* see NOTE1 */ #endif - QF_TICK_X(0U, (void *)0); /* process all time events at rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process all time events at rate 0 */ } diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-gnu/.cproject b/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-gnu/.cproject index 9415d128..43bfdef1 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-gnu/.cproject +++ b/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-gnu/.cproject @@ -1,282 +1,282 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-gnu/.project b/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-gnu/.project index 6bd0d653..f220e8e0 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-gnu/.project +++ b/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-gnu/.project @@ -1,79 +1,79 @@ - - - blinky-qv_msp-exp430f5529lp - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_include - 2 - PARENT-5-PROJECT_LOC/include - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/msp430/qv - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - blinky.c - 1 - PARENT-2-PROJECT_LOC/blinky.c - - - blinky.h - 1 - PARENT-2-PROJECT_LOC/blinky.h - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - qv - 2 - PARENT-5-PROJECT_LOC/src/qv - - - + + + blinky-qv_msp-exp430f5529lp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QP_include + 2 + PARENT-5-PROJECT_LOC/include + + + QP_port + 2 + PARENT-5-PROJECT_LOC/ports/msp430/qv + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + blinky.c + 1 + PARENT-2-PROJECT_LOC/blinky.c + + + blinky.h + 1 + PARENT-2-PROJECT_LOC/blinky.h + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + qv + 2 + PARENT-5-PROJECT_LOC/src/qv + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-ti/.cproject b/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-ti/.cproject index c534f402..f0139772 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-ti/.cproject +++ b/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-ti/.cproject @@ -1,321 +1,321 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-ti/.project b/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-ti/.project index 7263bc0d..0457c7f4 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-ti/.project +++ b/examples/msp430/blinky_msp-exp430f5529lp/qv/ccs-ti/.project @@ -1,79 +1,79 @@ - - - blinky-qv_msp-exp430f5529lp - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_include - 2 - PARENT-5-PROJECT_LOC/include - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/msp430/qv - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - QV - 2 - PARENT-5-PROJECT_LOC/src/qv - - - blinky.c - 1 - PARENT-2-PROJECT_LOC/blinky.c - - - blinky.h - 1 - PARENT-2-PROJECT_LOC/blinky.h - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - + + + blinky-qv_msp-exp430f5529lp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QP_include + 2 + PARENT-5-PROJECT_LOC/include + + + QP_port + 2 + PARENT-5-PROJECT_LOC/ports/msp430/qv + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + QV + 2 + PARENT-5-PROJECT_LOC/src/qv + + + blinky.c + 1 + PARENT-2-PROJECT_LOC/blinky.c + + + blinky.h + 1 + PARENT-2-PROJECT_LOC/blinky.h + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.ewd b/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.ewd index 6d016e89..e19cf414 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.ewd +++ b/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.ewd @@ -1,1186 +1,1186 @@ - - - 3 - - Debug - - MSP430 - - 1 - - C-SPY - 5 - - 27 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 1 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - MSP430 - - 0 - - C-SPY - 5 - - 27 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 0 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - MSP430 - - 1 - - C-SPY - 5 - - 27 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 1 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + MSP430 + + 1 + + C-SPY + 5 + + 27 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 1 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + MSP430 + + 0 + + C-SPY + 5 + + 27 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 0 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + MSP430 + + 1 + + C-SPY + 5 + + 27 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 1 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.ewp b/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.ewp index f723d9e1..8fe0f543 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.ewp +++ b/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.ewp @@ -1,3558 +1,3555 @@ - - - 3 - - Debug - - MSP430 - - 1 - - General - 22 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 1 - - - - - - - ULP430 - 1 - - 1 - 1 - 1 - - - - - - - - - BILINK - 0 - - - - - Release - - MSP430 - - 0 - - General - 22 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 0 - - - - - - - ULP430 - 1 - - 1 - 1 - 0 - - - - - - - - - BILINK - 0 - - - - - Spy - - MSP430 - - 1 - - General - 22 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 1 - - - - - - - ULP430 - 1 - - 1 - 1 - 1 - - - - - - - - - BILINK - 0 - - - - - Application - - $PROJ_DIR$\..\..\blinky.c - - - $PROJ_DIR$\..\..\blinky.h - - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qv_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + MSP430 + + 1 + + General + 22 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 1 + + + + + + + ULP430 + 1 + + 1 + 1 + 1 + + + + + + + + + BILINK + 0 + + + + + Release + + MSP430 + + 0 + + General + 22 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 0 + + + + + + + ULP430 + 1 + + 1 + 1 + 0 + + + + + + + + + BILINK + 0 + + + + + Spy + + MSP430 + + 1 + + General + 22 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 1 + + + + + + + ULP430 + 1 + + 1 + 1 + 1 + + + + + + + + + BILINK + 0 + + + + + Application + + $PROJ_DIR$\..\..\blinky.c + + + $PROJ_DIR$\..\..\blinky.h + + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qv_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.eww b/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.eww index 109eebbd..fa7c7731 100644 --- a/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.eww +++ b/examples/msp430/blinky_msp-exp430f5529lp/qv/iar/blinky-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\blinky-qv.ewp - - - - - + + + + + $WS_DIR$\blinky-qv.ewp + + + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/dpp.h b/examples/msp430/dpp_msp-exp430f5529lp/dpp.h index 533c9ce7..afc340ee 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/dpp.h +++ b/examples/msp430/dpp_msp-exp430f5529lp/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,25 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers (only 2 Philos to save RAM! */ #define N_PHILO ((uint8_t)2) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ -void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ +void Table_ctor(void); +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* DPP_H */ + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/dpp.qm b/examples/msp430/dpp_msp-exp430f5529lp/dpp.qm index b51f5938..0183c4e1 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/dpp.qm +++ b/examples/msp430/dpp_msp-exp430f5529lp/dpp.qm @@ -1,8 +1,6 @@ - - Dining Philosopher Problem example - -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -108,7 +106,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -203,7 +201,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -226,7 +224,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -268,7 +266,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -279,7 +277,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/msp430/dpp_msp-exp430f5529lp/philo.c b/examples/msp430/dpp_msp-exp430f5529lp/philo.c index a9d78c3e..6b3f54c4 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/philo.c +++ b/examples/msp430/dpp_msp-exp430f5529lp/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -61,14 +74,16 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ }; /* Philo definition --------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,12 +93,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -111,22 +128,23 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, EAT_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -141,11 +159,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -153,9 +172,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -164,7 +183,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -178,30 +197,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -216,4 +236,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qk/bsp.c b/examples/msp430/dpp_msp-exp430f5529lp/qk/bsp.c index 8791e240..d2ae7c3c 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qk/bsp.c +++ b/examples/msp430/dpp_msp-exp430f5529lp/qk/bsp.c @@ -91,7 +91,7 @@ static uint32_t l_rnd; #endif QK_ISR_ENTRY(); /* inform QK about entering the ISR */ - QF_TICK_X(0U, (void *)0); /* process all time events at rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process all time events at rate 0 */ QK_ISR_EXIT(); /* inform QK about exiting the ISR */ diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-gnu/.cproject b/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-gnu/.cproject index 24517548..8e018126 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-gnu/.cproject +++ b/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-gnu/.cproject @@ -1,282 +1,282 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-gnu/.project b/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-gnu/.project index d4ff3e2b..dfce373c 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-gnu/.project +++ b/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-gnu/.project @@ -1,84 +1,84 @@ - - - dpp-qk_msp-exp430f5529lp - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_include - 2 - PARENT-5-PROJECT_LOC/include - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/msp430/qk - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - qk - 2 - PARENT-5-PROJECT_LOC/src/qk - - - dpp.h - 1 - PARENT-2-PROJECT_LOC/dpp.h - - - philo.c - 1 - PARENT-2-PROJECT_LOC/philo.c - - - table.c - 1 - PARENT-2-PROJECT_LOC/table.c - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - + + + dpp-qk_msp-exp430f5529lp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QP_include + 2 + PARENT-5-PROJECT_LOC/include + + + QP_port + 2 + PARENT-5-PROJECT_LOC/ports/msp430/qk + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + qk + 2 + PARENT-5-PROJECT_LOC/src/qk + + + dpp.h + 1 + PARENT-2-PROJECT_LOC/dpp.h + + + philo.c + 1 + PARENT-2-PROJECT_LOC/philo.c + + + table.c + 1 + PARENT-2-PROJECT_LOC/table.c + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-ti/.cproject b/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-ti/.cproject index 63bbf75f..3fad4dec 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-ti/.cproject +++ b/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-ti/.cproject @@ -1,320 +1,320 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-ti/.project b/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-ti/.project index d4ff3e2b..dfce373c 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-ti/.project +++ b/examples/msp430/dpp_msp-exp430f5529lp/qk/ccs-ti/.project @@ -1,84 +1,84 @@ - - - dpp-qk_msp-exp430f5529lp - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_include - 2 - PARENT-5-PROJECT_LOC/include - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/msp430/qk - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - qk - 2 - PARENT-5-PROJECT_LOC/src/qk - - - dpp.h - 1 - PARENT-2-PROJECT_LOC/dpp.h - - - philo.c - 1 - PARENT-2-PROJECT_LOC/philo.c - - - table.c - 1 - PARENT-2-PROJECT_LOC/table.c - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - + + + dpp-qk_msp-exp430f5529lp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QP_include + 2 + PARENT-5-PROJECT_LOC/include + + + QP_port + 2 + PARENT-5-PROJECT_LOC/ports/msp430/qk + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + qk + 2 + PARENT-5-PROJECT_LOC/src/qk + + + dpp.h + 1 + PARENT-2-PROJECT_LOC/dpp.h + + + philo.c + 1 + PARENT-2-PROJECT_LOC/philo.c + + + table.c + 1 + PARENT-2-PROJECT_LOC/table.c + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.ewd b/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.ewd index 6d016e89..e19cf414 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.ewd +++ b/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.ewd @@ -1,1186 +1,1186 @@ - - - 3 - - Debug - - MSP430 - - 1 - - C-SPY - 5 - - 27 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 1 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - MSP430 - - 0 - - C-SPY - 5 - - 27 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 0 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - MSP430 - - 1 - - C-SPY - 5 - - 27 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 1 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + MSP430 + + 1 + + C-SPY + 5 + + 27 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 1 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + MSP430 + + 0 + + C-SPY + 5 + + 27 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 0 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + MSP430 + + 1 + + C-SPY + 5 + + 27 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 1 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.ewp b/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.ewp index 7d43bd89..c50fc4bf 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.ewp +++ b/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.ewp @@ -1,3568 +1,3565 @@ - - - 3 - - Debug - - MSP430 - - 1 - - General - 22 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 1 - - - - - - - ULP430 - 1 - - 1 - 1 - 1 - - - - - - - - - BILINK - 0 - - - - - Release - - MSP430 - - 0 - - General - 22 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 0 - - - - - - - ULP430 - 1 - - 1 - 1 - 0 - - - - - - - - - BILINK - 0 - - - - - Spy - - MSP430 - - 1 - - General - 22 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 1 - - - - - - - ULP430 - 1 - - 1 - 1 - 1 - - - - - - - - - BILINK - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c - - - $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qk_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + MSP430 + + 1 + + General + 22 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 1 + + + + + + + ULP430 + 1 + + 1 + 1 + 1 + + + + + + + + + BILINK + 0 + + + + + Release + + MSP430 + + 0 + + General + 22 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 0 + + + + + + + ULP430 + 1 + + 1 + 1 + 0 + + + + + + + + + BILINK + 0 + + + + + Spy + + MSP430 + + 1 + + General + 22 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 1 + + + + + + + ULP430 + 1 + + 1 + 1 + 1 + + + + + + + + + BILINK + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk\qk.c + + + $PROJ_DIR$\..\..\..\..\..\src\qk_pkg.h + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qk_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qk\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.eww b/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.eww index b41c128d..c261124a 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.eww +++ b/examples/msp430/dpp_msp-exp430f5529lp/qk/iar/dpp-qk.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qk.ewp - - - - - + + + + + $WS_DIR$\dpp-qk.ewp + + + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qv/bsp.c b/examples/msp430/dpp_msp-exp430f5529lp/qv/bsp.c index 8bcd43fb..87eaf381 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qv/bsp.c +++ b/examples/msp430/dpp_msp-exp430f5529lp/qv/bsp.c @@ -90,7 +90,7 @@ static uint32_t l_rnd; (((BSP_SMCLK / 8) + BSP_TICKS_PER_SEC/2) / BSP_TICKS_PER_SEC) + 1; #endif - QF_TICK_X(0U, (void *)0); /* process all time events at rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* process all time events at rate 0 */ } diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-gnu/.cproject b/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-gnu/.cproject index 9e1a59f8..06bfd46a 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-gnu/.cproject +++ b/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-gnu/.cproject @@ -1,282 +1,282 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-gnu/.project b/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-gnu/.project index 8cc556ef..a7f534be 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-gnu/.project +++ b/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-gnu/.project @@ -1,84 +1,84 @@ - - - dpp-qv_msp-exp430f5529lp - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_include - 2 - PARENT-5-PROJECT_LOC/include - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/msp430/qv - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - qv - 2 - PARENT-5-PROJECT_LOC/src/qv - - - dpp.h - 1 - PARENT-2-PROJECT_LOC/dpp.h - - - philo.c - 1 - PARENT-2-PROJECT_LOC/philo.c - - - table.c - 1 - PARENT-2-PROJECT_LOC/table.c - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - + + + dpp-qv_msp-exp430f5529lp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QP_include + 2 + PARENT-5-PROJECT_LOC/include + + + QP_port + 2 + PARENT-5-PROJECT_LOC/ports/msp430/qv + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + qv + 2 + PARENT-5-PROJECT_LOC/src/qv + + + dpp.h + 1 + PARENT-2-PROJECT_LOC/dpp.h + + + philo.c + 1 + PARENT-2-PROJECT_LOC/philo.c + + + table.c + 1 + PARENT-2-PROJECT_LOC/table.c + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-ti/.cproject b/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-ti/.cproject index c686fc8c..1ea7bb88 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-ti/.cproject +++ b/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-ti/.cproject @@ -1,320 +1,320 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-ti/.project b/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-ti/.project index 51cc5ddb..b8816529 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-ti/.project +++ b/examples/msp430/dpp_msp-exp430f5529lp/qv/ccs-ti/.project @@ -1,84 +1,84 @@ - - - dpp-qv_msp-exp430f5529lp - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_include - 2 - PARENT-5-PROJECT_LOC/include - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/msp430/qv - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - QV - 2 - PARENT-5-PROJECT_LOC/src/qv - - - dpp.h - 1 - PARENT-2-PROJECT_LOC/dpp.h - - - philo.c - 1 - PARENT-2-PROJECT_LOC/philo.c - - - table.c - 1 - PARENT-2-PROJECT_LOC/table.c - - - bsp.c - 1 - PARENT-1-PROJECT_LOC/bsp.c - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - main.c - 1 - PARENT-2-PROJECT_LOC/main.c - - - + + + dpp-qv_msp-exp430f5529lp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + QP + 2 + PARENT-5-PROJECT_LOC/src/qf + + + QP_include + 2 + PARENT-5-PROJECT_LOC/include + + + QP_port + 2 + PARENT-5-PROJECT_LOC/ports/msp430/qv + + + QS + 2 + PARENT-5-PROJECT_LOC/src/qs + + + QV + 2 + PARENT-5-PROJECT_LOC/src/qv + + + dpp.h + 1 + PARENT-2-PROJECT_LOC/dpp.h + + + philo.c + 1 + PARENT-2-PROJECT_LOC/philo.c + + + table.c + 1 + PARENT-2-PROJECT_LOC/table.c + + + bsp.c + 1 + PARENT-1-PROJECT_LOC/bsp.c + + + bsp.h + 1 + PARENT-2-PROJECT_LOC/bsp.h + + + main.c + 1 + PARENT-2-PROJECT_LOC/main.c + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.ewd b/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.ewd index 6d016e89..e19cf414 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.ewd +++ b/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.ewd @@ -1,1186 +1,1186 @@ - - - 3 - - Debug - - MSP430 - - 1 - - C-SPY - 5 - - 27 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 1 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - MSP430 - - 0 - - C-SPY - 5 - - 27 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 0 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - MSP430 - - 1 - - C-SPY - 5 - - 27 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 430FET - 1 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SIM430 - 1 - - 5 - 1 - 1 - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + MSP430 + + 1 + + C-SPY + 5 + + 27 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 1 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + MSP430 + + 0 + + C-SPY + 5 + + 27 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 0 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + MSP430 + + 1 + + C-SPY + 5 + + 27 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 430FET + 1 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIM430 + 1 + + 5 + 1 + 1 + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.ewp b/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.ewp index c16c0c36..58339245 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.ewp +++ b/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.ewp @@ -1,3557 +1,3554 @@ - - - 3 - - Debug - - MSP430 - - 1 - - General - 22 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 1 - - - - - - - ULP430 - 1 - - 1 - 1 - 1 - - - - - - - - - BILINK - 0 - - - - - Release - - MSP430 - - 0 - - General - 22 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 0 - - - - - - - ULP430 - 1 - - 1 - 1 - 0 - - - - - - - - - BILINK - 0 - - - - - Spy - - MSP430 - - 1 - - General - 22 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICC430 - 4 - - 38 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A430 - 5 - - 14 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - XLINK - 4 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XAR - 4 - - 0 - 1 - 1 - - - - - - - ULP430 - 1 - - 1 - 1 - 1 - - - - - - - - - BILINK - 0 - - - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\..\bsp.h - - - $PROJ_DIR$\..\..\dpp.h - - - $PROJ_DIR$\..\..\main.c - - - $PROJ_DIR$\..\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\..\table.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qs_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qv_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - + + + 3 + + Debug + + MSP430 + + 1 + + General + 22 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 1 + + + + + + + ULP430 + 1 + + 1 + 1 + 1 + + + + + + + + + BILINK + 0 + + + + + Release + + MSP430 + + 0 + + General + 22 + + 34 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 0 + + + + + + + ULP430 + 1 + + 1 + 1 + 0 + + + + + + + + + BILINK + 0 + + + + + Spy + + MSP430 + + 1 + + General + 22 + + 34 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC430 + 4 + + 38 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A430 + 5 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + XLINK + 4 + + 30 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 4 + + 0 + 1 + 1 + + + + + + + ULP430 + 1 + + 1 + 1 + 1 + + + + + + + + + BILINK + 0 + + + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\..\bsp.h + + + $PROJ_DIR$\..\..\dpp.h + + + $PROJ_DIR$\..\..\main.c + + + $PROJ_DIR$\..\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\..\table.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_actq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + $PROJ_DIR$\..\..\..\..\..\src\qv\qv.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qs_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\msp430\qv\qv_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.eww b/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.eww index 8999816a..b96f3f62 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.eww +++ b/examples/msp430/dpp_msp-exp430f5529lp/qv/iar/dpp-qv.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp-qv.ewp - - - - - + + + + + $WS_DIR$\dpp-qv.ewp + + + + + diff --git a/examples/msp430/dpp_msp-exp430f5529lp/table.c b/examples/msp430/dpp_msp-exp430f5529lp/table.c index 4fa7aee6..c16a8a79 100644 --- a/examples/msp430/dpp_msp-exp430f5529lp/table.c +++ b/examples/msp430/dpp_msp-exp430f5529lp/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -53,14 +66,16 @@ static Table l_table; /* the single instance of the Table active object */ QActive * const AO_Table = &l_table.super; /* "opaque" AO pointer */ /*..........................................................................*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -72,12 +87,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -108,17 +125,18 @@ static QState Table_initial(Table * const me, void const * const par) { } return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TERMINATE} */ + /*${AOs::Table::SM::active::TERMINATE} */ case TERMINATE_SIG: { BSP_terminate(0); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -131,11 +149,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -149,7 +168,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -157,7 +176,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -167,25 +186,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -209,7 +228,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -220,19 +239,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -244,28 +263,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -275,7 +295,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -300,4 +320,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/pic32/blinky_microstick2-pic32/qk/xc32/bsp.c b/examples/pic32/blinky_microstick2-pic32/qk/xc32/bsp.c index 5150a3f4..68163d65 100644 --- a/examples/pic32/blinky_microstick2-pic32/qk/xc32/bsp.c +++ b/examples/pic32/blinky_microstick2-pic32/qk/xc32/bsp.c @@ -68,7 +68,7 @@ void __ISR(_TIMER_2_VECTOR, IPL4SOFT) tickISR(void) { IFS0CLR = _IFS0_T2IF_MASK; /* clear the interrupt source */ - QF_TICK_X(0U, (void *)0); /* handle armed time events at tick rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* handle armed time events at tick rate 0 */ QK_ISR_EXIT(); /* inform QK about the ISR exit */ } diff --git a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/Makefile-genesis.properties b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/Makefile-genesis.properties index 01df6e6b..78280d04 100644 --- a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/Makefile-genesis.properties +++ b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/Makefile-genesis.properties @@ -1,15 +1,15 @@ -# -#Sun Apr 03 16:59:12 EDT 2022 -rel.languagetoolchain.version=2.20 -spy.languagetoolchain.version=2.20 -conf.ids=dbg,rel,spy -spy.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -configurations-xml=490c3184559756a964c38ccac5997e93 -dbg.languagetoolchain.version=2.20 -com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=37eccb08230908d044ad3fe14e24ea9a -dbg.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -spy.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -rel.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -dbg.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -rel.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -host.platform=windows +# +#Sun Apr 03 16:59:12 EDT 2022 +rel.languagetoolchain.version=2.20 +spy.languagetoolchain.version=2.20 +conf.ids=dbg,rel,spy +spy.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +configurations-xml=490c3184559756a964c38ccac5997e93 +dbg.languagetoolchain.version=2.20 +com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=37eccb08230908d044ad3fe14e24ea9a +dbg.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +spy.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +rel.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +dbg.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +rel.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +host.platform=windows diff --git a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/configurations.xml b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/configurations.xml index bb3e1ce3..aeae7adc 100644 --- a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/configurations.xml +++ b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/configurations.xml @@ -1,759 +1,759 @@ - - - - - - - - - ../../../../../src/qf/qep_hsm.c - ../../../../../src/qf/qep_msm.c - ../../../../../src/qf/qf_act.c - ../../../../../src/qf/qf_actq.c - ../../../../../src/qf/qf_defer.c - ../../../../../src/qf/qf_dyn.c - ../../../../../src/qf/qf_mem.c - ../../../../../src/qf/qf_ps.c - ../../../../../src/qf/qf_qact.c - ../../../../../src/qf/qf_qeq.c - ../../../../../src/qf/qf_qmact.c - ../../../../../src/qf/qf_time.c - ../../../../../src/qk/qk.c - ../../../../../ports/pic32/qk/xc32/qk_port.c - - - ../../../../../src/qs/qs.c - ../../../../../src/qs/qs_64bit.c - ../../../../../src/qs/qs_fp.c - ../../../../../src/qs/qs_rx.c - - - bsp.c - ../../blinky.c - ../../blinky.h - ../../bsp.h - ../../main.c - ../../../../../include/qstamp.c - - - Makefile - - - - ../.. - ../../../../../src/qf - ../../../../../src/qv - ../../../../../include - ../../../../../src/qs - ../../../../../src/qk - ../../../../../ports/pic32/qk/xc32 - - Makefile - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + ../../../../../src/qf/qep_hsm.c + ../../../../../src/qf/qep_msm.c + ../../../../../src/qf/qf_act.c + ../../../../../src/qf/qf_actq.c + ../../../../../src/qf/qf_defer.c + ../../../../../src/qf/qf_dyn.c + ../../../../../src/qf/qf_mem.c + ../../../../../src/qf/qf_ps.c + ../../../../../src/qf/qf_qact.c + ../../../../../src/qf/qf_qeq.c + ../../../../../src/qf/qf_qmact.c + ../../../../../src/qf/qf_time.c + ../../../../../src/qk/qk.c + ../../../../../ports/pic32/qk/xc32/qk_port.c + + + ../../../../../src/qs/qs.c + ../../../../../src/qs/qs_64bit.c + ../../../../../src/qs/qs_fp.c + ../../../../../src/qs/qs_rx.c + + + bsp.c + ../../blinky.c + ../../blinky.h + ../../bsp.h + ../../main.c + ../../../../../include/qstamp.c + + + Makefile + + + + ../.. + ../../../../../src/qf + ../../../../../src/qv + ../../../../../include + ../../../../../src/qs + ../../../../../src/qk + ../../../../../ports/pic32/qk/xc32 + + Makefile + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/private/configurations.xml b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/private/configurations.xml index ad8abed4..235f1d64 100644 --- a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/private/configurations.xml +++ b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/private/configurations.xml @@ -1,61 +1,61 @@ - - - Makefile - 0 - - - :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>8107:=<rev>0002:=<man>Microchip Technology Incorporated:=<prod>Microstick II SK:=<sn>BUR123045184:=<drv>x:=<xpt>h:=end - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - :=MPLABCommUSB:=04D8:=8107:=0002:=Microchip Technology Incorporated:=Microstick II SK:=BUR123045184:=x:=en - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - + + + Makefile + 0 + + + :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>8107:=<rev>0002:=<man>Microchip Technology Incorporated:=<prod>Microstick II SK:=<sn>BUR123045184:=<drv>x:=<xpt>h:=end + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + :=MPLABCommUSB:=04D8:=8107:=0002:=Microchip Technology Incorporated:=Microstick II SK:=BUR123045184:=x:=en + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + diff --git a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/private/private.xml b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/private/private.xml index dcca50e2..cd3e03d7 100644 --- a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/private/private.xml +++ b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/private/private.xml @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/project.xml b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/project.xml index 75ea4db1..1651addf 100644 --- a/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/project.xml +++ b/examples/pic32/blinky_microstick2-pic32/qk/xc32/nbproject/project.xml @@ -1,43 +1,43 @@ - - - com.microchip.mplab.nbide.embedded.makeproject - - - blinky-microstick2-pic32-qk - e9bbb168-4146-4fa4-b2f4-357b75b20ee3 - 0 - c - - h - ISO-8859-1 - - - - ../.. - ../../../../../src/qf - ../../../../../src/qv - ../../../../../include - ../../../../../src/qs - ../../../../../src/qk - ../../../../../ports/pic32/qk/xc32 - - - - dbg - 2 - - - rel - 2 - - - spy - 2 - - - - false - - - - + + + com.microchip.mplab.nbide.embedded.makeproject + + + blinky-microstick2-pic32-qk + e9bbb168-4146-4fa4-b2f4-357b75b20ee3 + 0 + c + + h + ISO-8859-1 + + + + ../.. + ../../../../../src/qf + ../../../../../src/qv + ../../../../../include + ../../../../../src/qs + ../../../../../src/qk + ../../../../../ports/pic32/qk/xc32 + + + + dbg + 2 + + + rel + 2 + + + spy + 2 + + + + false + + + + diff --git a/examples/pic32/blinky_microstick2-pic32/qv/xc32/bsp.c b/examples/pic32/blinky_microstick2-pic32/qv/xc32/bsp.c index 5c7c10f8..e40b01e7 100644 --- a/examples/pic32/blinky_microstick2-pic32/qv/xc32/bsp.c +++ b/examples/pic32/blinky_microstick2-pic32/qv/xc32/bsp.c @@ -66,7 +66,7 @@ Q_DEFINE_THIS_FILE void __ISR(_TIMER_2_VECTOR, IPL4SOFT) tickISR(void) { IFS0CLR = _IFS0_T2IF_MASK; /* clear the interrupt source */ - QF_TICK_X(0U, (void *)0); /* handle armed time events at tick rate 0 */ + QTIMEEVT_TICK_X(0U, (void *)0); /* handle armed time events at tick rate 0 */ } /*..........................................................................*/ /* for testing interrupt nesting and active object preemption */ diff --git a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/Makefile-genesis.properties b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/Makefile-genesis.properties index 408705d7..3a286ef6 100644 --- a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/Makefile-genesis.properties +++ b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/Makefile-genesis.properties @@ -1,15 +1,15 @@ -# -#Sun Apr 03 16:58:04 EDT 2022 -rel.languagetoolchain.version=2.20 -spy.languagetoolchain.version=2.20 -conf.ids=dbg,rel,spy -spy.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -configurations-xml=10f9e955cf8596c41b2b4749e1eb4175 -dbg.languagetoolchain.version=2.20 -com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=37eccb08230908d044ad3fe14e24ea9a -dbg.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -spy.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -rel.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -dbg.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -rel.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -host.platform=windows +# +#Sun Apr 03 16:58:04 EDT 2022 +rel.languagetoolchain.version=2.20 +spy.languagetoolchain.version=2.20 +conf.ids=dbg,rel,spy +spy.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +configurations-xml=10f9e955cf8596c41b2b4749e1eb4175 +dbg.languagetoolchain.version=2.20 +com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=37eccb08230908d044ad3fe14e24ea9a +dbg.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +spy.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +rel.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +dbg.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +rel.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +host.platform=windows diff --git a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/configurations.xml b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/configurations.xml index 7027a4b4..c74467f0 100644 --- a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/configurations.xml +++ b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/configurations.xml @@ -1,758 +1,758 @@ - - - - - bsp.h - dpp.h - - - - - ../../../../../src/qf/qep_hsm.c - ../../../../../src/qf/qep_msm.c - ../../../../../src/qf/qf_act.c - ../../../../../src/qf/qf_actq.c - ../../../../../src/qf/qf_defer.c - ../../../../../src/qf/qf_dyn.c - ../../../../../src/qf/qf_mem.c - ../../../../../src/qf/qf_ps.c - ../../../../../src/qf/qf_qact.c - ../../../../../src/qf/qf_qeq.c - ../../../../../src/qf/qf_qmact.c - ../../../../../src/qf/qf_time.c - ../../../../../src/qv/qv.c - - - ../../../../../src/qs/qs.c - ../../../../../src/qs/qs_64bit.c - ../../../../../src/qs/qs_fp.c - ../../../../../src/qs/qs_rx.c - - - bsp.c - ../../blinky.c - ../../blinky.h - ../../bsp.h - ../../main.c - ../../../../../include/qstamp.c - - - Makefile - - - - ../.. - ../../../../../src/qf - ../../../../../src/qv - ../../../../../include - ../../../../../src/qs - - Makefile - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + bsp.h + dpp.h + + + + + ../../../../../src/qf/qep_hsm.c + ../../../../../src/qf/qep_msm.c + ../../../../../src/qf/qf_act.c + ../../../../../src/qf/qf_actq.c + ../../../../../src/qf/qf_defer.c + ../../../../../src/qf/qf_dyn.c + ../../../../../src/qf/qf_mem.c + ../../../../../src/qf/qf_ps.c + ../../../../../src/qf/qf_qact.c + ../../../../../src/qf/qf_qeq.c + ../../../../../src/qf/qf_qmact.c + ../../../../../src/qf/qf_time.c + ../../../../../src/qv/qv.c + + + ../../../../../src/qs/qs.c + ../../../../../src/qs/qs_64bit.c + ../../../../../src/qs/qs_fp.c + ../../../../../src/qs/qs_rx.c + + + bsp.c + ../../blinky.c + ../../blinky.h + ../../bsp.h + ../../main.c + ../../../../../include/qstamp.c + + + Makefile + + + + ../.. + ../../../../../src/qf + ../../../../../src/qv + ../../../../../include + ../../../../../src/qs + + Makefile + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/private/configurations.xml b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/private/configurations.xml index 66e40954..c6a22c80 100644 --- a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/private/configurations.xml +++ b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/private/configurations.xml @@ -1,61 +1,61 @@ - - - Makefile - 0 - - - - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>8107:=<rev>0002:=<man>Microchip Technology Incorporated:=<prod>Microstick II SK:=<sn>BUR123045184:=<drv>x:=<xpt>h:=end - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - :=MPLABCommUSB:=04D8:=8107:=0002:=Microchip Technology Incorporated:=Microstick II SK:=BUR123045184:=x:=en - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - + + + Makefile + 0 + + + + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>8107:=<rev>0002:=<man>Microchip Technology Incorporated:=<prod>Microstick II SK:=<sn>BUR123045184:=<drv>x:=<xpt>h:=end + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + :=MPLABCommUSB:=04D8:=8107:=0002:=Microchip Technology Incorporated:=Microstick II SK:=BUR123045184:=x:=en + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + diff --git a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/private/private.xml b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/private/private.xml index dcca50e2..cd3e03d7 100644 --- a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/private/private.xml +++ b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/private/private.xml @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/project.xml b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/project.xml index 680a1873..a1a3833c 100644 --- a/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/project.xml +++ b/examples/pic32/blinky_microstick2-pic32/qv/xc32/nbproject/project.xml @@ -1,41 +1,41 @@ - - - com.microchip.mplab.nbide.embedded.makeproject - - - blinky-microstick2-pic32-qv - e9bbb168-4146-4fa4-b2f4-357b75b20ee3 - 0 - c - - h - ISO-8859-1 - - - - ../.. - ../../../../../src/qf - ../../../../../src/qv - ../../../../../include - ../../../../../src/qs - - - - dbg - 2 - - - rel - 2 - - - spy - 2 - - - - false - - - - + + + com.microchip.mplab.nbide.embedded.makeproject + + + blinky-microstick2-pic32-qv + e9bbb168-4146-4fa4-b2f4-357b75b20ee3 + 0 + c + + h + ISO-8859-1 + + + + ../.. + ../../../../../src/qf + ../../../../../src/qv + ../../../../../include + ../../../../../src/qs + + + + dbg + 2 + + + rel + 2 + + + spy + 2 + + + + false + + + + diff --git a/examples/pic32/dpp_microstick2-pic32/dpp.h b/examples/pic32/dpp_microstick2-pic32/dpp.h index 533c9ce7..afc340ee 100644 --- a/examples/pic32/dpp_microstick2-pic32/dpp.h +++ b/examples/pic32/dpp_microstick2-pic32/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,25 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers (only 2 Philos to save RAM! */ #define N_PHILO ((uint8_t)2) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ -void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ +void Table_ctor(void); +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* DPP_H */ + diff --git a/examples/pic32/dpp_microstick2-pic32/dpp.qm b/examples/pic32/dpp_microstick2-pic32/dpp.qm index b51f5938..0183c4e1 100644 --- a/examples/pic32/dpp_microstick2-pic32/dpp.qm +++ b/examples/pic32/dpp_microstick2-pic32/dpp.qm @@ -1,8 +1,6 @@ - - Dining Philosopher Problem example - -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -108,7 +106,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -203,7 +201,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -226,7 +224,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -268,7 +266,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -279,7 +277,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/pic32/dpp_microstick2-pic32/philo.c b/examples/pic32/dpp_microstick2-pic32/philo.c index a9d78c3e..6b3f54c4 100644 --- a/examples/pic32/dpp_microstick2-pic32/philo.c +++ b/examples/pic32/dpp_microstick2-pic32/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -61,14 +74,16 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ }; /* Philo definition --------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,12 +93,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -111,22 +128,23 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, EAT_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -141,11 +159,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -153,9 +172,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -164,7 +183,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -178,30 +197,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -216,4 +236,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/pic32/dpp_microstick2-pic32/qk/xc32/bsp.c b/examples/pic32/dpp_microstick2-pic32/qk/xc32/bsp.c index 12a7fa5b..f0c9d6af 100644 --- a/examples/pic32/dpp_microstick2-pic32/qk/xc32/bsp.c +++ b/examples/pic32/dpp_microstick2-pic32/qk/xc32/bsp.c @@ -77,7 +77,7 @@ void __ISR(_TIMER_2_VECTOR, IPL4SOFT) tickISR(void) { IFS0CLR = _IFS0_T2IF_MASK; /* clear the interrupt source */ - QF_TICK_X(0U, &l_tickISR); /* handle armed time events at tick rate 0 */ + QTIMEEVT_TICK_X(0U, &l_tickISR); /* handle armed time events at tick rate 0 */ QK_ISR_EXIT(); /* inform QK about the ISR exit */ } diff --git a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/Makefile-genesis.properties b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/Makefile-genesis.properties index 45076fec..45ea593f 100644 --- a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/Makefile-genesis.properties +++ b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/Makefile-genesis.properties @@ -1,15 +1,15 @@ -# -#Sun Apr 10 14:42:23 EDT 2022 -rel.languagetoolchain.version=2.20 -spy.languagetoolchain.version=2.20 -conf.ids=dbg,rel,spy -spy.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -configurations-xml=04073c72f94d75f5d8e01266dd4659c9 -dbg.languagetoolchain.version=2.20 -com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=37eccb08230908d044ad3fe14e24ea9a -dbg.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -spy.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -rel.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -dbg.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -rel.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -host.platform=windows +# +#Sun Apr 10 14:42:23 EDT 2022 +rel.languagetoolchain.version=2.20 +spy.languagetoolchain.version=2.20 +conf.ids=dbg,rel,spy +spy.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +configurations-xml=04073c72f94d75f5d8e01266dd4659c9 +dbg.languagetoolchain.version=2.20 +com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=37eccb08230908d044ad3fe14e24ea9a +dbg.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +spy.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +rel.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +dbg.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +rel.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +host.platform=windows diff --git a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/configurations.xml b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/configurations.xml index bf3dc1e8..4a6839e9 100644 --- a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/configurations.xml +++ b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/configurations.xml @@ -1,759 +1,759 @@ - - - - - - - - - ../../../../../src/qf/qep_hsm.c - ../../../../../src/qf/qep_msm.c - ../../../../../src/qf/qf_act.c - ../../../../../src/qf/qf_actq.c - ../../../../../src/qf/qf_defer.c - ../../../../../src/qf/qf_dyn.c - ../../../../../src/qf/qf_mem.c - ../../../../../src/qf/qf_ps.c - ../../../../../src/qf/qf_qact.c - ../../../../../src/qf/qf_qeq.c - ../../../../../src/qf/qf_qmact.c - ../../../../../src/qf/qf_time.c - ../../../../../src/qk/qk.c - ../../../../../ports/pic32/qk/xc32/qk_port.c - - - ../../../../../src/qs/qs.c - ../../../../../src/qs/qs_64bit.c - ../../../../../src/qs/qs_fp.c - ../../../../../src/qs/qs_rx.c - - - bsp.c - ../../bsp.h - ../../main.c - ../../../../../include/qstamp.c - ../../philo.c - ../../table.c - - - Makefile - - - - ../.. - ../../../../../src/qf - ../../../../../src/qv - ../../../../../include - ../../../../../src/qs - ../../../../../src/qk - ../../../../../ports/pic32/qk/xc32 - - Makefile - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + ../../../../../src/qf/qep_hsm.c + ../../../../../src/qf/qep_msm.c + ../../../../../src/qf/qf_act.c + ../../../../../src/qf/qf_actq.c + ../../../../../src/qf/qf_defer.c + ../../../../../src/qf/qf_dyn.c + ../../../../../src/qf/qf_mem.c + ../../../../../src/qf/qf_ps.c + ../../../../../src/qf/qf_qact.c + ../../../../../src/qf/qf_qeq.c + ../../../../../src/qf/qf_qmact.c + ../../../../../src/qf/qf_time.c + ../../../../../src/qk/qk.c + ../../../../../ports/pic32/qk/xc32/qk_port.c + + + ../../../../../src/qs/qs.c + ../../../../../src/qs/qs_64bit.c + ../../../../../src/qs/qs_fp.c + ../../../../../src/qs/qs_rx.c + + + bsp.c + ../../bsp.h + ../../main.c + ../../../../../include/qstamp.c + ../../philo.c + ../../table.c + + + Makefile + + + + ../.. + ../../../../../src/qf + ../../../../../src/qv + ../../../../../include + ../../../../../src/qs + ../../../../../src/qk + ../../../../../ports/pic32/qk/xc32 + + Makefile + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/private/configurations.xml b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/private/configurations.xml index c243f609..01328964 100644 --- a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/private/configurations.xml +++ b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/private/configurations.xml @@ -1,61 +1,61 @@ - - - Makefile - 0 - - - - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - + + + Makefile + 0 + + + + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + diff --git a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/private/private.xml b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/private/private.xml index 3591fbed..4f8159a2 100644 --- a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/private/private.xml +++ b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/private/private.xml @@ -1,10 +1,10 @@ - - - - - - - file:/C:/qp-dev/qpc/src/qs/qs_64bit.c - - - + + + + + + + file:/C:/qp-dev/qpc/src/qs/qs_64bit.c + + + diff --git a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/project.xml b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/project.xml index a4562daf..8d1ac3fb 100644 --- a/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/project.xml +++ b/examples/pic32/dpp_microstick2-pic32/qk/xc32/nbproject/project.xml @@ -1,43 +1,43 @@ - - - com.microchip.mplab.nbide.embedded.makeproject - - - dpp-microstick2-pic32-qk - e9bbb168-4146-4fa4-b2f4-357b75b20ee3 - 0 - c - - h - ISO-8859-1 - - - - ../.. - ../../../../../src/qf - ../../../../../src/qv - ../../../../../include - ../../../../../src/qs - ../../../../../src/qk - ../../../../../ports/pic32/qk/xc32 - - - - dbg - 2 - - - rel - 2 - - - spy - 2 - - - - false - - - - + + + com.microchip.mplab.nbide.embedded.makeproject + + + dpp-microstick2-pic32-qk + e9bbb168-4146-4fa4-b2f4-357b75b20ee3 + 0 + c + + h + ISO-8859-1 + + + + ../.. + ../../../../../src/qf + ../../../../../src/qv + ../../../../../include + ../../../../../src/qs + ../../../../../src/qk + ../../../../../ports/pic32/qk/xc32 + + + + dbg + 2 + + + rel + 2 + + + spy + 2 + + + + false + + + + diff --git a/examples/pic32/dpp_microstick2-pic32/qv/xc32/bsp.c b/examples/pic32/dpp_microstick2-pic32/qv/xc32/bsp.c index 33637a6d..68bd9a2e 100644 --- a/examples/pic32/dpp_microstick2-pic32/qv/xc32/bsp.c +++ b/examples/pic32/dpp_microstick2-pic32/qv/xc32/bsp.c @@ -75,7 +75,7 @@ static uint32_t l_rnd; /* random seed */ void __ISR(_TIMER_2_VECTOR, IPL4SOFT) tickISR(void) { IFS0CLR = _IFS0_T2IF_MASK; /* clear the interrupt source */ - QF_TICK_X(0U, &l_tickISR); /* handle armed time events at tick rate 0 */ + QTIMEEVT_TICK_X(0U, &l_tickISR); /* handle armed time events at tick rate 0 */ } /*..........................................................................*/ /* for testing interrupt nesting and active object preemption */ diff --git a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/Makefile-genesis.properties b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/Makefile-genesis.properties index a3da2a3d..ce82ca05 100644 --- a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/Makefile-genesis.properties +++ b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/Makefile-genesis.properties @@ -1,15 +1,15 @@ -# -#Sun Apr 10 14:39:24 EDT 2022 -rel.languagetoolchain.version=2.20 -spy.languagetoolchain.version=2.20 -conf.ids=dbg,rel,spy -spy.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -configurations-xml=81ece444600c50e6179ff7a988b40f60 -dbg.languagetoolchain.version=2.20 -com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=37eccb08230908d044ad3fe14e24ea9a -dbg.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -spy.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -rel.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -dbg.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin -rel.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 -host.platform=windows +# +#Sun Apr 10 14:39:24 EDT 2022 +rel.languagetoolchain.version=2.20 +spy.languagetoolchain.version=2.20 +conf.ids=dbg,rel,spy +spy.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +configurations-xml=81ece444600c50e6179ff7a988b40f60 +dbg.languagetoolchain.version=2.20 +com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=37eccb08230908d044ad3fe14e24ea9a +dbg.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +spy.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +rel.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +dbg.languagetoolchain.dir=C\:\\tools\\Microchip\\xc32\\bin +rel.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=af6fe09cc582a0daace7b80bb4f7bbe2 +host.platform=windows diff --git a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/configurations.xml b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/configurations.xml index aed24635..7f6e6b64 100644 --- a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/configurations.xml +++ b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/configurations.xml @@ -1,756 +1,756 @@ - - - - - - - - - ../../../../../src/qf/qep_hsm.c - ../../../../../src/qf/qep_msm.c - ../../../../../src/qf/qf_act.c - ../../../../../src/qf/qf_actq.c - ../../../../../src/qf/qf_defer.c - ../../../../../src/qf/qf_dyn.c - ../../../../../src/qf/qf_mem.c - ../../../../../src/qf/qf_ps.c - ../../../../../src/qf/qf_qact.c - ../../../../../src/qf/qf_qeq.c - ../../../../../src/qf/qf_qmact.c - ../../../../../src/qf/qf_time.c - ../../../../../src/qv/qv.c - - - ../../../../../src/qs/qs.c - ../../../../../src/qs/qs_64bit.c - ../../../../../src/qs/qs_fp.c - ../../../../../src/qs/qs_rx.c - - - bsp.c - ../../bsp.h - ../../main.c - ../../../../../include/qstamp.c - ../../philo.c - ../../table.c - - - Makefile - - - - ../.. - ../../../../../src/qf - ../../../../../src/qv - ../../../../../include - ../../../../../src/qs - - Makefile - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost - PIC32MX250F128B - - - PKOBSKDEPlatformTool - XC32 - 2.20 - 3 - - - - - - - - - - - - - false - false - - - - - - - false - - false - - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + ../../../../../src/qf/qep_hsm.c + ../../../../../src/qf/qep_msm.c + ../../../../../src/qf/qf_act.c + ../../../../../src/qf/qf_actq.c + ../../../../../src/qf/qf_defer.c + ../../../../../src/qf/qf_dyn.c + ../../../../../src/qf/qf_mem.c + ../../../../../src/qf/qf_ps.c + ../../../../../src/qf/qf_qact.c + ../../../../../src/qf/qf_qeq.c + ../../../../../src/qf/qf_qmact.c + ../../../../../src/qf/qf_time.c + ../../../../../src/qv/qv.c + + + ../../../../../src/qs/qs.c + ../../../../../src/qs/qs_64bit.c + ../../../../../src/qs/qs_fp.c + ../../../../../src/qs/qs_rx.c + + + bsp.c + ../../bsp.h + ../../main.c + ../../../../../include/qstamp.c + ../../philo.c + ../../table.c + + + Makefile + + + + ../.. + ../../../../../src/qf + ../../../../../src/qv + ../../../../../include + ../../../../../src/qs + + Makefile + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + PIC32MX250F128B + + + PKOBSKDEPlatformTool + XC32 + 2.20 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/private/configurations.xml b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/private/configurations.xml index 30535cb5..31417c1a 100644 --- a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/private/configurations.xml +++ b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/private/configurations.xml @@ -1,61 +1,61 @@ - - - Makefile - 0 - - - - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>8107:=<rev>0002:=<man>Microchip Technology Incorporated:=<prod>Microstick II SK:=<sn>BUR123045184:=<drv>x:=<xpt>h:=end - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>8107:=<rev>0002:=<man>Microchip Technology Incorporated:=<prod>Microstick II SK:=<sn>BUR123045184:=<drv>x:=<xpt>h:=end - C:\tools\Microchip\xc32\bin - - place holder 1 - place holder 2 - - - - - true - 0 - 0 - 0 - - - - - - + + + Makefile + 0 + + + + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>8107:=<rev>0002:=<man>Microchip Technology Incorporated:=<prod>Microstick II SK:=<sn>BUR123045184:=<drv>x:=<xpt>h:=end + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>8107:=<rev>0002:=<man>Microchip Technology Incorporated:=<prod>Microstick II SK:=<sn>BUR123045184:=<drv>x:=<xpt>h:=end + C:\tools\Microchip\xc32\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + diff --git a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/private/private.xml b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/private/private.xml index dcca50e2..cd3e03d7 100644 --- a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/private/private.xml +++ b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/private/private.xml @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/project.xml b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/project.xml index fe60d28d..4546a1d3 100644 --- a/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/project.xml +++ b/examples/pic32/dpp_microstick2-pic32/qv/xc32/nbproject/project.xml @@ -1,41 +1,41 @@ - - - com.microchip.mplab.nbide.embedded.makeproject - - - dpp-microstick2-pic32-qv - e9bbb168-4146-4fa4-b2f4-357b75b20ee3 - 0 - c - - h - ISO-8859-1 - - - - ../.. - ../../../../../src/qf - ../../../../../src/qv - ../../../../../include - ../../../../../src/qs - - - - dbg - 2 - - - rel - 2 - - - spy - 2 - - - - false - - - - + + + com.microchip.mplab.nbide.embedded.makeproject + + + dpp-microstick2-pic32-qv + e9bbb168-4146-4fa4-b2f4-357b75b20ee3 + 0 + c + + h + ISO-8859-1 + + + + ../.. + ../../../../../src/qf + ../../../../../src/qv + ../../../../../include + ../../../../../src/qs + + + + dbg + 2 + + + rel + 2 + + + spy + 2 + + + + false + + + + diff --git a/examples/pic32/dpp_microstick2-pic32/table.c b/examples/pic32/dpp_microstick2-pic32/table.c index 4fa7aee6..c16a8a79 100644 --- a/examples/pic32/dpp_microstick2-pic32/table.c +++ b/examples/pic32/dpp_microstick2-pic32/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -53,14 +66,16 @@ static Table l_table; /* the single instance of the Table active object */ QActive * const AO_Table = &l_table.super; /* "opaque" AO pointer */ /*..........................................................................*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -72,12 +87,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -108,17 +125,18 @@ static QState Table_initial(Table * const me, void const * const par) { } return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TERMINATE} */ + /*${AOs::Table::SM::active::TERMINATE} */ case TERMINATE_SIG: { BSP_terminate(0); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -131,11 +149,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -149,7 +168,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -157,7 +176,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -167,25 +186,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -209,7 +228,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -220,19 +239,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -244,28 +263,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -275,7 +295,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -300,4 +320,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/qutest/blinky/blinky.qm b/examples/qutest/blinky/blinky.qm index d12bcb0d..24048652 100644 --- a/examples/qutest/blinky/blinky.qm +++ b/examples/qutest/blinky/blinky.qm @@ -1,6 +1,6 @@ - - Blinky model + + Blinky example diff --git a/examples/qutest/blinky/src/blinky.c b/examples/qutest/blinky/src/blinky.c index c2655c30..afe44954 100644 --- a/examples/qutest/blinky/src/blinky.c +++ b/examples/qutest/blinky/src/blinky.c @@ -1,21 +1,33 @@ -/*.$file${src::blinky.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::blinky.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: blinky.qm * File: ${src::blinky.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::blinky.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::blinky.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "blinky.h" #include "bsp.h" @@ -23,8 +35,9 @@ //Q_DEFINE_THIS_MODULE("blinky") /*************** ask QM to declare the Blinky class ******************/ -/*.$declare${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky} ..........................................................*/ +/*$declare${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky} ...........................................................*/ typedef struct { /* protected: */ QActive super; @@ -37,38 +50,41 @@ typedef struct { static QState Blinky_initial(Blinky * const me, void const * const par); static QState Blinky_off(Blinky * const me, QEvt const * const e); static QState Blinky_on(Blinky * const me, QEvt const * const e); -/*.$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ static Blinky l_blinky; -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointer to the Blinky AO */ -/*.${AOs::AO_Blinky} .......................................................*/ +/*$define${AOs::AO_Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Blinky} ........................................................*/ QActive * const AO_Blinky = &l_blinky.super; -/*.$enddef${AOs::AO_Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*************** ask QM to define the Blinky class ******************/ -/*.$define${AOs::Blinky_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky_ctor} .....................................................*/ +/*$define${AOs::Blinky_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky_ctor} ......................................................*/ void Blinky_ctor(void) { Blinky *me = &l_blinky; QActive_ctor(&me->super, Q_STATE_CAST(&Blinky_initial)); QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } -/*.$enddef${AOs::Blinky_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Blinky_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky} ..........................................................*/ -/*.${AOs::Blinky::SM} ......................................................*/ +/*$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky} ...........................................................*/ + +/*${AOs::Blinky::SM} .......................................................*/ static QState Blinky_initial(Blinky * const me, void const * const par) { - /*.${AOs::Blinky::SM::initial} */ + /*${AOs::Blinky::SM::initial} */ (void)par; /* unused parameter */ QS_OBJ_DICTIONARY(&l_blinky); @@ -82,17 +98,18 @@ static QState Blinky_initial(Blinky * const me, void const * const par) { return Q_TRAN(&Blinky_off); } -/*.${AOs::Blinky::SM::off} .................................................*/ + +/*${AOs::Blinky::SM::off} ..................................................*/ static QState Blinky_off(Blinky * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky::SM::off} */ + /*${AOs::Blinky::SM::off} */ case Q_ENTRY_SIG: { BSP_ledOff(); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky::SM::off::TIMEOUT} */ + /*${AOs::Blinky::SM::off::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Blinky_on); break; @@ -104,17 +121,18 @@ static QState Blinky_off(Blinky * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Blinky::SM::on} ..................................................*/ + +/*${AOs::Blinky::SM::on} ...................................................*/ static QState Blinky_on(Blinky * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky::SM::on} */ + /*${AOs::Blinky::SM::on} */ case Q_ENTRY_SIG: { BSP_ledOn(); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky::SM::on::TIMEOUT} */ + /*${AOs::Blinky::SM::on::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Blinky_off); break; @@ -126,4 +144,5 @@ static QState Blinky_on(Blinky * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/qutest/blinky/src/blinky.h b/examples/qutest/blinky/src/blinky.h index c46b1661..d528e3e6 100644 --- a/examples/qutest/blinky/src/blinky.h +++ b/examples/qutest/blinky/src/blinky.h @@ -1,21 +1,33 @@ -/*.$file${src::blinky.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::blinky.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: blinky.qm * File: ${src::blinky.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::blinky.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::blinky.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef BLINKY_H #define BLINKY_H @@ -27,15 +39,18 @@ enum BlinkySignals { MAX_SIG /* the last signal */ }; -/*.$declare${AOs::Blinky_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky_ctor} .....................................................*/ +/*$declare${AOs::Blinky_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky_ctor} ......................................................*/ void Blinky_ctor(void); -/*.$enddecl${AOs::Blinky_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Blinky_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$declare${AOs::AO_Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::AO_Blinky} ........................................................*/ /* opaque pointer to the Blinky AO */ extern QActive * const AO_Blinky; -/*.$enddecl${AOs::AO_Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* BLINKY_H */ + diff --git a/examples/qutest/blinky/test/Makefile b/examples/qutest/blinky/test/Makefile index 938e4c1e..bfa6eee6 100644 --- a/examples/qutest/blinky/test/Makefile +++ b/examples/qutest/blinky/test/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -129,7 +129,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/blinky/test/make_efm32 b/examples/qutest/blinky/test/make_efm32 index e14aa033..aea945ef 100644 --- a/examples/qutest/blinky/test/make_efm32 +++ b/examples/qutest/blinky/test/make_efm32 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/qutest/blinky/test/make_nucleo-l053r8 b/examples/qutest/blinky/test/make_nucleo-l053r8 index 1802ea49..2429a688 100644 --- a/examples/qutest/blinky/test/make_nucleo-l053r8 +++ b/examples/qutest/blinky/test/make_nucleo-l053r8 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8 board, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-12-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/qutest/blinky/test/make_tm4c123 b/examples/qutest/blinky/test/make_tm4c123 index 3133d06f..cd7f9d17 100644 --- a/examples/qutest/blinky/test/make_tm4c123 +++ b/examples/qutest/blinky/test/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/blinky/test/test_vc.sln b/examples/qutest/blinky/test/test_vc.sln index e9657908..fc1e7c19 100644 --- a/examples/qutest/blinky/test/test_vc.sln +++ b/examples/qutest/blinky/test/test_vc.sln @@ -1,18 +1,18 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_vc", "test_vc.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_vc", "test_vc.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/qutest/blinky/test/test_vc.vcxproj b/examples/qutest/blinky/test/test_vc.vcxproj index d823f57e..2e2a05a5 100644 --- a/examples/qutest/blinky/test/test_vc.vcxproj +++ b/examples/qutest/blinky/test/test_vc.vcxproj @@ -1,161 +1,161 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - QSpy - Win32 - - - - - - - - - - - - - - {8CC465F7-872E-4D03-B93C-1B64858B4E11} - test_vc - Win32Proj - 10.0 - - - - Application - NotSet - v142 - - - Application - NotSet - true - v142 - - - Application - NotSet - v142 - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - - - - Disabled - ../src;../../../../include;../../../../ports/win32-qutest;%(AdditionalIncludeDirectories) - Q_SPY;Q_UTEST;Q_HOST;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - Default - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../../ports/win32-qutest/vc;%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - MaxSpeed - true - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;snprintf=_snprintf;WIN32;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - true - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + QSpy + Win32 + + + + + + + + + + + + + + {8CC465F7-872E-4D03-B93C-1B64858B4E11} + test_vc + Win32Proj + 10.0 + + + + Application + NotSet + v142 + + + Application + NotSet + true + v142 + + + Application + NotSet + v142 + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + + Disabled + ../src;../../../../include;../../../../ports/win32-qutest;%(AdditionalIncludeDirectories) + Q_SPY;Q_UTEST;Q_HOST;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + Default + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../../ports/win32-qutest/vc;%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + MaxSpeed + true + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + NDEBUG;snprintf=_snprintf;WIN32;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + true + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + Disabled + .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) + Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + \ No newline at end of file diff --git a/examples/qutest/blinky/test/test_vc.vcxproj.filters b/examples/qutest/blinky/test/test_vc.vcxproj.filters index e61ec7f2..7c7f68ff 100644 --- a/examples/qutest/blinky/test/test_vc.vcxproj.filters +++ b/examples/qutest/blinky/test/test_vc.vcxproj.filters @@ -1,13 +1,13 @@ - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/qutest/dpp-comp/dpp-comp.qm b/examples/qutest/dpp-comp/dpp-comp.qm index a4d247a0..22fc1713 100644 --- a/examples/qutest/dpp-comp/dpp-comp.qm +++ b/examples/qutest/dpp-comp/dpp-comp.qm @@ -1,5 +1,5 @@ - + Dining Philosopher Problem example with the "Orthogonal Component" state pattern (see https://state-machine.com/doc/Pattern_Orthogonal.pdf) The model demonstrates the following features: diff --git a/examples/qutest/dpp-comp/src/dpp.h b/examples/qutest/dpp-comp/src/dpp.h index 040a6126..1e3217b4 100644 --- a/examples/qutest/dpp-comp/src/dpp.h +++ b/examples/qutest/dpp-comp/src/dpp.h @@ -1,21 +1,33 @@ -/*.$file${src::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp-comp.qm * File: ${src::dpp.h} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -36,8 +48,9 @@ enum { N_PHILO = 5 /* number of Philos */ }; -/*.$declare${Cont::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Cont::TableEvt} .......................................................*/ +/*$declare${Cont::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Cont::TableEvt} ........................................................*/ typedef struct { /* protected: */ QEvt super; @@ -45,17 +58,21 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Cont::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Cont::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Cont::Table_ctor} .....................................................*/ -void Table_ctor(void); -/*.$enddecl${Cont::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Cont::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Table; -/*.$enddecl${Cont::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Cont::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Cont::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${Comp::CompTimeEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Comp::CompTimeEvt} ....................................................*/ +/*${Cont::Table_ctor} ......................................................*/ +void Table_ctor(void); +/*$enddecl${Cont::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Cont::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Cont::AO_Table} ........................................................*/ +extern QActive * const AO_Table; +/*$enddecl${Cont::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${Comp::CompTimeEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Comp::CompTimeEvt} .....................................................*/ typedef struct { /* protected: */ QTimeEvt super; @@ -65,19 +82,21 @@ typedef struct { } CompTimeEvt; /* public: */ -void CompTimeEvt_ctor( - CompTimeEvt * const me, +void CompTimeEvt_ctor(CompTimeEvt * const me, QActive * act, uint16_t num, enum_t const sig, uint_fast8_t const tickRate); -/*.$enddecl${Comp::CompTimeEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Comp::SM_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QHsm * const SM_Philo[N_PHILO]; -/*.$enddecl${Comp::SM_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Comp::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Comp::Philo_ctor} .....................................................*/ -void Philo_ctor(uint8_t n); -/*.$enddecl${Comp::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Comp::CompTimeEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Comp::SM_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -#endif /* DPP_H */ \ No newline at end of file +/*${Comp::SM_Philo[N_PHILO]} ...............................................*/ +extern QHsm * const SM_Philo[N_PHILO]; +/*$enddecl${Comp::SM_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Comp::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Comp::Philo_ctor} ......................................................*/ +void Philo_ctor(uint8_t n); +/*$enddecl${Comp::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +#endif /* DPP_H */ diff --git a/examples/qutest/dpp-comp/src/philo.c b/examples/qutest/dpp-comp/src/philo.c index 555a4156..08f906cb 100644 --- a/examples/qutest/dpp-comp/src/philo.c +++ b/examples/qutest/dpp-comp/src/philo.c @@ -1,29 +1,42 @@ -/*.$file${src::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp-comp.qm * File: ${src::philo.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" //Q_DEFINE_THIS_FILE -/*.$declare${Comp::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Comp::Philo} ..........................................................*/ +/*$declare${Comp::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Comp::Philo} ...........................................................*/ typedef struct Philo { /* protected: */ QHsm super; @@ -40,7 +53,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${Comp::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Comp::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* helper macros to provide a randomized think time for Philos */ #define THINK_TIME \ @@ -49,17 +62,19 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + BSP_TICKS_PER_SEC) /* definition of the whole "Comp" package */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Comp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Comp::CompTimeEvt} ....................................................*/ -/*.${Comp::CompTimeEvt::ctor} ..............................................*/ -void CompTimeEvt_ctor( - CompTimeEvt * const me, +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Comp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Comp::CompTimeEvt} .....................................................*/ + +/*${Comp::CompTimeEvt::ctor} ...............................................*/ +void CompTimeEvt_ctor(CompTimeEvt * const me, QActive * act, uint16_t num, enum_t const sig, @@ -68,11 +83,13 @@ void CompTimeEvt_ctor( QTimeEvt_ctorX(&me->super, act, sig, tickRate); me->compNum = num; } -/*.${Comp::Philo} ..........................................................*/ + +/*${Comp::Philo} ...........................................................*/ Philo Philo_inst[N_PHILO]; -/*.${Comp::Philo::SM} ......................................................*/ + +/*${Comp::Philo::SM} .......................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${Comp::Philo::SM::initial} */ + /*${Comp::Philo::SM::initial} */ (void)par; /* unused parameter */ #ifdef Q_SPY @@ -95,28 +112,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { } return Q_TRAN(&Philo_thinking); } -/*.${Comp::Philo::SM::thinking} ............................................*/ + +/*${Comp::Philo::SM::thinking} .............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Comp::Philo::SM::thinking} */ + /*${Comp::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt.super, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::thinking} */ + /*${Comp::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt.super); status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::thinking::TIMEOUT} */ + /*${Comp::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${Comp::Philo::SM::thinking::TEST} */ + /*${Comp::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -128,11 +146,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${Comp::Philo::SM::hungry} ..............................................*/ + +/*${Comp::Philo::SM::hungry} ...............................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Comp::Philo::SM::hungry} */ + /*${Comp::Philo::SM::hungry} */ case Q_ENTRY_SIG: { /* asynchronously post event to the Container */ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); @@ -141,7 +160,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::hungry::EAT} */ + /*${Comp::Philo::SM::hungry::EAT} */ case EAT_SIG: { status_ = Q_TRAN(&Philo_eating); break; @@ -153,17 +172,18 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${Comp::Philo::SM::eating} ..............................................*/ + +/*${Comp::Philo::SM::eating} ...............................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Comp::Philo::SM::eating} */ + /*${Comp::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt.super, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::eating} */ + /*${Comp::Philo::SM::eating} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt.super); @@ -174,7 +194,7 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::eating::TIMEOUT} */ + /*${Comp::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; @@ -186,7 +206,8 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.${Comp::SM_Philo[N_PHILO]} ..............................................*/ + +/*${Comp::SM_Philo[N_PHILO]} ...............................................*/ QHsm * const SM_Philo[N_PHILO] = { /* opaque pointers to Philo instances */ &Philo_inst[0].super, &Philo_inst[1].super, @@ -194,10 +215,11 @@ QHsm * const SM_Philo[N_PHILO] = { /* opaque pointers to Philo instances */ &Philo_inst[3].super, &Philo_inst[4].super }; -/*.${Comp::Philo_ctor} .....................................................*/ + +/*${Comp::Philo_ctor} ......................................................*/ void Philo_ctor(uint8_t n) { Philo *me = &Philo_inst[n]; QHsm_ctor(&me->super, Q_STATE_CAST(&Philo_initial)); CompTimeEvt_ctor(&me->timeEvt, AO_Table, n, TIMEOUT_SIG, 0U); } -/*.$enddef${Comp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Comp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/qutest/dpp-comp/src/table.c b/examples/qutest/dpp-comp/src/table.c index 2db8ee96..cfc58940 100644 --- a/examples/qutest/dpp-comp/src/table.c +++ b/examples/qutest/dpp-comp/src/table.c @@ -1,29 +1,42 @@ -/*.$file${src::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp-comp.qm * File: ${src::table.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" Q_DEFINE_THIS_FILE -/*.$declare${Cont::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Cont::Table} ..........................................................*/ +/*$declare${Cont::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Cont::Table} ...........................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${Cont::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Cont::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -49,19 +62,21 @@ static QState Table_paused(Table * const me, QEvt const * const e); #define USED ((uint8_t)1) /* definition of the whole "Cont" package */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Cont} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Cont::TableEvt} .......................................................*/ -/*.${Cont::Table} ..........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Cont} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Cont::Table} ...........................................................*/ Table Table_inst; -/*.${Cont::Table::SM} ......................................................*/ + +/*${Cont::Table::SM} .......................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${Cont::Table::SM::initial} */ + /*${Cont::Table::SM::initial} */ (void)par; /* unused parameter */ QS_OBJ_DICTIONARY(&Table_inst); @@ -84,24 +99,25 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${Cont::Table::SM::active} ..............................................*/ + +/*${Cont::Table::SM::active} ...............................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Cont::Table::SM::active::TIMEOUT} */ + /*${Cont::Table::SM::active::TIMEOUT} */ case TIMEOUT_SIG: { uint16_t n = Q_EVT_CAST(CompTimeEvt)->compNum; QHSM_DISPATCH(SM_Philo[n], e, QS_AP_ID + n); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::EAT} */ + /*${Cont::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::TEST} */ + /*${Cont::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -113,11 +129,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${Cont::Table::SM::active::serving} .....................................*/ + +/*${Cont::Table::SM::active::serving} ......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Cont::Table::SM::active::serving} */ + /*${Cont::Table::SM::active::serving} */ case Q_ENTRY_SIG: { for (uint8_t n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ if ((me->isHungry[n] != 0U) @@ -140,7 +157,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::serving::HUNGRY} */ + /*${Cont::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { /* find the index of the Philo from the event */ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; @@ -149,7 +166,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); uint8_t m = LEFT(n); - /*.${Cont::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${Cont::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { me->fork[m] = USED; me->fork[n] = USED; @@ -162,14 +179,14 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${Cont::Table::SM::active::serving::HUNGRY::[else]} */ + /*${Cont::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${Cont::Table::SM::active::serving::DONE} */ + /*${Cont::Table::SM::active::serving::DONE} */ case DONE_SIG: { /* find the index of the Philo from the event */ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; @@ -213,13 +230,13 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::serving::EAT} */ + /*${Cont::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::serving::PAUSE} */ + /*${Cont::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -231,28 +248,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${Cont::Table::SM::active::paused} ......................................*/ + +/*${Cont::Table::SM::active::paused} .......................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Cont::Table::SM::active::paused} */ + /*${Cont::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::paused} */ + /*${Cont::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::paused::SERVE} */ + /*${Cont::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${Cont::Table::SM::active::paused::HUNGRY} */ + /*${Cont::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { /* find the index of the Philo from the event */ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; @@ -264,7 +282,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::paused::DONE} */ + /*${Cont::Table::SM::active::paused::DONE} */ case DONE_SIG: { /* find the index of the Philo from the event */ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; @@ -288,9 +306,11 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.${Cont::AO_Table} .......................................................*/ + +/*${Cont::AO_Table} ........................................................*/ QActive * const AO_Table = &Table_inst.super; /* opaque pointer */ -/*.${Cont::Table_ctor} .....................................................*/ + +/*${Cont::Table_ctor} ......................................................*/ void Table_ctor(void) { Table *me = &Table_inst; QActive_ctor(&me->super, Q_STATE_CAST(&Table_initial)); @@ -301,4 +321,4 @@ void Table_ctor(void) { Philo_ctor(n); /* create the Philo component */ } } -/*.$enddef${Cont} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Cont} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/qutest/dpp-comp/test_dpp/Makefile b/examples/qutest/dpp-comp/test_dpp/Makefile index 7f03d394..64c96c02 100644 --- a/examples/qutest/dpp-comp/test_dpp/Makefile +++ b/examples/qutest/dpp-comp/test_dpp/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -131,7 +131,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/dpp-comp/test_dpp/make_efm32 b/examples/qutest/dpp-comp/test_dpp/make_efm32 index d4293898..bb93586f 100644 --- a/examples/qutest/dpp-comp/test_dpp/make_efm32 +++ b/examples/qutest/dpp-comp/test_dpp/make_efm32 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/qutest/dpp-comp/test_dpp/make_nucleo-l053r8 b/examples/qutest/dpp-comp/test_dpp/make_nucleo-l053r8 index 563ef7b7..c3f1357b 100644 --- a/examples/qutest/dpp-comp/test_dpp/make_nucleo-l053r8 +++ b/examples/qutest/dpp-comp/test_dpp/make_nucleo-l053r8 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8 board, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-12-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/qutest/dpp-comp/test_dpp/make_posix b/examples/qutest/dpp-comp/test_dpp/make_posix index 69979e99..862c6220 100644 --- a/examples/qutest/dpp-comp/test_dpp/make_posix +++ b/examples/qutest/dpp-comp/test_dpp/make_posix @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST; QP/C on POSIX *Target* -# Last updated for version 6.8.3 -# Last updated on 2021-04-16 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -125,7 +125,7 @@ LIBS += -lpthread # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/dpp-comp/test_dpp/make_tm4c123 b/examples/qutest/dpp-comp/test_dpp/make_tm4c123 index 2b497ab9..45feebd9 100644 --- a/examples/qutest/dpp-comp/test_dpp/make_tm4c123 +++ b/examples/qutest/dpp-comp/test_dpp/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/dpp-comp/test_philo/Makefile b/examples/qutest/dpp-comp/test_philo/Makefile index 587d74c5..3c1712ca 100644 --- a/examples/qutest/dpp-comp/test_philo/Makefile +++ b/examples/qutest/dpp-comp/test_philo/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 7.0.0 -# Last updated on 2022-02-16 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -129,7 +129,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/dpp-comp/test_table/Makefile b/examples/qutest/dpp-comp/test_table/Makefile index a92bfbbe..28c65332 100644 --- a/examples/qutest/dpp-comp/test_table/Makefile +++ b/examples/qutest/dpp-comp/test_table/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -129,7 +129,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/dpp-comp/test_table/make_tm4c123 b/examples/qutest/dpp-comp/test_table/make_tm4c123 index 45bf54ef..abf14b7d 100644 --- a/examples/qutest/dpp-comp/test_table/make_tm4c123 +++ b/examples/qutest/dpp-comp/test_table/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/dpp/dpp.qm b/examples/qutest/dpp/dpp.qm index 3c1c1146..36fefef9 100644 --- a/examples/qutest/dpp/dpp.qm +++ b/examples/qutest/dpp/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -144,7 +143,7 @@ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); @@ -223,7 +222,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -246,7 +245,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -288,7 +287,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -299,7 +298,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/qutest/dpp/src/dpp.h b/examples/qutest/dpp/src/dpp.h index 2527fca8..caee9239 100644 --- a/examples/qutest/dpp/src/dpp.h +++ b/examples/qutest/dpp/src/dpp.h @@ -1,21 +1,33 @@ -/*.$file${src::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${src::dpp.h} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -36,8 +48,9 @@ enum { N_PHILO = 5 /* number of Philos */ }; -/*.$declare${Shared} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::TableEvt} .....................................................*/ +/*$declare${Shared} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -46,16 +59,20 @@ typedef struct { uint8_t philoNum; } TableEvt; +/*${Shared::AO_Philo[N_PHILO]} .............................................*/ /* opaque pointers to the Philo AOs */ extern QActive * const AO_Philo[N_PHILO]; +/*${Shared::AO_Table} ......................................................*/ /* opaque pointer to the Table AO */ extern QActive * const AO_Table; -/*.${Shared::Philo_ctor} ...................................................*/ + +/*${Shared::Philo_ctor} ....................................................*/ void Philo_ctor(uint8_t n); -/*.${Shared::Table_ctor} ...................................................*/ + +/*${Shared::Table_ctor} ....................................................*/ void Table_ctor(void); -/*.$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -65,3 +82,4 @@ void Table_ctor(void); #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/qutest/dpp/src/philo.c b/examples/qutest/dpp/src/philo.c index 7250a59a..6040f3b9 100644 --- a/examples/qutest/dpp/src/philo.c +++ b/examples/qutest/dpp/src/philo.c @@ -1,21 +1,33 @@ -/*.$file${src::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${src::philo.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("philo") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct Philo { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* helper macros to provide a randomized think time for Philos */ #define THINK_TIME \ @@ -53,16 +66,16 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); #define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) /* Shared objects ----------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointers to the Philo AOs */ -/*.${Shared::AO_Philo[N_PHILO]} ............................................*/ +/*$define${Shared::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::AO_Philo[N_PHILO]} .............................................*/ QActive * const AO_Philo[N_PHILO] = { &Philo_inst[0].super, &Philo_inst[1].super, @@ -70,23 +83,26 @@ QActive * const AO_Philo[N_PHILO] = { &Philo_inst[3].super, &Philo_inst[4].super }; -/*.$enddef${Shared::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::Philo_ctor} ...................................................*/ +/*$enddef${Shared::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${Shared::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::Philo_ctor} ....................................................*/ void Philo_ctor(uint8_t n) { Philo *me = &Philo_inst[n]; QActive_ctor(&me->super, Q_STATE_CAST(&Philo_initial)); QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } -/*.$enddef${Shared::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Shared::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Philo definition --------------------------------------------------------*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ Philo Philo_inst[N_PHILO]; -/*.${AOs::Philo::SM} .......................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ (void)par; /* unused parameter */ #ifdef Q_SPY @@ -112,28 +128,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { } return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -148,11 +165,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -160,9 +178,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -171,7 +189,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -185,31 +203,32 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -224,4 +243,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/qutest/dpp/src/table.c b/examples/qutest/dpp/src/table.c index 05db9159..cf82a955 100644 --- a/examples/qutest/dpp/src/table.c +++ b/examples/qutest/dpp/src/table.c @@ -1,21 +1,33 @@ -/*.$file${src::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${src::table.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("table") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -42,7 +55,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -50,20 +63,21 @@ static QState Table_paused(Table * const me, QEvt const * const e); #define USED ((uint8_t)1) /* Shared objects ----------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointer to the Table AO */ -/*.${Shared::AO_Table} .....................................................*/ +/*$define${Shared::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::AO_Table} ......................................................*/ QActive * const AO_Table = &Table_inst.super; -/*.$enddef${Shared::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::Table_ctor} ...................................................*/ +/*$enddef${Shared::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${Shared::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::Table_ctor} ....................................................*/ void Table_ctor(void) { Table *me = &Table_inst; @@ -74,15 +88,17 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${Shared::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Shared::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*..........................................................................*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ Table Table_inst; -/*.${AOs::Table::SM} .......................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ (void)par; /* unused parameter */ QS_OBJ_DICTIONARY(&Table_inst); @@ -104,11 +120,12 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR_ID(60); status_ = Q_HANDLED(); @@ -121,11 +138,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -139,7 +157,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -147,7 +165,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -157,25 +175,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -199,7 +217,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -210,13 +228,13 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -228,28 +246,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -259,7 +278,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -284,4 +303,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/qutest/dpp/test_dpp/Makefile b/examples/qutest/dpp/test_dpp/Makefile index 7f03d394..64c96c02 100644 --- a/examples/qutest/dpp/test_dpp/Makefile +++ b/examples/qutest/dpp/test_dpp/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -131,7 +131,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/dpp/test_dpp/make_efm32 b/examples/qutest/dpp/test_dpp/make_efm32 index d4293898..bb93586f 100644 --- a/examples/qutest/dpp/test_dpp/make_efm32 +++ b/examples/qutest/dpp/test_dpp/make_efm32 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/qutest/dpp/test_dpp/make_nucleo-l053r8 b/examples/qutest/dpp/test_dpp/make_nucleo-l053r8 index 563ef7b7..c3f1357b 100644 --- a/examples/qutest/dpp/test_dpp/make_nucleo-l053r8 +++ b/examples/qutest/dpp/test_dpp/make_nucleo-l053r8 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8 board, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-12-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/qutest/dpp/test_dpp/make_posix b/examples/qutest/dpp/test_dpp/make_posix index 69979e99..862c6220 100644 --- a/examples/qutest/dpp/test_dpp/make_posix +++ b/examples/qutest/dpp/test_dpp/make_posix @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST; QP/C on POSIX *Target* -# Last updated for version 6.8.3 -# Last updated on 2021-04-16 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -125,7 +125,7 @@ LIBS += -lpthread # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/dpp/test_dpp/make_tm4c123 b/examples/qutest/dpp/test_dpp/make_tm4c123 index 2b497ab9..45feebd9 100644 --- a/examples/qutest/dpp/test_dpp/make_tm4c123 +++ b/examples/qutest/dpp/test_dpp/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/dpp/test_philo/Makefile b/examples/qutest/dpp/test_philo/Makefile index d8f3097b..3c1712ca 100644 --- a/examples/qutest/dpp/test_philo/Makefile +++ b/examples/qutest/dpp/test_philo/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -129,7 +129,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/dpp/test_philo/test_vc.sln b/examples/qutest/dpp/test_philo/test_vc.sln index e9657908..fc1e7c19 100644 --- a/examples/qutest/dpp/test_philo/test_vc.sln +++ b/examples/qutest/dpp/test_philo/test_vc.sln @@ -1,18 +1,18 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_vc", "test_vc.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_vc", "test_vc.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/qutest/dpp/test_philo/test_vc.vcxproj b/examples/qutest/dpp/test_philo/test_vc.vcxproj index 3e87df75..d4e286b6 100644 --- a/examples/qutest/dpp/test_philo/test_vc.vcxproj +++ b/examples/qutest/dpp/test_philo/test_vc.vcxproj @@ -1,161 +1,161 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - QSpy - Win32 - - - - - - - - - - - - - - {8CC465F7-872E-4D03-B93C-1B64858B4E11} - test_vc - Win32Proj - 10.0 - - - - Application - NotSet - v142 - - - Application - NotSet - true - v142 - - - Application - NotSet - v142 - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - - - - Disabled - ../src;../../../../include;../../../../ports/win32-qutest;%(AdditionalIncludeDirectories) - Q_SPY;Q_UTEST;Q_HOST;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - Default - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../../ports/win32-qutest/vc;%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - MaxSpeed - true - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;snprintf=_snprintf;WIN32;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - true - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + QSpy + Win32 + + + + + + + + + + + + + + {8CC465F7-872E-4D03-B93C-1B64858B4E11} + test_vc + Win32Proj + 10.0 + + + + Application + NotSet + v142 + + + Application + NotSet + true + v142 + + + Application + NotSet + v142 + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + + Disabled + ../src;../../../../include;../../../../ports/win32-qutest;%(AdditionalIncludeDirectories) + Q_SPY;Q_UTEST;Q_HOST;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + Default + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../../ports/win32-qutest/vc;%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + MaxSpeed + true + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + NDEBUG;snprintf=_snprintf;WIN32;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + true + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + Disabled + .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) + Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + \ No newline at end of file diff --git a/examples/qutest/dpp/test_philo/test_vc.vcxproj.filters b/examples/qutest/dpp/test_philo/test_vc.vcxproj.filters index 3d4b75bb..24abf613 100644 --- a/examples/qutest/dpp/test_philo/test_vc.vcxproj.filters +++ b/examples/qutest/dpp/test_philo/test_vc.vcxproj.filters @@ -1,13 +1,13 @@ - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/qutest/dpp/test_table/Makefile b/examples/qutest/dpp/test_table/Makefile index a92bfbbe..28c65332 100644 --- a/examples/qutest/dpp/test_table/Makefile +++ b/examples/qutest/dpp/test_table/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -129,7 +129,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/dpp/test_table/make_tm4c123 b/examples/qutest/dpp/test_table/make_tm4c123 index 45bf54ef..abf14b7d 100644 --- a/examples/qutest/dpp/test_table/make_tm4c123 +++ b/examples/qutest/dpp/test_table/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/evt_par/test/Makefile b/examples/qutest/evt_par/test/Makefile index 616deb87..b815c4f1 100644 --- a/examples/qutest/evt_par/test/Makefile +++ b/examples/qutest/evt_par/test/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -128,7 +128,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/evt_par/test/make_tm4c123 b/examples/qutest/evt_par/test/make_tm4c123 index a6c82691..2a27d137 100644 --- a/examples/qutest/evt_par/test/make_tm4c123 +++ b/examples/qutest/evt_par/test/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/qhsmtst/qhsmtst.qm b/examples/qutest/qhsmtst/qhsmtst.qm index f032eeb0..0b798230 100644 --- a/examples/qutest/qhsmtst/qhsmtst.qm +++ b/examples/qutest/qhsmtst/qhsmtst.qm @@ -1,5 +1,5 @@ - + QHsmTst is a contrived state machine from Chapter 2 of the PSiCC2 book for testing all possible transition topologies with up to 4-levels of state nesting. diff --git a/examples/qutest/qhsmtst/src/qhsmtst.c b/examples/qutest/qhsmtst/src/qhsmtst.c index ae254454..67866b74 100644 --- a/examples/qutest/qhsmtst/src/qhsmtst.c +++ b/examples/qutest/qhsmtst/src/qhsmtst.c @@ -1,26 +1,39 @@ -/*.$file${src::qhsmtst.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::qhsmtst.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: qhsmtst.qm * File: ${src::qhsmtst.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::qhsmtst.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::qhsmtst.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "qhsmtst.h" -/*.$declare${HSMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${HSMs::QHsmTst} ........................................................*/ +/*$declare${HSMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${HSMs::QHsmTst} .........................................................*/ typedef struct { /* protected: */ QHsm super; @@ -37,31 +50,35 @@ static QState QHsmTst_s11(QHsmTst * const me, QEvt const * const e); static QState QHsmTst_s2(QHsmTst * const me, QEvt const * const e); static QState QHsmTst_s21(QHsmTst * const me, QEvt const * const e); static QState QHsmTst_s211(QHsmTst * const me, QEvt const * const e); -/*.$enddecl${HSMs::QHsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${HSMs::QHsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ static QHsmTst l_hsmtst; /* the only instance of the QHsmTst class */ /* global-scope definitions ---------------------------------------*/ QHsm * const the_hsm = (QHsm *)&l_hsmtst; /* the opaque pointer */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${HSMs::QHsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${HSMs::QHsmTst_ctor} ...................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${HSMs::QHsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${HSMs::QHsmTst_ctor} ....................................................*/ void QHsmTst_ctor(void) { QHsmTst *me = &l_hsmtst; QHsm_ctor(&me->super, Q_STATE_CAST(&QHsmTst_initial)); } -/*.$enddef${HSMs::QHsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${HSMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${HSMs::QHsmTst} ........................................................*/ -/*.${HSMs::QHsmTst::SM} ....................................................*/ +/*$enddef${HSMs::QHsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${HSMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${HSMs::QHsmTst} .........................................................*/ + +/*${HSMs::QHsmTst::SM} .....................................................*/ static QState QHsmTst_initial(QHsmTst * const me, void const * const par) { - /*.${HSMs::QHsmTst::SM::initial} */ + /*${HSMs::QHsmTst::SM::initial} */ (void)par; /* unused parameter */ me->foo = 0U; BSP_display("top-INIT;"); @@ -87,31 +104,32 @@ static QState QHsmTst_initial(QHsmTst * const me, void const * const par) { return Q_TRAN(&QHsmTst_s2); } -/*.${HSMs::QHsmTst::SM::s} .................................................*/ + +/*${HSMs::QHsmTst::SM::s} ..................................................*/ static QState QHsmTst_s(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s} */ + /*${HSMs::QHsmTst::SM::s} */ case Q_ENTRY_SIG: { BSP_display("s-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s} */ + /*${HSMs::QHsmTst::SM::s} */ case Q_EXIT_SIG: { BSP_display("s-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::initial} */ + /*${HSMs::QHsmTst::SM::s::initial} */ case Q_INIT_SIG: { BSP_display("s-INIT;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::I} */ + /*${HSMs::QHsmTst::SM::s::I} */ case I_SIG: { - /*.${HSMs::QHsmTst::SM::s::I::[me->foo]} */ + /*${HSMs::QHsmTst::SM::s::I::[me->foo]} */ if (me->foo) { me->foo = 0U; BSP_display("s-I;"); @@ -122,13 +140,13 @@ static QState QHsmTst_s(QHsmTst * const me, QEvt const * const e) { } break; } - /*.${HSMs::QHsmTst::SM::s::E} */ + /*${HSMs::QHsmTst::SM::s::E} */ case E_SIG: { BSP_display("s-E;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::TERMINATE} */ + /*${HSMs::QHsmTst::SM::s::TERMINATE} */ case TERMINATE_SIG: { BSP_exit(); status_ = Q_HANDLED(); @@ -141,37 +159,38 @@ static QState QHsmTst_s(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s1} .............................................*/ + +/*${HSMs::QHsmTst::SM::s::s1} ..............................................*/ static QState QHsmTst_s1(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s1} */ + /*${HSMs::QHsmTst::SM::s::s1} */ case Q_ENTRY_SIG: { BSP_display("s1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1} */ + /*${HSMs::QHsmTst::SM::s::s1} */ case Q_EXIT_SIG: { BSP_display("s1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1::initial} */ + /*${HSMs::QHsmTst::SM::s::s1::initial} */ case Q_INIT_SIG: { BSP_display("s1-INIT;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::s1::I} */ + /*${HSMs::QHsmTst::SM::s::s1::I} */ case I_SIG: { BSP_display("s1-I;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1::D} */ + /*${HSMs::QHsmTst::SM::s::s1::D} */ case D_SIG: { - /*.${HSMs::QHsmTst::SM::s::s1::D::[!me->foo]} */ + /*${HSMs::QHsmTst::SM::s::s1::D::[!me->foo]} */ if (!me->foo) { me->foo = 1U; BSP_display("s1-D;"); @@ -182,25 +201,25 @@ static QState QHsmTst_s1(QHsmTst * const me, QEvt const * const e) { } break; } - /*.${HSMs::QHsmTst::SM::s::s1::A} */ + /*${HSMs::QHsmTst::SM::s::s1::A} */ case A_SIG: { BSP_display("s1-A;"); status_ = Q_TRAN(&QHsmTst_s1); break; } - /*.${HSMs::QHsmTst::SM::s::s1::B} */ + /*${HSMs::QHsmTst::SM::s::s1::B} */ case B_SIG: { BSP_display("s1-B;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::s1::F} */ + /*${HSMs::QHsmTst::SM::s::s1::F} */ case F_SIG: { BSP_display("s1-F;"); status_ = Q_TRAN(&QHsmTst_s211); break; } - /*.${HSMs::QHsmTst::SM::s::s1::C} */ + /*${HSMs::QHsmTst::SM::s::s1::C} */ case C_SIG: { BSP_display("s1-C;"); status_ = Q_TRAN(&QHsmTst_s2); @@ -213,31 +232,32 @@ static QState QHsmTst_s1(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s1::s11} ........................................*/ + +/*${HSMs::QHsmTst::SM::s::s1::s11} .........................................*/ static QState QHsmTst_s11(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s1::s11} */ + /*${HSMs::QHsmTst::SM::s::s1::s11} */ case Q_ENTRY_SIG: { BSP_display("s11-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1::s11} */ + /*${HSMs::QHsmTst::SM::s::s1::s11} */ case Q_EXIT_SIG: { BSP_display("s11-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1::s11::H} */ + /*${HSMs::QHsmTst::SM::s::s1::s11::H} */ case H_SIG: { BSP_display("s11-H;"); status_ = Q_TRAN(&QHsmTst_s); break; } - /*.${HSMs::QHsmTst::SM::s::s1::s11::D} */ + /*${HSMs::QHsmTst::SM::s::s1::s11::D} */ case D_SIG: { - /*.${HSMs::QHsmTst::SM::s::s1::s11::D::[me->foo]} */ + /*${HSMs::QHsmTst::SM::s::s1::s11::D::[me->foo]} */ if (me->foo) { me->foo = 0U; BSP_display("s11-D;"); @@ -248,7 +268,7 @@ static QState QHsmTst_s11(QHsmTst * const me, QEvt const * const e) { } break; } - /*.${HSMs::QHsmTst::SM::s::s1::s11::G} */ + /*${HSMs::QHsmTst::SM::s::s1::s11::G} */ case G_SIG: { BSP_display("s11-G;"); status_ = Q_TRAN(&QHsmTst_s211); @@ -261,31 +281,32 @@ static QState QHsmTst_s11(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s2} .............................................*/ + +/*${HSMs::QHsmTst::SM::s::s2} ..............................................*/ static QState QHsmTst_s2(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s2} */ + /*${HSMs::QHsmTst::SM::s::s2} */ case Q_ENTRY_SIG: { BSP_display("s2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2} */ + /*${HSMs::QHsmTst::SM::s::s2} */ case Q_EXIT_SIG: { BSP_display("s2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::initial} */ + /*${HSMs::QHsmTst::SM::s::s2::initial} */ case Q_INIT_SIG: { BSP_display("s2-INIT;"); status_ = Q_TRAN(&QHsmTst_s211); break; } - /*.${HSMs::QHsmTst::SM::s::s2::I} */ + /*${HSMs::QHsmTst::SM::s::s2::I} */ case I_SIG: { - /*.${HSMs::QHsmTst::SM::s::s2::I::[!me->foo]} */ + /*${HSMs::QHsmTst::SM::s::s2::I::[!me->foo]} */ if (!me->foo) { me->foo = 1U; BSP_display("s2-I;"); @@ -296,13 +317,13 @@ static QState QHsmTst_s2(QHsmTst * const me, QEvt const * const e) { } break; } - /*.${HSMs::QHsmTst::SM::s::s2::F} */ + /*${HSMs::QHsmTst::SM::s::s2::F} */ case F_SIG: { BSP_display("s2-F;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::s2::C} */ + /*${HSMs::QHsmTst::SM::s::s2::C} */ case C_SIG: { BSP_display("s2-C;"); status_ = Q_TRAN(&QHsmTst_s1); @@ -315,41 +336,42 @@ static QState QHsmTst_s2(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s2::s21} ........................................*/ + +/*${HSMs::QHsmTst::SM::s::s2::s21} .........................................*/ static QState QHsmTst_s21(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s2::s21} */ + /*${HSMs::QHsmTst::SM::s::s2::s21} */ case Q_ENTRY_SIG: { BSP_display("s21-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21} */ + /*${HSMs::QHsmTst::SM::s::s2::s21} */ case Q_EXIT_SIG: { BSP_display("s21-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::initial} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::initial} */ case Q_INIT_SIG: { BSP_display("s21-INIT;"); status_ = Q_TRAN(&QHsmTst_s211); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::G} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::G} */ case G_SIG: { BSP_display("s21-G;"); status_ = Q_TRAN(&QHsmTst_s1); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::A} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::A} */ case A_SIG: { BSP_display("s21-A;"); status_ = Q_TRAN(&QHsmTst_s21); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::B} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::B} */ case B_SIG: { BSP_display("s21-B;"); status_ = Q_TRAN(&QHsmTst_s211); @@ -362,29 +384,30 @@ static QState QHsmTst_s21(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s2::s21::s211} ..................................*/ + +/*${HSMs::QHsmTst::SM::s::s2::s21::s211} ...................................*/ static QState QHsmTst_s211(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s2::s21::s211} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::s211} */ case Q_ENTRY_SIG: { BSP_display("s211-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::s211} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::s211} */ case Q_EXIT_SIG: { BSP_display("s211-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::s211::H} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::s211::H} */ case H_SIG: { BSP_display("s211-H;"); status_ = Q_TRAN(&QHsmTst_s); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::s211::D} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::s211::D} */ case D_SIG: { BSP_display("s211-D;"); status_ = Q_TRAN(&QHsmTst_s21); @@ -397,4 +420,4 @@ static QState QHsmTst_s211(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.$enddef${HSMs::QHsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${HSMs::QHsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/qutest/qhsmtst/src/qhsmtst.h b/examples/qutest/qhsmtst/src/qhsmtst.h index 07d5a578..3caa9b73 100644 --- a/examples/qutest/qhsmtst/src/qhsmtst.h +++ b/examples/qutest/qhsmtst/src/qhsmtst.h @@ -1,21 +1,33 @@ -/*.$file${src::qhsmtst.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::qhsmtst.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: qhsmtst.qm * File: ${src::qhsmtst.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::qhsmtst.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::qhsmtst.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef QHSMTST_H #define QHSMTST_H @@ -36,13 +48,15 @@ enum QHsmTstSignals { extern QHsm * const the_hsm; /* opaque pointer to the test HSM */ -/*.$declare${HSMs::QHsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${HSMs::QHsmTst_ctor} ...................................................*/ +/*$declare${HSMs::QHsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${HSMs::QHsmTst_ctor} ....................................................*/ void QHsmTst_ctor(void); -/*.$enddecl${HSMs::QHsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${HSMs::QHsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* BSP functions to dispaly a message and exit */ void BSP_display(char const *msg); void BSP_exit(void); #endif /* QHSMTST_H */ + diff --git a/examples/qutest/qhsmtst/test/Makefile b/examples/qutest/qhsmtst/test/Makefile index 57bb2321..d71dc57e 100644 --- a/examples/qutest/qhsmtst/test/Makefile +++ b/examples/qutest/qhsmtst/test/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-07-16 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -128,7 +128,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/qhsmtst/test/make_efm32 b/examples/qutest/qhsmtst/test/make_efm32 index f0bea071..c29b38ea 100644 --- a/examples/qutest/qhsmtst/test/make_efm32 +++ b/examples/qutest/qhsmtst/test/make_efm32 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/qutest/qhsmtst/test/make_nucleo-l053r8 b/examples/qutest/qhsmtst/test/make_nucleo-l053r8 index 42184e06..19a9f16f 100644 --- a/examples/qutest/qhsmtst/test/make_nucleo-l053r8 +++ b/examples/qutest/qhsmtst/test/make_nucleo-l053r8 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8 board, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-12-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/qutest/qhsmtst/test/make_tm4c123 b/examples/qutest/qhsmtst/test/make_tm4c123 index bd8227c7..5fa4defa 100644 --- a/examples/qutest/qhsmtst/test/make_tm4c123 +++ b/examples/qutest/qhsmtst/test/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/qmsmtst/qmsmtst.qm b/examples/qutest/qmsmtst/qmsmtst.qm index 30b49822..72607c46 100644 --- a/examples/qutest/qmsmtst/qmsmtst.qm +++ b/examples/qutest/qmsmtst/qmsmtst.qm @@ -1,8 +1,8 @@ - + QMsmTst is a QMsm state machine test based on the contrived state machine from Chapter 2 of the PSiCC2 book for testing all possible transition topologies with up to 4-levels of state nesting. - + diff --git a/examples/qutest/qmsmtst/src/qmsmtst.c b/examples/qutest/qmsmtst/src/qmsmtst.c index 3253318e..3723a984 100644 --- a/examples/qutest/qmsmtst/src/qmsmtst.c +++ b/examples/qutest/qmsmtst/src/qmsmtst.c @@ -1,28 +1,46 @@ -/*.$file${src::qmsmtst.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::qmsmtst.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: qmsmtst.qm * File: ${src::qmsmtst.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * * This code is covered by the following QP license: -* License # : QPC-EVAL -* Issued to : Institution or an individual evaluating the QP/C framework -* Framework(s): qpc -* Support ends: 2021-12-31 -* Product(s) : -* This license is available only for evaluation purposes and -* the generated code is still licensed under the terms of GPL. -* Please submit request for extension of the evaluation period at: -* +* License # : QM-EVAL-QPC +* Issued to : Users of QP/C Real-Time Embedded Framework (RTEF) +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is free software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::qmsmtst.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::qmsmtst.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "qmsmtst.h" -/*.$declare${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::QMsmTst} .........................................................*/ +/*$declare${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::QMsmTst} ..........................................................*/ typedef struct { /* protected: */ QMsm super; @@ -97,30 +115,34 @@ static QMState const QMsmTst_s211_s = { Q_ACTION_CAST(&QMsmTst_s211_x), Q_ACTION_NULL /* no initial tran. */ }; -/*.$enddecl${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ static QMsmTst l_msmtst; /* the only instance of the QMsmTst class */ /* global-scope definitions ---------------------------------------*/ QMsm * const the_msm = (QMsm *)&l_msmtst; /* the opaque pointer */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::QMsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::QMsmTst_ctor} ....................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${SMs::QMsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::QMsmTst_ctor} .....................................................*/ void QMsmTst_ctor(void) { QMsmTst *me = &l_msmtst; QMsm_ctor(&me->super, Q_STATE_CAST(&QMsmTst_initial)); } -/*.$enddef${SMs::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${SMs::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::QMsmTst} .........................................................*/ -/*.${SMs::QMsmTst::SM} .....................................................*/ +/*$define${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::QMsmTst} ..........................................................*/ + +/*${SMs::QMsmTst::SM} ......................................................*/ static QState QMsmTst_initial(QMsmTst * const me, void const * const par) { static struct { QMState const *target; @@ -134,7 +156,7 @@ static QState QMsmTst_initial(QMsmTst * const me, void const * const par) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::initial} */ + /*${SMs::QMsmTst::SM::initial} */ (void)par; /* unused parameter */ me->foo = 0U; BSP_display("top-INIT;"); @@ -160,20 +182,21 @@ static QState QMsmTst_initial(QMsmTst * const me, void const * const par) { return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s} ..................................................*/ -/*.${SMs::QMsmTst::SM::s} */ + +/*${SMs::QMsmTst::SM::s} ...................................................*/ +/*${SMs::QMsmTst::SM::s} */ static QState QMsmTst_s_e(QMsmTst * const me) { BSP_display("s-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s_s); } -/*.${SMs::QMsmTst::SM::s} */ +/*${SMs::QMsmTst::SM::s} */ static QState QMsmTst_s_x(QMsmTst * const me) { BSP_display("s-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s_s); } -/*.${SMs::QMsmTst::SM::s::initial} */ +/*${SMs::QMsmTst::SM::s::initial} */ static QState QMsmTst_s_i(QMsmTst * const me) { static struct { QMState const *target; @@ -186,17 +209,17 @@ static QState QMsmTst_s_i(QMsmTst * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::s::initial} */ + /*${SMs::QMsmTst::SM::s::initial} */ BSP_display("s-INIT;"); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s} */ +/*${SMs::QMsmTst::SM::s} */ static QState QMsmTst_s(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::I} */ + /*${SMs::QMsmTst::SM::s::I} */ case I_SIG: { - /*.${SMs::QMsmTst::SM::s::I::[me->foo]} */ + /*${SMs::QMsmTst::SM::s::I::[me->foo]} */ if (me->foo) { me->foo = 0U; BSP_display("s-I;"); @@ -207,7 +230,7 @@ static QState QMsmTst_s(QMsmTst * const me, QEvt const * const e) { } break; } - /*.${SMs::QMsmTst::SM::s::E} */ + /*${SMs::QMsmTst::SM::s::E} */ case E_SIG: { static struct { QMState const *target; @@ -224,7 +247,7 @@ static QState QMsmTst_s(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::TERMINATE} */ + /*${SMs::QMsmTst::SM::s::TERMINATE} */ case TERMINATE_SIG: { BSP_exit(); status_ = QM_HANDLED(); @@ -238,20 +261,21 @@ static QState QMsmTst_s(QMsmTst * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::QMsmTst::SM::s::s1} ..............................................*/ -/*.${SMs::QMsmTst::SM::s::s1} */ + +/*${SMs::QMsmTst::SM::s::s1} ...............................................*/ +/*${SMs::QMsmTst::SM::s::s1} */ static QState QMsmTst_s1_e(QMsmTst * const me) { BSP_display("s1-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s1_s); } -/*.${SMs::QMsmTst::SM::s::s1} */ +/*${SMs::QMsmTst::SM::s::s1} */ static QState QMsmTst_s1_x(QMsmTst * const me) { BSP_display("s1-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s1_s); } -/*.${SMs::QMsmTst::SM::s::s1::initial} */ +/*${SMs::QMsmTst::SM::s::s1::initial} */ static QState QMsmTst_s1_i(QMsmTst * const me) { static struct { QMState const *target; @@ -263,23 +287,23 @@ static QState QMsmTst_s1_i(QMsmTst * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::s::s1::initial} */ + /*${SMs::QMsmTst::SM::s::s1::initial} */ BSP_display("s1-INIT;"); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s::s1} */ +/*${SMs::QMsmTst::SM::s::s1} */ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s1::I} */ + /*${SMs::QMsmTst::SM::s::s1::I} */ case I_SIG: { BSP_display("s1-I;"); status_ = QM_HANDLED(); break; } - /*.${SMs::QMsmTst::SM::s::s1::D} */ + /*${SMs::QMsmTst::SM::s::s1::D} */ case D_SIG: { - /*.${SMs::QMsmTst::SM::s::s1::D::[!me->foo]} */ + /*${SMs::QMsmTst::SM::s::s1::D::[!me->foo]} */ if (!me->foo) { static struct { QMState const *target; @@ -301,7 +325,7 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { } break; } - /*.${SMs::QMsmTst::SM::s::s1::A} */ + /*${SMs::QMsmTst::SM::s::s1::A} */ case A_SIG: { static struct { QMState const *target; @@ -319,7 +343,7 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s1::B} */ + /*${SMs::QMsmTst::SM::s::s1::B} */ case B_SIG: { static struct { QMState const *target; @@ -335,7 +359,7 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s1::F} */ + /*${SMs::QMsmTst::SM::s::s1::F} */ case F_SIG: { static struct { QMState const *target; @@ -354,7 +378,7 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s1::C} */ + /*${SMs::QMsmTst::SM::s::s1::C} */ case C_SIG: { static struct { QMState const *target; @@ -379,24 +403,25 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.${SMs::QMsmTst::SM::s::s1::s11} .........................................*/ -/*.${SMs::QMsmTst::SM::s::s1::s11} */ + +/*${SMs::QMsmTst::SM::s::s1::s11} ..........................................*/ +/*${SMs::QMsmTst::SM::s::s1::s11} */ static QState QMsmTst_s11_e(QMsmTst * const me) { BSP_display("s11-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s11_s); } -/*.${SMs::QMsmTst::SM::s::s1::s11} */ +/*${SMs::QMsmTst::SM::s::s1::s11} */ static QState QMsmTst_s11_x(QMsmTst * const me) { BSP_display("s11-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s11_s); } -/*.${SMs::QMsmTst::SM::s::s1::s11} */ +/*${SMs::QMsmTst::SM::s::s1::s11} */ static QState QMsmTst_s11(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s1::s11::H} */ + /*${SMs::QMsmTst::SM::s::s1::s11::H} */ case H_SIG: { static struct { QMState const *target; @@ -414,9 +439,9 @@ static QState QMsmTst_s11(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s1::s11::D} */ + /*${SMs::QMsmTst::SM::s::s1::s11::D} */ case D_SIG: { - /*.${SMs::QMsmTst::SM::s::s1::s11::D::[me->foo]} */ + /*${SMs::QMsmTst::SM::s::s1::s11::D::[me->foo]} */ if (me->foo) { static struct { QMState const *target; @@ -438,7 +463,7 @@ static QState QMsmTst_s11(QMsmTst * const me, QEvt const * const e) { } break; } - /*.${SMs::QMsmTst::SM::s::s1::s11::G} */ + /*${SMs::QMsmTst::SM::s::s1::s11::G} */ case G_SIG: { static struct { QMState const *target; @@ -465,20 +490,21 @@ static QState QMsmTst_s11(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.${SMs::QMsmTst::SM::s::s2} ..............................................*/ -/*.${SMs::QMsmTst::SM::s::s2} */ + +/*${SMs::QMsmTst::SM::s::s2} ...............................................*/ +/*${SMs::QMsmTst::SM::s::s2} */ static QState QMsmTst_s2_e(QMsmTst * const me) { BSP_display("s2-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s2_s); } -/*.${SMs::QMsmTst::SM::s::s2} */ +/*${SMs::QMsmTst::SM::s::s2} */ static QState QMsmTst_s2_x(QMsmTst * const me) { BSP_display("s2-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s2_s); } -/*.${SMs::QMsmTst::SM::s::s2::initial} */ +/*${SMs::QMsmTst::SM::s::s2::initial} */ static QState QMsmTst_s2_i(QMsmTst * const me) { static struct { QMState const *target; @@ -491,17 +517,17 @@ static QState QMsmTst_s2_i(QMsmTst * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::s::s2::initial} */ + /*${SMs::QMsmTst::SM::s::s2::initial} */ BSP_display("s2-INIT;"); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s::s2} */ +/*${SMs::QMsmTst::SM::s::s2} */ static QState QMsmTst_s2(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s2::I} */ + /*${SMs::QMsmTst::SM::s::s2::I} */ case I_SIG: { - /*.${SMs::QMsmTst::SM::s::s2::I::[!me->foo]} */ + /*${SMs::QMsmTst::SM::s::s2::I::[!me->foo]} */ if (!me->foo) { me->foo = 1U; BSP_display("s2-I;"); @@ -512,7 +538,7 @@ static QState QMsmTst_s2(QMsmTst * const me, QEvt const * const e) { } break; } - /*.${SMs::QMsmTst::SM::s::s2::F} */ + /*${SMs::QMsmTst::SM::s::s2::F} */ case F_SIG: { static struct { QMState const *target; @@ -530,7 +556,7 @@ static QState QMsmTst_s2(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s2::C} */ + /*${SMs::QMsmTst::SM::s::s2::C} */ case C_SIG: { static struct { QMState const *target; @@ -555,20 +581,21 @@ static QState QMsmTst_s2(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.${SMs::QMsmTst::SM::s::s2::s21} .........................................*/ -/*.${SMs::QMsmTst::SM::s::s2::s21} */ + +/*${SMs::QMsmTst::SM::s::s2::s21} ..........................................*/ +/*${SMs::QMsmTst::SM::s::s2::s21} */ static QState QMsmTst_s21_e(QMsmTst * const me) { BSP_display("s21-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s21_s); } -/*.${SMs::QMsmTst::SM::s::s2::s21} */ +/*${SMs::QMsmTst::SM::s::s2::s21} */ static QState QMsmTst_s21_x(QMsmTst * const me) { BSP_display("s21-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s21_s); } -/*.${SMs::QMsmTst::SM::s::s2::s21::initial} */ +/*${SMs::QMsmTst::SM::s::s2::s21::initial} */ static QState QMsmTst_s21_i(QMsmTst * const me) { static struct { QMState const *target; @@ -580,15 +607,15 @@ static QState QMsmTst_s21_i(QMsmTst * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::s::s2::s21::initial} */ + /*${SMs::QMsmTst::SM::s::s2::s21::initial} */ BSP_display("s21-INIT;"); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s::s2::s21} */ +/*${SMs::QMsmTst::SM::s::s2::s21} */ static QState QMsmTst_s21(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s2::s21::G} */ + /*${SMs::QMsmTst::SM::s::s2::s21::G} */ case G_SIG: { static struct { QMState const *target; @@ -607,7 +634,7 @@ static QState QMsmTst_s21(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s2::s21::A} */ + /*${SMs::QMsmTst::SM::s::s2::s21::A} */ case A_SIG: { static struct { QMState const *target; @@ -625,7 +652,7 @@ static QState QMsmTst_s21(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s2::s21::B} */ + /*${SMs::QMsmTst::SM::s::s2::s21::B} */ case B_SIG: { static struct { QMState const *target; @@ -648,24 +675,25 @@ static QState QMsmTst_s21(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.${SMs::QMsmTst::SM::s::s2::s21::s211} ...................................*/ -/*.${SMs::QMsmTst::SM::s::s2::s21::s211} */ + +/*${SMs::QMsmTst::SM::s::s2::s21::s211} ....................................*/ +/*${SMs::QMsmTst::SM::s::s2::s21::s211} */ static QState QMsmTst_s211_e(QMsmTst * const me) { BSP_display("s211-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s211_s); } -/*.${SMs::QMsmTst::SM::s::s2::s21::s211} */ +/*${SMs::QMsmTst::SM::s::s2::s21::s211} */ static QState QMsmTst_s211_x(QMsmTst * const me) { BSP_display("s211-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s211_s); } -/*.${SMs::QMsmTst::SM::s::s2::s21::s211} */ +/*${SMs::QMsmTst::SM::s::s2::s21::s211} */ static QState QMsmTst_s211(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s2::s21::s211::H} */ + /*${SMs::QMsmTst::SM::s::s2::s21::s211::H} */ case H_SIG: { static struct { QMState const *target; @@ -684,7 +712,7 @@ static QState QMsmTst_s211(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s2::s21::s211::D} */ + /*${SMs::QMsmTst::SM::s::s2::s21::s211::D} */ case D_SIG: { static struct { QMState const *target; @@ -708,4 +736,4 @@ static QState QMsmTst_s211(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.$enddef${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/qutest/qmsmtst/src/qmsmtst.h b/examples/qutest/qmsmtst/src/qmsmtst.h index f0b22c6e..65e73c56 100644 --- a/examples/qutest/qmsmtst/src/qmsmtst.h +++ b/examples/qutest/qmsmtst/src/qmsmtst.h @@ -1,23 +1,40 @@ -/*.$file${src::qmsmtst.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${src::qmsmtst.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: qmsmtst.qm * File: ${src::qmsmtst.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * * This code is covered by the following QP license: -* License # : QPC-EVAL -* Issued to : Institution or an individual evaluating the QP/C framework -* Framework(s): qpc -* Support ends: 2021-12-31 -* Product(s) : -* This license is available only for evaluation purposes and -* the generated code is still licensed under the terms of GPL. -* Please submit request for extension of the evaluation period at: -* +* License # : QM-EVAL-QPC +* Issued to : Users of QP/C Real-Time Embedded Framework (RTEF) +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is free software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${src::qmsmtst.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${src::qmsmtst.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef QMSMTST_H #define QMSMTST_H @@ -38,13 +55,15 @@ enum QMsmTstSignals { extern QMsm * const the_msm; /* opaque pointer to the test MSM */ -/*.$declare${SMs::QMsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::QMsmTst_ctor} ....................................................*/ +/*$declare${SMs::QMsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::QMsmTst_ctor} .....................................................*/ void QMsmTst_ctor(void); -/*.$enddecl${SMs::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* BSP functions to dispaly a message and exit */ void BSP_display(char const *msg); void BSP_exit(void); #endif /* QMSMTST_H */ + diff --git a/examples/qutest/qmsmtst/test/Makefile b/examples/qutest/qmsmtst/test/Makefile index 60132cf7..d0af9a38 100644 --- a/examples/qutest/qmsmtst/test/Makefile +++ b/examples/qutest/qmsmtst/test/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -128,7 +128,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/qmsmtst/test/make_efm32 b/examples/qutest/qmsmtst/test/make_efm32 index 09e4138d..ea27c616 100644 --- a/examples/qutest/qmsmtst/test/make_efm32 +++ b/examples/qutest/qmsmtst/test/make_efm32 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/qutest/qmsmtst/test/make_nucleo-l053r8 b/examples/qutest/qmsmtst/test/make_nucleo-l053r8 index be2a1ef8..9621a01f 100644 --- a/examples/qutest/qmsmtst/test/make_nucleo-l053r8 +++ b/examples/qutest/qmsmtst/test/make_nucleo-l053r8 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8 board, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-12-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/qutest/qmsmtst/test/make_tm4c123 b/examples/qutest/qmsmtst/test/make_tm4c123 index ec090d7c..8a1a7606 100644 --- a/examples/qutest/qmsmtst/test/make_tm4c123 +++ b/examples/qutest/qmsmtst/test/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/self_test/test/Makefile b/examples/qutest/self_test/test/Makefile index b0944fdf..66b6b9fa 100644 --- a/examples/qutest/self_test/test/Makefile +++ b/examples/qutest/self_test/test/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -127,7 +127,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/self_test/test/make_efm32 b/examples/qutest/self_test/test/make_efm32 index 510858ae..071207d9 100644 --- a/examples/qutest/self_test/test/make_efm32 +++ b/examples/qutest/self_test/test/make_efm32 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/qutest/self_test/test/make_nucleo-l053r8 b/examples/qutest/self_test/test/make_nucleo-l053r8 index 4f0ced03..13d4ef72 100644 --- a/examples/qutest/self_test/test/make_nucleo-l053r8 +++ b/examples/qutest/self_test/test/make_nucleo-l053r8 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8 board, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-12-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/qutest/self_test/test/make_posix b/examples/qutest/self_test/test/make_posix index 1f8a1217..7d75e740 100644 --- a/examples/qutest/self_test/test/make_posix +++ b/examples/qutest/self_test/test/make_posix @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST; QP/C on POSIX *Target* -# Last updated for version 6.8.3 -# Last updated on 2021-04-16 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -121,7 +121,7 @@ LIBS += -lpthread # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/self_test/test/make_tm4c123 b/examples/qutest/self_test/test/make_tm4c123 index c8653548..36eb7585 100644 --- a/examples/qutest/self_test/test/make_tm4c123 +++ b/examples/qutest/self_test/test/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 6.9.4 -# Date of the Last Update: 2021-07-01 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/target_efm32/flash.bat b/examples/qutest/target_efm32/flash.bat index 5cbe3607..0ca15c72 100644 --- a/examples/qutest/target_efm32/flash.bat +++ b/examples/qutest/target_efm32/flash.bat @@ -1,49 +1,49 @@ -::============================================================================ -:: Batch file to program the flash of EFM32-SLSTK3401A board -:: -:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: -:: https://www.segger.com/j-link-commander.html -:: -setlocal - -@echo off -@echo Load a given binary file to the flash of EFM32-SLSTK3401A -@echo usage: flash bin-file -@echo example: flash dbg\blinky-qk.bin - -::---------------------------------------------------------------------------- -:: NOTE: Adjust the following symbol to the location of the -:: JLink utility on your machine -:: -if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink -if not exist "%JLINK%\JLink.exe" ( - @echo The JLink tool not found. Please adjust flash.bat - @goto end -) - -if ["%~1"]==[""] ( - @echo The binary file missing - @goto end -) -if not exist %~s1 ( - @echo The binary file '%1' does not exist - @goto end -) - -:: generate the Jlink command file depending on the first parameter %1 -@echo si 1 >flash.jlink -@echo speed 4000 >>flash.jlink -@echo r >>flash.jlink -@echo h >>flash.jlink -@echo loadbin %1, 0 >>flash.jlink -@echo exit >>flash.jlink - -@echo on -%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink -@echo off - -@del flash.jlink - -:end - +::============================================================================ +:: Batch file to program the flash of EFM32-SLSTK3401A board +:: +:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: +:: https://www.segger.com/j-link-commander.html +:: +setlocal + +@echo off +@echo Load a given binary file to the flash of EFM32-SLSTK3401A +@echo usage: flash bin-file +@echo example: flash dbg\blinky-qk.bin + +::---------------------------------------------------------------------------- +:: NOTE: Adjust the following symbol to the location of the +:: JLink utility on your machine +:: +if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink +if not exist "%JLINK%\JLink.exe" ( + @echo The JLink tool not found. Please adjust flash.bat + @goto end +) + +if ["%~1"]==[""] ( + @echo The binary file missing + @goto end +) +if not exist %~s1 ( + @echo The binary file '%1' does not exist + @goto end +) + +:: generate the Jlink command file depending on the first parameter %1 +@echo si 1 >flash.jlink +@echo speed 4000 >>flash.jlink +@echo r >>flash.jlink +@echo h >>flash.jlink +@echo loadbin %1, 0 >>flash.jlink +@echo exit >>flash.jlink + +@echo on +%JLINK%\JLink.exe -device EFM32PG1B200F256GM48 flash.jlink +@echo off + +@del flash.jlink + +:end + endlocal \ No newline at end of file diff --git a/examples/qutest/target_efm32/test.icf b/examples/qutest/target_efm32/test.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/qutest/target_efm32/test.icf +++ b/examples/qutest/target_efm32/test.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/qutest/unity_basic/README.txt b/examples/qutest/unity_basic/README.txt new file mode 100644 index 00000000..a0cb6ed6 --- /dev/null +++ b/examples/qutest/unity_basic/README.txt @@ -0,0 +1,86 @@ +About This Example +================== +This example is based on "example_1" from the Unity unit testing framework. +The purpose is to illustrate testing of the same code (src/ProductionCode.c) +with Unity and with QUTest. + +*** NOTE *** +The provided Makefiles for building and running the tests are cross-platform +and will work on Windows as well as POSIX workstations (Linux/MacOS). Also, +it is assumed that you have installed the QTools collection on your computer +and that you have added the QTools/bin directory to your PATH, see: + https://www.state-machine.com/qtools + + +Directories and Files +--------------------- + +qpc/examples/qutest/unity_basic/ - this example +| ++-src/ - code under test (CUT) +| +-ProductionCode.h +| +-ProductionCode.c +| ++-test/ - testing with QUTest +| +-conftest.py - configuration file for Python +| +-Makefile - makefile for building and running the tests +| +-make_ef32 - makefile for building and running the tests EFM32 target +| +-make_tm4c123 - makefile for building and running the tests TM4C123 target +| +-test_ProductionCode.c - QUTest test fixture in C +| +-test_ProductionCode.py - QUTest test script in Python +| ++-test_unity/ - testing with Unity +| +-Makefile - makefile for building and running the tests +| +-TestProductionCode.c - Unity test fixture +| +-TestProductionCode_Runner.c - Unity test runner +| + + +Building the Code and Testing with Unity +---------------------------------------- +Open a terminal/command-prompt. Change directory to test_unity +(qpc/examples/qutest/unity_basic/test_unity). + +Type "make". The provided Makefile will build the code and run +the tests using the Unity framework. + +*** NOTE *** +For Windows, the make utility, the C compiler (MinGW) are included +in the QTools collection. For all platforms, you will also need +the Unity source code, which is also included in the QTools collection +and the provided Makefile takes it from there. + +*** NOTE *** +Some of the Unity tests fail, which is intentional to demonstrate +various failure modes. + + +Building the Code and Testing with QUTest +----------------------------------------- +Open terminal / command-prompt and launch the QSPY host utility +by typing: + +qspy + +Open *another* terminal / command-prompt and change directory to +test (qpc/examples/qutest/unity_example1/test). +Type: + +make + +to build the code with the provided Makefile and run the tests +using the Python test script (test_ProductionCode.py) + +*** NOTE *** +For Windows, the Python interpreter is included in the QTools collection. + +*** NOTE *** +Some of the QUTest tests fail, which is intentional to demonstrate +various failure modes, exactly as it is in the case of Unity tests. + + +Contact Information +------------------- +https://www.state-machine.com +mailto:info@state-machine.com + diff --git a/examples/qutest/unity_basic/src/ProductionCode.c b/examples/qutest/unity_basic/src/ProductionCode.c new file mode 100644 index 00000000..db128e5b --- /dev/null +++ b/examples/qutest/unity_basic/src/ProductionCode.c @@ -0,0 +1,24 @@ + +#include "ProductionCode.h" + +int Counter = 0; +int NumbersToFind[9] = { 0, 34, 55, 66, 32, 11, 1, 77, 888 }; /* some obnoxious array to search that is 1-based indexing instead of 0. */ + +/* This function is supposed to search through NumbersToFind and find a particular number. + * If it finds it, the index is returned. Otherwise 0 is returned which sorta makes sense since + * NumbersToFind is indexed from 1. Unfortunately it's broken + * (and should therefore be caught by our tests) */ +int FindFunction_WhichIsBroken(int NumberToFind) +{ + int i = 0; + while (i < 8) /* Notice I should have been in braces */ + i++; + if (NumbersToFind[i] == NumberToFind) /* Yikes! I'm getting run after the loop finishes instead of during it! */ + return i; + return 0; +} + +int FunctionWhichReturnsLocalVariable(void) +{ + return Counter; +} diff --git a/examples/qutest/unity_basic/src/ProductionCode.h b/examples/qutest/unity_basic/src/ProductionCode.h new file mode 100644 index 00000000..250ca0dc --- /dev/null +++ b/examples/qutest/unity_basic/src/ProductionCode.h @@ -0,0 +1,3 @@ + +int FindFunction_WhichIsBroken(int NumberToFind); +int FunctionWhichReturnsLocalVariable(void); diff --git a/examples/qutest/unity_basic/test/Makefile b/examples/qutest/unity_basic/test/Makefile new file mode 100644 index 00000000..1be9760c --- /dev/null +++ b/examples/qutest/unity_basic/test/Makefile @@ -0,0 +1,273 @@ +############################################################################## +# Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 +# +# Q u a n t u m L e a P s +# ------------------------ +# Modern Embedded Software +# +# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# +# This program is open source software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Alternatively, this program may be distributed and modified under the +# terms of Quantum Leaps commercial licenses, which expressly supersede +# the GNU General Public License and are specifically designed for +# licensees interested in retaining the proprietary status of their code. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact information: +# +# +############################################################################## +# +# examples of invoking this Makefile: +# make # make and run the Python tests in the current directory +# make TESTS=test*.py # make and run the selected tests in the curr. dir. +# make HOST=localhost:7705 # connect to host:port +# make norun # only make but not run the tests +# make clean # cleanup the build +# make debug # only run tests in DEBUG mode +# +# 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://github.com/QuantumLeaps/qtools +# + +#----------------------------------------------------------------------------- +# project name: +# +PROJECT := test_basic + +#----------------------------------------------------------------------------- +# project directories: +# + +# list of all source directories used by this project +VPATH := . \ + ../src + +# list of all include directories needed by this project +INCLUDES := -I. \ + -I../src + +# location of the QP/C framework (if not provided in an env. variable) +ifeq ($(QPC),) +QPC := ../../../.. +endif + +# make sure that QTOOLS env. variable is defined... +ifeq ("$(wildcard $(QTOOLS))","") +$(error QTOOLS not found. Please install QTools and define QTOOLS env. variable) +endif + +#----------------------------------------------------------------------------- +# project files: +# + +# C source files... +C_SRCS := \ + ProductionCode.c \ + test_ProductionCode.c + +# C++ source files... +CPP_SRCS := + +LIB_DIRS := +LIBS := + +# defines... +DEFINES := + +#----------------------------------------------------------------------------- +# add QP/C framework (depends on the OS this Makefile runs on): +# +ifeq ($(OS),Windows_NT) + QP_PORT_DIR := $(QPC)/ports/win32-qutest + LIB_DIRS += -L$(QP_PORT_DIR)/mingw + LIBS += -lqp -lws2_32 +QS_SRCS := +else + QP_PORT_DIR := $(QPC)/ports/posix-qutest + C_SRCS += \ + qep_hsm.c \ + qep_msm.c \ + qf_act.c \ + qf_actq.c \ + qf_defer.c \ + qf_dyn.c \ + qf_mem.c \ + qf_ps.c \ + qf_qact.c \ + qf_qeq.c \ + qf_qmact.c \ + qf_time.c \ + qs.c \ + qs_64bit.c \ + qs_rx.c \ + qs_fp.c \ + qutest.c \ + qutest_port.c + + LIBS += -lpthread +endif + +#============================================================================ +# Typically you should not need to change anything below this line + +VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) + +#----------------------------------------------------------------------------- +# GNU toolset: +# +# NOTE: +# GNU toolset (MinGW) is included in the QTools collection for Windows, see: +# https://www.state-machine.com/qtools +# It is assumed that %QTOOLS%\bin directory is added to the PATH +# +CC := gcc +CPP := g++ +LINK := gcc # for C programs +#LINK := g++ # for C++ programs + +#----------------------------------------------------------------------------- +# QUTest test script utilities (requires QTOOLS): +# +ifeq ("$(wildcard $(QUTEST))","") +QUTEST := python3 $(QTOOLS)/qutest/qutest.py +endif + +TESTS := *.py + +#----------------------------------------------------------------------------- +# basic utilities (depends on the OS this Makefile runs on): +# +ifeq ($(OS),Windows_NT) + MKDIR := mkdir + RM := rm + TARGET_EXT := .exe +else ifeq ($(OSTYPE),cygwin) + MKDIR := mkdir -p + RM := rm -f + TARGET_EXT := .exe +else + MKDIR := mkdir -p + RM := rm -f + TARGET_EXT := +endif + +#----------------------------------------------------------------------------- +# build options... + +BIN_DIR := build + +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ + $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST + +CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ + -fno-rtti -fno-exceptions \ + $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST + +ifndef GCC_OLD + LINKFLAGS := -no-pie +endif + +ifdef GCOV + CFLAGS += -fprofile-arcs -ftest-coverage + CPPFLAGS += -fprofile-arcs -ftest-coverage + LINKFLAGS += -lgcov --coverage +endif + +#----------------------------------------------------------------------------- +C_OBJS := $(patsubst %.c,%.o, $(C_SRCS)) +CPP_OBJS := $(patsubst %.cpp,%.o, $(CPP_SRCS)) + +TARGET_EXE := $(BIN_DIR)/$(PROJECT)$(TARGET_EXT) +C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) +C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) +CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) +CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) + + +#----------------------------------------------------------------------------- +# rules +# + +.PHONY : norun debug clean show + +ifeq ($(MAKECMDGOALS),norun) +all : $(TARGET_EXE) +norun : all +else +all : $(TARGET_EXE) run +endif + +$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) + $(CC) $(CFLAGS) $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o + $(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS) + +run : $(TARGET_EXE) + $(QUTEST) $(TESTS) $(TARGET_EXE) $(HOST) + +$(BIN_DIR)/%.d : %.cpp + $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@ + +$(BIN_DIR)/%.d : %.c + $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@ + +$(BIN_DIR)/%.o : %.c + $(CC) $(CFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.cpp + $(CPP) $(CPPFLAGS) $< -o $@ + +# create BIN_DIR and include dependencies only if needed +ifneq ($(MAKECMDGOALS),clean) + ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif +-include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif + endif +endif + +debug : + $(QUTEST) $(TESTS) DEBUG $(HOST) + +clean : + -$(RM) $(BIN_DIR)/*.* + +show : + @echo PROJECT = $(PROJECT) + @echo TARGET_EXE = $(TARGET_EXE) + @echo VPATH = $(VPATH) + @echo C_SRCS = $(C_SRCS) + @echo CPP_SRCS = $(CPP_SRCS) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo C_OBJS_EXT = $(C_OBJS_EXT) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) + @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) + @echo LIB_DIRS = $(LIB_DIRS) + @echo LIBS = $(LIBS) + @echo DEFINES = $(DEFINES) + @echo QTOOLS = $(QTOOLS) + @echo HOST = $(HOST) + @echo QUTEST = $(QUTEST) + @echo TESTS = $(TESTS) + diff --git a/examples/qutest/unity_basic/test/make_efm32 b/examples/qutest/unity_basic/test/make_efm32 new file mode 100644 index 00000000..bf248d70 --- /dev/null +++ b/examples/qutest/unity_basic/test/make_efm32 @@ -0,0 +1,321 @@ +############################################################################## +# Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 +# +# Q u a n t u m L e a P s +# ------------------------ +# Modern Embedded Software +# +# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# +# This program is open source software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Alternatively, this program may be distributed and modified under the +# terms of Quantum Leaps commercial licenses, which expressly supersede +# the GNU General Public License and are specifically designed for +# licensees interested in retaining the proprietary status of their code. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact information: +# +# +############################################################################## +# +# examples of invoking this Makefile: +# make -f make_efm32 # make and run the tests in the current directory +# make -f make_efm32 TESTS=philo*.py # make and run the selected tests +# make -f make_efm32 HOST=localhost:7705 # connect to host:port +# make -f make_efm32 norun # only make but not run the tests +# make -f make_efm32 clean # cleanup the build +# +# NOTE: +# To use this Makefile on Windows, you will need the GNU make utility, which +# is included in the QTools collection for Windows, see: +# https://github.com/QuantumLeaps/qtools +# + +#----------------------------------------------------------------------------- +# project name, target name, target directory: +# +PROJECT := test_basic +TARGET := efm32 +TARGET_DIR := ..\..\target_efm32 + +#----------------------------------------------------------------------------- +# project directories: +# + +# location of the QP/C framework (if not provided in an env. variable) +ifeq ($(QPC),) +QPC := ../../../.. +endif + +# QP port used in this project +QP_PORT_DIR := $(QPC)/ports/arm-cm/qutest + +# make sure that QTOOLS env. variable is defined... +ifeq ("$(wildcard $(QTOOLS))","") +$(error QTOOLS not found. Please install QTools and define QTOOLS env. variable) +endif + + +# list of all source directories used by this project +VPATH := . \ + ../src \ + $(TARGET_DIR) \ + $(QPC)/src/qf \ + $(QPC)/src/qs \ + $(QP_PORT_DIR) \ + $(QPC)/3rd_party/efm32pg1b \ + $(QPC)/3rd_party/efm32pg1b/gnu + +# list of all include directories needed by this project +INCLUDES = -I. \ + -I../src \ + -I$(TARGET_DIR) \ + -I$(QPC)/include \ + -I$(QP_PORT_DIR) \ + -I$(QPC)/3rd_party/CMSIS/Include \ + -I$(QPC)/3rd_party/efm32pg1b + +#----------------------------------------------------------------------------- +# project files: +# + +# assembler source files +ASM_SRCS := + +# C source files +C_SRCS := \ + ProductionCode.c \ + test_ProductionCode.c \ + startup_efm32pg1b.c \ + system_efm32pg1b.c \ + em_cmu.c \ + em_emu.c \ + em_gpio.c \ + em_usart.c + +# C++ source files +CPP_SRCS := + +OUTPUT := $(PROJECT) +LD_SCRIPT := $(TARGET_DIR)/test.ld + +QP_SRCS := \ + qep_hsm.c \ + qep_msm.c \ + qf_act.c \ + qf_actq.c \ + qf_defer.c \ + qf_dyn.c \ + qf_mem.c \ + qf_ps.c \ + qf_qact.c \ + qf_qeq.c \ + qf_qmact.c \ + qf_time.c \ + qs.c \ + qs_64bit.c \ + qs_rx.c \ + qs_fp.c \ + qutest.c \ + qutest_port.c + +QP_ASMS := + +LIB_DIRS := +LIBS := + +# defines +DEFINES := -DEFM32PG1B200F256GM48=1 + +# ARM CPU, ARCH, FPU, and Float-ABI types... +# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] +# ARM_ARCH: [6 | 7] (NOTE: must match ARM_CPU!) +# ARM_FPU: [ | vfp] +# FLOAT_ABI: [ | soft | softfp | hard] +# +ARM_CPU := -mcpu=cortex-m4 +ARM_ARCH := 7 # NOTE: must match the ARM_CPU! +ARM_FPU := -mfpu=vfp +FLOAT_ABI := -mfloat-abi=softfp + +#----------------------------------------------------------------------------- +# GNU-ARM toolset (NOTE: You need to adjust to your machine) +# see https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads +# +ifeq ($(GNU_ARM),) +GNU_ARM := $(QTOOLS)/gnu_arm-none-eabi +endif + +# make sure that the GNU-ARM toolset exists... +ifeq ("$(wildcard $(GNU_ARM))","") +$(error GNU_ARM toolset not found. Please adjust the Makefile) +endif + +CC := $(GNU_ARM)/bin/arm-none-eabi-gcc +CPP := $(GNU_ARM)/bin/arm-none-eabi-g++ +AS := $(GNU_ARM)/bin/arm-none-eabi-as +LINK := $(GNU_ARM)/bin/arm-none-eabi-gcc +BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy + +#----------------------------------------------------------------------------- +# FLASH tool (NOTE: Requires the JLINK utility) +# see $(TARGET_DIR)\flash.bat +# + +FLASH := $(TARGET_DIR)\flash.bat + +############################################################################## +# Typically you should not need to change anything below this line + +# basic utilities (included in QTools for Windows), see: +# https://www.state-machine.com/qtools + +MKDIR := mkdir +RM := rm + +#----------------------------------------------------------------------------- +# QUTest test script utilities (requires QTOOLS): +# +ifeq ("$(wildcard $(QUTEST))","") +QUTEST := python3 $(QTOOLS)/qutest/qutest.py +endif + +TESTS := *.py + +#----------------------------------------------------------------------------- +# build options +# + +# combine all the soruces... +C_SRCS += $(QP_SRCS) +ASM_SRCS += $(QP_ASMS) + +BIN_DIR := build_$(TARGET) + +ASFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU) + +CFLAGS = -c -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ + -ffunction-sections -fdata-sections \ + -O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST + +CPPFLAGS = -c -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ + -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \ + -O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST + + +LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \ + -specs=nosys.specs -specs=nano.specs \ + -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS) + +ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS))) +C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS))) +CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS))) + +TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin +TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf +ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS)) +C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) +C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT)) +CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) +CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT)) + +# create $(BIN_DIR) if it does not exist +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif + +#----------------------------------------------------------------------------- +# rules +# + +.PHONY : run norun flash + +ifeq ($(MAKECMDGOALS),norun) +all : $(TARGET_BIN) +norun : all +else +all : $(TARGET_BIN) run +endif + +$(TARGET_BIN) : $(TARGET_ELF) + $(BIN) -O binary $< $@ + $(FLASH) $@ + +$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) + $(CC) $(CFLAGS) $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o + $(LINK) $(LINKFLAGS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS) + +flash : + $(FLASH) $(TARGET_BIN) + +run : $(TARGET_BIN) + $(FLASH) $< + $(QUTEST) $(TESTS) $(TARGET_EXE) $(HOST) + +$(BIN_DIR)/%.d : %.c + $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@ + +$(BIN_DIR)/%.d : %.cpp + $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@ + +$(BIN_DIR)/%.o : %.s + $(AS) $(ASFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.c + $(CC) $(CFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.cpp + $(CPP) $(CPPFLAGS) $< -o $@ + +.PHONY : clean show + +# include dependency files only if our goal depends on their existence +ifneq ($(MAKECMDGOALS),clean) + ifneq ($(MAKECMDGOALS),show) +-include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif +endif + +clean : + -$(RM) $(BIN_DIR)/*.o \ + $(BIN_DIR)/*.d \ + $(BIN_DIR)/*.bin \ + $(BIN_DIR)/*.elf \ + $(BIN_DIR)/*.map + +show : + @echo PROJECT = $(PROJECT) + @echo TESTS = $(TESTS) + @echo TARGET_ELF = $(TARGET_ELF) + @echo CONF = $(CONF) + @echo VPATH = $(VPATH) + @echo C_SRCS = $(C_SRCS) + @echo CPP_SRCS = $(CPP_SRCS) + @echo ASM_SRCS = $(ASM_SRCS) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo C_OBJS_EXT = $(C_OBJS_EXT) + @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) + @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) + @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT) + @echo LIB_DIRS = $(LIB_DIRS) + @echo LIBS = $(LIBS) + @echo DEFINES = $(DEFINES) + @echo QTOOLS = $(QTOOLS) + @echo HOST = $(HOST) + @echo QUTEST = $(QUTEST) + @echo TESTS = $(TESTS) + diff --git a/examples/qutest/unity_basic/test/make_tm4c123 b/examples/qutest/unity_basic/test/make_tm4c123 new file mode 100644 index 00000000..9ce2f71c --- /dev/null +++ b/examples/qutest/unity_basic/test/make_tm4c123 @@ -0,0 +1,319 @@ +############################################################################## +# Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 +# +# Q u a n t u m L e a P s +# ------------------------ +# Modern Embedded Software +# +# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# +# This program is open source software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Alternatively, this program may be distributed and modified under the +# terms of Quantum Leaps commercial licenses, which expressly supersede +# the GNU General Public License and are specifically designed for +# licensees interested in retaining the proprietary status of their code. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact information: +# +# +############################################################################## +# +# examples of invoking this Makefile: +# make -f make_tm4c123 # make and run the tests in the current directory +# make -f make_tm4c123 TESTS=philo*.py # make and run the selected tests +# make -f make_tm4c123 HOST=localhost:7705 # connect to host:port +# make -f make_tm4c123 norun # only make but not run the tests +# make -f make_tm4c123 clean # cleanup the build +# +# NOTE: +# To use this Makefile on Windows, you will need the GNU make utility, which +# is included in the QTools collection for Windows, see: +# https://github.com/QuantumLeaps/qtools +# + +#----------------------------------------------------------------------------- +# project name, target name, target directory: +# +PROJECT := test_basic +TARGET := tm4c123 +TARGET_DIR := ..\..\target_tm4c123 + +#----------------------------------------------------------------------------- +# project directories: +# + +# location of the QP/C framework (if not provided in an env. variable) +ifeq ($(QPC),) +QPC := ../../../.. +endif + +# QP port used in this project +QP_PORT_DIR := $(QPC)/ports/arm-cm/qutest + +# make sure that QTOOLS env. variable is defined... +ifeq ("$(wildcard $(QTOOLS))","") +$(error QTOOLS not found. Please install QTools and define QTOOLS env. variable) +endif + + +# list of all source directories used by this project +VPATH := . \ + ../src \ + $(TARGET_DIR) \ + $(QPC)/src/qf \ + $(QPC)/src/qs \ + $(QP_PORT_DIR) \ + $(QPC)/3rd_party/ek-tm4c123gxl \ + $(QPC)/3rd_party/ek-tm4c123gxl/gnu + +# list of all include directories needed by this project +INCLUDES = -I. \ + -I../src \ + -I$(TARGET_DIR) \ + -I$(QPC)/include \ + -I$(QP_PORT_DIR) \ + -I$(QPC)/3rd_party/CMSIS/Include \ + -I$(QPC)/3rd_party/ek-tm4c123gxl + +#----------------------------------------------------------------------------- +# project files: +# + +# assembler source files +ASM_SRCS := + +# C source files +C_SRCS := \ + ProductionCode.c \ + test_ProductionCode.c \ + system_TM4C123GH6PM.c \ + startup_TM4C123GH6PM.c + +# C++ source files +CPP_SRCS := + +OUTPUT := $(PROJECT) +LD_SCRIPT := $(TARGET_DIR)/test.ld + +QP_SRCS := \ + qep_hsm.c \ + qep_msm.c \ + qf_act.c \ + qf_actq.c \ + qf_defer.c \ + qf_dyn.c \ + qf_mem.c \ + qf_ps.c \ + qf_qact.c \ + qf_qeq.c \ + qf_qmact.c \ + qf_time.c \ + qs.c \ + qs_64bit.c \ + qs_rx.c \ + qs_fp.c \ + qutest.c \ + qutest_port.c + +QP_ASMS := + +LIB_DIRS := +LIBS := + +# defines +DEFINES := -DTARGET_IS_TM4C123_RB1 + +# ARM CPU, ARCH, FPU, and Float-ABI types... +# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] +# ARM_ARCH: [6 | 7] (NOTE: must match ARM_CPU!) +# ARM_FPU: [ | vfp] +# FLOAT_ABI: [ | soft | softfp | hard] +# +ARM_CPU := -mcpu=cortex-m4 +ARM_ARCH := 7 # NOTE: must match the ARM_CPU! +ARM_FPU := -mfpu=vfp +FLOAT_ABI := -mfloat-abi=softfp + +#----------------------------------------------------------------------------- +# GNU-ARM toolset (NOTE: You need to adjust to your machine) +# see https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads +# +ifeq ($(GNU_ARM),) +GNU_ARM := $(QTOOLS)/gnu_arm-none-eabi +endif + +# make sure that the GNU-ARM toolset exists... +ifeq ("$(wildcard $(GNU_ARM))","") +$(error GNU_ARM toolset not found. Please adjust the Makefile) +endif + +CC := $(GNU_ARM)/bin/arm-none-eabi-gcc +CPP := $(GNU_ARM)/bin/arm-none-eabi-g++ +AS := $(GNU_ARM)/bin/arm-none-eabi-as +LINK := $(GNU_ARM)/bin/arm-none-eabi-gcc +BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy + +#----------------------------------------------------------------------------- +# NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +# be found on the PATH. You might need to adjust this symbol to the +# location of the LMFlash utility on your machine +# +ifeq ($(LMFLASH),) +FLASH := LMFlash.exe -q ek-tm4c123gxl +endif + +############################################################################## +# Typically you should not need to change anything below this line + +# basic utilities (included in QTools for Windows), see: +# https://www.state-machine.com/qtools + +MKDIR := mkdir +RM := rm + +#----------------------------------------------------------------------------- +# QUTest test script utilities (requires QTOOLS): +# +ifeq ("$(wildcard $(QUTEST))","") +QUTEST := python3 $(QTOOLS)/qutest/qutest.py +endif + +TESTS := *.py + +#----------------------------------------------------------------------------- +# build options +# + +# combine all the soruces... +C_SRCS += $(QP_SRCS) +ASM_SRCS += $(QP_ASMS) + +BIN_DIR := build_$(TARGET) + +ASFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU) + +CFLAGS = -c -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ + -ffunction-sections -fdata-sections \ + -O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST + +CPPFLAGS = -c -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ + -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \ + -O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST + + +LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \ + -specs=nosys.specs -specs=nano.specs \ + -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS) + +ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS))) +C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS))) +CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS))) + +TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin +TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf +ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS)) +C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) +C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT)) +CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) +CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT)) + +# create $(BIN_DIR) if it does not exist +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif + +#----------------------------------------------------------------------------- +# rules +# + +.PHONY : run norun flash + +ifeq ($(MAKECMDGOALS),norun) +all : $(TARGET_BIN) +norun : all +else +all : $(TARGET_BIN) run +endif + +$(TARGET_BIN) : $(TARGET_ELF) + $(BIN) -O binary $< $@ + $(FLASH) $@ + +$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) + $(CC) $(CFLAGS) $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o + $(LINK) $(LINKFLAGS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS) + +flash : + $(FLASH) $(TARGET_BIN) + +run : $(TARGET_BIN) + $(FLASH) -c $< + $(QUTEST) $(TESTS) $(TARGET_EXE) $(HOST) + +$(BIN_DIR)/%.d : %.c + $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@ + +$(BIN_DIR)/%.d : %.cpp + $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@ + +$(BIN_DIR)/%.o : %.s + $(AS) $(ASFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.c + $(CC) $(CFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.cpp + $(CPP) $(CPPFLAGS) $< -o $@ + +.PHONY : clean show + +# include dependency files only if our goal depends on their existence +ifneq ($(MAKECMDGOALS),clean) + ifneq ($(MAKECMDGOALS),show) +-include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif +endif + +clean : + -$(RM) $(BIN_DIR)/*.o \ + $(BIN_DIR)/*.d \ + $(BIN_DIR)/*.bin \ + $(BIN_DIR)/*.elf \ + $(BIN_DIR)/*.map + +show : + @echo PROJECT = $(PROJECT) + @echo TESTS = $(TESTS) + @echo TARGET_ELF = $(TARGET_ELF) + @echo CONF = $(CONF) + @echo VPATH = $(VPATH) + @echo C_SRCS = $(C_SRCS) + @echo CPP_SRCS = $(CPP_SRCS) + @echo ASM_SRCS = $(ASM_SRCS) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo C_OBJS_EXT = $(C_OBJS_EXT) + @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) + @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) + @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT) + @echo LIB_DIRS = $(LIB_DIRS) + @echo LIBS = $(LIBS) + @echo DEFINES = $(DEFINES) + @echo QTOOLS = $(QTOOLS) + @echo HOST = $(HOST) + @echo QUTEST = $(QUTEST) + @echo TESTS = $(TESTS) + diff --git a/examples/qutest/unity_basic/test/test_ProductionCode.c b/examples/qutest/unity_basic/test/test_ProductionCode.c new file mode 100644 index 00000000..c0e813c2 --- /dev/null +++ b/examples/qutest/unity_basic/test/test_ProductionCode.c @@ -0,0 +1,119 @@ +/***************************************************************************** +* Purpose: example QUTEST fixture for the basic example from Unity +* Last Updated for Version: 6.3.6 +* Date of the Last Update: 2018-10-11 +* +* Q u a n t u m L e a P s +* ------------------------ +* Modern Embedded Software +* +* Copyright (C) 2005-2018 Quantum Leaps, LLC. All rights reserved. +* +* This program is open source software: you can redistribute it and/or +* modify it under the terms of the GNU General Public License as published +* by the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Alternatively, this program may be distributed and modified under the +* terms of Quantum Leaps commercial licenses, which expressly supersede +* the GNU General Public License and are specifically designed for +* licensees interested in retaining the proprietary status of their code. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Contact information: +* +* +*****************************************************************************/ +#include "qpc.h" /* QUTest interface */ +#include "ProductionCode.h" /* CUT interface */ + +Q_DEFINE_THIS_FILE + +/*--------------------------------------------------------------------------*/ +// sometimes you may want to get at local data in a module. +// for example: If you plan to pass by reference, this could be useful +// however, it should often be avoided +extern int Counter; + +/*--------------------------------------------------------------------------*/ +int main(int argc, char *argv[]) { + + QF_init(); /* initialize the framework */ + + /* initialize the QS software tracing */ + Q_ALLEGE(QS_INIT(argc > 1 ? argv[1] : (void *)0)); + + /* dictionaries... */ + QS_FUN_DICTIONARY(&FindFunction_WhichIsBroken); + QS_FUN_DICTIONARY(&FunctionWhichReturnsLocalVariable); + QS_OBJ_DICTIONARY(&Counter); + + /* filter setup... */ + QS_GLB_FILTER(QS_ALL_RECORDS); + + return QF_run(); /* run the tests */ +} + +/*--------------------------------------------------------------------------*/ +void QS_onTestSetup(void) { +} +/*..........................................................................*/ +void QS_onTestTeardown(void) { +} + +/*..........................................................................*/ +void QS_onCommand(uint8_t cmdId, + uint32_t param1, uint32_t param2, uint32_t param3) +{ + switch (cmdId) { + case 0: { /* call the CUT: FindFunction_WhichIsBroken */ + int ret = FindFunction_WhichIsBroken((int)param1); + QS_BEGIN_ID(QS_USER + cmdId, 0U) /* app-specific record */ + QS_FUN(&FindFunction_WhichIsBroken); /* function called */ + QS_I32(0, (int32_t)ret); /* returned value */ + QS_I16(0, (int16_t)param1); /* parameter */ + QS_END() + break; + } + case 1: { /* call the CUT: FunctionWhichReturnsLocalVariable */ + int ret = FunctionWhichReturnsLocalVariable(); + QS_BEGIN_ID(QS_USER + cmdId, 0U) /* app-specific record */ + QS_FUN(&FunctionWhichReturnsLocalVariable); /* function called */ + QS_U32_HEX(0, (uint32_t)ret); /* returned value */ + QS_END() + break; + } + default: + break; + } + + /* unused parametrers... */ + //(void)param1; + (void)param2; + (void)param3; +} +/*..........................................................................*/ +/* host callback function to "massage" the event, if necessary */ +void QS_onTestEvt(QEvt *e) { + (void)e; +#ifdef Q_HOST /* is this test compiled for a desktop Host computer? */ +#else /* this test is compiled for an embedded Target system */ +#endif +} +/*..........................................................................*/ +/*! callback function to output the posted QP events (not used here) */ +void QS_onTestPost(void const *sender, QActive *recipient, + QEvt const *e, bool status) +{ + (void)sender; + (void)recipient; + (void)e; + (void)status; +} diff --git a/examples/qutest/unity_basic/test/test_ProductionCode.py b/examples/qutest/unity_basic/test/test_ProductionCode.py new file mode 100644 index 00000000..9ad16d97 --- /dev/null +++ b/examples/qutest/unity_basic/test/test_ProductionCode.py @@ -0,0 +1,63 @@ +# QUTEST script corresponding to the test_ProductionCode.c test fixture. +# This test fixture corresponds to ../test_unity/TestProductionCode.c fixture. +# see https://www.state-machine.com/qtools/qutest.html/qutest.html + +# preamble... +def on_setup(): + # This is run before EACH TEST + current_obj(OBJ_AP, "Counter") + poke(0, 4, pack('. +# +# Contact information: +# +# +############################################################################## +# +# examples of invoking this Makefile: +# make # make and run the tests in the current directory +# make norun # only make but not run the tests +# make clean # cleanup the build +# +# NOTE: +# To use this Makefile on Windows, you will need the GNU make utility, which +# is included in the Qtools collection for Windows, see: +# http://sourceforge.net/projects/qpc/files/QTools/ +# + +#----------------------------------------------------------------------------- +# project name: +# +PROJECT := test_basic + +#----------------------------------------------------------------------------- +# project directories: +# + +# list of all source directories used by this project +VPATH = . \ + ../src + +# list of all include directories needed by this project +INCLUDES = -I. \ + -I../src + +# make sure that QTOOLS env. variable is defined... +ifeq ("$(wildcard $(QTOOLS))","") +$(error QTOOLS not found. Please install Qtools and define QTOOLS env. variable) +endif + +# location of the Unity unit testing harness +ifeq ($(UNITY),) +UNITY := $(QTOOLS)/unity +endif + + +#----------------------------------------------------------------------------- +# project files: +# + +# C source files... +C_SRCS := \ + ProductionCode.c \ + TestProductionCode.c \ + TestProductionCode_Runner.c \ + +# C++ source files... +CPP_SRCS := + +LIB_DIRS := +LIBS := + +# defines... +DEFINES := + +#----------------------------------------------------------------------------- +# add Unity to the build... +VPATH += $(UNITY)/src +INCLUDES += -I$(UNITY)/src +C_SRCS += unity.c + +#============================================================================ +# Typically you should not need to change anything below this line + +#----------------------------------------------------------------------------- +# GNU toolset: +# +# NOTE: +# GNU toolset (MinGW) is included in the QTools collection for Windows, see: +# http://sourceforge.net/projects/qpc/files/QTools/ +# It is assumed that %QTOOLS%\bin directory is added to the PATH +# +CC := gcc +CPP := g++ +LINK := gcc # for C programs +#LINK := g++ # for C++ programs + +#----------------------------------------------------------------------------- +# basic utilities (depends on the OS this Makefile runs on): +# +ifeq ($(OS),Windows_NT) + MKDIR := mkdir + RM := rm + TARGET_EXT := .exe +else ifeq ($(OSTYPE),cygwin) + MKDIR := mkdir -p + RM := rm -f + TARGET_EXT := .exe +else + MKDIR := mkdir -p + RM := rm -f + TARGET_EXT := +endif + +#----------------------------------------------------------------------------- +# build options... + +BIN_DIR := build + +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ + $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST + +CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ + -fno-rtti -fno-exceptions \ + $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST + +ifndef GCC_OLD + LINKFLAGS := -no-pie +endif + +#----------------------------------------------------------------------------- +C_OBJS := $(patsubst %.c,%.o, $(C_SRCS)) +CPP_OBJS := $(patsubst %.cpp,%.o, $(CPP_SRCS)) + +TARGET_EXE := $(BIN_DIR)/$(PROJECT)$(TARGET_EXT) +C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) +C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) +CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) +CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) + +# create $(BIN_DIR) if it does not exist +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif + +#----------------------------------------------------------------------------- +# rules +# + +.PHONY : run norun clean show + +ifeq ($(MAKECMDGOALS),norun) +all : $(TARGET_EXE) +norun : all +else +all : $(TARGET_EXE) run +endif + +ifeq (, $(TESTS)) +ifeq ($(SCRIPT),py) +TESTS := *.py +else +TESTS := *.tcl +endif +endif + +$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) + $(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(LIBS) + +run : $(TARGET_EXE) + $(TARGET_EXE) + +$(BIN_DIR)/%.d : %.cpp + $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@ + +$(BIN_DIR)/%.d : %.c + $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@ + +$(BIN_DIR)/%.o : %.c + $(CC) $(CFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.cpp + $(CPP) $(CPPFLAGS) $< -o $@ + +# include dependency files only if our goal depends on their existence +ifneq ($(MAKECMDGOALS),clean) + ifneq ($(MAKECMDGOALS),show) +-include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif +endif + +clean : + -$(RM) $(BIN_DIR)/*.o \ + $(BIN_DIR)/*.d \ + $(TARGET_EXE) + +show : + @echo PROJECT = $(PROJECT) + @echo TARGET_EXE = $(TARGET_EXE) + @echo VPATH = $(VPATH) + @echo C_SRCS = $(C_SRCS) + @echo CPP_SRCS = $(CPP_SRCS) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo C_OBJS_EXT = $(C_OBJS_EXT) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) + @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) + @echo LIB_DIRS = $(LIB_DIRS) + @echo LIBS = $(LIBS) + @echo DEFINES = $(DEFINES) + @echo QTOOLS = $(QTOOLS) + @echo QUTEST = $(QUTEST) + @echo HOST = $(HOST) + @echo TESTS = $(TESTS) + diff --git a/examples/qutest/unity_basic/test_unity/TestProductionCode.c b/examples/qutest/unity_basic/test_unity/TestProductionCode.c new file mode 100644 index 00000000..404c3718 --- /dev/null +++ b/examples/qutest/unity_basic/test_unity/TestProductionCode.c @@ -0,0 +1,62 @@ + +#include "ProductionCode.h" +#include "unity.h" + +/* sometimes you may want to get at local data in a module. + * for example: If you plan to pass by reference, this could be useful + * however, it should often be avoided */ +extern int Counter; + +void setUp(void) +{ + /* This is run before EACH TEST */ + Counter = 0x5a5a; +} + +void tearDown(void) +{ +} + +void test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWorksEvenInOurBrokenCode(void) +{ + /* All of these should pass */ + TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(78)); + TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(2)); + TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(33)); + TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(999)); + TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(-1)); +} + +void test_FindFunction_WhichIsBroken_ShouldReturnTheIndexForItemsInList_WhichWillFailBecauseOurFunctionUnderTestIsBroken(void) +{ + /* You should see this line fail in your test summary */ + TEST_ASSERT_EQUAL(1, FindFunction_WhichIsBroken(34)); + + /* Notice the rest of these didn't get a chance to run because the line above failed. + * Unit tests abort each test function on the first sign of trouble. + * Then NEXT test function runs as normal. */ + TEST_ASSERT_EQUAL(8, FindFunction_WhichIsBroken(8888)); +} + +void test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValue(void) +{ + /* This should be true because setUp set this up for us before this test */ + TEST_ASSERT_EQUAL_HEX(0x5a5a, FunctionWhichReturnsLocalVariable()); + + /* This should be true because we can still change our answer */ + Counter = 0x1234; + TEST_ASSERT_EQUAL_HEX(0x1234, FunctionWhichReturnsLocalVariable()); +} + +void test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValueAgain(void) +{ + /* This should be true again because setup was rerun before this test (and after we changed it to 0x1234) */ + TEST_ASSERT_EQUAL_HEX(0x5a5a, FunctionWhichReturnsLocalVariable()); +} + +void test_FunctionWhichReturnsLocalVariable_ShouldReturnCurrentCounter_ButFailsBecauseThisTestIsActuallyFlawed(void) +{ + /* Sometimes you get the test wrong. When that happens, you get a failure too... and a quick look should tell + * you what actually happened...which in this case was a failure to setup the initial condition. */ + TEST_ASSERT_EQUAL_HEX(0x1234, FunctionWhichReturnsLocalVariable()); +} diff --git a/examples/qutest/unity_basic/test_unity/TestProductionCode_Runner.c b/examples/qutest/unity_basic/test_unity/TestProductionCode_Runner.c new file mode 100644 index 00000000..3b49af74 --- /dev/null +++ b/examples/qutest/unity_basic/test_unity/TestProductionCode_Runner.c @@ -0,0 +1,57 @@ +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +/*=======Test Runner Used To Run Each Test Below=====*/ +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + if (TEST_PROTECT()) \ + { \ + setUp(); \ + TestFunc(); \ + } \ + if (TEST_PROTECT()) \ + { \ + tearDown(); \ + } \ + UnityConcludeTest(); \ +} + +/*=======Automagically Detected Files To Include=====*/ +#include "unity.h" +#include +#include +#include "ProductionCode.h" + +/*=======External Functions This Runner Calls=====*/ +extern void setUp(void); +extern void tearDown(void); +extern void test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWorksEvenInOurBrokenCode(void); +extern void test_FindFunction_WhichIsBroken_ShouldReturnTheIndexForItemsInList_WhichWillFailBecauseOurFunctionUnderTestIsBroken(void); +extern void test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValue(void); +extern void test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValueAgain(void); +extern void test_FunctionWhichReturnsLocalVariable_ShouldReturnCurrentCounter_ButFailsBecauseThisTestIsActuallyFlawed(void); + + +/*=======Test Reset Option=====*/ +void resetTest(void); +void resetTest(void) +{ + tearDown(); + setUp(); +} + + +/*=======MAIN=====*/ +int main(void) +{ + UnityBegin("test/TestProductionCode.c"); + RUN_TEST(test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWorksEvenInOurBrokenCode, 20); + RUN_TEST(test_FindFunction_WhichIsBroken_ShouldReturnTheIndexForItemsInList_WhichWillFailBecauseOurFunctionUnderTestIsBroken, 30); + RUN_TEST(test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValue, 41); + RUN_TEST(test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValueAgain, 51); + RUN_TEST(test_FunctionWhichReturnsLocalVariable_ShouldReturnCurrentCounter_ButFailsBecauseThisTestIsActuallyFlawed, 57); + + return (UnityEnd()); +} diff --git a/examples/qutest/unity_ledbar/qutest/Makefile b/examples/qutest/unity_ledbar/qutest/Makefile index 590b2c59..15b6c6cb 100644 --- a/examples/qutest/unity_ledbar/qutest/Makefile +++ b/examples/qutest/unity_ledbar/qutest/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 7.0.0 -# Last updated on 2022-03-27 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -129,7 +129,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/unity_ledbar/qutest/make_efm32 b/examples/qutest/unity_ledbar/qutest/make_efm32 index 957afc2f..57dced9d 100644 --- a/examples/qutest/unity_ledbar/qutest/make_efm32 +++ b/examples/qutest/unity_ledbar/qutest/make_efm32 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM -# Last updated for version 7.0.0 -# Last updated on 2022-03-27 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/qutest/unity_ledbar/qutest/make_nucleo-l053r8 b/examples/qutest/unity_ledbar/qutest/make_nucleo-l053r8 index 83604663..c4871034 100644 --- a/examples/qutest/unity_ledbar/qutest/make_nucleo-l053r8 +++ b/examples/qutest/unity_ledbar/qutest/make_nucleo-l053r8 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8 board, QUTEST, GNU-ARM -# Last updated for version 7.0.0 -# Last updated on 2022-03-27 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/qutest/unity_ledbar/qutest/make_tm4c123 b/examples/qutest/unity_ledbar/qutest/make_tm4c123 index a692f88f..de4d4fd6 100644 --- a/examples/qutest/unity_ledbar/qutest/make_tm4c123 +++ b/examples/qutest/unity_ledbar/qutest/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last updated for version 7.0.0 -# Last updated on 2022-03-27 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/qutest/unity_ledbar/trace/Makefile b/examples/qutest/unity_ledbar/trace/Makefile index c874e76d..8cce2350 100644 --- a/examples/qutest/unity_ledbar/trace/Makefile +++ b/examples/qutest/unity_ledbar/trace/Makefile @@ -122,7 +122,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/unity_ledbar2/qutest/Makefile b/examples/qutest/unity_ledbar2/qutest/Makefile index 245fb258..9068b63d 100644 --- a/examples/qutest/unity_ledbar2/qutest/Makefile +++ b/examples/qutest/unity_ledbar2/qutest/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 7.0.0 -# Last updated on 2022-03-21 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -130,7 +130,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/unity_ledbar2/qutest/make_nucleo-l053r8 b/examples/qutest/unity_ledbar2/qutest/make_nucleo-l053r8 index 41122426..be2eab0a 100644 --- a/examples/qutest/unity_ledbar2/qutest/make_nucleo-l053r8 +++ b/examples/qutest/unity_ledbar2/qutest/make_nucleo-l053r8 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C on NUCLEO-L053R8 board, QUTEST, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2022-03-21 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/qutest/unity_mock/README.txt b/examples/qutest/unity_mock/README.txt new file mode 100644 index 00000000..47e3ff9f --- /dev/null +++ b/examples/qutest/unity_mock/README.txt @@ -0,0 +1,126 @@ +About This Example +================== +This example is loosely based on Matt Chernosky's blog "Test-Driving +with Mocks Instead of Hardware", which you can find at: +http://www.electronvector.com/blog/test-driving-with-mocks-instead-of-hardware +https://vimeo.com/256590562 + +The purpose is to illustrate the simpler alternative to building Mocks with +QUTest. + +*** NOTE *** +The provided Makefiles for building and running the tests are cross-platform +and will work on Windows as well as POSIX workstations (Linux/MacOS). Also, +it is assumed that you have installed the QTools collection on your computer +and that you have added the QTools/bin directory to your PATH, see: + https://www.state-machine.com/qtools + + +Directories and Files +--------------------- + +qpc/examples/qutest/unity_basic/ - this example +| ++-src/ - code under test (CUT) +| +-Led.h +| +-LedBar.h +| +-LedBar.c +| ++-test/ - testing with QUTest +| +-conftest.py - configuration file for Python +| +-Makefile - makefile for building and running the tests (host) +| +-make_ef32 - makefile for building and running the tests EFM32 target +| +-make_tm4c123 - makefile for building and running the tests TM4C123 target +| +-Makefile - makefile for building and running the tests +| +-spy_Led.c - QUTest "spy" test double for LED (replaces the mock) +| +-test_LedBar.c - QUTest test fixture for LedBar +| +-test_LedBar.py - QUTest test script in Python +| +-test_LedBare.tcl - QUTest test script in Tcl +| ++-test_unity/ - testing with Unity +| +-cmock/ - CMock source code needed in this example +| | +-cmock.h +| | +-cmock.c +| | +-cmock_internals.h +| | +| +-Makefile - makefile for building and running the tests +| +-make_ef32 - makefile for building and running the tests EFM32 target +| +-make_tm4c123 - makefile for building and running the tests TM4C123 target +| +-MockLed.h - interface of the LED-Mock (generated by CMock) +| +-MockLed.c - implementation of the LED-Mock (generated by CMock) +| +-TestLedBar.c - test fixture for the LedBar CUT +| +-TestLedBar_Runner.c - test runner for the LedBar (generated by CMock) +| + + +Building the Code and Testing with Unity +---------------------------------------- +Open a terminal/command-prompt. Change directory to test_unity +(qpc/examples/qutest/unity_mock/test_unity). + +Type "make". The provided Makefile will build the code and run +the tests using the Unity framework. + +*** NOTE *** +For Windows, the make utility, the C compiler (MinGW) are included +in the QTools collection. For all platforms, you will also need +the Unity source code, which is also included in the QTools collection +and the provided Makefile takes it from there. + +*** NOTE *** +Some of the Unity tests fail, which is intentional to demonstrate +various failure modes. + + +Building the Code and Testing with QUTest +----------------------------------------- +Open terminal / command-prompt and launch the QSPY host utility +by typing: + +qspy -u -t + +Open *another* terminal / command-prompt and change directory to +test (qpc/examples/qutest/unity_mock/test). +Type: + +make + +to build the code with the provided Makefile and run the tests +using the Tcl test script (test_LedBar.tcl) + +*** NOTE *** +For Windows, the Tcl interpreter (tclsh 8.4) with the UDP extension +is included in the QTools collection, so you don't need to install +any additional software to run the Tcl tests. For other operating +systems (Linux/MacOS), Tcl is typically provided, but you need to +install the UDP extension, as described at: +https://www.state-machine.com/qtools/start.html#qtools_qspypy + +*** NOTE *** +Some of the QUTest tests fail, which is intentional to demonstrate +various failure modes, exactly as it is in the case of Unity tests. + + +If you prefer to use Python, add "SCRIPT=py" parameter to make: + +make SCRIPT=py + +this will build the code and run the tests +using the Python test script (test_LedBar.py) + +*** NOTE *** +In order to run the Python tests, you need to install Python on +your machine. Additionally, you need to enable Python support for +QUTest unit testing, as described at: +https://www.state-machine.com/qtools/start.html#qtools_qspypy + + +Contact Information +------------------- +https://www.state-machine.com +mailto:info@state-machine.com + + + +http://www.electronvector.com/blog/test-driving-with-mocks-instead-of-hardware +https://vimeo.com/256590562 diff --git a/examples/qutest/unity_mock/src/Led.h b/examples/qutest/unity_mock/src/Led.h new file mode 100644 index 00000000..246c36a9 --- /dev/null +++ b/examples/qutest/unity_mock/src/Led.h @@ -0,0 +1,12 @@ +#ifndef LED_H +#define LED_H + +enum { MAX_LED = 5 }; + +/* turns a given LED on and retruns the power drawn by it in uW */ +uint32_t Led_on(uint8_t index); + +/* turns a given LED off */ +void Led_off(uint8_t index); + +#endif /* LED_H */ \ No newline at end of file diff --git a/examples/qutest/unity_mock/src/LedBar.c b/examples/qutest/unity_mock/src/LedBar.c new file mode 100644 index 00000000..174dfe24 --- /dev/null +++ b/examples/qutest/unity_mock/src/LedBar.c @@ -0,0 +1,41 @@ +#include +#include "LedBar.h" +#include "Led.h" + +/* + Example sequence diagram for the LedBar_setPercent() implementation: + + +----------+ +------+ +------+ +------+ +------+ +------+ + | LedBar | |LED[0]| |LED[1]| |LED[2]| |LED[3]| |LED[4]| + +----------+ +------+ +------+ +------+ +------+ +------+ + | | | | | | + +-+ Led_on() | | | | | + | |------------->| | | | | + | | | | | | | + | | Led_on() | | | | | + | |----------------------->| | | | + | | | | | | | + | | Led_on() | | | | | + | |--------------------------------->| | | + | | | | | | | + | | Led_off() | | | | | + | |------------------------------------------->| | + | | | | | | | + | | Led_off() | | | | | + | |----------------------------------------------------->| + | | | | | | | + +-+ | | | | | + | | | | | | +*/ +uint32_t LedBar_setPercent(uint8_t percent) { + uint8_t n = (uint8_t)((percent * MAX_LED) / 100); + uint8_t i; + uint32_t p = 0U; /* power draw in uW */ + for (i = 0U; i < n; ++i) { + p += Led_on(i); + } + for (i = n; i < MAX_LED; ++i) { + Led_off(i); + } + return p; +} diff --git a/examples/qutest/unity_mock/src/LedBar.h b/examples/qutest/unity_mock/src/LedBar.h new file mode 100644 index 00000000..249daab7 --- /dev/null +++ b/examples/qutest/unity_mock/src/LedBar.h @@ -0,0 +1,9 @@ +#ifndef LEDBAR_H +#define LEDBAR_H + +/* displays the percentage on the LED bar +* and returns the total power drawn by the LEDs in uW. +*/ +uint32_t LedBar_setPercent(uint8_t percent); + +#endif /* LEDBAR_H */ \ No newline at end of file diff --git a/examples/qutest/unity_mock/test/Makefile b/examples/qutest/unity_mock/test/Makefile new file mode 100644 index 00000000..d5d5d4c7 --- /dev/null +++ b/examples/qutest/unity_mock/test/Makefile @@ -0,0 +1,274 @@ +############################################################################## +# Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 +# +# Q u a n t u m L e a P s +# ------------------------ +# Modern Embedded Software +# +# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# +# This program is open source software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Alternatively, this program may be distributed and modified under the +# terms of Quantum Leaps commercial licenses, which expressly supersede +# the GNU General Public License and are specifically designed for +# licensees interested in retaining the proprietary status of their code. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact information: +# +# +############################################################################## +# +# examples of invoking this Makefile: +# make # make and run the Python tests in the current directory +# make TESTS=test*.py # make and run the selected tests in the curr. dir. +# make HOST=localhost:7705 # connect to host:port +# make norun # only make but not run the tests +# make clean # cleanup the build +# make debug # only run tests in DEBUG mode +# +# 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://github.com/QuantumLeaps/qtools +# + +#----------------------------------------------------------------------------- +# project name: +# +PROJECT := test_mock + +#----------------------------------------------------------------------------- +# project directories: +# + +# list of all source directories used by this project +VPATH := . \ + ../src + +# list of all include directories needed by this project +INCLUDES := -I. \ + -I../src + +# location of the QP/C framework (if not provided in an env. variable) +ifeq ($(QPC),) +QPC := ../../../.. +endif + +# make sure that QTOOLS env. variable is defined... +ifeq ("$(wildcard $(QTOOLS))","") +$(error QTOOLS not found. Please install QTools and define QTOOLS env. variable) +endif + +#----------------------------------------------------------------------------- +# project files: +# + +# C source files... +C_SRCS := \ + LedBar.c \ + spy_Led.c \ + test_LedBar.c + +# C++ source files... +CPP_SRCS := + +LIB_DIRS := +LIBS := + +# defines... +DEFINES := + +#----------------------------------------------------------------------------- +# add QP/C framework (depends on the OS this Makefile runs on): +# +ifeq ($(OS),Windows_NT) + QP_PORT_DIR := $(QPC)/ports/win32-qutest + LIB_DIRS += -L$(QP_PORT_DIR)/mingw + LIBS += -lqp -lws2_32 +QS_SRCS := +else + QP_PORT_DIR := $(QPC)/ports/posix-qutest + C_SRCS += \ + qep_hsm.c \ + qep_msm.c \ + qf_act.c \ + qf_actq.c \ + qf_defer.c \ + qf_dyn.c \ + qf_mem.c \ + qf_ps.c \ + qf_qact.c \ + qf_qeq.c \ + qf_qmact.c \ + qf_time.c \ + qs.c \ + qs_64bit.c \ + qs_rx.c \ + qs_fp.c \ + qutest.c \ + qutest_port.c + + LIBS += -lpthread +endif + +#============================================================================ +# Typically you should not need to change anything below this line + +VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) + +#----------------------------------------------------------------------------- +# GNU toolset: +# +# NOTE: +# GNU toolset (MinGW) is included in the QTools collection for Windows, see: +# https://www.state-machine.com/qtools +# It is assumed that %QTOOLS%\bin directory is added to the PATH +# +CC := gcc +CPP := g++ +LINK := gcc # for C programs +#LINK := g++ # for C++ programs + +#----------------------------------------------------------------------------- +# QUTest test script utilities (requires QTOOLS): +# +ifeq ("$(wildcard $(QUTEST))","") +QUTEST := python3 $(QTOOLS)/qutest/qutest.py +endif + +TESTS := *.py + +#----------------------------------------------------------------------------- +# basic utilities (depends on the OS this Makefile runs on): +# +ifeq ($(OS),Windows_NT) + MKDIR := mkdir + RM := rm + TARGET_EXT := .exe +else ifeq ($(OSTYPE),cygwin) + MKDIR := mkdir -p + RM := rm -f + TARGET_EXT := .exe +else + MKDIR := mkdir -p + RM := rm -f + TARGET_EXT := +endif + +#----------------------------------------------------------------------------- +# build options... + +BIN_DIR := build + +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ + $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST + +CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ + -fno-rtti -fno-exceptions \ + $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST + +ifndef GCC_OLD + LINKFLAGS := -no-pie +endif + +ifdef GCOV + CFLAGS += -fprofile-arcs -ftest-coverage + CPPFLAGS += -fprofile-arcs -ftest-coverage + LINKFLAGS += -lgcov --coverage +endif + +#----------------------------------------------------------------------------- +C_OBJS := $(patsubst %.c,%.o, $(C_SRCS)) +CPP_OBJS := $(patsubst %.cpp,%.o, $(CPP_SRCS)) + +TARGET_EXE := $(BIN_DIR)/$(PROJECT)$(TARGET_EXT) +C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) +C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) +CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) +CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) + + +#----------------------------------------------------------------------------- +# rules +# + +.PHONY : norun debug clean show + +ifeq ($(MAKECMDGOALS),norun) +all : $(TARGET_EXE) +norun : all +else +all : $(TARGET_EXE) run +endif + +$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) + $(CC) $(CFLAGS) $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o + $(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS) + +run : $(TARGET_EXE) + $(QUTEST) $(TESTS) $(TARGET_EXE) $(HOST) + +$(BIN_DIR)/%.d : %.cpp + $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@ + +$(BIN_DIR)/%.d : %.c + $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@ + +$(BIN_DIR)/%.o : %.c + $(CC) $(CFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.cpp + $(CPP) $(CPPFLAGS) $< -o $@ + +# create BIN_DIR and include dependencies only if needed +ifneq ($(MAKECMDGOALS),clean) + ifneq ($(MAKECMDGOALS),show) + ifneq ($(MAKECMDGOALS),debug) +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif +-include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif + endif +endif + +debug : + $(QUTEST) $(TESTS) DEBUG $(HOST) + +clean : + -$(RM) $(BIN_DIR)/*.* + +show : + @echo PROJECT = $(PROJECT) + @echo TARGET_EXE = $(TARGET_EXE) + @echo VPATH = $(VPATH) + @echo C_SRCS = $(C_SRCS) + @echo CPP_SRCS = $(CPP_SRCS) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo C_OBJS_EXT = $(C_OBJS_EXT) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) + @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) + @echo LIB_DIRS = $(LIB_DIRS) + @echo LIBS = $(LIBS) + @echo DEFINES = $(DEFINES) + @echo QTOOLS = $(QTOOLS) + @echo HOST = $(HOST) + @echo QUTEST = $(QUTEST) + @echo TESTS = $(TESTS) + diff --git a/examples/qutest/unity_mock/test/make_efm32 b/examples/qutest/unity_mock/test/make_efm32 new file mode 100644 index 00000000..c0a2acb8 --- /dev/null +++ b/examples/qutest/unity_mock/test/make_efm32 @@ -0,0 +1,322 @@ +############################################################################## +# Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 +# +# Q u a n t u m L e a P s +# ------------------------ +# Modern Embedded Software +# +# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# +# This program is open source software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Alternatively, this program may be distributed and modified under the +# terms of Quantum Leaps commercial licenses, which expressly supersede +# the GNU General Public License and are specifically designed for +# licensees interested in retaining the proprietary status of their code. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact information: +# +# +############################################################################## +# +# examples of invoking this Makefile: +# make -f make_efm32 # make and run the tests in the current directory +# make -f make_efm32 TESTS=philo*.py # make and run the selected tests +# make -f make_efm32 HOST=localhost:7705 # connect to host:port +# make -f make_efm32 norun # only make but not run the tests +# make -f make_efm32 clean # cleanup the build +# +# NOTE: +# To use this Makefile on Windows, you will need the GNU make utility, which +# is included in the QTools collection for Windows, see: +# https://github.com/QuantumLeaps/qtools +# + +#----------------------------------------------------------------------------- +# project name, target name, target directory: +# +PROJECT := test_mock +TARGET := efm32 +TARGET_DIR := ..\..\target_efm32 + +#----------------------------------------------------------------------------- +# project directories: +# + +# location of the QP/C framework (if not provided in an env. variable) +ifeq ($(QPC),) +QPC := ../../../.. +endif + +# QP port used in this project +QP_PORT_DIR := $(QPC)/ports/arm-cm/qutest + +# make sure that QTOOLS env. variable is defined... +ifeq ("$(wildcard $(QTOOLS))","") +$(error QTOOLS not found. Please install QTools and define QTOOLS env. variable) +endif + + +# list of all source directories used by this project +VPATH := . \ + ../src \ + $(TARGET_DIR) \ + $(QPC)/src/qf \ + $(QPC)/src/qs \ + $(QP_PORT_DIR) \ + $(QPC)/3rd_party/efm32pg1b \ + $(QPC)/3rd_party/efm32pg1b/gnu + +# list of all include directories needed by this project +INCLUDES = -I. \ + -I../src \ + -I$(TARGET_DIR) \ + -I$(QPC)/include \ + -I$(QP_PORT_DIR) \ + -I$(QPC)/3rd_party/CMSIS/Include \ + -I$(QPC)/3rd_party/efm32pg1b + +#----------------------------------------------------------------------------- +# project files: +# + +# assembler source files +ASM_SRCS := + +# C source files +C_SRCS := \ + LedBar.c \ + spy_Led.c \ + test_LedBar.c \ + startup_efm32pg1b.c \ + system_efm32pg1b.c \ + em_cmu.c \ + em_emu.c \ + em_gpio.c \ + em_usart.c + +# C++ source files +CPP_SRCS := + +OUTPUT := $(PROJECT) +LD_SCRIPT := $(TARGET_DIR)/test.ld + +QP_SRCS := \ + qep_hsm.c \ + qep_msm.c \ + qf_act.c \ + qf_actq.c \ + qf_defer.c \ + qf_dyn.c \ + qf_mem.c \ + qf_ps.c \ + qf_qact.c \ + qf_qeq.c \ + qf_qmact.c \ + qf_time.c \ + qs.c \ + qs_64bit.c \ + qs_rx.c \ + qs_fp.c \ + qutest.c \ + qutest_port.c + +QP_ASMS := + +LIB_DIRS := +LIBS := + +# defines +DEFINES := -DEFM32PG1B200F256GM48=1 + +# ARM CPU, ARCH, FPU, and Float-ABI types... +# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] +# ARM_ARCH: [6 | 7] (NOTE: must match ARM_CPU!) +# ARM_FPU: [ | vfp] +# FLOAT_ABI: [ | soft | softfp | hard] +# +ARM_CPU := -mcpu=cortex-m4 +ARM_ARCH := 7 # NOTE: must match the ARM_CPU! +ARM_FPU := -mfpu=vfp +FLOAT_ABI := -mfloat-abi=softfp + +#----------------------------------------------------------------------------- +# GNU-ARM toolset (NOTE: You need to adjust to your machine) +# see https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads +# +ifeq ($(GNU_ARM),) +GNU_ARM := $(QTOOLS)/gnu_arm-none-eabi +endif + +# make sure that the GNU-ARM toolset exists... +ifeq ("$(wildcard $(GNU_ARM))","") +$(error GNU_ARM toolset not found. Please adjust the Makefile) +endif + +CC := $(GNU_ARM)/bin/arm-none-eabi-gcc +CPP := $(GNU_ARM)/bin/arm-none-eabi-g++ +AS := $(GNU_ARM)/bin/arm-none-eabi-as +LINK := $(GNU_ARM)/bin/arm-none-eabi-g++ +BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy + +#----------------------------------------------------------------------------- +# FLASH tool (NOTE: Requires the JLINK utility) +# see $(TARGET_DIR)\flash.bat +# + +FLASH := $(TARGET_DIR)\flash.bat + +############################################################################## +# Typically you should not need to change anything below this line + +# basic utilities (included in QTools for Windows), see: +# https://www.state-machine.com/qtools + +MKDIR := mkdir +RM := rm + +#----------------------------------------------------------------------------- +# QUTest test script utilities (requires QTOOLS): +# +ifeq ("$(wildcard $(QUTEST))","") +QUTEST := python3 $(QTOOLS)/qutest/qutest.py +endif + +TESTS := *.py + +#----------------------------------------------------------------------------- +# build options +# + +# combine all the soruces... +C_SRCS += $(QP_SRCS) +ASM_SRCS += $(QP_ASMS) + +BIN_DIR := build_$(TARGET) + +ASFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU) + +CFLAGS = -c -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ + -ffunction-sections -fdata-sections \ + -O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST + +CPPFLAGS = -c -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ + -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \ + -O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST + + +LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \ + -specs=nosys.specs -specs=nano.specs \ + -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS) + +ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS))) +C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS))) +CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS))) + +TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin +TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf +ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS)) +C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) +C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT)) +CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) +CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT)) + +# create $(BIN_DIR) if it does not exist +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif + +#----------------------------------------------------------------------------- +# rules +# + +.PHONY : run norun flash + +ifeq ($(MAKECMDGOALS),norun) +all : $(TARGET_BIN) +norun : all +else +all : $(TARGET_BIN) run +endif + +$(TARGET_BIN) : $(TARGET_ELF) + $(BIN) -O binary $< $@ + $(FLASH) $@ + +$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) + $(CC) $(CFLAGS) $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o + $(LINK) $(LINKFLAGS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS) + +flash : + $(FLASH) $(TARGET_BIN) + +run : $(TARGET_BIN) + $(FLASH) $< + $(QUTEST) $(TESTS) $(TARGET_EXE) $(HOST) + +$(BIN_DIR)/%.d : %.c + $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@ + +$(BIN_DIR)/%.d : %.cpp + $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@ + +$(BIN_DIR)/%.o : %.s + $(AS) $(ASFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.c + $(CC) $(CFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.cpp + $(CPP) $(CPPFLAGS) $< -o $@ + +.PHONY : clean show + +# include dependency files only if our goal depends on their existence +ifneq ($(MAKECMDGOALS),clean) + ifneq ($(MAKECMDGOALS),show) +-include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif +endif + +clean : + -$(RM) $(BIN_DIR)/*.o \ + $(BIN_DIR)/*.d \ + $(BIN_DIR)/*.bin \ + $(BIN_DIR)/*.elf \ + $(BIN_DIR)/*.map + +show : + @echo PROJECT = $(PROJECT) + @echo TESTS = $(TESTS) + @echo TARGET_ELF = $(TARGET_ELF) + @echo CONF = $(CONF) + @echo VPATH = $(VPATH) + @echo C_SRCS = $(C_SRCS) + @echo CPP_SRCS = $(CPP_SRCS) + @echo ASM_SRCS = $(ASM_SRCS) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo C_OBJS_EXT = $(C_OBJS_EXT) + @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) + @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) + @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT) + @echo LIB_DIRS = $(LIB_DIRS) + @echo LIBS = $(LIBS) + @echo DEFINES = $(DEFINES) + @echo QTOOLS = $(QTOOLS) + @echo HOST = $(HOST) + @echo QUTEST = $(QUTEST) + @echo TESTS = $(TESTS) + diff --git a/examples/qutest/unity_mock/test/make_tm4c123 b/examples/qutest/unity_mock/test/make_tm4c123 new file mode 100644 index 00000000..49632859 --- /dev/null +++ b/examples/qutest/unity_mock/test/make_tm4c123 @@ -0,0 +1,320 @@ +############################################################################## +# Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 +# +# Q u a n t u m L e a P s +# ------------------------ +# Modern Embedded Software +# +# Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved. +# +# This program is open source software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Alternatively, this program may be distributed and modified under the +# terms of Quantum Leaps commercial licenses, which expressly supersede +# the GNU General Public License and are specifically designed for +# licensees interested in retaining the proprietary status of their code. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact information: +# +# +############################################################################## +# +# examples of invoking this Makefile: +# make -f make_tm4c123 # make and run the tests in the current directory +# make -f make_tm4c123 TESTS=philo*.py # make and run the selected tests +# make -f make_tm4c123 HOST=localhost:7705 # connect to host:port +# make -f make_tm4c123 norun # only make but not run the tests +# make -f make_tm4c123 clean # cleanup the build +# +# NOTE: +# To use this Makefile on Windows, you will need the GNU make utility, which +# is included in the QTools collection for Windows, see: +# https://github.com/QuantumLeaps/qtools +# + +#----------------------------------------------------------------------------- +# project name, target name, target directory: +# +PROJECT := test_mock +TARGET := tm4c123 +TARGET_DIR := ..\..\target_tm4c123 + +#----------------------------------------------------------------------------- +# project directories: +# + +# location of the QP/C framework (if not provided in an env. variable) +ifeq ($(QPC),) +QPC := ../../../.. +endif + +# QP port used in this project +QP_PORT_DIR := $(QPC)/ports/arm-cm/qutest + +# make sure that QTOOLS env. variable is defined... +ifeq ("$(wildcard $(QTOOLS))","") +$(error QTOOLS not found. Please install QTools and define QTOOLS env. variable) +endif + + +# list of all source directories used by this project +VPATH := . \ + ../src \ + $(TARGET_DIR) \ + $(QPC)/src/qf \ + $(QPC)/src/qs \ + $(QP_PORT_DIR) \ + $(QPC)/3rd_party/ek-tm4c123gxl \ + $(QPC)/3rd_party/ek-tm4c123gxl/gnu + +# list of all include directories needed by this project +INCLUDES = -I. \ + -I../src \ + -I$(TARGET_DIR) \ + -I$(QPC)/include \ + -I$(QP_PORT_DIR) \ + -I$(QPC)/3rd_party/CMSIS/Include \ + -I$(QPC)/3rd_party/ek-tm4c123gxl + +#----------------------------------------------------------------------------- +# project files: +# + +# assembler source files +ASM_SRCS := + +# C source files +C_SRCS := \ + LedBar.c \ + spy_Led.c \ + test_LedBar.c \ + system_TM4C123GH6PM.c \ + startup_TM4C123GH6PM.c + +# C++ source files +CPP_SRCS := + +OUTPUT := $(PROJECT) +LD_SCRIPT := $(TARGET_DIR)/test.ld + +QP_SRCS := \ + qep_hsm.c \ + qep_msm.c \ + qf_act.c \ + qf_actq.c \ + qf_defer.c \ + qf_dyn.c \ + qf_mem.c \ + qf_ps.c \ + qf_qact.c \ + qf_qeq.c \ + qf_qmact.c \ + qf_time.c \ + qs.c \ + qs_64bit.c \ + qs_rx.c \ + qs_fp.c \ + qutest.c \ + qutest_port.c + +QP_ASMS := + +LIB_DIRS := +LIBS := + +# defines +DEFINES := -DTARGET_IS_TM4C123_RB1 + +# ARM CPU, ARCH, FPU, and Float-ABI types... +# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] +# ARM_ARCH: [6 | 7] (NOTE: must match ARM_CPU!) +# ARM_FPU: [ | vfp] +# FLOAT_ABI: [ | soft | softfp | hard] +# +ARM_CPU := -mcpu=cortex-m4 +ARM_ARCH := 7 # NOTE: must match the ARM_CPU! +ARM_FPU := -mfpu=vfp +FLOAT_ABI := -mfloat-abi=softfp + +#----------------------------------------------------------------------------- +# GNU-ARM toolset (NOTE: You need to adjust to your machine) +# see https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads +# +ifeq ($(GNU_ARM),) +GNU_ARM := $(QTOOLS)/gnu_arm-none-eabi +endif + +# make sure that the GNU-ARM toolset exists... +ifeq ("$(wildcard $(GNU_ARM))","") +$(error GNU_ARM toolset not found. Please adjust the Makefile) +endif + +CC := $(GNU_ARM)/bin/arm-none-eabi-gcc +CPP := $(GNU_ARM)/bin/arm-none-eabi-g++ +AS := $(GNU_ARM)/bin/arm-none-eabi-as +LINK := $(GNU_ARM)/bin/arm-none-eabi-gcc +BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy + +#----------------------------------------------------------------------------- +# NOTE: The following symbol LMFLASH assumes that LMFlash.exe can +# be found on the PATH. You might need to adjust this symbol to the +# location of the LMFlash utility on your machine +# +ifeq ($(LMFLASH),) +FLASH := LMFlash.exe -q ek-tm4c123gxl +endif + +############################################################################## +# Typically you should not need to change anything below this line + +# basic utilities (included in QTools for Windows), see: +# https://www.state-machine.com/qtools + +MKDIR := mkdir +RM := rm + +#----------------------------------------------------------------------------- +# QUTest test script utilities (requires QTOOLS): +# +ifeq ("$(wildcard $(QUTEST))","") +QUTEST := python3 $(QTOOLS)/qutest/qutest.py +endif + +TESTS := *.py + +#----------------------------------------------------------------------------- +# build options +# + +# combine all the soruces... +C_SRCS += $(QP_SRCS) +ASM_SRCS += $(QP_ASMS) + +BIN_DIR := build_$(TARGET) + +ASFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU) + +CFLAGS = -c -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ + -ffunction-sections -fdata-sections \ + -O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST + +CPPFLAGS = -c -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ + -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \ + -O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST + + +LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb \ + -specs=nosys.specs -specs=nano.specs \ + -Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS) + +ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS))) +C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS))) +CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS))) + +TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin +TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf +ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS)) +C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) +C_DEPS_EXT := $(patsubst %.o, %.d, $(C_OBJS_EXT)) +CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) +CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT)) + +# create $(BIN_DIR) if it does not exist +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif + +#----------------------------------------------------------------------------- +# rules +# + +.PHONY : run norun flash + +ifeq ($(MAKECMDGOALS),norun) +all : $(TARGET_BIN) +norun : all +else +all : $(TARGET_BIN) run +endif + +$(TARGET_BIN) : $(TARGET_ELF) + $(BIN) -O binary $< $@ + $(FLASH) $@ + +$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) + $(CC) $(CFLAGS) $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o + $(LINK) $(LINKFLAGS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS) + +flash : + $(FLASH) $(TARGET_BIN) + +run : $(TARGET_BIN) + $(FLASH) -c $< + $(QUTEST) $(TESTS) $(TARGET_EXE) $(HOST) + +$(BIN_DIR)/%.d : %.c + $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@ + +$(BIN_DIR)/%.d : %.cpp + $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@ + +$(BIN_DIR)/%.o : %.s + $(AS) $(ASFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.c + $(CC) $(CFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.cpp + $(CPP) $(CPPFLAGS) $< -o $@ + +.PHONY : clean show + +# include dependency files only if our goal depends on their existence +ifneq ($(MAKECMDGOALS),clean) + ifneq ($(MAKECMDGOALS),show) +-include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif +endif + +clean : + -$(RM) $(BIN_DIR)/*.o \ + $(BIN_DIR)/*.d \ + $(BIN_DIR)/*.bin \ + $(BIN_DIR)/*.elf \ + $(BIN_DIR)/*.map + +show : + @echo PROJECT = $(PROJECT) + @echo TESTS = $(TESTS) + @echo TARGET_ELF = $(TARGET_ELF) + @echo CONF = $(CONF) + @echo VPATH = $(VPATH) + @echo C_SRCS = $(C_SRCS) + @echo CPP_SRCS = $(CPP_SRCS) + @echo ASM_SRCS = $(ASM_SRCS) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo C_OBJS_EXT = $(C_OBJS_EXT) + @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) + @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) + @echo ASM_OBJS_EXT = $(ASM_OBJS_EXT) + @echo LIB_DIRS = $(LIB_DIRS) + @echo LIBS = $(LIBS) + @echo DEFINES = $(DEFINES) + @echo QTOOLS = $(QTOOLS) + @echo HOST = $(HOST) + @echo QUTEST = $(QUTEST) + @echo TESTS = $(TESTS) + diff --git a/examples/qutest/unity_mock/test/spy_Led.c b/examples/qutest/unity_mock/test/spy_Led.c new file mode 100644 index 00000000..d20c2923 --- /dev/null +++ b/examples/qutest/unity_mock/test/spy_Led.c @@ -0,0 +1,82 @@ +/***************************************************************************** +* Purpose: example QUTEST "spy" test double implementation +* Last Updated for Version: 6.3.6 +* Date of the Last Update: 2018-10-11 +* +* Q u a n t u m L e a P s +* ------------------------ +* Modern Embedded Software +* +* Copyright (C) 2005-2018 Quantum Leaps, LLC. All rights reserved. +* +* This program is open source software: you can redistribute it and/or +* modify it under the terms of the GNU General Public License as published +* by the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Alternatively, this program may be distributed and modified under the +* terms of Quantum Leaps commercial licenses, which expressly supersede +* the GNU General Public License and are specifically designed for +* licensees interested in retaining the proprietary status of their code. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Contact information: +* +* +*****************************************************************************/ +#include "qpc.h" /* QUTest interface */ +#include "Led.h" /* original interface */ + +//Q_DEFINE_THIS_FILE + +enum { + LED_MOD = QS_USER1 /* QS app-specific record for the LED module */ +}; + +static uint32_t led_power[MAX_LED] = { + 10, 20, 10, 20, 10 +}; + +/*--------------------------------------------------------------------------*/ +void Led_DICTIONARY(void) { + QS_FUN_DICTIONARY(&Led_on); + QS_FUN_DICTIONARY(&Led_off); + QS_USR_DICTIONARY(LED_MOD); + QS_OBJ_DICTIONARY(&led_power); +} + +/*--------------------------------------------------------------------------*/ +/* turns a given LED off */ +void Led_off(uint8_t index) { + QS_BEGIN_ID(LED_MOD, 0U) /* app-specific record */ + QS_FUN(&Led_off); /* function called */ + QS_U8 (0, index); /* parameter */ + QS_END() +} + +/* turns a given LED on and retruns the power drawn by it in uW */ +uint32_t Led_on(uint8_t index) { + QS_TEST_PROBE_DEF(&Led_on) + uint32_t ret = led_power[index]; /* assume */ + + /* tweak the returned power draw from the test probe */ + QS_TEST_PROBE( + ret = (uint32_t)qs_tp_; + ) + + QS_BEGIN_ID(LED_MOD, 0U) /* app-specific record */ + QS_FUN(&Led_on); /* function called */ + QS_U32(0, ret); /* value returned */ + QS_U8 (0, index); /* parameter */ + QS_END() + + return ret; +} + diff --git a/examples/qutest/unity_mock/test/test_LedBar.c b/examples/qutest/unity_mock/test/test_LedBar.c new file mode 100644 index 00000000..04e87471 --- /dev/null +++ b/examples/qutest/unity_mock/test/test_LedBar.c @@ -0,0 +1,107 @@ +/***************************************************************************** +* Purpose: example QUTEST fixture for the mock example from Unity +* Last Updated for Version: 6.3.6 +* Date of the Last Update: 2018-10-11 +* +* Q u a n t u m L e a P s +* ------------------------ +* Modern Embedded Software +* +* Copyright (C) 2005-2018 Quantum Leaps, LLC. All rights reserved. +* +* This program is open source software: you can redistribute it and/or +* modify it under the terms of the GNU General Public License as published +* by the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Alternatively, this program may be distributed and modified under the +* terms of Quantum Leaps commercial licenses, which expressly supersede +* the GNU General Public License and are specifically designed for +* licensees interested in retaining the proprietary status of their code. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Contact information: +* +* +*****************************************************************************/ +#include "qpc.h" /* QUTest interface */ +#include "LedBar.h" /* CUT interface */ + +Q_DEFINE_THIS_FILE + +/*--------------------------------------------------------------------------*/ +void Led_DICTIONARY(void); /* dictionaries for the Led "spy " test double */ + +/*--------------------------------------------------------------------------*/ +int main(int argc, char *argv[]) { + + QF_init(); /* initialize the framework */ + + /* initialize the QS software tracing */ + Q_ALLEGE(QS_INIT(argc > 1 ? argv[1] : (void *)0)); + + /* dictionaries... */ + Led_DICTIONARY(); + QS_FUN_DICTIONARY(&LedBar_setPercent); + + /* filter setup... */ + QS_GLB_FILTER(QS_ALL_RECORDS); + + return QF_run(); /* run the tests */ +} + +/*--------------------------------------------------------------------------*/ +void QS_onTestSetup(void) { +} +/*..........................................................................*/ +void QS_onTestTeardown(void) { +} + +/*..........................................................................*/ +void QS_onCommand(uint8_t cmdId, + uint32_t param1, uint32_t param2, uint32_t param3) +{ + switch (cmdId) { + case 0: { /* call the CUT: LedBar_setPercent */ + uint32_t ret = LedBar_setPercent((uint8_t)param1); + QS_BEGIN_ID(QS_USER + cmdId, 0U) /* app-specific record */ + QS_FUN(&LedBar_setPercent); /* function called */ + QS_U32(0, ret); /* value returned */ + QS_U8 (0, (uint8_t)param1); /* parameter */ + QS_END() + break; + } + default: + break; + } + + /* unused parametrers... */ + //(void)param1; + (void)param2; + (void)param3; +} +/*..........................................................................*/ +/* host callback function to "massage" the event, if necessary */ +void QS_onTestEvt(QEvt *e) { + (void)e; +#ifdef Q_HOST /* is this test compiled for a desktop Host computer? */ +#else /* this test is compiled for an embedded Target system */ +#endif +} +/*..........................................................................*/ +/*! callback function to output the posted QP events (not used here) */ +void QS_onTestPost(void const *sender, QActive *recipient, + QEvt const *e, bool status) +{ + (void)sender; + (void)recipient; + (void)e; + (void)status; +} diff --git a/examples/qutest/unity_mock/test/test_LedBar.py b/examples/qutest/unity_mock/test/test_LedBar.py new file mode 100644 index 00000000..f0d67582 --- /dev/null +++ b/examples/qutest/unity_mock/test/test_LedBar.py @@ -0,0 +1,72 @@ +# test-script for QUTest unit testing harness +# see https://www.state-machine.com/qtools/qutest.html + +# preambe... + +# tests... +test("LedBar 0% all off") +command(0, 0) +expect("@timestamp LED_MOD Led_off 0") +expect("@timestamp LED_MOD Led_off 1") +expect("@timestamp LED_MOD Led_off 2") +expect("@timestamp LED_MOD Led_off 3") +expect("@timestamp LED_MOD Led_off 4") +expect("@timestamp USER+000 LedBar_setPercent 0 0") +expect("@timestamp Trg-Done QS_RX_COMMAND") + +test("LedBar 100% all on", NORESET) +command(0, 100) +expect("@timestamp LED_MOD Led_on 10 0") +expect("@timestamp LED_MOD Led_on 20 1") +expect("@timestamp LED_MOD Led_on 10 2") +expect("@timestamp LED_MOD Led_on 20 3") +expect("@timestamp LED_MOD Led_on 10 4") +expect("@timestamp USER+000 LedBar_setPercent 70 100") +expect("@timestamp Trg-Done QS_RX_COMMAND") + +test("LedBar 19% all off", NORESET) +command(0, 19) +expect("@timestamp LED_MOD Led_off 0") +expect("@timestamp LED_MOD Led_off 1") +expect("@timestamp LED_MOD Led_off 2") +expect("@timestamp LED_MOD Led_off 3") +expect("@timestamp LED_MOD Led_off 4") +expect("@timestamp USER+000 LedBar_setPercent 0 19") +expect("@timestamp Trg-Done QS_RX_COMMAND") + +test("LedBar 20% one on", NORESET) +command(0, 20) +expect("@timestamp LED_MOD Led_on 10 0") +expect("@timestamp LED_MOD Led_off 1") +expect("@timestamp LED_MOD Led_off 2") +expect("@timestamp LED_MOD Led_off 3") +expect("@timestamp LED_MOD Led_off 4") +expect("@timestamp USER+000 LedBar_setPercent 10 20") +expect("@timestamp Trg-Done QS_RX_COMMAND") + +test("LedBar 50% two on", NORESET) +current_obj(OBJ_AP, 'led_power') +poke(0, 4, pack('. +# +# Contact information: +# +# +############################################################################## +# +# examples of invoking this Makefile: +# make # make and run the tests in the current directory +# make norun # only make but not run the tests +# make clean # cleanup the build +# +# NOTE: +# To use this Makefile on Windows, you will need the GNU make utility, which +# is included in the Qtools collection for Windows, see: +# http://sourceforge.net/projects/qpc/files/QTools/ +# + +#----------------------------------------------------------------------------- +# project name: +# +PROJECT := test_mock + +#----------------------------------------------------------------------------- +# project directories: +# + +# list of all source directories used by this project +VPATH = . \ + ../src \ + cmock + +# list of all include directories needed by this project +INCLUDES = -I. \ + -I../src \ + -Icmock + +# make sure that QTOOLS env. variable is defined... +ifeq ("$(wildcard $(QTOOLS))","") +$(error QTOOLS not found. Please install Qtools and define QTOOLS env. variable) +endif + +# location of the Unity unit testing harness +ifeq ($(UNITY),) +UNITY := $(QTOOLS)/unity +endif + + +#----------------------------------------------------------------------------- +# project files: +# + +# C source files... +C_SRCS := \ + LedBar.c \ + MockLed.c \ + cmock.c \ + TestLedBar.c \ + TestLedBar_Runner.c + +# C++ source files... +CPP_SRCS := + +LIB_DIRS := +LIBS := + +# defines... +DEFINES := + +#----------------------------------------------------------------------------- +# add Unity to the build... +VPATH += $(UNITY)/src +INCLUDES += -I$(UNITY)/src +C_SRCS += unity.c + +#============================================================================ +# Typically you should not need to change anything below this line + +#----------------------------------------------------------------------------- +# GNU toolset: +# +# NOTE: +# GNU toolset (MinGW) is included in the QTools collection for Windows, see: +# http://sourceforge.net/projects/qpc/files/QTools/ +# It is assumed that %QTOOLS%\bin directory is added to the PATH +# +CC := gcc +CPP := g++ +LINK := gcc # for C programs +#LINK := g++ # for C++ programs + +#----------------------------------------------------------------------------- +# basic utilities (depends on the OS this Makefile runs on): +# +ifeq ($(OS),Windows_NT) + MKDIR := mkdir + RM := rm + TARGET_EXT := .exe +else ifeq ($(OSTYPE),cygwin) + MKDIR := mkdir -p + RM := rm -f + TARGET_EXT := .exe +else + MKDIR := mkdir -p + RM := rm -f + TARGET_EXT := +endif + +#----------------------------------------------------------------------------- +# build options... + +BIN_DIR := build + +CFLAGS := -c -g -O -fno-pie -std=c11 -pedantic -Wall -Wextra -W \ + $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST + +CPPFLAGS := -c -g -O -fno-pie -std=c++11 -pedantic -Wall -Wextra \ + -fno-rtti -fno-exceptions \ + $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST -DQ_HOST + +ifndef GCC_OLD + LINKFLAGS := -no-pie +endif + +#----------------------------------------------------------------------------- +C_OBJS := $(patsubst %.c,%.o, $(C_SRCS)) +CPP_OBJS := $(patsubst %.cpp,%.o, $(CPP_SRCS)) + +TARGET_EXE := $(BIN_DIR)/$(PROJECT)$(TARGET_EXT) +C_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(C_OBJS)) +C_DEPS_EXT := $(patsubst %.o,%.d, $(C_OBJS_EXT)) +CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS)) +CPP_DEPS_EXT := $(patsubst %.o,%.d, $(CPP_OBJS_EXT)) + +# create $(BIN_DIR) if it does not exist +ifeq ("$(wildcard $(BIN_DIR))","") +$(shell $(MKDIR) $(BIN_DIR)) +endif + +#----------------------------------------------------------------------------- +# rules +# + +.PHONY : run norun clean show + +ifeq ($(MAKECMDGOALS),norun) +all : $(TARGET_EXE) +norun : all +else +all : $(TARGET_EXE) run +endif + +ifeq (, $(TESTS)) +ifeq ($(SCRIPT),py) +TESTS := *.py +else +TESTS := *.tcl +endif +endif + +$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) + $(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(LIBS) + +run : $(TARGET_EXE) + $(TARGET_EXE) + +$(BIN_DIR)/%.d : %.cpp + $(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@ + +$(BIN_DIR)/%.d : %.c + $(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@ + +$(BIN_DIR)/%.o : %.c + $(CC) $(CFLAGS) $< -o $@ + +$(BIN_DIR)/%.o : %.cpp + $(CPP) $(CPPFLAGS) $< -o $@ + +# include dependency files only if our goal depends on their existence +ifneq ($(MAKECMDGOALS),clean) + ifneq ($(MAKECMDGOALS),show) +-include $(C_DEPS_EXT) $(CPP_DEPS_EXT) + endif +endif + +clean : + -$(RM) $(BIN_DIR)/*.o \ + $(BIN_DIR)/*.d \ + $(TARGET_EXE) + +show : + @echo PROJECT = $(PROJECT) + @echo TARGET_EXE = $(TARGET_EXE) + @echo VPATH = $(VPATH) + @echo C_SRCS = $(C_SRCS) + @echo CPP_SRCS = $(CPP_SRCS) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo C_OBJS_EXT = $(C_OBJS_EXT) + @echo C_DEPS_EXT = $(C_DEPS_EXT) + @echo CPP_DEPS_EXT = $(CPP_DEPS_EXT) + @echo CPP_OBJS_EXT = $(CPP_OBJS_EXT) + @echo LIB_DIRS = $(LIB_DIRS) + @echo LIBS = $(LIBS) + @echo DEFINES = $(DEFINES) + @echo QTOOLS = $(QTOOLS) + @echo QUTEST = $(QUTEST) + @echo HOST = $(HOST) + @echo TESTS = $(TESTS) + diff --git a/examples/qutest/unity_mock/test_unity/MockLed.c b/examples/qutest/unity_mock/test_unity/MockLed.c new file mode 100644 index 00000000..41d223f7 --- /dev/null +++ b/examples/qutest/unity_mock/test_unity/MockLed.c @@ -0,0 +1,123 @@ +/* AUTOGENERATED FILE. DO NOT EDIT. */ +#include +#include +#include +#include "unity.h" +#include "cmock.h" +#include "MockLed.h" + +static const char* CMockString_Led_off = "Led_off"; +static const char* CMockString_Led_on = "Led_on"; +static const char* CMockString_index = "index"; + +typedef struct _CMOCK_Led_on_CALL_INSTANCE +{ + UNITY_LINE_TYPE LineNumber; + uint32_t ReturnVal; + uint8_t Expected_index; + +} CMOCK_Led_on_CALL_INSTANCE; + +typedef struct _CMOCK_Led_off_CALL_INSTANCE +{ + UNITY_LINE_TYPE LineNumber; + uint8_t Expected_index; + +} CMOCK_Led_off_CALL_INSTANCE; + +static struct MockLedInstance +{ + CMOCK_MEM_INDEX_TYPE Led_on_CallInstance; + CMOCK_MEM_INDEX_TYPE Led_off_CallInstance; +} Mock; + +extern jmp_buf AbortFrame; + +void MockLed_Verify(void) +{ + UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM; + UNITY_SET_DETAIL(CMockString_Led_on); + UNITY_TEST_ASSERT(CMOCK_GUTS_NONE == Mock.Led_on_CallInstance, cmock_line, CMockStringCalledLess); + UNITY_SET_DETAIL(CMockString_Led_off); + UNITY_TEST_ASSERT(CMOCK_GUTS_NONE == Mock.Led_off_CallInstance, cmock_line, CMockStringCalledLess); +} + +void MockLed_Init(void) +{ + MockLed_Destroy(); +} + +void MockLed_Destroy(void) +{ + CMock_Guts_MemFreeAll(); + memset(&Mock, 0, sizeof(Mock)); +} + +uint32_t Led_on(uint8_t index) +{ + UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM; + CMOCK_Led_on_CALL_INSTANCE* cmock_call_instance; + UNITY_SET_DETAIL(CMockString_Led_on); + cmock_call_instance = (CMOCK_Led_on_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.Led_on_CallInstance); + Mock.Led_on_CallInstance = CMock_Guts_MemNext(Mock.Led_on_CallInstance); + UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore); + cmock_line = cmock_call_instance->LineNumber; + { + UNITY_SET_DETAILS(CMockString_Led_on,CMockString_index); + UNITY_TEST_ASSERT_EQUAL_HEX8(cmock_call_instance->Expected_index, index, cmock_line, CMockStringMismatch); + } + UNITY_CLR_DETAILS(); + return cmock_call_instance->ReturnVal; +} + +void CMockExpectParameters_Led_on(CMOCK_Led_on_CALL_INSTANCE* cmock_call_instance, uint8_t index) +{ + cmock_call_instance->Expected_index = index; +} + +void Led_on_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, uint8_t index, uint32_t cmock_to_return) +{ + CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_Led_on_CALL_INSTANCE)); + CMOCK_Led_on_CALL_INSTANCE* cmock_call_instance = (CMOCK_Led_on_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index); + UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory); + memset(cmock_call_instance, 0, sizeof(*cmock_call_instance)); + Mock.Led_on_CallInstance = CMock_Guts_MemChain(Mock.Led_on_CallInstance, cmock_guts_index); + cmock_call_instance->LineNumber = cmock_line; + CMockExpectParameters_Led_on(cmock_call_instance, index); + cmock_call_instance->ReturnVal = cmock_to_return; + UNITY_CLR_DETAILS(); +} + +void Led_off(uint8_t index) +{ + UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM; + CMOCK_Led_off_CALL_INSTANCE* cmock_call_instance; + UNITY_SET_DETAIL(CMockString_Led_off); + cmock_call_instance = (CMOCK_Led_off_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.Led_off_CallInstance); + Mock.Led_off_CallInstance = CMock_Guts_MemNext(Mock.Led_off_CallInstance); + UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore); + cmock_line = cmock_call_instance->LineNumber; + { + UNITY_SET_DETAILS(CMockString_Led_off,CMockString_index); + UNITY_TEST_ASSERT_EQUAL_HEX8(cmock_call_instance->Expected_index, index, cmock_line, CMockStringMismatch); + } + UNITY_CLR_DETAILS(); +} + +void CMockExpectParameters_Led_off(CMOCK_Led_off_CALL_INSTANCE* cmock_call_instance, uint8_t index) +{ + cmock_call_instance->Expected_index = index; +} + +void Led_off_CMockExpect(UNITY_LINE_TYPE cmock_line, uint8_t index) +{ + CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_Led_off_CALL_INSTANCE)); + CMOCK_Led_off_CALL_INSTANCE* cmock_call_instance = (CMOCK_Led_off_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index); + UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory); + memset(cmock_call_instance, 0, sizeof(*cmock_call_instance)); + Mock.Led_off_CallInstance = CMock_Guts_MemChain(Mock.Led_off_CallInstance, cmock_guts_index); + cmock_call_instance->LineNumber = cmock_line; + CMockExpectParameters_Led_off(cmock_call_instance, index); + UNITY_CLR_DETAILS(); +} + diff --git a/examples/qutest/unity_mock/test_unity/MockLed.h b/examples/qutest/unity_mock/test_unity/MockLed.h new file mode 100644 index 00000000..b8cb26d5 --- /dev/null +++ b/examples/qutest/unity_mock/test_unity/MockLed.h @@ -0,0 +1,38 @@ +/* AUTOGENERATED FILE. DO NOT EDIT. */ +#ifndef _MOCKLED_H +#define _MOCKLED_H + +#include +#include "Led.h" + +/* Ignore the following warnings, since we are copying code */ +#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__) +#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0))) +#pragma GCC diagnostic push +#endif +#if !defined(__clang__) +#pragma GCC diagnostic ignored "-Wpragmas" +#endif +#pragma GCC diagnostic ignored "-Wunknown-pragmas" +#pragma GCC diagnostic ignored "-Wduplicate-decl-specifier" +#endif + +void MockLed_Init(void); +void MockLed_Destroy(void); +void MockLed_Verify(void); + + + + +#define Led_on_ExpectAndReturn(index, cmock_retval) Led_on_CMockExpectAndReturn(__LINE__, index, cmock_retval) +void Led_on_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, uint8_t index, uint32_t cmock_to_return); +#define Led_off_Expect(index) Led_off_CMockExpect(__LINE__, index) +void Led_off_CMockExpect(UNITY_LINE_TYPE cmock_line, uint8_t index); + +#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__) +#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0))) +#pragma GCC diagnostic pop +#endif +#endif + +#endif diff --git a/examples/qutest/unity_mock/test_unity/TestLedBar.c b/examples/qutest/unity_mock/test_unity/TestLedBar.c new file mode 100644 index 00000000..9e74bcbb --- /dev/null +++ b/examples/qutest/unity_mock/test_unity/TestLedBar.c @@ -0,0 +1,87 @@ +#include +#include "LedBar.h" +#include "unity.h" +#include "MockLed.h" + +void setUp(void) +{ + /* This is run before EACH TEST */ +} + +void tearDown(void) +{ + /* This is run after EACH TEST */ +} + +void test_LedBar_0_percent_all_off(void) +{ + Led_off_Expect(0); + Led_off_Expect(1); + Led_off_Expect(2); + Led_off_Expect(3); + Led_off_Expect(4); + + LedBar_setPercent(0); +} + +void test_LedBar_100_percent_all_on(void) +{ + Led_on_ExpectAndReturn(0, 10); + Led_on_ExpectAndReturn(1, 20); + Led_on_ExpectAndReturn(2, 10); + Led_on_ExpectAndReturn(3, 20); + Led_on_ExpectAndReturn(4, 10); + + TEST_ASSERT_EQUAL(70, LedBar_setPercent(100)); +} + +void test_LedBar_19_percent_all_off(void) +{ + Led_off_Expect(0); + Led_off_Expect(1); + Led_off_Expect(2); + Led_off_Expect(3); + Led_off_Expect(4); + + TEST_ASSERT_EQUAL(0, LedBar_setPercent(19)); +} + +void test_LedBar_20_percent_one_on(void) +{ + Led_on_ExpectAndReturn(0, 10); + Led_off_Expect(1); + Led_off_Expect(2); + Led_off_Expect(3); + Led_off_Expect(4); + + TEST_ASSERT_EQUAL(10, LedBar_setPercent(20)); +} + +void test_LedBar_50_percent_two_on(void) +{ + Led_on_ExpectAndReturn(0, 23); + Led_on_ExpectAndReturn(1, 17); + Led_off_Expect(2); + Led_off_Expect(3); + Led_off_Expect(4); + + TEST_ASSERT_EQUAL(40, LedBar_setPercent(50)); +} + +void test_LedBar_99_percent_four_on(void) +{ + Led_on_ExpectAndReturn(0, 10); + Led_on_ExpectAndReturn(1, 20); + Led_on_ExpectAndReturn(2, 10); + Led_on_ExpectAndReturn(3, 20); + Led_off_Expect(4); + + TEST_ASSERT_EQUAL(60, LedBar_setPercent(99)); +} + + +/* NOTE: +* The Mock example requires a specific "test runner", which +* is provided in the file TestLedBar_Runner.c. +*/ + diff --git a/examples/qutest/unity_mock/test_unity/TestLedBar_Runner.c b/examples/qutest/unity_mock/test_unity/TestLedBar_Runner.c new file mode 100644 index 00000000..01895039 --- /dev/null +++ b/examples/qutest/unity_mock/test_unity/TestLedBar_Runner.c @@ -0,0 +1,107 @@ +/* AUTOGENERATED FILE. DO NOT EDIT. */ + +/*=======Test Runner Used To Run Each Test Below=====*/ +#define RUN_TEST(TestFunc, TestLineNum) \ +{ \ + Unity.CurrentTestName = #TestFunc; \ + Unity.CurrentTestLineNumber = TestLineNum; \ + Unity.NumberOfTests++; \ + CMock_Init(); \ + UNITY_CLR_DETAILS(); \ + if (TEST_PROTECT()) \ + { \ + setUp(); \ + TestFunc(); \ + } \ + if (TEST_PROTECT()) \ + { \ + tearDown(); \ + CMock_Verify(); \ + } \ + CMock_Destroy(); \ + UnityConcludeTest(); \ +} + +/*=======Automagically Detected Files To Include=====*/ +#ifdef __WIN32__ +#define UNITY_INCLUDE_SETUP_STUBS +#endif +#include "unity.h" +#include "cmock.h" +#include +#include +#include +#include "LedBar.h" +#include +#include "MockLed.h" + +/*=======External Functions This Runner Calls=====*/ +extern void setUp(void); +extern void tearDown(void); +extern void test_LedBar_0_percent_all_off(void); +extern void test_LedBar_100_percent_all_on(void); +extern void test_LedBar_19_percent_all_off(void); +extern void test_LedBar_20_percent_one_on(void); +extern void test_LedBar_50_percent_two_on(void); +extern void test_LedBar_99_percent_four_on(void); + + +/*=======Mock Management=====*/ +static void CMock_Init(void) +{ + MockLed_Init(); +} +static void CMock_Verify(void) +{ + MockLed_Verify(); +} +static void CMock_Destroy(void) +{ + MockLed_Destroy(); +} + +/*=======Suite Setup=====*/ +static void suite_setup(void) +{ +#if defined(UNITY_WEAK_ATTRIBUTE) || defined(UNITY_WEAK_PRAGMA) + suiteSetUp(); +#endif +} + +/*=======Suite Teardown=====*/ +static int suite_teardown(int num_failures) +{ +#if defined(UNITY_WEAK_ATTRIBUTE) || defined(UNITY_WEAK_PRAGMA) + return suiteTearDown(num_failures); +#else + return num_failures; +#endif +} + +/*=======Test Reset Option=====*/ +void resetTest(void); +void resetTest(void) +{ + CMock_Verify(); + CMock_Destroy(); + tearDown(); + CMock_Init(); + setUp(); +} + + +/*=======MAIN=====*/ +int main(void) +{ + suite_setup(); + UnityBegin("test/TestLedBar.c"); + RUN_TEST(test_LedBar_0_percent_all_off, 16); + RUN_TEST(test_LedBar_100_percent_all_on, 27); + RUN_TEST(test_LedBar_19_percent_all_off, 38); + RUN_TEST(test_LedBar_20_percent_one_on, 49); + RUN_TEST(test_LedBar_50_percent_two_on, 60); + RUN_TEST(test_LedBar_99_percent_four_on, 71); + + CMock_Guts_MemFreeFinal(); + return suite_teardown(UnityEnd()); +} diff --git a/examples/qutest/unity_mock/test_unity/cmock/cmock.c b/examples/qutest/unity_mock/test_unity/cmock/cmock.c new file mode 100644 index 00000000..318f4c7a --- /dev/null +++ b/examples/qutest/unity_mock/test_unity/cmock/cmock.c @@ -0,0 +1,210 @@ +/* ========================================== + CMock Project - Automatic Mock Generation for C + Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + [Released under MIT License. Please refer to license.txt for details] +========================================== */ + +#include "unity.h" +#include "cmock.h" + +//public constants to be used by mocks +const char* CMockStringOutOfMemory = "CMock has run out of memory. Please allocate more."; +const char* CMockStringCalledMore = "Called more times than expected."; +const char* CMockStringCalledLess = "Called less times than expected."; +const char* CMockStringCalledEarly = "Called earlier than expected."; +const char* CMockStringCalledLate = "Called later than expected."; +const char* CMockStringCallOrder = "Called out of order."; +const char* CMockStringIgnPreExp = "IgnoreArg called before Expect."; +const char* CMockStringPtrPreExp = "ReturnThruPtr called before Expect."; +const char* CMockStringPtrIsNULL = "Pointer is NULL."; +const char* CMockStringExpNULL = "Expected NULL."; +const char* CMockStringMismatch = "Function called with unexpected argument value."; + +//private variables +#ifdef CMOCK_MEM_DYNAMIC +static unsigned char* CMock_Guts_Buffer = NULL; +static CMOCK_MEM_INDEX_TYPE CMock_Guts_BufferSize = CMOCK_MEM_ALIGN_SIZE; +static CMOCK_MEM_INDEX_TYPE CMock_Guts_FreePtr; +#else +static CMOCK_MEM_INDEX_TYPE CMock_Guts_BufferArray[(CMOCK_MEM_SIZE + CMOCK_MEM_INDEX_SIZE - 1) / CMOCK_MEM_INDEX_SIZE]; +#define CMock_Guts_Buffer ((unsigned char*)CMock_Guts_BufferArray) +static CMOCK_MEM_INDEX_TYPE CMock_Guts_BufferSize = CMOCK_MEM_SIZE + CMOCK_MEM_ALIGN_SIZE; +static CMOCK_MEM_INDEX_TYPE CMock_Guts_FreePtr; +#endif + +//------------------------------------------------------- +// CMock_Guts_MemNew +//------------------------------------------------------- +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNew(CMOCK_MEM_INDEX_TYPE size) +{ + CMOCK_MEM_INDEX_TYPE index; + + //verify arguments valid (we must be allocating space for at least 1 byte, and the existing chain must be in memory somewhere) + if (size < 1) + return CMOCK_GUTS_NONE; + + //verify we have enough room + size = size + CMOCK_MEM_INDEX_SIZE; + if (size & CMOCK_MEM_ALIGN_MASK) + size = (size + CMOCK_MEM_ALIGN_MASK) & ~CMOCK_MEM_ALIGN_MASK; + if ((CMock_Guts_BufferSize - CMock_Guts_FreePtr) < size) + { +#ifndef CMOCK_MEM_DYNAMIC + return CMOCK_GUTS_NONE; // nothing we can do; our static buffer is out of memory +#else + // our dynamic buffer does not have enough room; request more via realloc() + CMOCK_MEM_INDEX_TYPE new_buffersize = CMock_Guts_BufferSize + CMOCK_MEM_SIZE + size; + unsigned char* new_buffer = realloc(CMock_Guts_Buffer, (size_t)new_buffersize); + if (new_buffer == NULL) + return CMOCK_GUTS_NONE; // realloc() failed; out of memory + CMock_Guts_Buffer = new_buffer; + CMock_Guts_BufferSize = new_buffersize; +#endif + } + + //determine where we're putting this new block, and init its pointer to be the end of the line + index = CMock_Guts_FreePtr + CMOCK_MEM_INDEX_SIZE; + *(CMOCK_MEM_INDEX_TYPE*)(&CMock_Guts_Buffer[CMock_Guts_FreePtr]) = CMOCK_GUTS_NONE; + CMock_Guts_FreePtr += size; + + return index; +} + +//------------------------------------------------------- +// CMock_Guts_MemChain +//------------------------------------------------------- +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemChain(CMOCK_MEM_INDEX_TYPE root_index, CMOCK_MEM_INDEX_TYPE obj_index) +{ + CMOCK_MEM_INDEX_TYPE index; + void* root; + void* obj; + void* next; + + if (root_index == CMOCK_GUTS_NONE) + { + //if there is no root currently, we return this object as the root of the chain + return obj_index; + } + else + { + //reject illegal nodes + if ((root_index < CMOCK_MEM_ALIGN_SIZE) || (root_index >= CMock_Guts_FreePtr)) + { + return CMOCK_GUTS_NONE; + } + if ((obj_index < CMOCK_MEM_ALIGN_SIZE) || (obj_index >= CMock_Guts_FreePtr)) + { + return CMOCK_GUTS_NONE; + } + + root = (void*)(&CMock_Guts_Buffer[root_index]); + obj = (void*)(&CMock_Guts_Buffer[obj_index]); + + //find the end of the existing chain and add us + next = root; + do { + index = *(CMOCK_MEM_INDEX_TYPE*)((CMOCK_MEM_PTR_AS_INT)next - CMOCK_MEM_INDEX_SIZE); + if (index >= CMock_Guts_FreePtr) + return CMOCK_GUTS_NONE; + if (index > 0) + next = (void*)(&CMock_Guts_Buffer[index]); + } while (index > 0); + *(CMOCK_MEM_INDEX_TYPE*)((CMOCK_MEM_PTR_AS_INT)next - CMOCK_MEM_INDEX_SIZE) = (CMOCK_MEM_INDEX_TYPE)((CMOCK_MEM_PTR_AS_INT)obj - (CMOCK_MEM_PTR_AS_INT)CMock_Guts_Buffer); + return root_index; + } +} + +//------------------------------------------------------- +// CMock_Guts_MemNext +//------------------------------------------------------- +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNext(CMOCK_MEM_INDEX_TYPE previous_item_index) +{ + CMOCK_MEM_INDEX_TYPE index; + void* previous_item; + + //There is nothing "next" if the pointer isn't from our buffer + if ((previous_item_index < CMOCK_MEM_ALIGN_SIZE) || (previous_item_index >= CMock_Guts_FreePtr)) + return CMOCK_GUTS_NONE; + previous_item = (void*)(&CMock_Guts_Buffer[previous_item_index]); + + //if the pointer is good, then use it to look up the next index + //(we know the first element always goes in zero, so NEXT must always be > 1) + index = *(CMOCK_MEM_INDEX_TYPE*)((CMOCK_MEM_PTR_AS_INT)previous_item - CMOCK_MEM_INDEX_SIZE); + if ((index > 1) && (index < CMock_Guts_FreePtr)) + return index; + else + return CMOCK_GUTS_NONE; +} + +//------------------------------------------------------- +// CMock_Guts_MemEndOfChain +//------------------------------------------------------- +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemEndOfChain(CMOCK_MEM_INDEX_TYPE root_index) +{ + CMOCK_MEM_INDEX_TYPE index = root_index; + CMOCK_MEM_INDEX_TYPE next_index; + + for (next_index = root_index; + next_index != CMOCK_GUTS_NONE; + next_index = CMock_Guts_MemNext(index)) + { + index = next_index; + } + + return index; +} + +//------------------------------------------------------- +// CMock_GetAddressFor +//------------------------------------------------------- +void* CMock_Guts_GetAddressFor(CMOCK_MEM_INDEX_TYPE index) +{ + if ((index >= CMOCK_MEM_ALIGN_SIZE) && (index < CMock_Guts_FreePtr)) + { + return (void*)(&CMock_Guts_Buffer[index]); + } + else + { + return NULL; + } +} + +//------------------------------------------------------- +// CMock_Guts_MemBytesFree +//------------------------------------------------------- +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesFree(void) +{ + return CMock_Guts_BufferSize - CMock_Guts_FreePtr; +} + +//------------------------------------------------------- +// CMock_Guts_MemBytesUsed +//------------------------------------------------------- +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesUsed(void) +{ + return CMock_Guts_FreePtr - CMOCK_MEM_ALIGN_SIZE; +} + +//------------------------------------------------------- +// CMock_Guts_MemFreeAll +//------------------------------------------------------- +void CMock_Guts_MemFreeAll(void) +{ + CMock_Guts_FreePtr = CMOCK_MEM_ALIGN_SIZE; //skip the very beginning +} + +//------------------------------------------------------- +// CMock_Guts_MemFreeFinal +//------------------------------------------------------- +void CMock_Guts_MemFreeFinal(void) +{ + CMock_Guts_FreePtr = CMOCK_MEM_ALIGN_SIZE; +#ifdef CMOCK_MEM_DYNAMIC + if (CMock_Guts_Buffer) + { + free(CMock_Guts_Buffer); + CMock_Guts_Buffer = NULL; + } +#endif +} + diff --git a/examples/qutest/unity_mock/test_unity/cmock/cmock.h b/examples/qutest/unity_mock/test_unity/cmock/cmock.h new file mode 100644 index 00000000..a3134480 --- /dev/null +++ b/examples/qutest/unity_mock/test_unity/cmock/cmock.h @@ -0,0 +1,38 @@ +/* ========================================== + CMock Project - Automatic Mock Generation for C + Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + [Released under MIT License. Please refer to license.txt for details] +========================================== */ + +#ifndef CMOCK_FRAMEWORK_H +#define CMOCK_FRAMEWORK_H + +#include "cmock_internals.h" + +//should be big enough to index full range of CMOCK_MEM_MAX +#ifndef CMOCK_MEM_INDEX_TYPE +#define CMOCK_MEM_INDEX_TYPE unsigned int +#endif + +#define CMOCK_GUTS_NONE (0) + +#define CMOCK_ARG_MODE CMOCK_MEM_INDEX_TYPE +#define CMOCK_ARG_ALL 0 +#define CMOCK_ARG_NONE ((CMOCK_MEM_INDEX_TYPE)(~0U)) + +//------------------------------------------------------- +// Memory API +//------------------------------------------------------- +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNew(CMOCK_MEM_INDEX_TYPE size); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemChain(CMOCK_MEM_INDEX_TYPE root_index, CMOCK_MEM_INDEX_TYPE obj_index); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNext(CMOCK_MEM_INDEX_TYPE previous_item_index); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemEndOfChain(CMOCK_MEM_INDEX_TYPE root_index); + +void* CMock_Guts_GetAddressFor(CMOCK_MEM_INDEX_TYPE index); + +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesFree(void); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesUsed(void); +void CMock_Guts_MemFreeAll(void); +void CMock_Guts_MemFreeFinal(void); + +#endif //CMOCK_FRAMEWORK diff --git a/examples/qutest/unity_mock/test_unity/cmock/cmock_internals.h b/examples/qutest/unity_mock/test_unity/cmock/cmock_internals.h new file mode 100644 index 00000000..5c922adf --- /dev/null +++ b/examples/qutest/unity_mock/test_unity/cmock/cmock_internals.h @@ -0,0 +1,89 @@ +/* ========================================== + CMock Project - Automatic Mock Generation for C + Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + [Released under MIT License. Please refer to license.txt for details] +========================================== */ + +#ifndef CMOCK_FRAMEWORK_INTERNALS_H +#define CMOCK_FRAMEWORK_INTERNALS_H + +//These are constants that the generated mocks have access to +extern const char* CMockStringOutOfMemory; +extern const char* CMockStringCalledMore; +extern const char* CMockStringCalledLess; +extern const char* CMockStringCalledEarly; +extern const char* CMockStringCalledLate; +extern const char* CMockStringCallOrder; +extern const char* CMockStringIgnPreExp; +extern const char* CMockStringPtrPreExp; +extern const char* CMockStringPtrIsNULL; +extern const char* CMockStringExpNULL; +extern const char* CMockStringMismatch; + +//define CMOCK_MEM_DYNAMIC to grab memory as needed with malloc +//when you do that, CMOCK_MEM_SIZE is used for incremental size instead of total +#ifdef CMOCK_MEM_STATIC +#undef CMOCK_MEM_DYNAMIC +#endif + +#ifdef CMOCK_MEM_DYNAMIC +#include +#endif + +//this is used internally during pointer arithmetic. make sure this type is the same size as the target's pointer type +#ifndef CMOCK_MEM_PTR_AS_INT +#ifdef UNITY_POINTER_WIDTH +#ifdef UNITY_INT_WIDTH +#if UNITY_POINTER_WIDTH == UNITY_INT_WIDTH +#define CMOCK_MEM_PTR_AS_INT unsigned int +#endif +#endif +#endif +#endif + +#ifndef CMOCK_MEM_PTR_AS_INT +#ifdef UNITY_POINTER_WIDTH +#ifdef UNITY_LONG_WIDTH +#if UNITY_POINTER_WIDTH == UNITY_LONG_WIDTH +#define CMOCK_MEM_PTR_AS_INT unsigned long +#endif +#if UNITY_POINTER_WIDTH > UNITY_LONG_WIDTH +#define CMOCK_MEM_PTR_AS_INT unsigned long long +#endif +#endif +#endif +#endif + +#ifndef CMOCK_MEM_PTR_AS_INT +#define CMOCK_MEM_PTR_AS_INT unsigned long +#endif + +//0 for no alignment, 1 for 16-bit, 2 for 32-bit, 3 for 64-bit +#ifndef CMOCK_MEM_ALIGN + #ifdef UNITY_LONG_WIDTH + #if (UNITY_LONG_WIDTH == 16) + #define CMOCK_MEM_ALIGN (1) + #elif (UNITY_LONG_WIDTH == 32) + #define CMOCK_MEM_ALIGN (2) + #elif (UNITY_LONG_WIDTH == 64) + #define CMOCK_MEM_ALIGN (3) + #else + #define CMOCK_MEM_ALIGN (2) + #endif + #else + #define CMOCK_MEM_ALIGN (2) + #endif +#endif + +//amount of memory to allow cmock to use in its internal heap +#ifndef CMOCK_MEM_SIZE +#define CMOCK_MEM_SIZE (32768) +#endif + +//automatically calculated defs for easier reading +#define CMOCK_MEM_ALIGN_SIZE (CMOCK_MEM_INDEX_TYPE)(1u << CMOCK_MEM_ALIGN) +#define CMOCK_MEM_ALIGN_MASK (CMOCK_MEM_INDEX_TYPE)(CMOCK_MEM_ALIGN_SIZE - 1) +#define CMOCK_MEM_INDEX_SIZE (CMOCK_MEM_INDEX_TYPE)(CMOCK_MEM_PTR_AS_INT)((sizeof(CMOCK_MEM_INDEX_TYPE) > CMOCK_MEM_ALIGN_SIZE) ? sizeof(CMOCK_MEM_INDEX_TYPE) : CMOCK_MEM_ALIGN_SIZE) + + +#endif //CMOCK_FRAMEWORK_INTERNALS diff --git a/examples/qutest/unity_strlen/qutest/Makefile b/examples/qutest/unity_strlen/qutest/Makefile index 24f2c0f4..3e7d93eb 100644 --- a/examples/qutest/unity_strlen/qutest/Makefile +++ b/examples/qutest/unity_strlen/qutest/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QUTEST-QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.0 -# Last updated on 2020-08-01 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -128,7 +128,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QPC)/src/qs $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/qutest/unity_strlen/qutest/make_efm32 b/examples/qutest/unity_strlen/qutest/make_efm32 index 12ec2079..e06fe331 100644 --- a/examples/qutest/unity_strlen/qutest/make_efm32 +++ b/examples/qutest/unity_strlen/qutest/make_efm32 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EMF32, QUTEST, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2022-03-27 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/efm32pg1b diff --git a/examples/qutest/unity_strlen/qutest/make_nucleo-l053r8 b/examples/qutest/unity_strlen/qutest/make_nucleo-l053r8 index 64b88768..3ddebb8e 100644 --- a/examples/qutest/unity_strlen/qutest/make_nucleo-l053r8 +++ b/examples/qutest/unity_strlen/qutest/make_nucleo-l053r8 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8 board, QUTEST, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2022-03-27 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/nucleo-l053r8 diff --git a/examples/qutest/unity_strlen/qutest/make_tm4c123 b/examples/qutest/unity_strlen/qutest/make_tm4c123 index 78baceec..6bddeca9 100644 --- a/examples/qutest/unity_strlen/qutest/make_tm4c123 +++ b/examples/qutest/unity_strlen/qutest/make_tm4c123 @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on TM4C123, QUTEST, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2022-03-27 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -85,7 +85,6 @@ INCLUDES = -I. \ -I../src \ -I$(TARGET_DIR) \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/CMSIS/Include \ -I$(QPC)/3rd_party/ek-tm4c123gxl diff --git a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/bsp.c b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/bsp.c index bc9f8da0..0cb37cc5 100644 --- a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/bsp.c +++ b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/bsp.c @@ -56,7 +56,7 @@ void UART0_IRQHandler(void); #define BTN_SW2 (1U << 0) static uint32_t l_rnd; /* random seed */ -static TX_TIMER l_tick_timer; /* ThreadX timer to call QF_TICK_X() */ +static TX_TIMER l_tick_timer; /* ThreadX timer to call QTIMEEVT_TICK_X() */ #ifdef Q_SPY QSTimeCtr QS_tickTime_; @@ -187,19 +187,19 @@ void BSP_terminate(int16_t result) { /* QF callbacks ============================================================*/ static VOID timer_expiration(ULONG id) { - QF_TICK_X(id, &l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(id, &l_clock_tick); /* perform the QF clock tick processing */ } /*..........................................................................*/ void QF_onStartup(void) { /* * NOTE: * This application uses the ThreadX timer to periodically call - * the QF_tickX_(0) function. Here, only the clock tick rate of 0 - * is used, but other timers can be used to call QF_tickX_() for + * the QTimeEvt_tick_(0) function. Here, only the clock tick rate of 0 + * is used, but other timers can be used to call QTimeEvt_tick_() for * other clock tick rates, if needed. * * The choice of a ThreadX timer is not the only option. Applications - * might choose to call QF_TICK_X() directly from timer interrupts + * might choose to call QTIMEEVT_TICK_X() directly from timer interrupts * or from active object(s). */ Q_ALLEGE(tx_timer_create(&l_tick_timer, /* ThreadX timer object */ diff --git a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.h b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.h index 40a4fc56..cd9689f8 100644 --- a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.h +++ b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,30 +54,34 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ /* opaque pointers to the Philo AOs */ extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::AO_Table} .........................................................*/ /* opaque pointer to the Table AO */ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -74,3 +91,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.qm b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.qm index 61cec11e..83371250 100644 --- a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.qm +++ b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -105,7 +104,7 @@ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); @@ -187,7 +186,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -210,7 +209,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -252,7 +251,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -263,7 +262,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewd b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewd index 2738edc9..1587ed94 100644 --- a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewd +++ b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp index 9fc7bedd..8915a6d9 100644 --- a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp +++ b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp @@ -1,3774 +1,3770 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Debug - Release - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\bsp.h - - - $PROJ_DIR$\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\table.c - - - - ek-tm4c123gxl - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\threadx\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\threadx\qf_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\threadx\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\threadx\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - ThreadX - - common - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_allocate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_cleanup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_release.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_high_level.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_kernel_enter.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_kernel_setup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_cleanup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_priority_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_put.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_cleanup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_flush.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_front_send.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_receive.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_send.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_send_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_entry_exit_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_identify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_preemption_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_priority_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_relinquish.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_reset.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_resume.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_shell_entry.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_sleep.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_analyze.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_error_handler.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_error_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_suspend.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_preempt_check.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_resume.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_suspend.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_terminate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_time_slice.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_time_slice_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_timeout.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_wait_abort.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_time_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_time_set.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_activate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_deactivate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_expiration_process.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_system_activate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_system_deactivate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_thread_entry.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_buffer_full_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_disable.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_enable.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_event_filter.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_event_unfilter.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_interrupt_control.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_isr_enter_insert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_isr_exit_insert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_object_register.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_object_unregister.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_user_event_insert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_allocate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_release.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_allocate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_release.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_set.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_set_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_put.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_flush.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_front_send.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_receive.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_send.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_send_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_ceiling_put.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_put.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_put_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_entry_exit_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_preemption_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_priority_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_relinquish.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_reset.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_resume.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_suspend.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_terminate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_time_slice_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_wait_abort.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_activate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_deactivate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_info_get.c - - - - port - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_iar.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_initialize_low_level.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_context_restore.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_context_save.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_control.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_disable.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_restore.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_schedule.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_stack_build.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_system_return.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_timer_interrupt.s - - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\bsp.h + + + $PROJ_DIR$\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\table.c + + + + ek-tm4c123gxl + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\iar\startup_TM4C123GH6PM.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\system_TM4C123GH6PM.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\ek-tm4c123gxl\TM4C123GH6PM.h + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\threadx\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\threadx\qf_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\threadx\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\threadx\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + ThreadX + + common + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_allocate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_cleanup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_release.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_high_level.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_kernel_enter.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_kernel_setup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_cleanup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_priority_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_put.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_cleanup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_flush.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_front_send.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_receive.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_send.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_send_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_entry_exit_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_identify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_preemption_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_priority_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_relinquish.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_reset.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_resume.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_shell_entry.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_sleep.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_analyze.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_error_handler.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_error_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_suspend.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_preempt_check.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_resume.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_suspend.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_terminate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_time_slice.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_time_slice_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_timeout.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_wait_abort.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_time_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_time_set.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_activate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_deactivate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_expiration_process.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_system_activate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_system_deactivate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_thread_entry.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_buffer_full_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_disable.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_enable.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_event_filter.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_event_unfilter.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_interrupt_control.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_isr_enter_insert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_isr_exit_insert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_object_register.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_object_unregister.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_user_event_insert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_allocate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_release.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_allocate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_release.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_set.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_set_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_put.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_flush.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_front_send.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_receive.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_send.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_send_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_ceiling_put.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_put.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_put_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_entry_exit_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_preemption_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_priority_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_relinquish.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_reset.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_resume.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_suspend.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_terminate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_time_slice_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_wait_abort.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_activate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_deactivate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_info_get.c + + + + port + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_iar.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_initialize_low_level.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_context_restore.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_context_save.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_control.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_disable.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_restore.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_schedule.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_stack_build.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_system_return.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_timer_interrupt.s + + + + diff --git a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.eww b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.eww index 7a61d220..461ce6e0 100644 --- a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.eww +++ b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp.ewp - - - - - + + + + + $WS_DIR$\dpp.ewp + + + + + diff --git a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.icf b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.icf index 1ef57ccc..f360b0f3 100644 --- a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.icf +++ b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.icf @@ -1,29 +1,29 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 1024; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x00000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 1024; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/philo.c b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/philo.c index cd99e60f..4a8b3412 100644 --- a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/philo.c +++ b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("philo") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -52,16 +65,16 @@ static Philo l_philo[N_PHILO]; /* storage for all Philos */ #define PHILO_ID(me_) ((uint8_t)((me_) - l_philo)) /* Global objects ----------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointers to the Philo AOs */ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { &l_philo[0].super, &l_philo[1].super, @@ -69,11 +82,12 @@ QActive * const AO_Philo[N_PHILO] = { &l_philo[3].super, &l_philo[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Philo definition --------------------------------------------------------*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -83,12 +97,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +128,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -148,11 +165,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -160,9 +178,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -171,7 +189,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -185,31 +203,32 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -224,4 +243,5 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/table.c b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/table.c index af075d69..54e8a2e6 100644 --- a/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/table.c +++ b/examples/threadx/arm-cm/dpp_ek-tm4c123gxl/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("table") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -50,22 +63,23 @@ static QState Table_paused(Table * const me, QEvt const * const e); static Table l_table; /* the single instance of the Table active object */ /* Global-scope objects ----------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointer to the Table AO */ -/*.${AOs::AO_Table} ........................................................*/ +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &l_table.super; -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*..........................................................................*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -77,12 +91,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -111,11 +127,12 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR_ID(60); status_ = Q_HANDLED(); @@ -128,11 +145,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -146,7 +164,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -154,7 +172,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -164,25 +182,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -206,7 +224,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -217,13 +235,13 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -235,28 +253,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -266,7 +285,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -291,4 +310,5 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/threadx/arm-cm/dpp_stm32f429-discovery/bsp.c b/examples/threadx/arm-cm/dpp_stm32f429-discovery/bsp.c index 7b9ac507..e64e1663 100644 --- a/examples/threadx/arm-cm/dpp_stm32f429-discovery/bsp.c +++ b/examples/threadx/arm-cm/dpp_stm32f429-discovery/bsp.c @@ -58,7 +58,7 @@ Q_DEFINE_THIS_FILE #define BTN_B1 GPIO_Pin_0 static uint32_t l_rnd; /* random seed */ -static TX_TIMER l_tick_timer; /* ThreadX timer to call QF_TICK_X() */ +static TX_TIMER l_tick_timer; /* ThreadX timer to call QTIMEEVT_TICK_X() */ #ifdef Q_SPY QSTimeCtr QS_tickTime_; @@ -211,19 +211,19 @@ void BSP_terminate(int16_t result) { /* QF callbacks ============================================================*/ static VOID timer_expiration(ULONG id) { - QF_TICK_X(id, &l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(id, &l_clock_tick); /* perform the QF clock tick processing */ } /*..........................................................................*/ void QF_onStartup(void) { /* * NOTE: * This application uses the ThreadX timer to periodically call - * the QF_tickX_(0) function. Here, only the clock tick rate of 0 - * is used, but other timers can be used to call QF_tickX_() for + * the QTimeEvt_tick_(0) function. Here, only the clock tick rate of 0 + * is used, but other timers can be used to call QTimeEvt_tick_() for * other clock tick rates, if needed. * * The choice of a ThreadX timer is not the only option. Applications - * might choose to call QF_TICK_X() directly from timer interrupts + * might choose to call QTIMEEVT_TICK_X() directly from timer interrupts * or from active object(s). */ Q_ALLEGE(tx_timer_create(&l_tick_timer, /* ThreadX timer object */ diff --git a/examples/threadx/arm-cm/dpp_stm32f429-discovery/dpp.h b/examples/threadx/arm-cm/dpp_stm32f429-discovery/dpp.h index 40a4fc56..cd9689f8 100644 --- a/examples/threadx/arm-cm/dpp_stm32f429-discovery/dpp.h +++ b/examples/threadx/arm-cm/dpp_stm32f429-discovery/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,30 +54,34 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ /* opaque pointers to the Philo AOs */ extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::AO_Table} .........................................................*/ /* opaque pointer to the Table AO */ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -74,3 +91,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/threadx/arm-cm/dpp_stm32f429-discovery/dpp.qm b/examples/threadx/arm-cm/dpp_stm32f429-discovery/dpp.qm index 61cec11e..83371250 100644 --- a/examples/threadx/arm-cm/dpp_stm32f429-discovery/dpp.qm +++ b/examples/threadx/arm-cm/dpp_stm32f429-discovery/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -105,7 +104,7 @@ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); @@ -187,7 +186,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -210,7 +209,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -252,7 +251,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -263,7 +262,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.ewd b/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.ewd index c370daf2..314779dd 100644 --- a/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.ewd +++ b/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.ewd @@ -1,4213 +1,4213 @@ - - - 3 - - Debug - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 28 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 0 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 0 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 0 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 0 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Spy - - ARM - - 1 - - C-SPY - 2 - - 28 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Spy + + ARM + + 1 + + C-SPY + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.ewp b/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.ewp index a555c040..14675f19 100644 --- a/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.ewp +++ b/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.ewp @@ -1,3789 +1,3786 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 33 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - Coder - 0 - - - - - Spy - - ARM - - 1 - - General - 3 - - 33 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 37 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 11 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - inputOutputBased - - - - BUILDACTION - 1 - - cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" - - - - - ILINK - 0 - - 25 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - Coder - 0 - - - - - Debug - Release - - - Application - - $PROJ_DIR$\..\bsp.c - - - $PROJ_DIR$\..\bsp.h - - - $PROJ_DIR$\..\dpp.h - - - $PROJ_DIR$\..\main.c - - - $PROJ_DIR$\..\philo.c - - - $PROJ_DIR$\..\..\..\..\..\include\qstamp.c - - - $PROJ_DIR$\..\table.c - - - - QP - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c - - - $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c - - - - QP_port - - $PROJ_DIR$\..\..\..\..\..\ports\threadx\qep_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\threadx\qf_port.c - - - $PROJ_DIR$\..\..\..\..\..\ports\threadx\qf_port.h - - - $PROJ_DIR$\..\..\..\..\..\ports\threadx\qs_port.h - - - - QS - - Debug - Release - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c - - - $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h - - - $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c - - - - stm32f4-discovery - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\iar\startup_stm32f4xx.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\stm32f4xx.h - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_exti.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_gpio.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_rcc.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_usart.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.h - - - - ThreadX - - common - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_allocate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_cleanup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_release.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_high_level.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_kernel_enter.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_kernel_setup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_cleanup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_priority_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_put.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_cleanup.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_flush.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_front_send.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_receive.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_send.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_send_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_entry_exit_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_identify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_preemption_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_priority_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_relinquish.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_reset.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_resume.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_shell_entry.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_sleep.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_analyze.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_error_handler.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_error_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_suspend.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_preempt_check.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_resume.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_suspend.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_terminate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_time_slice.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_time_slice_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_timeout.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_wait_abort.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_time_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_time_set.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_activate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_deactivate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_expiration_process.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_performance_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_performance_system_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_system_activate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_system_deactivate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_thread_entry.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_buffer_full_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_disable.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_enable.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_event_filter.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_event_unfilter.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_initialize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_interrupt_control.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_isr_enter_insert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_isr_exit_insert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_object_register.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_object_unregister.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_user_event_insert.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_allocate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_release.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_allocate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_release.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_set.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_set_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_put.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_flush.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_front_send.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_receive.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_send.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_send_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_ceiling_put.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_prioritize.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_put.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_put_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_entry_exit_notify.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_info_get.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_preemption_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_priority_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_relinquish.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_reset.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_resume.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_suspend.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_terminate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_time_slice_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_wait_abort.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_activate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_change.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_create.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_deactivate.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_delete.c - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_info_get.c - - - - port - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_initialize_low_level.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_context_restore.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_context_save.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_control.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_disable.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_restore.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_schedule.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_stack_build.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_system_return.s - - - $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_timer_interrupt.s - - - - + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 33 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + Coder + 0 + + + + + Spy + + ARM + + 1 + + General + 3 + + 33 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 37 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + inputOutputBased + + + + BUILDACTION + 1 + + cmd /c "if exist $OBJ_DIR$\qstamp.o del $OBJ_DIR$\qstamp.o" + + + + + ILINK + 0 + + 25 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + Coder + 0 + + + + + Debug + Release + + + Application + + $PROJ_DIR$\..\bsp.c + + + $PROJ_DIR$\..\bsp.h + + + $PROJ_DIR$\..\dpp.h + + + $PROJ_DIR$\..\main.c + + + $PROJ_DIR$\..\philo.c + + + $PROJ_DIR$\..\..\..\..\..\include\qstamp.c + + + $PROJ_DIR$\..\table.c + + + + QP + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_hsm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qep_msm.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_act.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_defer.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_dyn.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_mem.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_ps.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qeq.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_qmact.c + + + $PROJ_DIR$\..\..\..\..\..\src\qf\qf_time.c + + + + QP_port + + $PROJ_DIR$\..\..\..\..\..\ports\threadx\qep_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\threadx\qf_port.c + + + $PROJ_DIR$\..\..\..\..\..\ports\threadx\qf_port.h + + + $PROJ_DIR$\..\..\..\..\..\ports\threadx\qs_port.h + + + + QS + + Debug + Release + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_64bit.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_fp.c + + + $PROJ_DIR$\..\..\..\..\..\src\qs_pkg.h + + + $PROJ_DIR$\..\..\..\..\..\src\qs\qs_rx.c + + + + stm32f4-discovery + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\iar\startup_stm32f4xx.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\stm32f4xx.h + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_exti.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_gpio.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_rcc.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\src\stm32f4xx_usart.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\stm32f4-discovery\system_stm32f4xx.h + + + + ThreadX + + common + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_allocate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_cleanup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_pool_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_block_release.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_high_level.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_kernel_enter.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_initialize_kernel_setup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_cleanup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_priority_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_mutex_put.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_cleanup.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_flush.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_front_send.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_receive.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_send.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_queue_send_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_entry_exit_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_identify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_preemption_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_priority_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_relinquish.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_reset.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_resume.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_shell_entry.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_sleep.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_analyze.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_error_handler.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_stack_error_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_suspend.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_preempt_check.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_resume.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_system_suspend.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_terminate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_time_slice.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_time_slice_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_timeout.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_thread_wait_abort.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_time_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_time_set.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_activate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_deactivate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_expiration_process.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_performance_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_performance_system_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_system_activate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_system_deactivate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_timer_thread_entry.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_buffer_full_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_disable.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_enable.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_event_filter.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_event_unfilter.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_initialize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_interrupt_control.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_isr_enter_insert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_isr_exit_insert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_object_register.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_object_unregister.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\tx_trace_user_event_insert.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_allocate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_pool_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_block_release.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_allocate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_pool_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_byte_release.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_set.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_event_flags_set_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_mutex_put.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_flush.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_front_send.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_receive.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_send.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_queue_send_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_ceiling_put.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_prioritize.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_put.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_semaphore_put_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_entry_exit_notify.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_info_get.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_preemption_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_priority_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_relinquish.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_reset.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_resume.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_suspend.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_terminate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_time_slice_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_thread_wait_abort.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_activate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_change.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_create.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_deactivate.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_delete.c + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\common\src\txe_timer_info_get.c + + + + port + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_initialize_low_level.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_context_restore.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_context_save.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_control.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_disable.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_interrupt_restore.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_schedule.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_stack_build.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_thread_system_return.s + + + $PROJ_DIR$\..\..\..\..\..\3rd_party\threadx\ports\cortex_m4\iar\src\tx_timer_interrupt.s + + + + diff --git a/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.eww b/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.eww index 7a61d220..461ce6e0 100644 --- a/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.eww +++ b/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.eww @@ -1,10 +1,10 @@ - - - - - $WS_DIR$\dpp.ewp - - - - - + + + + + $WS_DIR$\dpp.ewp + + + + + diff --git a/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.icf b/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.icf index aa385e40..3f54c43b 100644 --- a/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.icf +++ b/examples/threadx/arm-cm/dpp_stm32f429-discovery/iar/dpp.icf @@ -1,31 +1,31 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 512; -define symbol __ICFEDIT_size_heap__ = 0; -/**** End of ICF editor section. ###ICF###*/ - - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place at start of RAM_region {block CSTACK }; +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x08000000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; +define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; +define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF; +/*-Sizes-*/ +define symbol __ICFEDIT_size_cstack__ = 512; +define symbol __ICFEDIT_size_heap__ = 0; +/**** End of ICF editor section. ###ICF###*/ + + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; + +place in ROM_region { readonly }; +place at start of RAM_region {block CSTACK }; place in RAM_region { readwrite, block HEAP }; \ No newline at end of file diff --git a/examples/threadx/arm-cm/dpp_stm32f429-discovery/philo.c b/examples/threadx/arm-cm/dpp_stm32f429-discovery/philo.c index cd99e60f..4a8b3412 100644 --- a/examples/threadx/arm-cm/dpp_stm32f429-discovery/philo.c +++ b/examples/threadx/arm-cm/dpp_stm32f429-discovery/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("philo") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -52,16 +65,16 @@ static Philo l_philo[N_PHILO]; /* storage for all Philos */ #define PHILO_ID(me_) ((uint8_t)((me_) - l_philo)) /* Global objects ----------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointers to the Philo AOs */ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { &l_philo[0].super, &l_philo[1].super, @@ -69,11 +82,12 @@ QActive * const AO_Philo[N_PHILO] = { &l_philo[3].super, &l_philo[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Philo definition --------------------------------------------------------*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -83,12 +97,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +128,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -148,11 +165,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -160,9 +178,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -171,7 +189,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -185,31 +203,32 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -224,4 +243,5 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/threadx/arm-cm/dpp_stm32f429-discovery/table.c b/examples/threadx/arm-cm/dpp_stm32f429-discovery/table.c index af075d69..54e8a2e6 100644 --- a/examples/threadx/arm-cm/dpp_stm32f429-discovery/table.c +++ b/examples/threadx/arm-cm/dpp_stm32f429-discovery/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("table") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -50,22 +63,23 @@ static QState Table_paused(Table * const me, QEvt const * const e); static Table l_table; /* the single instance of the Table active object */ /* Global-scope objects ----------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointer to the Table AO */ -/*.${AOs::AO_Table} ........................................................*/ +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &l_table.super; -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*..........................................................................*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -77,12 +91,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -111,11 +127,12 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR_ID(60); status_ = Q_HANDLED(); @@ -128,11 +145,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -146,7 +164,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -154,7 +172,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -164,25 +182,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -206,7 +224,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -217,13 +235,13 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -235,28 +253,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -266,7 +285,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -291,4 +310,5 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/threadx/win32/dpp_console/bsp.c b/examples/threadx/win32/dpp_console/bsp.c index 78392f2d..2c73ced2 100644 --- a/examples/threadx/win32/dpp_console/bsp.c +++ b/examples/threadx/win32/dpp_console/bsp.c @@ -47,7 +47,7 @@ Q_DEFINE_THIS_FILE /* Local-scope objects -----------------------------------------------------*/ static uint32_t l_rnd; /* random seed */ -static TX_TIMER l_tick_timer; /* ThreadX timer to call QF_TICK_X() */ +static TX_TIMER l_tick_timer; /* ThreadX timer to call QTIMEEVT_TICK_X() */ #ifdef Q_SPY @@ -128,18 +128,18 @@ void BSP_terminate(int16_t result) { static VOID timer_expiration(ULONG id) { (void)id; /* unused parameter */ - QF_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ /* handle keyborad input... */ if (_kbhit()) { int ch = _getwch(); switch (ch) { case 'p': { - QF_PUBLISH(Q_NEW(QEvt, PAUSE_SIG), &l_clock_tick); + QACTIVE_PUBLISH(Q_NEW(QEvt, PAUSE_SIG), &l_clock_tick); break; } case 's': { - QF_PUBLISH(Q_NEW(QEvt, SERVE_SIG), &l_clock_tick); + QACTIVE_PUBLISH(Q_NEW(QEvt, SERVE_SIG), &l_clock_tick); break; } case 'x': { @@ -161,12 +161,12 @@ void QF_onStartup(void) { /* * NOTE: * This application uses the ThreadX timer to periodically call - * the QF_tickX_(0) function. Here, only the clock tick rate of 0 - * is used, but other timers can be used to call QF_tickX_() for + * the QTimeEvt_tick_(0) function. Here, only the clock tick rate of 0 + * is used, but other timers can be used to call QTimeEvt_tick_() for * other clock tick rates, if needed. * * The choice of a ThreadX timer is not the only option. Applications - * might choose to call QF_TICK_X() directly from timer interrupts + * might choose to call QTIMEEVT_TICK_X() directly from timer interrupts * or from active object(s). */ Q_ALLEGE(tx_timer_create(&l_tick_timer, /* ThreadX timer object */ diff --git a/examples/threadx/win32/dpp_console/dpp.h b/examples/threadx/win32/dpp_console/dpp.h index 5d0e5960..cd9689f8 100644 --- a/examples/threadx/win32/dpp_console/dpp.h +++ b/examples/threadx/win32/dpp_console/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,30 +54,34 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ /* opaque pointers to the Philo AOs */ extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${AOs::AO_Table} .........................................................*/ /* opaque pointer to the Table AO */ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -74,3 +91,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/threadx/win32/dpp_console/dpp.qm b/examples/threadx/win32/dpp_console/dpp.qm index a9c6f7f4..83371250 100644 --- a/examples/threadx/win32/dpp_console/dpp.qm +++ b/examples/threadx/win32/dpp_console/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -105,7 +104,7 @@ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); @@ -187,7 +186,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -210,7 +209,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -252,7 +251,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -263,7 +262,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/threadx/win32/dpp_console/philo.c b/examples/threadx/win32/dpp_console/philo.c index f4cfcabd..4a8b3412 100644 --- a/examples/threadx/win32/dpp_console/philo.c +++ b/examples/threadx/win32/dpp_console/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("philo") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -52,16 +65,16 @@ static Philo l_philo[N_PHILO]; /* storage for all Philos */ #define PHILO_ID(me_) ((uint8_t)((me_) - l_philo)) /* Global objects ----------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointers to the Philo AOs */ -/*.${AOs::AO_Philo[N_PHILO]} ...............................................*/ +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ QActive * const AO_Philo[N_PHILO] = { &l_philo[0].super, &l_philo[1].super, @@ -69,11 +82,12 @@ QActive * const AO_Philo[N_PHILO] = { &l_philo[3].super, &l_philo[4].super }; -/*.$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Philo definition --------------------------------------------------------*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -83,12 +97,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +128,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -148,11 +165,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -160,9 +178,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -171,7 +189,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -185,31 +203,32 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -224,4 +243,5 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/threadx/win32/dpp_console/table.c b/examples/threadx/win32/dpp_console/table.c index 68e7e958..54e8a2e6 100644 --- a/examples/threadx/win32/dpp_console/table.c +++ b/examples/threadx/win32/dpp_console/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("table") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -50,22 +63,23 @@ static QState Table_paused(Table * const me, QEvt const * const e); static Table l_table; /* the single instance of the Table active object */ /* Global-scope objects ----------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointer to the Table AO */ -/*.${AOs::AO_Table} ........................................................*/ +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ QActive * const AO_Table = &l_table.super; -/*.$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*..........................................................................*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -77,12 +91,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -111,11 +127,12 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR_ID(60); status_ = Q_HANDLED(); @@ -128,11 +145,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -146,7 +164,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -154,7 +172,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -164,25 +182,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -206,7 +224,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -217,13 +235,13 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -235,28 +253,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -266,7 +285,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -291,4 +310,5 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvoptx b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvoptx index 2244224a..1f01d058 100644 --- a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvoptx +++ b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvoptx @@ -103,7 +103,7 @@ 1 0 0 - -1 + 19 @@ -294,7 +294,7 @@ 1 0 0 - 8 + 19 @@ -478,7 +478,7 @@ 1 0 0 - 8 + 19 diff --git a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvprojx b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvprojx index 8a6cee32..d413107a 100644 --- a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvprojx +++ b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/armclang/dpp.uvprojx @@ -133,7 +133,7 @@ 0 0 1 - 0 + 1 4097 1 @@ -339,7 +339,7 @@ __FPU_PRESENT - ..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv7-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..;..\..\..\..\..\include;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv7-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -735,7 +735,7 @@ dpp-rel 0x4 ARM-ADS - 6130001::V6.13.1::.\ARMCLANG + 6160000::V6.16::ARMCLANG 1 @@ -1064,7 +1064,7 @@ NDEBUG __FPU_PRESENT - ..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv7-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..;..\..\..\..\..\include;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv7-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl @@ -1460,7 +1460,7 @@ dpp-spy 0x4 ARM-ADS - 6130001::V6.13.1::.\ARMCLANG + 6160000::V6.16::ARMCLANG 1 @@ -1789,7 +1789,7 @@ Q_SPY __FPU_PRESENT - ..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv7-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl + ..;..\..\..\..\..\include;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv7-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\ek-tm4c123gxl diff --git a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/bsp.c b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/bsp.c index a9155f2f..1ddb7373 100644 --- a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/bsp.c +++ b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/bsp.c @@ -150,7 +150,7 @@ void App_TimeTickHook(void) { } #endif - QF_TICK_X(0U, &l_tickHook); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_tickHook); /* process time events for rate 0 */ /* Perform the debouncing of buttons. The algorithm for debouncing * adapted from the book "Embedded Systems Dictionary" by Jack Ganssle @@ -165,11 +165,11 @@ void App_TimeTickHook(void) { if ((tmp & BTN_SW1) != 0U) { /* debounced SW1 state changed? */ if ((buttons.depressed & BTN_SW1) != 0U) { /* is SW1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_tickHook); + QACTIVE_PUBLISH(&pauseEvt, &l_tickHook); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_tickHook); + QACTIVE_PUBLISH(&serveEvt, &l_tickHook); } } } diff --git a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.h b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.h +++ b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.qm b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.qm index 5b1603f1..37fa5e83 100644 --- a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.qm +++ b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -116,7 +115,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -210,7 +209,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -233,7 +232,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -275,7 +274,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -286,7 +285,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/gnu/Makefile b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/gnu/Makefile index 059676e9..d23827d9 100644 --- a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/gnu/Makefile +++ b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on EK-TM4C123GXL, uC-OS2 kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-12-05 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -81,7 +81,6 @@ VPATH = \ INCLUDES = \ -I.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/uC-OS2/Source \ -I$(QPC)/3rd_party/uC-OS2/Ports/ARM-Cortex-M/ARMv7-M/GNU \ diff --git a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp index 779c38f2..ff62fd45 100644 --- a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp +++ b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/iar/dpp.ewp @@ -337,7 +337,6 @@ CCIncludePath2 $PROJ_DIR$\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\uc-os2 $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Source $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv7-M\IAR @@ -1392,7 +1391,6 @@ CCIncludePath2 $PROJ_DIR$\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\uc-os2 $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Source $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv7-M\IAR @@ -2447,7 +2445,6 @@ CCIncludePath2 $PROJ_DIR$\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\uc-os2 $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Source $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv7-M\IAR diff --git a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/philo.c b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/philo.c index e6c85eb9..9bf65092 100644 --- a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/philo.c +++ b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -61,14 +74,16 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ }; /* Philo definition --------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,12 +93,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +129,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -141,7 +159,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -153,11 +171,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -165,9 +184,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -176,7 +195,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -190,30 +209,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -228,4 +248,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/table.c b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/table.c index 39d09a9e..d10b8d5e 100644 --- a/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/table.c +++ b/examples/uc-os2/arm-cm/dpp_ek-tm4c123gxl/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -53,14 +66,16 @@ static Table l_table; /* the single instance of the Table active object */ QActive * const AO_Table = &l_table.super; /* "opaque" AO pointer */ /*..........................................................................*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -72,12 +87,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -108,16 +125,17 @@ static QState Table_initial(Table * const me, void const * const par) { } return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -130,11 +148,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -148,7 +167,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -156,7 +175,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -166,25 +185,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -208,7 +227,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -219,19 +238,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -243,28 +262,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -274,7 +294,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -299,4 +319,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/armclang/dpp.uvprojx b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/armclang/dpp.uvprojx index 33f676bf..20c13656 100644 --- a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/armclang/dpp.uvprojx +++ b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/armclang/dpp.uvprojx @@ -339,7 +339,7 @@ - ..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv6-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..;..\..\..\..\..\include;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv6-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 @@ -1054,7 +1054,7 @@ NDEBUG - ..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv6-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..;..\..\..\..\..\include;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv6-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 @@ -1769,7 +1769,7 @@ Q_SPY - ..;..\..\..\..\..\include;..\..\..\..\..\src;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv6-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 + ..;..\..\..\..\..\include;..\..\..\..\..\ports\uc-os2;..\..\..\..\..\3rd_party\uC-OS2\Source;..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv6-M\ARM;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\nucleo-l053r8 diff --git a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/bsp.c b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/bsp.c index c32fc5ea..6048a94b 100644 --- a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/bsp.c +++ b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/bsp.c @@ -122,7 +122,7 @@ void App_TimeTickHook(void) { } #endif - QF_TICK_X(0U, &l_tickHook); /* process time events for rate 0 */ + QTIMEEVT_TICK_X(0U, &l_tickHook); /* process time events for rate 0 */ //QACTIVE_POST(the_Ticker0, 0, &l_tickHook); /* post to Ticker0 */ /* Perform the debouncing of buttons. The algorithm for debouncing @@ -138,11 +138,11 @@ void App_TimeTickHook(void) { if ((tmp & BTN_B1) != 0U) { /* debounced B1 state changed? */ if ((buttons.depressed & BTN_B1) != 0U) { /* is B1 depressed? */ static QEvt const pauseEvt = { PAUSE_SIG, 0U, 0U}; - QF_PUBLISH(&pauseEvt, &l_tickHook); + QACTIVE_PUBLISH(&pauseEvt, &l_tickHook); } else { /* the button is released */ static QEvt const serveEvt = { SERVE_SIG, 0U, 0U}; - QF_PUBLISH(&serveEvt, &l_tickHook); + QACTIVE_PUBLISH(&serveEvt, &l_tickHook); } } } diff --git a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.h b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.h index 2bfc8e30..6a215191 100644 --- a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.h +++ b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -32,8 +44,9 @@ enum DPPSignals { MAX_SIG /* the last signal */ }; -/*.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TableEvt} .....................................................*/ +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,26 +54,32 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* number of philosophers */ #define N_PHILO ((uint8_t)5) -/*.$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ -void Philo_ctor(void); -/*.$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Philo[N_PHILO]; -/*.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void); -/*.$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ extern QActive * const AO_Table; -/*.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -70,3 +89,4 @@ extern QActive * const AO_Table; #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.qm b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.qm index 5b1603f1..37fa5e83 100644 --- a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.qm +++ b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -116,7 +115,7 @@ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); @@ -210,7 +209,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -233,7 +232,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -275,7 +274,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -286,7 +285,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/gnu/Makefile b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/gnu/Makefile index e0f3455a..7f6b54d8 100644 --- a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/gnu/Makefile +++ b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C on NUCLEO-L053R8, uC-OS2 kernel, GNU-ARM -# Last Updated for Version: 7.0.0 -# Date of the Last Update: 2021-12-05 +# Last Updated for Version: 7.0.1 +# Date of the Last Update: 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -81,7 +81,6 @@ VPATH = \ INCLUDES = \ -I.. \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) \ -I$(QPC)/3rd_party/uC-OS2/Source \ -I$(QPC)/3rd_party/uC-OS2/Ports/ARM-Cortex-M/ARMv6-M/GNU \ diff --git a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/iar/dpp.ewp b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/iar/dpp.ewp index f9b09569..1901aa88 100644 --- a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/iar/dpp.ewp +++ b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/iar/dpp.ewp @@ -337,7 +337,6 @@ CCIncludePath2 $PROJ_DIR$\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\uc-os2 $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Source $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv6-M\IAR @@ -1392,7 +1391,6 @@ CCIncludePath2 $PROJ_DIR$\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\uc-os2 $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Source $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv6-M\IAR @@ -2447,7 +2445,6 @@ CCIncludePath2 $PROJ_DIR$\.. $PROJ_DIR$\..\..\..\..\..\include - $PROJ_DIR$\..\..\..\..\..\src $PROJ_DIR$\..\..\..\..\..\ports\uc-os2 $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Source $PROJ_DIR$\..\..\..\..\..\3rd_party\uC-OS2\Ports\ARM-Cortex-M\ARMv6-M\IAR diff --git a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/philo.c b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/philo.c index e6c85eb9..9bf65092 100644 --- a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/philo.c +++ b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -38,7 +51,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static Philo l_philo[N_PHILO]; /* storage for all Philos */ @@ -61,14 +74,16 @@ QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ }; /* Philo definition --------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ void Philo_ctor(void) { uint8_t n; Philo *me; @@ -78,12 +93,14 @@ void Philo_ctor(void) { QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } } -/*.$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ -/*.${AOs::Philo::SM} .......................................................*/ +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ (void)par; /* unused parameter */ if (registered == (uint8_t)0) { @@ -112,28 +129,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { QActive_subscribe(&me->super, TEST_SIG); return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -141,7 +159,7 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TEST} */ + /*${AOs::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -153,11 +171,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -165,9 +184,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -176,7 +195,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -190,30 +209,31 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -228,4 +248,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/table.c b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/table.c index 39d09a9e..d10b8d5e 100644 --- a/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/table.c +++ b/examples/uc-os2/arm-cm/dpp_nucleo-l053r8/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct { /* protected: */ QActive super; @@ -39,7 +52,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -53,14 +66,16 @@ static Table l_table; /* the single instance of the Table active object */ QActive * const AO_Table = &l_table.super; /* "opaque" AO pointer */ /*..........................................................................*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table_ctor} ......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ void Table_ctor(void) { uint8_t n; Table *me = &l_table; @@ -72,12 +87,14 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ -/*.${AOs::Table::SM} .......................................................*/ +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ uint8_t n; (void)par; /* unused parameter */ @@ -108,16 +125,17 @@ static QState Table_initial(Table * const me, void const * const par) { } return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::TEST} */ + /*${AOs::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); @@ -130,11 +148,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -148,7 +167,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -156,7 +175,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -166,25 +185,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -208,7 +227,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -219,19 +238,19 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::EAT} */ + /*${AOs::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -243,28 +262,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -274,7 +294,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -299,4 +319,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/blinky/Makefile b/examples/workstation/blinky/Makefile index 2d2dfa13..335d751d 100644 --- a/examples/workstation/blinky/Makefile +++ b/examples/workstation/blinky/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -143,7 +143,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/blinky/blinky.c b/examples/workstation/blinky/blinky.c index 4a9e4129..f572fcb8 100644 --- a/examples/workstation/blinky/blinky.c +++ b/examples/workstation/blinky/blinky.c @@ -1,21 +1,33 @@ -/*.$file${.::blinky.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::blinky.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: blinky.qm * File: ${.::blinky.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::blinky.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::blinky.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "safe_std.h" /* portable "safe" / facilities */ @@ -23,6 +35,10 @@ Q_DEFINE_THIS_FILE +#ifdef Q_SPY + #error Simple Blinky Application does not provide Spy build configuration +#endif + enum { BSP_TICKS_PER_SEC = 100 }; void BSP_ledOff(void) { @@ -38,7 +54,7 @@ void Q_onAssert(char const * const module, int loc) { void QF_onStartup(void) {} void QF_onCleanup(void) {} void QF_onClockTick(void) { - QF_TICK_X(0U, (void *)0); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, (void *)0); /* clock tick processing */ } enum BlinkySignals { @@ -47,8 +63,9 @@ enum BlinkySignals { }; //*============== ask QM to declare the Blinky class ================*/ -/*.$declare${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky} ..........................................................*/ +/*$declare${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky} ...........................................................*/ typedef struct Blinky { /* protected: */ QActive super; @@ -64,7 +81,7 @@ extern Blinky Blinky_inst; static QState Blinky_initial(Blinky * const me, void const * const par); static QState Blinky_off(Blinky * const me, QEvt const * const e); static QState Blinky_on(Blinky * const me, QEvt const * const e); -/*.$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ QActive * const AO_Blinky = &Blinky_inst.super; @@ -90,18 +107,21 @@ int main() { } /*================ ask QM to define the Blinky class ================*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Blinky} ..........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::Blinky} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Blinky} ...........................................................*/ Blinky Blinky_inst; -/*.${AOs::Blinky::SM} ......................................................*/ + +/*${AOs::Blinky::SM} .......................................................*/ static QState Blinky_initial(Blinky * const me, void const * const par) { - /*.${AOs::Blinky::SM::initial} */ + /*${AOs::Blinky::SM::initial} */ (void)par; /* unused parameter */ QTimeEvt_armX(&me->timeEvt, BSP_TICKS_PER_SEC/2, BSP_TICKS_PER_SEC/2); @@ -111,17 +131,18 @@ static QState Blinky_initial(Blinky * const me, void const * const par) { return Q_TRAN(&Blinky_off); } -/*.${AOs::Blinky::SM::off} .................................................*/ + +/*${AOs::Blinky::SM::off} ..................................................*/ static QState Blinky_off(Blinky * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky::SM::off} */ + /*${AOs::Blinky::SM::off} */ case Q_ENTRY_SIG: { BSP_ledOff(); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky::SM::off::TIMEOUT} */ + /*${AOs::Blinky::SM::off::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Blinky_on); break; @@ -133,17 +154,18 @@ static QState Blinky_off(Blinky * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Blinky::SM::on} ..................................................*/ + +/*${AOs::Blinky::SM::on} ...................................................*/ static QState Blinky_on(Blinky * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Blinky::SM::on} */ + /*${AOs::Blinky::SM::on} */ case Q_ENTRY_SIG: { BSP_ledOn(); status_ = Q_HANDLED(); break; } - /*.${AOs::Blinky::SM::on::TIMEOUT} */ + /*${AOs::Blinky::SM::on::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Blinky_off); break; @@ -155,5 +177,4 @@ static QState Blinky_on(Blinky * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ - +/*$enddef${AOs::Blinky} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/blinky/blinky.qm b/examples/workstation/blinky/blinky.qm index 64db8da1..753cb76a 100644 --- a/examples/workstation/blinky/blinky.qm +++ b/examples/workstation/blinky/blinky.qm @@ -1,6 +1,6 @@ - - Simple "Blinky" model + + Blinky example @@ -13,6 +13,7 @@ + Blinky state machine (void)par; /* unused parameter */ @@ -63,6 +64,10 @@ BSP_TICKS_PER_SEC/2, BSP_TICKS_PER_SEC/2); Q_DEFINE_THIS_FILE +#ifdef Q_SPY + #error Simple Blinky Application does not provide Spy build configuration +#endif + enum { BSP_TICKS_PER_SEC = 100 }; void BSP_ledOff(void) { @@ -78,7 +83,7 @@ void Q_onAssert(char const * const module, int loc) { void QF_onStartup(void) {} void QF_onCleanup(void) {} void QF_onClockTick(void) { - QF_TICK_X(0U, (void *)0); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, (void *)0); /* clock tick processing */ } enum BlinkySignals { @@ -113,9 +118,7 @@ int main() { } /*================ ask QM to define the Blinky class ================*/ -$define ${AOs::Blinky} - - +$define ${AOs::Blinky} diff --git a/examples/workstation/calc/Makefile b/examples/workstation/calc/Makefile index f1d52154..892de68b 100644 --- a/examples/workstation/calc/Makefile +++ b/examples/workstation/calc/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -145,7 +145,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/calc/calc.c b/examples/workstation/calc/calc.c index 244fb19e..c2c8f273 100644 --- a/examples/workstation/calc/calc.c +++ b/examples/workstation/calc/calc.c @@ -1,27 +1,40 @@ -/*.$file${.::calc.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::calc.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: calc.qm * File: ${.::calc.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::calc.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::calc.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" /* QP/C */ #include "bsp.h" /* board support package */ #include "calc.h" /* application */ -/*.$declare${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc} ............................................................*/ +/*$declare${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc} .............................................................*/ typedef struct { /* protected: */ QHsm super; @@ -50,31 +63,35 @@ static QState Calc_zero2(Calc * const me, QEvt const * const e); static QState Calc_int2(Calc * const me, QEvt const * const e); static QState Calc_frac2(Calc * const me, QEvt const * const e); static QState Calc_final(Calc * const me, QEvt const * const e); -/*.$enddecl${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ static Calc l_calc; /* the only instance of the Calc class */ /* global-scope definitions ---------------------------------------*/ QHsm * const the_calc = &l_calc.super; /* "opaque" pointer to MSM */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc_ctor} .......................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc_ctor} ........................................................*/ void Calc_ctor(void) { Calc *me = &l_calc; QHsm_ctor(&me->super, Q_STATE_CAST(&Calc_initial)); } -/*.$enddef${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc} ............................................................*/ -/*.${SMs::Calc::SM} ........................................................*/ +/*$enddef${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc} .............................................................*/ + +/*${SMs::Calc::SM} .........................................................*/ static QState Calc_initial(Calc * const me, void const * const par) { - /*.${SMs::Calc::SM::initial} */ + /*${SMs::Calc::SM::initial} */ BSP_clear(); (void)par; /* unused parameter */ @@ -98,35 +115,36 @@ static QState Calc_initial(Calc * const me, void const * const par) { return Q_TRAN(&Calc_on); } -/*.${SMs::Calc::SM::on} ....................................................*/ + +/*${SMs::Calc::SM::on} .....................................................*/ static QState Calc_on(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on} */ + /*${SMs::Calc::SM::on} */ case Q_ENTRY_SIG: { BSP_message("on-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on} */ + /*${SMs::Calc::SM::on} */ case Q_EXIT_SIG: { BSP_message("on-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::initial} */ + /*${SMs::Calc::SM::on::initial} */ case Q_INIT_SIG: { BSP_message("on-INIT;"); status_ = Q_TRAN(&Calc_ready); break; } - /*.${SMs::Calc::SM::on::C} */ + /*${SMs::Calc::SM::on::C} */ case C_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_on); break; } - /*.${SMs::Calc::SM::on::OFF} */ + /*${SMs::Calc::SM::on::OFF} */ case OFF_SIG: { status_ = Q_TRAN(&Calc_final); break; @@ -138,17 +156,18 @@ static QState Calc_on(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::error} .............................................*/ + +/*${SMs::Calc::SM::on::error} ..............................................*/ static QState Calc_error(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::error} */ + /*${SMs::Calc::SM::on::error} */ case Q_ENTRY_SIG: { BSP_message("error-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::error} */ + /*${SMs::Calc::SM::on::error} */ case Q_EXIT_SIG: { BSP_message("error-EXIT;"); status_ = Q_HANDLED(); @@ -161,55 +180,56 @@ static QState Calc_error(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::negated1} ..........................................*/ + +/*${SMs::Calc::SM::on::negated1} ...........................................*/ static QState Calc_negated1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::negated1} */ + /*${SMs::Calc::SM::on::negated1} */ case Q_ENTRY_SIG: { BSP_message("negated1-ENTRY;"); BSP_negate(); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::negated1} */ + /*${SMs::Calc::SM::on::negated1} */ case Q_EXIT_SIG: { BSP_message("negated1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::negated1::DIGIT_0} */ + /*${SMs::Calc::SM::on::negated1::DIGIT_0} */ case DIGIT_0_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_zero1); break; } - /*.${SMs::Calc::SM::on::negated1::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::negated1::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::negated1::POINT} */ + /*${SMs::Calc::SM::on::negated1::POINT} */ case POINT_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::negated1::OPER} */ + /*${SMs::Calc::SM::on::negated1::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::negated1::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::negated1::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { ; status_ = Q_HANDLED(); } - /*.${SMs::Calc::SM::on::negated1::OPER::[else]} */ + /*${SMs::Calc::SM::on::negated1::OPER::[else]} */ else { status_ = Q_HANDLED(); } break; } - /*.${SMs::Calc::SM::on::negated1::CE} */ + /*${SMs::Calc::SM::on::negated1::CE} */ case CE_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_begin); @@ -222,42 +242,43 @@ static QState Calc_negated1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready} .............................................*/ + +/*${SMs::Calc::SM::on::ready} ..............................................*/ static QState Calc_ready(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready} */ + /*${SMs::Calc::SM::on::ready} */ case Q_ENTRY_SIG: { BSP_message("ready-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready} */ + /*${SMs::Calc::SM::on::ready} */ case Q_EXIT_SIG: { BSP_message("ready-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::initial} */ + /*${SMs::Calc::SM::on::ready::initial} */ case Q_INIT_SIG: { BSP_message("ready-INIT;"); status_ = Q_TRAN(&Calc_begin); break; } - /*.${SMs::Calc::SM::on::ready::DIGIT_0} */ + /*${SMs::Calc::SM::on::ready::DIGIT_0} */ case DIGIT_0_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_zero1); break; } - /*.${SMs::Calc::SM::on::ready::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::ready::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_clear(); BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::ready::POINT} */ + /*${SMs::Calc::SM::on::ready::POINT} */ case POINT_SIG: { BSP_clear(); BSP_insert((int)'0'); @@ -265,7 +286,7 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::ready::OPER} */ + /*${SMs::Calc::SM::on::ready::OPER} */ case OPER_SIG: { me->operand1 = BSP_get_value(); me->operator = Q_EVT_CAST(CalcEvt)->key_code; @@ -279,17 +300,18 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready::result} .....................................*/ + +/*${SMs::Calc::SM::on::ready::result} ......................................*/ static QState Calc_result(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready::result} */ + /*${SMs::Calc::SM::on::ready::result} */ case Q_ENTRY_SIG: { BSP_message("result-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::result} */ + /*${SMs::Calc::SM::on::ready::result} */ case Q_EXIT_SIG: { BSP_message("result-EXIT;"); status_ = Q_HANDLED(); @@ -302,29 +324,30 @@ static QState Calc_result(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready::begin} ......................................*/ + +/*${SMs::Calc::SM::on::ready::begin} .......................................*/ static QState Calc_begin(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready::begin} */ + /*${SMs::Calc::SM::on::ready::begin} */ case Q_ENTRY_SIG: { BSP_message("begin-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::begin} */ + /*${SMs::Calc::SM::on::ready::begin} */ case Q_EXIT_SIG: { BSP_message("begin-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::begin::OPER} */ + /*${SMs::Calc::SM::on::ready::begin::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::ready::begin::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::ready::begin::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { status_ = Q_TRAN(&Calc_negated1); } - /*.${SMs::Calc::SM::on::ready::begin::OPER::[else]} */ + /*${SMs::Calc::SM::on::ready::begin::OPER::[else]} */ else { status_ = Q_HANDLED(); } @@ -337,36 +360,37 @@ static QState Calc_begin(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand1} ..........................................*/ + +/*${SMs::Calc::SM::on::operand1} ...........................................*/ static QState Calc_operand1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1} */ + /*${SMs::Calc::SM::on::operand1} */ case Q_ENTRY_SIG: { BSP_message("operand1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1} */ + /*${SMs::Calc::SM::on::operand1} */ case Q_EXIT_SIG: { BSP_message("operand1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::CE} */ + /*${SMs::Calc::SM::on::operand1::CE} */ case CE_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_begin); break; } - /*.${SMs::Calc::SM::on::operand1::OPER} */ + /*${SMs::Calc::SM::on::operand1::OPER} */ case OPER_SIG: { me->operand1 = BSP_get_value(); me->operator = Q_EVT_CAST(CalcEvt)->key_code; status_ = Q_TRAN(&Calc_opEntered); break; } - /*.${SMs::Calc::SM::on::operand1::EQUALS} */ + /*${SMs::Calc::SM::on::operand1::EQUALS} */ case EQUALS_SIG: { status_ = Q_TRAN(&Calc_result); break; @@ -378,35 +402,36 @@ static QState Calc_operand1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand1::zero1} ...................................*/ + +/*${SMs::Calc::SM::on::operand1::zero1} ....................................*/ static QState Calc_zero1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1::zero1} */ + /*${SMs::Calc::SM::on::operand1::zero1} */ case Q_ENTRY_SIG: { BSP_message("zero1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::zero1} */ + /*${SMs::Calc::SM::on::operand1::zero1} */ case Q_EXIT_SIG: { BSP_message("zero1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::zero1::DIGIT_0} */ + /*${SMs::Calc::SM::on::operand1::zero1::DIGIT_0} */ case DIGIT_0_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::zero1::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand1::zero1::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::operand1::zero1::POINT} */ + /*${SMs::Calc::SM::on::operand1::zero1::POINT} */ case POINT_SIG: { BSP_insert((int)'0'); BSP_insert((int)'.'); @@ -420,29 +445,30 @@ static QState Calc_zero1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand1::int1} ....................................*/ + +/*${SMs::Calc::SM::on::operand1::int1} .....................................*/ static QState Calc_int1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1::int1} */ + /*${SMs::Calc::SM::on::operand1::int1} */ case Q_ENTRY_SIG: { BSP_message("int1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::int1} */ + /*${SMs::Calc::SM::on::operand1::int1} */ case Q_EXIT_SIG: { BSP_message("int1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::int1::POINT} */ + /*${SMs::Calc::SM::on::operand1::int1::POINT} */ case POINT_SIG: { BSP_insert((int)'.'); status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::operand1::int1::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand1::int1::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -456,29 +482,30 @@ static QState Calc_int1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand1::frac1} ...................................*/ + +/*${SMs::Calc::SM::on::operand1::frac1} ....................................*/ static QState Calc_frac1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1::frac1} */ + /*${SMs::Calc::SM::on::operand1::frac1} */ case Q_ENTRY_SIG: { BSP_message("frac1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::frac1} */ + /*${SMs::Calc::SM::on::operand1::frac1} */ case Q_EXIT_SIG: { BSP_message("frac1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::frac1::POINT} */ + /*${SMs::Calc::SM::on::operand1::frac1::POINT} */ case POINT_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::frac1::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand1::frac1::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -492,36 +519,37 @@ static QState Calc_frac1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::opEntered} .........................................*/ + +/*${SMs::Calc::SM::on::opEntered} ..........................................*/ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::opEntered} */ + /*${SMs::Calc::SM::on::opEntered} */ case Q_ENTRY_SIG: { BSP_message("opEntered-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::opEntered} */ + /*${SMs::Calc::SM::on::opEntered} */ case Q_EXIT_SIG: { BSP_message("opEntered-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::opEntered::DIGIT_0} */ + /*${SMs::Calc::SM::on::opEntered::DIGIT_0} */ case DIGIT_0_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_zero2); break; } - /*.${SMs::Calc::SM::on::opEntered::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::opEntered::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_clear(); BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int2); break; } - /*.${SMs::Calc::SM::on::opEntered::POINT} */ + /*${SMs::Calc::SM::on::opEntered::POINT} */ case POINT_SIG: { BSP_clear(); BSP_insert((int)'0'); @@ -529,13 +557,13 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { status_ = Q_TRAN(&Calc_frac2); break; } - /*.${SMs::Calc::SM::on::opEntered::OPER} */ + /*${SMs::Calc::SM::on::opEntered::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::opEntered::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::opEntered::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { status_ = Q_TRAN(&Calc_negated2); } - /*.${SMs::Calc::SM::on::opEntered::OPER::[else]} */ + /*${SMs::Calc::SM::on::opEntered::OPER::[else]} */ else { status_ = Q_HANDLED(); } @@ -548,55 +576,56 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::negated2} ..........................................*/ + +/*${SMs::Calc::SM::on::negated2} ...........................................*/ static QState Calc_negated2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::negated2} */ + /*${SMs::Calc::SM::on::negated2} */ case Q_ENTRY_SIG: { BSP_message("negated2-ENTRY;"); BSP_negate(); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::negated2} */ + /*${SMs::Calc::SM::on::negated2} */ case Q_EXIT_SIG: { BSP_message("negated2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::negated2::DIGIT_0} */ + /*${SMs::Calc::SM::on::negated2::DIGIT_0} */ case DIGIT_0_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_zero2); break; } - /*.${SMs::Calc::SM::on::negated2::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::negated2::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int2); break; } - /*.${SMs::Calc::SM::on::negated2::POINT} */ + /*${SMs::Calc::SM::on::negated2::POINT} */ case POINT_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_frac2); break; } - /*.${SMs::Calc::SM::on::negated2::OPER} */ + /*${SMs::Calc::SM::on::negated2::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::negated2::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::negated2::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { ; status_ = Q_HANDLED(); } - /*.${SMs::Calc::SM::on::negated2::OPER::[else]} */ + /*${SMs::Calc::SM::on::negated2::OPER::[else]} */ else { status_ = Q_HANDLED(); } break; } - /*.${SMs::Calc::SM::on::negated2::CE} */ + /*${SMs::Calc::SM::on::negated2::CE} */ case CE_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_opEntered); @@ -609,49 +638,50 @@ static QState Calc_negated2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2} ..........................................*/ + +/*${SMs::Calc::SM::on::operand2} ...........................................*/ static QState Calc_operand2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2} */ + /*${SMs::Calc::SM::on::operand2} */ case Q_ENTRY_SIG: { BSP_message("operand2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2} */ + /*${SMs::Calc::SM::on::operand2} */ case Q_EXIT_SIG: { BSP_message("operand2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::CE} */ + /*${SMs::Calc::SM::on::operand2::CE} */ case CE_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_opEntered); break; } - /*.${SMs::Calc::SM::on::operand2::EQUALS} */ + /*${SMs::Calc::SM::on::operand2::EQUALS} */ case EQUALS_SIG: { - /*.${SMs::Calc::SM::on::operand2::EQUALS::[BSP_eval()]} */ + /*${SMs::Calc::SM::on::operand2::EQUALS::[BSP_eval()]} */ if (BSP_eval(me->operand1, me->operator, BSP_get_value())) { status_ = Q_TRAN(&Calc_result); } - /*.${SMs::Calc::SM::on::operand2::EQUALS::[else]} */ + /*${SMs::Calc::SM::on::operand2::EQUALS::[else]} */ else { status_ = Q_TRAN(&Calc_error); } break; } - /*.${SMs::Calc::SM::on::operand2::OPER} */ + /*${SMs::Calc::SM::on::operand2::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::operand2::OPER::[BSP_eval()]} */ + /*${SMs::Calc::SM::on::operand2::OPER::[BSP_eval()]} */ if (BSP_eval(me->operand1, me->operator, BSP_get_value())) { me->operand1 = BSP_get_value(); me->operator = Q_EVT_CAST(CalcEvt)->key_code; status_ = Q_TRAN(&Calc_opEntered); } - /*.${SMs::Calc::SM::on::operand2::OPER::[else]} */ + /*${SMs::Calc::SM::on::operand2::OPER::[else]} */ else { status_ = Q_TRAN(&Calc_error); } @@ -664,35 +694,36 @@ static QState Calc_operand2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2::zero2} ...................................*/ + +/*${SMs::Calc::SM::on::operand2::zero2} ....................................*/ static QState Calc_zero2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2::zero2} */ + /*${SMs::Calc::SM::on::operand2::zero2} */ case Q_ENTRY_SIG: { BSP_message("zero2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::zero2} */ + /*${SMs::Calc::SM::on::operand2::zero2} */ case Q_EXIT_SIG: { BSP_message("zero2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::zero2::DIGIT_0} */ + /*${SMs::Calc::SM::on::operand2::zero2::DIGIT_0} */ case DIGIT_0_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::zero2::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand2::zero2::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int2); break; } - /*.${SMs::Calc::SM::on::operand2::zero2::POINT} */ + /*${SMs::Calc::SM::on::operand2::zero2::POINT} */ case POINT_SIG: { BSP_insert((int)'0'); BSP_insert((int)'.'); @@ -706,29 +737,30 @@ static QState Calc_zero2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2::int2} ....................................*/ + +/*${SMs::Calc::SM::on::operand2::int2} .....................................*/ static QState Calc_int2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2::int2} */ + /*${SMs::Calc::SM::on::operand2::int2} */ case Q_ENTRY_SIG: { BSP_message("int2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::int2} */ + /*${SMs::Calc::SM::on::operand2::int2} */ case Q_EXIT_SIG: { BSP_message("int2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::int2::POINT} */ + /*${SMs::Calc::SM::on::operand2::int2::POINT} */ case POINT_SIG: { BSP_insert((int)'.'); status_ = Q_TRAN(&Calc_frac2); break; } - /*.${SMs::Calc::SM::on::operand2::int2::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand2::int2::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -742,29 +774,30 @@ static QState Calc_int2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2::frac2} ...................................*/ + +/*${SMs::Calc::SM::on::operand2::frac2} ....................................*/ static QState Calc_frac2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2::frac2} */ + /*${SMs::Calc::SM::on::operand2::frac2} */ case Q_ENTRY_SIG: { BSP_message("frac2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::frac2} */ + /*${SMs::Calc::SM::on::operand2::frac2} */ case Q_EXIT_SIG: { BSP_message("frac2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::frac2::POINT} */ + /*${SMs::Calc::SM::on::operand2::frac2::POINT} */ case POINT_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::frac2::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand2::frac2::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -778,11 +811,12 @@ static QState Calc_frac2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::final} .................................................*/ + +/*${SMs::Calc::SM::final} ..................................................*/ static QState Calc_final(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::final} */ + /*${SMs::Calc::SM::final} */ case Q_ENTRY_SIG: { BSP_message("final-ENTRY;"); BSP_exit(); @@ -796,4 +830,4 @@ static QState Calc_final(Calc * const me, QEvt const * const e) { } return status_; } -/*.$enddef${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/calc/calc.h b/examples/workstation/calc/calc.h index da43d59a..4bafdb36 100644 --- a/examples/workstation/calc/calc.h +++ b/examples/workstation/calc/calc.h @@ -1,21 +1,33 @@ -/*.$file${.::calc.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::calc.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: calc.qm * File: ${.::calc.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::calc.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::calc.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef CALC_H #define CALC_H @@ -30,8 +42,9 @@ enum CalcSignals { OFF_SIG }; -/*.$declare${Events::CalcEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::CalcEvt} ......................................................*/ +/*$declare${Events::CalcEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::CalcEvt} .......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -39,12 +52,14 @@ typedef struct { /* public: */ uint8_t key_code; } CalcEvt; -/*.$enddecl${Events::CalcEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc_ctor} .......................................................*/ +/*$enddecl${Events::CalcEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc_ctor} ........................................................*/ void Calc_ctor(void); -/*.$enddecl${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ extern QHsm * const the_calc; /* "opaque" pointer to calculator MSM */ #endif /* CALC_H */ + diff --git a/examples/workstation/calc/calc.qm b/examples/workstation/calc/calc.qm index aa16b058..69de53b0 100644 --- a/examples/workstation/calc/calc.qm +++ b/examples/workstation/calc/calc.qm @@ -1,5 +1,5 @@ - + Calc is the model of the Calculator described in Chapter 4 of PSiCC2 diff --git a/examples/workstation/calc/calc.sln b/examples/workstation/calc/calc.sln index b16280de..829af870 100644 --- a/examples/workstation/calc/calc.sln +++ b/examples/workstation/calc/calc.sln @@ -1,25 +1,25 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2013 for Windows Desktop -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "calc", "calc.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - QSpy|Win32 = QSpy|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.ActiveCfg = Release|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.Build.0 = Release|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.Build.0 = QSpy|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2013 for Windows Desktop +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "calc", "calc.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + QSpy|Win32 = QSpy|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.ActiveCfg = Release|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.Build.0 = Release|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.ActiveCfg = QSpy|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.Build.0 = QSpy|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/workstation/calc/calc.vcxproj b/examples/workstation/calc/calc.vcxproj index aace3d7c..2da54482 100644 --- a/examples/workstation/calc/calc.vcxproj +++ b/examples/workstation/calc/calc.vcxproj @@ -1,161 +1,161 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - QSpy - Win32 - - - - {8CC465F7-872E-4D03-B93C-1B64858B4E11} - calc - Win32Proj - 10.0 - - - - Application - NotSet - v142 - - - Application - NotSet - true - v142 - - - Application - NotSet - v142 - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - - - - Disabled - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - Default - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - MaxSpeed - true - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - true - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + QSpy + Win32 + + + + {8CC465F7-872E-4D03-B93C-1B64858B4E11} + calc + Win32Proj + 10.0 + + + + Application + NotSet + v142 + + + Application + NotSet + true + v142 + + + Application + NotSet + v142 + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + + Disabled + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + Default + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + MaxSpeed + true + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + true + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + Disabled + .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) + Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/workstation/calc/calc.vcxproj.filters b/examples/workstation/calc/calc.vcxproj.filters index de6e531d..160a0c65 100644 --- a/examples/workstation/calc/calc.vcxproj.filters +++ b/examples/workstation/calc/calc.vcxproj.filters @@ -1,13 +1,13 @@ - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/workstation/calc1/Makefile b/examples/workstation/calc1/Makefile index 23ad52d4..0722549b 100644 --- a/examples/workstation/calc1/Makefile +++ b/examples/workstation/calc1/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.0 -# Last updated on 2020-03-31 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -145,7 +145,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/calc1/calc1.c b/examples/workstation/calc1/calc1.c index b428db46..5be52aad 100644 --- a/examples/workstation/calc1/calc1.c +++ b/examples/workstation/calc1/calc1.c @@ -1,21 +1,33 @@ -/*.$file${.::calc1.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::calc1.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: calc1.qm * File: ${.::calc1.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::calc1.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::calc1.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" /* QP/C */ #include "bsp.h" /* board support package */ #include "calc1.h" /* application */ @@ -28,8 +40,9 @@ Q_DEFINE_THIS_FILE #define KEY_MULT '*' #define KEY_DIVIDE '/' -/*.$declare${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc} ............................................................*/ +/*$declare${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc} .............................................................*/ typedef struct Calc { /* protected: */ QHsm super; @@ -50,13 +63,14 @@ typedef struct Calc { * return: true if evaluation successfull * false when error encountered */ -static bool Calc_eval(Calc * const me, double op, uint8_t oper); +static bool Calc_eval(Calc * const me, + double op, + uint8_t oper); extern Calc Calc_inst; /* protected: */ static QState Calc_initial(Calc * const me, void const * const par); static QState Calc_on(Calc * const me, QEvt const * const e); - /* Error state after evaluation of an expression. This state can be exited only throgh the inherited C (Clear) event. */ @@ -76,36 +90,38 @@ static QState Calc_int2(Calc * const me, QEvt const * const e); static QState Calc_frac2(Calc * const me, QEvt const * const e); static QState Calc_negated2(Calc * const me, QEvt const * const e); static QState Calc_final(Calc * const me, QEvt const * const e); -/*.$enddecl${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::the_calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::the_calc} ........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${SMs::the_calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::the_calc} .........................................................*/ QHsm * const the_calc = &Calc_inst.super; -/*.$enddef${SMs::the_calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc_ctor} .......................................................*/ +/*$enddef${SMs::the_calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc_ctor} ........................................................*/ void Calc_ctor(void) { Calc *me = &Calc_inst; QHsm_ctor(&me->super, Q_STATE_CAST(&Calc_initial)); } -/*.$enddef${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc} ............................................................*/ +/*$enddef${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc} .............................................................*/ Calc Calc_inst; -/* guard function to evaluate the current expression -* taking into account the precedence of operands. -* return: true if evaluation successfull -* false when error encountered -*/ -/*.${SMs::Calc::eval} ......................................................*/ -static bool Calc_eval(Calc * const me, double op, uint8_t oper) { +/*${SMs::Calc::eval} .......................................................*/ +static bool Calc_eval(Calc * const me, + double op, + uint8_t oper) +{ double result; if ((oper == KEY_NULL) || (oper == KEY_PLUS) || (oper == KEY_MINUS)) { switch (me->oper2) { @@ -192,41 +208,42 @@ static bool Calc_eval(Calc * const me, double op, uint8_t oper) { return true; } -/*.${SMs::Calc::SM} ........................................................*/ +/*${SMs::Calc::SM} .........................................................*/ static QState Calc_initial(Calc * const me, void const * const par) { - /*.${SMs::Calc::SM::initial} */ + /*${SMs::Calc::SM::initial} */ (void)par; /* unused parameter */ return Q_TRAN(&Calc_on); } -/*.${SMs::Calc::SM::on} ....................................................*/ + +/*${SMs::Calc::SM::on} .....................................................*/ static QState Calc_on(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on} */ + /*${SMs::Calc::SM::on} */ case Q_ENTRY_SIG: { BSP_message("on-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on} */ + /*${SMs::Calc::SM::on} */ case Q_EXIT_SIG: { BSP_message("on-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::initial} */ + /*${SMs::Calc::SM::on::initial} */ case Q_INIT_SIG: { BSP_message("on-INIT;"); BSP_clear(); status_ = Q_TRAN(&Calc_ready); break; } - /*.${SMs::Calc::SM::on::C} */ + /*${SMs::Calc::SM::on::C} */ case C_SIG: { status_ = Q_TRAN(&Calc_on); break; } - /*.${SMs::Calc::SM::on::OFF} */ + /*${SMs::Calc::SM::on::OFF} */ case OFF_SIG: { status_ = Q_TRAN(&Calc_final); break; @@ -239,20 +256,17 @@ static QState Calc_on(Calc * const me, QEvt const * const e) { return status_; } -/* Error state after evaluation of an expression. -This state can be exited only throgh the inherited C (Clear) event. -*/ -/*.${SMs::Calc::SM::on::error} .............................................*/ +/*${SMs::Calc::SM::on::error} ..............................................*/ static QState Calc_error(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::error} */ + /*${SMs::Calc::SM::on::error} */ case Q_ENTRY_SIG: { BSP_message("error-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::error} */ + /*${SMs::Calc::SM::on::error} */ case Q_EXIT_SIG: { BSP_message("error-EXIT;"); status_ = Q_HANDLED(); @@ -265,43 +279,44 @@ static QState Calc_error(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready} .............................................*/ + +/*${SMs::Calc::SM::on::ready} ..............................................*/ static QState Calc_ready(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready} */ + /*${SMs::Calc::SM::on::ready} */ case Q_ENTRY_SIG: { BSP_message("ready-ENTRY;"); me->oper2 = KEY_NULL; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready} */ + /*${SMs::Calc::SM::on::ready} */ case Q_EXIT_SIG: { BSP_message("ready-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::initial} */ + /*${SMs::Calc::SM::on::ready::initial} */ case Q_INIT_SIG: { BSP_message("ready-INIT;"); status_ = Q_TRAN(&Calc_begin); break; } - /*.${SMs::Calc::SM::on::ready::DIGIT_0} */ + /*${SMs::Calc::SM::on::ready::DIGIT_0} */ case DIGIT_0_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_zero1); break; } - /*.${SMs::Calc::SM::on::ready::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::ready::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_clear(); BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::ready::POINT} */ + /*${SMs::Calc::SM::on::ready::POINT} */ case POINT_SIG: { BSP_clear(); BSP_insert((int)'0'); @@ -309,7 +324,7 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::ready::OPER} */ + /*${SMs::Calc::SM::on::ready::OPER} */ case OPER_SIG: { me->op1 = BSP_get_value(); me->oper1 = Q_EVT_CAST(CalcEvt)->key_code; @@ -323,17 +338,18 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready::result} .....................................*/ + +/*${SMs::Calc::SM::on::ready::result} ......................................*/ static QState Calc_result(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready::result} */ + /*${SMs::Calc::SM::on::ready::result} */ case Q_ENTRY_SIG: { BSP_message("result-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::result} */ + /*${SMs::Calc::SM::on::ready::result} */ case Q_EXIT_SIG: { BSP_message("result-EXIT;"); status_ = Q_HANDLED(); @@ -346,29 +362,30 @@ static QState Calc_result(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready::begin} ......................................*/ + +/*${SMs::Calc::SM::on::ready::begin} .......................................*/ static QState Calc_begin(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready::begin} */ + /*${SMs::Calc::SM::on::ready::begin} */ case Q_ENTRY_SIG: { BSP_message("begin-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::begin} */ + /*${SMs::Calc::SM::on::ready::begin} */ case Q_EXIT_SIG: { BSP_message("begin-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::begin::OPER} */ + /*${SMs::Calc::SM::on::ready::begin::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::ready::begin::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::ready::begin::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { status_ = Q_TRAN(&Calc_negated1); } - /*.${SMs::Calc::SM::on::ready::begin::OPER::[else]} */ + /*${SMs::Calc::SM::on::ready::begin::OPER::[else]} */ else { status_ = Q_HANDLED(); } @@ -381,36 +398,37 @@ static QState Calc_begin(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand1} ..........................................*/ + +/*${SMs::Calc::SM::on::operand1} ...........................................*/ static QState Calc_operand1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1} */ + /*${SMs::Calc::SM::on::operand1} */ case Q_ENTRY_SIG: { BSP_message("operand1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1} */ + /*${SMs::Calc::SM::on::operand1} */ case Q_EXIT_SIG: { BSP_message("operand1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::CE} */ + /*${SMs::Calc::SM::on::operand1::CE} */ case CE_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_ready); break; } - /*.${SMs::Calc::SM::on::operand1::OPER} */ + /*${SMs::Calc::SM::on::operand1::OPER} */ case OPER_SIG: { me->op1 = BSP_get_value(); me->oper1 = Q_EVT_CAST(CalcEvt)->key_code; status_ = Q_TRAN(&Calc_opEntered); break; } - /*.${SMs::Calc::SM::on::operand1::EQUALS} */ + /*${SMs::Calc::SM::on::operand1::EQUALS} */ case EQUALS_SIG: { status_ = Q_TRAN(&Calc_result); break; @@ -422,35 +440,36 @@ static QState Calc_operand1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand1::zero1} ...................................*/ + +/*${SMs::Calc::SM::on::operand1::zero1} ....................................*/ static QState Calc_zero1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1::zero1} */ + /*${SMs::Calc::SM::on::operand1::zero1} */ case Q_ENTRY_SIG: { BSP_message("zero1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::zero1} */ + /*${SMs::Calc::SM::on::operand1::zero1} */ case Q_EXIT_SIG: { BSP_message("zero1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::zero1::DIGIT_0} */ + /*${SMs::Calc::SM::on::operand1::zero1::DIGIT_0} */ case DIGIT_0_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::zero1::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand1::zero1::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::operand1::zero1::POINT} */ + /*${SMs::Calc::SM::on::operand1::zero1::POINT} */ case POINT_SIG: { BSP_insert((int)'0'); BSP_insert((int)'.'); @@ -464,29 +483,30 @@ static QState Calc_zero1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand1::int1} ....................................*/ + +/*${SMs::Calc::SM::on::operand1::int1} .....................................*/ static QState Calc_int1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1::int1} */ + /*${SMs::Calc::SM::on::operand1::int1} */ case Q_ENTRY_SIG: { BSP_message("int1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::int1} */ + /*${SMs::Calc::SM::on::operand1::int1} */ case Q_EXIT_SIG: { BSP_message("int1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::int1::POINT} */ + /*${SMs::Calc::SM::on::operand1::int1::POINT} */ case POINT_SIG: { BSP_insert((int)'.'); status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::operand1::int1::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand1::int1::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -500,29 +520,30 @@ static QState Calc_int1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand1::frac1} ...................................*/ + +/*${SMs::Calc::SM::on::operand1::frac1} ....................................*/ static QState Calc_frac1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1::frac1} */ + /*${SMs::Calc::SM::on::operand1::frac1} */ case Q_ENTRY_SIG: { BSP_message("frac1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::frac1} */ + /*${SMs::Calc::SM::on::operand1::frac1} */ case Q_EXIT_SIG: { BSP_message("frac1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::frac1::POINT} */ + /*${SMs::Calc::SM::on::operand1::frac1::POINT} */ case POINT_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::frac1::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand1::frac1::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -536,49 +557,50 @@ static QState Calc_frac1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand1::negated1} ................................*/ + +/*${SMs::Calc::SM::on::operand1::negated1} .................................*/ static QState Calc_negated1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1::negated1} */ + /*${SMs::Calc::SM::on::operand1::negated1} */ case Q_ENTRY_SIG: { BSP_message("negated1-ENTRY;"); BSP_negate(); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::negated1} */ + /*${SMs::Calc::SM::on::operand1::negated1} */ case Q_EXIT_SIG: { BSP_message("negated1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand1::negated1::DIGIT_0} */ + /*${SMs::Calc::SM::on::operand1::negated1::DIGIT_0} */ case DIGIT_0_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_zero1); break; } - /*.${SMs::Calc::SM::on::operand1::negated1::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand1::negated1::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::operand1::negated1::POINT} */ + /*${SMs::Calc::SM::on::operand1::negated1::POINT} */ case POINT_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::operand1::negated1::OPER} */ + /*${SMs::Calc::SM::on::operand1::negated1::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::operand1::negated1::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::operand1::negated1::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { ; status_ = Q_HANDLED(); } - /*.${SMs::Calc::SM::on::operand1::negated1::OPER::[else]} */ + /*${SMs::Calc::SM::on::operand1::negated1::OPER::[else]} */ else { status_ = Q_HANDLED(); } @@ -591,36 +613,37 @@ static QState Calc_negated1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::opEntered} .........................................*/ + +/*${SMs::Calc::SM::on::opEntered} ..........................................*/ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::opEntered} */ + /*${SMs::Calc::SM::on::opEntered} */ case Q_ENTRY_SIG: { BSP_message("opEntered-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::opEntered} */ + /*${SMs::Calc::SM::on::opEntered} */ case Q_EXIT_SIG: { BSP_message("opEntered-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::opEntered::DIGIT_0} */ + /*${SMs::Calc::SM::on::opEntered::DIGIT_0} */ case DIGIT_0_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_zero2); break; } - /*.${SMs::Calc::SM::on::opEntered::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::opEntered::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_clear(); BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int2); break; } - /*.${SMs::Calc::SM::on::opEntered::POINT} */ + /*${SMs::Calc::SM::on::opEntered::POINT} */ case POINT_SIG: { BSP_clear(); BSP_insert((int)'0'); @@ -628,13 +651,13 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { status_ = Q_TRAN(&Calc_frac2); break; } - /*.${SMs::Calc::SM::on::opEntered::OPER} */ + /*${SMs::Calc::SM::on::opEntered::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::opEntered::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::opEntered::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { status_ = Q_TRAN(&Calc_negated2); } - /*.${SMs::Calc::SM::on::opEntered::OPER::[else]} */ + /*${SMs::Calc::SM::on::opEntered::OPER::[else]} */ else { status_ = Q_HANDLED(); } @@ -647,47 +670,48 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2} ..........................................*/ + +/*${SMs::Calc::SM::on::operand2} ...........................................*/ static QState Calc_operand2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2} */ + /*${SMs::Calc::SM::on::operand2} */ case Q_ENTRY_SIG: { BSP_message("operand2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2} */ + /*${SMs::Calc::SM::on::operand2} */ case Q_EXIT_SIG: { BSP_message("operand2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::CE} */ + /*${SMs::Calc::SM::on::operand2::CE} */ case CE_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_opEntered); break; } - /*.${SMs::Calc::SM::on::operand2::EQUALS} */ + /*${SMs::Calc::SM::on::operand2::EQUALS} */ case EQUALS_SIG: { - /*.${SMs::Calc::SM::on::operand2::EQUALS::[Calc_eval(me,BSP_get_value(),KE~} */ + /*${SMs::Calc::SM::on::operand2::EQUALS::[Calc_eval(me,BSP_get_value(),KE~} */ if (Calc_eval(me, BSP_get_value(), KEY_NULL)) { status_ = Q_TRAN(&Calc_result); } - /*.${SMs::Calc::SM::on::operand2::EQUALS::[else]} */ + /*${SMs::Calc::SM::on::operand2::EQUALS::[else]} */ else { status_ = Q_TRAN(&Calc_error); } break; } - /*.${SMs::Calc::SM::on::operand2::OPER} */ + /*${SMs::Calc::SM::on::operand2::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::operand2::OPER::[Calc_eval(me,BSP_get_value(),Q_~} */ + /*${SMs::Calc::SM::on::operand2::OPER::[Calc_eval(me,BSP_get_value(),Q_~} */ if (Calc_eval(me, BSP_get_value(), Q_EVT_CAST(CalcEvt)->key_code)) { status_ = Q_TRAN(&Calc_opEntered); } - /*.${SMs::Calc::SM::on::operand2::OPER::[else]} */ + /*${SMs::Calc::SM::on::operand2::OPER::[else]} */ else { status_ = Q_TRAN(&Calc_error); } @@ -700,35 +724,36 @@ static QState Calc_operand2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2::zero2} ...................................*/ + +/*${SMs::Calc::SM::on::operand2::zero2} ....................................*/ static QState Calc_zero2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2::zero2} */ + /*${SMs::Calc::SM::on::operand2::zero2} */ case Q_ENTRY_SIG: { BSP_message("zero2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::zero2} */ + /*${SMs::Calc::SM::on::operand2::zero2} */ case Q_EXIT_SIG: { BSP_message("zero2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::zero2::DIGIT_0} */ + /*${SMs::Calc::SM::on::operand2::zero2::DIGIT_0} */ case DIGIT_0_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::zero2::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand2::zero2::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int2); break; } - /*.${SMs::Calc::SM::on::operand2::zero2::POINT} */ + /*${SMs::Calc::SM::on::operand2::zero2::POINT} */ case POINT_SIG: { BSP_insert((int)'0'); BSP_insert((int)'.'); @@ -742,29 +767,30 @@ static QState Calc_zero2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2::int2} ....................................*/ + +/*${SMs::Calc::SM::on::operand2::int2} .....................................*/ static QState Calc_int2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2::int2} */ + /*${SMs::Calc::SM::on::operand2::int2} */ case Q_ENTRY_SIG: { BSP_message("int2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::int2} */ + /*${SMs::Calc::SM::on::operand2::int2} */ case Q_EXIT_SIG: { BSP_message("int2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::int2::POINT} */ + /*${SMs::Calc::SM::on::operand2::int2::POINT} */ case POINT_SIG: { BSP_insert((int)'.'); status_ = Q_TRAN(&Calc_frac2); break; } - /*.${SMs::Calc::SM::on::operand2::int2::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand2::int2::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -778,29 +804,30 @@ static QState Calc_int2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2::frac2} ...................................*/ + +/*${SMs::Calc::SM::on::operand2::frac2} ....................................*/ static QState Calc_frac2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2::frac2} */ + /*${SMs::Calc::SM::on::operand2::frac2} */ case Q_ENTRY_SIG: { BSP_message("frac2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::frac2} */ + /*${SMs::Calc::SM::on::operand2::frac2} */ case Q_EXIT_SIG: { BSP_message("frac2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::frac2::POINT} */ + /*${SMs::Calc::SM::on::operand2::frac2::POINT} */ case POINT_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::frac2::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand2::frac2::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -814,49 +841,50 @@ static QState Calc_frac2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2::negated2} ................................*/ + +/*${SMs::Calc::SM::on::operand2::negated2} .................................*/ static QState Calc_negated2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2::negated2} */ + /*${SMs::Calc::SM::on::operand2::negated2} */ case Q_ENTRY_SIG: { BSP_message("negated2-ENTRY;"); BSP_negate(); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::negated2} */ + /*${SMs::Calc::SM::on::operand2::negated2} */ case Q_EXIT_SIG: { BSP_message("negated2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand2::negated2::DIGIT_0} */ + /*${SMs::Calc::SM::on::operand2::negated2::DIGIT_0} */ case DIGIT_0_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_zero2); break; } - /*.${SMs::Calc::SM::on::operand2::negated2::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand2::negated2::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int2); break; } - /*.${SMs::Calc::SM::on::operand2::negated2::POINT} */ + /*${SMs::Calc::SM::on::operand2::negated2::POINT} */ case POINT_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_frac2); break; } - /*.${SMs::Calc::SM::on::operand2::negated2::OPER} */ + /*${SMs::Calc::SM::on::operand2::negated2::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::operand2::negated2::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::operand2::negated2::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { ; status_ = Q_HANDLED(); } - /*.${SMs::Calc::SM::on::operand2::negated2::OPER::[else]} */ + /*${SMs::Calc::SM::on::operand2::negated2::OPER::[else]} */ else { status_ = Q_HANDLED(); } @@ -869,11 +897,12 @@ static QState Calc_negated2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::final} .................................................*/ + +/*${SMs::Calc::SM::final} ..................................................*/ static QState Calc_final(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::final} */ + /*${SMs::Calc::SM::final} */ case Q_ENTRY_SIG: { BSP_message("final-ENTRY;"); BSP_exit(); @@ -887,4 +916,4 @@ static QState Calc_final(Calc * const me, QEvt const * const e) { } return status_; } -/*.$enddef${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/calc1/calc1.h b/examples/workstation/calc1/calc1.h index ffede603..d4253e6f 100644 --- a/examples/workstation/calc1/calc1.h +++ b/examples/workstation/calc1/calc1.h @@ -1,21 +1,33 @@ -/*.$file${.::calc1.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::calc1.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: calc1.qm * File: ${.::calc1.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::calc1.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::calc1.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef CALC1_H #define CALC1_H @@ -30,8 +42,9 @@ enum CalcSignals { OFF_SIG }; -/*.$declare${Events::CalcEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::CalcEvt} ......................................................*/ +/*$declare${Events::CalcEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::CalcEvt} .......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -39,12 +52,14 @@ typedef struct { /* public: */ uint8_t key_code; } CalcEvt; -/*.$enddecl${Events::CalcEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc_ctor} .......................................................*/ +/*$enddecl${Events::CalcEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc_ctor} ........................................................*/ void Calc_ctor(void); -/*.$enddecl${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ extern QHsm * const the_calc; /* "opaque" pointer to calculator HSM */ #endif /* CALC1_H */ + diff --git a/examples/workstation/calc1/calc1.qm b/examples/workstation/calc1/calc1.qm index 80144677..06d56673 100644 --- a/examples/workstation/calc1/calc1.qm +++ b/examples/workstation/calc1/calc1.qm @@ -1,7 +1,6 @@ - + Improved model of the Calculator described in Chapter 4 of PSiCC2. Improvements include: - - placing the "negated1" state inside "operand1" superstate - placing the "negated2" state inside "operand2" superstate - adding handling of operator precedence '*','/' before '+','-' diff --git a/examples/workstation/calc1_sub/Makefile b/examples/workstation/calc1_sub/Makefile index b737ad51..d89e158e 100644 --- a/examples/workstation/calc1_sub/Makefile +++ b/examples/workstation/calc1_sub/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -145,7 +145,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/calc1_sub/calc1_sub.c b/examples/workstation/calc1_sub/calc1_sub.c index 8cb7778c..82e93107 100644 --- a/examples/workstation/calc1_sub/calc1_sub.c +++ b/examples/workstation/calc1_sub/calc1_sub.c @@ -1,23 +1,40 @@ -/*.$file${.::calc1_sub.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::calc1_sub.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: calc1_sub.qm * File: ${.::calc1_sub.c} * -* This code has been generated by QM 5.1.4 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * * This code is covered by the following QP license: -* License # : QPC-EVAL -* Issued to : Institution or an individual evaluating the QP/C framework -* Framework(s): qpc -* Support ends: 2022-12-31 -* Product(s) : -* This license is available only for evaluation purposes and -* the generated code is still licensed under the terms of GPL. -* Please submit request for extension of the evaluation period at: -* +* License # : QM-EVAL-QPC +* Issued to : Users of QP/C Real-Time Embedded Framework (RTEF) +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is free software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::calc1_sub.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::calc1_sub.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" /* QP/C */ #include "bsp.h" /* board support package */ #include "calc1_sub.h" /* application */ @@ -30,8 +47,9 @@ Q_DEFINE_THIS_FILE #define KEY_MULT ((uint8_t)'*') #define KEY_DIVIDE ((uint8_t)'/') -/*.$declare${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc} ............................................................*/ +/*$declare${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc} .............................................................*/ typedef struct Calc { /* protected: */ QMsm super; @@ -59,7 +77,9 @@ typedef struct Calc { * return: true if evaluation successfull * false when error encountered */ -static bool Calc_eval(Calc * const me, float64_t op, uint8_t oper); +static bool Calc_eval(Calc * const me, + float64_t op, + uint8_t oper); extern Calc Calc_inst; /* protected: */ @@ -75,7 +95,6 @@ static QMState const Calc_on_s = { Q_ACTION_CAST(&Calc_on_x), Q_ACTION_CAST(&Calc_on_i) }; - /* Error state after evaluation of an expression. This state can be exited only throgh the inherited C (Clear) event. */ @@ -221,36 +240,38 @@ static QMState const Calc_operand_negated_s = { Q_ACTION_CAST(&Calc_operand_negated_x), Q_ACTION_NULL /* no initial tran. */ }; -/*.$enddecl${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::the_calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::the_calc} ........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${SMs::the_calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::the_calc} .........................................................*/ QHsm * const the_calc = &Calc_inst.super.super; -/*.$enddef${SMs::the_calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc_ctor} .......................................................*/ +/*$enddef${SMs::the_calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc_ctor} ........................................................*/ void Calc_ctor(void) { Calc *me = &Calc_inst; QMsm_ctor(&me->super, Q_STATE_CAST(&Calc_initial)); } -/*.$enddef${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc} ............................................................*/ +/*$enddef${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc} .............................................................*/ Calc Calc_inst; -/* guard function to evaluate the current expression -* taking into account the precedence of operands. -* return: true if evaluation successfull -* false when error encountered -*/ -/*.${SMs::Calc::eval} ......................................................*/ -static bool Calc_eval(Calc * const me, float64_t op, uint8_t oper) { +/*${SMs::Calc::eval} .......................................................*/ +static bool Calc_eval(Calc * const me, + float64_t op, + uint8_t oper) +{ float64_t result; if ((oper == KEY_NULL) || (oper == KEY_PLUS) || (oper == KEY_MINUS)) { switch (me->oper2) { @@ -337,7 +358,7 @@ static bool Calc_eval(Calc * const me, float64_t op, uint8_t oper) { return true; } -/*.${SMs::Calc::SM} ........................................................*/ +/*${SMs::Calc::SM} .........................................................*/ static QState Calc_initial(Calc * const me, void const * const par) { static struct { QMState const *target; @@ -350,24 +371,25 @@ static QState Calc_initial(Calc * const me, void const * const par) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::Calc::SM::initial} */ + /*${SMs::Calc::SM::initial} */ (void)par; /* unused parameter */ return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::Calc::SM::on} ....................................................*/ -/*.${SMs::Calc::SM::on} */ + +/*${SMs::Calc::SM::on} .....................................................*/ +/*${SMs::Calc::SM::on} */ static QState Calc_on_e(Calc * const me) { BSP_message("on-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_on_s); } -/*.${SMs::Calc::SM::on} */ +/*${SMs::Calc::SM::on} */ static QState Calc_on_x(Calc * const me) { BSP_message("on-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_on_s); } -/*.${SMs::Calc::SM::on::initial} */ +/*${SMs::Calc::SM::on::initial} */ static QState Calc_on_i(Calc * const me) { static struct { QMState const *target; @@ -380,16 +402,16 @@ static QState Calc_on_i(Calc * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::Calc::SM::on::initial} */ + /*${SMs::Calc::SM::on::initial} */ BSP_message("on-INIT;"); BSP_clear(); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::Calc::SM::on} */ +/*${SMs::Calc::SM::on} */ static QState Calc_on(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::C} */ + /*${SMs::Calc::SM::on::C} */ case C_SIG: { static struct { QMState const *target; @@ -406,7 +428,7 @@ static QState Calc_on(Calc * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::Calc::SM::on::OFF} */ + /*${SMs::Calc::SM::on::OFF} */ case OFF_SIG: { static struct { QMState const *target; @@ -430,23 +452,20 @@ static QState Calc_on(Calc * const me, QEvt const * const e) { return status_; } -/* Error state after evaluation of an expression. -This state can be exited only throgh the inherited C (Clear) event. -*/ -/*.${SMs::Calc::SM::on::error} .............................................*/ -/*.${SMs::Calc::SM::on::error} */ +/*${SMs::Calc::SM::on::error} ..............................................*/ +/*${SMs::Calc::SM::on::error} */ static QState Calc_error_e(Calc * const me) { BSP_message("error-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_error_s); } -/*.${SMs::Calc::SM::on::error} */ +/*${SMs::Calc::SM::on::error} */ static QState Calc_error_x(Calc * const me) { BSP_message("error-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_error_s); } -/*.${SMs::Calc::SM::on::error} */ +/*${SMs::Calc::SM::on::error} */ static QState Calc_error(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { @@ -458,20 +477,21 @@ static QState Calc_error(Calc * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::Calc::SM::on::ready} .............................................*/ -/*.${SMs::Calc::SM::on::ready} */ + +/*${SMs::Calc::SM::on::ready} ..............................................*/ +/*${SMs::Calc::SM::on::ready} */ static QState Calc_ready_e(Calc * const me) { BSP_message("ready-ENTRY;"); me->oper2 = KEY_NULL; return QM_ENTRY(&Calc_ready_s); } -/*.${SMs::Calc::SM::on::ready} */ +/*${SMs::Calc::SM::on::ready} */ static QState Calc_ready_x(Calc * const me) { BSP_message("ready-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_ready_s); } -/*.${SMs::Calc::SM::on::ready::initial} */ +/*${SMs::Calc::SM::on::ready::initial} */ static QState Calc_ready_i(Calc * const me) { static struct { QMState const *target; @@ -483,15 +503,15 @@ static QState Calc_ready_i(Calc * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::Calc::SM::on::ready::initial} */ + /*${SMs::Calc::SM::on::ready::initial} */ BSP_message("ready-INIT;"); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::Calc::SM::on::ready} */ +/*${SMs::Calc::SM::on::ready} */ static QState Calc_ready(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready::DIGIT_0} */ + /*${SMs::Calc::SM::on::ready::DIGIT_0} */ case DIGIT_0_SIG: { static struct { QMState const *target; @@ -509,7 +529,7 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { status_ = QM_TRAN_EP(&tatbl_); break; } - /*.${SMs::Calc::SM::on::ready::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::ready::DIGIT_1_9} */ case DIGIT_1_9_SIG: { static struct { QMState const *target; @@ -528,7 +548,7 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { status_ = QM_TRAN_EP(&tatbl_); break; } - /*.${SMs::Calc::SM::on::ready::POINT} */ + /*${SMs::Calc::SM::on::ready::POINT} */ case POINT_SIG: { static struct { QMState const *target; @@ -548,7 +568,7 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { status_ = QM_TRAN_EP(&tatbl_); break; } - /*.${SMs::Calc::SM::on::ready::OPER} */ + /*${SMs::Calc::SM::on::ready::OPER} */ case OPER_SIG: { static struct { QMState const *target; @@ -573,20 +593,21 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready::result} .....................................*/ -/*.${SMs::Calc::SM::on::ready::result} */ + +/*${SMs::Calc::SM::on::ready::result} ......................................*/ +/*${SMs::Calc::SM::on::ready::result} */ static QState Calc_result_e(Calc * const me) { BSP_message("result-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_result_s); } -/*.${SMs::Calc::SM::on::ready::result} */ +/*${SMs::Calc::SM::on::ready::result} */ static QState Calc_result_x(Calc * const me) { BSP_message("result-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_result_s); } -/*.${SMs::Calc::SM::on::ready::result} */ +/*${SMs::Calc::SM::on::ready::result} */ static QState Calc_result(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { @@ -598,26 +619,27 @@ static QState Calc_result(Calc * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::Calc::SM::on::ready::begin} ......................................*/ -/*.${SMs::Calc::SM::on::ready::begin} */ + +/*${SMs::Calc::SM::on::ready::begin} .......................................*/ +/*${SMs::Calc::SM::on::ready::begin} */ static QState Calc_begin_e(Calc * const me) { BSP_message("begin-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_begin_s); } -/*.${SMs::Calc::SM::on::ready::begin} */ +/*${SMs::Calc::SM::on::ready::begin} */ static QState Calc_begin_x(Calc * const me) { BSP_message("begin-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_begin_s); } -/*.${SMs::Calc::SM::on::ready::begin} */ +/*${SMs::Calc::SM::on::ready::begin} */ static QState Calc_begin(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready::begin::OPER} */ + /*${SMs::Calc::SM::on::ready::begin::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::ready::begin::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::ready::begin::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { static struct { QMState const *target; @@ -634,7 +656,7 @@ static QState Calc_begin(Calc * const me, QEvt const * const e) { }; status_ = QM_TRAN_EP(&tatbl_); } - /*.${SMs::Calc::SM::on::ready::begin::OPER::[else]} */ + /*${SMs::Calc::SM::on::ready::begin::OPER::[else]} */ else { status_ = QM_HANDLED(); } @@ -648,24 +670,25 @@ static QState Calc_begin(Calc * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::Calc::SM::on::opEntered} .........................................*/ -/*.${SMs::Calc::SM::on::opEntered} */ + +/*${SMs::Calc::SM::on::opEntered} ..........................................*/ +/*${SMs::Calc::SM::on::opEntered} */ static QState Calc_opEntered_e(Calc * const me) { BSP_message("opEntered-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_opEntered_s); } -/*.${SMs::Calc::SM::on::opEntered} */ +/*${SMs::Calc::SM::on::opEntered} */ static QState Calc_opEntered_x(Calc * const me) { BSP_message("opEntered-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_opEntered_s); } -/*.${SMs::Calc::SM::on::opEntered} */ +/*${SMs::Calc::SM::on::opEntered} */ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::opEntered::DIGIT_0} */ + /*${SMs::Calc::SM::on::opEntered::DIGIT_0} */ case DIGIT_0_SIG: { static struct { QMState const *target; @@ -683,7 +706,7 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { status_ = QM_TRAN_EP(&tatbl_); break; } - /*.${SMs::Calc::SM::on::opEntered::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::opEntered::DIGIT_1_9} */ case DIGIT_1_9_SIG: { static struct { QMState const *target; @@ -702,7 +725,7 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { status_ = QM_TRAN_EP(&tatbl_); break; } - /*.${SMs::Calc::SM::on::opEntered::POINT} */ + /*${SMs::Calc::SM::on::opEntered::POINT} */ case POINT_SIG: { static struct { QMState const *target; @@ -722,9 +745,9 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { status_ = QM_TRAN_EP(&tatbl_); break; } - /*.${SMs::Calc::SM::on::opEntered::OPER} */ + /*${SMs::Calc::SM::on::opEntered::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::opEntered::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::opEntered::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { static struct { QMState const *target; @@ -740,7 +763,7 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { }; status_ = QM_TRAN_EP(&tatbl_); } - /*.${SMs::Calc::SM::on::opEntered::OPER::[else]} */ + /*${SMs::Calc::SM::on::opEntered::OPER::[else]} */ else { status_ = QM_HANDLED(); } @@ -754,13 +777,14 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::Calc::SM::on::operand1} ..........................................*/ -/*.${SMs::Calc::SM::on::operand1} */ + +/*${SMs::Calc::SM::on::operand1} ...........................................*/ +/*${SMs::Calc::SM::on::operand1} */ static QState Calc_operand1_e(Calc * const me) { me->sub_operand = &Calc_operand1_s; /* attach submachine */ return Calc_operand_e(me); /* enter submachine */ } -/*.${SMs::Calc::SM::on::operand1} */ +/*${SMs::Calc::SM::on::operand1} */ static QState Calc_operand1_CE(Calc * const me) { static struct { QMState const *target; @@ -778,11 +802,11 @@ static QState Calc_operand1_CE(Calc * const me) { BSP_message("operand1:XP-CE;"); return QM_TRAN(&tatbl_); } -/*.${SMs::Calc::SM::on::operand1} */ +/*${SMs::Calc::SM::on::operand1} */ static QState Calc_operand1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand1::EQUALS} */ + /*${SMs::Calc::SM::on::operand1::EQUALS} */ case EQUALS_SIG: { static struct { QMState const *target; @@ -798,7 +822,7 @@ static QState Calc_operand1(Calc * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::Calc::SM::on::operand1::OPER} */ + /*${SMs::Calc::SM::on::operand1::OPER} */ case OPER_SIG: { static struct { QMState const *target; @@ -822,13 +846,14 @@ static QState Calc_operand1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand2} ..........................................*/ -/*.${SMs::Calc::SM::on::operand2} */ + +/*${SMs::Calc::SM::on::operand2} ...........................................*/ +/*${SMs::Calc::SM::on::operand2} */ static QState Calc_operand2_e(Calc * const me) { me->sub_operand = &Calc_operand2_s; /* attach submachine */ return Calc_operand_e(me); /* enter submachine */ } -/*.${SMs::Calc::SM::on::operand2} */ +/*${SMs::Calc::SM::on::operand2} */ static QState Calc_operand2_CE(Calc * const me) { static struct { QMState const *target; @@ -845,13 +870,13 @@ static QState Calc_operand2_CE(Calc * const me) { BSP_message("operand2:XP-CE;"); return QM_TRAN(&tatbl_); } -/*.${SMs::Calc::SM::on::operand2} */ +/*${SMs::Calc::SM::on::operand2} */ static QState Calc_operand2(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand2::OPER} */ + /*${SMs::Calc::SM::on::operand2::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::operand2::OPER::[Calc_eval(me,BSP_get_value(),Q_~} */ + /*${SMs::Calc::SM::on::operand2::OPER::[Calc_eval(me,BSP_get_value(),Q_~} */ if (Calc_eval(me, BSP_get_value(), Q_EVT_CAST(CalcEvt)->key_code)) { static struct { QMState const *target; @@ -865,7 +890,7 @@ static QState Calc_operand2(Calc * const me, QEvt const * const e) { }; status_ = QM_TRAN(&tatbl_); } - /*.${SMs::Calc::SM::on::operand2::OPER::[else]} */ + /*${SMs::Calc::SM::on::operand2::OPER::[else]} */ else { static struct { QMState const *target; @@ -881,9 +906,9 @@ static QState Calc_operand2(Calc * const me, QEvt const * const e) { } break; } - /*.${SMs::Calc::SM::on::operand2::EQUALS} */ + /*${SMs::Calc::SM::on::operand2::EQUALS} */ case EQUALS_SIG: { - /*.${SMs::Calc::SM::on::operand2::EQUALS::[Calc_eval(me,BSP_get_value(),KE~} */ + /*${SMs::Calc::SM::on::operand2::EQUALS::[Calc_eval(me,BSP_get_value(),KE~} */ if (Calc_eval(me, BSP_get_value(), KEY_NULL) ) { @@ -900,7 +925,7 @@ static QState Calc_operand2(Calc * const me, QEvt const * const e) { }; status_ = QM_TRAN(&tatbl_); } - /*.${SMs::Calc::SM::on::operand2::EQUALS::[else]} */ + /*${SMs::Calc::SM::on::operand2::EQUALS::[else]} */ else { static struct { QMState const *target; @@ -923,15 +948,16 @@ static QState Calc_operand2(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::final} .................................................*/ -/*.${SMs::Calc::SM::final} */ + +/*${SMs::Calc::SM::final} ..................................................*/ +/*${SMs::Calc::SM::final} */ static QState Calc_final_e(Calc * const me) { BSP_message("final-ENTRY;"); BSP_exit(); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_final_s); } -/*.${SMs::Calc::SM::final} */ +/*${SMs::Calc::SM::final} */ static QState Calc_final(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { @@ -943,23 +969,24 @@ static QState Calc_final(Calc * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::Calc::SM::operand} ...............................................*/ -/*.${SMs::Calc::SM::operand} */ + +/*${SMs::Calc::SM::operand} ................................................*/ +/*${SMs::Calc::SM::operand} */ static QState Calc_operand_e(Calc * const me) { BSP_message("operand-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_operand_s); } -/*.${SMs::Calc::SM::operand} */ +/*${SMs::Calc::SM::operand} */ static QState Calc_operand_x(Calc * const me) { BSP_message("operand-EXIT;"); return QM_SM_EXIT(&me->sub_operand->super); } -/*.${SMs::Calc::SM::operand} */ +/*${SMs::Calc::SM::operand} */ static QState Calc_operand(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::operand::CE} */ + /*${SMs::Calc::SM::operand::CE} */ case CE_SIG: { static QMTranActTable const tatbl_ = { /* tran-action table */ &Calc_operand_s, /* target submachine */ @@ -979,7 +1006,7 @@ static QState Calc_operand(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::operand::EP-zero} */ +/*${SMs::Calc::SM::operand::EP-zero} */ static QState Calc_operand_zero_ep(Calc * const me) { static struct { QMState const *target; @@ -994,7 +1021,7 @@ static QState Calc_operand_zero_ep(Calc * const me) { BSP_message("operand::EP-zero;"); return QM_TRAN_EP(&tatbl_); } -/*.${SMs::Calc::SM::operand::EP-intgr} */ +/*${SMs::Calc::SM::operand::EP-intgr} */ static QState Calc_operand_intgr_ep(Calc * const me) { static struct { QMState const *target; @@ -1009,7 +1036,7 @@ static QState Calc_operand_intgr_ep(Calc * const me) { BSP_message("operand::EP-intgr;"); return QM_TRAN_EP(&tatbl_); } -/*.${SMs::Calc::SM::operand::EP-frac} */ +/*${SMs::Calc::SM::operand::EP-frac} */ static QState Calc_operand_frac_ep(Calc * const me) { static struct { QMState const *target; @@ -1024,7 +1051,7 @@ static QState Calc_operand_frac_ep(Calc * const me) { BSP_message("operand::EP-frac;"); return QM_TRAN_EP(&tatbl_); } -/*.${SMs::Calc::SM::operand::EP-neg} */ +/*${SMs::Calc::SM::operand::EP-neg} */ static QState Calc_operand_neg_ep(Calc * const me) { static struct { QMState const *target; @@ -1039,30 +1066,31 @@ static QState Calc_operand_neg_ep(Calc * const me) { BSP_message("operand::EP-neg;"); return QM_TRAN_EP(&tatbl_); } -/*.${SMs::Calc::SM::operand::zero} .........................................*/ -/*.${SMs::Calc::SM::operand::zero} */ + +/*${SMs::Calc::SM::operand::zero} ..........................................*/ +/*${SMs::Calc::SM::operand::zero} */ static QState Calc_operand_zero_e(Calc * const me) { BSP_message("zero-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_operand_zero_s); } -/*.${SMs::Calc::SM::operand::zero} */ +/*${SMs::Calc::SM::operand::zero} */ static QState Calc_operand_zero_x(Calc * const me) { BSP_message("zero-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_operand_zero_s); } -/*.${SMs::Calc::SM::operand::zero} */ +/*${SMs::Calc::SM::operand::zero} */ static QState Calc_operand_zero(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::operand::zero::DIGIT_0} */ + /*${SMs::Calc::SM::operand::zero::DIGIT_0} */ case DIGIT_0_SIG: { ; status_ = QM_HANDLED(); break; } - /*.${SMs::Calc::SM::operand::zero::DIGIT_1_9} */ + /*${SMs::Calc::SM::operand::zero::DIGIT_1_9} */ case DIGIT_1_9_SIG: { static struct { QMState const *target; @@ -1079,7 +1107,7 @@ static QState Calc_operand_zero(Calc * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::Calc::SM::operand::zero::POINT} */ + /*${SMs::Calc::SM::operand::zero::POINT} */ case POINT_SIG: { static struct { QMState const *target; @@ -1104,24 +1132,25 @@ static QState Calc_operand_zero(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::operand::intgr} ........................................*/ -/*.${SMs::Calc::SM::operand::intgr} */ + +/*${SMs::Calc::SM::operand::intgr} .........................................*/ +/*${SMs::Calc::SM::operand::intgr} */ static QState Calc_operand_intgr_e(Calc * const me) { BSP_message("intgr-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_operand_intgr_s); } -/*.${SMs::Calc::SM::operand::intgr} */ +/*${SMs::Calc::SM::operand::intgr} */ static QState Calc_operand_intgr_x(Calc * const me) { BSP_message("intgr-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_operand_intgr_s); } -/*.${SMs::Calc::SM::operand::intgr} */ +/*${SMs::Calc::SM::operand::intgr} */ static QState Calc_operand_intgr(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::operand::intgr::POINT} */ + /*${SMs::Calc::SM::operand::intgr::POINT} */ case POINT_SIG: { static struct { QMState const *target; @@ -1138,7 +1167,7 @@ static QState Calc_operand_intgr(Calc * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::Calc::SM::operand::intgr::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::operand::intgr::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -1153,30 +1182,31 @@ static QState Calc_operand_intgr(Calc * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::Calc::SM::operand::frac} .........................................*/ -/*.${SMs::Calc::SM::operand::frac} */ + +/*${SMs::Calc::SM::operand::frac} ..........................................*/ +/*${SMs::Calc::SM::operand::frac} */ static QState Calc_operand_frac_e(Calc * const me) { BSP_message("frac-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_operand_frac_s); } -/*.${SMs::Calc::SM::operand::frac} */ +/*${SMs::Calc::SM::operand::frac} */ static QState Calc_operand_frac_x(Calc * const me) { BSP_message("frac-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_operand_frac_s); } -/*.${SMs::Calc::SM::operand::frac} */ +/*${SMs::Calc::SM::operand::frac} */ static QState Calc_operand_frac(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::operand::frac::POINT} */ + /*${SMs::Calc::SM::operand::frac::POINT} */ case POINT_SIG: { ; status_ = QM_HANDLED(); break; } - /*.${SMs::Calc::SM::operand::frac::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::operand::frac::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -1191,25 +1221,26 @@ static QState Calc_operand_frac(Calc * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::Calc::SM::operand::negated} ......................................*/ -/*.${SMs::Calc::SM::operand::negated} */ + +/*${SMs::Calc::SM::operand::negated} .......................................*/ +/*${SMs::Calc::SM::operand::negated} */ static QState Calc_operand_negated_e(Calc * const me) { BSP_message("negated-ENTRY;"); BSP_negate(); (void)me; /* unused parameter */ return QM_ENTRY(&Calc_operand_negated_s); } -/*.${SMs::Calc::SM::operand::negated} */ +/*${SMs::Calc::SM::operand::negated} */ static QState Calc_operand_negated_x(Calc * const me) { BSP_message("negated-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&Calc_operand_negated_s); } -/*.${SMs::Calc::SM::operand::negated} */ +/*${SMs::Calc::SM::operand::negated} */ static QState Calc_operand_negated(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::operand::negated::DIGIT_0} */ + /*${SMs::Calc::SM::operand::negated::DIGIT_0} */ case DIGIT_0_SIG: { static struct { QMState const *target; @@ -1226,7 +1257,7 @@ static QState Calc_operand_negated(Calc * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::Calc::SM::operand::negated::DIGIT_1_9} */ + /*${SMs::Calc::SM::operand::negated::DIGIT_1_9} */ case DIGIT_1_9_SIG: { static struct { QMState const *target; @@ -1243,7 +1274,7 @@ static QState Calc_operand_negated(Calc * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::Calc::SM::operand::negated::POINT} */ + /*${SMs::Calc::SM::operand::negated::POINT} */ case POINT_SIG: { static struct { QMState const *target; @@ -1260,14 +1291,14 @@ static QState Calc_operand_negated(Calc * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::Calc::SM::operand::negated::OPER} */ + /*${SMs::Calc::SM::operand::negated::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::operand::negated::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::operand::negated::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { ; status_ = QM_HANDLED(); } - /*.${SMs::Calc::SM::operand::negated::OPER::[else]} */ + /*${SMs::Calc::SM::operand::negated::OPER::[else]} */ else { status_ = QM_HANDLED(); } @@ -1281,4 +1312,4 @@ static QState Calc_operand_negated(Calc * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.$enddef${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/calc1_sub/calc1_sub.h b/examples/workstation/calc1_sub/calc1_sub.h index c34ee58e..655c7f89 100644 --- a/examples/workstation/calc1_sub/calc1_sub.h +++ b/examples/workstation/calc1_sub/calc1_sub.h @@ -1,23 +1,40 @@ -/*.$file${.::calc1_sub.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::calc1_sub.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: calc1_sub.qm * File: ${.::calc1_sub.h} * -* This code has been generated by QM 5.1.4 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * * This code is covered by the following QP license: -* License # : QPC-EVAL -* Issued to : Institution or an individual evaluating the QP/C framework -* Framework(s): qpc -* Support ends: 2022-12-31 -* Product(s) : -* This license is available only for evaluation purposes and -* the generated code is still licensed under the terms of GPL. -* Please submit request for extension of the evaluation period at: -* +* License # : QM-EVAL-QPC +* Issued to : Users of QP/C Real-Time Embedded Framework (RTEF) +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is free software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::calc1_sub.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::calc1_sub.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef CALC1_SUB_H #define CALC1_SUB_H @@ -32,8 +49,9 @@ enum CalcSignals { OFF_SIG }; -/*.$declare${Events::CalcEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::CalcEvt} ......................................................*/ +/*$declare${Events::CalcEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::CalcEvt} .......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -41,12 +59,14 @@ typedef struct { /* public: */ uint8_t key_code; } CalcEvt; -/*.$enddecl${Events::CalcEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc_ctor} .......................................................*/ +/*$enddecl${Events::CalcEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc_ctor} ........................................................*/ void Calc_ctor(void); -/*.$enddecl${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ extern QHsm * const the_calc; /* "opaque" pointer to calculator HSM */ #endif /* CALC1_SUB_H */ + diff --git a/examples/workstation/calc1_sub/calc1_sub.qm b/examples/workstation/calc1_sub/calc1_sub.qm index 010ffef1..92cb9812 100644 --- a/examples/workstation/calc1_sub/calc1_sub.qm +++ b/examples/workstation/calc1_sub/calc1_sub.qm @@ -1,8 +1,8 @@ - + The improved Calculator model with QMsm state machine implementation strategy and Sub-Machines. - + diff --git a/examples/workstation/calc1_sub/lint-plus/lin.bat b/examples/workstation/calc1_sub/lint-plus/lin.bat index ed50edff..0d3e52e3 100644 --- a/examples/workstation/calc1_sub/lint-plus/lin.bat +++ b/examples/workstation/calc1_sub/lint-plus/lin.bat @@ -1,64 +1,64 @@ -@echo off -:: =========================================================================== -:: Batch script for running PC-Lint-Plus -:: Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. -:: -:: SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial -:: -:: This software is dual-licensed under the terms of the open source GNU -:: General Public License version 3 (or any later version), or alternatively, -:: under the terms of one of the closed source Quantum Leaps commercial -:: licenses. -:: -:: The terms of the open source GNU General Public License version 3 -:: can be found at: -:: -:: The terms of the closed source Quantum Leaps commercial licenses -:: can be found at: -:: -:: Redistributions in source code must retain this top-level comment block. -:: Plagiarizing this software to sidestep the license obligations is illegal. -:: -:: Contact information: -:: -:: -:: =========================================================================== -@setlocal - -:: usage of lin.bat -@echo Usage: lin [16bit] [-d...] [files...] -@echo examples: -@echo lin ..\table.c : use 32bit CPU (default) for linting ..\table.c -@echo lin 16bit -dQ_SPY ..\philo.c : use 16bit CPU and define Q_SPY for linting ..\philo.c -@echo lin ..\philo.c ..\table.c : use 32bit CPU for linting ..\philo.c and ..\table.c -@echo. - -:: NOTE: adjust to for your installation directory of PC-Lint-Plus -@set PCLP=C:\tools\lint-plus\windows\pclp32.exe - -if NOT exist "%PCLP%" ( - @echo The PC-Lint-Plus toolset not found. Please adjust lin.bat - @goto end -) - -:: set the QP/C directory -set QPC=..\..\..\.. -set QPC_LINT=%QPC%\ports\lint-plus - -if "%1"=="16bit" ( - set LINTFLAGS=%QPC_LINT%\std.lnt -i%QPC_LINT%\16bit options.lnt %2 %3 %4 %5 %6 %7 %8 - @echo 16bit CPU -) else ( - set LINTFLAGS=%QPC_LINT%\std.lnt -i%QPC_LINT%\32bit options.lnt %1 %2 %3 %4 %6 %7 %8 - @echo 32bit CPU (default) -) - -:: cleanup -@del *.log - - -:: linting ------------------------------------------------------------------- -%PCLP% -os(lint_out.log) %LINTFLAGS% - -:end -@endlocal +@echo off +:: =========================================================================== +:: Batch script for running PC-Lint-Plus +:: Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +:: +:: SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +:: +:: This software is dual-licensed under the terms of the open source GNU +:: General Public License version 3 (or any later version), or alternatively, +:: under the terms of one of the closed source Quantum Leaps commercial +:: licenses. +:: +:: The terms of the open source GNU General Public License version 3 +:: can be found at: +:: +:: The terms of the closed source Quantum Leaps commercial licenses +:: can be found at: +:: +:: Redistributions in source code must retain this top-level comment block. +:: Plagiarizing this software to sidestep the license obligations is illegal. +:: +:: Contact information: +:: +:: +:: =========================================================================== +@setlocal + +:: usage of lin.bat +@echo Usage: lin [16bit] [-d...] [files...] +@echo examples: +@echo lin ..\table.c : use 32bit CPU (default) for linting ..\table.c +@echo lin 16bit -dQ_SPY ..\philo.c : use 16bit CPU and define Q_SPY for linting ..\philo.c +@echo lin ..\philo.c ..\table.c : use 32bit CPU for linting ..\philo.c and ..\table.c +@echo. + +:: NOTE: adjust to for your installation directory of PC-Lint-Plus +@set PCLP=C:\tools\lint-plus\windows\pclp64.exe + +if NOT exist "%PCLP%" ( + @echo The PC-Lint-Plus toolset not found. Please adjust lin.bat + @goto end +) + +:: set the QP/C directory +set QPC=..\..\..\.. +set QPC_LINT=%QPC%\ports\lint-plus + +if "%1"=="16bit" ( + set LINTFLAGS=%QPC_LINT%\std.lnt -i%QPC_LINT%\16bit options.lnt %2 %3 %4 %5 %6 %7 %8 + @echo 16bit CPU +) else ( + set LINTFLAGS=%QPC_LINT%\std.lnt -i%QPC_LINT%\32bit options.lnt %1 %2 %3 %4 %6 %7 %8 + @echo 32bit CPU (default) +) + +:: cleanup +@del *.log + + +:: linting ------------------------------------------------------------------- +%PCLP% -os(lint_out.log) %LINTFLAGS% + +:end +@endlocal diff --git a/examples/workstation/calc2/Makefile b/examples/workstation/calc2/Makefile index deccb82b..a810bcf3 100644 --- a/examples/workstation/calc2/Makefile +++ b/examples/workstation/calc2/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.9.3 -# Last updated on 2021-03-18 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -145,7 +145,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/calc2/calc2.c b/examples/workstation/calc2/calc2.c index 9094360e..be4d88a2 100644 --- a/examples/workstation/calc2/calc2.c +++ b/examples/workstation/calc2/calc2.c @@ -1,21 +1,33 @@ -/*.$file${.::calc2.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::calc2.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: calc2.qm * File: ${.::calc2.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::calc2.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::calc2.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" /* QP/C */ #include "bsp.h" /* board support package */ #include "calc2.h" /* application */ @@ -28,8 +40,9 @@ Q_DEFINE_THIS_FILE #define KEY_MULT '*' #define KEY_DIVIDE '/' -/*.$declare${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc} ............................................................*/ +/*$declare${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc} .............................................................*/ typedef struct Calc { /* protected: */ QHsm super; @@ -50,13 +63,14 @@ typedef struct Calc { * return: true if evaluation successfull * false when error encountered */ -static bool Calc_eval(Calc * const me, double op, uint8_t oper); +static bool Calc_eval(Calc * const me, + double op, + uint8_t oper); extern Calc Calc_inst; /* protected: */ static QState Calc_initial(Calc * const me, void const * const par); static QState Calc_on(Calc * const me, QEvt const * const e); - /* Error state after evaluation of an expression. This state can be exited only throgh the inherited C (Clear) event. */ @@ -71,36 +85,38 @@ static QState Calc_frac1(Calc * const me, QEvt const * const e); static QState Calc_negated1(Calc * const me, QEvt const * const e); static QState Calc_opEntered(Calc * const me, QEvt const * const e); static QState Calc_final(Calc * const me, QEvt const * const e); -/*.$enddecl${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::the_calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::the_calc} ........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${SMs::the_calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::the_calc} .........................................................*/ QHsm * const the_calc = &Calc_inst.super; -/*.$enddef${SMs::the_calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc_ctor} .......................................................*/ +/*$enddef${SMs::the_calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc_ctor} ........................................................*/ void Calc_ctor(void) { Calc *me = &Calc_inst; QHsm_ctor(&me->super, Q_STATE_CAST(&Calc_initial)); } -/*.$enddef${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc} ............................................................*/ +/*$enddef${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::Calc} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc} .............................................................*/ Calc Calc_inst; -/* guard function to evaluate the current expression -* taking into account the precedence of operands. -* return: true if evaluation successfull -* false when error encountered -*/ -/*.${SMs::Calc::eval} ......................................................*/ -static bool Calc_eval(Calc * const me, double op, uint8_t oper) { +/*${SMs::Calc::eval} .......................................................*/ +static bool Calc_eval(Calc * const me, + double op, + uint8_t oper) +{ double result; if (me->oper1 == KEY_NULL) { /* no op1 yet */ me->op1 = op; @@ -192,41 +208,42 @@ static bool Calc_eval(Calc * const me, double op, uint8_t oper) { return true; } -/*.${SMs::Calc::SM} ........................................................*/ +/*${SMs::Calc::SM} .........................................................*/ static QState Calc_initial(Calc * const me, void const * const par) { - /*.${SMs::Calc::SM::initial} */ + /*${SMs::Calc::SM::initial} */ (void)par; /* unused parameter */ return Q_TRAN(&Calc_on); } -/*.${SMs::Calc::SM::on} ....................................................*/ + +/*${SMs::Calc::SM::on} .....................................................*/ static QState Calc_on(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on} */ + /*${SMs::Calc::SM::on} */ case Q_ENTRY_SIG: { BSP_message("on-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on} */ + /*${SMs::Calc::SM::on} */ case Q_EXIT_SIG: { BSP_message("on-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::initial} */ + /*${SMs::Calc::SM::on::initial} */ case Q_INIT_SIG: { BSP_message("on-INIT;"); BSP_clear(); status_ = Q_TRAN(&Calc_ready); break; } - /*.${SMs::Calc::SM::on::C} */ + /*${SMs::Calc::SM::on::C} */ case C_SIG: { status_ = Q_TRAN(&Calc_on); break; } - /*.${SMs::Calc::SM::on::OFF} */ + /*${SMs::Calc::SM::on::OFF} */ case OFF_SIG: { status_ = Q_TRAN(&Calc_final); break; @@ -239,20 +256,17 @@ static QState Calc_on(Calc * const me, QEvt const * const e) { return status_; } -/* Error state after evaluation of an expression. -This state can be exited only throgh the inherited C (Clear) event. -*/ -/*.${SMs::Calc::SM::on::error} .............................................*/ +/*${SMs::Calc::SM::on::error} ..............................................*/ static QState Calc_error(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::error} */ + /*${SMs::Calc::SM::on::error} */ case Q_ENTRY_SIG: { BSP_message("error-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::error} */ + /*${SMs::Calc::SM::on::error} */ case Q_EXIT_SIG: { BSP_message("error-EXIT;"); status_ = Q_HANDLED(); @@ -265,11 +279,12 @@ static QState Calc_error(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready} .............................................*/ + +/*${SMs::Calc::SM::on::ready} ..............................................*/ static QState Calc_ready(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready} */ + /*${SMs::Calc::SM::on::ready} */ case Q_ENTRY_SIG: { BSP_message("ready-ENTRY;"); me->oper1 = KEY_NULL; @@ -277,32 +292,32 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready} */ + /*${SMs::Calc::SM::on::ready} */ case Q_EXIT_SIG: { BSP_message("ready-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::initial} */ + /*${SMs::Calc::SM::on::ready::initial} */ case Q_INIT_SIG: { BSP_message("ready-INIT;"); status_ = Q_TRAN(&Calc_begin); break; } - /*.${SMs::Calc::SM::on::ready::DIGIT_0} */ + /*${SMs::Calc::SM::on::ready::DIGIT_0} */ case DIGIT_0_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_zero1); break; } - /*.${SMs::Calc::SM::on::ready::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::ready::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_clear(); BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::ready::POINT} */ + /*${SMs::Calc::SM::on::ready::POINT} */ case POINT_SIG: { BSP_clear(); BSP_insert((int)'0'); @@ -310,7 +325,7 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::ready::OPER} */ + /*${SMs::Calc::SM::on::ready::OPER} */ case OPER_SIG: { me->op1 = BSP_get_value(); me->oper1 = Q_EVT_CAST(CalcEvt)->key_code; @@ -324,17 +339,18 @@ static QState Calc_ready(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready::result} .....................................*/ + +/*${SMs::Calc::SM::on::ready::result} ......................................*/ static QState Calc_result(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready::result} */ + /*${SMs::Calc::SM::on::ready::result} */ case Q_ENTRY_SIG: { BSP_message("result-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::result} */ + /*${SMs::Calc::SM::on::ready::result} */ case Q_EXIT_SIG: { BSP_message("result-EXIT;"); status_ = Q_HANDLED(); @@ -347,29 +363,30 @@ static QState Calc_result(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::ready::begin} ......................................*/ + +/*${SMs::Calc::SM::on::ready::begin} .......................................*/ static QState Calc_begin(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::ready::begin} */ + /*${SMs::Calc::SM::on::ready::begin} */ case Q_ENTRY_SIG: { BSP_message("begin-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::begin} */ + /*${SMs::Calc::SM::on::ready::begin} */ case Q_EXIT_SIG: { BSP_message("begin-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::ready::begin::OPER} */ + /*${SMs::Calc::SM::on::ready::begin::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::ready::begin::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::ready::begin::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { status_ = Q_TRAN(&Calc_negated1); } - /*.${SMs::Calc::SM::on::ready::begin::OPER::[else]} */ + /*${SMs::Calc::SM::on::ready::begin::OPER::[else]} */ else { status_ = Q_HANDLED(); } @@ -382,47 +399,48 @@ static QState Calc_begin(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand} ...........................................*/ + +/*${SMs::Calc::SM::on::operand} ............................................*/ static QState Calc_operand(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand} */ + /*${SMs::Calc::SM::on::operand} */ case Q_ENTRY_SIG: { BSP_message("operand1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand} */ + /*${SMs::Calc::SM::on::operand} */ case Q_EXIT_SIG: { BSP_message("operand1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::CE} */ + /*${SMs::Calc::SM::on::operand::CE} */ case CE_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_ready); break; } - /*.${SMs::Calc::SM::on::operand::EQUALS} */ + /*${SMs::Calc::SM::on::operand::EQUALS} */ case EQUALS_SIG: { - /*.${SMs::Calc::SM::on::operand::EQUALS::[Calc_eval(me,BSP_get_value(),KE~} */ + /*${SMs::Calc::SM::on::operand::EQUALS::[Calc_eval(me,BSP_get_value(),KE~} */ if (Calc_eval(me, BSP_get_value(), KEY_NULL)) { status_ = Q_TRAN(&Calc_result); } - /*.${SMs::Calc::SM::on::operand::EQUALS::[else]} */ + /*${SMs::Calc::SM::on::operand::EQUALS::[else]} */ else { status_ = Q_TRAN(&Calc_error); } break; } - /*.${SMs::Calc::SM::on::operand::OPER} */ + /*${SMs::Calc::SM::on::operand::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::operand::OPER::[Calc_eval(me,BSP_get_value(),Q_~} */ + /*${SMs::Calc::SM::on::operand::OPER::[Calc_eval(me,BSP_get_value(),Q_~} */ if (Calc_eval(me, BSP_get_value(), Q_EVT_CAST(CalcEvt)->key_code)) { status_ = Q_TRAN(&Calc_opEntered); } - /*.${SMs::Calc::SM::on::operand::OPER::[else]} */ + /*${SMs::Calc::SM::on::operand::OPER::[else]} */ else { status_ = Q_TRAN(&Calc_error); } @@ -435,35 +453,36 @@ static QState Calc_operand(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand::zero1} ....................................*/ + +/*${SMs::Calc::SM::on::operand::zero1} .....................................*/ static QState Calc_zero1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand::zero1} */ + /*${SMs::Calc::SM::on::operand::zero1} */ case Q_ENTRY_SIG: { BSP_message("zero1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::zero1} */ + /*${SMs::Calc::SM::on::operand::zero1} */ case Q_EXIT_SIG: { BSP_message("zero1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::zero1::DIGIT_0} */ + /*${SMs::Calc::SM::on::operand::zero1::DIGIT_0} */ case DIGIT_0_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::zero1::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand::zero1::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::operand::zero1::POINT} */ + /*${SMs::Calc::SM::on::operand::zero1::POINT} */ case POINT_SIG: { BSP_insert((int)'0'); BSP_insert((int)'.'); @@ -477,29 +496,30 @@ static QState Calc_zero1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand::int1} .....................................*/ + +/*${SMs::Calc::SM::on::operand::int1} ......................................*/ static QState Calc_int1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand::int1} */ + /*${SMs::Calc::SM::on::operand::int1} */ case Q_ENTRY_SIG: { BSP_message("int1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::int1} */ + /*${SMs::Calc::SM::on::operand::int1} */ case Q_EXIT_SIG: { BSP_message("int1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::int1::POINT} */ + /*${SMs::Calc::SM::on::operand::int1::POINT} */ case POINT_SIG: { BSP_insert((int)'.'); status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::operand::int1::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand::int1::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -513,29 +533,30 @@ static QState Calc_int1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand::frac1} ....................................*/ + +/*${SMs::Calc::SM::on::operand::frac1} .....................................*/ static QState Calc_frac1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand::frac1} */ + /*${SMs::Calc::SM::on::operand::frac1} */ case Q_ENTRY_SIG: { BSP_message("frac1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::frac1} */ + /*${SMs::Calc::SM::on::operand::frac1} */ case Q_EXIT_SIG: { BSP_message("frac1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::frac1::POINT} */ + /*${SMs::Calc::SM::on::operand::frac1::POINT} */ case POINT_SIG: { ; status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::frac1::DIGIT_0, DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand::frac1::DIGIT_0, DIGIT_1_9} */ case DIGIT_0_SIG: /* intentionally fall through */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); @@ -549,49 +570,50 @@ static QState Calc_frac1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::operand::negated1} .................................*/ + +/*${SMs::Calc::SM::on::operand::negated1} ..................................*/ static QState Calc_negated1(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::operand::negated1} */ + /*${SMs::Calc::SM::on::operand::negated1} */ case Q_ENTRY_SIG: { BSP_message("negated1-ENTRY;"); BSP_negate(); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::negated1} */ + /*${SMs::Calc::SM::on::operand::negated1} */ case Q_EXIT_SIG: { BSP_message("negated1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::operand::negated1::DIGIT_0} */ + /*${SMs::Calc::SM::on::operand::negated1::DIGIT_0} */ case DIGIT_0_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_zero1); break; } - /*.${SMs::Calc::SM::on::operand::negated1::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::operand::negated1::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::operand::negated1::POINT} */ + /*${SMs::Calc::SM::on::operand::negated1::POINT} */ case POINT_SIG: { BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::operand::negated1::OPER} */ + /*${SMs::Calc::SM::on::operand::negated1::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::operand::negated1::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::operand::negated1::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { ; status_ = Q_HANDLED(); } - /*.${SMs::Calc::SM::on::operand::negated1::OPER::[else]} */ + /*${SMs::Calc::SM::on::operand::negated1::OPER::[else]} */ else { status_ = Q_HANDLED(); } @@ -604,36 +626,37 @@ static QState Calc_negated1(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::on::opEntered} .........................................*/ + +/*${SMs::Calc::SM::on::opEntered} ..........................................*/ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::on::opEntered} */ + /*${SMs::Calc::SM::on::opEntered} */ case Q_ENTRY_SIG: { BSP_message("opEntered-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::opEntered} */ + /*${SMs::Calc::SM::on::opEntered} */ case Q_EXIT_SIG: { BSP_message("opEntered-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${SMs::Calc::SM::on::opEntered::DIGIT_0} */ + /*${SMs::Calc::SM::on::opEntered::DIGIT_0} */ case DIGIT_0_SIG: { BSP_clear(); status_ = Q_TRAN(&Calc_zero1); break; } - /*.${SMs::Calc::SM::on::opEntered::DIGIT_1_9} */ + /*${SMs::Calc::SM::on::opEntered::DIGIT_1_9} */ case DIGIT_1_9_SIG: { BSP_clear(); BSP_insert(Q_EVT_CAST(CalcEvt)->key_code); status_ = Q_TRAN(&Calc_int1); break; } - /*.${SMs::Calc::SM::on::opEntered::POINT} */ + /*${SMs::Calc::SM::on::opEntered::POINT} */ case POINT_SIG: { BSP_clear(); BSP_insert((int)'0'); @@ -641,13 +664,13 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { status_ = Q_TRAN(&Calc_frac1); break; } - /*.${SMs::Calc::SM::on::opEntered::OPER} */ + /*${SMs::Calc::SM::on::opEntered::OPER} */ case OPER_SIG: { - /*.${SMs::Calc::SM::on::opEntered::OPER::[e->key=='-']} */ + /*${SMs::Calc::SM::on::opEntered::OPER::[e->key=='-']} */ if (Q_EVT_CAST(CalcEvt)->key_code == KEY_MINUS) { status_ = Q_TRAN(&Calc_negated1); } - /*.${SMs::Calc::SM::on::opEntered::OPER::[else]} */ + /*${SMs::Calc::SM::on::opEntered::OPER::[else]} */ else { status_ = Q_HANDLED(); } @@ -660,11 +683,12 @@ static QState Calc_opEntered(Calc * const me, QEvt const * const e) { } return status_; } -/*.${SMs::Calc::SM::final} .................................................*/ + +/*${SMs::Calc::SM::final} ..................................................*/ static QState Calc_final(Calc * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::Calc::SM::final} */ + /*${SMs::Calc::SM::final} */ case Q_ENTRY_SIG: { BSP_message("final-ENTRY;"); BSP_exit(); @@ -678,4 +702,4 @@ static QState Calc_final(Calc * const me, QEvt const * const e) { } return status_; } -/*.$enddef${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${SMs::Calc} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/calc2/calc2.h b/examples/workstation/calc2/calc2.h index 5c17769d..d34555fc 100644 --- a/examples/workstation/calc2/calc2.h +++ b/examples/workstation/calc2/calc2.h @@ -1,21 +1,33 @@ -/*.$file${.::calc2.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::calc2.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: calc2.qm * File: ${.::calc2.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::calc2.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::calc2.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef CALC2_H #define CALC2_H @@ -30,8 +42,9 @@ enum CalcSignals { OFF_SIG }; -/*.$declare${Events::CalcEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::CalcEvt} ......................................................*/ +/*$declare${Events::CalcEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::CalcEvt} .......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -39,12 +52,14 @@ typedef struct { /* public: */ uint8_t key_code; } CalcEvt; -/*.$enddecl${Events::CalcEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::Calc_ctor} .......................................................*/ +/*$enddecl${Events::CalcEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${SMs::Calc_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::Calc_ctor} ........................................................*/ void Calc_ctor(void); -/*.$enddecl${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::Calc_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ extern QHsm * const the_calc; /* "opaque" pointer to calculator HSM */ #endif /* CALC2_H */ + diff --git a/examples/workstation/calc2/calc2.qm b/examples/workstation/calc2/calc2.qm index 69de0275..a3bc6f4d 100644 --- a/examples/workstation/calc2/calc2.qm +++ b/examples/workstation/calc2/calc2.qm @@ -1,7 +1,6 @@ - + Improved model of the Calculator described in Chapter 4 of PSiCC2. Improvements include: - - placing the "negated1" state inside "operand1" superstate - placing the "negated2" state inside "operand2" superstate - adding handling of operator precedence '*','/' before '+','-' diff --git a/examples/workstation/comp/.comp b/examples/workstation/comp/.comp new file mode 100644 index 00000000..af55e852 --- /dev/null +++ b/examples/workstation/comp/.comp @@ -0,0 +1,59 @@ + + + GPL + + + 1 + 0 + 3 + 0 + + + + 2032128 + 0 + + + + + 0 + + + + + 0 + + + 0 + + + + + 0 + + + 0 + + + + + 0 + + + 0 + + + + + 0 + + + 0 + + + + + 0 + + + diff --git a/examples/workstation/comp/Makefile b/examples/workstation/comp/Makefile index 7f030001..7ae24597 100644 --- a/examples/workstation/comp/Makefile +++ b/examples/workstation/comp/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -146,7 +146,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/comp/alarm.c b/examples/workstation/comp/alarm.c index d1c3ec3d..a7c1666e 100644 --- a/examples/workstation/comp/alarm.c +++ b/examples/workstation/comp/alarm.c @@ -1,21 +1,33 @@ -/*.$file${.::alarm.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::alarm.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: comp.qm * File: ${.::alarm.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::alarm.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::alarm.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "bsp.h" #include "alarm.h" @@ -24,31 +36,35 @@ //Q_DEFINE_THIS_FILE /* Alarm component --------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Components::Alarm} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::Alarm} ....................................................*/ -/*.${Components::Alarm::ctor} ..............................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Components::Alarm} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::Alarm} .....................................................*/ + +/*${Components::Alarm::ctor} ...............................................*/ void Alarm_ctor(Alarm * const me) { QHsm_ctor(&me->super, Q_STATE_CAST(&Alarm_initial)); } -/*.${Components::Alarm::SM} ................................................*/ +/*${Components::Alarm::SM} .................................................*/ QState Alarm_initial(Alarm * const me, void const * const par) { - /*.${Components::Alarm::SM::initial} */ + /*${Components::Alarm::SM::initial} */ me->alarm_time = 12U*60U; (void)par; /* unused parameter */ return Q_TRAN(&Alarm_off); } -/*.${Components::Alarm::SM::off} ...........................................*/ + +/*${Components::Alarm::SM::off} ............................................*/ QState Alarm_off(Alarm * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::Alarm::SM::off} */ + /*${Components::Alarm::SM::off} */ case Q_ENTRY_SIG: { /* while in the off state, the alarm is kept in decimal format */ me->alarm_time = (me->alarm_time/60)*100 + me->alarm_time%60; @@ -56,22 +72,22 @@ QState Alarm_off(Alarm * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Components::Alarm::SM::off} */ + /*${Components::Alarm::SM::off} */ case Q_EXIT_SIG: { /* upon exit, the alarm is converted to binary format */ me->alarm_time = (me->alarm_time/100U)*60U + me->alarm_time%100U; status_ = Q_HANDLED(); break; } - /*.${Components::Alarm::SM::off::ALARM_ON} */ + /*${Components::Alarm::SM::off::ALARM_ON} */ case ALARM_ON_SIG: { - /*.${Components::Alarm::SM::off::ALARM_ON::[alarminrange?]} */ + /*${Components::Alarm::SM::off::ALARM_ON::[alarminrange?]} */ if ((me->alarm_time / 100U < 24U) && (me->alarm_time % 100U < 60U)) { status_ = Q_TRAN(&Alarm_on); } - /*.${Components::Alarm::SM::off::ALARM_ON::[else]} */ + /*${Components::Alarm::SM::off::ALARM_ON::[else]} */ else { me->alarm_time = 0U; BSP_showTime24H("*** Alarm reset", me->alarm_time, 100U); @@ -79,7 +95,7 @@ QState Alarm_off(Alarm * const me, QEvt const * const e) { } break; } - /*.${Components::Alarm::SM::off::ALARM_SET} */ + /*${Components::Alarm::SM::off::ALARM_SET} */ case ALARM_SET_SIG: { /* while setting, the alarm is kept in decimal format */ me->alarm_time = (10U * me->alarm_time @@ -95,30 +111,31 @@ QState Alarm_off(Alarm * const me, QEvt const * const e) { } return status_; } -/*.${Components::Alarm::SM::on} ............................................*/ + +/*${Components::Alarm::SM::on} .............................................*/ QState Alarm_on(Alarm * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::Alarm::SM::on} */ + /*${Components::Alarm::SM::on} */ case Q_ENTRY_SIG: { BSP_showTime24H("*** Alarm ON ", me->alarm_time, 60U); status_ = Q_HANDLED(); break; } - /*.${Components::Alarm::SM::on::ALARM_OFF} */ + /*${Components::Alarm::SM::on::ALARM_OFF} */ case ALARM_OFF_SIG: { status_ = Q_TRAN(&Alarm_off); break; } - /*.${Components::Alarm::SM::on::ALARM_SET} */ + /*${Components::Alarm::SM::on::ALARM_SET} */ case ALARM_SET_SIG: { BSP_showMsg("*** Cannot set Alarm when it is ON"); status_ = Q_HANDLED(); break; } - /*.${Components::Alarm::SM::on::TIME} */ + /*${Components::Alarm::SM::on::TIME} */ case TIME_SIG: { - /*.${Components::Alarm::SM::on::TIME::[Q_EVT_CAST(TimeEvt)->current_ti~} */ + /*${Components::Alarm::SM::on::TIME::[Q_EVT_CAST(TimeEvt)->current_ti~} */ if (Q_EVT_CAST(TimeEvt)->current_time == me->alarm_time) { BSP_showMsg("ALARM!!!"); @@ -138,4 +155,5 @@ QState Alarm_on(Alarm * const me, QEvt const * const e) { } return status_; } -/*.$enddef${Components::Alarm} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Components::Alarm} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/workstation/comp/alarm.h b/examples/workstation/comp/alarm.h index 4841fb9d..88f94602 100644 --- a/examples/workstation/comp/alarm.h +++ b/examples/workstation/comp/alarm.h @@ -1,26 +1,39 @@ -/*.$file${.::alarm.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::alarm.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: comp.qm * File: ${.::alarm.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::alarm.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::alarm.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef ALARM_H #define ALARM_H -/*.$declare${Components::Alarm} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::Alarm} ....................................................*/ +/*$declare${Components::Alarm} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::Alarm} .....................................................*/ typedef struct { /* protected: */ QHsm super; @@ -36,10 +49,11 @@ void Alarm_ctor(Alarm * const me); QState Alarm_initial(Alarm * const me, void const * const par); QState Alarm_off(Alarm * const me, QEvt const * const e); QState Alarm_on(Alarm * const me, QEvt const * const e); -/*.$enddecl${Components::Alarm} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Components::Alarm} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Components::Alarm::ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$declare${Components::Alarm::ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ void Alarm_ctor(Alarm * const me); -/*.$enddecl${Components::Alarm::ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Components::Alarm::ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* ALARM_H */ + diff --git a/examples/workstation/comp/bsp.c b/examples/workstation/comp/bsp.c index c5276bfc..8a291c28 100644 --- a/examples/workstation/comp/bsp.c +++ b/examples/workstation/comp/bsp.c @@ -75,7 +75,7 @@ void QF_onCleanup(void) { } /*..........................................................................*/ void QF_onClockTick(void) { - QF_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ int key = QF_consoleGetKey(); if (key != 0) { /* any key pressed? */ BSP_onKeyboardInput((uint8_t)key); diff --git a/examples/workstation/comp/clock.c b/examples/workstation/comp/clock.c index dcf2b2ac..c3987500 100644 --- a/examples/workstation/comp/clock.c +++ b/examples/workstation/comp/clock.c @@ -1,21 +1,33 @@ -/*.$file${.::clock.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::clock.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: comp.qm * File: ${.::clock.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::clock.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::clock.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "bsp.h" #include "alarm.h" @@ -26,8 +38,9 @@ Q_DEFINE_THIS_FILE /* Active object class -----------------------------------------------------*/ -/*.$declare${Components::AlarmClock} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::AlarmClock} ...............................................*/ +/*$declare${Components::AlarmClock} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::AlarmClock} ................................................*/ typedef struct { /* protected: */ QActive super; @@ -46,25 +59,28 @@ static QState AlarmClock_timekeeping(AlarmClock * const me, QEvt const * const e static QState AlarmClock_mode24h(AlarmClock * const me, QEvt const * const e); static QState AlarmClock_mode12h(AlarmClock * const me, QEvt const * const e); static QState AlarmClock_final(AlarmClock * const me, QEvt const * const e); -/*.$enddecl${Components::AlarmClock} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Components::AlarmClock} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Local objects -----------------------------------------------------------*/ static AlarmClock l_alarmClock; /* the single inst of the AO */ /* Global-scope objects ----------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Components::APP_alarmClock} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::APP_alarmClock} ...........................................*/ -QActive * const APP_alarmClock = &l_alarmClock.super; -/*.$enddef${Components::APP_alarmClock} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Components::AlarmClock_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::AlarmClock_ctor} ..........................................*/ +/*$define${Components::APP_alarmClock} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::APP_alarmClock} ............................................*/ +QActive * const APP_alarmClock = &l_alarmClock.super; +/*$enddef${Components::APP_alarmClock} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Components::AlarmClock_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::AlarmClock_ctor} ...........................................*/ void AlarmClock_ctor(void) { AlarmClock * const me = &l_alarmClock; @@ -74,14 +90,16 @@ void AlarmClock_ctor(void) { /* private time event ctor */ QTimeEvt_ctorX(&me->timeEvt, &me->super, TICK_SIG, 0U); } -/*.$enddef${Components::AlarmClock_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Components::AlarmClock_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*..........................................................................*/ -/*.$define${Components::AlarmClock} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::AlarmClock} ...............................................*/ -/*.${Components::AlarmClock::SM} ...........................................*/ +/*$define${Components::AlarmClock} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::AlarmClock} ................................................*/ + +/*${Components::AlarmClock::SM} ............................................*/ static QState AlarmClock_initial(AlarmClock * const me, void const * const par) { - /*.${Components::AlarmClock::SM::initial} */ + /*${Components::AlarmClock::SM::initial} */ (void)par; /* unused parameter */ me->current_time = 0U; @@ -89,11 +107,12 @@ static QState AlarmClock_initial(AlarmClock * const me, void const * const par) QHSM_INIT((QHsm *)&me->alarm, (void *)0, me->super.prio); return Q_TRAN(&AlarmClock_timekeeping); } -/*.${Components::AlarmClock::SM::timekeeping} ..............................*/ + +/*${Components::AlarmClock::SM::timekeeping} ...............................*/ static QState AlarmClock_timekeeping(AlarmClock * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::AlarmClock::SM::timekeeping} */ + /*${Components::AlarmClock::SM::timekeeping} */ case Q_ENTRY_SIG: { /* periodic timeout every second */ QTimeEvt_armX(&me->timeEvt, BSP_TICKS_PER_SEC, @@ -101,34 +120,34 @@ static QState AlarmClock_timekeeping(AlarmClock * const me, QEvt const * const e status_ = Q_HANDLED(); break; } - /*.${Components::AlarmClock::SM::timekeeping} */ + /*${Components::AlarmClock::SM::timekeeping} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${Components::AlarmClock::SM::timekeeping::initial} */ + /*${Components::AlarmClock::SM::timekeeping::initial} */ case Q_INIT_SIG: { status_ = Q_TRAN(&AlarmClock_mode24h); break; } - /*.${Components::AlarmClock::SM::timekeeping::CLOCK_24H} */ + /*${Components::AlarmClock::SM::timekeeping::CLOCK_24H} */ case CLOCK_24H_SIG: { status_ = Q_TRAN(&AlarmClock_mode24h); break; } - /*.${Components::AlarmClock::SM::timekeeping::CLOCK_12H} */ + /*${Components::AlarmClock::SM::timekeeping::CLOCK_12H} */ case CLOCK_12H_SIG: { status_ = Q_TRAN(&AlarmClock_mode12h); break; } - /*.${Components::AlarmClock::SM::timekeeping::ALARM} */ + /*${Components::AlarmClock::SM::timekeeping::ALARM} */ case ALARM_SIG: { BSP_showMsg("Wake up!!!"); status_ = Q_HANDLED(); break; } - /*.${Components::AlarmClock::SM::timekeeping::ALARM_SET, ALARM_ON, ALARM_OFF} */ + /*${Components::AlarmClock::SM::timekeeping::ALARM_SET, ALARM_ON, ALARM_OFF} */ case ALARM_SET_SIG: /* intentionally fall through */ case ALARM_ON_SIG: /* intentionally fall through */ case ALARM_OFF_SIG: { @@ -137,7 +156,7 @@ static QState AlarmClock_timekeeping(AlarmClock * const me, QEvt const * const e status_ = Q_HANDLED(); break; } - /*.${Components::AlarmClock::SM::timekeeping::TERMINATE} */ + /*${Components::AlarmClock::SM::timekeeping::TERMINATE} */ case TERMINATE_SIG: { BSP_showMsg("--> final"); status_ = Q_TRAN(&AlarmClock_final); @@ -150,17 +169,18 @@ static QState AlarmClock_timekeeping(AlarmClock * const me, QEvt const * const e } return status_; } -/*.${Components::AlarmClock::SM::timekeeping::mode24h} .....................*/ + +/*${Components::AlarmClock::SM::timekeeping::mode24h} ......................*/ static QState AlarmClock_mode24h(AlarmClock * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::AlarmClock::SM::timekeeping::mode24h} */ + /*${Components::AlarmClock::SM::timekeeping::mode24h} */ case Q_ENTRY_SIG: { BSP_showMsg("*** 24-hour mode"); status_ = Q_HANDLED(); break; } - /*.${Components::AlarmClock::SM::timekeeping::mode24h::TICK} */ + /*${Components::AlarmClock::SM::timekeeping::mode24h::TICK} */ case TICK_SIG: { TimeEvt pe; /* temporary synchronous event for the component */ @@ -184,17 +204,18 @@ static QState AlarmClock_mode24h(AlarmClock * const me, QEvt const * const e) { } return status_; } -/*.${Components::AlarmClock::SM::timekeeping::mode12h} .....................*/ + +/*${Components::AlarmClock::SM::timekeeping::mode12h} ......................*/ static QState AlarmClock_mode12h(AlarmClock * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::AlarmClock::SM::timekeeping::mode12h} */ + /*${Components::AlarmClock::SM::timekeeping::mode12h} */ case Q_ENTRY_SIG: { BSP_showMsg("*** 12-hour mode"); status_ = Q_HANDLED(); break; } - /*.${Components::AlarmClock::SM::timekeeping::mode12h::TICK} */ + /*${Components::AlarmClock::SM::timekeeping::mode12h::TICK} */ case TICK_SIG: { TimeEvt pe; /* temporary synchronous event for the component */ @@ -218,11 +239,12 @@ static QState AlarmClock_mode12h(AlarmClock * const me, QEvt const * const e) { } return status_; } -/*.${Components::AlarmClock::SM::final} ....................................*/ + +/*${Components::AlarmClock::SM::final} .....................................*/ static QState AlarmClock_final(AlarmClock * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::AlarmClock::SM::final} */ + /*${Components::AlarmClock::SM::final} */ case Q_ENTRY_SIG: { QF_stop(); /* terminate the application */ status_ = Q_HANDLED(); @@ -235,4 +257,5 @@ static QState AlarmClock_final(AlarmClock * const me, QEvt const * const e) { } return status_; } -/*.$enddef${Components::AlarmClock} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Components::AlarmClock} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/workstation/comp/clock.h b/examples/workstation/comp/clock.h index 9b9a1b1d..fd7acf60 100644 --- a/examples/workstation/comp/clock.h +++ b/examples/workstation/comp/clock.h @@ -1,21 +1,33 @@ -/*.$file${.::clock.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::clock.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: comp.qm * File: ${.::clock.h} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::clock.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::clock.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef CLOCK_H #define CLOCK_H @@ -31,8 +43,9 @@ enum AlarmClockSignals { TERMINATE_SIG /* terminate the application */ }; -/*.$declare${Events::SetEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::SetEvt} .......................................................*/ +/*$declare${Events::SetEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::SetEvt} ........................................................*/ typedef struct { /* protected: */ QEvt super; @@ -40,9 +53,10 @@ typedef struct { /* public: */ uint8_t digit; } SetEvt; -/*.$enddecl${Events::SetEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Events::TimeEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::TimeEvt} ......................................................*/ +/*$enddecl${Events::SetEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Events::TimeEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TimeEvt} .......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -50,14 +64,18 @@ typedef struct { /* public: */ uint32_t current_time; } TimeEvt; -/*.$enddecl${Events::TimeEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::TimeEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Components::APP_alarmClock} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$declare${Components::APP_alarmClock} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::APP_alarmClock} ............................................*/ extern QActive * const APP_alarmClock; -/*.$enddecl${Components::APP_alarmClock} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Components::AlarmClock_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::AlarmClock_ctor} ..........................................*/ +/*$enddecl${Components::APP_alarmClock} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Components::AlarmClock_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::AlarmClock_ctor} ...........................................*/ void AlarmClock_ctor(void); -/*.$enddecl${Components::AlarmClock_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Components::AlarmClock_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* CLOCK_H */ + diff --git a/examples/workstation/comp/comp.qm b/examples/workstation/comp/comp.qm index 7db69d0f..74770c2e 100644 --- a/examples/workstation/comp/comp.qm +++ b/examples/workstation/comp/comp.qm @@ -1,8 +1,6 @@ - - Dining Philosopher Problem example - -NOTE: Requries QP6. + + "Orthogonal Component" example diff --git a/examples/workstation/defer/Makefile b/examples/workstation/defer/Makefile index 5e095738..a366deab 100644 --- a/examples/workstation/defer/Makefile +++ b/examples/workstation/defer/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -144,7 +144,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/defer/bsp.c b/examples/workstation/defer/bsp.c index e5ae452b..6b68e5d9 100644 --- a/examples/workstation/defer/bsp.c +++ b/examples/workstation/defer/bsp.c @@ -68,7 +68,7 @@ void QF_onCleanup(void) { /*..........................................................................*/ void QF_onClockTick(void) { int key; - QF_TICK_X(0U, &l_QF_onClockTick); /* perform QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_QF_onClockTick); /* perform QF clock tick processing */ QS_RX_INPUT(); /* handle the QS-RX input */ QS_OUTPUT(); /* handle the QS output */ diff --git a/examples/workstation/defer/defer.c b/examples/workstation/defer/defer.c index f505dd8e..b64ad242 100644 --- a/examples/workstation/defer/defer.c +++ b/examples/workstation/defer/defer.c @@ -1,21 +1,33 @@ -/*.$file${.::defer.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::defer.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: defer.qm * File: ${.::defer.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::defer.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::defer.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "bsp.h" @@ -31,8 +43,9 @@ enum TServerSignals { TERMINATE_SIG /* terminate the application */ }; /*..........................................................................*/ -/*.$declare${Events::RequestEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::RequestEvt} ...................................................*/ +/*$declare${Events::RequestEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::RequestEvt} ....................................................*/ typedef struct { /* protected: */ QEvt super; @@ -40,11 +53,12 @@ typedef struct { /* public: */ uint8_t ref_num; } RequestEvt; -/*.$enddecl${Events::RequestEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::RequestEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Active object class -----------------------------------------------------*/ -/*.$declare${Components::TServer} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::TServer} ..................................................*/ +/*$declare${Components::TServer} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::TServer} ...................................................*/ typedef struct TServer { /* protected: */ QActive super; @@ -70,18 +84,21 @@ static QState TServer_busy(TServer * const me, QEvt const * const e); static QState TServer_receiving(TServer * const me, QEvt const * const e); static QState TServer_authorizing(TServer * const me, QEvt const * const e); static QState TServer_final(TServer * const me, QEvt const * const e); -/*.$enddecl${Components::TServer} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Components::TServer} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Components::TServer} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::TServer} ..................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Components::TServer} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::TServer} ...................................................*/ TServer TServer_inst; -/*.${Components::TServer::ctor} ............................................*/ + +/*${Components::TServer::ctor} .............................................*/ static void TServer_ctor(TServer * const me) { QActive_ctor(&me->super, Q_STATE_CAST(&TServer_initial)); QEQueue_init(&me->requestQueue, @@ -90,9 +107,9 @@ static void TServer_ctor(TServer * const me) { QTimeEvt_ctorX(&me->authorizedEvt, &me->super, AUTHORIZED_SIG, 0U); } -/*.${Components::TServer::SM} ..............................................*/ +/*${Components::TServer::SM} ...............................................*/ static QState TServer_initial(TServer * const me, void const * const par) { - /*.${Components::TServer::SM::initial} */ + /*${Components::TServer::SM::initial} */ (void)par; /* unused parameter */ me->activeRequest = (RequestEvt const *)0; /* no active request yet */ @@ -110,11 +127,12 @@ static QState TServer_initial(TServer * const me, void const * const par) { return Q_TRAN(&TServer_idle); } -/*.${Components::TServer::SM::idle} ........................................*/ + +/*${Components::TServer::SM::idle} .........................................*/ static QState TServer_idle(TServer * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::TServer::SM::idle} */ + /*${Components::TServer::SM::idle} */ case Q_ENTRY_SIG: { PRINTF_S("%s\n", "idle-ENTRY;"); @@ -128,7 +146,7 @@ static QState TServer_idle(TServer * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Components::TServer::SM::idle::NEW_REQUEST} */ + /*${Components::TServer::SM::idle::NEW_REQUEST} */ case NEW_REQUEST_SIG: { /* create and save a new reference to the request event so that * this event will be available beyond this RTC step and won't be @@ -141,7 +159,7 @@ static QState TServer_idle(TServer * const me, QEvt const * const e) { status_ = Q_TRAN(&TServer_receiving); break; } - /*.${Components::TServer::SM::idle::TERMINATE} */ + /*${Components::TServer::SM::idle::TERMINATE} */ case TERMINATE_SIG: { status_ = Q_TRAN(&TServer_final); break; @@ -153,11 +171,12 @@ static QState TServer_idle(TServer * const me, QEvt const * const e) { } return status_; } -/*.${Components::TServer::SM::busy} ........................................*/ + +/*${Components::TServer::SM::busy} .........................................*/ static QState TServer_busy(TServer * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::TServer::SM::busy} */ + /*${Components::TServer::SM::busy} */ case Q_EXIT_SIG: { PRINTF_S("busy-EXIT; done processing request #%d\n", (int)me->activeRequest->ref_num); @@ -169,7 +188,7 @@ static QState TServer_busy(TServer * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Components::TServer::SM::busy::NEW_REQUEST} */ + /*${Components::TServer::SM::busy::NEW_REQUEST} */ case NEW_REQUEST_SIG: { /* defer the new request event... */ if (QActive_defer(&me->super, &me->requestQueue, e)) { @@ -184,7 +203,7 @@ static QState TServer_busy(TServer * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Components::TServer::SM::busy::TERMINATE} */ + /*${Components::TServer::SM::busy::TERMINATE} */ case TERMINATE_SIG: { status_ = Q_TRAN(&TServer_final); break; @@ -196,11 +215,12 @@ static QState TServer_busy(TServer * const me, QEvt const * const e) { } return status_; } -/*.${Components::TServer::SM::busy::receiving} .............................*/ + +/*${Components::TServer::SM::busy::receiving} ..............................*/ static QState TServer_receiving(TServer * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::TServer::SM::busy::receiving} */ + /*${Components::TServer::SM::busy::receiving} */ case Q_ENTRY_SIG: { /* inform about the first stage of processing of the request... */ PRINTF_S("receiving-ENTRY; active request: #%d\n", @@ -211,13 +231,13 @@ static QState TServer_receiving(TServer * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Components::TServer::SM::busy::receiving} */ + /*${Components::TServer::SM::busy::receiving} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->receivedEvt); status_ = Q_HANDLED(); break; } - /*.${Components::TServer::SM::busy::receiving::RECEIVED} */ + /*${Components::TServer::SM::busy::receiving::RECEIVED} */ case RECEIVED_SIG: { status_ = Q_TRAN(&TServer_authorizing); break; @@ -229,11 +249,12 @@ static QState TServer_receiving(TServer * const me, QEvt const * const e) { } return status_; } -/*.${Components::TServer::SM::busy::authorizing} ...........................*/ + +/*${Components::TServer::SM::busy::authorizing} ............................*/ static QState TServer_authorizing(TServer * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::TServer::SM::busy::authorizing} */ + /*${Components::TServer::SM::busy::authorizing} */ case Q_ENTRY_SIG: { /* inform about the second stage of processing of the request.. */ PRINTF_S("authorizing-ENTRY; active request: #%d\n", @@ -244,13 +265,13 @@ static QState TServer_authorizing(TServer * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Components::TServer::SM::busy::authorizing} */ + /*${Components::TServer::SM::busy::authorizing} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->authorizedEvt); status_ = Q_HANDLED(); break; } - /*.${Components::TServer::SM::busy::authorizing::AUTHORIZED} */ + /*${Components::TServer::SM::busy::authorizing::AUTHORIZED} */ case AUTHORIZED_SIG: { status_ = Q_TRAN(&TServer_idle); break; @@ -262,11 +283,12 @@ static QState TServer_authorizing(TServer * const me, QEvt const * const e) { } return status_; } -/*.${Components::TServer::SM::final} .......................................*/ + +/*${Components::TServer::SM::final} ........................................*/ static QState TServer_final(TServer * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::TServer::SM::final} */ + /*${Components::TServer::SM::final} */ case Q_ENTRY_SIG: { PRINTF_S("%s\n", "final-ENTRY;"); QF_stop(); /* terminate the application */ @@ -280,7 +302,7 @@ static QState TServer_final(TServer * const me, QEvt const * const e) { } return status_; } -/*.$enddef${Components::TServer} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Components::TServer} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ // test harness ============================================================*/ @@ -336,3 +358,4 @@ void BSP_onKeyboardInput(uint8_t key) { } } } + diff --git a/examples/workstation/defer/defer.qm b/examples/workstation/defer/defer.qm index 3cc3ccd9..ffd0a1d7 100644 --- a/examples/workstation/defer/defer.qm +++ b/examples/workstation/defer/defer.qm @@ -1,8 +1,6 @@ - - "Deferred Event" state pattern example - -NOTE: Requries QP6. + + "Deferred Event" state pattern example diff --git a/examples/workstation/defer/qspy200822_125414.seq b/examples/workstation/defer/qspy200822_125414.seq index 95af979b..3a2d36db 100644 --- a/examples/workstation/defer/qspy200822_125414.seq +++ b/examples/workstation/defer/qspy200822_125414.seq @@ -1,69 +1,69 @@ --g NULL,l_QF_onClockTick,TServer_inst - - +-------+-------+ +-------+-------+ +-------+-------+ - | NULL | |l_QF_onClockTic| | TServer_inst | - +-------+-------+ +-------+-------+ +-------+-------+ -0421344062 | | (RcallA) -0449214751 *--NEW_REQUEST_SIG--+------------------>| -0449238814 | | -0465891274 | *--RECEIVED_SIG---->| -0465895819 | | -0499410577 | *--AUTHORIZED_SIG-->| -0499440178 | | (RcallA) -0499443614 | | -0511477274 *--NEW_REQUEST_SIG--+------------------>| -0511500846 | | -0518653861 *--NEW_REQUEST_SIG--+------------------>| -0518654563 | | (Defer) -0528148825 | *--RECEIVED_SIG---->| -0528153393 | | -0556260419 *--NEW_REQUEST_SIG--+------------------>| -0556261018 | | (Defer) -0561648511 | *--AUTHORIZED_SIG-->| -0561676172 | | *<=NEW_REQUEST_SIG] -0561676242 | | (RCall) -0561681030 | | -0561689067 | | -0561850142 *--NEW_REQUEST_SIG--+------------------>| -0561850610 | | (Defer) -0566995891 *--NEW_REQUEST_SIG--+------------------>| -0566996595 | | (Defer) -0571480518 *--NEW_REQUEST_SIG--+------------------>| -0571481220 | | (Defer) -0576505426 *--NEW_REQUEST_SIG--+------------------>| -0576506134 | | (Defer) -0578343375 | *--RECEIVED_SIG---->| -0578348116 | | -0586073163 *--NEW_REQUEST_SIG--+------------------>| -0586073863 | | (Defer) -0612016561 | *--AUTHORIZED_SIG-->| -0612043411 | | *<=NEW_REQUEST_SIG] -0612043481 | | (RCall) -0612047530 | | -0612055160 | | -0628711013 | *--RECEIVED_SIG---->| -0628715200 | | -0659812737 | *--AUTHORIZED_SIG-->| -0659840404 | | *<=NEW_REQUEST_SIG] -0659840476 | | (RCall) -0659845615 | | -0659853504 | | -0676564510 | *--RECEIVED_SIG---->| -0676569712 | | -0710012123 | *--AUTHORIZED_SIG-->| -0710038117 | | *<=NEW_REQUEST_SIG] -0710038192 | | (RCall) -0710042213 | | -0710047559 | | -0726923216 | *--RECEIVED_SIG---->| -0726928172 | | -0760432699 | *--AUTHORIZED_SIG-->| -0760459499 | | *<=NEW_REQUEST_SIG] -0760459575 | | (RCall) -0760463656 | | -0760469014 | | -0777123620 | *--RECEIVED_SIG---->| -0777128056 | | -0810634601 | *--AUTHORIZED_SIG-->| -0810660996 | | (RcallA) -0810665435 | | +-g NULL,l_QF_onClockTick,TServer_inst + + +-------+-------+ +-------+-------+ +-------+-------+ + | NULL | |l_QF_onClockTic| | TServer_inst | + +-------+-------+ +-------+-------+ +-------+-------+ +0421344062 | | (RcallA) +0449214751 *--NEW_REQUEST_SIG--+------------------>| +0449238814 | | +0465891274 | *--RECEIVED_SIG---->| +0465895819 | | +0499410577 | *--AUTHORIZED_SIG-->| +0499440178 | | (RcallA) +0499443614 | | +0511477274 *--NEW_REQUEST_SIG--+------------------>| +0511500846 | | +0518653861 *--NEW_REQUEST_SIG--+------------------>| +0518654563 | | (Defer) +0528148825 | *--RECEIVED_SIG---->| +0528153393 | | +0556260419 *--NEW_REQUEST_SIG--+------------------>| +0556261018 | | (Defer) +0561648511 | *--AUTHORIZED_SIG-->| +0561676172 | | *<=NEW_REQUEST_SIG] +0561676242 | | (RCall) +0561681030 | | +0561689067 | | +0561850142 *--NEW_REQUEST_SIG--+------------------>| +0561850610 | | (Defer) +0566995891 *--NEW_REQUEST_SIG--+------------------>| +0566996595 | | (Defer) +0571480518 *--NEW_REQUEST_SIG--+------------------>| +0571481220 | | (Defer) +0576505426 *--NEW_REQUEST_SIG--+------------------>| +0576506134 | | (Defer) +0578343375 | *--RECEIVED_SIG---->| +0578348116 | | +0586073163 *--NEW_REQUEST_SIG--+------------------>| +0586073863 | | (Defer) +0612016561 | *--AUTHORIZED_SIG-->| +0612043411 | | *<=NEW_REQUEST_SIG] +0612043481 | | (RCall) +0612047530 | | +0612055160 | | +0628711013 | *--RECEIVED_SIG---->| +0628715200 | | +0659812737 | *--AUTHORIZED_SIG-->| +0659840404 | | *<=NEW_REQUEST_SIG] +0659840476 | | (RCall) +0659845615 | | +0659853504 | | +0676564510 | *--RECEIVED_SIG---->| +0676569712 | | +0710012123 | *--AUTHORIZED_SIG-->| +0710038117 | | *<=NEW_REQUEST_SIG] +0710038192 | | (RCall) +0710042213 | | +0710047559 | | +0726923216 | *--RECEIVED_SIG---->| +0726928172 | | +0760432699 | *--AUTHORIZED_SIG-->| +0760459499 | | *<=NEW_REQUEST_SIG] +0760459575 | | (RCall) +0760463656 | | +0760469014 | | +0777123620 | *--RECEIVED_SIG---->| +0777128056 | | +0810634601 | *--AUTHORIZED_SIG-->| +0810660996 | | (RcallA) +0810665435 | | diff --git a/examples/workstation/dpp-comp/Makefile b/examples/workstation/dpp-comp/Makefile index 3d32104a..bfa44db7 100644 --- a/examples/workstation/dpp-comp/Makefile +++ b/examples/workstation/dpp-comp/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 7.0.0 -# Last updated on 2022-02-16 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -146,7 +146,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/dpp-comp/bsp.c b/examples/workstation/dpp-comp/bsp.c index 27125c71..5324b399 100644 --- a/examples/workstation/dpp-comp/bsp.c +++ b/examples/workstation/dpp-comp/bsp.c @@ -132,7 +132,7 @@ void QF_onCleanup(void) { } /*..........................................................................*/ void QF_onClockTick(void) { - QF_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ QS_RX_INPUT(); /* handle the QS-RX input */ QS_OUTPUT(); /* handle the QS output */ @@ -143,11 +143,11 @@ void QF_onClockTick(void) { break; } case 'p': { - QF_PUBLISH(Q_NEW(QEvt, PAUSE_SIG), &l_clock_tick); + QACTIVE_PUBLISH(Q_NEW(QEvt, PAUSE_SIG), &l_clock_tick); break; } case 's': { - QF_PUBLISH(Q_NEW(QEvt, SERVE_SIG), &l_clock_tick); + QACTIVE_PUBLISH(Q_NEW(QEvt, SERVE_SIG), &l_clock_tick); break; } default: { diff --git a/examples/workstation/dpp-comp/dpp-comp.qm b/examples/workstation/dpp-comp/dpp-comp.qm index 77641ad5..f9c733b3 100644 --- a/examples/workstation/dpp-comp/dpp-comp.qm +++ b/examples/workstation/dpp-comp/dpp-comp.qm @@ -1,9 +1,8 @@ - + Dining Philosopher Problem example with the "Orthogonal Component" state pattern (see https://state-machine.com/doc/Pattern_Orthogonal.pdf) The model demonstrates the following features: - 1. Partitioning the application into Container and Components 2. Packages for Container (Cont) and Components (Comp) 3. External packages with speparate QM-package model files diff --git a/examples/workstation/dpp-comp/dpp.h b/examples/workstation/dpp-comp/dpp.h index e8b38315..2ca321f8 100644 --- a/examples/workstation/dpp-comp/dpp.h +++ b/examples/workstation/dpp-comp/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp-comp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -36,8 +48,9 @@ enum { N_PHILO = 5 /* number of Philos */ }; -/*.$declare${Cont::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Cont::TableEvt} .......................................................*/ +/*$declare${Cont::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Cont::TableEvt} ........................................................*/ typedef struct { /* protected: */ QEvt super; @@ -45,17 +58,21 @@ typedef struct { /* public: */ uint8_t philoNum; } TableEvt; -/*.$enddecl${Cont::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Cont::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Cont::Table_ctor} .....................................................*/ -void Table_ctor(void); -/*.$enddecl${Cont::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Cont::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QActive * const AO_Table; -/*.$enddecl${Cont::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Cont::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Cont::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.$declare${Comp::CompTimeEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Comp::CompTimeEvt} ....................................................*/ +/*${Cont::Table_ctor} ......................................................*/ +void Table_ctor(void); +/*$enddecl${Cont::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Cont::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Cont::AO_Table} ........................................................*/ +extern QActive * const AO_Table; +/*$enddecl${Cont::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${Comp::CompTimeEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Comp::CompTimeEvt} .....................................................*/ typedef struct { /* protected: */ QTimeEvt super; @@ -65,19 +82,21 @@ typedef struct { } CompTimeEvt; /* public: */ -void CompTimeEvt_ctor( - CompTimeEvt * const me, +void CompTimeEvt_ctor(CompTimeEvt * const me, QActive * act, uint16_t num, enum_t const sig, uint_fast8_t const tickRate); -/*.$enddecl${Comp::CompTimeEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Comp::SM_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -extern QHsm * const SM_Philo[N_PHILO]; -/*.$enddecl${Comp::SM_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$declare${Comp::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Comp::Philo_ctor} .....................................................*/ -void Philo_ctor(uint8_t n); -/*.$enddecl${Comp::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Comp::CompTimeEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Comp::SM_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -#endif /* DPP_H */ \ No newline at end of file +/*${Comp::SM_Philo[N_PHILO]} ...............................................*/ +extern QHsm * const SM_Philo[N_PHILO]; +/*$enddecl${Comp::SM_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${Comp::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Comp::Philo_ctor} ......................................................*/ +void Philo_ctor(uint8_t n); +/*$enddecl${Comp::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +#endif /* DPP_H */ diff --git a/examples/workstation/dpp-comp/philo.c b/examples/workstation/dpp-comp/philo.c index 12b2aaae..f76021c0 100644 --- a/examples/workstation/dpp-comp/philo.c +++ b/examples/workstation/dpp-comp/philo.c @@ -1,29 +1,42 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp-comp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" //Q_DEFINE_THIS_FILE -/*.$declare${Comp::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Comp::Philo} ..........................................................*/ +/*$declare${Comp::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Comp::Philo} ...........................................................*/ typedef struct Philo { /* protected: */ QHsm super; @@ -40,7 +53,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${Comp::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Comp::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* helper macros to provide a randomized think time for Philos */ #define THINK_TIME \ @@ -49,17 +62,19 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + BSP_TICKS_PER_SEC) /* definition of the whole "Comp" package */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Comp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Comp::CompTimeEvt} ....................................................*/ -/*.${Comp::CompTimeEvt::ctor} ..............................................*/ -void CompTimeEvt_ctor( - CompTimeEvt * const me, +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Comp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Comp::CompTimeEvt} .....................................................*/ + +/*${Comp::CompTimeEvt::ctor} ...............................................*/ +void CompTimeEvt_ctor(CompTimeEvt * const me, QActive * act, uint16_t num, enum_t const sig, @@ -68,11 +83,13 @@ void CompTimeEvt_ctor( QTimeEvt_ctorX(&me->super, act, sig, tickRate); me->compNum = num; } -/*.${Comp::Philo} ..........................................................*/ + +/*${Comp::Philo} ...........................................................*/ Philo Philo_inst[N_PHILO]; -/*.${Comp::Philo::SM} ......................................................*/ + +/*${Comp::Philo::SM} .......................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${Comp::Philo::SM::initial} */ + /*${Comp::Philo::SM::initial} */ (void)par; /* unused parameter */ #ifdef Q_SPY @@ -95,28 +112,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { } return Q_TRAN(&Philo_thinking); } -/*.${Comp::Philo::SM::thinking} ............................................*/ + +/*${Comp::Philo::SM::thinking} .............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Comp::Philo::SM::thinking} */ + /*${Comp::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt.super, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::thinking} */ + /*${Comp::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt.super); status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::thinking::TIMEOUT} */ + /*${Comp::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${Comp::Philo::SM::thinking::TEST} */ + /*${Comp::Philo::SM::thinking::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -128,11 +146,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${Comp::Philo::SM::hungry} ..............................................*/ + +/*${Comp::Philo::SM::hungry} ...............................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Comp::Philo::SM::hungry} */ + /*${Comp::Philo::SM::hungry} */ case Q_ENTRY_SIG: { /* asynchronously post event to the Container */ TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); @@ -141,7 +160,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::hungry::EAT} */ + /*${Comp::Philo::SM::hungry::EAT} */ case EAT_SIG: { status_ = Q_TRAN(&Philo_eating); break; @@ -153,17 +172,18 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${Comp::Philo::SM::eating} ..............................................*/ + +/*${Comp::Philo::SM::eating} ...............................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Comp::Philo::SM::eating} */ + /*${Comp::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt.super, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::eating} */ + /*${Comp::Philo::SM::eating} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt.super); @@ -174,7 +194,7 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Comp::Philo::SM::eating::TIMEOUT} */ + /*${Comp::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; @@ -186,7 +206,8 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.${Comp::SM_Philo[N_PHILO]} ..............................................*/ + +/*${Comp::SM_Philo[N_PHILO]} ...............................................*/ QHsm * const SM_Philo[N_PHILO] = { /* opaque pointers to Philo instances */ &Philo_inst[0].super, &Philo_inst[1].super, @@ -194,10 +215,11 @@ QHsm * const SM_Philo[N_PHILO] = { /* opaque pointers to Philo instances */ &Philo_inst[3].super, &Philo_inst[4].super }; -/*.${Comp::Philo_ctor} .....................................................*/ + +/*${Comp::Philo_ctor} ......................................................*/ void Philo_ctor(uint8_t n) { Philo *me = &Philo_inst[n]; QHsm_ctor(&me->super, Q_STATE_CAST(&Philo_initial)); CompTimeEvt_ctor(&me->timeEvt, AO_Table, n, TIMEOUT_SIG, 0U); } -/*.$enddef${Comp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Comp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/dpp-comp/table.c b/examples/workstation/dpp-comp/table.c index 99a208f5..281aa8ac 100644 --- a/examples/workstation/dpp-comp/table.c +++ b/examples/workstation/dpp-comp/table.c @@ -1,29 +1,42 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp-comp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" Q_DEFINE_THIS_FILE -/*.$declare${Cont::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Cont::Table} ..........................................................*/ +/*$declare${Cont::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Cont::Table} ...........................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${Cont::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Cont::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -49,19 +62,21 @@ static QState Table_paused(Table * const me, QEvt const * const e); #define USED ((uint8_t)1) /* definition of the whole "Cont" package */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Cont} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Cont::TableEvt} .......................................................*/ -/*.${Cont::Table} ..........................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Cont} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Cont::Table} ...........................................................*/ Table Table_inst; -/*.${Cont::Table::SM} ......................................................*/ + +/*${Cont::Table::SM} .......................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${Cont::Table::SM::initial} */ + /*${Cont::Table::SM::initial} */ (void)par; /* unused parameter */ QS_OBJ_DICTIONARY(&Table_inst); @@ -84,24 +99,25 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${Cont::Table::SM::active} ..............................................*/ + +/*${Cont::Table::SM::active} ...............................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Cont::Table::SM::active::TIMEOUT} */ + /*${Cont::Table::SM::active::TIMEOUT} */ case TIMEOUT_SIG: { uint16_t n = Q_EVT_CAST(CompTimeEvt)->compNum; QHSM_DISPATCH(SM_Philo[n], e, QS_AP_ID + n); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::EAT} */ + /*${Cont::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::TEST} */ + /*${Cont::Table::SM::active::TEST} */ case TEST_SIG: { status_ = Q_HANDLED(); break; @@ -113,11 +129,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${Cont::Table::SM::active::serving} .....................................*/ + +/*${Cont::Table::SM::active::serving} ......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Cont::Table::SM::active::serving} */ + /*${Cont::Table::SM::active::serving} */ case Q_ENTRY_SIG: { for (uint8_t n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ if ((me->isHungry[n] != 0U) @@ -140,7 +157,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::serving::HUNGRY} */ + /*${Cont::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { /* find the index of the Philo from the event */ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; @@ -149,7 +166,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); uint8_t m = LEFT(n); - /*.${Cont::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${Cont::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { me->fork[m] = USED; me->fork[n] = USED; @@ -162,14 +179,14 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${Cont::Table::SM::active::serving::HUNGRY::[else]} */ + /*${Cont::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${Cont::Table::SM::active::serving::DONE} */ + /*${Cont::Table::SM::active::serving::DONE} */ case DONE_SIG: { /* find the index of the Philo from the event */ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; @@ -213,13 +230,13 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::serving::EAT} */ + /*${Cont::Table::SM::active::serving::EAT} */ case EAT_SIG: { Q_ERROR(); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::serving::PAUSE} */ + /*${Cont::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -231,28 +248,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${Cont::Table::SM::active::paused} ......................................*/ + +/*${Cont::Table::SM::active::paused} .......................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Cont::Table::SM::active::paused} */ + /*${Cont::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::paused} */ + /*${Cont::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::paused::SERVE} */ + /*${Cont::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${Cont::Table::SM::active::paused::HUNGRY} */ + /*${Cont::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { /* find the index of the Philo from the event */ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; @@ -264,7 +282,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Cont::Table::SM::active::paused::DONE} */ + /*${Cont::Table::SM::active::paused::DONE} */ case DONE_SIG: { /* find the index of the Philo from the event */ uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; @@ -288,9 +306,11 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.${Cont::AO_Table} .......................................................*/ + +/*${Cont::AO_Table} ........................................................*/ QActive * const AO_Table = &Table_inst.super; /* opaque pointer */ -/*.${Cont::Table_ctor} .....................................................*/ + +/*${Cont::Table_ctor} ......................................................*/ void Table_ctor(void) { Table *me = &Table_inst; QActive_ctor(&me->super, Q_STATE_CAST(&Table_initial)); @@ -301,4 +321,4 @@ void Table_ctor(void) { Philo_ctor(n); /* create the Philo component */ } } -/*.$enddef${Cont} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Cont} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/dpp/Makefile b/examples/workstation/dpp/Makefile index 0feec483..6f5b2de7 100644 --- a/examples/workstation/dpp/Makefile +++ b/examples/workstation/dpp/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -146,7 +146,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/dpp/bsp.c b/examples/workstation/dpp/bsp.c index 0428999f..7b8c7426 100644 --- a/examples/workstation/dpp/bsp.c +++ b/examples/workstation/dpp/bsp.c @@ -130,7 +130,7 @@ void QF_onCleanup(void) { } /*..........................................................................*/ void QF_onClockTick(void) { - QF_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ QS_RX_INPUT(); /* handle the QS-RX input */ QS_OUTPUT(); /* handle the QS output */ @@ -141,11 +141,11 @@ void QF_onClockTick(void) { break; } case 'p': { - QF_PUBLISH(Q_NEW(QEvt, PAUSE_SIG), &l_clock_tick); + QACTIVE_PUBLISH(Q_NEW(QEvt, PAUSE_SIG), &l_clock_tick); break; } case 's': { - QF_PUBLISH(Q_NEW(QEvt, SERVE_SIG), &l_clock_tick); + QACTIVE_PUBLISH(Q_NEW(QEvt, SERVE_SIG), &l_clock_tick); break; } default: { diff --git a/examples/workstation/dpp/dpp.h b/examples/workstation/dpp/dpp.h index 009bbe79..8540e613 100644 --- a/examples/workstation/dpp/dpp.h +++ b/examples/workstation/dpp/dpp.h @@ -1,21 +1,33 @@ -/*.$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::dpp.h} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef DPP_H #define DPP_H @@ -36,8 +48,9 @@ enum { N_PHILO = 5 /* number of Philos */ }; -/*.$declare${Shared} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::TableEvt} .....................................................*/ +/*$declare${Shared} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::TableEvt} ......................................................*/ typedef struct { /* protected: */ QEvt super; @@ -46,16 +59,20 @@ typedef struct { uint8_t philoNum; } TableEvt; +/*${Shared::AO_Philo[N_PHILO]} .............................................*/ /* opaque pointers to the Philo AOs */ extern QActive * const AO_Philo[N_PHILO]; +/*${Shared::AO_Table} ......................................................*/ /* opaque pointer to the Table AO */ extern QActive * const AO_Table; -/*.${Shared::Philo_ctor} ...................................................*/ + +/*${Shared::Philo_ctor} ....................................................*/ void Philo_ctor(uint8_t n); -/*.${Shared::Table_ctor} ...................................................*/ + +/*${Shared::Table_ctor} ....................................................*/ void Table_ctor(void); -/*.$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef QXK_H void Test1_ctor(void); @@ -65,3 +82,4 @@ void Table_ctor(void); #endif /* QXK_H */ #endif /* DPP_H */ + diff --git a/examples/workstation/dpp/dpp.qm b/examples/workstation/dpp/dpp.qm index 4aa1a59e..c363afa1 100644 --- a/examples/workstation/dpp/dpp.qm +++ b/examples/workstation/dpp/dpp.qm @@ -1,7 +1,6 @@ - - Dining Philosopher Problem example -NOTE: Requries QP5. + + Dining Philosopher Problem example @@ -144,7 +143,7 @@ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); @@ -223,7 +222,7 @@ for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -246,7 +245,7 @@ me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; -QF_PUBLISH(&pe->super, &me->super); +QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); @@ -288,7 +287,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -299,7 +298,7 @@ if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } diff --git a/examples/workstation/dpp/dpp.sln b/examples/workstation/dpp/dpp.sln index f5818052..aa11609f 100644 --- a/examples/workstation/dpp/dpp.sln +++ b/examples/workstation/dpp/dpp.sln @@ -1,42 +1,42 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpp", "dpp.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - QSpy|Win32 = QSpy|Win32 - QSpy|x64 = QSpy|x64 - QSpy64|Win32 = QSpy64|Win32 - QSpy64|x64 = QSpy64|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|x64.ActiveCfg = Debug|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|x64.Build.0 = Debug|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.Build.0 = QSpy|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|x64.ActiveCfg = QSpy|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|x64.Build.0 = QSpy|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|Win32.ActiveCfg = QSpy64|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|Win32.Build.0 = QSpy64|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|x64.ActiveCfg = QSpy64|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|x64.Build.0 = QSpy64|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.ActiveCfg = Release|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.Build.0 = Release|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|x64.ActiveCfg = Release|x64 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {81C44522-3086-4233-AE6E-002359F230DE} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpp", "dpp.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + QSpy|Win32 = QSpy|Win32 + QSpy|x64 = QSpy|x64 + QSpy64|Win32 = QSpy64|Win32 + QSpy64|x64 = QSpy64|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|x64.ActiveCfg = Debug|x64 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|x64.Build.0 = Debug|x64 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.ActiveCfg = QSpy|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.Build.0 = QSpy|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|x64.ActiveCfg = QSpy|x64 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|x64.Build.0 = QSpy|x64 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|Win32.ActiveCfg = QSpy64|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|Win32.Build.0 = QSpy64|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|x64.ActiveCfg = QSpy64|x64 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy64|x64.Build.0 = QSpy64|x64 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.ActiveCfg = Release|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.Build.0 = Release|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|x64.ActiveCfg = Release|x64 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {81C44522-3086-4233-AE6E-002359F230DE} + EndGlobalSection +EndGlobal diff --git a/examples/workstation/dpp/dpp.vcxproj b/examples/workstation/dpp/dpp.vcxproj index 578ed403..9aea05b0 100644 --- a/examples/workstation/dpp/dpp.vcxproj +++ b/examples/workstation/dpp/dpp.vcxproj @@ -1,365 +1,365 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - QSpy64 - Win32 - - - QSpy64 - x64 - - - QSpy - x64 - - - Release - Win32 - - - QSpy - Win32 - - - Release - x64 - - - - {8CC465F7-872E-4D03-B93C-1B64858B4E11} - dpp - Win32Proj - 10.0 - - - - Application - NotSet - v142 - - - Application - NotSet - v142 - - - Application - NotSet - v142 - - - Application - NotSet - v142 - - - Application - NotSet - true - v142 - - - Application - NotSet - true - v142 - - - Application - NotSet - v142 - - - Application - NotSet - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - QSpy64\ - $(Configuration)\ - QSpy64\ - true - true - true - true - - - QSpy64\ - QSpy64\ - - - - Disabled - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - Default - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - Default - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - MaxSpeed - true - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - true - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - MaxSpeed - true - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - true - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + QSpy64 + Win32 + + + QSpy64 + x64 + + + QSpy + x64 + + + Release + Win32 + + + QSpy + Win32 + + + Release + x64 + + + + {8CC465F7-872E-4D03-B93C-1B64858B4E11} + dpp + Win32Proj + 10.0 + + + + Application + NotSet + v142 + + + Application + NotSet + v142 + + + Application + NotSet + v142 + + + Application + NotSet + v142 + + + Application + NotSet + true + v142 + + + Application + NotSet + true + v142 + + + Application + NotSet + v142 + + + Application + NotSet + v142 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + false + $(SolutionDir)$(Configuration)\ + QSpy64\ + $(Configuration)\ + QSpy64\ + true + true + true + true + + + QSpy64\ + QSpy64\ + + + + Disabled + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + Default + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + Disabled + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + Default + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + MaxSpeed + true + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + true + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + MaxSpeed + true + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + true + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + Disabled + .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) + Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + Disabled + .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) + Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + Disabled + .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) + Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + Disabled + .;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories) + Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/workstation/dpp/dpp.vcxproj.filters b/examples/workstation/dpp/dpp.vcxproj.filters index 05c7af40..25668a2e 100644 --- a/examples/workstation/dpp/dpp.vcxproj.filters +++ b/examples/workstation/dpp/dpp.vcxproj.filters @@ -1,14 +1,14 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/workstation/dpp/philo.c b/examples/workstation/dpp/philo.c index f08b3ca8..04399bc2 100644 --- a/examples/workstation/dpp/philo.c +++ b/examples/workstation/dpp/philo.c @@ -1,21 +1,33 @@ -/*.$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::philo.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("philo") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ typedef struct Philo { /* protected: */ QActive super; @@ -41,7 +54,7 @@ static QState Philo_initial(Philo * const me, void const * const par); static QState Philo_thinking(Philo * const me, QEvt const * const e); static QState Philo_hungry(Philo * const me, QEvt const * const e); static QState Philo_eating(Philo * const me, QEvt const * const e); -/*.$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* helper macros to provide a randomized think time for Philos */ #define THINK_TIME \ @@ -53,16 +66,16 @@ static QState Philo_eating(Philo * const me, QEvt const * const e); #define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) /* Shared objects ----------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointers to the Philo AOs */ -/*.${Shared::AO_Philo[N_PHILO]} ............................................*/ +/*$define${Shared::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::AO_Philo[N_PHILO]} .............................................*/ QActive * const AO_Philo[N_PHILO] = { &Philo_inst[0].super, &Philo_inst[1].super, @@ -70,23 +83,26 @@ QActive * const AO_Philo[N_PHILO] = { &Philo_inst[3].super, &Philo_inst[4].super }; -/*.$enddef${Shared::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::Philo_ctor} ...................................................*/ +/*$enddef${Shared::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${Shared::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::Philo_ctor} ....................................................*/ void Philo_ctor(uint8_t n) { Philo *me = &Philo_inst[n]; QActive_ctor(&me->super, Q_STATE_CAST(&Philo_initial)); QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); } -/*.$enddef${Shared::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Shared::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* Philo definition --------------------------------------------------------*/ -/*.$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Philo} ...........................................................*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ Philo Philo_inst[N_PHILO]; -/*.${AOs::Philo::SM} .......................................................*/ + +/*${AOs::Philo::SM} ........................................................*/ static QState Philo_initial(Philo * const me, void const * const par) { - /*.${AOs::Philo::SM::initial} */ + /*${AOs::Philo::SM::initial} */ (void)par; /* unused parameter */ #ifdef Q_SPY @@ -112,28 +128,29 @@ static QState Philo_initial(Philo * const me, void const * const par) { } return Q_TRAN(&Philo_thinking); } -/*.${AOs::Philo::SM::thinking} .............................................*/ + +/*${AOs::Philo::SM::thinking} ..............................................*/ static QState Philo_thinking(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking} */ + /*${AOs::Philo::SM::thinking} */ case Q_EXIT_SIG: { QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::thinking::TIMEOUT} */ + /*${AOs::Philo::SM::thinking::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_hungry); break; } - /*.${AOs::Philo::SM::thinking::EAT, DONE} */ + /*${AOs::Philo::SM::thinking::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -148,11 +165,12 @@ static QState Philo_thinking(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::hungry} ...............................................*/ + +/*${AOs::Philo::SM::hungry} ................................................*/ static QState Philo_hungry(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::hungry} */ + /*${AOs::Philo::SM::hungry} */ case Q_ENTRY_SIG: { TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); pe->philoNum = PHILO_ID(me); @@ -160,9 +178,9 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::hungry::EAT} */ + /*${AOs::Philo::SM::hungry::EAT} */ case EAT_SIG: { - /*.${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { status_ = Q_TRAN(&Philo_eating); } @@ -171,7 +189,7 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } break; } - /*.${AOs::Philo::SM::hungry::DONE} */ + /*${AOs::Philo::SM::hungry::DONE} */ case DONE_SIG: { /* DONE must be for other Philos than this one */ Q_ASSERT_ID(20, Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); @@ -185,31 +203,32 @@ static QState Philo_hungry(Philo * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Philo::SM::eating} ...............................................*/ + +/*${AOs::Philo::SM::eating} ................................................*/ static QState Philo_eating(Philo * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_ENTRY_SIG: { QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating} */ + /*${AOs::Philo::SM::eating} */ case Q_EXIT_SIG: { TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); pe->philoNum = PHILO_ID(me); - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); QTimeEvt_disarm(&me->timeEvt); status_ = Q_HANDLED(); break; } - /*.${AOs::Philo::SM::eating::TIMEOUT} */ + /*${AOs::Philo::SM::eating::TIMEOUT} */ case TIMEOUT_SIG: { status_ = Q_TRAN(&Philo_thinking); break; } - /*.${AOs::Philo::SM::eating::EAT, DONE} */ + /*${AOs::Philo::SM::eating::EAT, DONE} */ case EAT_SIG: /* intentionally fall through */ case DONE_SIG: { /* EAT or DONE must be for other Philos than this one */ @@ -224,4 +243,4 @@ static QState Philo_eating(Philo * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/dpp/qview/qview-dpp.bat b/examples/workstation/dpp/qview/qview-dpp.bat index 3ac56aa6..b36e43d6 100644 --- a/examples/workstation/dpp/qview/qview-dpp.bat +++ b/examples/workstation/dpp/qview/qview-dpp.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp.py + +@endlocal diff --git a/examples/workstation/dpp/qview/qview-dpp1.bat b/examples/workstation/dpp/qview/qview-dpp1.bat index e4180394..8bdb9ce5 100644 --- a/examples/workstation/dpp/qview/qview-dpp1.bat +++ b/examples/workstation/dpp/qview/qview-dpp1.bat @@ -1,8 +1,8 @@ -@setlocal - -if "%QTOOLS%"=="" ( - set QTOOLS=C:\qp\qtools -) -python3 %QTOOLS%\qview\qview.py dpp1.py - -@endlocal +@setlocal + +if "%QTOOLS%"=="" ( + set QTOOLS=C:\qp\qtools +) +python3 %QTOOLS%\qview\qview.py dpp1.py + +@endlocal diff --git a/examples/workstation/dpp/table.c b/examples/workstation/dpp/table.c index 123ff384..ffe9c182 100644 --- a/examples/workstation/dpp/table.c +++ b/examples/workstation/dpp/table.c @@ -1,21 +1,33 @@ -/*.$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: dpp.qm * File: ${.::table.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "dpp.h" #include "bsp.h" @@ -23,8 +35,9 @@ Q_DEFINE_THIS_MODULE("table") /* Active object class -----------------------------------------------------*/ -/*.$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ typedef struct Table { /* protected: */ QActive super; @@ -42,7 +55,7 @@ static QState Table_initial(Table * const me, void const * const par); static QState Table_active(Table * const me, QEvt const * const e); static QState Table_serving(Table * const me, QEvt const * const e); static QState Table_paused(Table * const me, QEvt const * const e); -/*.$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) #define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) @@ -50,20 +63,21 @@ static QState Table_paused(Table * const me, QEvt const * const e); #define USED ((uint8_t)1) /* Shared objects ----------------------------------------------------------*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* opaque pointer to the Table AO */ -/*.${Shared::AO_Table} .....................................................*/ +/*$define${Shared::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::AO_Table} ......................................................*/ QActive * const AO_Table = &Table_inst.super; -/*.$enddef${Shared::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Shared::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Shared::Table_ctor} ...................................................*/ +/*$enddef${Shared::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${Shared::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Shared::Table_ctor} ....................................................*/ void Table_ctor(void) { Table *me = &Table_inst; @@ -74,15 +88,17 @@ void Table_ctor(void) { me->isHungry[n] = 0U; } } -/*.$enddef${Shared::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Shared::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*..........................................................................*/ -/*.$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${AOs::Table} ...........................................................*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ Table Table_inst; -/*.${AOs::Table::SM} .......................................................*/ + +/*${AOs::Table::SM} ........................................................*/ static QState Table_initial(Table * const me, void const * const par) { - /*.${AOs::Table::SM::initial} */ + /*${AOs::Table::SM::initial} */ (void)par; /* unused parameter */ QS_OBJ_DICTIONARY(&Table_inst); @@ -104,11 +120,12 @@ static QState Table_initial(Table * const me, void const * const par) { return Q_TRAN(&Table_serving); } -/*.${AOs::Table::SM::active} ...............................................*/ + +/*${AOs::Table::SM::active} ................................................*/ static QState Table_active(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::EAT} */ + /*${AOs::Table::SM::active::EAT} */ case EAT_SIG: { Q_ERROR_ID(60); status_ = Q_HANDLED(); @@ -121,11 +138,12 @@ static QState Table_active(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::serving} ......................................*/ + +/*${AOs::Table::SM::active::serving} .......................................*/ static QState Table_serving(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::serving} */ + /*${AOs::Table::SM::active::serving} */ case Q_ENTRY_SIG: { uint8_t n; for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ @@ -139,7 +157,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->fork[n] = USED; te = Q_NEW(TableEvt, EAT_SIG); te->philoNum = n; - QF_PUBLISH(&te->super, &me->super); + QACTIVE_PUBLISH(&te->super, &me->super); me->isHungry[n] = 0U; BSP_displayPhilStat(n, "eating "); } @@ -147,7 +165,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::HUNGRY} */ + /*${AOs::Table::SM::active::serving::HUNGRY} */ case HUNGRY_SIG: { uint8_t n, m; @@ -157,25 +175,25 @@ static QState Table_serving(Table * const me, QEvt const * const e) { BSP_displayPhilStat(n, "hungry "); m = LEFT(n); - /*.${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { TableEvt *pe; me->fork[m] = USED; me->fork[n] = USED; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = n; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(n, "eating "); status_ = Q_HANDLED(); } - /*.${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ else { me->isHungry[n] = 1U; status_ = Q_HANDLED(); } break; } - /*.${AOs::Table::SM::active::serving::DONE} */ + /*${AOs::Table::SM::active::serving::DONE} */ case DONE_SIG: { uint8_t n, m; TableEvt *pe; @@ -199,7 +217,7 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } m = LEFT(n); /* check the left neighbor */ @@ -210,13 +228,13 @@ static QState Table_serving(Table * const me, QEvt const * const e) { me->isHungry[m] = 0U; pe = Q_NEW(TableEvt, EAT_SIG); pe->philoNum = m; - QF_PUBLISH(&pe->super, &me->super); + QACTIVE_PUBLISH(&pe->super, &me->super); BSP_displayPhilStat(m, "eating "); } status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::serving::PAUSE} */ + /*${AOs::Table::SM::active::serving::PAUSE} */ case PAUSE_SIG: { status_ = Q_TRAN(&Table_paused); break; @@ -228,28 +246,29 @@ static QState Table_serving(Table * const me, QEvt const * const e) { } return status_; } -/*.${AOs::Table::SM::active::paused} .......................................*/ + +/*${AOs::Table::SM::active::paused} ........................................*/ static QState Table_paused(Table * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_ENTRY_SIG: { BSP_displayPaused(1U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused} */ + /*${AOs::Table::SM::active::paused} */ case Q_EXIT_SIG: { BSP_displayPaused(0U); status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::SERVE} */ + /*${AOs::Table::SM::active::paused::SERVE} */ case SERVE_SIG: { status_ = Q_TRAN(&Table_serving); break; } - /*.${AOs::Table::SM::active::paused::HUNGRY} */ + /*${AOs::Table::SM::active::paused::HUNGRY} */ case HUNGRY_SIG: { uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; /* philo ID must be in range and he must be not hungry */ @@ -259,7 +278,7 @@ static QState Table_paused(Table * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${AOs::Table::SM::active::paused::DONE} */ + /*${AOs::Table::SM::active::paused::DONE} */ case DONE_SIG: { uint8_t n, m; @@ -284,4 +303,4 @@ static QState Table_paused(Table * const me, QEvt const * const e) { } return status_; } -/*.$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/history_qhsm/Makefile b/examples/workstation/history_qhsm/Makefile index 81e432cb..aeaaac0d 100644 --- a/examples/workstation/history_qhsm/Makefile +++ b/examples/workstation/history_qhsm/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -144,7 +144,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/history_qhsm/history.c b/examples/workstation/history_qhsm/history.c index ab55de26..4ea3a048 100644 --- a/examples/workstation/history_qhsm/history.c +++ b/examples/workstation/history_qhsm/history.c @@ -1,21 +1,33 @@ -/*.$file${.::history.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::history.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: history.qm * File: ${.::history.c} * -* This code has been generated by QM 5.1.4 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::history.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::history.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "history.h" @@ -24,8 +36,9 @@ //Q_DEFINE_THIS_FILE -/*.$declare${SMs::ToastOven} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::ToastOven} .......................................................*/ +/*$declare${SMs::ToastOven} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::ToastOven} ........................................................*/ typedef struct { /* protected: */ QHsm super; @@ -44,48 +57,53 @@ static QState ToastOven_baking(ToastOven * const me, QEvt const * const e); static QState ToastOven_off(ToastOven * const me, QEvt const * const e); static QState ToastOven_doorOpen(ToastOven * const me, QEvt const * const e); static QState ToastOven_final(ToastOven * const me, QEvt const * const e); -/*.$enddecl${SMs::ToastOven} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::ToastOven} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ static ToastOven l_oven; /* the only instance of the ToastOven class */ /* global-scope definitions -----------------------------------------*/ QHsm * const the_oven = &l_oven.super; /* the opaque pointer */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::ToastOven_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::ToastOven_ctor} ..................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${SMs::ToastOven_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::ToastOven_ctor} ...................................................*/ void ToastOven_ctor(void) { ToastOven *me = &l_oven; QHsm_ctor(&me->super, Q_STATE_CAST(&ToastOven_initial)); } -/*.$enddef${SMs::ToastOven_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::ToastOven} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::ToastOven} .......................................................*/ -/*.${SMs::ToastOven::SM} ...................................................*/ +/*$enddef${SMs::ToastOven_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::ToastOven} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::ToastOven} ........................................................*/ + +/*${SMs::ToastOven::SM} ....................................................*/ static QState ToastOven_initial(ToastOven * const me, void const * const par) { - /*.${SMs::ToastOven::SM::initial} */ + /*${SMs::ToastOven::SM::initial} */ (void)par; /* unused parameter */ /* state history attributes */ me->hist_doorClosed = Q_STATE_CAST(&ToastOven_off); me->hist_heating = Q_STATE_CAST(&ToastOven_baking); return Q_TRAN(&ToastOven_doorClosed); } -/*.${SMs::ToastOven::SM::doorClosed} .......................................*/ + +/*${SMs::ToastOven::SM::doorClosed} ........................................*/ static QState ToastOven_doorClosed(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::ToastOven::SM::doorClosed} */ + /*${SMs::ToastOven::SM::doorClosed} */ case Q_ENTRY_SIG: { PRINTF_S("%s;", "door-Closed"); status_ = Q_HANDLED(); break; } - /*.${SMs::ToastOven::SM::doorClosed} */ + /*${SMs::ToastOven::SM::doorClosed} */ case Q_EXIT_SIG: { /* save shallow history */ me->hist_doorClosed = @@ -94,32 +112,32 @@ static QState ToastOven_doorClosed(ToastOven * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${SMs::ToastOven::SM::doorClosed::initial} */ + /*${SMs::ToastOven::SM::doorClosed::initial} */ case Q_INIT_SIG: { status_ = Q_TRAN(&ToastOven_off); break; } - /*.${SMs::ToastOven::SM::doorClosed::TERMINATE} */ + /*${SMs::ToastOven::SM::doorClosed::TERMINATE} */ case TERMINATE_SIG: { status_ = Q_TRAN(&ToastOven_final); break; } - /*.${SMs::ToastOven::SM::doorClosed::OPEN} */ + /*${SMs::ToastOven::SM::doorClosed::OPEN} */ case OPEN_SIG: { status_ = Q_TRAN(&ToastOven_doorOpen); break; } - /*.${SMs::ToastOven::SM::doorClosed::TOAST} */ + /*${SMs::ToastOven::SM::doorClosed::TOAST} */ case TOAST_SIG: { status_ = Q_TRAN(&ToastOven_toasting); break; } - /*.${SMs::ToastOven::SM::doorClosed::BAKE} */ + /*${SMs::ToastOven::SM::doorClosed::BAKE} */ case BAKE_SIG: { status_ = Q_TRAN(&ToastOven_baking); break; } - /*.${SMs::ToastOven::SM::doorClosed::OFF} */ + /*${SMs::ToastOven::SM::doorClosed::OFF} */ case OFF_SIG: { status_ = Q_TRAN(&ToastOven_off); break; @@ -131,17 +149,18 @@ static QState ToastOven_doorClosed(ToastOven * const me, QEvt const * const e) { } return status_; } -/*.${SMs::ToastOven::SM::doorClosed::heating} ..............................*/ + +/*${SMs::ToastOven::SM::doorClosed::heating} ...............................*/ static QState ToastOven_heating(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::ToastOven::SM::doorClosed::heating} */ + /*${SMs::ToastOven::SM::doorClosed::heating} */ case Q_ENTRY_SIG: { PRINTF_S("%s;", "heater-On"); status_ = Q_HANDLED(); break; } - /*.${SMs::ToastOven::SM::doorClosed::heating} */ + /*${SMs::ToastOven::SM::doorClosed::heating} */ case Q_EXIT_SIG: { PRINTF_S("%s;", "heater-Off"); /* save deep history */ @@ -149,7 +168,7 @@ static QState ToastOven_heating(ToastOven * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${SMs::ToastOven::SM::doorClosed::heating::initial} */ + /*${SMs::ToastOven::SM::doorClosed::heating::initial} */ case Q_INIT_SIG: { status_ = Q_TRAN(&ToastOven_toasting); break; @@ -161,11 +180,12 @@ static QState ToastOven_heating(ToastOven * const me, QEvt const * const e) { } return status_; } -/*.${SMs::ToastOven::SM::doorClosed::heating::toasting} ....................*/ + +/*${SMs::ToastOven::SM::doorClosed::heating::toasting} .....................*/ static QState ToastOven_toasting(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::ToastOven::SM::doorClosed::heating::toasting} */ + /*${SMs::ToastOven::SM::doorClosed::heating::toasting} */ case Q_ENTRY_SIG: { PRINTF_S("%s;", "toasting"); status_ = Q_HANDLED(); @@ -178,11 +198,12 @@ static QState ToastOven_toasting(ToastOven * const me, QEvt const * const e) { } return status_; } -/*.${SMs::ToastOven::SM::doorClosed::heating::baking} ......................*/ + +/*${SMs::ToastOven::SM::doorClosed::heating::baking} .......................*/ static QState ToastOven_baking(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::ToastOven::SM::doorClosed::heating::baking} */ + /*${SMs::ToastOven::SM::doorClosed::heating::baking} */ case Q_ENTRY_SIG: { PRINTF_S("%s;", "baking"); status_ = Q_HANDLED(); @@ -195,11 +216,12 @@ static QState ToastOven_baking(ToastOven * const me, QEvt const * const e) { } return status_; } -/*.${SMs::ToastOven::SM::doorClosed::off} ..................................*/ + +/*${SMs::ToastOven::SM::doorClosed::off} ...................................*/ static QState ToastOven_off(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::ToastOven::SM::doorClosed::off} */ + /*${SMs::ToastOven::SM::doorClosed::off} */ case Q_ENTRY_SIG: { PRINTF_S("%s;", "toaster-Off"); status_ = Q_HANDLED(); @@ -212,33 +234,34 @@ static QState ToastOven_off(ToastOven * const me, QEvt const * const e) { } return status_; } -/*.${SMs::ToastOven::SM::doorOpen} .........................................*/ + +/*${SMs::ToastOven::SM::doorOpen} ..........................................*/ static QState ToastOven_doorOpen(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::ToastOven::SM::doorOpen} */ + /*${SMs::ToastOven::SM::doorOpen} */ case Q_ENTRY_SIG: { PRINTF_S("%s;", "door-Open,lamp-On"); status_ = Q_HANDLED(); break; } - /*.${SMs::ToastOven::SM::doorOpen} */ + /*${SMs::ToastOven::SM::doorOpen} */ case Q_EXIT_SIG: { PRINTF_S("%s;", "lamp-Off"); status_ = Q_HANDLED(); break; } - /*.${SMs::ToastOven::SM::doorOpen::CLOSE} */ + /*${SMs::ToastOven::SM::doorOpen::CLOSE} */ case CLOSE_SIG: { status_ = Q_TRAN_HIST(me->hist_heating); break; } - /*.${SMs::ToastOven::SM::doorOpen::TERMINATE} */ + /*${SMs::ToastOven::SM::doorOpen::TERMINATE} */ case TERMINATE_SIG: { status_ = Q_TRAN(&ToastOven_final); break; } - /*.${SMs::ToastOven::SM::doorOpen::OFF} */ + /*${SMs::ToastOven::SM::doorOpen::OFF} */ case OFF_SIG: { status_ = Q_TRAN_HIST(me->hist_doorClosed); break; @@ -250,11 +273,12 @@ static QState ToastOven_doorOpen(ToastOven * const me, QEvt const * const e) { } return status_; } -/*.${SMs::ToastOven::SM::final} ............................................*/ + +/*${SMs::ToastOven::SM::final} .............................................*/ static QState ToastOven_final(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::ToastOven::SM::final} */ + /*${SMs::ToastOven::SM::final} */ case Q_ENTRY_SIG: { PRINTF_S("\n%s\n", "Bye! Bye!"); QF_onCleanup(); @@ -269,4 +293,4 @@ static QState ToastOven_final(ToastOven * const me, QEvt const * const e) { } return status_; } -/*.$enddef${SMs::ToastOven} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${SMs::ToastOven} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/history_qhsm/history.h b/examples/workstation/history_qhsm/history.h index 6cb8d376..3a6bfd0d 100644 --- a/examples/workstation/history_qhsm/history.h +++ b/examples/workstation/history_qhsm/history.h @@ -1,21 +1,33 @@ -/*.$file${.::history.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::history.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: history.qm * File: ${.::history.h} * -* This code has been generated by QM 5.1.4 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::history.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::history.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef HISTORY_H #define HISTORY_H @@ -30,9 +42,11 @@ enum ToastOvenSignals { extern QHsm * const the_oven; /* opaque pointer to the oven HSM */ -/*.$declare${SMs::ToastOven_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::ToastOven_ctor} ..................................................*/ +/*$declare${SMs::ToastOven_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::ToastOven_ctor} ...................................................*/ void ToastOven_ctor(void); -/*.$enddecl${SMs::ToastOven_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::ToastOven_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* HISTORY_H */ + diff --git a/examples/workstation/history_qhsm/history.qm b/examples/workstation/history_qhsm/history.qm index 51158383..38ccc54d 100644 --- a/examples/workstation/history_qhsm/history.qm +++ b/examples/workstation/history_qhsm/history.qm @@ -1,6 +1,6 @@ - - QHsmTst is a contrived state machine from Chapter 2 of the PSiCC2 book for testing all possible transition topologies with up to 4-levels of state nesting. + + Demonstration of transitions to history and deep history in QHsm-style state machines. diff --git a/examples/workstation/history_qmsm/Makefile b/examples/workstation/history_qmsm/Makefile index 0cd36a8b..41e3c0f8 100644 --- a/examples/workstation/history_qmsm/Makefile +++ b/examples/workstation/history_qmsm/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -144,7 +144,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/history_qmsm/history.c b/examples/workstation/history_qmsm/history.c index dca97c6e..c618d8f9 100644 --- a/examples/workstation/history_qmsm/history.c +++ b/examples/workstation/history_qmsm/history.c @@ -1,23 +1,40 @@ -/*.$file${.::history.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::history.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: history.qm * File: ${.::history.c} * -* This code has been generated by QM 5.1.4 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * * This code is covered by the following QP license: -* License # : QPC-EVAL -* Issued to : Institution or an individual evaluating the QP/C framework -* Framework(s): qpc -* Support ends: 2022-12-31 -* Product(s) : -* This license is available only for evaluation purposes and -* the generated code is still licensed under the terms of GPL. -* Please submit request for extension of the evaluation period at: -* +* License # : QM-EVAL-QPC +* Issued to : Users of QP/C Real-Time Embedded Framework (RTEF) +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is free software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::history.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::history.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "history.h" @@ -26,8 +43,9 @@ //Q_DEFINE_THIS_FILE -/*.$declare${SMs::ToastOven} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::ToastOven} .......................................................*/ +/*$declare${SMs::ToastOven} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::ToastOven} ........................................................*/ typedef struct { /* protected: */ QMsm super; @@ -107,29 +125,33 @@ static QMState const ToastOven_final_s = { Q_ACTION_NULL, /* no exit action */ Q_ACTION_NULL /* no initial tran. */ }; -/*.$enddecl${SMs::ToastOven} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::ToastOven} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ static ToastOven l_oven; /* the only instance of the ToastOven class */ /* global-scope definitions -----------------------------------------*/ QHsm * const the_oven = &l_oven.super.super; /* the opaque pointer */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::ToastOven_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::ToastOven_ctor} ..................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${SMs::ToastOven_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::ToastOven_ctor} ...................................................*/ void ToastOven_ctor(void) { ToastOven *me = &l_oven; QMsm_ctor(&me->super, Q_STATE_CAST(&ToastOven_initial)); } -/*.$enddef${SMs::ToastOven_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::ToastOven} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::ToastOven} .......................................................*/ -/*.${SMs::ToastOven::SM} ...................................................*/ +/*$enddef${SMs::ToastOven_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::ToastOven} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::ToastOven} ........................................................*/ + +/*${SMs::ToastOven::SM} ....................................................*/ static QState ToastOven_initial(ToastOven * const me, void const * const par) { static struct { QMState const *target; @@ -142,28 +164,29 @@ static QState ToastOven_initial(ToastOven * const me, void const * const par) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::ToastOven::SM::initial} */ + /*${SMs::ToastOven::SM::initial} */ (void)par; /* unused parameter */ /* state history attributes */ me->hist_doorClosed = &ToastOven_off_s; me->hist_heating = &ToastOven_baking_s; return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::ToastOven::SM::doorClosed} .......................................*/ -/*.${SMs::ToastOven::SM::doorClosed} */ + +/*${SMs::ToastOven::SM::doorClosed} ........................................*/ +/*${SMs::ToastOven::SM::doorClosed} */ static QState ToastOven_doorClosed_e(ToastOven * const me) { PRINTF_S("%s;", "door-Closed"); (void)me; /* unused parameter */ return QM_ENTRY(&ToastOven_doorClosed_s); } -/*.${SMs::ToastOven::SM::doorClosed} */ +/*${SMs::ToastOven::SM::doorClosed} */ static QState ToastOven_doorClosed_x(ToastOven * const me) { /* save shallow history */ me->hist_doorClosed = QMsm_childStateObj(Q_HSM_UPCAST(me), &ToastOven_doorClosed_s); return QM_EXIT(&ToastOven_doorClosed_s); } -/*.${SMs::ToastOven::SM::doorClosed::initial} */ +/*${SMs::ToastOven::SM::doorClosed::initial} */ static QState ToastOven_doorClosed_i(ToastOven * const me) { static struct { QMState const *target; @@ -175,14 +198,14 @@ static QState ToastOven_doorClosed_i(ToastOven * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::ToastOven::SM::doorClosed::initial} */ + /*${SMs::ToastOven::SM::doorClosed::initial} */ return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::ToastOven::SM::doorClosed} */ +/*${SMs::ToastOven::SM::doorClosed} */ static QState ToastOven_doorClosed(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::ToastOven::SM::doorClosed::TERMINATE} */ + /*${SMs::ToastOven::SM::doorClosed::TERMINATE} */ case TERMINATE_SIG: { static struct { QMState const *target; @@ -198,7 +221,7 @@ static QState ToastOven_doorClosed(ToastOven * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::ToastOven::SM::doorClosed::OPEN} */ + /*${SMs::ToastOven::SM::doorClosed::OPEN} */ case OPEN_SIG: { static struct { QMState const *target; @@ -214,7 +237,7 @@ static QState ToastOven_doorClosed(ToastOven * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::ToastOven::SM::doorClosed::TOAST} */ + /*${SMs::ToastOven::SM::doorClosed::TOAST} */ case TOAST_SIG: { static struct { QMState const *target; @@ -230,7 +253,7 @@ static QState ToastOven_doorClosed(ToastOven * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::ToastOven::SM::doorClosed::BAKE} */ + /*${SMs::ToastOven::SM::doorClosed::BAKE} */ case BAKE_SIG: { static struct { QMState const *target; @@ -246,7 +269,7 @@ static QState ToastOven_doorClosed(ToastOven * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::ToastOven::SM::doorClosed::OFF} */ + /*${SMs::ToastOven::SM::doorClosed::OFF} */ case OFF_SIG: { static struct { QMState const *target; @@ -268,21 +291,22 @@ static QState ToastOven_doorClosed(ToastOven * const me, QEvt const * const e) { } return status_; } -/*.${SMs::ToastOven::SM::doorClosed::heating} ..............................*/ -/*.${SMs::ToastOven::SM::doorClosed::heating} */ + +/*${SMs::ToastOven::SM::doorClosed::heating} ...............................*/ +/*${SMs::ToastOven::SM::doorClosed::heating} */ static QState ToastOven_heating_e(ToastOven * const me) { PRINTF_S("%s;", "heater-On"); (void)me; /* unused parameter */ return QM_ENTRY(&ToastOven_heating_s); } -/*.${SMs::ToastOven::SM::doorClosed::heating} */ +/*${SMs::ToastOven::SM::doorClosed::heating} */ static QState ToastOven_heating_x(ToastOven * const me) { PRINTF_S("%s;", "heater-Off"); /* save deep history */ me->hist_heating = QMsm_stateObj(Q_HSM_UPCAST(me)); return QM_EXIT(&ToastOven_heating_s); } -/*.${SMs::ToastOven::SM::doorClosed::heating::initial} */ +/*${SMs::ToastOven::SM::doorClosed::heating::initial} */ static QState ToastOven_heating_i(ToastOven * const me) { static struct { QMState const *target; @@ -294,10 +318,10 @@ static QState ToastOven_heating_i(ToastOven * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::ToastOven::SM::doorClosed::heating::initial} */ + /*${SMs::ToastOven::SM::doorClosed::heating::initial} */ return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::ToastOven::SM::doorClosed::heating} */ +/*${SMs::ToastOven::SM::doorClosed::heating} */ static QState ToastOven_heating(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { @@ -309,14 +333,15 @@ static QState ToastOven_heating(ToastOven * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::ToastOven::SM::doorClosed::heating::toasting} ....................*/ -/*.${SMs::ToastOven::SM::doorClosed::heating::toasting} */ + +/*${SMs::ToastOven::SM::doorClosed::heating::toasting} .....................*/ +/*${SMs::ToastOven::SM::doorClosed::heating::toasting} */ static QState ToastOven_toasting_e(ToastOven * const me) { PRINTF_S("%s;", "toasting"); (void)me; /* unused parameter */ return QM_ENTRY(&ToastOven_toasting_s); } -/*.${SMs::ToastOven::SM::doorClosed::heating::toasting} */ +/*${SMs::ToastOven::SM::doorClosed::heating::toasting} */ static QState ToastOven_toasting(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { @@ -328,14 +353,15 @@ static QState ToastOven_toasting(ToastOven * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::ToastOven::SM::doorClosed::heating::baking} ......................*/ -/*.${SMs::ToastOven::SM::doorClosed::heating::baking} */ + +/*${SMs::ToastOven::SM::doorClosed::heating::baking} .......................*/ +/*${SMs::ToastOven::SM::doorClosed::heating::baking} */ static QState ToastOven_baking_e(ToastOven * const me) { PRINTF_S("%s;", "baking"); (void)me; /* unused parameter */ return QM_ENTRY(&ToastOven_baking_s); } -/*.${SMs::ToastOven::SM::doorClosed::heating::baking} */ +/*${SMs::ToastOven::SM::doorClosed::heating::baking} */ static QState ToastOven_baking(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { @@ -347,14 +373,15 @@ static QState ToastOven_baking(ToastOven * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::ToastOven::SM::doorClosed::off} ..................................*/ -/*.${SMs::ToastOven::SM::doorClosed::off} */ + +/*${SMs::ToastOven::SM::doorClosed::off} ...................................*/ +/*${SMs::ToastOven::SM::doorClosed::off} */ static QState ToastOven_off_e(ToastOven * const me) { PRINTF_S("%s;", "toaster-Off"); (void)me; /* unused parameter */ return QM_ENTRY(&ToastOven_off_s); } -/*.${SMs::ToastOven::SM::doorClosed::off} */ +/*${SMs::ToastOven::SM::doorClosed::off} */ static QState ToastOven_off(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { @@ -366,24 +393,25 @@ static QState ToastOven_off(ToastOven * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::ToastOven::SM::doorOpen} .........................................*/ -/*.${SMs::ToastOven::SM::doorOpen} */ + +/*${SMs::ToastOven::SM::doorOpen} ..........................................*/ +/*${SMs::ToastOven::SM::doorOpen} */ static QState ToastOven_doorOpen_e(ToastOven * const me) { PRINTF_S("%s;", "door-Open,lamp-On"); (void)me; /* unused parameter */ return QM_ENTRY(&ToastOven_doorOpen_s); } -/*.${SMs::ToastOven::SM::doorOpen} */ +/*${SMs::ToastOven::SM::doorOpen} */ static QState ToastOven_doorOpen_x(ToastOven * const me) { PRINTF_S("%s;", "lamp-Off"); (void)me; /* unused parameter */ return QM_EXIT(&ToastOven_doorOpen_s); } -/*.${SMs::ToastOven::SM::doorOpen} */ +/*${SMs::ToastOven::SM::doorOpen} */ static QState ToastOven_doorOpen(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::ToastOven::SM::doorOpen::CLOSE} */ + /*${SMs::ToastOven::SM::doorOpen::CLOSE} */ case CLOSE_SIG: { static struct { QMState const *target; @@ -400,7 +428,7 @@ static QState ToastOven_doorOpen(ToastOven * const me, QEvt const * const e) { status_ = QM_TRAN_HIST(me->hist_heating, &tatbl_); break; } - /*.${SMs::ToastOven::SM::doorOpen::TERMINATE} */ + /*${SMs::ToastOven::SM::doorOpen::TERMINATE} */ case TERMINATE_SIG: { static struct { QMState const *target; @@ -416,7 +444,7 @@ static QState ToastOven_doorOpen(ToastOven * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::ToastOven::SM::doorOpen::OFF} */ + /*${SMs::ToastOven::SM::doorOpen::OFF} */ case OFF_SIG: { static struct { QMState const *target; @@ -439,8 +467,9 @@ static QState ToastOven_doorOpen(ToastOven * const me, QEvt const * const e) { } return status_; } -/*.${SMs::ToastOven::SM::final} ............................................*/ -/*.${SMs::ToastOven::SM::final} */ + +/*${SMs::ToastOven::SM::final} .............................................*/ +/*${SMs::ToastOven::SM::final} */ static QState ToastOven_final_e(ToastOven * const me) { PRINTF_S("\n%s\n", "Bye! Bye!"); QF_onCleanup(); @@ -448,7 +477,7 @@ static QState ToastOven_final_e(ToastOven * const me) { (void)me; /* unused parameter */ return QM_ENTRY(&ToastOven_final_s); } -/*.${SMs::ToastOven::SM::final} */ +/*${SMs::ToastOven::SM::final} */ static QState ToastOven_final(ToastOven * const me, QEvt const * const e) { QState status_; switch (e->sig) { @@ -460,4 +489,4 @@ static QState ToastOven_final(ToastOven * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.$enddef${SMs::ToastOven} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${SMs::ToastOven} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/workstation/history_qmsm/history.h b/examples/workstation/history_qmsm/history.h index c85e041f..e64f7d6d 100644 --- a/examples/workstation/history_qmsm/history.h +++ b/examples/workstation/history_qmsm/history.h @@ -1,23 +1,40 @@ -/*.$file${.::history.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::history.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: history.qm * File: ${.::history.h} * -* This code has been generated by QM 5.1.4 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * * This code is covered by the following QP license: -* License # : QPC-EVAL -* Issued to : Institution or an individual evaluating the QP/C framework -* Framework(s): qpc -* Support ends: 2022-12-31 -* Product(s) : -* This license is available only for evaluation purposes and -* the generated code is still licensed under the terms of GPL. -* Please submit request for extension of the evaluation period at: -* +* License # : QM-EVAL-QPC +* Issued to : Users of QP/C Real-Time Embedded Framework (RTEF) +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is free software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::history.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::history.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef HISTORY_H #define HISTORY_H @@ -32,9 +49,11 @@ enum ToastOvenSignals { extern QHsm * const the_oven; /* opaque pointer to the oven HSM */ -/*.$declare${SMs::ToastOven_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::ToastOven_ctor} ..................................................*/ +/*$declare${SMs::ToastOven_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::ToastOven_ctor} ...................................................*/ void ToastOven_ctor(void); -/*.$enddecl${SMs::ToastOven_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::ToastOven_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* HISTORY_H */ + diff --git a/examples/workstation/history_qmsm/history.qm b/examples/workstation/history_qmsm/history.qm index 0091f481..59f75ecf 100644 --- a/examples/workstation/history_qmsm/history.qm +++ b/examples/workstation/history_qmsm/history.qm @@ -1,8 +1,8 @@ - - QHsmTst is a contrived state machine from Chapter 2 of the PSiCC2 book for testing all possible transition topologies with up to 4-levels of state nesting. + + Demonstration of transitions to shallow history and deep history in QMsm-style state machines. - + diff --git a/examples/workstation/qhsmtst/Makefile b/examples/workstation/qhsmtst/Makefile index 9e886010..328d752c 100644 --- a/examples/workstation/qhsmtst/Makefile +++ b/examples/workstation/qhsmtst/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.4.0 -# Last updated on 2019-01-09 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -144,7 +144,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/qhsmtst/log.txt b/examples/workstation/qhsmtst/log.txt index 8fdbd06d..564b4d46 100644 --- a/examples/workstation/qhsmtst/log.txt +++ b/examples/workstation/qhsmtst/log.txt @@ -1,4 +1,4 @@ -QHsmTst example, QP 6.9.1 +QHsmTst example, QP 7.0.1 top-INIT;s-ENTRY;s2-ENTRY;s2-INIT;s21-ENTRY;s211-ENTRY; A:s21-A;s211-EXIT;s21-EXIT;s21-ENTRY;s21-INIT;s211-ENTRY; B:s21-B;s211-EXIT;s211-ENTRY; diff --git a/examples/workstation/qhsmtst/log1.txt b/examples/workstation/qhsmtst/log1.txt new file mode 100644 index 00000000..564b4d46 --- /dev/null +++ b/examples/workstation/qhsmtst/log1.txt @@ -0,0 +1,23 @@ +QHsmTst example, QP 7.0.1 +top-INIT;s-ENTRY;s2-ENTRY;s2-INIT;s21-ENTRY;s211-ENTRY; +A:s21-A;s211-EXIT;s21-EXIT;s21-ENTRY;s21-INIT;s211-ENTRY; +B:s21-B;s211-EXIT;s211-ENTRY; +D:s211-D;s211-EXIT;s21-INIT;s211-ENTRY; +E:s-E;s211-EXIT;s21-EXIT;s2-EXIT;s1-ENTRY;s11-ENTRY; +I:s1-I; +F:s1-F;s11-EXIT;s1-EXIT;s2-ENTRY;s21-ENTRY;s211-ENTRY; +I:s2-I; +I:s-I; +F:s2-F;s211-EXIT;s21-EXIT;s2-EXIT;s1-ENTRY;s11-ENTRY; +A:s1-A;s11-EXIT;s1-EXIT;s1-ENTRY;s1-INIT;s11-ENTRY; +B:s1-B;s11-EXIT;s11-ENTRY; +D:s1-D;s11-EXIT;s1-EXIT;s-INIT;s1-ENTRY;s11-ENTRY; +D:s11-D;s11-EXIT;s1-INIT;s11-ENTRY; +E:s-E;s11-EXIT;s1-EXIT;s1-ENTRY;s11-ENTRY; +G:s11-G;s11-EXIT;s1-EXIT;s2-ENTRY;s21-ENTRY;s211-ENTRY; +H:s211-H;s211-EXIT;s21-EXIT;s2-EXIT;s-INIT;s1-ENTRY;s11-ENTRY; +H:s11-H;s11-EXIT;s1-EXIT;s-INIT;s1-ENTRY;s11-ENTRY; +C:s1-C;s11-EXIT;s1-EXIT;s2-ENTRY;s2-INIT;s21-ENTRY;s211-ENTRY; +G:s21-G;s211-EXIT;s21-EXIT;s2-EXIT;s1-ENTRY;s1-INIT;s11-ENTRY; +C:s1-C;s11-EXIT;s1-EXIT;s2-ENTRY;s2-INIT;s21-ENTRY;s211-ENTRY; +C:s2-C;s211-EXIT;s21-EXIT;s2-EXIT;s1-ENTRY;s1-INIT;s11-ENTRY; \ No newline at end of file diff --git a/examples/workstation/qhsmtst/qhsmtst.c b/examples/workstation/qhsmtst/qhsmtst.c index e58a46df..2a4a3cb5 100644 --- a/examples/workstation/qhsmtst/qhsmtst.c +++ b/examples/workstation/qhsmtst/qhsmtst.c @@ -1,26 +1,39 @@ -/*.$file${.::qhsmtst.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::qhsmtst.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: qhsmtst.qm * File: ${.::qhsmtst.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::qhsmtst.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::qhsmtst.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "qhsmtst.h" -/*.$declare${HSMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${HSMs::QHsmTst} ........................................................*/ +/*$declare${HSMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${HSMs::QHsmTst} .........................................................*/ typedef struct { /* protected: */ QHsm super; @@ -37,31 +50,35 @@ static QState QHsmTst_s11(QHsmTst * const me, QEvt const * const e); static QState QHsmTst_s2(QHsmTst * const me, QEvt const * const e); static QState QHsmTst_s21(QHsmTst * const me, QEvt const * const e); static QState QHsmTst_s211(QHsmTst * const me, QEvt const * const e); -/*.$enddecl${HSMs::QHsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${HSMs::QHsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ static QHsmTst l_sm; /* the only instance of the QHsmTst class */ /* global-scope definitions ---------------------------------------*/ QHsm * const the_sm = &l_sm.super; /* the opaque pointer */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${HSMs::QHsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${HSMs::QHsmTst_ctor} ...................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${HSMs::QHsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${HSMs::QHsmTst_ctor} ....................................................*/ void QHsmTst_ctor(void) { QHsmTst *me = &l_sm; QHsm_ctor(&me->super, Q_STATE_CAST(&QHsmTst_initial)); } -/*.$enddef${HSMs::QHsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${HSMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${HSMs::QHsmTst} ........................................................*/ -/*.${HSMs::QHsmTst::SM} ....................................................*/ +/*$enddef${HSMs::QHsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${HSMs::QHsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${HSMs::QHsmTst} .........................................................*/ + +/*${HSMs::QHsmTst::SM} .....................................................*/ static QState QHsmTst_initial(QHsmTst * const me, void const * const par) { - /*.${HSMs::QHsmTst::SM::initial} */ + /*${HSMs::QHsmTst::SM::initial} */ (void)par; /* unused parameter */ me->foo = 0U; BSP_display("top-INIT;"); @@ -75,31 +92,32 @@ static QState QHsmTst_initial(QHsmTst * const me, void const * const par) { return Q_TRAN(&QHsmTst_s2); } -/*.${HSMs::QHsmTst::SM::s} .................................................*/ + +/*${HSMs::QHsmTst::SM::s} ..................................................*/ static QState QHsmTst_s(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s} */ + /*${HSMs::QHsmTst::SM::s} */ case Q_ENTRY_SIG: { BSP_display("s-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s} */ + /*${HSMs::QHsmTst::SM::s} */ case Q_EXIT_SIG: { BSP_display("s-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::initial} */ + /*${HSMs::QHsmTst::SM::s::initial} */ case Q_INIT_SIG: { BSP_display("s-INIT;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::I} */ + /*${HSMs::QHsmTst::SM::s::I} */ case I_SIG: { - /*.${HSMs::QHsmTst::SM::s::I::[me->foo]} */ + /*${HSMs::QHsmTst::SM::s::I::[me->foo]} */ if (me->foo) { me->foo = 0U; BSP_display("s-I;"); @@ -110,13 +128,13 @@ static QState QHsmTst_s(QHsmTst * const me, QEvt const * const e) { } break; } - /*.${HSMs::QHsmTst::SM::s::E} */ + /*${HSMs::QHsmTst::SM::s::E} */ case E_SIG: { BSP_display("s-E;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::TERMINATE} */ + /*${HSMs::QHsmTst::SM::s::TERMINATE} */ case TERMINATE_SIG: { BSP_exit(); status_ = Q_HANDLED(); @@ -129,37 +147,38 @@ static QState QHsmTst_s(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s1} .............................................*/ + +/*${HSMs::QHsmTst::SM::s::s1} ..............................................*/ static QState QHsmTst_s1(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s1} */ + /*${HSMs::QHsmTst::SM::s::s1} */ case Q_ENTRY_SIG: { BSP_display("s1-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1} */ + /*${HSMs::QHsmTst::SM::s::s1} */ case Q_EXIT_SIG: { BSP_display("s1-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1::initial} */ + /*${HSMs::QHsmTst::SM::s::s1::initial} */ case Q_INIT_SIG: { BSP_display("s1-INIT;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::s1::I} */ + /*${HSMs::QHsmTst::SM::s::s1::I} */ case I_SIG: { BSP_display("s1-I;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1::D} */ + /*${HSMs::QHsmTst::SM::s::s1::D} */ case D_SIG: { - /*.${HSMs::QHsmTst::SM::s::s1::D::[!me->foo]} */ + /*${HSMs::QHsmTst::SM::s::s1::D::[!me->foo]} */ if (!me->foo) { me->foo = 1U; BSP_display("s1-D;"); @@ -170,25 +189,25 @@ static QState QHsmTst_s1(QHsmTst * const me, QEvt const * const e) { } break; } - /*.${HSMs::QHsmTst::SM::s::s1::A} */ + /*${HSMs::QHsmTst::SM::s::s1::A} */ case A_SIG: { BSP_display("s1-A;"); status_ = Q_TRAN(&QHsmTst_s1); break; } - /*.${HSMs::QHsmTst::SM::s::s1::B} */ + /*${HSMs::QHsmTst::SM::s::s1::B} */ case B_SIG: { BSP_display("s1-B;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::s1::F} */ + /*${HSMs::QHsmTst::SM::s::s1::F} */ case F_SIG: { BSP_display("s1-F;"); status_ = Q_TRAN(&QHsmTst_s211); break; } - /*.${HSMs::QHsmTst::SM::s::s1::C} */ + /*${HSMs::QHsmTst::SM::s::s1::C} */ case C_SIG: { BSP_display("s1-C;"); status_ = Q_TRAN(&QHsmTst_s2); @@ -201,31 +220,32 @@ static QState QHsmTst_s1(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s1::s11} ........................................*/ + +/*${HSMs::QHsmTst::SM::s::s1::s11} .........................................*/ static QState QHsmTst_s11(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s1::s11} */ + /*${HSMs::QHsmTst::SM::s::s1::s11} */ case Q_ENTRY_SIG: { BSP_display("s11-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1::s11} */ + /*${HSMs::QHsmTst::SM::s::s1::s11} */ case Q_EXIT_SIG: { BSP_display("s11-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s1::s11::H} */ + /*${HSMs::QHsmTst::SM::s::s1::s11::H} */ case H_SIG: { BSP_display("s11-H;"); status_ = Q_TRAN(&QHsmTst_s); break; } - /*.${HSMs::QHsmTst::SM::s::s1::s11::D} */ + /*${HSMs::QHsmTst::SM::s::s1::s11::D} */ case D_SIG: { - /*.${HSMs::QHsmTst::SM::s::s1::s11::D::[me->foo]} */ + /*${HSMs::QHsmTst::SM::s::s1::s11::D::[me->foo]} */ if (me->foo) { me->foo = 0U; BSP_display("s11-D;"); @@ -236,7 +256,7 @@ static QState QHsmTst_s11(QHsmTst * const me, QEvt const * const e) { } break; } - /*.${HSMs::QHsmTst::SM::s::s1::s11::G} */ + /*${HSMs::QHsmTst::SM::s::s1::s11::G} */ case G_SIG: { BSP_display("s11-G;"); status_ = Q_TRAN(&QHsmTst_s211); @@ -249,31 +269,32 @@ static QState QHsmTst_s11(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s2} .............................................*/ + +/*${HSMs::QHsmTst::SM::s::s2} ..............................................*/ static QState QHsmTst_s2(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s2} */ + /*${HSMs::QHsmTst::SM::s::s2} */ case Q_ENTRY_SIG: { BSP_display("s2-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2} */ + /*${HSMs::QHsmTst::SM::s::s2} */ case Q_EXIT_SIG: { BSP_display("s2-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::initial} */ + /*${HSMs::QHsmTst::SM::s::s2::initial} */ case Q_INIT_SIG: { BSP_display("s2-INIT;"); status_ = Q_TRAN(&QHsmTst_s211); break; } - /*.${HSMs::QHsmTst::SM::s::s2::I} */ + /*${HSMs::QHsmTst::SM::s::s2::I} */ case I_SIG: { - /*.${HSMs::QHsmTst::SM::s::s2::I::[!me->foo]} */ + /*${HSMs::QHsmTst::SM::s::s2::I::[!me->foo]} */ if (!me->foo) { me->foo = 1U; BSP_display("s2-I;"); @@ -284,13 +305,13 @@ static QState QHsmTst_s2(QHsmTst * const me, QEvt const * const e) { } break; } - /*.${HSMs::QHsmTst::SM::s::s2::F} */ + /*${HSMs::QHsmTst::SM::s::s2::F} */ case F_SIG: { BSP_display("s2-F;"); status_ = Q_TRAN(&QHsmTst_s11); break; } - /*.${HSMs::QHsmTst::SM::s::s2::C} */ + /*${HSMs::QHsmTst::SM::s::s2::C} */ case C_SIG: { BSP_display("s2-C;"); status_ = Q_TRAN(&QHsmTst_s1); @@ -303,41 +324,42 @@ static QState QHsmTst_s2(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s2::s21} ........................................*/ + +/*${HSMs::QHsmTst::SM::s::s2::s21} .........................................*/ static QState QHsmTst_s21(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s2::s21} */ + /*${HSMs::QHsmTst::SM::s::s2::s21} */ case Q_ENTRY_SIG: { BSP_display("s21-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21} */ + /*${HSMs::QHsmTst::SM::s::s2::s21} */ case Q_EXIT_SIG: { BSP_display("s21-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::initial} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::initial} */ case Q_INIT_SIG: { BSP_display("s21-INIT;"); status_ = Q_TRAN(&QHsmTst_s211); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::G} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::G} */ case G_SIG: { BSP_display("s21-G;"); status_ = Q_TRAN(&QHsmTst_s1); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::A} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::A} */ case A_SIG: { BSP_display("s21-A;"); status_ = Q_TRAN(&QHsmTst_s21); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::B} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::B} */ case B_SIG: { BSP_display("s21-B;"); status_ = Q_TRAN(&QHsmTst_s211); @@ -350,29 +372,30 @@ static QState QHsmTst_s21(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.${HSMs::QHsmTst::SM::s::s2::s21::s211} ..................................*/ + +/*${HSMs::QHsmTst::SM::s::s2::s21::s211} ...................................*/ static QState QHsmTst_s211(QHsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${HSMs::QHsmTst::SM::s::s2::s21::s211} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::s211} */ case Q_ENTRY_SIG: { BSP_display("s211-ENTRY;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::s211} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::s211} */ case Q_EXIT_SIG: { BSP_display("s211-EXIT;"); status_ = Q_HANDLED(); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::s211::H} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::s211::H} */ case H_SIG: { BSP_display("s211-H;"); status_ = Q_TRAN(&QHsmTst_s); break; } - /*.${HSMs::QHsmTst::SM::s::s2::s21::s211::D} */ + /*${HSMs::QHsmTst::SM::s::s2::s21::s211::D} */ case D_SIG: { BSP_display("s211-D;"); status_ = Q_TRAN(&QHsmTst_s21); @@ -385,4 +408,5 @@ static QState QHsmTst_s211(QHsmTst * const me, QEvt const * const e) { } return status_; } -/*.$enddef${HSMs::QHsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${HSMs::QHsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/workstation/qhsmtst/qhsmtst.h b/examples/workstation/qhsmtst/qhsmtst.h index 6bdcfe05..fa9bccad 100644 --- a/examples/workstation/qhsmtst/qhsmtst.h +++ b/examples/workstation/qhsmtst/qhsmtst.h @@ -1,21 +1,33 @@ -/*.$file${.::qhsmtst.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::qhsmtst.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: qhsmtst.qm * File: ${.::qhsmtst.h} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::qhsmtst.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::qhsmtst.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef QHSMTST_H #define QHSMTST_H @@ -36,13 +48,15 @@ enum QHsmTstSignals { extern QHsm * const the_sm; /* opaque pointer to the test SM */ -/*.$declare${HSMs::QHsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${HSMs::QHsmTst_ctor} ...................................................*/ +/*$declare${HSMs::QHsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${HSMs::QHsmTst_ctor} ....................................................*/ void QHsmTst_ctor(void); -/*.$enddecl${HSMs::QHsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${HSMs::QHsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* BSP functions to dispaly a message and exit */ void BSP_display(char const *msg); void BSP_exit(void); #endif /* QHSMTST_H */ + diff --git a/examples/workstation/qhsmtst/qhsmtst.qm b/examples/workstation/qhsmtst/qhsmtst.qm index d62eb3d2..ab2830fd 100644 --- a/examples/workstation/qhsmtst/qhsmtst.qm +++ b/examples/workstation/qhsmtst/qhsmtst.qm @@ -1,5 +1,5 @@ - + QHsmTst is a contrived state machine from Chapter 2 of the PSiCC2 book for testing all possible transition topologies with up to 4-levels of state nesting. diff --git a/examples/workstation/qhsmtst/qhsmtst.sln b/examples/workstation/qhsmtst/qhsmtst.sln index e370c575..b2046c0b 100644 --- a/examples/workstation/qhsmtst/qhsmtst.sln +++ b/examples/workstation/qhsmtst/qhsmtst.sln @@ -1,25 +1,25 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2013 for Windows Desktop -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qhsmtst", "qhsmtst.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - QSpy|Win32 = QSpy|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.ActiveCfg = Release|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.Build.0 = Release|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.Build.0 = QSpy|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2013 for Windows Desktop +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qhsmtst", "qhsmtst.vcxproj", "{8CC465F7-872E-4D03-B93C-1B64858B4E11}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + QSpy|Win32 = QSpy|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Debug|Win32.Build.0 = Debug|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.ActiveCfg = Release|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.Release|Win32.Build.0 = Release|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.ActiveCfg = QSpy|Win32 + {8CC465F7-872E-4D03-B93C-1B64858B4E11}.QSpy|Win32.Build.0 = QSpy|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/workstation/qhsmtst/qhsmtst.vcxproj b/examples/workstation/qhsmtst/qhsmtst.vcxproj index 230776e6..2781a5af 100644 --- a/examples/workstation/qhsmtst/qhsmtst.vcxproj +++ b/examples/workstation/qhsmtst/qhsmtst.vcxproj @@ -1,159 +1,159 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - QSpy - Win32 - - - - {8CC465F7-872E-4D03-B93C-1B64858B4E11} - qhsmtst - Win32Proj - 10.0.17134.0 - - - - Application - NotSet - v141 - - - Application - NotSet - true - v141 - - - Application - NotSet - v141 - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - - - - Disabled - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - Default - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - MaxSpeed - true - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - true - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - Disabled - .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) - Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - - - Default - MultiThreaded - NotUsing - Level4 - ProgramDatabase - 4127 - - - qp.lib;ws2_32.lib;%(AdditionalDependencies) - ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - cmd /c "del $(OutDir)qstamp.obj" - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + QSpy + Win32 + + + + {8CC465F7-872E-4D03-B93C-1B64858B4E11} + qhsmtst + Win32Proj + 10.0.17134.0 + + + + Application + NotSet + v141 + + + Application + NotSet + true + v141 + + + Application + NotSet + v141 + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + + Disabled + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + Default + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + MaxSpeed + true + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + true + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + Disabled + .;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories) + Q_SPY;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + false + + + Default + MultiThreaded + NotUsing + Level4 + ProgramDatabase + 4127 + + + qp.lib;ws2_32.lib;%(AdditionalDependencies) + ../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + cmd /c "del $(OutDir)qstamp.obj" + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/workstation/qhsmtst/qhsmtst.vcxproj.filters b/examples/workstation/qhsmtst/qhsmtst.vcxproj.filters index be3b4d06..22cf4767 100644 --- a/examples/workstation/qhsmtst/qhsmtst.vcxproj.filters +++ b/examples/workstation/qhsmtst/qhsmtst.vcxproj.filters @@ -1,11 +1,11 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/examples/workstation/qmsmtst/Makefile b/examples/workstation/qmsmtst/Makefile index 5207292b..7617badf 100644 --- a/examples/workstation/qmsmtst/Makefile +++ b/examples/workstation/qmsmtst/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -144,7 +144,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/qmsmtst/qmsmtst.c b/examples/workstation/qmsmtst/qmsmtst.c index cb1e90f2..852c5cab 100644 --- a/examples/workstation/qmsmtst/qmsmtst.c +++ b/examples/workstation/qmsmtst/qmsmtst.c @@ -1,28 +1,46 @@ -/*.$file${.::qmsmtst.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::qmsmtst.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: qmsmtst.qm * File: ${.::qmsmtst.c} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * * This code is covered by the following QP license: -* License # : QPC-EVAL -* Issued to : Institution or an individual evaluating the QP/C framework -* Framework(s): qpc -* Support ends: 2022-12-31 -* Product(s) : -* This license is available only for evaluation purposes and -* the generated code is still licensed under the terms of GPL. -* Please submit request for extension of the evaluation period at: -* +* License # : QM-EVAL-QPC +* Issued to : Users of QP/C Real-Time Embedded Framework (RTEF) +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is free software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::qmsmtst.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::qmsmtst.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "qmsmtst.h" -/*.$declare${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::QMsmTst} .........................................................*/ +/*$declare${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::QMsmTst} ..........................................................*/ typedef struct { /* protected: */ QMsm super; @@ -97,29 +115,33 @@ static QMState const QMsmTst_s211_s = { Q_ACTION_CAST(&QMsmTst_s211_x), Q_ACTION_NULL /* no initial tran. */ }; -/*.$enddecl${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ static QMsmTst l_sm; /* the only instance of the QMsmTst class */ /* global-scope definitions ---------------------------------------*/ QHsm * const the_sm = &l_sm.super.super; /* the opaque pointer */ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ #if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) #error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::QMsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::QMsmTst_ctor} ....................................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${SMs::QMsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::QMsmTst_ctor} .....................................................*/ void QMsmTst_ctor(void) { QMsmTst *me = &l_sm; QMsm_ctor(&me->super, Q_STATE_CAST(&QMsmTst_initial)); } -/*.$enddef${SMs::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::QMsmTst} .........................................................*/ -/*.${SMs::QMsmTst::SM} .....................................................*/ +/*$enddef${SMs::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::QMsmTst} ..........................................................*/ + +/*${SMs::QMsmTst::SM} ......................................................*/ static QState QMsmTst_initial(QMsmTst * const me, void const * const par) { static struct { QMState const *target; @@ -133,7 +155,7 @@ static QState QMsmTst_initial(QMsmTst * const me, void const * const par) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::initial} */ + /*${SMs::QMsmTst::SM::initial} */ (void)par; /* unused parameter */ me->foo = 0U; BSP_display("top-INIT;"); @@ -147,20 +169,21 @@ static QState QMsmTst_initial(QMsmTst * const me, void const * const par) { return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s} ..................................................*/ -/*.${SMs::QMsmTst::SM::s} */ + +/*${SMs::QMsmTst::SM::s} ...................................................*/ +/*${SMs::QMsmTst::SM::s} */ static QState QMsmTst_s_e(QMsmTst * const me) { BSP_display("s-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s_s); } -/*.${SMs::QMsmTst::SM::s} */ +/*${SMs::QMsmTst::SM::s} */ static QState QMsmTst_s_x(QMsmTst * const me) { BSP_display("s-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s_s); } -/*.${SMs::QMsmTst::SM::s::initial} */ +/*${SMs::QMsmTst::SM::s::initial} */ static QState QMsmTst_s_i(QMsmTst * const me) { static struct { QMState const *target; @@ -173,17 +196,17 @@ static QState QMsmTst_s_i(QMsmTst * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::s::initial} */ + /*${SMs::QMsmTst::SM::s::initial} */ BSP_display("s-INIT;"); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s} */ +/*${SMs::QMsmTst::SM::s} */ static QState QMsmTst_s(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::I} */ + /*${SMs::QMsmTst::SM::s::I} */ case I_SIG: { - /*.${SMs::QMsmTst::SM::s::I::[me->foo]} */ + /*${SMs::QMsmTst::SM::s::I::[me->foo]} */ if (me->foo) { me->foo = 0U; BSP_display("s-I;"); @@ -194,7 +217,7 @@ static QState QMsmTst_s(QMsmTst * const me, QEvt const * const e) { } break; } - /*.${SMs::QMsmTst::SM::s::E} */ + /*${SMs::QMsmTst::SM::s::E} */ case E_SIG: { static struct { QMState const *target; @@ -211,7 +234,7 @@ static QState QMsmTst_s(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::TERMINATE} */ + /*${SMs::QMsmTst::SM::s::TERMINATE} */ case TERMINATE_SIG: { BSP_exit(); status_ = QM_HANDLED(); @@ -225,20 +248,21 @@ static QState QMsmTst_s(QMsmTst * const me, QEvt const * const e) { (void)me; /* unused parameter */ return status_; } -/*.${SMs::QMsmTst::SM::s::s1} ..............................................*/ -/*.${SMs::QMsmTst::SM::s::s1} */ + +/*${SMs::QMsmTst::SM::s::s1} ...............................................*/ +/*${SMs::QMsmTst::SM::s::s1} */ static QState QMsmTst_s1_e(QMsmTst * const me) { BSP_display("s1-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s1_s); } -/*.${SMs::QMsmTst::SM::s::s1} */ +/*${SMs::QMsmTst::SM::s::s1} */ static QState QMsmTst_s1_x(QMsmTst * const me) { BSP_display("s1-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s1_s); } -/*.${SMs::QMsmTst::SM::s::s1::initial} */ +/*${SMs::QMsmTst::SM::s::s1::initial} */ static QState QMsmTst_s1_i(QMsmTst * const me) { static struct { QMState const *target; @@ -250,23 +274,23 @@ static QState QMsmTst_s1_i(QMsmTst * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::s::s1::initial} */ + /*${SMs::QMsmTst::SM::s::s1::initial} */ BSP_display("s1-INIT;"); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s::s1} */ +/*${SMs::QMsmTst::SM::s::s1} */ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s1::I} */ + /*${SMs::QMsmTst::SM::s::s1::I} */ case I_SIG: { BSP_display("s1-I;"); status_ = QM_HANDLED(); break; } - /*.${SMs::QMsmTst::SM::s::s1::D} */ + /*${SMs::QMsmTst::SM::s::s1::D} */ case D_SIG: { - /*.${SMs::QMsmTst::SM::s::s1::D::[!me->foo]} */ + /*${SMs::QMsmTst::SM::s::s1::D::[!me->foo]} */ if (!me->foo) { static struct { QMState const *target; @@ -288,7 +312,7 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { } break; } - /*.${SMs::QMsmTst::SM::s::s1::A} */ + /*${SMs::QMsmTst::SM::s::s1::A} */ case A_SIG: { static struct { QMState const *target; @@ -306,7 +330,7 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s1::B} */ + /*${SMs::QMsmTst::SM::s::s1::B} */ case B_SIG: { static struct { QMState const *target; @@ -322,7 +346,7 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s1::F} */ + /*${SMs::QMsmTst::SM::s::s1::F} */ case F_SIG: { static struct { QMState const *target; @@ -341,7 +365,7 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s1::C} */ + /*${SMs::QMsmTst::SM::s::s1::C} */ case C_SIG: { static struct { QMState const *target; @@ -366,24 +390,25 @@ static QState QMsmTst_s1(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.${SMs::QMsmTst::SM::s::s1::s11} .........................................*/ -/*.${SMs::QMsmTst::SM::s::s1::s11} */ + +/*${SMs::QMsmTst::SM::s::s1::s11} ..........................................*/ +/*${SMs::QMsmTst::SM::s::s1::s11} */ static QState QMsmTst_s11_e(QMsmTst * const me) { BSP_display("s11-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s11_s); } -/*.${SMs::QMsmTst::SM::s::s1::s11} */ +/*${SMs::QMsmTst::SM::s::s1::s11} */ static QState QMsmTst_s11_x(QMsmTst * const me) { BSP_display("s11-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s11_s); } -/*.${SMs::QMsmTst::SM::s::s1::s11} */ +/*${SMs::QMsmTst::SM::s::s1::s11} */ static QState QMsmTst_s11(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s1::s11::H} */ + /*${SMs::QMsmTst::SM::s::s1::s11::H} */ case H_SIG: { static struct { QMState const *target; @@ -401,9 +426,9 @@ static QState QMsmTst_s11(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s1::s11::D} */ + /*${SMs::QMsmTst::SM::s::s1::s11::D} */ case D_SIG: { - /*.${SMs::QMsmTst::SM::s::s1::s11::D::[me->foo]} */ + /*${SMs::QMsmTst::SM::s::s1::s11::D::[me->foo]} */ if (me->foo) { static struct { QMState const *target; @@ -425,7 +450,7 @@ static QState QMsmTst_s11(QMsmTst * const me, QEvt const * const e) { } break; } - /*.${SMs::QMsmTst::SM::s::s1::s11::G} */ + /*${SMs::QMsmTst::SM::s::s1::s11::G} */ case G_SIG: { static struct { QMState const *target; @@ -452,20 +477,21 @@ static QState QMsmTst_s11(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.${SMs::QMsmTst::SM::s::s2} ..............................................*/ -/*.${SMs::QMsmTst::SM::s::s2} */ + +/*${SMs::QMsmTst::SM::s::s2} ...............................................*/ +/*${SMs::QMsmTst::SM::s::s2} */ static QState QMsmTst_s2_e(QMsmTst * const me) { BSP_display("s2-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s2_s); } -/*.${SMs::QMsmTst::SM::s::s2} */ +/*${SMs::QMsmTst::SM::s::s2} */ static QState QMsmTst_s2_x(QMsmTst * const me) { BSP_display("s2-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s2_s); } -/*.${SMs::QMsmTst::SM::s::s2::initial} */ +/*${SMs::QMsmTst::SM::s::s2::initial} */ static QState QMsmTst_s2_i(QMsmTst * const me) { static struct { QMState const *target; @@ -478,17 +504,17 @@ static QState QMsmTst_s2_i(QMsmTst * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::s::s2::initial} */ + /*${SMs::QMsmTst::SM::s::s2::initial} */ BSP_display("s2-INIT;"); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s::s2} */ +/*${SMs::QMsmTst::SM::s::s2} */ static QState QMsmTst_s2(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s2::I} */ + /*${SMs::QMsmTst::SM::s::s2::I} */ case I_SIG: { - /*.${SMs::QMsmTst::SM::s::s2::I::[!me->foo]} */ + /*${SMs::QMsmTst::SM::s::s2::I::[!me->foo]} */ if (!me->foo) { me->foo = 1U; BSP_display("s2-I;"); @@ -499,7 +525,7 @@ static QState QMsmTst_s2(QMsmTst * const me, QEvt const * const e) { } break; } - /*.${SMs::QMsmTst::SM::s::s2::F} */ + /*${SMs::QMsmTst::SM::s::s2::F} */ case F_SIG: { static struct { QMState const *target; @@ -517,7 +543,7 @@ static QState QMsmTst_s2(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s2::C} */ + /*${SMs::QMsmTst::SM::s::s2::C} */ case C_SIG: { static struct { QMState const *target; @@ -542,20 +568,21 @@ static QState QMsmTst_s2(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.${SMs::QMsmTst::SM::s::s2::s21} .........................................*/ -/*.${SMs::QMsmTst::SM::s::s2::s21} */ + +/*${SMs::QMsmTst::SM::s::s2::s21} ..........................................*/ +/*${SMs::QMsmTst::SM::s::s2::s21} */ static QState QMsmTst_s21_e(QMsmTst * const me) { BSP_display("s21-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s21_s); } -/*.${SMs::QMsmTst::SM::s::s2::s21} */ +/*${SMs::QMsmTst::SM::s::s2::s21} */ static QState QMsmTst_s21_x(QMsmTst * const me) { BSP_display("s21-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s21_s); } -/*.${SMs::QMsmTst::SM::s::s2::s21::initial} */ +/*${SMs::QMsmTst::SM::s::s2::s21::initial} */ static QState QMsmTst_s21_i(QMsmTst * const me) { static struct { QMState const *target; @@ -567,15 +594,15 @@ static QState QMsmTst_s21_i(QMsmTst * const me) { Q_ACTION_NULL /* zero terminator */ } }; - /*.${SMs::QMsmTst::SM::s::s2::s21::initial} */ + /*${SMs::QMsmTst::SM::s::s2::s21::initial} */ BSP_display("s21-INIT;"); return QM_TRAN_INIT(&tatbl_); } -/*.${SMs::QMsmTst::SM::s::s2::s21} */ +/*${SMs::QMsmTst::SM::s::s2::s21} */ static QState QMsmTst_s21(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s2::s21::G} */ + /*${SMs::QMsmTst::SM::s::s2::s21::G} */ case G_SIG: { static struct { QMState const *target; @@ -594,7 +621,7 @@ static QState QMsmTst_s21(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s2::s21::A} */ + /*${SMs::QMsmTst::SM::s::s2::s21::A} */ case A_SIG: { static struct { QMState const *target; @@ -612,7 +639,7 @@ static QState QMsmTst_s21(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s2::s21::B} */ + /*${SMs::QMsmTst::SM::s::s2::s21::B} */ case B_SIG: { static struct { QMState const *target; @@ -635,24 +662,25 @@ static QState QMsmTst_s21(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.${SMs::QMsmTst::SM::s::s2::s21::s211} ...................................*/ -/*.${SMs::QMsmTst::SM::s::s2::s21::s211} */ + +/*${SMs::QMsmTst::SM::s::s2::s21::s211} ....................................*/ +/*${SMs::QMsmTst::SM::s::s2::s21::s211} */ static QState QMsmTst_s211_e(QMsmTst * const me) { BSP_display("s211-ENTRY;"); (void)me; /* unused parameter */ return QM_ENTRY(&QMsmTst_s211_s); } -/*.${SMs::QMsmTst::SM::s::s2::s21::s211} */ +/*${SMs::QMsmTst::SM::s::s2::s21::s211} */ static QState QMsmTst_s211_x(QMsmTst * const me) { BSP_display("s211-EXIT;"); (void)me; /* unused parameter */ return QM_EXIT(&QMsmTst_s211_s); } -/*.${SMs::QMsmTst::SM::s::s2::s21::s211} */ +/*${SMs::QMsmTst::SM::s::s2::s21::s211} */ static QState QMsmTst_s211(QMsmTst * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${SMs::QMsmTst::SM::s::s2::s21::s211::H} */ + /*${SMs::QMsmTst::SM::s::s2::s21::s211::H} */ case H_SIG: { static struct { QMState const *target; @@ -671,7 +699,7 @@ static QState QMsmTst_s211(QMsmTst * const me, QEvt const * const e) { status_ = QM_TRAN(&tatbl_); break; } - /*.${SMs::QMsmTst::SM::s::s2::s21::s211::D} */ + /*${SMs::QMsmTst::SM::s::s2::s21::s211::D} */ case D_SIG: { static struct { QMState const *target; @@ -695,4 +723,5 @@ static QState QMsmTst_s211(QMsmTst * const me, QEvt const * const e) { } return status_; } -/*.$enddef${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${SMs::QMsmTst} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + diff --git a/examples/workstation/qmsmtst/qmsmtst.h b/examples/workstation/qmsmtst/qmsmtst.h index 02400dd3..02a4cbd5 100644 --- a/examples/workstation/qmsmtst/qmsmtst.h +++ b/examples/workstation/qmsmtst/qmsmtst.h @@ -1,23 +1,40 @@ -/*.$file${.::qmsmtst.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::qmsmtst.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: qmsmtst.qm * File: ${.::qmsmtst.h} * -* This code has been generated by QM 5.1.3 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * * This code is covered by the following QP license: -* License # : QPC-EVAL -* Issued to : Institution or an individual evaluating the QP/C framework -* Framework(s): qpc -* Support ends: 2022-12-31 -* Product(s) : -* This license is available only for evaluation purposes and -* the generated code is still licensed under the terms of GPL. -* Please submit request for extension of the evaluation period at: -* +* License # : QM-EVAL-QPC +* Issued to : Users of QP/C Real-Time Embedded Framework (RTEF) +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is free software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::qmsmtst.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::qmsmtst.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifndef QMSMTST_H #define QMSMTST_H @@ -38,13 +55,15 @@ enum QMsmTstSignals { extern QHsm * const the_sm; /* opaque pointer to the test SM */ -/*.$declare${SMs::QMsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${SMs::QMsmTst_ctor} ....................................................*/ +/*$declare${SMs::QMsmTst_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${SMs::QMsmTst_ctor} .....................................................*/ void QMsmTst_ctor(void); -/*.$enddecl${SMs::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${SMs::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* BSP functions to dispaly a message and exit */ void BSP_display(char const *msg); void BSP_exit(void); #endif /* QMSMTST_H */ + diff --git a/examples/workstation/qmsmtst/qmsmtst.qm b/examples/workstation/qmsmtst/qmsmtst.qm index b6eae896..086177de 100644 --- a/examples/workstation/qmsmtst/qmsmtst.qm +++ b/examples/workstation/qmsmtst/qmsmtst.qm @@ -1,8 +1,8 @@ - + QMsmTst is a QMsm state machine test based on the contrived state machine from Chapter 2 of the PSiCC2 book for testing all possible transition topologies with up to 4-levels of state nesting. - + diff --git a/examples/workstation/reminder/Makefile b/examples/workstation/reminder/Makefile index fa5f1d1e..00ed7f9f 100644 --- a/examples/workstation/reminder/Makefile +++ b/examples/workstation/reminder/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -144,7 +144,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/reminder/bsp.c b/examples/workstation/reminder/bsp.c index 1d077bed..088f69e8 100644 --- a/examples/workstation/reminder/bsp.c +++ b/examples/workstation/reminder/bsp.c @@ -58,7 +58,7 @@ void QF_onCleanup(void) { void QF_onClockTick(void) { int ch; - QF_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ ch = QF_consoleGetKey(); if (ch != 0) { /* any key pressed? */ diff --git a/examples/workstation/reminder2/Makefile b/examples/workstation/reminder2/Makefile index c73a58cb..02b78bc5 100644 --- a/examples/workstation/reminder2/Makefile +++ b/examples/workstation/reminder2/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C for Windows and POSIX *HOSTS* -# Last updated for version 6.8.2 -# Last updated on 2020-06-23 +# Last updated for version 7.0.1 +# Last updated on 2022-05-23 # # Q u a n t u m L e a P s # ------------------------ @@ -144,7 +144,7 @@ endif # Typically you should not need to change anything below this line VPATH += $(QPC)/src/qf $(QP_PORT_DIR) -INCLUDES += -I$(QPC)/include -I$(QPC)/src -I$(QP_PORT_DIR) +INCLUDES += -I$(QPC)/include -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- # GNU toolset: diff --git a/examples/workstation/reminder2/bsp.c b/examples/workstation/reminder2/bsp.c index 1d077bed..088f69e8 100644 --- a/examples/workstation/reminder2/bsp.c +++ b/examples/workstation/reminder2/bsp.c @@ -58,7 +58,7 @@ void QF_onCleanup(void) { void QF_onClockTick(void) { int ch; - QF_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ + QTIMEEVT_TICK_X(0U, &l_clock_tick); /* perform the QF clock tick processing */ ch = QF_consoleGetKey(); if (ch != 0) { /* any key pressed? */ diff --git a/examples/workstation/reminder2/reminder2.c b/examples/workstation/reminder2/reminder2.c index 8f14f04a..4a1ebfa8 100644 --- a/examples/workstation/reminder2/reminder2.c +++ b/examples/workstation/reminder2/reminder2.c @@ -1,21 +1,33 @@ -/*.$file${.::reminder2.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$file${.::reminder2.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /* * Model: reminder2.qm * File: ${.::reminder2.c} * -* This code has been generated by QM 5.1.0 . +* This code has been generated by QM 5.2.1 . * DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation. +* SPDX-License-Identifier: GPL-3.0-or-later * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* */ -/*.$endhead${.::reminder2.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$endhead${.::reminder2.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #include "qpc.h" #include "bsp.h" @@ -31,8 +43,9 @@ enum ReminderSignals { TERMINATE_SIG /* terminate the application */ }; -/*.$declare${Events::ReminderEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Events::ReminderEvt} ..................................................*/ +/*$declare${Events::ReminderEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::ReminderEvt} ...................................................*/ typedef struct { /* protected: */ QEvt super; @@ -42,11 +55,12 @@ typedef struct { /* the next iteration to perform */ uint32_t iter; } ReminderEvt; -/*.$enddecl${Events::ReminderEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Events::ReminderEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*..........................................................................*/ -/*.$declare${Components::Cruncher} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::Cruncher} .................................................*/ +/*$declare${Components::Cruncher} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::Cruncher} ..................................................*/ typedef struct { /* protected: */ QActive super; @@ -64,24 +78,27 @@ static void Cruncher_ctor(Cruncher * const me); static QState Cruncher_initial(Cruncher * const me, void const * const par); static QState Cruncher_processing(Cruncher * const me, QEvt const * const e); static QState Cruncher_final(Cruncher * const me, QEvt const * const e); -/*.$enddecl${Components::Cruncher} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddecl${Components::Cruncher} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*. Check for the minimum required QP version */ -#if (QP_VERSION < 680U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) -#error qpc version 6.8.0 or higher required +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -/*.$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*.$define${Components::Cruncher} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*.${Components::Cruncher} .................................................*/ -/*.${Components::Cruncher::ctor} ...........................................*/ +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${Components::Cruncher} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Components::Cruncher} ..................................................*/ + +/*${Components::Cruncher::ctor} ............................................*/ static void Cruncher_ctor(Cruncher * const me) { QActive_ctor(&me->super, Q_STATE_CAST(&Cruncher_initial)); } -/*.${Components::Cruncher::SM} .............................................*/ +/*${Components::Cruncher::SM} ..............................................*/ static QState Cruncher_initial(Cruncher * const me, void const * const par) { - /*.${Components::Cruncher::SM::initial} */ + /*${Components::Cruncher::SM::initial} */ (void)par; /* unused parameter */ QS_FUN_DICTIONARY(&Cruncher_processing); @@ -89,11 +106,12 @@ static QState Cruncher_initial(Cruncher * const me, void const * const par) { return Q_TRAN(&Cruncher_processing); } -/*.${Components::Cruncher::SM::processing} .................................*/ + +/*${Components::Cruncher::SM::processing} ..................................*/ static QState Cruncher_processing(Cruncher * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::Cruncher::SM::processing} */ + /*${Components::Cruncher::SM::processing} */ case Q_ENTRY_SIG: { ReminderEvt *reminder = Q_NEW(ReminderEvt, CRUNCH_SIG); reminder->iter = 0U; @@ -102,7 +120,7 @@ static QState Cruncher_processing(Cruncher * const me, QEvt const * const e) { status_ = Q_HANDLED(); break; } - /*.${Components::Cruncher::SM::processing::CRUNCH} */ + /*${Components::Cruncher::SM::processing::CRUNCH} */ case CRUNCH_SIG: { uint32_t i = Q_EVT_CAST(ReminderEvt)->iter; uint32_t n = i; @@ -115,27 +133,27 @@ static QState Cruncher_processing(Cruncher * const me, QEvt const * const e) { me->sum -= 1.0/(2*n + 1); } } - /*.${Components::Cruncher::SM::processing::CRUNCH::[i<0x07000000U]} */ + /*${Components::Cruncher::SM::processing::CRUNCH::[i<0x07000000U]} */ if (i < 0x07000000U) { ReminderEvt *reminder = Q_NEW(ReminderEvt, CRUNCH_SIG); reminder->iter = i; QACTIVE_POST(&me->super, &reminder->super, me); status_ = Q_HANDLED(); } - /*.${Components::Cruncher::SM::processing::CRUNCH::[else]} */ + /*${Components::Cruncher::SM::processing::CRUNCH::[else]} */ else { PRINTF_S("pi=%16.14f\n", 4.0 * me->sum); status_ = Q_TRAN(&Cruncher_processing); } break; } - /*.${Components::Cruncher::SM::processing::ECHO} */ + /*${Components::Cruncher::SM::processing::ECHO} */ case ECHO_SIG: { PRINTF_S("Echo! pi=%16.14f\n", 4.0 * me->sum); status_ = Q_HANDLED(); break; } - /*.${Components::Cruncher::SM::processing::TERMINATE} */ + /*${Components::Cruncher::SM::processing::TERMINATE} */ case TERMINATE_SIG: { status_ = Q_TRAN(&Cruncher_final); break; @@ -147,11 +165,12 @@ static QState Cruncher_processing(Cruncher * const me, QEvt const * const e) { } return status_; } -/*.${Components::Cruncher::SM::final} ......................................*/ + +/*${Components::Cruncher::SM::final} .......................................*/ static QState Cruncher_final(Cruncher * const me, QEvt const * const e) { QState status_; switch (e->sig) { - /*.${Components::Cruncher::SM::final} */ + /*${Components::Cruncher::SM::final} */ case Q_ENTRY_SIG: { PRINTF_S("%s\n", "final-ENTRY;"); QF_stop(); /* terminate the application */ @@ -165,7 +184,7 @@ static QState Cruncher_final(Cruncher * const me, QEvt const * const e) { } return status_; } -/*.$enddef${Components::Cruncher} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$enddef${Components::Cruncher} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /* test harness ============================================================*/ @@ -218,3 +237,4 @@ void BSP_onKeyboardInput(uint8_t key) { } } } + diff --git a/examples/workstation/reminder2/reminder2.qm b/examples/workstation/reminder2/reminder2.qm index 1cabab05..a57ad9bd 100644 --- a/examples/workstation/reminder2/reminder2.qm +++ b/examples/workstation/reminder2/reminder2.qm @@ -1,8 +1,6 @@ - - Dining Philosopher Problem example - -NOTE: Requries QP6. + + "Reminder" state pattern example #2 diff --git a/examples/zephyr/blinky/CMakeLists.txt b/examples/zephyr/blinky/CMakeLists.txt new file mode 100644 index 00000000..ebbe3fa9 --- /dev/null +++ b/examples/zephyr/blinky/CMakeLists.txt @@ -0,0 +1,42 @@ +# QPC Zephyr example +# SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial + +cmake_minimum_required(VERSION 3.20.0) +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) + +project(blinky) + +target_sources(app PRIVATE + src/main.c + src/bsp.c + src/blinky.c +) + +# QPC framework directory +# NOTE: +# Adjust this path for a different relative path +# between your project and the QPC folder +# +set(QPC_DIR ../../..) + +# QPC framework includes and sources... +zephyr_include_directories( + ${QPC_DIR}/include + ${QPC_DIR}/zephyr +) +target_sources(app PRIVATE + ${QPC_DIR}/src/qf/qep_hsm.c + ${QPC_DIR}/src/qf/qep_msm.c + ${QPC_DIR}/src/qf/qf_act.c + ${QPC_DIR}/src/qf/qf_qact.c + ${QPC_DIR}/src/qf/qf_defer.c + ${QPC_DIR}/src/qf/qf_dyn.c + ${QPC_DIR}/src/qf/qf_mem.c + ${QPC_DIR}/src/qf/qf_ps.c + ${QPC_DIR}/src/qf/qf_qact.c + ${QPC_DIR}/src/qf/qf_qeq.c + ${QPC_DIR}/src/qf/qf_qmact.c + ${QPC_DIR}/src/qf/qf_time.c + ${QPC_DIR}/zephyr/qf_port.c +) + diff --git a/examples/zephyr/blinky/README.md b/examples/zephyr/blinky/README.md new file mode 100644 index 00000000..0481f490 --- /dev/null +++ b/examples/zephyr/blinky/README.md @@ -0,0 +1,52 @@ +# Blinky example + +# Overview + +Blinks an on-board LED once per second. The blinking is performed + by an Active Object (Blinky) wiht a state machine. + + + +# Building and Running (Linux) + +Open a terminal in the directory of this example (`qpc/examples/zephry/blinky`). + +Depending on your Zephyr installation, you might need to shell the script +to configure Zephyr environment: + +``` +source ~/zephyrproject/zephyr/zephyr-env.sh +``` + +To build the example, type: +``` +west build -b +``` +where `` is one of the +[boards supported by Zephyr](https://docs.zephyrproject.org/latest/boards/index.html). +The `dpp` example has been tested with the following boards: + +``` +nucleo_l152re +nucleo_h743zi +``` + +To flush the board, type: +``` +west flush +``` + +# Sample Output +The application also produces ASCII output to the serial terminal +(if suppoted by the board): + +``` +*** Booting Zephyr OS build v2.6.0-rc2-88-g3d39f72a88b3 *** +BSP_ledOff +QF_onStartup +BSP_ledOn +BSP_ledOff +BSP_ledOn +BSP_ledOff +``` + diff --git a/examples/zephyr/blinky/prj.conf b/examples/zephyr/blinky/prj.conf new file mode 100644 index 00000000..5a98af15 --- /dev/null +++ b/examples/zephyr/blinky/prj.conf @@ -0,0 +1,7 @@ +CONFIG_ASSERT=y +CONFIG_ASSERT_LEVEL=2 +CONFIG_NUM_COOP_PRIORITIES=29 +CONFIG_NUM_PREEMPT_PRIORITIES=40 +CONFIG_GPIO=y +CONFIG_REBOOT=y + diff --git a/examples/zephyr/blinky/src/blinky.c b/examples/zephyr/blinky/src/blinky.c new file mode 100644 index 00000000..b40883b5 --- /dev/null +++ b/examples/zephyr/blinky/src/blinky.c @@ -0,0 +1,111 @@ +/***************************************************************************** +* Product: Simple Blinky example +* Last Updated for Version: 5.6.5 +* Date of the Last Update: 2016-06-03 +* +* Q u a n t u m L e a P s +* --------------------------- +* innovating embedded systems +* +* 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 +* by the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Alternatively, this program may be distributed and modified under the +* terms of Quantum Leaps commercial licenses, which expressly supersede +* the GNU General Public License and are specifically designed for +* licensees interested in retaining the proprietary status of their code. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Contact information: +* Web: www.state-machine.com +* +*****************************************************************************/ +#include "qpc.h" +#include "blinky.h" +#include "bsp.h" + +//Q_DEFINE_THIS_FILE + +/*..........................................................................*/ +typedef struct { /* the Blinky active object */ + QActive super; /* inherit QActive */ + + QTimeEvt timeEvt; /* private time event generator */ +} Blinky; + +static Blinky l_blinky; /* the Blinky active object */ + +QActive * const AO_Blinky = &l_blinky.super; + +/* hierarchical state machine ... */ +static QState Blinky_initial(Blinky * const me, QEvt const * const e); +static QState Blinky_off (Blinky * const me, QEvt const * const e); +static QState Blinky_on (Blinky * const me, QEvt const * const e); + +/*..........................................................................*/ +void Blinky_ctor(void) { + Blinky * const me = &l_blinky; + QActive_ctor(&me->super, Q_STATE_CAST(&Blinky_initial)); + QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); +} + +/* HSM definition ----------------------------------------------------------*/ +QState Blinky_initial(Blinky * const me, QEvt const * const e) { + (void)e; /* avoid compiler warning about unused parameter */ + + /* arm the time event to expire in half a second and every half second */ + QTimeEvt_armX(&me->timeEvt, BSP_TICKS_PER_SEC/2U, BSP_TICKS_PER_SEC/2U); + return Q_TRAN(&Blinky_off); +} +/*..........................................................................*/ +QState Blinky_off(Blinky * const me, QEvt const * const e) { + QState status; + switch (e->sig) { + case Q_ENTRY_SIG: { + BSP_ledOff(); + status = Q_HANDLED(); + break; + } + case TIMEOUT_SIG: { + status = Q_TRAN(&Blinky_on); + break; + } + default: { + status = Q_SUPER(&QHsm_top); + break; + } + } + return status; +} +/*..........................................................................*/ +QState Blinky_on(Blinky * const me, QEvt const * const e) { + QState status; + switch (e->sig) { + case Q_ENTRY_SIG: { + BSP_ledOn(); + status = Q_HANDLED(); + break; + } + case TIMEOUT_SIG: { + status = Q_TRAN(&Blinky_off); + break; + } + default: { + status = Q_SUPER(&QHsm_top); + break; + } + } + return status; +} + diff --git a/examples/zephyr/blinky/src/blinky.h b/examples/zephyr/blinky/src/blinky.h new file mode 100644 index 00000000..5568238a --- /dev/null +++ b/examples/zephyr/blinky/src/blinky.h @@ -0,0 +1,48 @@ +/***************************************************************************** +* Product: simple "Blinky" example +* Last Updated for Version: 5.4.0 +* Date of the Last Update: 2015-03-07 +* +* Q u a n t u m L e a P s +* --------------------------- +* innovating embedded systems +* +* Copyright (C) 2005 Quantum Leaps, LLC. state-machine.com. +* +* This program is open source software: you can redistribute it and/or +* modify it under the terms of the GNU General Public License as published +* by the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Alternatively, this program may be distributed and modified under the +* terms of Quantum Leaps commercial licenses, which expressly supersede +* the GNU General Public License and are specifically designed for +* licensees interested in retaining the proprietary status of their code. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Contact information: +* +* +*****************************************************************************/ +#ifndef BLINKY_H +#define BLINKY_H + +enum BlinkySignals { + DUMMY_SIG = Q_USER_SIG, + MAX_PUB_SIG, /* the last published signal */ + + TIMEOUT_SIG, + MAX_SIG /* the last signal */ +}; + +void Blinky_ctor(void); +extern QActive * const AO_Blinky; /* opaque pointer */ + +#endif /* BLINKY_H */ diff --git a/examples/zephyr/blinky/src/bsp.c b/examples/zephyr/blinky/src/bsp.c new file mode 100644 index 00000000..1cbfe3ff --- /dev/null +++ b/examples/zephyr/blinky/src/bsp.c @@ -0,0 +1,75 @@ +#include "qpc.h" +#include "bsp.h" + +#include +#include +/* other drivers, if necessary ... */ + +Q_DEFINE_THIS_FILE + +/* The devicetree node identifier for the "led0" alias. */ +#define LED0_NODE DT_ALIAS(led0) + +#if DT_NODE_HAS_STATUS(LED0_NODE, okay) +#define LED0 DT_GPIO_LABEL(LED0_NODE, gpios) +#define PIN DT_GPIO_PIN(LED0_NODE, gpios) +#define FLAGS DT_GPIO_FLAGS(LED0_NODE, gpios) +#else +/* A build error here means your board isn't set up to blink an LED. */ +#error "Unsupported board: led0 devicetree alias is not defined" +#define LED0 "" +#define PIN 0 +#define FLAGS 0 +#endif + +static struct device const *dev_LED0; +static struct k_timer QF_tick_timer; +static void QF_tick_function(struct k_timer *tid) { + (void)tid; /* unused parameter */ + QTIMEEVT_TICK_X(0U, (void *)0); +} + +void BSP_init(void) { + dev_LED0 = device_get_binding(LED0); + Q_ASSERT(dev_LED0 != NULL); + + int ret = gpio_pin_configure(dev_LED0, PIN, GPIO_OUTPUT_ACTIVE | FLAGS); + Q_ASSERT(ret >= 0); + + k_timer_init(&QF_tick_timer, &QF_tick_function, NULL); +} + +void BSP_ledOn(void) { + printk("BSP_ledOn\n"); + gpio_pin_set(dev_LED0, PIN, true); +} + +void BSP_ledOff(void) { + printk("BSP_ledOff\n"); + gpio_pin_set(dev_LED0, PIN, false); +} + +/* QF callbacks ============================================================*/ +void QF_onStartup(void) { + k_timer_start(&QF_tick_timer, K_MSEC(1), K_MSEC(1)); + printk("QF_onStartup\n"); +} +/*..........................................................................*/ +void QF_onCleanup(void) { + printk("QF_onCleanup\n"); +} + +/*..........................................................................*/ +Q_NORETURN Q_onAssert(char const * const module, int_t const loc) { + /* + * NOTE: add here your application-specific error handling + */ + printk("\nASSERTION in %s:%d\n", module, loc); + QS_ASSERTION(module, loc, 10000U); /* report assertion to QS */ +#ifndef NDEBUG + k_panic(); /* debug build: halt the system for error search... */ +#else + sys_reboot(SYS_REBOOT_COLD); /* release build: reboot the system */ +#endif +} + diff --git a/examples/zephyr/blinky/src/bsp.h b/examples/zephyr/blinky/src/bsp.h new file mode 100644 index 00000000..2e689cd2 --- /dev/null +++ b/examples/zephyr/blinky/src/bsp.h @@ -0,0 +1,52 @@ +/***************************************************************************** +* Product: DPP example +* Last Updated for Version: 5.6.0 +* Date of the Last Update: 2015-11-22 +* +* Q u a n t u m L e a P s +* --------------------------- +* innovating embedded systems +* +* 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 +* by the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Alternatively, this program may be distributed and modified under the +* terms of Quantum Leaps commercial licenses, which expressly supersede +* the GNU General Public License and are specifically designed for +* licensees interested in retaining the proprietary status of their code. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Contact information: +* +* +*****************************************************************************/ +#ifndef BSP_H +#define BSP_H + +#define BSP_TICKS_PER_SEC 1000U + +void BSP_init(void); +void BSP_displayPaused(uint8_t paused); +void BSP_displayPhilStat(uint8_t n, char const *stat); +void BSP_terminate(int16_t result); + +void BSP_randomSeed(uint32_t seed); /* random seed */ +uint32_t BSP_random(void); /* pseudo-random generator */ + +/* for testing... */ +void BSP_wait4SW1(void); +void BSP_ledOn(void); +void BSP_ledOff(void); + +#endif /* BSP_H */ diff --git a/examples/zephyr/blinky/src/main.c b/examples/zephyr/blinky/src/main.c new file mode 100644 index 00000000..dd187783 --- /dev/null +++ b/examples/zephyr/blinky/src/main.c @@ -0,0 +1,66 @@ +/***************************************************************************** +* Product: "Blinky" example +* Last updated for version 7.0.1 +* Last updated on 2022-06-04 +* +* Q u a n t u m L e a P s +* ------------------------ +* Modern Embedded Software +* +* 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 +* by the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Alternatively, this program may be distributed and modified under the +* terms of Quantum Leaps commercial licenses, which expressly supersede +* the GNU General Public License and are specifically designed for +* licensees interested in retaining the proprietary status of their code. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Contact information: +* +* +*****************************************************************************/ +#include "qpc.h" +#include "blinky.h" +#include "bsp.h" + +Q_DEFINE_THIS_FILE + +/*..........................................................................*/ +static QEvt const *l_blinkyQSto[10]; /* event queue storage for Blinky */ +K_THREAD_STACK_DEFINE(l_blinkyStack, 1024); /* stack storage for Blinky */ + +int main() { + + QF_init(); /* initialize the framework and the underlying RT kernel */ + BSP_init(); /* initialize the Board Support Package */ + + /* publish-subscribe not used, no call to QF_psInit() */ + /* dynamic event allocation not used, no call to QF_poolInit() */ + + /* instantiate and start the active objects... */ + Blinky_ctor(); + QActive_setAttr(AO_Blinky, + 0, /* thread opions */ + "Blinky"); /* thread name */ + QACTIVE_START(AO_Blinky, /* AO pointer to start */ + 1U, /* unique QP priority of the AO */ + l_blinkyQSto, /* storage for the AO's queue */ + Q_DIM(l_blinkyQSto), /* lenght of the queue [entries] */ + (void *)l_blinkyStack, /* stack storage */ + K_THREAD_STACK_SIZEOF(l_blinkyStack), /* stack size [bytes] */ + (void *)0); /* initial event (or 0) */ + + return QF_run(); /* run the QF application */ +} diff --git a/examples/zephyr/dpp/CMakeLists.txt b/examples/zephyr/dpp/CMakeLists.txt new file mode 100644 index 00000000..35c3167a --- /dev/null +++ b/examples/zephyr/dpp/CMakeLists.txt @@ -0,0 +1,60 @@ +# QPC Zephyr example +# SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial + +cmake_minimum_required(VERSION 3.20.0) +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) + +project(dpp) + +target_sources(app PRIVATE + src/main.c + src/bsp.c + src/philo.c + src/table.c +) + +# QPC framework directory +# NOTE: +# Adjust this path for a different relative path +# between your project and the QPC folder +# +set(QPC_DIR ../../..) + +# option to turn QSPY software tracing ON or OFF +# NOTE: change of the option might require re-building the project +# +option(QSPY "QSPY software tracing" OFF) + +zephyr_include_directories( + ${QPC_DIR}/include + ${QPC_DIR}/zephyr +) +target_sources(app PRIVATE + ${QPC_DIR}/src/qf/qep_hsm.c + ${QPC_DIR}/src/qf/qep_msm.c + ${QPC_DIR}/src/qf/qf_act.c + ${QPC_DIR}/src/qf/qf_qact.c + ${QPC_DIR}/src/qf/qf_defer.c + ${QPC_DIR}/src/qf/qf_dyn.c + ${QPC_DIR}/src/qf/qf_mem.c + ${QPC_DIR}/src/qf/qf_ps.c + ${QPC_DIR}/src/qf/qf_qact.c + ${QPC_DIR}/src/qf/qf_qeq.c + ${QPC_DIR}/src/qf/qf_qmact.c + ${QPC_DIR}/src/qf/qf_time.c + ${QPC_DIR}/ports/qf_port.c +) + +# QPCPP configuration with QSPY... +if(QSPY) + +add_compile_definitions(Q_SPY) + +target_sources(app PRIVATE + ${QPC_DIR}/src/qs/qs.c + ${QPC_DIR}/src/qs/qs_rx.c + ${QPC_DIR}/include/qstamp.c +) + +endif() + diff --git a/examples/zephyr/dpp/README.md b/examples/zephyr/dpp/README.md new file mode 100644 index 00000000..4834d7d6 --- /dev/null +++ b/examples/zephyr/dpp/README.md @@ -0,0 +1,52 @@ +# DPP example + +# Overview +Dining Philosophers Problem (DPP) example with multiple +active objects. + + +# Building and Running (Linux) +Open a terminal in the directory of this example (`qpc/examples/zephry/dpp`). + +Depending on your Zephyr installation, you might need to shell the script +to configure Zephyr environment: + +``` +source ~/zephyrproject/zephyr/zephyr-env.sh +``` + +To build the example, type: +``` +west build -b +``` +where `` is one of the +[boards supported by Zephyr](https://docs.zephyrproject.org/latest/boards/index.html). +The `dpp` example has been tested with the following boards. + +Specific example for the `nucleo_h743zi` board: + +``` +west build -b nucleo_h743zi +``` + +## QP/Spy Build Configuration +The [QP/Spy software tracing](https://www.state-machine.com/qtools/qpspy.html) +is supported in this example and can be enabled by providing the command-line +option `-DQSPY=ON` to the build process: + +Specific example +``` +west build -b nucleo_h743zi -- -DQSPY=ON +``` + +> NOTE: The QP/Spy software tracing uses the Zephyr's console UART. +This means that the Zephyr `printk()` facility cannot be used while +QP/Spy is configured. + + +# Flashing the Board +To flush the board, type: +``` +west flush +``` + diff --git a/examples/zephyr/dpp/dpp.qm b/examples/zephyr/dpp/dpp.qm new file mode 100644 index 00000000..54d7c3b0 --- /dev/null +++ b/examples/zephyr/dpp/dpp.qm @@ -0,0 +1,487 @@ + + + Dining Philosopher Problem example + + + + + + + + + + + + + + + + + The array of static insts of the Philo class (Singleton pattern) + + + + + + + + static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ +(void)par; /* unused parameter */ +if (registered == (uint8_t)0) { + registered = (uint8_t)1; + + QS_OBJ_DICTIONARY(&Philo_inst[0]); + QS_OBJ_DICTIONARY(&Philo_inst[0].timeEvt); + QS_OBJ_DICTIONARY(&Philo_inst[1]); + QS_OBJ_DICTIONARY(&Philo_inst[1].timeEvt); + QS_OBJ_DICTIONARY(&Philo_inst[2]); + QS_OBJ_DICTIONARY(&Philo_inst[2].timeEvt); + QS_OBJ_DICTIONARY(&Philo_inst[3]); + QS_OBJ_DICTIONARY(&Philo_inst[3].timeEvt); + QS_OBJ_DICTIONARY(&Philo_inst[4]); + QS_OBJ_DICTIONARY(&Philo_inst[4].timeEvt); + + QS_FUN_DICTIONARY(&Philo_initial); + QS_FUN_DICTIONARY(&Philo_thinking); + QS_FUN_DICTIONARY(&Philo_hungry); + QS_FUN_DICTIONARY(&Philo_eating); +} +QS_SIG_DICTIONARY(HUNGRY_SIG, me); /* signal for each Philos */ +QS_SIG_DICTIONARY(TIMEOUT_SIG, me); /* signal for each Philos */ + +QActive_subscribe(&me->super, EAT_SIG); +QActive_subscribe(&me->super, TEST_SIG); + + + + + + + QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); + QTimeEvt_disarm(&me->timeEvt); + + + + + + + + + /* EAT or DONE must be for other Philos than this one */ +Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); + + + + + + + + + + + + + + + + + + TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); +pe->philoNum = PHILO_ID(me); +QACTIVE_POST(AO_Table, &pe->super, me); + + + + + Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me) + + + + + + + + + + + /* DONE must be for other Philos than this one */ +Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); + + + + + + + + + + + QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); + TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); +pe->philoNum = PHILO_ID(me); +QACTIVE_PUBLISH(&pe->super, &me->super); + + + + + + + + + /* EAT or DONE must be for other Philos than this one */ +Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); + + + + + + + + + + + + + + + + + The only static inst of the Table class (Singleton pattern) + + + + + + + + + + uint8_t n; +(void)par; /* unused parameter */ + +QS_OBJ_DICTIONARY(&Table_inst); + +QS_SIG_DICTIONARY(DONE_SIG, (void *)0); /* global signals */ +QS_SIG_DICTIONARY(EAT_SIG, (void *)0); +QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0); +QS_SIG_DICTIONARY(SERVE_SIG, (void *)0); +QS_SIG_DICTIONARY(TEST_SIG, (void *)0); + +QS_SIG_DICTIONARY(HUNGRY_SIG, me); /* signal just for Table */ + +QActive_subscribe(&me->super, DONE_SIG); +QActive_subscribe(&me->super, PAUSE_SIG); +QActive_subscribe(&me->super, SERVE_SIG); +QActive_subscribe(&me->super, TEST_SIG); + +for (n = 0U; n < N_PHILO; ++n) { + me->fork[n] = FREE; + me->isHungry[n] = 0U; + BSP_displayPhilStat(n, "thinking"); +} + + + + + + + + + + + + + + + Q_ERROR(); + + + + + + + uint8_t n; +for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ + if ((me->isHungry[n] != 0U) + && (me->fork[LEFT(n)] == FREE) + && (me->fork[n] == FREE)) + { + TableEvt *te; + + me->fork[LEFT(n)] = USED; + me->fork[n] = USED; + te = Q_NEW(TableEvt, EAT_SIG); + te->philoNum = n; + QACTIVE_PUBLISH(&te->super, &me->super); + me->isHungry[n] = 0U; + BSP_displayPhilStat(n, "eating "); + } +} + + + uint8_t n, m; + +n = Q_EVT_CAST(TableEvt)->philoNum; +/* phil ID must be in range and he must be not hungry */ +Q_ASSERT((n < N_PHILO) && (me->isHungry[n] == 0U)); + +BSP_displayPhilStat(n, "hungry "); +m = LEFT(n); + + + (me->fork[m] == FREE) && (me->fork[n] == FREE) + TableEvt *pe; +me->fork[m] = USED; +me->fork[n] = USED; +pe = Q_NEW(TableEvt, EAT_SIG); +pe->philoNum = n; +QACTIVE_PUBLISH(&pe->super, &me->super); +BSP_displayPhilStat(n, "eating "); + + + + + + + else + me->isHungry[n] = 1U; + + + + + + + + + + + uint8_t n, m; +TableEvt *pe; + +n = Q_EVT_CAST(TableEvt)->philoNum; +/* phil ID must be in range and he must be not hungry */ +Q_ASSERT((n < N_PHILO) && (me->isHungry[n] == 0U)); + +BSP_displayPhilStat(n, "thinking"); +m = LEFT(n); +/* both forks of Phil[n] must be used */ +Q_ASSERT((me->fork[n] == USED) && (me->fork[m] == USED)); + +me->fork[m] = FREE; +me->fork[n] = FREE; +m = RIGHT(n); /* check the right neighbor */ + +if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { + me->fork[n] = USED; + me->fork[m] = USED; + me->isHungry[m] = 0U; + pe = Q_NEW(TableEvt, EAT_SIG); + pe->philoNum = m; + QACTIVE_PUBLISH(&pe->super, &me->super); + BSP_displayPhilStat(m, "eating "); +} +m = LEFT(n); /* check the left neighbor */ +n = LEFT(m); /* left fork of the left neighbor */ +if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { + me->fork[m] = USED; + me->fork[n] = USED; + me->isHungry[m] = 0U; + pe = Q_NEW(TableEvt, EAT_SIG); + pe->philoNum = m; + QACTIVE_PUBLISH(&pe->super, &me->super); + BSP_displayPhilStat(m, "eating "); +} + + + + + + + Q_ERROR(); + + + + + + + + + + + + + + + + + BSP_displayPaused(1U); + BSP_displayPaused(0U); + + + + + + + + + uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; +/* philo ID must be in range and he must be not hungry */ +Q_ASSERT((n < N_PHILO) && (me->isHungry[n] == 0U)); +me->isHungry[n] = 1U; +BSP_displayPhilStat(n, "hungry "); + + + + + + + uint8_t n, m; + +n = Q_EVT_CAST(TableEvt)->philoNum; +/* phil ID must be in range and he must be not hungry */ +Q_ASSERT((n < N_PHILO) && (me->isHungry[n] == 0U)); + +BSP_displayPhilStat(n, "thinking"); +m = LEFT(n); +/* both forks of Phil[n] must be used */ +Q_ASSERT((me->fork[n] == USED) && (me->fork[m] == USED)); + +me->fork[m] = FREE; +me->fork[n] = FREE; + + + + + + + + + + + + + + + + + = { /* "opaque" pointers to Philo AO */ + &Philo_inst[0].super, + &Philo_inst[1].super, + &Philo_inst[2].super, + &Philo_inst[3].super, + &Philo_inst[4].super +}; + + + + = &Table_inst.super; /* "opaque" pointer to Table AO */ + + + + uint8_t n; +Philo *me; +for (n = 0U; n < N_PHILO; ++n) { + me = &Philo_inst[n]; + QActive_ctor(&me->super, Q_STATE_CAST(&Philo_initial)); + QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); +} + + + + Table *me = &Table_inst; +uint8_t n; + +QActive_ctor(&me->super, Q_STATE_CAST(&Table_initial)); + +for (n = 0U; n < N_PHILO; ++n) { + me->fork[n] = FREE; + me->isHungry[n] = 0U; +} + + + + + + + #ifndef DPP_H +#define DPP_H + +enum DPPSignals { + EAT_SIG = Q_USER_SIG, /* published by Table to let a philosopher eat */ + DONE_SIG, /* published by Philosopher when done eating */ + PAUSE_SIG, /* published by BSP to pause serving forks */ + SERVE_SIG, /* published by BSP to serve re-start serving forks */ + TEST_SIG, /* published by BSP to test the application */ + MAX_PUB_SIG, /* the last published signal */ + + HUNGRY_SIG, /* posted direclty to Table from hungry Philo */ + TIMEOUT_SIG, /* used by Philosophers for time events */ + MAX_SIG /* the last signal */ +}; + +$declare(Events::TableEvt) + +/* number of philosophers */ +#define N_PHILO ((uint8_t)5) + +$declare(AOs::Philo_ctor) +$declare(AOs::AO_Philo[N_PHILO]) + +$declare(AOs::Table_ctor) +$declare(AOs::AO_Table) + +#ifdef QXK_H + void Test1_ctor(void); + extern QXThread * const XT_Test1; + void Test2_ctor(void); + extern QXThread * const XT_Test2; +#endif /* QXK_H */ + +#endif /* DPP_H */ + + + + + #include "qpc.h" +#include "dpp.h" +#include "bsp.h" + +Q_DEFINE_THIS_FILE + +/* Active object class -----------------------------------------------------*/ +$declare${AOs::Philo} + +#define THINK_TIME \ + (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + (BSP_TICKS_PER_SEC/2U)) +#define EAT_TIME \ + (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + BSP_TICKS_PER_SEC) + +/* helper macro to provide the ID of Philo "me_" */ +#define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) + +$define${AOs::AO_Philo[N_PHILO]} +$define${AOs::Philo_ctor} +$define${AOs::Philo} + + + + #include "qpc.h" +#include "dpp.h" +#include "bsp.h" + +Q_DEFINE_THIS_FILE + +/* Active object class -----------------------------------------------------*/ +$declare${AOs::Table} + +#define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) +#define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) +#define FREE ((uint8_t)0) +#define USED ((uint8_t)1) + +$define${AOs::AO_Table} +$define${AOs::Table_ctor} +$define${AOs::Table} + + + diff --git a/examples/zephyr/dpp/prj.conf b/examples/zephyr/dpp/prj.conf new file mode 100644 index 00000000..5a98af15 --- /dev/null +++ b/examples/zephyr/dpp/prj.conf @@ -0,0 +1,7 @@ +CONFIG_ASSERT=y +CONFIG_ASSERT_LEVEL=2 +CONFIG_NUM_COOP_PRIORITIES=29 +CONFIG_NUM_PREEMPT_PRIORITIES=40 +CONFIG_GPIO=y +CONFIG_REBOOT=y + diff --git a/examples/zephyr/dpp/src/bsp.c b/examples/zephyr/dpp/src/bsp.c new file mode 100644 index 00000000..86aeaa08 --- /dev/null +++ b/examples/zephyr/dpp/src/bsp.c @@ -0,0 +1,269 @@ +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-08-06 +* @version Last updated for version: 7.0.1 +* +* @file +* @ingroup examples +* @brief DPP example, NUCLEO-H743ZIE board, cooperative QV kernel +*/ +#include "qpc.h" +#include "dpp.h" +#include "bsp.h" + +#include +#include +/* other drivers, if necessary ... */ + +Q_DEFINE_THIS_FILE + +/* The devicetree node identifier for the "led0" alias. */ +#define LED0_NODE DT_ALIAS(led0) + +#if DT_NODE_HAS_STATUS(LED0_NODE, okay) +#define LED0 DT_GPIO_LABEL(LED0_NODE, gpios) +#define PIN DT_GPIO_PIN(LED0_NODE, gpios) +#define FLAGS DT_GPIO_FLAGS(LED0_NODE, gpios) +#else +/* A build error here means your board isn't set up to blink an LED. */ +#error "Unsupported board: led0 devicetree alias is not defined" +#define LED0 "" +#define PIN 0 +#define FLAGS 0 +#endif + +/* Local-scope objects -----------------------------------------------------*/ +static uint32_t l_rnd; /* random seed */ +static struct device const *dev_LED0; +static struct k_timer QF_tick_timer; +#ifdef Q_SPY + + /* QSpy source IDs */ + static QSpyId const timerID = { 0U }; + + enum AppRecords { /* application-specific trace records */ + PHILO_STAT = QS_USER, + PAUSED_STAT, + COMMAND_STAT, + CONTEXT_SW + }; + +#endif + +/*..........................................................................*/ +static void QF_tick_function(struct k_timer *tid) { + (void)tid; /* unused parameter */ + QTIMEEVT_TICK_X(0U, &timerID); +} +/*..........................................................................*/ +void BSP_init(void) { + dev_LED0 = device_get_binding(LED0); + Q_ASSERT(dev_LED0 != NULL); + + int ret = gpio_pin_configure(dev_LED0, PIN, GPIO_OUTPUT_ACTIVE | FLAGS); + Q_ASSERT(ret >= 0); + + k_timer_init(&QF_tick_timer, &QF_tick_function, NULL); + + //... + BSP_randomSeed(1234U); + + if (QS_INIT((void *)0) == 0) { /* initialize the QS software tracing */ + Q_ERROR(); + } + + /* object 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(&timerID); + QS_USR_DICTIONARY(PHILO_STAT); + QS_USR_DICTIONARY(COMMAND_STAT); + + /* setup the QS filters... */ + QS_GLB_FILTER(QS_SM_RECORDS); + QS_GLB_FILTER(QS_UA_RECORDS); +} +/*..........................................................................*/ +void BSP_ledOn(void) { + gpio_pin_set(dev_LED0, PIN, true); +} +/*..........................................................................*/ +void BSP_ledOff(void) { + gpio_pin_set(dev_LED0, PIN, false); +} +/*..........................................................................*/ +void BSP_displayPhilStat(uint8_t n, char const *stat) { + if (stat[0] == 'e') { + BSP_ledOn(); + } + else { + BSP_ledOff(); + } + printk("Philo[%d]->%s\n", n, stat); + + QS_BEGIN_ID(PHILO_STAT, AO_Philo[n]->prio) /* app-specific record */ + QS_U8(1, n); /* Philosopher number */ + QS_STR(stat); /* Philosopher status */ + QS_END() /* application-specific record end */ +} +/*..........................................................................*/ +void BSP_displayPaused(uint8_t paused) { + if (paused != 0U) { + //BSP_LED_On(LED2); + } + else { + //BSP_LED_Off(LED2); + } +} +/*..........................................................................*/ +uint32_t BSP_random(void) { /* a very cheap pseudo-random-number generator */ + uint32_t rnd; + + /* Some flating point code is to exercise the VFP... */ + float volatile x = 3.1415926F; + x = x + 2.7182818F; + + /* "Super-Duper" Linear Congruential Generator (LCG) + * LCG(2^32, 3*7*11*13*23, 0, seed) + */ + rnd = l_rnd * (3U*7U*11U*13U*23U); + l_rnd = rnd; /* set for the next time */ + + return (rnd >> 8); +} +/*..........................................................................*/ +void BSP_randomSeed(uint32_t seed) { + l_rnd = seed; +} +/*..........................................................................*/ +void BSP_terminate(int16_t result) { + (void)result; +} + +/* QF callbacks ============================================================*/ +void QF_onStartup(void) { + k_timer_start(&QF_tick_timer, K_MSEC(1), K_MSEC(1)); + printk("QF_onStartup\n"); +} +/*..........................................................................*/ +void QF_onCleanup(void) { + printk("QF_onCleanup\n"); +} + +/*..........................................................................*/ +Q_NORETURN Q_onAssert(char const * const module, int_t const loc) { + /* + * NOTE: add here your application-specific error handling + */ + printk("\nASSERTION in %s:%d\n", module, loc); + QS_ASSERTION(module, loc, 10000U); /* report assertion to QS */ +#ifndef NDEBUG + k_panic(); /* debug build: halt the system for error search... */ +#else + sys_reboot(SYS_REBOOT_COLD); /* release build: reboot the system */ +#endif +} + +/* QS callbacks ============================================================*/ +#ifdef Q_SPY +/*..........................................................................*/ +uint8_t QS_onStartup(void const *arg) { + static uint8_t qsTxBuf[1024]; /* buffer for QS-TX channel */ + static uint8_t qsRxBuf[256]; /* buffer for QS-RX channel */ + + QS_initBuf (qsTxBuf, sizeof(qsTxBuf)); + QS_rxInitBuf(qsRxBuf, sizeof(qsRxBuf)); + + //TBD... + + return 1U; /* return success */ +} +/*..........................................................................*/ +void QS_onCleanup(void) { +} +/*..........................................................................*/ +QSTimeCtr QS_onGetTime(void) { /* NOTE: invoked with interrupts DISABLED */ + //TBD... + return 0U; +} +/*..........................................................................*/ +void QS_onFlush(void) { + //TBD... +} +/*..........................................................................*/ +/*! callback function to reset the target (to be implemented in the BSP) */ +void QS_onReset(void) { + sys_reboot(SYS_REBOOT_COLD); +} +/*..........................................................................*/ +/*! callback function to execute a user command (to be implemented in BSP) */ +void QS_onCommand(uint8_t cmdId, + uint32_t param1, uint32_t param2, uint32_t param3) +{ + (void)cmdId; + (void)param1; + (void)param2; + (void)param3; +} + +#endif /* Q_SPY */ +/*--------------------------------------------------------------------------*/ + +/***************************************************************************** +* NOTE1: +* The QF_AWARE_ISR_CMSIS_PRI constant from the QF port specifies the highest +* ISR priority that is disabled by the QF framework. The value is suitable +* for the NVIC_SetPriority() CMSIS function. +* +* Only ISRs prioritized at or below the QF_AWARE_ISR_CMSIS_PRI level (i.e., +* with the numerical values of priorities equal or higher than +* QF_AWARE_ISR_CMSIS_PRI) are allowed to call the QK_ISR_ENTRY/QK_ISR_ENTRY +* macros or any other QF services. These ISRs are "QF-aware". +* +* 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 +* by which a "QF-unaware" ISR can communicate with the QF framework is by +* triggering a "QF-aware" ISR, which can post/publish events. +* +* NOTE2: +* The QV_onIdle() callback is called with interrupts disabled, because the +* determination of the idle condition might change by any interrupt posting +* an event. QV_onIdle() must internally enable interrupts, ideally +* atomically with putting the CPU to the power-saving mode. +* +* NOTE3: +* The User LED is used to visualize the idle loop activity. The brightness +* of the LED is proportional to the frequency of invcations of the idle loop. +* Please note that the LED is toggled with interrupts locked, so no interrupt +* execution time contributes to the brightness of the User LED. +*/ diff --git a/examples/zephyr/dpp/src/bsp.h b/examples/zephyr/dpp/src/bsp.h new file mode 100644 index 00000000..ad28f8d4 --- /dev/null +++ b/examples/zephyr/dpp/src/bsp.h @@ -0,0 +1,54 @@ +/***************************************************************************** +* Product: BSP for DPP example +* Last updated for version 7.0.0 +* Last updated on 2022-01-21 +* +* Q u a n t u m L e a P s +* --------------------------- +* innovating embedded systems +* +* 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 +* by the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Alternatively, this program may be distributed and modified under the +* terms of Quantum Leaps commercial licenses, which expressly supersede +* the GNU General Public License and are specifically designed for +* licensees interested in retaining the proprietary status of their code. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Contact information: +* +* +*****************************************************************************/ +#ifndef BSP_H +#define BSP_H + +#define BSP_TICKS_PER_SEC 100U + +void BSP_init(void); +void BSP_displayPaused(uint8_t paused); +void BSP_displayPhilStat(uint8_t n, char const *stat); +void BSP_terminate(int16_t result); + +void BSP_randomSeed(uint32_t seed); /* random seed */ +uint32_t BSP_random(void); /* pseudo-random generator */ + +/* for testing... */ +void BSP_wait4PB1(void); +void BSP_ledOn(void); +void BSP_ledOff(void); + +extern QTicker ticker0; + +#endif /* BSP_H */ diff --git a/examples/zephyr/dpp/src/dpp.h b/examples/zephyr/dpp/src/dpp.h new file mode 100644 index 00000000..6145cfc3 --- /dev/null +++ b/examples/zephyr/dpp/src/dpp.h @@ -0,0 +1,92 @@ +/*$file${src::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: dpp.qm +* File: ${src::dpp.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* +*/ +/*$endhead${src::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +#ifndef DPP_H +#define DPP_H + +enum DPPSignals { + EAT_SIG = Q_USER_SIG, /* published by Table to let a philosopher eat */ + DONE_SIG, /* published by Philosopher when done eating */ + PAUSE_SIG, /* published by BSP to pause serving forks */ + SERVE_SIG, /* published by BSP to serve re-start serving forks */ + TEST_SIG, /* published by BSP to test the application */ + MAX_PUB_SIG, /* the last published signal */ + + HUNGRY_SIG, /* posted direclty to Table from hungry Philo */ + TIMEOUT_SIG, /* used by Philosophers for time events */ + MAX_SIG /* the last signal */ +}; + +/*$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${Events::TableEvt} ......................................................*/ +typedef struct { +/* protected: */ + QEvt super; + +/* public: */ + uint8_t philoNum; +} TableEvt; +/*$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/* number of philosophers */ +#define N_PHILO ((uint8_t)5) + +/*$declare${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void); +/*$enddecl${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +extern QActive * const AO_Philo[N_PHILO]; +/*$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ +void Table_ctor(void); +/*$enddecl${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ +extern QActive * const AO_Table; +/*$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +#ifdef QXK_H + void Test1_ctor(void); + extern QXThread * const XT_Test1; + void Test2_ctor(void); + extern QXThread * const XT_Test2; +#endif /* QXK_H */ + +#endif /* DPP_H */ + diff --git a/examples/zephyr/dpp/src/main.c b/examples/zephyr/dpp/src/main.c new file mode 100644 index 00000000..35b1061a --- /dev/null +++ b/examples/zephyr/dpp/src/main.c @@ -0,0 +1,87 @@ +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-05 +* @version Last updated for version: 7.0.1 +* +* @file +* @ingroup examples +* @brief DPP example +*/ +#include "qpc.h" +#include "dpp.h" +#include "bsp.h" + +Q_DEFINE_THIS_FILE + +/*..........................................................................*/ +static QEvt const *tableQueueSto[10]; +K_THREAD_STACK_DEFINE(tableStack, 1024); /* stack storage */ + +static QEvt const *philoQueueSto[N_PHILO][10]; +K_THREAD_STACK_DEFINE(philoStack[N_PHILO], 512); /* stack storage */ + +static QSubscrList subscrSto[MAX_PUB_SIG]; +static QF_MPOOL_EL(TableEvt) smlPoolSto[2*N_PHILO]; /* small pool */ + +int main(void) { + QF_init(); /* initialize the framework and the underlying RT kernel */ + BSP_init(); /* initialize the Board Support Package */ + + /* initialize publish-subscribe... */ + QF_psInit(subscrSto, Q_DIM(subscrSto)); + + /* initialize event pools... */ + QF_poolInit(smlPoolSto, sizeof(smlPoolSto), sizeof(smlPoolSto[0])); + + /* start the active objects... */ + Philo_ctor(); /* instantiate all Philosopher active objects */ + for (uint8_t n = 0U; n < N_PHILO; ++n) { + QActive_setAttr(AO_Philo[n], + 0, /* thread opions */ + "Philo"); /* thread name */ + QACTIVE_START(AO_Philo[n], /* AO to start */ + (uint_fast8_t)(n + 1), /* QP priority of the AO */ + philoQueueSto[n], /* event queue storage */ + Q_DIM(philoQueueSto[n]), /* queue length [events] */ + (void *)philoStack[n], /* stack storage */ + K_THREAD_STACK_SIZEOF(philoStack[n]), /* stack size [bytes] */ + (void *)0); /* initialization param */ + } + Table_ctor(); /* instantiate the Table active object */ + QActive_setAttr(AO_Table, + 0, /* thread opions */ + "Table"); /* thread name */ + QACTIVE_START(AO_Table, /* AO to start */ + (uint_fast8_t)(N_PHILO + 1), /* QP priority of the AO */ + tableQueueSto, /* event queue storage */ + Q_DIM(tableQueueSto), /* queue length [events] */ + (void *)tableStack, /* stack storage */ + K_THREAD_STACK_SIZEOF(tableStack), /* stack size [bytes] */ + (void *)0); /* initialization param */ + + return QF_run(); /* run the QF application */ +} + diff --git a/examples/zephyr/dpp/src/philo.c b/examples/zephyr/dpp/src/philo.c new file mode 100644 index 00000000..8d2e2617 --- /dev/null +++ b/examples/zephyr/dpp/src/philo.c @@ -0,0 +1,253 @@ +/*$file${src::philo.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: dpp.qm +* File: ${src::philo.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* +*/ +/*$endhead${src::philo.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +#include "qpc.h" +#include "dpp.h" +#include "bsp.h" + +Q_DEFINE_THIS_FILE + +/* Active object class -----------------------------------------------------*/ +/*$declare${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ +typedef struct Philo { +/* protected: */ + QActive super; + +/* public: */ + +/* private: */ + QTimeEvt timeEvt; +} Philo; +extern Philo Philo_inst[N_PHILO]; + +/* protected: */ +static QState Philo_initial(Philo * const me, void const * const par); +static QState Philo_thinking(Philo * const me, QEvt const * const e); +static QState Philo_hungry(Philo * const me, QEvt const * const e); +static QState Philo_eating(Philo * const me, QEvt const * const e); +/*$enddecl${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +#define THINK_TIME \ + (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + (BSP_TICKS_PER_SEC/2U)) +#define EAT_TIME \ + (QTimeEvtCtr)((BSP_random() % BSP_TICKS_PER_SEC) + BSP_TICKS_PER_SEC) + +/* helper macro to provide the ID of Philo "me_" */ +#define PHILO_ID(me_) ((uint8_t)((me_) - &Philo_inst[0])) + +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Philo[N_PHILO]} ................................................*/ +QActive * const AO_Philo[N_PHILO] = { /* "opaque" pointers to Philo AO */ + &Philo_inst[0].super, + &Philo_inst[1].super, + &Philo_inst[2].super, + &Philo_inst[3].super, + &Philo_inst[4].super +}; +/*$enddef${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo_ctor} .......................................................*/ +void Philo_ctor(void) { + uint8_t n; + Philo *me; + for (n = 0U; n < N_PHILO; ++n) { + me = &Philo_inst[n]; + QActive_ctor(&me->super, Q_STATE_CAST(&Philo_initial)); + QTimeEvt_ctorX(&me->timeEvt, &me->super, TIMEOUT_SIG, 0U); + } +} +/*$enddef${AOs::Philo_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Philo} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Philo} ............................................................*/ +Philo Philo_inst[N_PHILO]; + +/*${AOs::Philo::SM} ........................................................*/ +static QState Philo_initial(Philo * const me, void const * const par) { + /*${AOs::Philo::SM::initial} */ + static uint8_t registered = (uint8_t)0; /* starts off with 0, per C-standard */ + (void)par; /* unused parameter */ + if (registered == (uint8_t)0) { + registered = (uint8_t)1; + + QS_OBJ_DICTIONARY(&Philo_inst[0]); + QS_OBJ_DICTIONARY(&Philo_inst[0].timeEvt); + QS_OBJ_DICTIONARY(&Philo_inst[1]); + QS_OBJ_DICTIONARY(&Philo_inst[1].timeEvt); + QS_OBJ_DICTIONARY(&Philo_inst[2]); + QS_OBJ_DICTIONARY(&Philo_inst[2].timeEvt); + QS_OBJ_DICTIONARY(&Philo_inst[3]); + QS_OBJ_DICTIONARY(&Philo_inst[3].timeEvt); + QS_OBJ_DICTIONARY(&Philo_inst[4]); + QS_OBJ_DICTIONARY(&Philo_inst[4].timeEvt); + + QS_FUN_DICTIONARY(&Philo_initial); + QS_FUN_DICTIONARY(&Philo_thinking); + QS_FUN_DICTIONARY(&Philo_hungry); + QS_FUN_DICTIONARY(&Philo_eating); + } + QS_SIG_DICTIONARY(HUNGRY_SIG, me); /* signal for each Philos */ + QS_SIG_DICTIONARY(TIMEOUT_SIG, me); /* signal for each Philos */ + + QActive_subscribe(&me->super, EAT_SIG); + QActive_subscribe(&me->super, TEST_SIG); + return Q_TRAN(&Philo_thinking); +} + +/*${AOs::Philo::SM::thinking} ..............................................*/ +static QState Philo_thinking(Philo * const me, QEvt const * const e) { + QState status_; + switch (e->sig) { + /*${AOs::Philo::SM::thinking} */ + case Q_ENTRY_SIG: { + QTimeEvt_armX(&me->timeEvt, THINK_TIME, 0U); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Philo::SM::thinking} */ + case Q_EXIT_SIG: { + QTimeEvt_disarm(&me->timeEvt); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Philo::SM::thinking::TIMEOUT} */ + case TIMEOUT_SIG: { + status_ = Q_TRAN(&Philo_hungry); + break; + } + /*${AOs::Philo::SM::thinking::EAT, DONE} */ + case EAT_SIG: /* intentionally fall through */ + case DONE_SIG: { + /* EAT or DONE must be for other Philos than this one */ + Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Philo::SM::thinking::TEST} */ + case TEST_SIG: { + status_ = Q_HANDLED(); + break; + } + default: { + status_ = Q_SUPER(&QHsm_top); + break; + } + } + return status_; +} + +/*${AOs::Philo::SM::hungry} ................................................*/ +static QState Philo_hungry(Philo * const me, QEvt const * const e) { + QState status_; + switch (e->sig) { + /*${AOs::Philo::SM::hungry} */ + case Q_ENTRY_SIG: { + TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG); + pe->philoNum = PHILO_ID(me); + QACTIVE_POST(AO_Table, &pe->super, me); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Philo::SM::hungry::EAT} */ + case EAT_SIG: { + /*${AOs::Philo::SM::hungry::EAT::[Q_EVT_CAST(TableEvt)->philoNum=~} */ + if (Q_EVT_CAST(TableEvt)->philoNum == PHILO_ID(me)) { + status_ = Q_TRAN(&Philo_eating); + } + else { + status_ = Q_UNHANDLED(); + } + break; + } + /*${AOs::Philo::SM::hungry::DONE} */ + case DONE_SIG: { + /* DONE must be for other Philos than this one */ + Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); + status_ = Q_HANDLED(); + break; + } + default: { + status_ = Q_SUPER(&QHsm_top); + break; + } + } + return status_; +} + +/*${AOs::Philo::SM::eating} ................................................*/ +static QState Philo_eating(Philo * const me, QEvt const * const e) { + QState status_; + switch (e->sig) { + /*${AOs::Philo::SM::eating} */ + case Q_ENTRY_SIG: { + QTimeEvt_armX(&me->timeEvt, EAT_TIME, 0U); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Philo::SM::eating} */ + case Q_EXIT_SIG: { + TableEvt *pe = Q_NEW(TableEvt, DONE_SIG); + pe->philoNum = PHILO_ID(me); + QACTIVE_PUBLISH(&pe->super, &me->super); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Philo::SM::eating::TIMEOUT} */ + case TIMEOUT_SIG: { + status_ = Q_TRAN(&Philo_thinking); + break; + } + /*${AOs::Philo::SM::eating::EAT, DONE} */ + case EAT_SIG: /* intentionally fall through */ + case DONE_SIG: { + /* EAT or DONE must be for other Philos than this one */ + Q_ASSERT(Q_EVT_CAST(TableEvt)->philoNum != PHILO_ID(me)); + status_ = Q_HANDLED(); + break; + } + default: { + status_ = Q_SUPER(&QHsm_top); + break; + } + } + return status_; +} +/*$enddef${AOs::Philo} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/examples/zephyr/dpp/src/table.c b/examples/zephyr/dpp/src/table.c new file mode 100644 index 00000000..e738bd69 --- /dev/null +++ b/examples/zephyr/dpp/src/table.c @@ -0,0 +1,324 @@ +/*$file${src::table.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: dpp.qm +* File: ${src::table.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* SPDX-License-Identifier: GPL-3.0-or-later +* +* This generated code is open source software: you can redistribute it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* NOTE: +* Alternatively, this generated code may be distributed under the terms +* of Quantum Leaps commercial licenses, which expressly supersede the GNU +* General Public License and are specifically designed for licensees +* interested in retaining the proprietary status of their code. +* +* Contact information: +* +* +*/ +/*$endhead${src::table.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +#include "qpc.h" +#include "dpp.h" +#include "bsp.h" + +Q_DEFINE_THIS_FILE + +/* Active object class -----------------------------------------------------*/ +/*$declare${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ +typedef struct Table { +/* protected: */ + QActive super; + +/* public: */ + +/* private: */ + uint8_t fork[N_PHILO]; + uint8_t isHungry[N_PHILO]; +} Table; +extern Table Table_inst; + +/* protected: */ +static QState Table_initial(Table * const me, void const * const par); +static QState Table_active(Table * const me, QEvt const * const e); +static QState Table_serving(Table * const me, QEvt const * const e); +static QState Table_paused(Table * const me, QEvt const * const e); +/*$enddecl${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +#define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1U)) % N_PHILO)) +#define LEFT(n_) ((uint8_t)(((n_) + 1U) % N_PHILO)) +#define FREE ((uint8_t)0) +#define USED ((uint8_t)1) + +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::AO_Table} .........................................................*/ +QActive * const AO_Table = &Table_inst.super; /* "opaque" pointer to Table AO */ +/*$enddef${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table_ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table_ctor} .......................................................*/ +void Table_ctor(void) { + Table *me = &Table_inst; + uint8_t n; + + QActive_ctor(&me->super, Q_STATE_CAST(&Table_initial)); + + for (n = 0U; n < N_PHILO; ++n) { + me->fork[n] = FREE; + me->isHungry[n] = 0U; + } +} +/*$enddef${AOs::Table_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${AOs::Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${AOs::Table} ............................................................*/ +Table Table_inst; + +/*${AOs::Table::SM} ........................................................*/ +static QState Table_initial(Table * const me, void const * const par) { + /*${AOs::Table::SM::initial} */ + uint8_t n; + (void)par; /* unused parameter */ + + QS_OBJ_DICTIONARY(&Table_inst); + + QS_SIG_DICTIONARY(DONE_SIG, (void *)0); /* global signals */ + QS_SIG_DICTIONARY(EAT_SIG, (void *)0); + QS_SIG_DICTIONARY(PAUSE_SIG, (void *)0); + QS_SIG_DICTIONARY(SERVE_SIG, (void *)0); + QS_SIG_DICTIONARY(TEST_SIG, (void *)0); + + QS_SIG_DICTIONARY(HUNGRY_SIG, me); /* signal just for Table */ + + QActive_subscribe(&me->super, DONE_SIG); + QActive_subscribe(&me->super, PAUSE_SIG); + QActive_subscribe(&me->super, SERVE_SIG); + QActive_subscribe(&me->super, TEST_SIG); + + for (n = 0U; n < N_PHILO; ++n) { + me->fork[n] = FREE; + me->isHungry[n] = 0U; + BSP_displayPhilStat(n, "thinking"); + } + + QS_FUN_DICTIONARY(&Table_active); + QS_FUN_DICTIONARY(&Table_serving); + QS_FUN_DICTIONARY(&Table_paused); + + return Q_TRAN(&Table_serving); +} + +/*${AOs::Table::SM::active} ................................................*/ +static QState Table_active(Table * const me, QEvt const * const e) { + QState status_; + switch (e->sig) { + /*${AOs::Table::SM::active::TEST} */ + case TEST_SIG: { + status_ = Q_HANDLED(); + break; + } + /*${AOs::Table::SM::active::EAT} */ + case EAT_SIG: { + Q_ERROR(); + status_ = Q_HANDLED(); + break; + } + default: { + status_ = Q_SUPER(&QHsm_top); + break; + } + } + return status_; +} + +/*${AOs::Table::SM::active::serving} .......................................*/ +static QState Table_serving(Table * const me, QEvt const * const e) { + QState status_; + switch (e->sig) { + /*${AOs::Table::SM::active::serving} */ + case Q_ENTRY_SIG: { + uint8_t n; + for (n = 0U; n < N_PHILO; ++n) { /* give permissions to eat... */ + if ((me->isHungry[n] != 0U) + && (me->fork[LEFT(n)] == FREE) + && (me->fork[n] == FREE)) + { + TableEvt *te; + + me->fork[LEFT(n)] = USED; + me->fork[n] = USED; + te = Q_NEW(TableEvt, EAT_SIG); + te->philoNum = n; + QACTIVE_PUBLISH(&te->super, &me->super); + me->isHungry[n] = 0U; + BSP_displayPhilStat(n, "eating "); + } + } + status_ = Q_HANDLED(); + break; + } + /*${AOs::Table::SM::active::serving::HUNGRY} */ + case HUNGRY_SIG: { + uint8_t n, m; + + n = Q_EVT_CAST(TableEvt)->philoNum; + /* phil ID must be in range and he must be not hungry */ + Q_ASSERT((n < N_PHILO) && (me->isHungry[n] == 0U)); + + BSP_displayPhilStat(n, "hungry "); + m = LEFT(n); + /*${AOs::Table::SM::active::serving::HUNGRY::[bothfree]} */ + if ((me->fork[m] == FREE) && (me->fork[n] == FREE)) { + TableEvt *pe; + me->fork[m] = USED; + me->fork[n] = USED; + pe = Q_NEW(TableEvt, EAT_SIG); + pe->philoNum = n; + QACTIVE_PUBLISH(&pe->super, &me->super); + BSP_displayPhilStat(n, "eating "); + status_ = Q_HANDLED(); + } + /*${AOs::Table::SM::active::serving::HUNGRY::[else]} */ + else { + me->isHungry[n] = 1U; + status_ = Q_HANDLED(); + } + break; + } + /*${AOs::Table::SM::active::serving::DONE} */ + case DONE_SIG: { + uint8_t n, m; + TableEvt *pe; + + n = Q_EVT_CAST(TableEvt)->philoNum; + /* phil ID must be in range and he must be not hungry */ + Q_ASSERT((n < N_PHILO) && (me->isHungry[n] == 0U)); + + BSP_displayPhilStat(n, "thinking"); + m = LEFT(n); + /* both forks of Phil[n] must be used */ + Q_ASSERT((me->fork[n] == USED) && (me->fork[m] == USED)); + + me->fork[m] = FREE; + me->fork[n] = FREE; + m = RIGHT(n); /* check the right neighbor */ + + if ((me->isHungry[m] != 0U) && (me->fork[m] == FREE)) { + me->fork[n] = USED; + me->fork[m] = USED; + me->isHungry[m] = 0U; + pe = Q_NEW(TableEvt, EAT_SIG); + pe->philoNum = m; + QACTIVE_PUBLISH(&pe->super, &me->super); + BSP_displayPhilStat(m, "eating "); + } + m = LEFT(n); /* check the left neighbor */ + n = LEFT(m); /* left fork of the left neighbor */ + if ((me->isHungry[m] != 0U) && (me->fork[n] == FREE)) { + me->fork[m] = USED; + me->fork[n] = USED; + me->isHungry[m] = 0U; + pe = Q_NEW(TableEvt, EAT_SIG); + pe->philoNum = m; + QACTIVE_PUBLISH(&pe->super, &me->super); + BSP_displayPhilStat(m, "eating "); + } + status_ = Q_HANDLED(); + break; + } + /*${AOs::Table::SM::active::serving::EAT} */ + case EAT_SIG: { + Q_ERROR(); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Table::SM::active::serving::PAUSE} */ + case PAUSE_SIG: { + status_ = Q_TRAN(&Table_paused); + break; + } + default: { + status_ = Q_SUPER(&Table_active); + break; + } + } + return status_; +} + +/*${AOs::Table::SM::active::paused} ........................................*/ +static QState Table_paused(Table * const me, QEvt const * const e) { + QState status_; + switch (e->sig) { + /*${AOs::Table::SM::active::paused} */ + case Q_ENTRY_SIG: { + BSP_displayPaused(1U); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Table::SM::active::paused} */ + case Q_EXIT_SIG: { + BSP_displayPaused(0U); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Table::SM::active::paused::SERVE} */ + case SERVE_SIG: { + status_ = Q_TRAN(&Table_serving); + break; + } + /*${AOs::Table::SM::active::paused::HUNGRY} */ + case HUNGRY_SIG: { + uint8_t n = Q_EVT_CAST(TableEvt)->philoNum; + /* philo ID must be in range and he must be not hungry */ + Q_ASSERT((n < N_PHILO) && (me->isHungry[n] == 0U)); + me->isHungry[n] = 1U; + BSP_displayPhilStat(n, "hungry "); + status_ = Q_HANDLED(); + break; + } + /*${AOs::Table::SM::active::paused::DONE} */ + case DONE_SIG: { + uint8_t n, m; + + n = Q_EVT_CAST(TableEvt)->philoNum; + /* phil ID must be in range and he must be not hungry */ + Q_ASSERT((n < N_PHILO) && (me->isHungry[n] == 0U)); + + BSP_displayPhilStat(n, "thinking"); + m = LEFT(n); + /* both forks of Phil[n] must be used */ + Q_ASSERT((me->fork[n] == USED) && (me->fork[m] == USED)); + + me->fork[m] = FREE; + me->fork[n] = FREE; + status_ = Q_HANDLED(); + break; + } + default: { + status_ = Q_SUPER(&Table_active); + break; + } + } + return status_; +} +/*$enddef${AOs::Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/include/qassert.h b/include/qassert.h index c211a55a..8f759c74 100644 --- a/include/qassert.h +++ b/include/qassert.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qassert.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qassert.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,21 +32,18 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qassert.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-23 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief Customizable and memory-efficient assertions for embedded systems -* @ingroup qp -*/ -#ifndef QASSERT_H -#define QASSERT_H - -/*! +* @brief Customizable and memory-efficient Design by Contract (DbC) +* for embedded systems +* * @note * This header file can be used in C, C++, and mixed C/C++ programs. * @@ -43,268 +53,361 @@ * __especially__ in the production code. Instead, the assertion handler * Q_onAssert() should be very carefully designed and tested. */ +#ifndef QASSERT_H +#define QASSERT_H -#ifdef Q_NASSERT /* Q_NASSERT defined--assertion checking disabled */ - - /* provide dummy (empty) definitions that don't generate any code... */ - #define Q_DEFINE_THIS_FILE - #define Q_DEFINE_THIS_MODULE(name_) - #define Q_ASSERT(test_) ((void)0) - #define Q_ASSERT_ID(id_, test_) ((void)0) - #define Q_ALLEGE(test_) ((void)(test_)) - #define Q_ALLEGE_ID(id_, test_) ((void)(test_)) - #define Q_ERROR() ((void)0) - #define Q_ERROR_ID(id_) ((void)0) - -#else /* Q_NASSERT not defined--assertion checking enabled */ - -#ifndef QP_VERSION /* is quassert.h used outside QP? */ - - /* provide typedefs so that qassert.h could be used "standalone"... */ - - /*! typedef for assertions-ids and line numbers in assertions. - * @description - * This typedef specifies integer type for exclusive use in assertions. - * Use of this type, rather than plain 'int', is in compliance - * with the MISRA-C 2012 Dir 4.6 (adv). - */ - typedef int int_t; - -#endif - - /*! Define the file name (with `__FILE__`) for assertions in this file - * @description - * Macro to be placed at the top of each C/C++ module to define the - * single instance of the file name string to be used in reporting - * assertions in this module. - * - * @note The file name string literal is defined by means of the standard - * preprocessor macro `__FILE__`. However, please note that, depending - * on the compiler, the `__FILE__` macro might contain the whole path name - * to the file, which might be inconvenient to log assertions. - * @note This macro should __not__ be terminated by a semicolon. - * @sa Q_DEFINE_THIS_MODULE() - */ - #define Q_DEFINE_THIS_FILE \ - static char const Q_this_module_[] = __FILE__; - - /*! Define the user-specified module name for assertions in this file. - * @description - * Macro to be placed at the top of each C/C++ module to define the - * single instance of the module name string to be used in reporting - * assertions in this module. This macro takes the user-supplied parameter - * @p name_ instead of `__FILE__` to precisely control the name of the - * module. - * - * @param[in] name_ string constant representing the module name - * - * @note This macro should __not__ be terminated by a semicolon. - */ - #define Q_DEFINE_THIS_MODULE(name_) \ - static char const Q_this_module_[] = name_; - - /*! General purpose assertion. - * @description - * Makes sure the @p test_ parameter is TRUE. Calls the Q_onAssert() - * callback if the @p test_ expression evaluates to FALSE. This - * macro identifies the assertion location within the file by means - * of the standard `__LINE__` macro. - * - * @param[in] test_ Boolean expression - * - * @note the @p test_ is __not__ evaluated if assertions are disabled - * with the #Q_NASSERT switch. - */ - #define Q_ASSERT(test_) ((test_) \ - ? (void)0 : Q_onAssert(&Q_this_module_[0], __LINE__)) - - /*! General purpose assertion with user-specified assertion-id. - * @description - * Makes sure the @p test_ parameter is TRUE. Calls the Q_onAssert() - * callback if the @p test_ evaluates to FALSE. This assertion takes the - * user-supplied parameter @p id_ to identify the location of this - * assertion within the file. This avoids the volatility of using line - * numbers, which change whenever a line of code is added or removed - * upstream from the assertion. - * - * @param[in] id_ ID number (unique within the module) of the assertion - * @param[in] test_ Boolean expression - * - * @note the @p test_ expression is __not__ evaluated if assertions are - * disabled with the #Q_NASSERT switch. - */ - #define Q_ASSERT_ID(id_, test_) ((test_) \ - ? (void)0 : Q_onAssert(&Q_this_module_[0], (id_))) - - /*! General purpose assertion that __always__ evaluates the @p test_ - * expression. - * @description - * Like the Q_ASSERT() macro, except it __always__ evaluates the @p test_ - * expression even when assertions are disabled with the #Q_NASSERT macro. - * However, when the #Q_NASSERT macro is defined, the Q_onAssert() - * callback is __not__ called, even if @p test_ evaluates to FALSE. - * - * @param[in] test_ Boolean expression (__always__ evaluated) - * - * @sa #Q_ALLEGE_ID - */ - #define Q_ALLEGE(test_) Q_ASSERT(test_) - - /*! General purpose assertion with user-specified assertion-id that - * __always__ evaluates the @p test_ expression. - * @description - * Like the Q_ASSERT_ID() macro, except it __always__ evaluates the - * @p test_ expression even when assertions are disabled with the - * #Q_NASSERT macro. However, when the #Q_NASSERT macro is defined, the - * Q_onAssert() callback is __not__ called, even if @p test_ evaluates - * to FALSE. - * - * @param[in] id_ ID number (unique within the module) of the assertion - * @param[in] test_ Boolean expression - */ - #define Q_ALLEGE_ID(id_, test_) Q_ASSERT_ID((id_), (test_)) - - /*! Assertion for a wrong path through the code. - * @description - * Calls the Q_onAssert() callback if ever executed. - * - * @note Does noting if assertions are disabled with the #Q_NASSERT switch. - */ - #define Q_ERROR() \ - Q_onAssert(&Q_this_module_[0], __LINE__) - - /*! Assertion with user-specified assertion-id for a wrong path - * @description - * Calls the Q_onAssert() callback if ever executed. This assertion - * takes the user-supplied parameter @p id_ to identify the location of - * this assertion within the file. This avoids the volatility of using - * line numbers, which change whenever a line of code is added or removed - * upstream from the assertion. - * - * @param[in] id_ ID number (unique within the module) of the assertion - * - * @note Does noting if assertions are disabled with the #Q_NASSERT switch. - */ - #define Q_ERROR_ID(id_) \ - Q_onAssert(&Q_this_module_[0], (id_)) - -#endif /* Q_NASSERT */ - -/*==========================================================================*/ #ifdef __cplusplus extern "C" { #endif -#ifndef Q_NORETURN - /*! no-return function specifier */ - #define Q_NORETURN void -#endif /* Q_NORETURN */ +#ifndef QP_VERSION /* is quassert.h used outside QP? */ -/*! Callback function invoked in case of any assertion failure. -* @description + /* provide facilities so that qassert.h could be used "standalone"... */ + + /*! Alias for assertions-ids and line numbers in assertions. + * + * @details + * This typedef specifies integer type in compliance with the + * MISRA-C 2012 Dir 4.6 (adv). + */ + typedef int int_t; + + /*! Helper macro to calculate static dimension of a 1-dim `array_` + * + * @param array_ 1-dimensional array + * @returns the length of the array (number of elements it can hold) + */ + #define Q_DIM(array_) (sizeof(array_) / sizeof((array_)[0U])) + +#endif + +/*$declare${DbC} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${DbC::int_t} ............................................................*/ +/*! typedef for assertions-ids and line numbers in assertions. +* +* @details +* This typedef specifies integer type for exclusive use in assertions. +* Use of this type, rather than plain 'int', is in compliance +* with the MISRA-C 2012 Dir 4.6 (adv). +*/ +#ifndef QP_VERSION +typedef int int_t; +#endif /* ndef QP_VERSION */ + +/*${DbC::Q_NORETURN} .......................................................*/ +/*! no-return function specifier */ +#ifndef Q_NORETURN +#define Q_NORETURN void +#endif /* ndef Q_NORETURN */ + +/*${DbC::Q_DEFINE_THIS_FILE} ...............................................*/ +/*! Define the file name (with `__FILE__`) for assertions in this file +* +* @details +* Macro to be placed at the top of each C/C++ module to define the +* single instance of the file name string to be used in reporting +* assertions in this module. +* +* @note +* The file name string literal is defined by means of the standard +* preprocessor macro `__FILE__`. However, please note that, depending +* on the compiler, the `__FILE__` macro might contain the whole path name +* to the file, which might be inconvenient to log assertions. +* +* @attention +* This macro should **not** be terminated by a semicolon. +* +* @sa Q_DEFINE_THIS_MODULE() +*/ +#define Q_DEFINE_THIS_FILE Q_DEFINE_THIS_MODULE(__FILE__) + +/*${DbC::Q_DEFINE_THIS_MODULE} .............................................*/ +#ifndef Q_NASSERT +/*! Define the user-specified module name for assertions in this file. +* +* @details +* Macro to be placed at the top of each C/C++ module to define the +* single instance of the module name string to be used in reporting +* assertions in this module. This macro takes the user-supplied parameter +* @p name_ instead of `__FILE__` to precisely control the name of the +* module. +* +* @param[in] name_ string constant representing the module name +* +* @note +* This macro should **not** be terminated by a semicolon. +*/ +#define Q_DEFINE_THIS_MODULE(name_) \ + static char const Q_this_module_[] = name_; +#endif /* ndef Q_NASSERT */ + +/*${DbC::Q_DEFINE_THIS_MODULE} .............................................*/ +#ifdef Q_NASSERT +/*! inactive version of Q_DEFINE_THIS_MODULE() */ +#define Q_DEFINE_THIS_MODULE(name_) +#endif /* def Q_NASSERT */ + +/*${DbC::Q_ASSERT_ID} ......................................................*/ +#ifndef Q_NASSERT +/*! General purpose assertion with user-specified ID number. +* +* @details +* Makes sure the `test_` parameter is TRUE. Calls the Q_onAssert() +* callback if the `test_` evaluates to FALSE. This assertion takes the +* user-supplied parameter @p id_ to identify the location of this +* assertion within the file. This avoids the volatility of using line +* numbers, which change whenever a line of code is added or removed +* upstream from the assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression to check +* +* @note +* The `test_` expression is **not** evaluated if assertions are +* disabled with the ::Q_NASSERT switch. +*/ +#define Q_ASSERT_ID(id_, expr_) ((expr_) \ + ? ((void)0) : Q_onAssert(&Q_this_module_[0], (id_))) +#endif /* ndef Q_NASSERT */ + +/*${DbC::Q_ASSERT_ID} ......................................................*/ +#ifdef Q_NASSERT +/*! inactive version of Q_ASSERT_ID() */ +#define Q_ASSERT_ID(id_, expr_) ((void)0) +#endif /* def Q_NASSERT */ + +/*${DbC::Q_ERROR_ID} .......................................................*/ +#ifndef Q_NASSERT +/*! Assertion with user-specified ID for a wrong path through the code +* +* @details +* Calls the Q_onAssert() callback if ever executed. This assertion +* takes the user-supplied parameter `id_` to identify the location of +* this assertion within the file. This avoids the volatility of using +* line numbers, which change whenever a line of code is added or removed +* upstream from the assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* +* @note +* Does noting if assertions are disabled with the ::Q_NASSERT switch. +*/ +#define Q_ERROR_ID(id_) Q_onAssert(&Q_this_module_[0], (id_)) +#endif /* ndef Q_NASSERT */ + +/*${DbC::Q_ERROR_ID} .......................................................*/ +#ifdef Q_NASSERT +/*! inactive version of Q_ERROR_ID() */ +#define Q_ERROR_ID(id_) ((void)0) +#endif /* def Q_NASSERT */ + +/*${DbC::Q_ALLEGE_ID} ......................................................*/ +#ifndef Q_NASSERT +/*! General purpose assertion with user-specified ID number that +* **always** evaluates the `expr_` expression. +* +* @details +* Like the Q_ASSERT_ID() macro, except it **always** evaluates the +* `expr_` expression even when assertions are disabled with the +* ::Q_NASSERT macro. However, when the ::Q_NASSERT macro is defined, the +* Q_onAssert() callback is **not** called, even if `expr_` evaluates +* to FALSE. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression to check +*/ +#define Q_ALLEGE_ID(id_, expr_) Q_ASSERT_ID((id_), (expr_)) +#endif /* ndef Q_NASSERT */ + +/*${DbC::Q_ALLEGE_ID} ......................................................*/ +#ifdef Q_NASSERT +/*! inactive version of Q_ALLEGE_ID() +* +* @attention +* The expression `expr_` **is** executed. +*/ +#define Q_ALLEGE_ID(id_, expr_) ((void)(expr_)) +#endif /* def Q_NASSERT */ + +/*${DbC::Q_REQUIRE_ID} .....................................................*/ +/*! Assertion for checking preconditions. +* +* @details +* This macro is equivalent to Q_ASSERT_ID(), except the name provides a better +* documentation of the intention of this assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression +*/ +#define Q_REQUIRE_ID(id_, expr_) Q_ASSERT_ID((id_), (expr_)) + +/*${DbC::Q_REQUIRE} ........................................................*/ +/*! Assertion for checking preconditions (based on __LINE__). +* +* @details +* Equivalent to Q_ASSERT(), except the name provides a better documentation +* of the intention of this assertion. +* +* @param[in] expr_ Boolean expression +*/ +#define Q_REQUIRE(expr_) Q_REQUIRE_ID(__LINE__, (expr_)) + +/*${DbC::Q_ENSURE_ID} ......................................................*/ +/*! Assertion for checking postconditions. +* +* @details +* This macro is equivalent to Q_ASSERT_ID(), except the name provides a better +* documentation of the intention of this assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression +*/ +#define Q_ENSURE_ID(id_, expr_) Q_ASSERT_ID((id_), (expr_)) + +/*${DbC::Q_ENSURE} .........................................................*/ +/*! Assertion for checking postconditions. +* +* @details +* Equivalent to Q_ASSERT(), except the name provides a better documentation +* of the intention of this assertion. +* +* @param[in] expr_ Boolean expression +*/ +#define Q_ENSURE(expr_) Q_ENSURE_ID(__LINE__, (expr_)) + +/*${DbC::Q_INVARIANT_ID} ...................................................*/ +/*! Assertion for checking invariants. +* +* @details +* Equivalent to Q_ASSERT(), except the name provides a better documentation +* of the intention of this assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression +*/ +#define Q_INVARIANT_ID(id_, expr_) Q_ASSERT_ID((id_), (expr_)) + +/*${DbC::Q_INVARIANT} ......................................................*/ +/*! Assertion for checking invariants. +* +* @details +* Equivalent to Q_ASSERT(), except the name provides a better documentation +* of the intention of this assertion. +* +* @param[in] expr_ Boolean expression +*/ +#define Q_INVARIANT(expr_) Q_INVARIANT_ID(__LINE__, (expr_)) + +/*${DbC::Q_ASSERT} .........................................................*/ +/*! Assertion for a wrong path through the code (based on __LINE__) +* +* @details +* Calls the Q_onAssert() callback if ever executed. +* +* @note +* This macro identifies the problem location with the line number, +* which might change as the code is modified. +* +* @sa Q_ASSERT_ID() +*/ +#define Q_ASSERT(expr_) Q_ASSERT_ID(__LINE__, (expr_)) + +/*${DbC::Q_ERROR} ..........................................................*/ +/*! Assertion for a wrong path through the code +* +* @details +* Calls the Q_onAssert() callback if ever executed. +* +* @note +* This macro identifies the problem location with the line number, +* which might change as the code is modified. +* +* @sa Q_ERROR_ID() +*/ +#define Q_ERROR() Q_ERROR_ID(__LINE__) + +/*${DbC::Q_ALLEGE} .........................................................*/ +/*! General purpose assertion with user-specified ID number that +* **always** evaluates the `expr_` expression. +* +* @details +* Like the Q_ASSERT_ID() macro, except it **always** evaluates the +* `expr_` expression even when assertions are disabled with the +* ::Q_NASSERT macro. However, when the ::Q_NASSERT macro is defined, the +* Q_onAssert() callback is **not** called, even if `expr_` evaluates +* to FALSE. +* +* @param[in] expr_ Boolean expression to check +* +* @sa Q_ALLEGE_ID() +*/ +#define Q_ALLEGE(expr_) Q_ALLEGE_ID(__LINE__, (expr_)) + +/*${DbC::Q_ASSERT_STATIC} ..................................................*/ +/*! Static (compile-time) assertion. +* +* @details +* This type of assertion deliberately causes a compile-time error when +* the `expr_` Boolean expression evaluates to FALSE. The macro exploits +* the fact that in C/C++ a dimension of an array cannot be negative. +* The compile-time assertion has no runtime side effects. +* +* @param[in] expr_ Compile-time Boolean expression +* +* @note +* The static assertion macro is provided for backwards compatibility with +* older C standards. Newer C11 supports `_Static_assert()`, which should +* be used instead of Q_ASSERT_STATIC(). +*/ +#define Q_ASSERT_STATIC(expr_) extern int_t Q_static_assert_[(expr_) ? 1 : -1] + +/*${DbC::Q_ASSERT_COMPILE} .................................................*/ +/*! Static (compile-time) assertion. +* +* @deprecated +* Use Q_ASSERT_STATIC() or better yet `_Static_assert()` instead. +*/ +#define Q_ASSERT_COMPILE(expr_) Q_ASSERT_STATIC(expr_) + +/*${DbC::Q_onAssert} .......................................................*/ +/*! Callback function invoked in case of an assertion failure. +* +* @details * This is an application-specific callback function needs to be defined in * the application to perform the clean system shutdown and perhaps a reset. -* +* The Q_onAssert() function is the last line of defense after the +* system failure and its implementation shouild be very **carefully** +* designed and **tested** under various fault conditions, including but +* not limited to: stack overflow, stack corruption, or calling Q_onAssert() +* from an interrupt. + * @param[in] module name of the file/module in which the assertion failed * (constant, zero-terminated C string) * @param[in] location location of the assertion within the module. This could * be a line number or a user-specified ID-number. * -* @note This callback function should _not_ return, as continuation after -* an assertion failure does not make sense. +* @returns +* This callback function should **not return** (see ::Q_NORETURN), +* as continuation after an assertion failure does not make sense. * -* @note The Q_onAssert() function is the last line of defense after the -* system failure and its implementation shouild be very __carefully__ -* designed and __tested__ under various fault conditions, including but -* not limited to: stack overflow, stack corruption, or calling Q_onAssert() -* from an interrupt. +* @note +* It is typically a **bad idea** to implement Q_onAssert() as an endless +* loop that ties up the CPU. During debuggin, Q_onAssert() is an ideal +* place to put a breakpoint. * -* @note It is typically a __bad idea__ to implement Q_onAssert() as an -* endless loop that ties up the CPU. During debuggin, Q_onAssert() is an -* ideal place to put a breakpoint. -* -* Called by the following macros: #Q_ASSERT, #Q_REQUIRE, #Q_ENSURE, -* #Q_ERROR, #Q_ALLEGE as well as #Q_ASSERT_ID, #Q_REQUIRE_ID, #Q_ENSURE_ID, -* #Q_ERROR_ID, and #Q_ALLEGE_ID. +* Called by the following: Q_ASSERT_ID(), Q_ERROR_ID(), Q_REQUIRE_ID(), +* Q_ENSURE_ID(), Q_INVARIANT_ID() and Q_ALLEGE_ID() as well as: +* Q_ASSERT(), Q_ERROR(), Q_REQUIRE(), Q_ENSURE(), Q_INVARIANT(), +* and Q_ALLEGE(). */ -Q_NORETURN Q_onAssert(char const * const module, int_t const location); +Q_NORETURN Q_onAssert( + char const * module, + int_t location); +/*$enddecl${DbC} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #ifdef __cplusplus } #endif -/*! Assertion for checking preconditions. -* @description -* This macro is equivalent to #Q_ASSERT, except the name provides a better -* documentation of the intention of this assertion. -* -* @param[in] test_ Boolean expression -*/ -#define Q_REQUIRE(test_) Q_ASSERT(test_) - -/*! Assertion for checking preconditions with user-specified assertion-id. -* @description -* Equivalent to #Q_ASSERT_ID, except the macro name provides a better -* documentation of the intention of this assertion. -* -* @param[in] id_ ID number (unique within the module) of the assertion -* @param[in] test_ Boolean expression -*/ -#define Q_REQUIRE_ID(id_, test_) Q_ASSERT_ID((id_), (test_)) - -/*! Assertion for checking postconditions. -* @description -* Equivalent to #Q_ASSERT, except the macro name provides a better -* documentation of the intention of this assertion. -* -* @param[in] test_ Boolean expression -*/ -#define Q_ENSURE(test_) Q_ASSERT(test_) - -/*! Assertion for checking postconditions with user-specified assertion-id. -* @description -* Equivalent to #Q_ASSERT_ID, except the name provides a better documentation -* of the intention of this assertion. -* -* @param[in] id_ ID number (unique within the module) of the assertion -* @param[in] test_ Boolean expression -*/ -#define Q_ENSURE_ID(id_, test_) Q_ASSERT_ID((id_), (test_)) - -/*! Assertion for checking invariants. -* @description -* Equivalent to #Q_ASSERT, except the macro name provides a better -* documentation of the intention of this assertion. -* -* @param[in] test_ Boolean expression -*/ -#define Q_INVARIANT(test_) Q_ASSERT(test_) - -/*! Assertion for checking invariants with user-specified assertion-id. -* @description -* Equivalent to #Q_ASSERT_ID, except the macro name provides a better -* documentation of the intention of this assertion. -* -* @param[in] id_ ID number (unique within the module) of the assertion -* @param[in] test_ Boolean expression -*/ -#define Q_INVARIANT_ID(id_, test_) Q_ASSERT_ID((id_), (test_)) - -/*! Static (compile-time) assertion. -* @description -* This type of assertion deliberately causes a compile-time error when -* the @p test_ evaluates to FALSE. The macro exploits the fact that in C/C++ -* a dimension of an array cannot be negative. The compile-time assertion has -* no runtime side effects. -* -* @param[in] test_ Compile-time Boolean expression -*/ -#define Q_ASSERT_STATIC(test_) \ - extern int_t Q_assert_static[(test_) ? 1 : -1] - -#define Q_ASSERT_COMPILE(test_) Q_ASSERT_STATIC(test_) - -/*! Helper macro to calculate static dimension of a 1-dim @p array_ */ -#define Q_DIM(array_) (sizeof(array_) / sizeof((array_)[0U])) - #endif /* QASSERT_H */ diff --git a/include/qep.h b/include/qep.h index cea57fdd..14742877 100644 --- a/include/qep.h +++ b/include/qep.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qep.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qep.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,559 +32,194 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qep.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-27 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief Public QEP/C interface -* @ingroup qep -* @rtr{RQP001} @rtr{RQP101} +* @brief QEP/C platform-independent public interface. +* +* @tr{RQP001} @tr{RQP101} */ #ifndef QEP_H #define QEP_H /*==========================================================================*/ -/*! @addtogroup qp -* @{ -*/ -/*! The current QP version as a decimal constant XXYZ, where XX is a 2-digit +/*$declare${version} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${version::QP_VERSION} ...................................................*/ +/*! The current QP version as an unsigned number +* +* @details +* ::QP_VERSION is a decimal constant, where XX is a 1-digit or 2-digit * major version number, Y is a 1-digit minor version number, and Z is * a 1-digit release number. */ -#define QP_VERSION 700U +#define QP_VERSION 701U -/*! The current QP version number string of the form XX.Y.Z, where XX is -* a 2-digit major version number, Y is a 1-digit minor version number, -* and Z is a 1-digit release number. +/*${version::QP_VERSION_STR} ...............................................*/ +/*! The current QP version as a zero terminated string literal. +* +* @details +* ::QP_VERSION_STR is of the form "XX.Y.Z", where XX is a 1-or 2-digit +* major version number, Y is a 1-digit minor version number, and Z is +* a 1-digit release number. */ -#define QP_VERSION_STR "7.0.0" +#define QP_VERSION_STR "7.0.1" -/*! Encrypted current QP release (7.0.0) and date (2022-01-31) -*/ -#define QP_RELEASE 0x7CCAAA13U +/*${version::QP_RELEASE} ...................................................*/ +/*! Encrypted current QP release (7.0.1) and date (2022-06-30) */ +#define QP_RELEASE 0x7C7E85E2U -/*==========================================================================*/ -/* typedefs for basic numerical types; MISRA-C 2012 Dir 4.6(A). */ +/*${version::QP_versionStr[8]} .............................................*/ +/*! the current QP version number string in ROM, based on #QP_VERSION_STR */ +extern char const QP_versionStr[8]; +/*$enddecl${version} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${glob-types} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*! typedef for line numbers in assertions and return from QF_run() */ -typedef signed int int_t; +/*${glob-types::int_t} .....................................................*/ +/*! alias for line numbers in assertions and return from QF_run() */ +typedef int int_t; -/*! typedef for enumerations used for event signals */ -typedef signed int enum_t; +/*${glob-types::enum_t} ....................................................*/ +/*! alias for enumerations used for event signals */ +typedef int enum_t; -/*! IEEE 754 32-bit floating point number, MISRA-C 2012 Dir 4.6(A) -* @note QP does not use floating-point types anywhere in the internal +/*${glob-types::float32_t} .................................................*/ +/*! alias for IEEE 754 32-bit floating point number, +* MISRA-C 2012 Dir 4.6(A) +* +* @note +* QP does not use floating-point types anywhere in the internal * implementation, except in QS software tracing, where utilities for * output of floating-point numbers are provided for application-specific * trace records. */ typedef float float32_t; -/*! IEEE 754 64-bit floating point number, MISRA-C 2012 Dir 4.6(A) -* @note QP does not use floating-point types anywhere in the internal +/*${glob-types::float64_t} .................................................*/ +/*! alias for IEEE 754 64-bit floating point number, +* MISRA-C 2012 Dir 4.6(A) +* +* @note +* QP does not use floating-point types anywhere in the internal * implementation, except in QS software tracing, where utilities for * output of floating-point numbers are provided for application-specific * trace records. */ typedef double float64_t; +/*$enddecl${glob-types} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QEP-config} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*! the current QP version number string in ROM, based on #QP_VERSION_STR */ -extern char const QP_versionStr[7]; - -/*! @} */ -/*==========================================================================*/ +/*${QEP-config::Q_SIGNAL_SIZE} .............................................*/ +/*! The size (in bytes) of the signal of an event. Valid values: +* 1U, 2U, or 4U; default 2U +* +* @details +* This macro can be defined in the QEP port file (qep_port.h) to +* configure the ::QSignal type. When the macro is not defined, the +* default of 2 bytes is applied. +*/ #ifndef Q_SIGNAL_SIZE - - /*! The size (in bytes) of the signal of an event. Valid values: - * 1U, 2U, or 4U; default 2U - * @description - * This macro can be defined in the QEP port file (qep_port.h) to - * configure the ::QSignal type. When the macro is not defined, the - * default of 2 bytes is applied. - * - * @rtr{RQP002A} - */ - #define Q_SIGNAL_SIZE 2U -#endif -#if (Q_SIGNAL_SIZE == 1U) - typedef uint8_t QSignal; -#elif (Q_SIGNAL_SIZE == 2U) - /*! QSignal represents the signal of an event. - * @description - * The relationship between an event and a signal is as follows. A signal - * in UML is the specification of an asynchronous stimulus that triggers - * reactions, and as such is an essential part of an event. - * (The signal conveys the type of the occurrence-what happened?) - * However, an event can also contain additional quantitative information - * about the occurrence in form of event parameters. - * - * @rtr{RQP002A} - */ - typedef uint16_t QSignal; -#elif (Q_SIGNAL_SIZE == 4U) - typedef uint32_t QSignal; -#else - #error "Q_SIGNAL_SIZE defined incorrectly, expected 1U, 2U, or 4U" -#endif +#define Q_SIGNAL_SIZE 2U +#endif /* ndef Q_SIGNAL_SIZE */ +/*$enddecl${QEP-config} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*==========================================================================*/ -/*! Event class -* @description -* QEvt represents events without parameters and serves as the base class +/*$declare${QEP} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QEP::QSignal} ..........................................................*/ +/*! ::QSignal represents the signal of an event +* +* @details +* The relationship between an event and a signal is as follows. A signal +* in UML is the specification of an asynchronous stimulus that triggers +* reactions, and as such is an essential part of an event. (The signal +* conveys the type of the occurrence--what happened?) However, an event +* can also contain additional quantitative information about the +* occurrence in form of event parameters. +*/ +#if (Q_SIGNAL_SIZE == 2U) +typedef uint16_t QSignal; +#endif /* (Q_SIGNAL_SIZE == 2U) */ + +/*${QEP::QSignal} ..........................................................*/ +#if (Q_SIGNAL_SIZE == 1U) +typedef uint8_t QSignal; +#endif /* (Q_SIGNAL_SIZE == 1U) */ + +/*${QEP::QSignal} ..........................................................*/ +#if (Q_SIGNAL_SIZE == 4U) +typedef uint16_t QSignal; +#endif /* (Q_SIGNAL_SIZE == 4U) */ + +/*${QEP::QEvt} .............................................................*/ +/*! @brief Event class +* @class QEvt +* +* @details +* ::QEvt represents events without parameters and serves as the base class * for derivation of events with parameters. * +* @tr{RQP001} @tr{RQP004} +* @tr{AQP210} +* * @usage * The following example illustrates how to add an event parameter by -* derivation of the QEvt class. Please note that the QEvt member +* derivation of the ::QEvt class. Please note that the ::QEvt member * super is defined as the FIRST member of the derived struct. * @include qep_qevt.c -* -* @rtr{RQP001} @rtr{RQP004} */ typedef struct { - QSignal sig; /*!< @public signal of the event instance @rtr{RQP002} */ - uint8_t poolId_; /*!< @private pool ID (0 for static event) @rtr{RQP003} */ - uint8_t volatile refCtr_; /*!< @private reference counter @rtr{RQP003} */ +/* public: */ + + /*! Signal of the event. + * @public @memberof QEvt + * + * @tr{RQP002} + */ + QSignal sig; + +/* private: */ + + /*! Pool ID (==0 for immutable event) + * @private @memberof QEvt + * + * @tr{RQP003} + */ + uint8_t poolId_; + + /*! Reference counter (for mutable events) + * @private @memberof QEvt + * + * @tr{RQP003} + */ + uint8_t volatile refCtr_; } QEvt; -#ifdef Q_EVT_CTOR /* Shall the constructor for the QEvt class be provided? */ +/* public: */ /*! Custom event constructor * @public @memberof QEvt -* @rtr{RQP005} -*/ -QEvt *QEvt_ctor(QEvt * const me, enum_t const sig); - -#endif - -/*==========================================================================*/ -/*! Perform downcast of an event onto a subclass of ::QEvt @p class_ -* @description -* ::QEvt represents events without parameters and serves as the base class -* This macro encapsulates the downcast of ::QEvt pointers, which violates -* MISRA-C 2012 Rule 11.3(R) "A cast shall not be performed between a -* pointer to object type and a pointer to a different object type". This -* macro helps to localize this deviation. * -* @rtr{RQP003} +* @tr{RQP005} */ -#define Q_EVT_CAST(class_) ((class_ const *)e) +#ifdef Q_EVT_CTOR +void QEvt_ctor(QEvt * const me, + enum_t const sig); +#endif /* def Q_EVT_CTOR */ -/*! Perform cast from unsigned integer pointer @p uintptr_ to pointer -* of type @p type_. -* @description -* This macro encapsulates the cast to (type_ *), which QP ports or -* application might use to access embedded hardware registers. -*/ -#define Q_UINT2PTR_CAST(type_, uintptr_) ((type_ *)(uintptr_)) - -/*==========================================================================*/ -/*! typedef of the return type from a state/action-handler functions. */ -typedef uint_fast8_t QState; - -/* forward declaration */ -typedef struct QXThread QXThread; - -/*! Pointer to a state-handler function. */ -typedef QState (*QStateHandler)(void * const me, QEvt const * const e); - -/*! Pointer to an action-handler function. */ -typedef QState (*QActionHandler)(void * const me); - -/*! Pointer to a thread-handler function. */ -typedef void (*QXThreadHandler)(QXThread * const me); - -/*! Perform cast to ::QStateHandler. -* @description -* This macro encapsulates the cast of a specific state handler function -* pointer to ::QStateHandler, which violates MISRA:C-2012 Rule 11.1(req) -* "Conversions shall not be performed between a pointer to function and -* any other type". This macro helps to localize this deviation. -* -* @ptr{PQP11-1} @ptr{PQA11-1} -* -* @usage -* @include qep_qhsm_ctor.c -*/ -#define Q_STATE_CAST(handler_) ((QStateHandler)(handler_)) - -/*! Perform cast to ::QActionHandler. -* @description -* This macro encapsulates the cast of a specific action handler function -* pointer to ::QActionHandler, which violates MISRA:C-2012 Rule 11.1(R) -* "Conversions shall not be performed between a pointer to function and -* any other type". This macro helps to localize this deviation. -* -* @ptr{PQP11-1} @ptr{PQA11-1} -*/ -#define Q_ACTION_CAST(action_) ((QActionHandler)(action_)) - -/* forward declarations... */ -struct QMState; -struct QHsmVtable; -typedef struct QMTranActTable QMTranActTable; - -/*! Attribute of for the ::QHsm class (Hierarchical State Machine). -* @description -* This union represents possible values stored in the 'state' and 'temp' -* attributes of the ::QHsm class. -*/ -union QHsmAttr { - QStateHandler fun; /*!< @private pointer to a state-handler */ - QActionHandler act; /*!< @private pointer to an action-handler */ - QXThreadHandler thr; /*!< @private pointer to an thread-handler */ - struct QMState const *obj; /*!< @private pointer to QMState object */ - QMTranActTable const *tatbl; /*!< @private transition-action table */ -}; - -/*==========================================================================*/ -/*! Hierarchical State Machine class -* @description -* ::QHsm represents a Hierarchical State Machine (HSM) with full support for -* hierarchical nesting of states, entry/exit actions, initial transitions, -* and transitions to history in any composite state. This class is designed -* for ease of manual coding of HSMs in C, but it is also supported by the -* QM modeling tool. -* @n -* ::QHsm is also the base class for the ::QMsm state machine, which provides -* a superior efficiency, but requires the use of the QM modeling tool to -* generate code. -* -* @note ::QHsm is not intended to be instantiated directly, but rather serves -* as the base class for derivation of state machines in the application -* code. -* -* @usage -* The following example illustrates how to derive a state machine class -* from ::QHsm. Please note that the ::QHsm member `super` is defined as the -* FIRST member of the derived class. -* -* @rtr{RQP103} -* -* @include qep_qhsm.c -*/ -typedef struct { - struct QHsmVtable const *vptr; /*!< @private virtual pointer @rtr{RQP102} */ - union QHsmAttr state; /*!< @private current active state (state-var) */ - union QHsmAttr temp; /*!< @private temporary: target/act-table, etc. */ -} QHsm; - -/*! Virtual table for the ::QHsm class. */ -/*! @rtr{RQP102} */ -struct QHsmVtable { -#ifdef Q_SPY - /*! Triggers the top-most initial transition in the HSM. */ - void (*init)(QHsm * const me, void const * const e, - uint_fast8_t const qs_id); - - /*! Dispatches an event to the HSM. */ - void (*dispatch)(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id); - - /*! Get the current state handler of the HSM. */ - QStateHandler (*getStateHandler)(QHsm * const me); -#else - void (*init)(QHsm * const me, void const * const e); - void (*dispatch)(QHsm * const me, QEvt const * const e); -#endif /* Q_SPY */ -}; - -/* QHsm public operations... */ -#ifdef Q_SPY - /*! Polymorphically executes the top-most initial transition in a HSM - * @param[in,out] me_ pointer (see @ref oop) - * @param[in] e_ constant pointer the ::QEvt or a class derived from - * ::QEvt (see @ref oop) - * @param[in] qs_id_ QS local filter ID - * - * @note Must be called only ONCE after the SM "constructor". - * - * @usage - * The following example illustrates how to initialize a SM, and dispatch - * events to it: - * @include qep_qhsm_use.c - * - * @rtr{RQP102} - */ - #define QHSM_INIT(me_, par_, qs_id_) do { \ - Q_ASSERT((me_)->vptr); \ - (*(me_)->vptr->init)((me_), (par_), (qs_id_)); \ - } while (false) - - /*! Implementation of the top-most initial tran. in ::QHsm subclass. - * @private @memberof QHsm - * @rtr{RQP103} - */ - void QHsm_init_(QHsm * const me, void const * const e, - uint_fast8_t const qs_id); -#else - - #define QHSM_INIT(me_, par_, dummy) do { \ - Q_ASSERT((me_)->vptr); \ - (*(me_)->vptr->init)((me_), (par_)); \ - } while (false) - - /*! Implementation of the top-most initial tran. in ::QHsm subclass */ - void QHsm_init_(QHsm * const me, void const * const e); - -#endif /* Q_SPY */ - -#ifdef Q_SPY - /*! Polymorphically dispatches an event to a HSM - * @description - * Processes one event at a time in Run-to-Completion fashion. - * - * @param[in,out] me_ pointer (see @ref oop) - * @param[in] e_ constant pointer the ::QEvt or a class - * derived from ::QEvt (see @ref oop) - * @note Must be called after the "constructor" and after QHSM_INIT(). - * - * @rtr{RQP102} - */ - #define QHSM_DISPATCH(me_, e_, qs_id_) \ - ((*(me_)->vptr->dispatch)((me_), (e_), (qs_id_))) - - /*! Implementation of dispatching events to a ::QHsm subclass - * @private @memberof QHsm - * @rtr{RQP103} - */ - void QHsm_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id); - - /*! Implementation of getting the state handler in a ::QHsm subclass - * @private @memberof QHsm - */ - QStateHandler QHsm_getStateHandler_(QHsm * const me); -#else - - #define QHSM_DISPATCH(me_, e_, dummy) \ - ((*(me_)->vptr->dispatch)((me_), (e_))) - - void QHsm_dispatch_(QHsm * const me, QEvt const * const e); - -#endif /* Q_SPY */ - -/*! Perform upcast from a subclass of ::QHsm to the base class ::QHsm -* @description -* Upcasting from a subclass to superclass is a very frequent and __safe__ -* operation in object-oriented programming and object-oriented languages -* (such as C++) perform such upcasting automatically. However, OOP is -* implemented in C just as a set of coding conventions (see @ref oop), -* and the C compiler does not "know" that certain types are related by -* inheritance. Therefore for C, the upcast must be performed explicitly. -* Unfortunately, pointer casting violates the advisory MISRA-C 2012 -* Rule 11.3(req) "A cast shall not be performed between a pointer to object -* type and a pointer to a different object type". This macro encapsulates -* this deviation and provides a descriptive name for the reason of this cast. -*/ -#define Q_HSM_UPCAST(ptr_) ((QHsm *)(ptr_)) - -/*! Obtain the current active state from a HSM (read only). -* @public @memberof QHsm -* @param[in] me pointer (see @ref oop) -* @returns the current active state of a ::QHsm class -* @note this function is used in QM for auto-generating code for state history -*/ -static inline QStateHandler QHsm_state(QHsm * const me) { - return Q_STATE_CAST(me->state.fun); -} - -/*! Obtain the current active child state of a given parent in ::QHsm -* @public @memberof QHsm -* @param[in] me pointer (see @ref oop) -* @param[in] parent pointer to the parent state-handler -* @returns the current active child state-handler of a given parent -* @note this function is used in QM for auto-generating code for state history -*/ -QStateHandler QHsm_childState(QHsm * const me, - QStateHandler const parent); - -/*! Tests if a given state is part of the current active state -* configuration in ::QHsm subclasses. -* @public @memberof QHsm -*/ -bool QHsm_isIn(QHsm * const me, QStateHandler const state); - -/* QHsm protected operations... */ -/*! Protected "constructor" of ::QHsm -* @protected @memberof QHsm -*/ -void QHsm_ctor(QHsm * const me, QStateHandler initial); - -/*! the top-state. -* @protected @memberof QHsm -*/ -QState QHsm_top(void const * const me, QEvt const * const e); - -/*==========================================================================*/ -/*! QM State Machine implementation strategy -* @extends QHsm -* @description -* ::QMsm (QM State Machine) provides a more efficient state machine -* implementation strategy than ::QHsm, but requires the use of the QM -* modeling tool, but are the fastest and need the least run-time -* support (the smallest event-processor taking up the least code space). +/*${QEP::QStateRet} ........................................................*/ +/*! All possible values returned from state/action handlers * * @note -* ::QMsm is not intended to be instantiated directly, but rather serves as -* the base class for derivation of state machines in the application code. -* -* @usage -* The following example illustrates how to derive a state machine class -* from ::QMsm. Please note that the ::QMsm member `super` is defined as the -* _first_ member of the derived struct. -* @include qep_qmsm.c -* -* @rtr{RQP104} +* The order matters for algorithmic correctness. */ -typedef struct { - QHsm super; /*!< @protected inherits ::QHsm */ -} QMsm; - -/*! State object for the ::QMsm class (QM State Machine). -* @description -* This class groups together the attributes of a ::QMsm state, such as the -* parent state (state nesting), the associated state handler function and -* the exit action handler function. These attributes are used inside the -* QMsm_dispatch() and QMsm_init() functions. -* -* @attention -* The ::QMState class is only intended for the QM code generator and should -* not be used in hand-crafted code. -* -* @rtr{RQP104} -*/ -struct QMState { - struct QMState const *superstate; /*!< @private superstate of the state */ - QStateHandler const stateHandler; /*!< @private state handler */ - QActionHandler const entryAction; /*!< @private entry action handler */ - QActionHandler const exitAction; /*!< @private exit action handler */ - QActionHandler const initAction; /*!< @private init action handler */ -}; -typedef struct QMState QMState; - -/*! Transition-Action Table for the Meta State Machine. */ -struct QMTranActTable { - struct QMState const *target; /*!< @private */ - QActionHandler const act[1]; /*!< @private */ -}; - -/* QMsm public operations... */ -/*! Obtain the current active state from a MSM (read only) -* @public @memberof QMsm -* @param[in] me pointer (see @ref oop) -* @returns the current active state-object -* @note this function is used in QM for auto-generating code for state history -*/ -static inline QMState const *QMsm_stateObj(QHsm * const me) { - return me->state.obj; -} - -/*! Obtain the current active child state of a given parent in ::QMsm -* @public @memberof QMsm -* @param[in] me pointer (see @ref oop) -* @param[in] parent pointer to the parent state-object -* @returns the current active child state-object of a given parent -* @note this function is used in QM for auto-generating code for state history -*/ -QMState const *QMsm_childStateObj(QHsm const * const me, - QMState const * const parent); - -/*! Tests if a given state is part of the current active state -* configuration in a MSM. -* @public @memberof QMsm -*/ -bool QMsm_isInState(QMsm const * const me, QMState const * const state); - -/* QMsm protected operations... */ -/*! Constructor of ::QMsm -* @protected @memberof QMsm -*/ -void QMsm_ctor(QMsm * const me, QStateHandler initial); - -/* QMsm private operations... */ -/*! Implementation of the top-most initial transition in ::QMsm -* @private @memberof QMsm -* @rtr{RQP104} -*/ -#ifdef Q_SPY -void QMsm_init_(QHsm * const me, void const * const e, - uint_fast8_t const qs_id); -#else -void QMsm_init_(QHsm * const me, void const * const e); -#endif - -/*! Implementation of disparching events to ::QMsm -* @private @memberof QMsm -* @rtr{RQP104} -*/ -#ifdef Q_SPY -void QMsm_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id); -#else -void QMsm_dispatch_(QHsm * const me, QEvt const * const e); -#endif - -/*! Implementation of getting the state handler in a ::QMsm -* @private @memberof QMsm -*/ -#ifdef Q_SPY -QStateHandler QMsm_getStateHandler_(QHsm * const me); -#endif - -/*! Macro to call in a state-handler when it executes a regular -* or and initial transition. Applicable only to ::QHsm subclasses. -* @include qep_qtran.c -* @rtr{RQP103} @rtr{RQP120E} -*/ -#define Q_TRAN(target_) \ - ((Q_HSM_UPCAST(me))->temp.fun = Q_STATE_CAST(target_), (QState)Q_RET_TRAN) - -/*! Macro to call in a state-handler when it executes a transition -* to history. Applicable only to HSMs. -* -* @rtr{RQP103} @rtr{RQP120H} -* @usage -* @include qep_qhist.c -*/ -#define Q_TRAN_HIST(hist_) \ - ((Q_HSM_UPCAST(me))->temp.fun = (hist_), (QState)Q_RET_TRAN_HIST) - -/*! Macro to call in a state-handler when it designates the -* superstate of a given state. Applicable only to ::QHsm subclasses. -* -* @rtr{RQP103} -* @usage -* @include qep_qsuper.c -*/ -#define Q_SUPER(super_) \ - ((Q_HSM_UPCAST(me))->temp.fun = Q_STATE_CAST(super_), (QState)Q_RET_SUPER) - -/*! Macro to call in a state-handler when it handles an event. -* @rtr{RQP103} @rtr{RQP120B} @rtr{RQP120C} -*/ -#define Q_HANDLED() ((QState)Q_RET_HANDLED) - -/*! Macro to call in a state-handler when it attempts to handle -* an event but a guard condition evaluates to 'false' and there is no other -* explicit way of handling the event. Applicable only to ::QHsm subclasses. -*/ -#define Q_UNHANDLED() ((QState)Q_RET_UNHANDLED) - -/*! Macro to provide strictly-typed zero-action to terminate action lists -*! in the transition-action-tables -*/ -#define Q_ACTION_NULL ((QActionHandler)0) - -/*==========================================================================*/ -/*! All possible values returned from state/action handlers -* @note The order matters for algorithmic correctness. -*/ -enum { +enum QStateRet { /* unhandled and need to "bubble up" */ Q_RET_SUPER, /*!< event passed to superstate to handle */ Q_RET_SUPER_SUB, /*!< event passed to submachine superstate */ @@ -598,100 +246,895 @@ enum { Q_RET_TRAN_XP /*!< exit-point transition out of a submachine */ }; +/*${QEP::QState} ...........................................................*/ +/*! Type returned from state-handler functions */ +typedef enum QStateRet QState; + +/*${QEP::QStateHandler} ....................................................*/ +/*! Pointer to a state-handler function. */ +typedef QState (* QStateHandler )(void * const me, QEvt const * const e); + +/*${QEP::QActionHandler} ...................................................*/ +/*! Pointer to an action-handler function. */ +typedef QState (* QActionHandler )(void * const me); + +/*${QEP::QXThread} .........................................................*/ +/* forward declaration */ +struct QXThread; + +/*${QEP::QXThreadHandler} ..................................................*/ +/*! Pointer to an eXthended thread handler function */ +typedef void (* QXThreadHandler )(struct QXThread * const me); + +/*${QEP::QMState} ..........................................................*/ +/*! @brief State object for the ::QMsm class (QM State Machine). +* +* @details +* This class groups together the attributes of a ::QMsm state, such as the +* parent state (state nesting), the associated state handler function and +* the exit action handler function. These attributes are used inside the +* QMsm_dispatch() and QMsm_init() functions. +* +* @tr{RQP104} +* +* @attention +* The ::QMState class is only intended for the QM code generator and should +* not be used in hand-crafted code. +*/ +typedef struct QMState { + struct QMState const *superstate; /*!< superstate of this state */ + QStateHandler const stateHandler; /*!< state handler function */ + QActionHandler const entryAction; /*!< entry action handler function */ + QActionHandler const exitAction; /*!< exit action handler function */ + QActionHandler const initAction; /*!< init action handler function */ +} QMState; + +/*${QEP::QMTranActTable} ...................................................*/ +/*! @brief Transition-Action Table for the ::QMsm State Machine. */ +typedef struct QMTranActTable { + QMState const *target; /*!< target of the transition */ + QActionHandler const act[1]; /*!< array of actions */ +} QMTranActTable; + +/*${QEP::QHsmAttr} .........................................................*/ +/*! @brief Attribute of for the ::QHsm class (Hierarchical State Machine). +* +* @details +* This union represents possible values stored in the 'state' and 'temp' +* attributes of the ::QHsm class. +*/ +union QHsmAttr { + QStateHandler fun; /*!< @private pointer to a state-handler */ + QActionHandler act; /*!< @private pointer to an action-handler */ + QXThreadHandler thr; /*!< @private pointer to an thread-handler */ + QMTranActTable const *tatbl; /*!< @private transition-action table */ + struct QMState const *obj; /*!< @private pointer to QMState object */ +}; + +/*${QEP::QHSM_MAX_NEST_DEPTH_} .............................................*/ +/*! maximum depth of state nesting in a HSM (including the top level), +* must be >= 3 +*/ +enum { QHSM_MAX_NEST_DEPTH_ = 6}; + +/*${QEP::QReservedSig} .....................................................*/ +/*! Reserved signals by the HSM-style state machine +* implementation strategy. +*/ +enum QReservedSig { + Q_ENTRY_SIG = 1, /*!< signal for coding entry actions */ + Q_EXIT_SIG, /*!< signal for coding exit actions */ + Q_INIT_SIG, /*!< signal for coding initial transitions */ + Q_USER_SIG /*!< offset for the user signals (QP Application) */ +}; + +/*${QEP::QHsm} .............................................................*/ +/*! @brief Hierarchical State Machine class +* @class QHsm +* +* @details +* QHsm represents a Hierarchical State Machine (HSM) with full support for +* hierarchical nesting of states, entry/exit actions, initial transitions, +* and transitions to history in any composite state. This class is designed +* for ease of manual coding of HSMs in C, but it is also supported by the +* QM modeling tool.
    +* +* QHsm is also the base class for the QMsm state machine, which provides +* a superior efficiency, but requires the use of the QM modeling tool to +* generate code. +* +* @note +* QHsm is not intended to be instantiated directly, but rather serves as the +* abstract base class for derivation of state machines in the QP application. +* +* @tr{RQP103} +* @tr{AQP211} +* +* @usage +* The following example illustrates how to derive a state machine class +* from QHsm. Please note that the QHsm member `super` is defined as the +* FIRST member of the derived class. +* @include qep_qhsm.c +*/ +typedef struct { +/* private: */ + + /*! Virtual pointer + * @private @memberof QHsm + * + * @tr{RQP102} + */ + struct QHsmVtable const * vptr; + +/* protected: */ + + /*! Current active state (state-variable). + * @private @memberof QHsm + */ + union QHsmAttr state; + + /*! Temporary: target/act-table, etc. + * @private @memberof QHsm + */ + union QHsmAttr temp; +} QHsm; + +/* public: */ + +/*! Tests if a given state is part of the current active state +* configuration in ::QHsm subclasses. +* @public @memberof QHsm +* +* @details +* Tests if a state machine derived from QHsm is-in a given state. +* +* @note For a HSM, to "be in a state" means also to be in a superstate of +* of the state. +* +* @param[in] me pointer (see @ref oop) +* @param[in] state pointer to the state-handler function to be tested +* +* @returns +*'true' if the HSM "is in" the @p state and 'false' otherwise +* +* @tr{RQP103} +* @tr{RQP120S} +*/ +bool QHsm_isIn(QHsm * const me, + QStateHandler const state); + +/*! Obtain the current active state from a HSM (read only). +* @public @memberof QHsm +* +* @param[in] me pointer (see @ref oop) +* +* @returns the current active state of the QHsm class +* +* @note +* This function is used in QM for auto-generating code for state history. +*/ +QStateHandler QHsm_state(QHsm * const me); + +/*! Obtain the current active child state of a given parent in ::QHsm +* @public @memberof QHsm +* +* @details +* Finds the child state of the given `parent`, such that this child state +* is an ancestor of the currently active state. The main purpose of this +* function is to support **shallow history** transitions in state machines +* derived from QHsm. +* +* @param[in] me pointer (see @ref oop) +* @param[in] parent pointer to the state-handler function +* +* @returns +* the child of a given `parent` state, which is an ancestor of the current +* active state. For the corner case when the currently active state is the +* given `parent` state, function returns the `parent` state. +* +* @note +* this function is designed to be called during state transitions, so it +* does not necessarily start in a stable state configuration. +* However, the function establishes stable state configuration upon exit. +* +* @tr{RQP103} +* @tr{RQP120H} +*/ +QStateHandler QHsm_childState(QHsm * const me, + QStateHandler const parent); + +/* protected: */ + +/*! Protected "constructor" of ::QHsm +* @protected @memberof QHsm +* +* @details +* Performs the first step of HSM initialization by assigning the initial +* pseudostate to the currently active state of the state machine. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] initial pointer to the top-most initial state-handler +* function in the derived state machine +* +* @note Must be called only by the constructors of the derived state +* machines. +* +* @note Must be called only ONCE before QHSM_INIT(). +* +* @usage +* The following example illustrates how to invoke QHsm_ctor() in the +* "constructor" of a derived state machine: +* @include qep_qhsm_ctor.c +* +* @tr{RQP103} +*/ +void QHsm_ctor(QHsm * const me, + QStateHandler initial); + +/*! The top-state of QHsm. +* @protected @memberof QHsm +* +* @details +* QHsm_top() is the ultimate root of state hierarchy in all HSMs derived +* from ::QHsm. +* +* @param[in] me pointer (see @ref oop) +* @param[in] e pointer to the event to be dispatched to the FSM +* +* @returns +* Always returns ::Q_RET_IGNORED, which means that the top state ignores +* all events. +* +* @note The parameters to this state handler are not used. They are provided +* for conformance with the state-handler function signature ::QStateHandler. +* +* @tr{RQP103} @tr{RQP120T} +*/ +QState QHsm_top(QHsm const * const me, + QEvt const * const e); + +/*! Implementation of the top-most initial tran. in ::QHsm. +* @protected @memberof QHsm +* +* @details +* Executes the top-most initial transition in a HSM. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to an extra parameter (might be NULL) +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @note Must be called only ONCE after the QHsm_ctor(). +* +* @tr{RQP103} @tr{RQP120I} @tr{RQP120D} +*/ +void QHsm_init_(QHsm * const me, + void const * const e, + uint_fast8_t const qs_id); + +/*! Implementation of dispatching events to a ::QHsm +* @protected @memberof QHsm +* +* @details +* Dispatches an event for processing to a hierarchical state machine (HSM). +* The processing of an event represents one run-to-completion (RTC) step. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be dispatched to the HSM +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @note +* This function should be called only via the virtual table (see +* QHSM_DISPATCH()) and should NOT be called directly in the applications. +* +* @tr{RQP103} +* @tr{RQP120A} @tr{RQP120B} @tr{RQP120C} @tr{RQP120D} @tr{RQP120E} +*/ +void QHsm_dispatch_(QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id); + +/* private: */ + +/*! Implementation of getting the state handler in a ::QHsm subclass +* @private @memberof QHsm +*/ #ifdef Q_SPY - /*! Macro to call in a QM action-handler when it executes - * an entry action. Applicable only to ::QMsm subclasses. - */ - #define QM_ENTRY(state_) \ - ((Q_HSM_UPCAST(me))->temp.obj = (state_), (QState)Q_RET_ENTRY) +QStateHandler QHsm_getStateHandler_(QHsm * const me); +#endif /* def Q_SPY */ - /*! Macro to call in a QM action-handler when it executes - * an exit action. Applicable only to ::QMsm subclasses. - */ - #define QM_EXIT(state_) \ - ((Q_HSM_UPCAST(me))->temp.obj = (state_), (QState)Q_RET_EXIT) +/*! Helper function to execute transition sequence in a hierarchical state +* machine (HSM). +* @private @memberof QHsm +* +* @param[in,out] path array of pointers to state-handler functions +* to execute the entry actions +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @returns +* the depth of the entry path stored in the @p path parameter. +* +* @tr{RQP103} +* @tr{RQP120E} @tr{RQP120F} +*/ +int_fast8_t QHsm_tran_(QHsm * const me, + QStateHandler path[QHSM_MAX_NEST_DEPTH_], + uint_fast8_t const qs_id); -#else - #define QM_ENTRY(dummy) ((QState)Q_RET_ENTRY) +/*${QEP::QHsmVtable} .......................................................*/ +/*! @brief Virtual table for the ::QHsm class. +* +* @tr{RQP102} +*/ +struct QHsmVtable { + /*! Triggers the top-most initial transition in the HSM. */ + void (*init)(QHsm * const me, void const * const e, + uint_fast8_t const qs_id); - #define QM_EXIT(dummy) ((QState)Q_RET_EXIT) + /*! Dispatches an event to the HSM. */ + void (*dispatch)(QHsm * const me, QEvt const * const e, + uint_fast8_t const qs_id); +#ifdef Q_SPY + /*! Get the current state handler of the HSM. */ + QStateHandler (*getStateHandler)(QHsm * const me); #endif /* Q_SPY */ +}; +/*${QEP::QMsm} .............................................................*/ +/*! @brief QM state machine implementation strategy +* @class QMsm +* @extends QHsm +* +* @details +* QMsm (QM State Machine) provides a more efficient state machine +* implementation strategy than ::QHsm, but requires the use of the QM +* modeling tool, but are the fastest and need the least run-time +* support (the smallest event-processor taking up the least code space). +* +* @note +* QMsm is not intended to be instantiated directly, but rather serves +* as the abstrace base class for derivation of state machines in the +* application code. +* +* @tr{RQP104} +* +* @usage +* The following example illustrates how to derive a state machine class +* from QMsm. Please note that the QMsm member `super` is defined +* as the *first* member of the derived struct. +* @include qep_qmsm.c +*/ +typedef struct { +/* protected: */ + QHsm super; +} QMsm; + +/* public: */ + +/*! Tests if a given state is part of the current active state +* configuration in a MSM. +* @public @memberof QMsm +* +* @details +* Tests if a state machine derived from QMsm is-in a given state. +* +* @note +* For a MSM, to "be-in" a state means also to "be-in" a superstate of +* of the state. +* +* @param[in] me pointer (see @ref oop) +* @param[in] state pointer to the QMState object that corresponds to the +* tested state. +* @returns +* 'true' if the MSM "is in" the @p state and 'false' otherwise +*/ +bool QMsm_isInState(QMsm const * const me, + QMState const * const state); + +/*! Obtain the current active state from a MSM (read only) +* @public @memberof QMsm +* +* @param[in] me pointer (see @ref oop) +* +* @returns the current active state-object +* +* @note +* This function is used in QM for auto-generating code for state history +*/ +QMState const * QMsm_stateObj(QHsm const * const me); + +/*! Obtain the current active child state of a given parent in ::QMsm +* @public @memberof QMsm +* +* @details +* Finds the child state of the given @c parent, such that this child state +* is an ancestor of the currently active state. The main purpose of this +* function is to support **shallow history** transitions in state machines +* derived from QMsm. +* +* @param[in] me pointer (see @ref oop) +* @param[in] parent pointer to the state-handler object +* +* @returns +* the child of a given @c parent state, which is an ancestor of +* the currently active state. For the corner case when the currently active +* state is the given @c parent state, function returns the @c parent state. +* +* @sa QMsm_childStateObj() +*/ +QMState const * QMsm_childStateObj( + QHsm const * const me, + QMState const * const parent); + +/* protected: */ + +/*! Constructor of ::QMsm +* @protected @memberof QMsm +* +* @details +* Performs the first step of QMsm initialization by assigning the initial +* pseudostate to the currently active state of the state machine. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] initial the top-most initial transition for the MSM. +* +* @note +* Must be called only ONCE before QHSM_INIT(). +* +* @note +* QMsm inherits QHsm, so by the @ref oop convention it should call the +* constructor of the superclass, i.e., QHsm_ctor(). However, this would pull +* in the QHsmVtable, which in turn will pull in the code for QHsm_init_() and +* QHsm_dispatch_() implemetations. To avoid this code size penalty, in case +* ::QHsm is not used in a given project, the QMsm_ctor() performs direct +* intitialization of the Vtable, which avoids pulling in the code for QMsm. +* +* @usage +* The following example illustrates how to invoke QMsm_ctor() in the +* "constructor" of a derived state machine: +* @include qep_qmsm_ctor.c +*/ +void QMsm_ctor(QMsm * const me, + QStateHandler initial); + +/* public: */ + +/*! Implementation of the top-most initial tran. in ::QMsm. +* @private @memberof QMsm +* +* @details +* Executes the top-most initial transition in a MSM. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to an extra parameter (might be NULL) +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @note +* This function should be called only via the virtual table (see +* QHSM_INIT()) and should NOT be called directly in the applications. +*/ +void QMsm_init_( + QHsm * const me, + void const * const e, + uint_fast8_t const qs_id); + +/* private: */ + +/*! Implementation of dispatching events to a ::QMsm +* @private @memberof QMsm +* +* @details +* Dispatches an event for processing to a meta state machine (MSM). +* The processing of an event represents one run-to-completion (RTC) step. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be dispatched to the MSM +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @note +* This function should be called only via the virtual table (see +* QHSM_DISPATCH()) and should NOT be called directly in the applications. +*/ +void QMsm_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id); + +/* public: */ + +/*! Implementation of getting the state handler in a ::QMsm subclass +* @public @memberof QMsm +*/ +#ifdef Q_SPY +QStateHandler QMsm_getStateHandler_(QHsm * const me); +#endif /* def Q_SPY */ + +/* private: */ + +/*! Execute transition-action table +* @private @memberof QMsm +* +* @details +* Helper function to execute transition sequence in a transition-action table. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] tatbl pointer to the transition-action table +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @returns +* status of the last action from the transition-action table. +* +* @note +* This function is for internal use inside the QEP event processor and +* should **not** be called directly from the applications. +*/ +QState QMsm_execTatbl_( + QHsm * const me, + QMTranActTable const * tatbl, + uint_fast8_t const qs_id); + +/*! Exit the current state up to the explicit transition source +* @private @memberof QMsm +* +* @details +* Static helper function to exit the current state configuration to the +* transition source, which in a hierarchical state machine might be a +* superstate of the current state. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] cs pointer to the current state +* @param[in] ts pointer to the transition source state +* @param[in] qs_id QS-id of this state machine (for QS local filter) +*/ +void QMsm_exitToTranSource_( + QHsm * const me, + QMState const * cs, + QMState const * ts, + uint_fast8_t const qs_id); + +/*! Enter history of a composite state +* @private @memberof QMsm +* +* @details +* Static helper function to execute the segment of transition to history +* after entering the composite state and +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] hist pointer to the history substate +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @returns +* #Q_RET_TRAN_INIT, if an initial transition has been executed in the last +* entered state or #Q_RET_NULL if no such transition was taken. +*/ +QState QMsm_enterHistory_( + QHsm * const me, + QMState const *const hist, + uint_fast8_t const qs_id); +/*$enddecl${QEP} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*==========================================================================*/ +/*$declare${QEP-macros} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QEP-macros::QHSM_INIT} .................................................*/ +#ifdef Q_SPY +/*! Virtual call to the top-most initial transition in a HSM. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ constant pointer the ::QEvt or a class derived from +* ::QEvt (see @ref oop) +* @param[in] qs_id_ QS local filter ID (used only when Q_SPY is defined) +* +* @note Must be called only ONCE after the SM "constructor". +* +* @tr{RQP102} +* +* @usage +* The following example illustrates how to initialize a SM, and dispatch +* events to it: +* @include qep_qhsm_use.c +*/ +#define QHSM_INIT(me_, par_, qs_id_) do { \ + Q_ASSERT((me_)->vptr); \ + (*(me_)->vptr->init)((me_), (par_), (qs_id_)); \ +} while (false) +#endif /* def Q_SPY */ + +/*${QEP-macros::QHSM_INIT} .................................................*/ +#ifndef Q_SPY +#define QHSM_INIT(me_, par_, dummy) do { \ + Q_ASSERT((me_)->vptr); \ + (*(me_)->vptr->init)((me_), (par_), 0U); \ +} while (false) +#endif /* ndef Q_SPY */ + +/*${QEP-macros::QHSM_DISPATCH} .............................................*/ +#ifdef Q_SPY +/*! Virtual call to dispatch an event to a HSM +* +* @details +* Processes one event at a time in Run-to-Completion fashion. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ constant pointer the ::QEvt or a class +* derived from ::QEvt (see @ref oop) +* @param[in] qs_id_ QS local filter ID (used only when Q_SPY is defined) +* +* @note Must be called after the "constructor" and after QHSM_INIT(). +* +* @tr{RQP102} +*/ +#define QHSM_DISPATCH(me_, e_, qs_id_) \ + ((*(me_)->vptr->dispatch)((me_), (e_), (qs_id_))) +#endif /* def Q_SPY */ + +/*${QEP-macros::QHSM_DISPATCH} .............................................*/ +#ifndef Q_SPY +#define QHSM_DISPATCH(me_, e_, dummy) \ + ((*(me_)->vptr->dispatch)((me_), (e_), 0U)) +#endif /* ndef Q_SPY */ + +/*${QEP-macros::Q_HSM_UPCAST} ..............................................*/ +/*! Perform upcast from a subclass of ::QHsm to the base class ::QHsm +* +* @details +* Upcasting from a subclass to superclass is a very frequent and **safe** +* operation in object-oriented programming and object-oriented languages +* (such as C++) perform such upcasting automatically. However, OOP is +* implemented in C just as a set of coding conventions (see @ref oop), +* and the C compiler does not "know" that certain types are related by +* inheritance. Therefore for C, the upcast must be performed explicitly. +* Unfortunately, pointer casting violates the advisory MISRA-C 2012 +* Rule 11.3(req) "A cast shall not be performed between a pointer to object +* type and a pointer to a different object type". This macro encapsulates +* this deviation and provides a descriptive name for the reason of this cast. +*/ +#define Q_HSM_UPCAST(ptr_) ((QHsm *)(ptr_)) + +/*${QEP-macros::Q_TRAN} ....................................................*/ +/*! Perform upcast from a subclass of ::QHsm to the base class ::QHsm +* +* @details +* Upcasting from a subclass to superclass is a very frequent and **safe** +* operation in object-oriented programming and object-oriented languages +* (such as C++) perform such upcasting automatically. However, OOP is +* implemented in C just as a set of coding conventions (see @ref oop), +* and the C compiler does not "know" that certain types are related by +* inheritance. Therefore for C, the upcast must be performed explicitly. +* Unfortunately, pointer casting violates the advisory MISRA-C 2012 +* Rule 11.3(req) "A cast shall not be performed between a pointer to object +* type and a pointer to a different object type". This macro encapsulates +* this deviation and provides a descriptive name for the reason of this cast. +*/ +#define Q_TRAN(target_) \ + ((Q_HSM_UPCAST(me))->temp.fun = Q_STATE_CAST(target_), Q_RET_TRAN) + +/*${QEP-macros::Q_TRAN_HIST} ...............................................*/ +/*! Macro to call in a state-handler when it executes a transition +* to history. Applicable only to HSMs. +* +* @tr{RQP103} @tr{RQP120H} +* +* @usage +* @include qep_qhist.c +*/ +#define Q_TRAN_HIST(hist_) \ + ((Q_HSM_UPCAST(me))->temp.fun = (hist_), Q_RET_TRAN_HIST) + +/*${QEP-macros::Q_SUPER} ...................................................*/ +/*! Macro to call in a state-handler when it designates the superstate +* of a given state. Applicable only to ::QHsm subclasses. +* +* @tr{RQP103} +* +* @usage +* @include qep_qsuper.c +*/ +#define Q_SUPER(super_) \ + ((Q_HSM_UPCAST(me))->temp.fun = Q_STATE_CAST(super_), Q_RET_SUPER) + +/*${QEP-macros::Q_HANDLED} .................................................*/ +/*! Macro to call in a state-handler when it handles an event. +* @tr{RQP103} @tr{RQP120B} @tr{RQP120C} +*/ +#define Q_HANDLED() (Q_RET_HANDLED) + +/*${QEP-macros::Q_UNHANDLED} ...............................................*/ +/*! Macro to call in a state-handler when it attempts to handle +* an event but a guard condition evaluates to 'false' and there is no other +* explicit way of handling the event. Applicable only to ::QHsm subclasses. +*/ +#define Q_UNHANDLED() (Q_RET_UNHANDLED) + +/*${QEP-macros::Q_ACTION_NULL} .............................................*/ +/*! Macro to provide strictly-typed zero-action to terminate action lists +*! in the transition-action-tables +*/ +#define Q_ACTION_NULL ((QActionHandler)0) + +/*${QEP-macros::Q_EVT_CAST} ................................................*/ +/*! Perform downcast of an event onto a subclass of ::QEvt `class_` +* +* @details +* This macro encapsulates the downcast of ::QEvt pointers, which violates +* MISRA-C 2012 Rule 11.3(R) "A cast shall not be performed between a +* pointer to object type and a pointer to a different object type". This +* macro helps to localize this deviation. +* +* @param class_ a subclass of ::QEvt +* +* @tr{RQP003} +* @tr{PQA11_3} +*/ +#define Q_EVT_CAST(class_) ((class_ const *)(e)) + +/*${QEP-macros::Q_STATE_CAST} ..............................................*/ +/*! Perform cast to ::QStateHandler. +* @details +* This macro encapsulates the cast of a specific state handler function +* pointer to ::QStateHandler, which violates MISRA:C-2012 Rule 11.1(req) +* "Conversions shall not be performed between a pointer to function and +* any other type". This macro helps to localize this deviation. +* +* @tr{PQP11_1} @tr{PQA11_1} +* +* @usage +* @include qep_qhsm_ctor.c +*/ +#define Q_STATE_CAST(handler_) ((QStateHandler)(handler_)) + +/*${QEP-macros::Q_ACTION_CAST} .............................................*/ +/*! Perform cast to ::QActionHandler. +* @details +* This macro encapsulates the cast of a specific action handler function +* pointer to ::QActionHandler, which violates MISRA:C-2012 Rule 11.1(R) +* "Conversions shall not be performed between a pointer to function and +* any other type". This macro helps to localize this deviation. +* +* @tr{PQP11_1} @tr{PQA11_1} +*/ +#define Q_ACTION_CAST(action_) ((QActionHandler)(action_)) + +/*${QEP-macros::Q_UNUSED_PAR} ..............................................*/ +/*! Helper macro to clearly mark unused parameters of functions. */ +#define Q_UNUSED_PAR(par_) ((void)(par_)) + +/*${QEP-macros::Q_DIM} .....................................................*/ +/*! Helper macro to calculate static dimension of a 1-dim `array_` +* +* @param array_ 1-dimensional array +* @returns the length of the array (number of elements it can hold) +*/ +#define Q_DIM(array_) (sizeof(array_) / sizeof((array_)[0U])) + +/*${QEP-macros::Q_UINT2PTR_CAST} ...........................................*/ +/*! Perform cast from unsigned integer `uint_` to pointer of type `type_` +* +* @details +* This macro encapsulates the cast to (type_ *), which QP ports or +* application might use to access embedded hardware registers. +* Such uses can trigger PC-Lint "Note 923: cast from int to pointer" +* and this macro helps to encapsulate this deviation. +*/ +#define Q_UINT2PTR_CAST(type_, uint_) ((type_ *)(uint_)) + +/*${QEP-macros::QEVT_INITIALIZER} ..........................................*/ +/*! Initializer of static constant QEvt instances +* +* @details +* This macro encapsulates the ugly casting of enumerated signals +* to QSignal and constants for QEvt.poolID and QEvt.refCtr_. +*/ +#define QEVT_INITIALIZER(sig_) { (QSignal)(sig_), 0U, 0U } + +/*${QEP-macros::QM_ENTRY} ..................................................*/ +#ifdef Q_SPY +/*! Macro to call in a QM action-handler when it executes +* an entry action. Applicable only to ::QMsm subclasses. +*/ +#define QM_ENTRY(state_) \ + ((Q_HSM_UPCAST(me))->temp.obj = (state_), Q_RET_ENTRY) +#endif /* def Q_SPY */ + +/*${QEP-macros::QM_ENTRY} ..................................................*/ +#ifndef Q_SPY +#define QM_ENTRY(dummy) (Q_RET_ENTRY) +#endif /* ndef Q_SPY */ + +/*${QEP-macros::QM_EXIT} ...................................................*/ +#ifdef Q_SPY +/*! Macro to call in a QM action-handler when it executes +* an exit action. Applicable only to ::QMsm subclasses. +*/ +#define QM_EXIT(state_) \ + ((Q_HSM_UPCAST(me))->temp.obj = (state_), Q_RET_EXIT) +#endif /* def Q_SPY */ + +/*${QEP-macros::QM_EXIT} ...................................................*/ +#ifndef Q_SPY +#define QM_EXIT(dummy) (Q_RET_EXIT) +#endif /* ndef Q_SPY */ + +/*${QEP-macros::QM_SM_EXIT} ................................................*/ /*! Macro to call in a QM submachine exit-handler. * Applicable only to subclasses of ::QMsm. */ #define QM_SM_EXIT(state_) \ - ((Q_HSM_UPCAST(me))->temp.obj = (state_), (QState)Q_RET_EXIT) + ((Q_HSM_UPCAST(me))->temp.obj = (state_), Q_RET_EXIT) +/*${QEP-macros::QM_TRAN} ...................................................*/ /*! Macro to call in a QM state-handler when it executes a regular * transition. Applicable only to ::QMsm subclasses. */ #define QM_TRAN(tatbl_) ((Q_HSM_UPCAST(me))->temp.tatbl \ - = (QMTranActTable const *)(tatbl_), (QState)Q_RET_TRAN) + = (struct QMTranActTable const *)(tatbl_), Q_RET_TRAN) +/*${QEP-macros::QM_TRAN_INIT} ..............................................*/ /*! Macro to call in a QM state-handler when it executes an initial * transition. Applicable only to ::QMsm subclasses. */ #define QM_TRAN_INIT(tatbl_) ((Q_HSM_UPCAST(me))->temp.tatbl \ - = (QMTranActTable const *)(tatbl_), (QState)Q_RET_TRAN_INIT) + = (struct QMTranActTable const *)(tatbl_), Q_RET_TRAN_INIT) +/*${QEP-macros::QM_TRAN_HIST} ..............................................*/ /*! Macro to call in a QM state-handler when it executes a transition * to history. Applicable only to ::QMsm subclasses. */ -#define QM_TRAN_HIST(history_, tatbl_) \ - ((((Q_HSM_UPCAST(me))->state.obj = (history_)), \ - ((Q_HSM_UPCAST(me))->temp.tatbl = (QMTranActTable const *)(tatbl_))), \ - (QState)Q_RET_TRAN_HIST) +#define QM_TRAN_HIST(history_, tatbl_) \ + ((((Q_HSM_UPCAST(me))->state.obj = (history_)), \ + ((Q_HSM_UPCAST(me))->temp.tatbl = \ + (struct QMTranActTable const *)(tatbl_))), \ + Q_RET_TRAN_HIST) +/*${QEP-macros::QM_TRAN_EP} ................................................*/ /*! Macro to call in a QM state-handler when it executes a transition * to the submachine via an entry point. */ #define QM_TRAN_EP(tatbl_) ((Q_HSM_UPCAST(me))->temp.tatbl \ - = (QMTranActTable const *)(tatbl_), (QState)Q_RET_TRAN_EP) + = (struct QMTranActTable const *)(tatbl_), Q_RET_TRAN_EP) +/*${QEP-macros::QM_TRAN_XP} ................................................*/ /*! Macro to call in a QM state-handler when it executes a transition * to exit point. Applicable only to ::QMsm subclasses. */ -#define QM_TRAN_XP(xp_, tatbl_) \ - ((((Q_HSM_UPCAST(me))->state.act = (xp_)), \ - ((Q_HSM_UPCAST(me))->temp.tatbl = (QMTranActTable const *)(tatbl_))), \ - (QState)Q_RET_TRAN_XP) +#define QM_TRAN_XP(xp_, tatbl_) \ + ((((Q_HSM_UPCAST(me))->state.act = (xp_)), \ + ((Q_HSM_UPCAST(me))->temp.tatbl = \ + (struct QMTranActTable const *)(tatbl_))), \ + Q_RET_TRAN_XP) +/*${QEP-macros::QM_HANDLED} ................................................*/ /*! Macro to call in a QM state-handler when it handled an event. * Applicable only to ::QMsm subclasses. */ -#define QM_HANDLED() ((QState)Q_RET_HANDLED) +#define QM_HANDLED() (Q_RET_HANDLED) +/*${QEP-macros::QM_UNHANDLED} ..............................................*/ /*! Macro to call in a QM state-handler when when it attempts to * handle an event but a guard condition evaluates to 'false' and there is * no other explicit way of handling the event. Applicable only to * ::QMsm subclasses. */ -#define QM_UNHANDLED() ((QState)Q_RET_UNHANDLED) +#define QM_UNHANDLED() (Q_RET_UNHANDLED) +/*${QEP-macros::QM_SUPER} ..................................................*/ /*! Macro to call in a QM state-handler when it designates the * superstate to handle an event. Applicable only to QMSMs. */ -#define QM_SUPER() ((QState)Q_RET_SUPER) +#define QM_SUPER(super_) (Q_RET_SUPER) +/*${QEP-macros::QM_SUPER_SUB} ..............................................*/ /*! Macro to call in a QM submachine-handler when it designates the -* host state to handle an event. Applicable only to QMSMs. +* host state to handle an event. Applicable only to subclasses of ::QMsm. */ #define QM_SUPER_SUB(host_) \ - ((Q_HSM_UPCAST(me))->temp.obj = (host_), (QState)Q_RET_SUPER_SUB) + ((Q_HSM_UPCAST(me))->temp.obj = (host_), Q_RET_SUPER_SUB) +/*${QEP-macros::QM_STATE_NULL} .............................................*/ /*! Macro to provide strictly-typed zero-state to use for submachines. -*! Applicable to suclasses of QP::QMsm. +*! Applicable to subclasses of ::QMsm. */ -#define QM_STATE_NULL ((QMState *)0) - -/*! QEP reserved signals */ -enum { - Q_ENTRY_SIG = 1, /*!< signal for coding entry actions */ - Q_EXIT_SIG, /*!< signal for coding exit actions */ - Q_INIT_SIG, /*!< signal for coding initial transitions */ - Q_USER_SIG /*!< first signal that can be used for user signals */ -}; +#define QM_STATE_NULL ((QMState *)0) +/*$enddecl${QEP-macros} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* QEP_H */ diff --git a/include/qequeue.h b/include/qequeue.h index 02941e2b..39ab48b0 100644 --- a/include/qequeue.h +++ b/include/qequeue.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qequeue.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qequeue.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,17 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qequeue.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QP natvie, platform-independent, thread-safe event queue interface -* @description +* @details * This header file must be included in all QF ports that use native QF * event queue for active objects. Also, this file needs to be included * in the QP/C library when the application uses QActive_defer()/ @@ -36,7 +50,6 @@ * thread-safe queues are used for communication between active objects * and non-framework entities, such as ISRs, device drivers, or legacy * code. -* @ingroup qf */ #ifndef QEQUEUE_H #define QEQUEUE_H @@ -46,7 +59,7 @@ /*! The size [bytes] of the ring-buffer counters used in the * native QF event queue implementation. Valid values: 1U, 2U, or 4U; * default 1U. - * @description + * @details * This macro can be defined in the QF port file (qf_port.h) to * configure the ::QEQueueCtr type. Here the macro is not defined so the * default of 1 byte is chosen. @@ -57,7 +70,7 @@ /*! The data type to store the ring-buffer counters based on * the macro #QF_EQUEUE_CTR_SIZE. - * @description + * @details * The dynamic range of this data type determines the maximum length * of the ring buffer managed by the native QF event queue. */ @@ -71,34 +84,38 @@ #endif /*==========================================================================*/ +/*$declare${QF::QEQueue} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*! Native QF Event Queue -* @description +/*${QF::QEQueue} ...........................................................*/ +/*! @brief Native QF Event Queue +* @class QEQueue +* +* @details * This class describes the native QF event queue, which can be used as * the event queue for active objects, or as a simple "raw" event queue for * thread-safe event passing among non-framework entities, such as ISRs, -* device drivers, or other third-party components.@n -* @n +* device drivers, or other third-party components.
    +* * The native QF event queue is configured by defining the macro -* #QF_EQUEUE_TYPE as ::QEQueue in the specific QF port header file.@n -* @n +* #QF_EQUEUE_TYPE as ::QEQueue in the specific QF port header file.
    +*
    * The ::QEQueue structure contains only data members for managing an event * queue, but does not contain the storage for the queue buffer, which must -* be provided externally during the queue initialization.@n -* @n +* be provided externally during the queue initialization.
    +*
    * The event queue can store only event pointers, not the whole events. The * internal implementation uses the standard ring-buffer plus one external * location that optimizes the queue operation for the most frequent case -* of empty queue.@n -* @n +* of empty queue.
    +*
    * The ::QEQueue structure is used with two sets of functions. One set is for * the active object event queue, which might need to block the active object * task when the event queue is empty and might need to unblock it when * events are posted to the queue. The interface for the native active object * event queue consists of the following functions: QActive_post(), * QActive_postLIFO(), and QActive_get_(). Additionally the function -* QEQueue_init() is used to initialize the queue.@n -* @n +* QEQueue_init() is used to initialize the queue.
    +*
    * The other set of functions, uses ::QEQueue as a simple "raw" event * queue to pass events between entities other than active objects, such as * ISRs. The "raw" event queue is not capable of blocking on the get() @@ -108,71 +125,178 @@ * QEQueue_postLIFO(), and QEQueue_get(). Additionally the function * QEQueue_init() is used to initialize the queue. * -* @note Most event queue operations (both the active object queues and +*
    ote Most event queue operations (both the active object queues and * the "raw" queues) internally use the QF critical section. You should be * careful not to invoke those operations from other critical sections when * nesting of critical sections is not supported. * * @sa ::QEQueue for the description of the data members */ -typedef struct QEQueue { +typedef struct { +/* private: */ + /*! pointer to event at the front of the queue. - * @description + * @private @memberof QEQueue + * + * @details * All incoming and outgoing events pass through the frontEvt location. * When the queue is empty (which is most of the time), the extra * frontEvt location allows to bypass the ring buffer altogether, * greatly optimizing the performance of the queue. Only bursts of events * engage the ring buffer. * - * @note The additional role of this attribute is to indicate the empty + *
    ote The additional role of this attribute is to indicate the empty * status of the queue. The queue is empty when frontEvt is NULL. */ QEvt const * volatile frontEvt; - /*! pointer to the start of the ring buffer. */ - QEvt const **ring; + /*! pointer to the start of the ring buffer + * @private @memberof QEQueue + */ + QEvt const ** ring; - /*! offset of the end of the ring buffer from the start of the buffer. */ + /*! offset of the end of the ring buffer from the start of the buffer + * @private @memberof QEQueue + */ QEQueueCtr end; - /*! offset to where next event will be inserted into the buffer. */ + /*! offset to where next event will be inserted into the buffer + * @private @memberof QEQueue + */ QEQueueCtr volatile head; - /*! offset of where next event will be extracted from the buffer. */ + /*! offset of where next event will be extracted from the buffer + * @private @memberof QEQueue + */ QEQueueCtr volatile tail; - /*! number of free events in the ring buffer. */ + /*! number of free events in the ring buffer + * @private @memberof QEQueue + */ QEQueueCtr volatile nFree; - /*! minimum number of free events ever in the ring buffer. - * @description - * this attribute remembers the low-watermark of the ring buffer, + /*! Minimum number of free events ever in the ring buffer. + * @private @memberof QEQueue + * + * @details + * This attribute remembers the low-watermark of the ring buffer, * which provides a valuable information for sizing event queues. * @sa QF_getQueueMargin(). */ QEQueueCtr nMin; } QEQueue; -/* public class operations */ +/* public: */ -/*! Initialize the native QF event queue */ +/*! Initialize the native QF event queue. +* @public @memberof QEQueue +* +* @details +* Initialize the event queue by giving it the storage for the ring buffer. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] qSto an array of pointers to ::QEvt to sereve as the +* ring buffer for the event queue +* @param[in] qLen the length of the @p qSto buffer (in ::QEvt pointers) +* +* @note The actual capacity of the queue is qLen + 1, because of the extra +* location forntEvt. +* +* @note +* This function is also used to initialize the event queues of active +* objects in the built-int QV and QK kernels, as well as other +* QP ports to OSes/RTOSes that do provide a suitable message queue. +*/ void QEQueue_init(QEQueue * const me, - QEvt const * * const qSto, uint_fast16_t const qLen); + QEvt const * qSto[], + uint_fast16_t const qLen); -/*! Post an event to the "raw" thread-safe event queue (FIFO). */ -bool QEQueue_post(QEQueue * const me, QEvt const * const e, - uint_fast16_t const margin, uint_fast8_t const qs_id); +/*! Post an event to the "raw" thread-safe event queue (FIFO). +* @public @memberof QEQueue +* +* @details +* Post an event to the "raw" thread-safe event queue using the +* First-In-First-Out (FIFO) order. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be posted to the queue +* @param[in] margin number of required free slots in the queue after +* posting the event. The special value #QF_NO_MARGIN +* means that this function will assert if posting +* @note +* The #QF_NO_MARGIN value of the @p margin parameter is special and +* denotes situation when the post() operation is assumed to succeed (event +* delivery guarantee). An assertion fires, when the event cannot be +* delivered in this case. +* +* @returns 'true' (success) when the posting succeeded with the provided +* margin and 'false' (failure) when the posting fails. +* +* @note This function can be called from any task context or ISR context. +* +* @sa QEQueue_postLIFO(), QEQueue_get() +*/ +bool QEQueue_post(QEQueue * const me, + QEvt const * const e, + uint_fast16_t const margin, + uint_fast8_t const qs_id); -/*! Post an event to the "raw" thread-safe event queue (LIFO). */ -void QEQueue_postLIFO(QEQueue * const me, QEvt const * const e, - uint_fast8_t const qs_id); +/*! Post an event to the "raw" thread-safe event queue (LIFO). +* @public @memberof QEQueue +* +* @details +* Post an event to the "raw" thread-safe event queue using the +* Last-In-First-Out (LIFO) order. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be posted to the queue +* +* @attention +* The LIFO policy should be used only with great __caution__, because +* it alters the order of events in the queue. +* +* @note +* This function can be called from any task context or ISR context. +* +* @note +* this function is used for the "raw" thread-safe queues and __not__ +* for the queues of active objects. +* +* @sa +* QEQueue_post(), QEQueue_get(), QActive_defer() +*/ +void QEQueue_postLIFO(QEQueue * const me, + QEvt const * const e, + uint_fast8_t const qs_id); -/*! Obtain an event from the "raw" thread-safe queue. */ -QEvt const *QEQueue_get(QEQueue * const me, uint_fast8_t const qs_id); +/*! Obtain an event from the "raw" thread-safe queue. +* @public @memberof QEQueue +* +* @details +* Retrieves an event from the front of the "raw" thread-safe queue and +* returns a pointer to this event to the caller. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* pointer to event at the front of the queue, if the queue is +* not empty and NULL if the queue is empty. +* +* @note +* this function is used for the "raw" thread-safe queues and __not__ +* for the queues of active objects. +* +* @sa +* QEQueue_post(), QEQueue_postLIFO(), QActive_recall() +*/ +QEvt const * QEQueue_get(QEQueue * const me, + uint_fast8_t const qs_id); /*! "raw" thread-safe QF event queue operation for obtaining the number * of free entries still available in the queue. -* @description +* @public @memberof QEQueue +* +* @details * This operation needs to be used with caution because the number of free * entries can change unexpectedly. The main intent for using this operation * is in conjunction with event deferral. In this case the queue is accessed @@ -183,13 +307,15 @@ QEvt const *QEQueue_get(QEQueue * const me, uint_fast8_t const qs_id); * * @returns the current number of free slots in the queue. */ -static inline QEQueueCtr QEQueue_getNFree(QEQueue * const me) { +static inline QEQueueCtr QEQueue_getNFree(QEQueue const * const me) { return me->nFree; } /*! "raw" thread-safe QF event queue operation for obtaining the minimum * number of free entries ever in the queue (a.k.a. "low-watermark"). -* @description +* @public @memberof QEQueue +* +* @details * This operation needs to be used with caution because the "low-watermark" * can change unexpectedly. The main intent for using this operation is to * get an idea of queue usage to size the queue adequately. @@ -198,13 +324,15 @@ static inline QEQueueCtr QEQueue_getNFree(QEQueue * const me) { * * @returns the minimum number of free entries ever in the queue since init. */ -static inline QEQueueCtr QEQueue_getNMin(QEQueue * const me) { +static inline QEQueueCtr QEQueue_getNMin(QEQueue const * const me) { return me->nMin; } /*! "raw" thread-safe QF event queue operation to find out if the queue * is empty. -* @description +* @public @memberof QEQueue +* +* @details * This operation needs to be used with caution because the queue status * can change unexpectedly. The main intent for using this operation is in * conjunction with event deferral. In this case the queue is accessed only @@ -215,8 +343,9 @@ static inline QEQueueCtr QEQueue_getNMin(QEQueue * const me) { * * @returns 'true' if the queue is current empty and 'false' otherwise. */ -static inline bool QEQueue_isEmpty(QEQueue * const me) { +static inline bool QEQueue_isEmpty(QEQueue const * const me) { return me->frontEvt == (QEvt *)0; } +/*$enddecl${QF::QEQueue} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* QEQUEUE_H */ diff --git a/include/qf.h b/include/qf.h index 420fcfd4..752b6a7c 100644 --- a/include/qf.h +++ b/include/qf.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qf.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qf.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,96 +32,305 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qf.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-20 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QF/C platform-independent public interface. -* @ingroup qf */ #ifndef QF_H #define QF_H -#ifndef QPSET_H -#include "qpset.h" -#endif - /*==========================================================================*/ -#ifndef QF_EVENT_SIZ_SIZE - /*! Default value of the macro configurable value in qf_port.h */ - #define QF_EVENT_SIZ_SIZE 2U -#endif -#if (QF_EVENT_SIZ_SIZE == 1U) - typedef uint8_t QEvtSize; -#elif (QF_EVENT_SIZ_SIZE == 2U) - /*! The data type to store the block-size defined based on - * the macro #QF_EVENT_SIZ_SIZE. - * The dynamic range of this data type determines the maximum block - * size that can be managed by the pool. - */ - typedef uint16_t QEvtSize; -#elif (QF_EVENT_SIZ_SIZE == 4U) - typedef uint32_t QEvtSize; -#else - #error "QF_EVENT_SIZ_SIZE defined incorrectly, expected 1, 2, or 4" -#endif +/*$declare${QF-config} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -#ifndef QF_MAX_EPOOL - /*! Default value of the macro configurable value in qf_port.h */ - #define QF_MAX_EPOOL 3U -#endif +/*${QF-config::QF_MAX_ACTIVE} ..............................................*/ +/*! Maximum number of active objects (configurable value in qf_port.hpp) +* Valid values: [1U..64U]; default 32U +*/ +#ifndef QF_MAX_ACTIVE +#define QF_MAX_ACTIVE 32U +#endif /* ndef QF_MAX_ACTIVE */ +/*${QF-config::QF_MAX_ACTIVE exceeds the maximu~} ..........................*/ +#if (QF_MAX_ACTIVE > 64U) +#error QF_MAX_ACTIVE exceeds the maximum of 64U; +#endif /* (QF_MAX_ACTIVE > 64U) */ + +/*${QF-config::QF_MAX_TICK_RATE} ...........................................*/ +/*! Maximum number of clock rates (configurable value in qf_port.hpp) +* Valid values: [0U..15U]; default 1U +*/ #ifndef QF_MAX_TICK_RATE - /*! Default value of the macro configurable value in qf_port.h. - * Valid values: [0U..15U]; default 1 - */ - #define QF_MAX_TICK_RATE 1U -#elif (QF_MAX_TICK_RATE > 15U) - #error "QF_MAX_TICK_RATE exceeds the maximum of 15" -#endif +#define QF_MAX_TICK_RATE 1U +#endif /* ndef QF_MAX_TICK_RATE */ +/*${QF-config::QF_MAX_TICK_RATE exceeds the max~} ..........................*/ +#if (QF_MAX_TICK_RATE > 15U) +#error QF_MAX_TICK_RATE exceeds the maximum of 15U; +#endif /* (QF_MAX_TICK_RATE > 15U) */ + +/*${QF-config::QF_MAX_EPOOL} ...............................................*/ +/*! Maximum number of event pools (configurable value in qf_port.hpp) +* Valid values: [1U..15U]; default 3U +*/ +#ifndef QF_MAX_EPOOL +#define QF_MAX_EPOOL 3U +#endif /* ndef QF_MAX_EPOOL */ + +/*${QF-config::QF_MAX_EPOOL exceeds the maximum~} ..........................*/ +#if (QF_MAX_EPOOL > 15U) +#error QF_MAX_EPOOL exceeds the maximum of 15U; +#endif /* (QF_MAX_EPOOL > 15U) */ + +/*${QF-config::QF_TIMEEVT_CTR_SIZE} ........................................*/ +/*! Size of the QTimeEvt counter (configurable value in qf_port.hpp) +* Valid values: 1U, 2U, or 4U; default 2U +*/ #ifndef QF_TIMEEVT_CTR_SIZE - /*! macro to override the default ::QTimeEvtCtr size. - * Valid values: 1, 2, or 4; default 2 - */ - #define QF_TIMEEVT_CTR_SIZE 2U -#endif +#define QF_TIMEEVT_CTR_SIZE 2U +#endif /* ndef QF_TIMEEVT_CTR_SIZE */ + +/*${QF-config::QF_TIMEEVT_CTR_SIZE defined inco~} ..........................*/ +#if (QF_TIMEEVT_CTR_SIZE != 1U) && (QF_TIMEEVT_CTR_SIZE != 2U) && (QF_TIMEEVT_CTR_SIZE != 4U) +#error QF_TIMEEVT_CTR_SIZE defined incorrectly, expected 1U, 2U, or 4U; +#endif /* (QF_TIMEEVT_CTR_SIZE != 1U) && (QF_TIMEEVT_CTR_SIZE != 2U) && (QF_TIMEEVT_CTR_SIZE != 4U) */ + +/*${QF-config::QF_EVENT_SIZ_SIZE} ..........................................*/ +/*! Size of the event-size (configurable value in qf_port.hpp) +* Valid values: 1U, 2U, or 4U; default 2U +*/ +#ifndef QF_EVENT_SIZ_SIZE +#define QF_EVENT_SIZ_SIZE 2U +#endif /* ndef QF_EVENT_SIZ_SIZE */ + +/*${QF-config::QF_EVENT_SIZ_SIZE defined incorr~} ..........................*/ +#if (QF_EVENT_SIZ_SIZE != 1U) && (QF_EVENT_SIZ_SIZE != 2U) && (QF_EVENT_SIZ_SIZE != 4U) +#error QF_EVENT_SIZ_SIZE defined incorrectly, expected 1U, 2U, or 4U; +#endif /* (QF_EVENT_SIZ_SIZE != 1U) && (QF_EVENT_SIZ_SIZE != 2U) && (QF_EVENT_SIZ_SIZE != 4U) */ +/*$enddecl${QF-config} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*==========================================================================*/ -struct QEQueue; /* forward declaration */ +/*$declare${QF-types} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! Active Object base class (based on ::QHsm implementation) +/*${QF-types::QPSetBits} ...................................................*/ +/*! bitmask for the internal representation of QPSet elements */ +#if (8U < QF_MAX_ACTIVE) && (QF_MAX_ACTIVE <= 16U) +typedef uint16_t QPSetBits; +#endif /* (8U < QF_MAX_ACTIVE) && (QF_MAX_ACTIVE <= 16U) */ + +/*${QF-types::QPSetBits} ...................................................*/ +#if (16 < QF_MAX_ACTIVE) +typedef uint32_t QPSetBits; +#endif /* (16 < QF_MAX_ACTIVE) */ + +/*${QF-types::QPSetBits} ...................................................*/ +#if (QF_MAX_ACTIVE <= 8U) +typedef uint8_t QPSetBits; +#endif /* (QF_MAX_ACTIVE <= 8U) */ + +/*${QF-types::QTimeEvtCtr} .................................................*/ +/*! Data type to store the block-size defined based on the macro +* #QF_TIMEEVT_CTR_SIZE. +* +* @details +* The dynamic range of this data type determines the maximum block +* size that can be managed by the pool. +*/ +#if (QF_TIMEEVT_CTR_SIZE == 2U) +typedef uint16_t QTimeEvtCtr; +#endif /* (QF_TIMEEVT_CTR_SIZE == 2U) */ + +/*${QF-types::QTimeEvtCtr} .................................................*/ +#if (QF_TIMEEVT_CTR_SIZE == 4U) +typedef uint32_t QTimeEvtCtr; +#endif /* (QF_TIMEEVT_CTR_SIZE == 4U) */ + +/*${QF-types::QTimeEvtCtr} .................................................*/ +#if (QF_TIMEEVT_CTR_SIZE == 1U) +typedef uint8_t QTimeEvtCtr; +#endif /* (QF_TIMEEVT_CTR_SIZE == 1U) */ + +/*${QF-types::QF_LOG2} .....................................................*/ +#ifndef QF_LOG2 +/*! Log-base-2 calculation when hardware acceleration +* is NOT provided (#QF_LOG2 not defined). +*/ +uint_fast8_t QF_LOG2(QPSetBits x); +#endif /* ndef QF_LOG2 */ + +/*${QF-types::QPSet} .......................................................*/ +/*! @brief Priority Set of up to #QF_MAX_ACTIVE elements +* @class QPSet +* +* @details +* The priority set represents the set of active objects that are ready to +* run and need to be considered by the scheduling algorithm. The set is +* capable of storing up to #QF_MAX_ACTIVE priority levels, which can be +* configured in the rage 1..64, inclusive. +*/ +typedef struct { +/* public: */ + + /*! bitmask with a bit for each element */ +#if (QF_MAX_ACTIVE <= 32) + QPSetBits volatile bits; +#endif /* (QF_MAX_ACTIVE <= 32) */ + + /*! bitmasks with a bit for each element */ +#if (32 < QF_MAX_ACTIVE) + QPSetBits volatile bits[2]; +#endif /* (32 < QF_MAX_ACTIVE) */ +} QPSet; + +/* public: */ + +/*! Make the priority set empty */ +static inline void QPSet_setEmpty(QPSet * const me) { + #if (QF_MAX_ACTIVE <= 32) + me->bits = 0U; + #else + me->bits[0] = 0U; + me->bits[1] = 0U; + #endif +} + +/*! Return 'true' if the priority set is empty */ +static inline bool QPSet_isEmpty(QPSet const * const me) { + #if (QF_MAX_ACTIVE <= 32) + return (me->bits == 0U); + #else + return (me->bits[0] == 0U) ? (me->bits[1] == 0U) : false; + #endif +} + +/*! Return 'true' if the priority set is NOT empty */ +static inline bool QPSet_notEmpty(QPSet const * const me) { + #if (QF_MAX_ACTIVE <= 32) + return (me->bits != 0U); + #else + return (me->bits[0] != 0U) ? true : (me->bits[1] != 0U); + #endif +} + +/*! Return 'true' if the priority set has the element n. */ +static inline bool QPSet_hasElement(QPSet const * const me, + uint_fast8_t const n) +{ + #if (QF_MAX_ACTIVE <= 32U) + return (me->bits & (1U << (n - 1U))) != 0U; + #else + return (n <= 32U) + ? ((me->bits[0] & ((uint32_t)1U << (n - 1U))) != 0U) + : ((me->bits[1] & ((uint32_t)1U << (n - 33U))) != 0U); + #endif +} + +/*! insert element `n` into the set (n = 1..::QF_MAX_ACTIVE) */ +static inline void QPSet_insert(QPSet * const me, + uint_fast8_t const n) +{ + #if (QF_MAX_ACTIVE <= 32U) + me->bits = (me->bits | (1U << (n - 1U))); + #else + if (n <= 32U) { + me->bits[0] = (me->bits[0] | ((uint32_t)1U << (n - 1U))); + } + else { + me->bits[1] = (me->bits[1] | ((uint32_t)1U << (n - 33U))); + } + #endif +} + +/*! Remove element `n` from the set (n = 1U..::QF_MAX_ACTIVE) */ +static inline void QPSet_remove(QPSet * const me, + uint_fast8_t const n) +{ + #if (QF_MAX_ACTIVE <= 32U) + me->bits = (me->bits & + (QPSetBits)(~((QPSetBits)1U << (n - 1U)))); + #else + if (n <= 32U) { + (me->bits[0] = (me->bits[0] & ~((uint32_t)1U << (n - 1U)))); + } + else { + (me->bits[1] = (me->bits[1] & ~((uint32_t)1U << (n - 33U)))); + } + #endif +} + +/*! Find the maximum element in the set, returns zero if the set is empty */ +static inline uint_fast8_t QPSet_findMax(QPSet const * const me) { + #if (QF_MAX_ACTIVE <= 32) + return QF_LOG2(me->bits); + #else + return (me->bits[1] != 0U) + ? (QF_LOG2(me->bits[1]) + 32U) + : (QF_LOG2(me->bits[0])); + #endif +} + +/*${QF-types::QSubscrList} .................................................*/ +/*! Subscriber List (for publish-subscribe) +* +* @details +* This data type represents a set of active objects that subscribe to +* a given signal. The set is represented as priority-set, where each +* bit corresponds to the unique priority of an active object. +*/ +typedef QPSet QSubscrList; + +/*${QF-types::QSchedStatus} ................................................*/ +/*! The scheduler lock status */ +typedef uint_fast8_t QSchedStatus; +/*$enddecl${QF-types} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QF::QActive} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QActive} ...........................................................*/ +/*! @brief Active object class (based on the QHsm implementation strategy) +* @class QActive * @extends QHsm -* @description -* Active objects in QP are encapsulated state machines (each embedding an -* event queue and a thread) that communicate with one another asynchronously -* by sending and receiving events. Within an active object, events are -* processed sequentially in a run-to-completion (RTC) fashion, while QF -* encapsulates all the details of thread-safe event exchange and queuing. -* @n@n -* ::QActive represents an active object that uses the QHsm-style +* +* @details +* Active objects are encapsulated tasks (each containing an event queue and +* a state machine) that communicate with one another asynchronously by +* sending and receiving events. Within an active object, events are +* processed in a run-to-completion (RTC) fashion, while QF encapsulates +* all the details of thread-safe event exchange and queuing.
    +* +* QActive represents an active object that uses the QHsm-style * implementation strategy for state machines. This strategy is tailored * to manual coding, but it is also supported by the QM modeling tool. -* The resulting code is slower than in the ::QMsm style implementation +* The resulting code is slower than in the ::QMsm-style implementation * strategy. * +* @note +* QActive is not intended to be instantiated directly, but rather serves +* as the abstract base class for derivation of active objects in the +* applications. +* +* @sa QMActive +* * @usage * The following example illustrates how to derive an active object from -* ::QActive. Please note that the ::QActive member @c super is defined as the -* __first__ member of the derived struct (see @ref oop). +* QActive. * @include qf_qactive.c */ typedef struct QActive { - QHsm super; /*!< @protected inherits ::QHsm */ +/* protected: */ + QHsm super; -#ifdef QF_EQUEUE_TYPE - /*! @private OS-dependent event-queue type. - * @description +/* private: */ + + /*! OS-dependent event-queue type + * @private @memberof QActive + * + * @details * The type of the queue depends on the underlying operating system or * a kernel. Many kernels support "message queues" that can be adapted * to deliver QF events to the active object. Alternatively, QF provides @@ -118,42 +340,511 @@ typedef struct QActive { * The native QF event queue is configured by defining the macro * #QF_EQUEUE_TYPE as ::QEQueue. */ +#ifdef QF_EQUEUE_TYPE QF_EQUEUE_TYPE eQueue; -#endif +#endif /* def QF_EQUEUE_TYPE */ -#ifdef QF_OS_OBJECT_TYPE - /*! @private OS-dependent per-thread object. - * @description + /*! OS-dependent per-thread object + * @private @memberof QActive + * + * @details * This data might be used in various ways, depending on the QF port. - * In some ports osObject is used to block the calling thread when + * In some ports me->osObject is used to block the calling thread when * the native QF queue is empty. In other QF ports the OS-dependent * object might be used differently. */ +#ifdef QF_OS_OBJECT_TYPE QF_OS_OBJECT_TYPE osObject; -#endif +#endif /* def QF_OS_OBJECT_TYPE */ -#ifdef QF_THREAD_TYPE - /*! @private OS-dependent representation of the thread of the AO. - * @description + /*! OS-dependent representation of the thread of the active object + * @private @memberof QActive + * + * @details * This data might be used in various ways, depending on the QF port. - * In some ports thread is used to store the thread handle. In other - * ports thread can be the pointer to the Thread-Local-Storage (TLS). + * In some ports me->thread is used store the thread handle. In other ports + * me->thread can be a pointer to the Thread-Local-Storage (TLS). */ +#ifdef QF_THREAD_TYPE QF_THREAD_TYPE thread; -#endif +#endif /* def QF_THREAD_TYPE */ -#ifdef QXK_H /* QXK kernel used? */ - /*! @private QXK dynamic priority (1..#QF_MAX_ACTIVE) of this AO/thread */ +/* public: */ + + /*! QXK dynamic priority (1..#QF_MAX_ACTIVE) of AO/thread. + * @private @memberof QActive + */ +#ifdef QXK_H uint8_t dynPrio; -#endif +#endif /* def QXK_H */ - /*! @private QF priority (1..#QF_MAX_ACTIVE) of this active object. */ + /*! QF priority (1..#QF_MAX_ACTIVE) of this active object. + * @private @memberof QActive + */ uint8_t prio; +/* private: */ } QActive; -/*! Virtual table for the ::QActive class */ -typedef struct { +/* protected: */ + +/*! ::QActive constructor (abstract base class) +* @protected @memberof QActive +*/ +void QActive_ctor(QActive * const me, + QStateHandler const initial); + +/* private: */ + +/*! Starts execution of an active object and registers the object +* with the framework +* @private @memberof QActive +* +* @details +* Starts execution of the AO and registers the AO with the framework. +* +* @param[in] prio priority at which to start the active object +* @param[in] qSto pointer to the storage for the ring buffer of the +* event queue +* @param[in] qLen length of the event queue [# ::QEvt* pointers] +* @param[in] stkSto pointer to the stack storage (might be nullptr) +* @param[in] stkSize stack size [bytes] +* @param[in] par pointer to an extra parameter (might be nullptr) +* +* @usage +* The following example shows starting an AO when a per-task stack +* is needed: +* @include qf_start.c +*/ +void QActive_start_(QActive * const me, + uint_fast8_t const prio, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par); + +/* protected: */ + +/*! Stops execution of an active object and removes it from the +* framework's supervision +* @protected @memberof QActive +* +* @attention +* QActive_stop() must be called only from the AO that is about +* to stop its execution. By that time, any pointers or references +* to the AO are considered invalid (dangling) and it becomes +* illegal for the rest of the application to post events to the AO. +*/ +#ifdef QF_ACTIVE_STOP +void QActive_stop(QActive * const me); +#endif /* def QF_ACTIVE_STOP */ + +/* private: */ + +/*! Posts an event `e` directly to the event queue of the active object +* using the First-In-First-Out (FIFO) policy. +* @private @memberof QActive +* +* @details +* Direct event posting is the simplest asynchronous communication +* method available in QF. +* +* @param[in] e pointer to the event to be posted +* @param[in] margin number of required free slots in the queue +* after posting the event or ::QF_NO_MARGIN. +* @param[in] sender pointer to a sender object (used in QS only) +* +* @returns +* 'true' (success) if the posting succeeded (with the provided margin) +* and 'false' (failure) when the posting fails. +* +* @attention +* For `margin` == ::QF_NO_MARGIN, this function will assert internally +* if the event posting fails. In that case, it is unnecessary to check +* the retrun value from this function. +* +* @note +* This function might be implemented differently in various QP/C++ +* ports. The provided implementation assumes that the ::QEQueue +* class is used for the ::QActive event queue. +* +* @usage +* @include qf_post.cpp +* +* @sa +* QActive_postLIFO() +*/ +bool QActive_post_(QActive * const me, + QEvt const * const e, + uint_fast16_t const margin, + void const * const sender); + +/*! Posts an event `e` directly to the event queue of the active object +* using the Last-In-First-Out (LIFO) policy. +* @private @memberof QActive +* +* @details +* The LIFO policy should be used only for self-posting and with caution, +* because it alters order of events in the queue. +* +* @param[in] e pointer to the event to be posted +* +* @attention +* This function asserts internally if the posting fails. +* +* @note +* This function might be implemented differently in various QP/C++ +* ports. The provided implementation assumes that the ::QEQueue +* class is used for the QActive event queue. +* +* @sa +* QActive_post() +*/ +void QActive_postLIFO_(QActive * const me, + QEvt const * const e); + +/*! Get an event from the event queue of an active object +* @private @memberof QActive +* +* @details +* The behavior of this function depends on the kernel used in the +* QF port. For built-in kernels (Vanilla or QK) the function can be +* called only when the queue is not empty, so it doesn't block. For +* a blocking kernel/OS the function can block and wait for delivery +* of an event. +* +* @returns +* A pointer to the received event. The returned pointer is guaranteed +* to be valid (can't be nullptr). +* +* @note +* This function might be implemented differently in various QP/C++ +* ports. The provided implementation assumes that the ::QEQueue +* class is used for the QActive event queue. +*/ +QEvt const * QActive_get_(QActive * const me); + +/* public: */ + +/*! Subscribes for delivery of signal `sig` to the active object +* @public @memberof QActive +* +* @details +* This function is part of the Publish-Subscribe event delivery +* mechanism available in QF. Subscribing to an event means that the +* framework will start posting all published events with a given signal +* `sig` to the event queue of the active object. +* +* @param[in] sig event signal to subscribe +* +* The following example shows how the Table active object subscribes +* to three signals in the initial transition: +* @include qf_subscribe.cpp +* +* @sa +* QActive_publish_(), QActive_unsubscribe(), and +* QActive_unsubscribeAll() +*/ +void QActive_subscribe(QActive const * const me, + enum_t const sig); + +/*! Unsubscribes from the delivery of signal `sig` to the active object +* @public @memberof QActive +* +* @details +* This function is part of the Publish-Subscribe event delivery +* mechanism available in QF. Un-subscribing from an event means that +* the framework will stop posting published events with a given signal +* `sig` to the event queue of the active object. +* +* @param[in] sig event signal to unsubscribe +* +* @note +* Due to the latency of event queues, an active object should NOT +* assume that a given signal @p sig will never be dispatched to the +* state machine of the active object after un-subscribing from that +* signal. The event might be already in the queue, or just about to +* be posted and the un-subscribe operation will not flush such events. +* +* @note +* Un-subscribing from a signal that has never been subscribed in the +* first place is considered an error and QF will raise an assertion. +* +* @sa +* QActive_publish_(), QActive_subscribe(), and +* QActive_unsubscribeAll() +*/ +void QActive_unsubscribe(QActive const * const me, + enum_t const sig); + +/*! Unsubscribes from the delivery of all signals to the active object +* @public @memberof QActive +* +* @details +* This function is part of the Publish-Subscribe event delivery +* mechanism available in QF. Un-subscribing from all events means that +* the framework will stop posting any published events to the event +* queue of the active object. +* +* @note +* Due to the latency of event queues, an active object should NOT +* assume that no events will ever be dispatched to the state machine of +* the active object after un-subscribing from all events. +* The events might be already in the queue, or just about to be posted +* and the un-subscribe operation will not flush such events. Also, the +* alternative event-delivery mechanisms, such as direct event posting or +* time events, can be still delivered to the event queue of the active +* object. +* +* @sa +* QActive_publish_(), QActive_subscribe(), and QActive_unsubscribe() +*/ +void QActive_unsubscribeAll(QActive const * const me); + +/*! Publish event to all subscribers of a given signal `e->sig` +* @static @public @memberof QActive +* +* @details +* This function posts (using the FIFO policy) the event @a e to **all** +* active objects that have subscribed to the signal @a e->sig, which is +* called _multicasting_. The multicasting performed in this function is +* very efficient based on reference-counting inside the published event +* ("zero-copy" event multicasting). This function is designed to be +* callable from any part of the system, including ISRs, device drivers, +* and active objects. +* +* @note +* To avoid any unexpected re-ordering of events posted into AO queues, +* the event multicasting is performed with scheduler **locked**. +* However, the scheduler is locked only up to the priority level of +* the highest-priority subscriber, so any AOs of even higher priority, +* which did not subscribe to this event are *not* affected. +*/ +void QActive_psInit( + QSubscrList * const subscrSto, + enum_t const maxSignal); + +/* private: */ + +/*! Publish event to all subscribers of a given signal `e->sig` +* @static @private @memberof QActive +* +* @details +* This function posts (using the FIFO policy) the event @a e to **all** +* active objects that have subscribed to the signal @a e->sig, which is +* called _multicasting_. The multicasting performed in this function is +* very efficient based on reference-counting inside the published event +* ("zero-copy" event multicasting). This function is designed to be +* callable from any part of the system, including ISRs, device drivers, +* and active objects. +* +* @note +* To avoid any unexpected re-ordering of events posted into AO queues, +* the event multicasting is performed with scheduler **locked**. +* However, the scheduler is locked only up to the priority level of +* the highest-priority subscriber, so any AOs of even higher priority, +* which did not subscribe to this event are *not* affected. +*/ +void QActive_publish_( + QEvt const * const e, + void const * const sender, + uint_fast8_t const qs_id); + +/* protected: */ + +/*! Defer an event to a given separate event queue +* @protected @memberof QActive +* +* @details +* This function is part of the event deferral support. An active object +* uses this function to defer an event @p e to the QF-supported native +* event queue @p eq. QF correctly accounts for another outstanding +* reference to the event and will not recycle the event at the end of +* the RTC step. Later, the active object might recall one event at a +* time from the event queue. +* +* @param[in] eq pointer to a "raw" thread-safe queue to recall +* an event from. +* @param[in] e pointer to the event to be deferred +* +* @returns +* 'true' (success) when the event could be deferred and 'false' +* (failure) if event deferral failed due to overflowing the queue. +* +* An active object can use multiple event queues to defer events of +* different kinds. +* +* @sa +* QActive_recall(), ::QEQueue, QActive_flushDeferred() +*/ +bool QActive_defer(QActive const * const me, + QEQueue * const eq, + QEvt const * const e); + +/*! Recall a deferred event from a given event queue +* @protected @memberof QActive +* +* @details +* This function is part of the event deferral support. An active object +* uses this function to recall a deferred event from a given QF +* event queue. Recalling an event means that it is removed from the +* deferred event queue @p eq and posted (LIFO) to the event queue of +* the active object. +* +* @param[in] eq pointer to a "raw" thread-safe queue to recall +* an event from. +* +* @returns +* 'true' if an event has been recalled and 'false' if not. +* +* @note +* An active object can use multiple event queues to defer events of +* different kinds. +* +* @sa +* QActive_recall(), QActive_postLIFO_(), ::QEQueue +*/ +bool QActive_recall(QActive * const me, + QEQueue * const eq); + +/*! Flush the specified deferred queue 'eq' +* @protected @memberof QActive +* +* @details +* This function is part of the event deferral support. An active object +* can use this function to flush a given QF event queue. The function +* makes sure that the events are not leaked. +* +* @param[in] eq pointer to a "raw" thread-safe queue to flush. +* +* @returns +* the number of events actually flushed from the queue. +* +* @sa +* QActive_defer(), QActive_recall(), ::QEQueue +*/ +uint_fast16_t QActive_flushDeferred(QActive const * const me, + QEQueue * const eq); + +/* public: */ + +/*! Get the priority of the active object. +* @public @memberof QActive +*/ +static inline uint_fast8_t QActive_getPrio(QActive const * const me) { + return (uint_fast8_t)me->prio; +} + +/*! Set the priority of the active object +* @public @memberof QActive +*/ +static inline void QActive_setPrio(QActive * const me, + uint_fast8_t const prio) +{ + me->prio = (uint8_t)prio; +} + +/*! Generic setting of additional attributes (useful in QP ports) +* @public @memberof QActive +*/ +void QActive_setAttr(QActive * const me, + uint32_t attr1, + void const * attr2); + +/* private: */ + +/*! Thread routine for executing an active object `act` +* @private @memberof QActive +*/ +void QActive_thread_(QActive * act); + +/* protected: */ + +/*! Register this active object to be managed by the framework +* @protected @memberof QActive +* +* @details +* This function adds a given active object to the active objects +* managed by the QF framework. It should not be called by the +* application directly, only through the function QActive::start(). +* +* @note +* The priority of the active object a should be set before calling +* this function. +* +* @sa QActive_unregister_() +*/ +void QActive_register_(QActive * const me); + +/*! Un-register the active object from the framework +* @protected @memberof QActive +* +* @details +* This function un-registers a given active object from the active objects +* managed by the QF framework. It should not be called by the QP ports. +* +* @param[in] me pointer to the active object to remove from the +* framework. +* +* @note +* The active object that is removed from the framework can no longer +* participate in any event exchange. +* +* @sa QActive_register_() +*/ +void QActive_unregister_(QActive * const me); + +/* private: */ + +/*! the "FromISR" variant used in the QP port to "FreeRTOS" +* @private @memberof QActive +*/ +#ifdef QF_ISR_API +bool QActive_postFromISR_(QActive * const me, + QEvt const * const e, + uint_fast16_t const margin, + void * par, + void const * const sender); +#endif /* def QF_ISR_API */ + +/* public: */ + +/*! the "FromISR" variant used in the QP port to "FreeRTOS" +* @private @memberof QActive +*/ +#ifdef QF_ISR_API +void QActive_publishFromISR_( + QEvt const * e, + void * par, + void const * sender); +#endif /* def QF_ISR_API */ + +/*! Internal array of registered active objects +* @static @private @memberof QActive +*/ +extern QActive * QActive_active_[QF_MAX_ACTIVE + 1U]; + +/*! pointer to the array of all subscriber AOs for a given event signal. +* @static @private @memberof QActive +*/ +extern QSubscrList * QActive_subscrList_; + +/*! The maximum published signal (the size of the subscrList_ array) +* @static @private @memberof QActive +*/ +extern enum_t QActive_maxPubSignal_; + +/*! Internal array of registered active objects +* @static @private @memberof QActive +*/ +extern QActive * QActive_registry_[QF_MAX_ACTIVE + 1U]; +/*$enddecl${QF::QActive} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QF::QActiveVtable} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QActiveVtable} .....................................................*/ +/*! @brief Virtual table for the QActive class */ +typedef struct QActiveVtable { struct QHsmVtable super; /*!< @protected inherits ::QHsmVtable */ /*! @private virtual function to start the AO/thread @@ -164,17 +855,12 @@ typedef struct { void * const stkSto, uint_fast16_t const stkSize, void const * const par); -#ifdef Q_SPY /*! @private virtual function to asynchronously post (FIFO) * an event to the AO * @sa QACTIVE_POST() and QACTIVE_POST_X() */ bool (*post)(QActive * const me, QEvt const * const e, uint_fast16_t const margin, void const * const sender); -#else - bool (*post)(QActive * const me, QEvt const * const e, - uint_fast16_t const margin); -#endif /*! @private virtual function to asynchronously post (LIFO) * an event to the AO @@ -183,182 +869,16 @@ typedef struct { void (*postLIFO)(QActive * const me, QEvt const * const e); } QActiveVtable; +/*$enddecl${QF::QActiveVtable} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QF::QMActive} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/* QActive public operations... */ -/*! Polymorphically start an active object. -* @description -* Starts execution of the AO and registers the AO with the framework. +/*${QF::QMActive} ..........................................................*/ +/*! @brief Active object class (based on QMsm implementation strategy) +* @class QMActive +* @extends QActive * -* @param[in,out] me_ pointer (see @ref oop) -* @param[in] prio_ priority at which to start the active object -* @param[in] qSto_ pointer to the storage for the ring buffer of the -* event queue (used only with the built-in ::QEQueue) -* @param[in] qLen_ length of the event queue (in events) -* @param[in] stkSto_ pointer to the stack storage (used only when -* per-AO stack is needed) -* @param[in] stkSize_ stack size (in bytes) -* @param[in] par_ pointer to the additional port-specific parameter(s) -* (might be NULL). -* @usage -* @include qf_start.c -*/ -#define QACTIVE_START(me_, prio_, qSto_, qLen_, stkSto_, stkLen_, par_) do { \ - Q_ASSERT((Q_HSM_UPCAST(me_))->vptr); \ - (*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->start)( \ - (QActive *)(me_), (prio_), \ - (qSto_), (qLen_), (stkSto_), (stkLen_), (par_)); \ -} while (false) - -#ifdef Q_SPY - /*! Polymorphically posts an event to an active object (FIFO) - * with delivery guarantee. - * @description - * This macro asserts if the queue overflows and cannot accept the event. - * - * @param[in,out] me_ pointer (see @ref oop) - * @param[in] e_ pointer to the event to post - * @param[in] sender_ pointer to the sender object. - * - * @note - * The @p sendedr_ parameter is actually only used when QS tracing - * is enabled (macro #Q_SPY is defined). When QS software tracing is - * disenabled, the QACTIVE_POST() macro does not pass the @p sender_ - * argument, so the overhead of passing this extra argument is entirely - * avoided. - * - * @note - * The pointer to the sender object is not necessarily a pointer - * to an active object. In fact, if QACTIVE_POST() is called from an - * interrupt or other context, you can create a unique object just to - * unambiguously identify the sender of the event. - * - * @sa #QACTIVE_POST_X, QActive_post_(). - */ - #define QACTIVE_POST(me_, e_, sender_) \ - ((void)(*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)(\ - (me_), (e_), QF_NO_MARGIN, (sender_))) - - /*! Polymorphically posts an event to an active object (FIFO) - * without delivery guarantee. - * @description - * This macro does not assert if the queue overflows and cannot accept - * the event with the specified margin of free slots remaining. - * - * @param[in,out] me_ pointer (see @ref oop) - * @param[in] e_ pointer to the event to post - * @param[in] margin_ the minimum free slots in the queue, which - * must still be available after posting the event. - * The special value #QF_NO_MARGIN causes asserting failure - * in case event allocation fails. - * @param[in] sender_ pointer to the sender object. - * - * @returns 'true' if the posting succeeded, and 'false' if the posting - * failed due to insufficient margin of free slots available in the queue. - * - * @note - * The @p sender_ parameter is actually only used when QS tracing - * is enabled (macro #Q_SPY is defined). When QS software tracing is - * disabled, the QACTIVE_POST() macro does not pass the @p sender_ - * argument, so the overhead of passing this extra argument is entirely - * avoided. - * - * @note - * The pointer to the sender object is not necessarily a pointer - * to an active object. In fact, if QACTIVE_POST_X() is called from an - * interrupt or other context, you can create a unique object just to - * unambiguously identify the sender of the event. - * - * @usage - * @include qf_postx.c - */ - #define QACTIVE_POST_X(me_, e_, margin_, sender_) \ - ((*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)((me_),\ - (e_), (margin_), (sender_))) -#else - - #define QACTIVE_POST(me_, e_, sender_) \ - ((void)(*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)(\ - (me_), (e_), QF_NO_MARGIN)) - - #define QACTIVE_POST_X(me_, e_, margin_, sender_) \ - ((*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)( \ - (me_), (e_), (margin_))) - -#endif - -/*! Polymorphically posts an event to an active object using the -* Last-In-First-Out (LIFO) policy. -* @param[in,out] me_ pointer (see @ref oop) -* @param[in] e_ pointer to the event to post -*/ -#define QACTIVE_POST_LIFO(me_, e_) \ - ((*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->postLIFO)( \ - (me_), (e_))) - -/* QActive protected operations... */ -/*! protected "constructor" of an ::QActive active object -* @protected @memberof QActive -*/ -void QActive_ctor(QActive * const me, QStateHandler initial); - -#ifdef QF_ACTIVE_STOP - /*! Stops execution of an active object and removes it from the - * framework's supervision. - * @protected @memberof QActive - * - * @attention - * QActive_stop() must be called only from the AO that is about - * to stop its execution. By that time, any pointers or references - * to the AO are considered invalid (dangling) and it becomes - * illegal for the rest of the application to post events to the AO. - */ - void QActive_stop(QActive * const me); -#endif - -/*! Subscribes for delivery of signal @p sig to the active object @p me. -* @protected @memberof QActive -*/ -void QActive_subscribe(QActive const * const me, enum_t const sig); - -/*! Un-subscribes from the delivery of signal @p sig to the AO @p me. -* @protected @memberof QActive -*/ -void QActive_unsubscribe(QActive const * const me, enum_t const sig); - -/*! Un-subscribes from the delivery of all signals to the AO @p me. -* @protected @memberof QActive -*/ -void QActive_unsubscribeAll(QActive const * const me); - -/*! Defer an event @p e to a given event queue @p eq. -* @protected @memberof QActive -*/ -bool QActive_defer(QActive const * const me, - QEQueue * const eq, QEvt const * const e); - -/*! Recall a deferred event from a given event queue @p eq. -* @protected @memberof QActive -*/ -bool QActive_recall(QActive * const me, QEQueue * const eq); - -/*! Flush the specified deferred queue @p eq. -* @protected @memberof QActive -*/ -uint_fast16_t QActive_flushDeferred(QActive const * const me, - QEQueue * const eq); - -/*! Generic setting of additional attributes (useful in QP ports) -* @protected @memberof QActive -*/ -void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2); - - -/*==========================================================================*/ - -/*! QMActive active object base class (based on ::QMsm implementation) -* @extends QActvie -* @description -* QMActive represents an active object that uses the ::QMsm style state +* @details +* ::QMActive represents an active object that uses the ::QMsm style state * machine implementation strategy. This strategy requires the use of the * QM modeling tool to generate state machine code automatically, but the * code is faster than in the ::QHsm style implementation strategy and needs @@ -368,57 +888,58 @@ void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2); * ::QMActive is not intended to be instantiated directly, but rather serves * as the base class for derivation of active objects in the application. * -* @sa ::QActive +* @tr{AQP214} * * @usage * The following example illustrates how to derive an active object from * ::QMActive. Please note that the ::QActive member @c super is defined as -* the __first__ member of the derived struct (see @ref oop). +* the **first** member of the derived struct (see @ref oop). * @include qf_qmactive.c */ typedef struct { - QActive super; /*!< @protected inherits ::QActive */ +/* protected: */ + QActive super; } QMActive; -/*! Virtual Table for the ::QMActive class (inherited from ::QActiveVtable +/* protected: */ + +/*! Constructor of ::QMActive class. +* @protected @memberof QMActive +* +* @details +* Performs the first step of active object initialization by assigning +* the virtual pointer and calling the superclass constructor. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] initial pointer to the event to be dispatched to the MSM +* +* @note Must be called only ONCE before QHSM_INIT(). +* +* @sa QHsm_ctor() +*/ +void QMActive_ctor(QMActive * const me, + QStateHandler const initial); +/*$enddecl${QF::QMActive} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QF::QMActiveVtable} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QMActiveVtable} ....................................................*/ +/*! @brief Virtual Table for the ::QMActive class (inherited +* from ::QActiveVtable) +* * @note * ::QMActive inherits ::QActive exactly, without adding any new virtual * functions and therefore, ::QMActiveVtable is typedef'ed as ::QActiveVtable. */ typedef QActiveVtable QMActiveVtable; +/*$enddecl${QF::QMActiveVtable} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QF::QTimeEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/* QMActive protected operations... */ -/*! protected "constructor" of an ::QMActive active object. -* @protected @memberof QMActive -*/ -void QMActive_ctor(QMActive * const me, QStateHandler initial); - - -/*==========================================================================*/ - -#if (QF_TIMEEVT_CTR_SIZE == 1U) - typedef uint8_t QTimeEvtCtr; -#elif (QF_TIMEEVT_CTR_SIZE == 2U) - - /*! type of the Time Event counter, which determines the dynamic - * range of the time delays measured in clock ticks. - * @description - * This typedef is configurable via the preprocessor switch - * #QF_TIMEEVT_CTR_SIZE. The other possible values of this type are - * as follows: @n - * uint8_t when (QF_TIMEEVT_CTR_SIZE == 1U), and @n - * uint32_t when (QF_TIMEEVT_CTR_SIZE == 4U). - */ - typedef uint16_t QTimeEvtCtr; -#elif (QF_TIMEEVT_CTR_SIZE == 4U) - typedef uint32_t QTimeEvtCtr; -#else - #error "QF_TIMEEVT_CTR_SIZE defined incorrectly, expected 1, 2, or 4" -#endif - -/*! Time Event class +/*${QF::QTimeEvt} ..........................................................*/ +/*! @brief Time Event class +* @class QTimeEvt * @extends QEvt -* @description +* +* @details * Time events are special QF events equipped with the notion of time passage. * The basic usage model of the time events is as follows. An active object * allocates one or more ::QTimeEvt objects (provides the storage for them). @@ -430,23 +951,25 @@ void QMActive_ctor(QMActive * const me, QStateHandler initial); * inserts the time event directly into the recipient's event queue. The * recipient then processes the time event just like any other event. * -* Time events, as any other QF events derive from the ::QEvt base structure. +* Time events, as any other QF events derive from the ::QEvt base class. * Typically, you will use a time event as-is, but you can also further * derive more specialized time events from it by adding some more data * members and/or specialized functions that operate on the specialized * time events. * -* Internally, the armed time events are organized into linked lists--one list -* for every supported ticking rate. These linked lists are scanned in every -* invocation of the QF_TICK_X() macro. Only armed (timing out) time events -* are in the list, so only armed time events consume CPU cycles. +* Internally, the armed time events are organized into linked lists--one +* list for every supported ticking rate. These linked lists are scanned in +* every invocation of the QTIMEEVT_TICK_X() macro. Only armed (timing out) +* time events are in the list, so only armed time events consume CPU cycles. * -* @sa ::QTimeEvt for the description of the data members @n @ref oop +* @sa ::QTimeEvt for the description of the data members +* +* @tr{AQP215} * * @note -* QF manages the time events in the QF_TICK_X() macro, which must be called -* periodically, from the clock tick ISR or from other periodic source. -* QF_TICK_X() caYou might also use the special ::QTicker +* QF manages the time events in the QTIMEEVT_TICK_X() macro, which must +* be called periodically, from the clock tick ISR or from other periodic +* source. QTIMEEVT_TICK_X() caYou might also use the special ::QTicker * active object. * * @note @@ -455,133 +978,440 @@ void QMActive_ctor(QMActive * const me, QStateHandler initial); * allocate ::QTimeEvt instances with the Q_NEW() or Q_NEW_X() macros. */ typedef struct QTimeEvt { - QEvt super; /*!< @protected inherits ::QEvt */ +/* protected: */ + QEvt super; - /*! @private link to the next time event in the list */ +/* private: */ + + /*! link to the next time event in the list + * @private @memberof QTimeEvt + */ struct QTimeEvt * volatile next; - /*! @private the active object that receives the time events */ + /*! The active object that receives the time events + * @private @memberof QTimeEvt + */ void * volatile act; - /*! @private internal down-counter of the time event. - * @description - * The down-counter is decremented by 1 in every QF_tickX_() invocation. + /*! Internal down-counter of the time event. + * @private @memberof QTimeEvt + * + * @details + * The down-counter is decremented by 1 in every QTimeEvt_tick_() call. * The time event fires (gets posted or published) when the down-counter * reaches zero. */ QTimeEvtCtr volatile ctr; - /*! @private interval for periodic time event - * (zero for one-shot time event) - * @description + /*! Interval for periodic time event (zero for one-shot time event) + * @private @memberof QTimeEvt + * + * @details * The value of the interval is re-loaded to the internal down-counter * when the time event expires, so that the time event keeps timing out * periodically. */ QTimeEvtCtr interval; + +/* public: */ } QTimeEvt; -/* QTimeEvt public operations... */ +/* public: */ /*! The extended "constructor" to initialize a Time Event. * @public @memberof QTimeEvt +* +* @details +* When creating a time event, you must commit it to a specific active object +* @p act, tick rate @p tickRate and event signal @p sig. You cannot change +* these attributes later. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] act pointer to the active object associated with this +* time event. The time event will post itself to this AO. +* @param[in] sig signal to associate with this time event. +* @param[in] tickRate system clock tick rate to associate with this +* time event in the range [0..15]. +* +* @note You should call the constructor exactly once for every Time Event +* object **before** arming the Time Event. The ideal place for initializing +* the time event(s) associated with a given AO is the AO's constructor. */ -void QTimeEvt_ctorX(QTimeEvt * const me, QActive * const act, - enum_t const sig, uint_fast8_t tickRate); +void QTimeEvt_ctorX(QTimeEvt * const me, + QActive * const act, + enum_t const sig, + uint_fast8_t const tickRate); /*! Arm a time event (one shot or periodic) for direct event posting. * @public @memberof QTimeEvt +* +* @details +* Arms a time event to fire in a specified number of clock ticks and with +* a specified interval. If the interval is zero, the time event is armed for +* one shot ('one-shot' time event). When the timeout expires, the time event +* gets directly posted (using the FIFO policy) into the event queue of the +* host active object. After posting, a one-shot time event gets automatically +* disarmed while a periodic time event (interval != 0) is automatically +* re-armed. +* +* A time event can be disarmed at any time by calling QTimeEvt_disarm(). +* Also, a time event can be re-armed to fire in a different number of clock +* ticks by calling the QTimeEvt_rearm(). +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] nTicks number of clock ticks (at the associated rate) +* to rearm the time event with. +* @param[in] interval interval (in clock ticks) for periodic time event. +* +* @attention +* Arming an already armed time event is __not__ allowed and is considered +* a programming error. The QP/C framework will assert if it detects an +* attempt to arm an already armed time event. +* +* @usage +* The following example shows how to arm a periodic time event as well as +* one-shot time event from a state machine of an active object: +* @include qf_tevt.c */ void QTimeEvt_armX(QTimeEvt * const me, - QTimeEvtCtr const nTicks, QTimeEvtCtr const interval); - -/*! Rearm a time event. -* @public @memberof QTimeEvt -*/ -bool QTimeEvt_rearm(QTimeEvt * const me, QTimeEvtCtr const nTicks); + QTimeEvtCtr const nTicks, + QTimeEvtCtr const interval); /*! Disarm a time event. * @public @memberof QTimeEvt +* +* @details +* Disarm the time event so it can be safely reused. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' if the time event was truly disarmed, that is, it was running. +* The return of 'false' means that the time event was not truly disarmed, +* because it was not running. The 'false' return is only possible for one- +* shot time events that have been automatically disarmed upon expiration. +* In this case the 'false' return means that the time event has already +* been posted or published and should be expected in the active object's +* state machine. +* +* @note +* there is no harm in disarming an already disarmed time event */ bool QTimeEvt_disarm(QTimeEvt * const me); +/*! Rearm a time event. +* @public @memberof QTimeEvt +* +* @details +* Rearms a time event with a new number of clock ticks. This function can +* be used to adjust the current period of a periodic time event or to +* prevent a one-shot time event from expiring (e.g., a watchdog time event). +* Rearming a periodic timer leaves the interval unchanged and is a convenient +* method to adjust the phasing of a periodic time event. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] nTicks number of clock ticks (at the associated rate) +* to rearm the time event with. +* +* @returns +* 'true' if the time event was running as it was re-armed. The 'false' +* return means that the time event was not truly rearmed because it was +* not running. The 'false' return is only possible for one-shot time events +* that have been automatically disarmed upon expiration. In this case the +* 'false' return means that the time event has already been posted or +* published and should be expected in the active object's state machine. +*/ +bool QTimeEvt_rearm(QTimeEvt * const me, + QTimeEvtCtr const nTicks); + /*! Check the "was disarmed" status of a time event. * @public @memberof QTimeEvt +* +* @details +* Useful for checking whether a one-shot time event was disarmed in the +* QTimeEvt_disarm() operation. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' if the time event was truly disarmed in the last QTimeEvt_disarm() +* operation. The 'false' return means that the time event was not truly +* disarmed, because it was not running at that time. The 'false' return is +* only possible for one-shot time events that have been automatically disarmed +* upon expiration. In this case the 'false' return means that the time event +* has already been posted or published and should be expected in the active +* object's event queue. +* +* @note +* This function has a **side effect** of setting the "was disarmed" status, +* which means that the second and subsequent times this function is called +* the function will return 'true'. */ bool QTimeEvt_wasDisarmed(QTimeEvt * const me); /*! Get the current value of the down-counter of a time event. * @public @memberof QTimeEvt +* +* @details +* Useful for checking how many clock ticks (at the tick rate associated +* with the time event) remain until the time event expires. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* For an armed time event, the function returns the current value of the +* down-counter of the given time event. If the time event is not armed, +* the function returns 0. +* +* @note +* The function is thread-safe. */ QTimeEvtCtr QTimeEvt_currCtr(QTimeEvt const * const me); +/*! Processes all armed time events at every clock tick. +* @static @private @memberof QTimeEvt +* +* @details +* This internal helper function processes all armed ::QTimeEvt objects +* associated wit the tick rate @p tickRate . +* +* This function must be called periodically from a time-tick ISR or from +* a task so that QF can manage the timeout events assigned to the given +* system clock tick rate. +* +* @param[in] tickRate clock tick rate serviced in this call [1..15]. +* @param[in] sender pointer to a sender object (only for QS tracing) +* +* @note +* this function should be called only via the macro QTIMEEVT_TICK_X() +* +* @note +* the calls to QTimeEvt_tick_() with different @p tickRate parameter can +* preempt each other. For example, higher clock tick rates might be +* serviced from interrupts while others from tasks (active objects). +* +* @sa ::QTimeEvt. +*/ +void QTimeEvt_tick_( + uint_fast8_t const tickRate, + void const * const sender); -/*==========================================================================*/ -/* QF services. */ -/*! -* @description -* This class groups together QF services. It has only static members and -* should not be instantiated. +/*! Processes one clock tick for QUTest */ +#ifdef Q_UTEST +void QTimeEvt_tick1_( + uint_fast8_t const tickRate, + void const * const sender); +#endif /* def Q_UTEST */ + +/*! Returns 'true' if there are no armed time events at a given tick rate. +* @static @public @memberof QTimeEvt +* +* @details +* Find out if any time events are armed at the given clock tick rate. +* +* @param[in] tickRate system clock tick rate to find out about. +* +* @returns +* 'true' if no time events are armed at the given tick rate and +* 'false' otherwise. +* +* @note +* This function should be called in critical section. +*/ +bool QTimeEvt_noActive(uint_fast8_t const tickRate); + +/*! heads of linked lists of time events, one for every clock tick rate */ +extern QTimeEvt QTimeEvt_timeEvtHead_[QF_MAX_TICK_RATE]; +/*$enddecl${QF::QTimeEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QF::QTicker} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QTicker} ...........................................................*/ +/*! @brief "Ticker" Active Object class +* @class QTicker +* @extends QActive +* +* @details +* QTicker is an efficient active object specialized to process QF system +* clock tick at a specified tick rate [0..#QF_MAX_TICK_RATE]. +* Placing system clock tick processing in an active object allows you +* to remove the non-deterministic QTIMEEVT_TICK_X() processing from the +* interrupt level and move it into the thread-level, where you can prioritize +* it as low as you wish. +* +* @usage +* The following example illustrates use of QTicker active objects: +* @include qf_ticker.c */ typedef struct { - uint8_t dummy; +/* protected: */ + QActive super; +} QTicker; + +/* public: */ + +/*! Constructor of the QTicker Active Object class +* @public @memberof QTicker +*/ +void QTicker_ctor(QTicker * const me, + uint_fast8_t const tickRate); + +/* private: */ + +/*! initialization (override) +* @private @memberof QTicker +*/ +void QTicker_init_( + QHsm * const me, + void const * const par, + uint_fast8_t const qs_id); + +/*! dispatching (override) +* @private @memberof QTicker +*/ +void QTicker_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id); + +/* public: */ + +/*! post (override) +* @private @memberof QTicker +*/ +bool QTicker_post_( + QActive * const me, + QEvt const * const e, + uint_fast16_t const margin, + void const * const sender); + +/*! post-LIFO (override) +* @private @memberof QTicker +*/ +void QTicker_postLIFO_( + QActive * const me, + QEvt const * const e); +/*$enddecl${QF::QTicker} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$declare${QF::QF-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QF-base::Attr} .....................................................*/ +/*! @brief QF active object framework +* @class QF +*/ +typedef struct QF_Attr { + uint8_t dummy; /*< dummy attribute */ } QF; -/*! Subscriber-List structure -* @description -* This data type represents a set of active objects that subscribe to -* a given signal. The set is represented as a priority-set, where each -* bit corresponds to the unique priority of an active object. -* -* @sa ::QSubscrList for the description of the data members +/*${QF::QF-base::intNest_} .................................................*/ +/*! Interrupt nesting up-down counter (used in QF ports ) +* @static @private @memberof QF */ -typedef QPSet QSubscrList; +extern uint_fast8_t QF_intNest_; -/* public functions */ - -/*! QF initialization. +/*${QF::QF-base::init} .....................................................*/ +/*! QF initialization * @static @public @memberof QF +* +* @details +* Initializes QF and must be called exactly once before any other QF +* function. Typcially, QF_init() is called from main() even before +* initializing the Board Support Package (BSP). +* +* @note +* QF_init() clears the internal QF variables, so that the framework +* can start correctly even if the startup code fails to clear the +* uninitialized data (as is required by the C Standard). */ void QF_init(void); -/*! Publish-subscribe initialization. -* @static @public @memberof QF -*/ -void QF_psInit(QSubscrList * const subscrSto, enum_t const maxSignal); - -/*! Event pool initialization for dynamic allocation of events. -* @static @public @memberof QF -*/ -void QF_poolInit(void * const poolSto, uint_fast32_t const poolSize, - uint_fast16_t const evtSize); - -/*! Obtain the block size of any registered event pools. -* @static @public @memberof QF -*/ -uint_fast16_t QF_poolGetMaxBlockSize(void); - -/*! Transfers control to QF to run the application. -* @static @public @memberof QF -*/ -int_t QF_run(void); - +/*${QF::QF-base::stop} .....................................................*/ /*! Function invoked by the application layer to stop the QF * application and return control to the OS/Kernel. * @static @public @memberof QF +* +* @details +* This function stops the QF application. After calling this function, +* QF attempts to gracefully stop the application. This graceful shutdown +* might take some time to complete. The typical use of this function is +* for terminating the QF application to return back to the operating +* system or for handling fatal errors that require shutting down +* (and possibly re-setting) the system. +* +* @attention +* After calling QF_stop() the application must terminate and cannot +* continue. In particular, QF_stop() is **not** intended to be followed +* by a call to QF_init() to "resurrect" the application. +* +* @sa QF_onCleanup() */ void QF_stop(void); +/*${QF::QF-base::run} ......................................................*/ +/*! Transfers control to QF to run the application. +* @static @public @memberof QF +* +* @details +* QF_run() is typically called from your startup code after you initialize +* the QF and start at least one active object with QACTIVE_START(). +* +* @returns +* In QK, the QF_run() does not return. +*/ +int_t QF_run(void); + +/*${QF::QF-base::psInit} ...................................................*/ +/*! initialization of publish-subscribe +* +* @deprecated +* @sa QActive_psInit() +*/ +static inline void QF_psInit( + QSubscrList * const subscrSto, + enum_t const maxSignal) +{ + QActive_psInit(subscrSto, maxSignal); +} + +/*${QF::QF-base::getQueueMin} ..............................................*/ +/*! This function returns the minimum of free entries of +* the given event queue. +* @static @public @memberof QF +* +* @details +* Queries the minimum of free ever present in the given event queue of +* an active object with priority @p prio, since the active object +* was started. +* +* @note +* This function is available only when the native QF event queue +* implementation is used. Requesting the queue minimum of an unused +* priority level raises an assertion in the QF. (A priority level becomes +* used in QF after the call to the QActive_register_() function.) +* +* @param[in] prio Priority of the active object, whose queue is queried +* +* @returns +* the minimum of free ever present in the given event queue of an active +* object with priority @p prio, since the active object was started. +*/ +uint_fast16_t QF_getQueueMin(uint_fast8_t const prio); + +/*${QF::QF-base::onStartup} ................................................*/ /*! Startup QF callback. -* @description +* @static @public @memberof QF +* +* @details * The timeline for calling QF_onStartup() depends on the particular * QF port. In most cases, QF_onStartup() is called from QF_run(), right * before starting any multitasking kernel or the background loop. -* @static @public @memberof QF */ void QF_onStartup(void); +/*${QF::QF-base::onCleanup} ................................................*/ /*! Cleanup QF callback. -* @description +* @static @public @memberof QF +* +* @details * QF_onCleanup() is called in some QF ports before QF returns to the * underlying operating system or RTOS. * @@ -592,224 +1422,293 @@ void QF_onStartup(void); * anything to exit to. * * @sa QF_stop() -* @static @public @memberof QF */ void QF_onCleanup(void); +/*$enddecl${QF::QF-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QF::QF-dyn} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -#ifdef Q_SPY +/*${QF::QF-dyn::poolInit} ..................................................*/ +/*! Event pool initialization for dynamic allocation of events. +* @static @public @memberof QF +* +* @details +* This function initializes one event pool at a time and must be called +* exactly once for each event pool before the pool can be used. +* +* @param[in] poolSto pointer to the storage for the event pool +* @param[in] poolSize size of the storage for the pool in bytes +* @param[in] evtSize the block-size of the pool in bytes, which determines +* the maximum size of events that can be allocated from the pool. +* +* @attention +* You might initialize many event pools by making many consecutive calls +* to the QF_poolInit() function. However, for the simplicity of the internal +* implementation, you must initialize event pools in the **ascending order** +* of the event size. +* +* Many RTOSes provide fixed block-size heaps, a.k.a. memory pools that can +* be adapted for QF event pools. In case such support is missing, QF provides +* a native QF event pool implementation. The macro #QF_EPOOL_TYPE_ determines +* the type of event pool used by a particular QF port. See structure ::QMPool +* for more information. +* +* @note The actual number of events available in the pool might be actually +* less than (@p poolSize / @p evtSize) due to the internal alignment +* of the blocks that the pool might perform. You can always check the +* capacity of the pool by calling QF_getPoolMin(). +* +* @note The dynamic allocation of events is optional, meaning that you +* might choose not to use dynamic events. In that case calling QF_poolInit() +* and using up memory for the memory blocks is unnecessary. +* +* @sa QF initialization example for QF_init() +*/ +void QF_poolInit( + void * const poolSto, + uint_fast32_t const poolSize, + uint_fast16_t const evtSize); - /*! Publish event to the framework. - * @static @private @memberof QF - */ - void QF_publish_(QEvt const * const e, - void const * const sender, uint_fast8_t const qs_id); +/*${QF::QF-dyn::poolGetMaxBlockSize} .......................................*/ +/*! Obtain the block size of any registered event pools. +* @static @public @memberof QF +* +* @details +* Obtain the block size of any registered event pools +*/ +uint_fast16_t QF_poolGetMaxBlockSize(void); - /*! Invoke the event publishing facility. - * @description - * This macro is the recommended way of publishing events, because it - * provides the vital information for software tracing and avoids any - * overhead when the tracing is disabled. - * - * @param[in] e_ pointer to the posted event - * @param[in] sender_ pointer to the sender object. This argument is - * actually only used when QS software tracing is enabled - * (macro #Q_SPY is defined). When QS software tracing is - * disabled, the macro calls QF_publish_() without the - * @p sender_ parameter, so the overhead of passing this - * extra argument is entirely avoided. - * @note - * the pointer to the sender object is not necessarily a pointer - * to an active object. In fact, if QF_PUBLISH() is called from an - * interrupt or other context, you can create a unique object just to - * unambiguously identify the publisher of the event. - * - * @sa QF_publish_(). - */ - #define QF_PUBLISH(e_, sender_) \ - (QF_publish_((e_), (void const *)(sender_), (sender_)->prio)) +/*${QF::QF-dyn::getPoolMin} ................................................*/ +/*! Obtain the minimum of free entries of the given event pool. +* @static @public @memberof QF +* +* @details +* This function obtains the minimum number of free blocks in the given +* event pool since this pool has been initialized by a call to QF_poolInit(). +* +* @param[in] poolId event pool ID in the range 1..QF_maxPool_, where +* QF_maxPool_ is the number of event pools initialized +* with the function QF_poolInit(). +* +* @returns +* the minimum number of unused blocks in the given event pool. +*/ +uint_fast16_t QF_getPoolMin(uint_fast8_t const poolId); -#else +/*${QF::QF-dyn::newX_} .....................................................*/ +/*! Internal QF implementation of creating new dynamic event. +* @static @private @memberof QF +* +* @details +* Allocates an event dynamically from one of the QF event pools. +* +* @param[in] evtSize the size (in bytes) of the event to allocate +* @param[in] margin the number of un-allocated events still available +* in a given event pool after the allocation completes. +* The special value ::QF_NO_MARGIN means that this function +* will assert if allocation fails. +* @param[in] sig the signal to be assigned to the allocated event +* +* @returns +* pointer to the newly allocated event. This pointer can be NULL only if +* margin != #QF_NO_MARGIN and the event cannot be allocated with the +* specified margin still available in the given pool. +* +* @note +* The internal QF function QF_newX_() raises an assertion when the +* @p margin parameter is #QF_NO_MARGIN and allocation of the event turns +* out to be impossible due to event pool depletion, or incorrect (too big) +* size of the requested event. +* +* @note +* The application code should not call this function directly. +* The only allowed use is thorough the macros Q_NEW() or Q_NEW_X(). +*/ +QEvt * QF_newX_( + uint_fast16_t const evtSize, + uint_fast16_t const margin, + enum_t const sig); - void QF_publish_(QEvt const * const e); - #define QF_PUBLISH(e_, dummy_) (QF_publish_(e_)) +/*${QF::QF-dyn::gc} ........................................................*/ +/*! Recycle a dynamic event +* @static @private @memberof QF +* +* @details +* This function implements a simple garbage collector for the dynamic events. +* Only dynamic events are candidates for recycling. (A dynamic event is one +* that is allocated from an event pool, which is determined as non-zero +* e->poolId_ attribute.) Next, the function decrements the reference counter +* of the event (e->refCtr_), and recycles the event only if the counter drops +* to zero (meaning that no more references are outstanding for this event). +* The dynamic event is recycled by returning it to the pool from which +* it was originally allocated. +* +* @param[in] e pointer to the event to recycle +* +* @note +* QF invokes the garbage collector at all appropriate contexts, when +* an event can become garbage (automatic garbage collection), so the +* application code should have no need to call QF_gc() directly. The QF_gc() +* function is exposed only for special cases when your application sends +* dynamic events to the "raw" thread-safe queues (see ::QEQueue). Such +* queues are processed outside of QF and the automatic garbage collection +* is **NOT** performed for these events. In this case you need to call +* QF_gc() explicitly. +*/ +void QF_gc(QEvt const * const e); -#endif +/*${QF::QF-dyn::newRef_} ...................................................*/ +/*! Internal QF implementation of creating new event reference. +* @static @private @memberof QF +* +* @details +* Creates and returns a new reference to the current event e +* +* @param[in] e pointer to the current event +* @param[in] evtRef the event reference +* +* @returns +* the newly created reference to the event `e` +* +* @note +* The application code should not call this function directly. +* The only allowed use is thorough the macro Q_NEW_REF(). +*/ +QEvt const * QF_newRef_( + QEvt const * const e, + void const * const evtRef); -#ifdef Q_SPY +/*${QF::QF-dyn::deleteRef_} ................................................*/ +/*! Internal QF implementation of deleting event reference. +* @static @private @memberof QF +* +* @details +* Deletes an existing reference to the event e +* +* @param[in] evtRef the event reference +* +* @note +* The application code should not call this function directly. +* The only allowed use is thorough the macro Q_DELETE_REF(). +*/ +void QF_deleteRef_(void const * const evtRef); +/*$enddecl${QF::QF-dyn} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ - /*! Processes all armed time events at every clock tick. - * @static @private @memberof QF - */ - void QF_tickX_(uint_fast8_t const tickRate, void const * const sender); +/*==========================================================================*/ +/*$declare${QF-macros} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ - /*! Invoke the system clock tick processing QF_tickX_(). - * @description - * This macro processes all armed ::QTimeEvt objects associated with - * the tick rate @p tickRate_ . - * - * @param[in] tickRate_ clock tick rate to be serviced through this call - * @param[in] sender_ pointer to the sender object. This parameter - * is actually used only when QS software tracing is enabled - * (macro #Q_SPY is defined) - * @note - * When QS software tracing is disabled, the macro calls QF_tickX_() - * without the @p sender_ parameter, so the overhead of passing this - * extra parameter is entirely avoided. - * - * @note - * The pointer to the sender object is not necessarily a pointer - * to an active object. In fact, when #QF_TICK_X() is called from - * an interrupt, you would create a unique object just to unambiguously - * identify the ISR as the sender of the time events. - * - * @usage - * The following example shows how to invoke QF_TICK_X() for different - * system tick rates: - * @include qf_tickx.c - * - * @sa ::QTimeEvt - * @sa QTimeEvt_ctorX() - * @sa QF_tickX_() - * @sa QF_TICK() - * @sa QXThread_ctor() - * @sa QXThread_delay() - */ - #define QF_TICK_X(tickRate_, sender_) (QF_tickX_((tickRate_), (sender_))) - -#else - - void QF_tickX_(uint_fast8_t const tickRate); - #define QF_TICK_X(tickRate_, dummy) (QF_tickX_(tickRate_)) - -#endif - -/*! special value of margin that causes asserting failure in case +/*${QF-macros::QF_NO_MARGIN} ...............................................*/ +/*! Special value of margin that causes asserting failure in case * event allocation or event posting fails */ #define QF_NO_MARGIN ((uint_fast16_t)0xFFFFU) -/*! Invoke the system clock tick processing for tick rate 0 -* @sa QF_TICK_X() +/*${QF-macros::QF_CRIT_EXIT_NOP} ...........................................*/ +#ifndef QF_CRIT_EXIT_NOP +/*! No-operation for exiting a critical section +* +* @details +* In some QF ports the critical section exit takes effect only on the +* next machine instruction. If this next instruction is another entry +* to a critical section, the critical section won't be really exited, +* but rather the two adjecent critical sections would be merged. +* The QF_CRIT_EXIT_NOP() macro contains minimal code required to +* prevent such merging of critical sections in such merging of +* critical sections in QF ports, in which it can occur. */ -#define QF_TICK(sender_) QF_TICK_X(0U, (sender_)) +#define QF_CRIT_EXIT_NOP() ((void)0) +#endif /* ndef QF_CRIT_EXIT_NOP */ -/*! Returns 'true' if there are no armed time events at a given tick rate. -* @static @public @memberof QF +/*${QF-macros::Q_NEW} ......................................................*/ +#ifndef Q_EVT_CTOR +/*! Allocate a dynamic event (case when ::QEvt is a POD) +* +* @details +* The macro calls the internal QF function QF::newX_() with +* margin == ::QF_NO_MARGIN, which causes an assertion when the event +* cannot be successfully allocated. +* +* @param[in] evtT_ event type (class name) of the event to allocate +* @param[in] sig_ signal to assign to the newly allocated event +* +* @returns a valid event pointer cast to the type `evtT_`. +* +* @note +* If #Q_EVT_CTOR is defined, the Q_NEW() macro becomes variadic and +* takes all the arguments needed by the constructor of the event +* class being allocated. The constructor is then called by means +* of the placement-new operator. +* +* @usage +* The following example illustrates dynamic allocation of an event: +* @include qf_post.c */ -bool QF_noTimeEvtsActiveX(uint_fast8_t const tickRate); - -/*! Register an active object to be managed by the framework. -* @static @private @memberof QF -*/ -void QF_add_(QActive * const a); - -/*! Remove the active object from the framework. -* @static @private @memberof QF -*/ -void QF_remove_(QActive * const a); - -/*! Obtain the minimum of free entries of the given event pool. -* @static @public @memberof QF -*/ -uint_fast16_t QF_getPoolMin(uint_fast8_t const poolId); - -/*! This function returns the minimum of free entries of -* the given event queue. -* @static @public @memberof QF -*/ -uint_fast16_t QF_getQueueMin(uint_fast8_t const prio); - -/*! Internal QF implementation of creating new dynamic event. -* @static @private @memberof QF -*/ -QEvt *QF_newX_(uint_fast16_t const evtSize, - uint_fast16_t const margin, enum_t const sig); - -/*! Internal QF implementation of creating new event reference. -* @static @private @memberof QF -*/ -QEvt const *QF_newRef_(QEvt const * const e, void const * const evtRef); - -/*! Internal QF implementation of deleting event reference. -* @static @private @memberof QF -*/ -void QF_deleteRef_(void const * const evtRef); - -#ifdef Q_EVT_CTOR /* Shall the ctor for the ::QEvt class be provided? */ - - #define Q_NEW(evtT_, sig_, ...) \ - (evtT_##_ctor((evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ - QF_NO_MARGIN, 0), (enum_t)(sig_), ##__VA_ARGS__)) - - #define Q_NEW_X(e_, evtT_, margin_, sig_, ...) do { \ - (e_) = (evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ - (margin_), 0); \ - if ((e_) != (evtT_ *)0) { \ - evtT_##_ctor((e_), (enum_t)(sig_), ##__VA_ARGS__); \ - } \ - } while (false) - -#else - - /*! Allocate a dynamic event. - * @description - * The macro calls the internal QF function QF_newX_() with - * margin == #QF_NO_MARGIN, which causes an assertion when the event - * cannot be successfully allocated. - * - * @param[in] evtT_ event type (class name) of the event to allocate - * @param[in] sig_ signal to assign to the newly allocated event - * - * @returns a valid event pointer cast to the type @p evtT_. - * - * @note - * If Q_EVT_CTOR is defined, the Q_NEW() macro becomes variadic and - * takes all the arguments needed by the constructor of the event - * class being allocated. The constructor is then called by means - * of the placement-new operator. - * - * @usage - * The following example illustrates dynamic allocation of an event: - * @include qf_post.c - */ - #define Q_NEW(evtT_, sig_) \ - ((evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ +#define Q_NEW(evtT_, sig_) ((evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ QF_NO_MARGIN, (enum_t)(sig_))) +#endif /* ndef Q_EVT_CTOR */ - /*! Allocate a dynamic event (non-asserting version). - * @description - * This macro allocates a new event and sets the pointer @p e_, while - * leaving at least @p margin_ of events still available in the pool - * - * @param[in,out] e_ pointer to the newly allocated event - * @param[in] evtT_ event type (class name) of the event to allocate - * @param[in] margin_ number of events that must remain available - * in the given pool after this allocation. The special - * value #QF_NO_MARGIN causes asserting failure in case - * event allocation or event posting fails. - * @param[in] sig_ signal to assign to the newly allocated event - * - * @returns an event pointer cast to the type @p evtT_ or NULL if the - * event cannot be allocated with the specified @p margin. - * - * @note - * If Q_EVT_CTOR is defined, the Q_NEW_X() macro becomes variadic and - * takes all the arguments needed by the constructor of the event - * class being allocated. The constructor is then called and all the - * extra arguments are passed to it. - * - * @usage - * The following example illustrates dynamic allocation of an event: - * @include qf_postx.c - */ - #define Q_NEW_X(e_, evtT_, margin_, sig_) ((e_) = \ - (evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ - (margin_), (enum_t)(sig_))) +/*${QF-macros::Q_NEW} ......................................................*/ +#ifdef Q_EVT_CTOR +/*! Asserting allocate a dynamic event +* (case when ::QEvt is not a POD) +*/ +#define Q_NEW(evtT_, sig_, ...) \ + (evtT_##_ctor((evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ + QF_NO_MARGIN, 0), (enum_t)(sig_), ##__VA_ARGS__)) -#endif /* Q_EVT_CTOR */ +#endif /* def Q_EVT_CTOR */ +/*${QF-macros::Q_NEW_X} ....................................................*/ +#ifndef Q_EVT_CTOR +/*! Non-asserting allocate a dynamic event (case when ::QEvt is a POD). +* +* @details +* This macro allocates a new event and sets the pointer @p e_, while +* leaving at least @p margin_ of events still available in the pool +* +* @param[out] e_ pointer to the newly allocated event +* @param[in] evtT_ event type (class name) of the event to allocate +* @param[in] margin_ number of events that must remain available +* in the given pool after this allocation. The +* special value ::QF_NO_MARGIN causes asserting +* failure in case event allocation fails. +* @param[in] sig_ signal to assign to the newly allocated event +* +* @returns an event pointer cast to the type @p evtT_ or NULL if the +* event cannot be allocated with the specified @p margin. +* +* @note +* If #Q_EVT_CTOR is defined, the Q_NEW_X() macro becomes variadic and +* takes all the arguments needed by the constructor of the event +* class being allocated. The constructor is then called by means +* of the placement-new operator. +* +* @usage +* The following example illustrates dynamic allocation of an event: +* @include qf_postx.c +*/ +#define Q_NEW_X(e_, evtT_, margin_, sig_) ((e_) = \ + (evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ + (margin_), (enum_t)(sig_))) +#endif /* ndef Q_EVT_CTOR */ + +/*${QF-macros::Q_NEW_X} ....................................................*/ +#ifdef Q_EVT_CTOR +/*! Non-asserting allocate a dynamic event +* (case when ::QEvt is not a POD) +*/ +#define Q_NEW_X(e_, evtT_, margin_, sig_, ...) do { \ + (e_) = (evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ + (margin_), 0);\ + if ((e_) != (evtT_ *)0) { \ + evtT_##_ctor((e_), (enum_t)(sig_), ##__VA_ARGS__); \ + } \ + } while (false) +#endif /* def Q_EVT_CTOR */ + +/*${QF-macros::Q_NEW_REF} ..................................................*/ /*! Create a new reference of the current event `e` -* @description +* +* @details * The current event processed by an active object is available only for * the duration of the run-to-completion (RTC) step. After that step, the * current event is no longer available and the framework might recycle @@ -827,11 +1726,13 @@ void QF_deleteRef_(void const * const evtRef); * * @sa Q_DELETE_REF() */ -#define Q_NEW_REF(evtRef_, evtT_) \ +#define Q_NEW_REF(evtRef_, evtT_) \ ((evtRef_) = (evtT_ const *)QF_newRef_(e, (evtRef_))) +/*${QF-macros::Q_DELETE_REF} ...............................................*/ /*! Delete the event reference -* @description +* +* @details * Every event reference created with the macro Q_NEW_REF() needs to be * eventually deleted by means of the macro Q_DELETE_REF() to avoid leaking * the event. @@ -845,61 +1746,233 @@ void QF_deleteRef_(void const * const evtRef); * @sa Q_NEW_REF() */ #define Q_DELETE_REF(evtRef_) do { \ - QF_deleteRef_((evtRef_)); \ - (evtRef_) = (void *)0; \ + QF_deleteRef_((evtRef_)); \ + (evtRef_) = (void *)0; \ } while (false) -/*! Recycle a dynamic event -* @static @private @memberof QF +/*${QF-macros::QACTIVE_START} ..............................................*/ +/*! Virtual call to start an active object. +* +* @details +* Starts execution of the AO and registers the AO with the framework. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] prio_ priority at which to start the active object +* @param[in] qSto_ pointer to the storage for the ring buffer of the +* event queue (used only with the built-in ::QEQueue) +* @param[in] qLen_ length of the event queue (in events) +* @param[in] stkSto_ pointer to the stack storage (used only when +* per-AO stack is needed) +* @param[in] stkSize_ stack size (in bytes) +* @param[in] par_ pointer to the additional port-specific parameter(s) +* (might be NULL). +* @usage +* @include qf_start.c */ -void QF_gc(QEvt const * const e); +#define QACTIVE_START(me_, prio_, qSto_, qLen_, stkSto_, stkSize_, par_) do { \ + Q_ASSERT((Q_HSM_UPCAST(me_))->vptr); \ + (*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->start)( \ + (QActive *)(me_), (prio_), \ + (qSto_), (qLen_), (stkSto_), (stkSize_), (par_)); \ +} while (false) -/*! Clear a specified region of memory to zero. -* @static @public @memberof QF +/*${QF-macros::QACTIVE_POST} ...............................................*/ +#ifdef Q_SPY +/*! Invoke the direct event posting facility QActive_post_() +* +* @details +* This macro asserts if the queue overflows and cannot accept the event. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ pointer to the event to post +* @param[in] sender_ pointer to the sender object. +* +* @note +* The @p sendedr_ parameter is actually only used when QS tracing +* is enabled (macro #Q_SPY is defined). When QS software tracing is +* disenabled, the QACTIVE_POST() macro does not pass the `sender_` +* parameter, so the overhead of passing this extra parameter is entirely +* avoided. +* +* @note the pointer to the sender object is not necessarily a pointer +* to an active object. In fact, if QACTIVE_POST() is called from an +* interrupt or other context, you can create a unique object just to +* unambiguously identify the sender of the event. +* +* @sa QActive_post_() */ -void QF_bzero(void * const start, uint_fast16_t len); +#define QACTIVE_POST(me_, e_, sender_) \ + ((void)(*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)(\ + (me_), (e_), QF_NO_MARGIN, (sender_))) +#endif /* def Q_SPY */ -#ifndef QF_CRIT_EXIT_NOP - /*! No-operation for exiting a critical section - * @description - * In some QF ports the critical section exit takes effect only on the - * next machine instruction. If this next instruction is another entry - * to a critical section, the critical section won't be really exited, - * but rather the two adjacent critical sections would be merged. - * The #QF_CRIT_EXIT_NOP() macro contains minimal code required to - * prevent such merging of critical sections in QF ports, in which it - * can occur. - */ - #define QF_CRIT_EXIT_NOP() ((void)0) -#endif +/*${QF-macros::QACTIVE_POST} ...............................................*/ +#ifndef Q_SPY +#define QACTIVE_POST(me_, e_, dummy) \ + ((void)(*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)(\ + (me_), (e_), QF_NO_MARGIN, (void *)0)) +#endif /* ndef Q_SPY */ -/*! array of registered active objects -* @note Not to be used by Clients directly, only in ports of QF -*/ -extern QActive *QF_active_[QF_MAX_ACTIVE + 1U]; - -/*==========================================================================*/ -/*! "Ticker" Active Object class -* @extends QActive -* @description -* QTicker is an efficient active object specialized to process -* QF system clock tick at a specified tick rate [0..#QF_MAX_TICK_RATE]. -* Placing system clock tick processing in an active object allows you -* to remove the non-deterministic QF_TICK_X() processing from the interrupt -* level and move it into the thread-level, where you can prioritize it -* as low as you wish. +/*${QF-macros::QACTIVE_POST_X} .............................................*/ +#ifdef Q_SPY +/*! Invoke the direct event posting facility QActive::post_() +* without delivery guarantee +* +* @details +* This macro does not assert if the queue overflows and cannot accept +* the event with the specified margin of free slots remaining. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ pointer to the event to post +* @param[in] margin_ the minimum free slots in the queue, which +* must still be available after posting the event. +* The special value ::QF_NO_MARGIN causes +* asserting failure in case event posting fails. +* @param[in] sender_ pointer to the sender object. +* +* @returns +* 'true' if the posting succeeded, and 'false' if the posting +* failed due to insufficient margin of free entries available in +* the queue. +* +* @note +* The @p sender_ parameter is actually only used when QS tracing +* is enabled (macro #Q_SPY is defined). When QS software tracing is +* disabled, the POST_X() macro does not pass the @p sender_ parameter, +* so the overhead of passing this extra parameter is entirely avoided. +* +* @note +* The pointer to the sender object is not necessarily a pointer +* to an active object. In fact, if POST_X() is called from an +* interrupt or other context, you can create a unique object just to +* unambiguously identify the sender of the event. * * @usage -* The following example illustrates use of QTicker active objects: -* @include qf_ticker.c +* @include qf_postx.c */ -typedef struct { - QActive super; /*!< @protected inherits ::QActive */ -} QTicker; +#define QACTIVE_POST_X(me_, e_, margin_, sender_) \ + ((*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)((me_),\ + (e_), (margin_), (sender_))) +#endif /* def Q_SPY */ -/*! Constructor of the QTicker Active Object class -* @public @memberof QTicker +/*${QF-macros::QACTIVE_POST_X} .............................................*/ +#ifndef Q_SPY +#define QACTIVE_POST_X(me_, e_, margin_, dummy) \ + ((*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)((me_),\ + (e_), (margin_), (void *)0)) +#endif /* ndef Q_SPY */ + +/*${QF-macros::QACTIVE_POST_LIFO} ..........................................*/ +/*! Virtual call to post an event to an active object using the +* Last-In-First-Out (LIFO) policy. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ pointer to the event to post */ -void QTicker_ctor(QTicker * const me, uint_fast8_t tickRate); +#define QACTIVE_POST_LIFO(me_, e_) \ + ((*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->postLIFO)( \ + (me_), (e_))) + +/*${QF-macros::QACTIVE_PUBLISH} ............................................*/ +#ifdef Q_SPY +/*! Invoke the event publishing facility QActive_publish_(). +* +* @details +* This macro is the recommended way of publishing events, because it +* provides the vital information for software tracing and avoids any +* overhead when the tracing is disabled. +* +* @param[in] e_ pointer to the posted event +* @param[in] sender_ pointer to the sender object. This parameter is +* actually only used when QS software tracing is enabled +* (macro #Q_SPY is defined). When QS software tracing is +* disabled, the macro calls QF_publish_() without the +* @p sender_ parameter, so the overhead of passing this +* extra parameter is entirely avoided. +* +* @note +* The pointer to the sender object is not necessarily a pointer +* to an active object. In fact, if QF_PUBLISH() is called from an +* interrupt or other context, you can create a unique object just to +* unambiguously identify the publisher of the event. +* +* @sa QActive_publish_() +*/ +#define QACTIVE_PUBLISH(e_, sender_) \ + (QActive_publish_((e_), (void const *)(sender_), (sender_)->prio)) +#endif /* def Q_SPY */ + +/*${QF-macros::QACTIVE_PUBLISH} ............................................*/ +#ifndef Q_SPY +#define QACTIVE_PUBLISH(e_, dummy) (QActive_publish_((e_), (void *)0, 0U)) +#endif /* ndef Q_SPY */ + +/*${QF-macros::QTIMEEVT_TICK_X} ............................................*/ +#ifdef Q_SPY +/*! Invoke the system clock tick processing QTimeEvt_tick_() +* +* @details +* This macro is the recommended way of invoking clock tick processing, +* because it provides the vital information for software tracing and +* avoids any overhead when the tracing is disabled. +* +* @param[in] tickRate_ clock tick rate to be serviced through this call +* @param[in] sender_ pointer to the sender object. This parameter +* is actually only used when QS software tracing is enabled +* (macro #Q_SPY is defined) +* @note +* When QS software tracing is disabled, the macro calls QTimeEvt_tick_() +* without the `sender` parameter, so the overhead of passing this +* extra parameter is entirely avoided. +* +* @note +* The pointer to the sender object is not necessarily a pointer +* to an active object. In fact, when QTIMEEVT_TICK_X() is called from +* an interrupt, you would create a unique object just to unambiguously +* identify the ISR as the sender of the time events. +* +* @sa QTimeEvt_tick_() +*/ +#define QTIMEEVT_TICK_X(tickRate_, sender_) \ + (QTimeEvt_tick_((tickRate_), (sender_))) +#endif /* def Q_SPY */ + +/*${QF-macros::QTIMEEVT_TICK_X} ............................................*/ +#ifndef Q_SPY +#define QTIMEEVT_TICK_X(tickRate_, dummy) \ + (QTimeEvt_tick_((tickRate_), (void *)0)) +#endif /* ndef Q_SPY */ + +/*${QF-macros::QTIMEEVT_TICK} ..............................................*/ +/*! Invoke the system clock tick processing +* for tick rate 0 +*/ +#define QTIMEEVT_TICK(sender_) QTIMEEVT_TICK_X(0U, (sender_)) + +/*${QF-macros::QF_TICK_X} ..................................................*/ +/*! Invoke the system clock tick processing +* +* @deprecated +* superseded by QTIMEEVT_TICK_X() +*/ +#define QF_TICK_X(tickRate_, sender_) QTIMEEVT_TICK_X((tickRate_), (sender_)) + +/*${QF-macros::QF_TICK} ....................................................*/ +/*! Invoke the system clock tick processing +* for tick rate 0 +* +* @deprecated +* superseded by QTIMEEVT_TICK() +*/ +#define QF_TICK(sender_) QTIMEEVT_TICK(sender_) + +/*${QF-macros::QF_PUBLISH} .................................................*/ +/*! Invoke the event publishing facility QActive_publish_(). +* +* @deprecated +* superseded by QACTIVE_PUBLISH() +*/ +#define QF_PUBLISH(e_, sender_) QACTIVE_PUBLISH((e_), (sender_)) +/*$enddecl${QF-macros} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* QF_H */ diff --git a/include/qf_pkg.h b/include/qf_pkg.h new file mode 100644 index 00000000..59a8b2d1 --- /dev/null +++ b/include/qf_pkg.h @@ -0,0 +1,196 @@ +/*$file${include::qf_pkg.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qf_pkg.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +*/ +/*$endhead${include::qf_pkg.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*! +* @date Last updated on: 2022-07-26 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief Internal (package scope) QF/C interface. +*/ +#ifndef QF_PKG_H +#define QF_PKG_H + +/*==========================================================================*/ +/*$declare${QF::QF-pkg} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QF-pkg::readySet_} .................................................*/ +/*! "Ready-set" of all threads used in the built-in kernels +* @static @private @memberof QF +*/ +extern QPSet QF_readySet_; + +/*${QF::QF-pkg::ePool_[QF_MAX_EPOOL]} ......................................*/ +/*! array of event pools managed by QF */ +extern QF_EPOOL_TYPE_ QF_ePool_[QF_MAX_EPOOL]; + +/*${QF::QF-pkg::maxPool_} ..................................................*/ +/*! number of initialized event pools */ +extern uint_fast8_t QF_maxPool_; + +/*${QF::QF-pkg::bzero} .....................................................*/ +/*! Clear a specified region of memory to zero. +* @static @public @memberof QF +* +* @details +* Clears a memory buffer by writing zeros byte-by-byte. +* +* @param[in] start pointer to the beginning of a memory buffer. +* @param[in] len length of the memory buffer to clear (in bytes) +* +* @note The main application of this function is clearing the internal QF +* variables upon startup. This is done to avoid problems with non-standard +* startup code provided with some compilers and toolsets (e.g., TI DSPs or +* Microchip MPLAB), which does not zero the uninitialized variables, as +* required by the ANSI C standard. +*/ +void QF_bzero( + void * const start, + uint_fast16_t const len); +/*$enddecl${QF::QF-pkg} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*==========================================================================*/ +/* QF-specific critical section */ +#ifndef QF_CRIT_STAT_TYPE + /*! This is an internal macro for defining the critical section + * status type. */ + /** + * @details + * The purpose of this macro is to enable writing the same code for the + * case when critical section status type is defined and when it is not. + * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro + * provides the definition of the critical section status variable. + * Otherwise this macro is empty. + * @sa #QF_CRIT_STAT_TYPE + */ + #define QF_CRIT_STAT_ + + /*! This is an internal macro for entering a critical section. */ + /** + * @details + * The purpose of this macro is to enable writing the same code for the + * case when critical section status type is defined and when it is not. + * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro + * invokes QF_CRIT_ENTRY() passing the key variable as the parameter. + * Otherwise QF_CRIT_ENTRY() is invoked with a dummy parameter. + * @sa QF_CRIT_ENTRY() + */ + #define QF_CRIT_E_() QF_CRIT_ENTRY(dummy) + + /*! This is an internal macro for exiting a critical section. */ + /** + * @details + * The purpose of this macro is to enable writing the same code for the + * case when critical section status type is defined and when it is not. + * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro + * invokes #QF_CRIT_EXIT passing the key variable as the parameter. + * Otherwise #QF_CRIT_EXIT is invoked with a dummy parameter. + * @sa #QF_CRIT_EXIT + */ + #define QF_CRIT_X_() QF_CRIT_EXIT(dummy) + +#elif (!defined QF_CRIT_STAT_) + #define QF_CRIT_STAT_ QF_CRIT_STAT_TYPE critStat_; + #define QF_CRIT_E_() QF_CRIT_ENTRY(critStat_) + #define QF_CRIT_X_() QF_CRIT_EXIT(critStat_) +#endif + +/*==========================================================================*/ +/* Assertions inside the critical section */ +#ifdef Q_NASSERT /* Q_NASSERT defined--assertion checking disabled */ + + #define Q_ASSERT_CRIT_(id_, test_) ((void)0) + #define Q_REQUIRE_CRIT_(id_, test_) ((void)0) + #define Q_ERROR_CRIT_(id_) ((void)0) + +#else /* Q_NASSERT not defined--assertion checking enabled */ + + #define Q_ASSERT_CRIT_(id_, test_) do { \ + if ((test_)) {} else { \ + QF_CRIT_X_(); \ + Q_onAssert(&Q_this_module_[0], (int_t)(id_)); \ + } \ + } while (false) + + #define Q_REQUIRE_CRIT_(id_, test_) Q_ASSERT_CRIT_((id_), (test_)) + + #define Q_ERROR_CRIT_(id_) do { \ + QF_CRIT_X_(); \ + Q_onAssert(&Q_this_module_[0], (int_t)(id_)); \ + } while (false) + +#endif /* Q_NASSERT */ + +/*==========================================================================*/ + +/* The following bitmasks are for the fields of the @c refCtr_ attribute +* of the QTimeEvt struct (inherited from QEvt). This attribute is NOT used +* for reference counting in time events, because the @c poolId_ attribute +* is zero ("immutable events"). +*/ +#define QTE_IS_LINKED (1U << 7U) +#define QTE_WAS_DISARMED (1U << 6U) +#define QTE_TICK_RATE 0x0FU + +/*! @brief structure representing a free block in the Native QF Memory Pool */ +typedef struct QFreeBlock { + struct QFreeBlock * volatile next; +} QFreeBlock; + +/* internal helper macros ***************************************************/ + +/*! helper macro to cast const away from an event pointer @p e_ */ +#define QF_EVT_CONST_CAST_(e_) ((QEvt *)(e_)) + +/*! increment the refCtr of an event @p e_ casting const away */ +#define QF_EVT_REF_CTR_INC_(e_) (++QF_EVT_CONST_CAST_(e_)->refCtr_) + +/*! decrement the refCtr of an event @p e_ casting const away */ +#define QF_EVT_REF_CTR_DEC_(e_) (--QF_EVT_CONST_CAST_(e_)->refCtr_) + +/** +* @details +* This macro is specifically and exclusively used for checking the range +* of a block pointer returned to the pool. Such a check must rely on the +* pointer arithmetic not compliant with the MISRA-C 2012 Rule 18.3(R). +* Defining a specific macro for this purpose allows to selectively disable +* the warnings for this particular case. +*/ +#define QF_PTR_RANGE_(x_, min_, max_) (((min_) <= (x_)) && ((x_) <= (max_))) + +#endif /* QF_PKG_H */ diff --git a/include/qk.h b/include/qk.h index a3d2c9fd..d19acbe9 100644 --- a/include/qk.h +++ b/include/qk.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qk.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qk.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,25 +32,21 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qk.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QK/C (preemptive non-blocking kernel) platform-independent * public interface. -* @ingroup qk */ #ifndef QK_H #define QK_H -#include "qequeue.h" /* QK kernel uses the native QP event queue */ -#include "qmpool.h" /* QK kernel uses the native QP memory pool */ -#include "qpset.h" /* QK kernel uses the native QP priority set */ - /*==========================================================================*/ /* QF configuration for QK -- data members of the QActive class... */ @@ -49,50 +58,113 @@ */ #define QF_THREAD_TYPE void* +#include "qequeue.h" /* QK kernel uses the native QP event queue */ +#include "qmpool.h" /* QK kernel uses the native QP memory pool */ +#include "qf.h" /* QF framework integrates directly with QK */ + /*==========================================================================*/ -/*! private attributes of the QK kernel */ -typedef struct { +/*$declare${QK::QK-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QK::QK-base::Attr} .....................................................*/ +/*! @brief QK preemptive non-blocking kernel +* @class QK +*/ +typedef struct QK_Attr { uint8_t volatile actPrio; /*!< prio of the active AO */ uint8_t volatile nextPrio; /*!< prio of the next AO to execute */ uint8_t volatile lockPrio; /*!< lock prio (0 == no-lock) */ uint8_t volatile lockHolder; /*!< prio of the AO holding the lock */ - uint8_t volatile intNest; /*!< ISR nesting level */ - QPSet readySet; /*!< QK ready-set of AOs */ -} QK_PrivAttr; +} QK; -/*! global private attributes of the QK kernel */ -extern QK_PrivAttr QK_attr_; +/*${QK::QK-base::attr_} ....................................................*/ +/*! attributes of the QK kernel */ +extern QK QK_attr_; -/*==========================================================================*/ -#ifdef QK_ON_CONTEXT_SW +/*${QK::QK-base::activate_} ................................................*/ +/*! QK activator activates the next active object. The activated AO preempts +* the currently executing AOs. +* @static @private @memberof QK +* +* @details +* QK_activate_() activates ready-to run AOs that are above the initial +* active priority (QK_attr_.actPrio). +* +* @note +* The activator might enable interrupts internally, but always returns with +* interrupts **disabled**. +*/ +void QK_activate_(void); - struct QActive; /* forward declaration */ +/*${QK::QK-base::sched_} ...................................................*/ +/*! QK scheduler finds the highest-priority thread ready to run +* @static @private @memberof QK +* +* @details +* The QK scheduler finds out the priority of the highest-priority AO +* that (1) has events to process and (2) has priority that is above the +* current priority. +* +* @returns +* the 1-based priority of the the active object, or zero if no eligible +* active object is ready to run. +* +* @attention +* QK_sched_() must be always called with interrupts **disabled** and +* returns with interrupts **disabled**. +*/ +uint_fast8_t QK_sched_(void); - /*! QK context switch callback (customized in BSPs for QK) - * @description - * This callback function provides a mechanism to perform additional - * custom operations when QK switches context from one thread to - * another. - * - * @param[in] prev pointer to the previous thread (active object) - * (prev==0 means that @p prev was the QK idle loop) - * @param[in] next pointer to the next thread (active object) - * (next==0) means that @p next is the QK idle loop) - * @attention - * QK_onContextSw() is invoked with interrupts **disabled** and must also - * return with interrupts **disabled**. - * - * @note - * This callback is enabled by defining the macro #QK_ON_CONTEXT_SW. - * - * @include qk_oncontextsw.c - */ - void QK_onContextSw(struct QActive *prev, struct QActive *next); +/*${QK::QK-base::schedLock} ................................................*/ +/*! QK selective scheduler lock +* +* @details +* This function locks the QK scheduler to the specified ceiling. +* +* @param[in] ceiling priority ceiling to which the QK scheduler +* needs to be locked +* +* @returns +* The previous QK Scheduler lock status, which is to be used to unlock +* the scheduler by restoring its previous lock status in +* QK_schedUnlock(). +* +* @note +* QK_schedLock() must be always followed by the corresponding +* QK_schedUnlock(). +* +* @sa QK_schedUnlock() +* +* @usage +* The following example shows how to lock and unlock the QK scheduler: +* @include qk_lock.c +*/ +QSchedStatus QK_schedLock(uint_fast8_t const ceiling); -#endif /* QK_ON_CONTEXT_SW */ +/*${QK::QK-base::schedUnlock} ..............................................*/ +/*! QK selective scheduler unlock +* +* @details +* This function unlocks the QK scheduler to the previous status. +* +* @param[in] stat previous QK Scheduler lock status returned from +* QK_schedLock() +* @note +* QK_schedUnlock() must always follow the corresponding +* QK_schedLock(). +* +* @sa QK_schedLock() +* +* @usage +* The following example shows how to lock and unlock the QK scheduler: +* @include qk_lock.c +*/ +void QK_schedUnlock(QSchedStatus const stat); +/*${QK::QK-base::onIdle} ...................................................*/ /*! QK idle callback (customized in BSPs for QK) -* @description +* @static @public @memberof QK +* +* @details * QK_onIdle() is called continuously by the QK idle loop. This callback * gives the application an opportunity to enter a power-saving CPU mode, * or perform some other idle processing. @@ -100,90 +172,114 @@ extern QK_PrivAttr QK_attr_; * @note * QK_onIdle() is invoked with interrupts enabled and must also return with * interrupts enabled. -* -* @sa QV_onIdle() */ void QK_onIdle(void); -/*==========================================================================*/ -/*! QK scheduler finds the highest-priority thread ready to run */ -uint_fast8_t QK_sched_(void); - -/*! QK activator activates the next active object. The activated AO preempts -* the currently executing AOs. +/*${QK::QK-base::onContextSw} ..............................................*/ +#ifdef QK_ON_CONTEXT_SW +/*! QK context switch callback (customized in BSPs for QK) +* @static @public @memberof QK +* +* @details +* This callback function provides a mechanism to perform additional +* custom operations when QK switches context from one thread to +* another. +* +* @param[in] prev pointer to the previous thread (active object) +* (prev==0 means that @p prev was the QK idle loop) +* @param[in] next pointer to the next thread (active object) +* (next==0) means that @p next is the QK idle loop) +* @attention +* QK_onContextSw() is invoked with interrupts **disabled** and must also +* return with interrupts **disabled**. +* +* @note +* This callback is enabled by defining the macro #QK_ON_CONTEXT_SW. +* +* @include qk_oncontextsw.c */ -void QK_activate_(void); +void QK_onContextSw( + QActive * prev, + QActive * next); +#endif /* def QK_ON_CONTEXT_SW */ +/*$enddecl${QK::QK-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*==========================================================================*/ -/*! QK Scheduler locking */ - -/*! The scheduler lock status */ -typedef uint_fast16_t QSchedStatus; - -/*! QK Scheduler lock */ -QSchedStatus QK_schedLock(uint_fast8_t ceiling); - -/*! QK Scheduler unlock */ -void QK_schedUnlock(QSchedStatus stat); - -/*==========================================================================*/ -/* interface used only inside QP implementation, but not in applications */ +/* interface used only inside QF, but not in applications */ #ifdef QP_IMPL +/* QK-specific scheduler locking and event queue... */ +/*$declare${QK-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ - #ifndef QK_ISR_CONTEXT_ - /*! Internal macro that reports the execution context (ISR vs. thread) - */ - /*! @returns true if the code executes in the ISR context and false - * otherwise - */ - #define QK_ISR_CONTEXT_() (QK_attr_.intNest != 0U) - #endif /* QK_ISR_CONTEXT_ */ +/*${QK-impl::QK_ISR_CONTEXT_} ..............................................*/ +#ifndef QK_ISR_CONTEXT_ +/*! Internal macro that reports the execution context (ISR vs. thread) +* +* @returns true if the code executes in the ISR context and false +* otherwise +*/ +#define QK_ISR_CONTEXT_() (QF_intNest_ != 0U) +#endif /* ndef QK_ISR_CONTEXT_ */ - /* QK-specific scheduler locking */ - /*! Internal macro to represent the scheduler lock status - * that needs to be preserved to allow nesting of locks. - */ - #define QF_SCHED_STAT_ QSchedStatus lockStat_; +/*${QK-impl::QF_SCHED_STAT_} ...............................................*/ +/*! QK scheduler lock status */ +#define QF_SCHED_STAT_ QSchedStatus lockStat_; - /*! Internal macro for selective scheduler locking. */ - #define QF_SCHED_LOCK_(prio_) do { \ - if (QK_ISR_CONTEXT_()) { \ - lockStat_ = 0xFFU; \ - } else { \ - lockStat_ = QK_schedLock((prio_)); \ - } \ - } while (false) +/*${QK-impl::QF_SCHED_LOCK_} ...............................................*/ +/*! QK selective scheduler locking */ +#define QF_SCHED_LOCK_(prio_) do { \ + if (QK_ISR_CONTEXT_()) { \ + lockStat_ = 0xFFU; \ + } else { \ + lockStat_ = QK_schedLock((prio_)); \ + } \ +} while (false) - /*! Internal macro for selective scheduler unlocking. */ - #define QF_SCHED_UNLOCK_() do { \ - if (lockStat_ != 0xFFU) { \ - QK_schedUnlock(lockStat_); \ - } \ - } while (false) +/*${QK-impl::QF_SCHED_UNLOCK_} .............................................*/ +/*! QK selective scheduler unlocking */ +#define QF_SCHED_UNLOCK_() do { \ + if (lockStat_ != 0xFFU) { \ + QK_schedUnlock(lockStat_); \ + } \ +} while (false) - /* native event queue operations... */ - #define QACTIVE_EQUEUE_WAIT_(me_) \ - (Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0)) +/*${QK-impl::QACTIVE_EQUEUE_WAIT_} .........................................*/ +/*! QK native event queue waiting */ +#define QACTIVE_EQUEUE_WAIT_(me_) \ + (Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0)) - #define QACTIVE_EQUEUE_SIGNAL_(me_) do { \ - QPSet_insert(&QK_attr_.readySet, (uint_fast8_t)(me_)->prio); \ - if (!QK_ISR_CONTEXT_()) { \ - if (QK_sched_() != 0U) { \ - QK_activate_(); \ - } \ - } \ - } while (false) +/*${QK-impl::QACTIVE_EQUEUE_SIGNAL_} .......................................*/ +/*! QK native event queue signaling */ +#define QACTIVE_EQUEUE_SIGNAL_(me_) do { \ + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio); \ + if (!QK_ISR_CONTEXT_()) { \ + if (QK_sched_() != 0U) { \ + QK_activate_(); \ + } \ + } \ +} while (false) +/*$enddecl${QK-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ - /* native QF event pool operations */ - #define QF_EPOOL_TYPE_ QMPool - #define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \ - (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) - #define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize) - #define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \ - ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) - #define QF_EPOOL_PUT_(p_, e_, qs_id_) \ - (QMPool_put(&(p_), (e_), (qs_id_))) +/* Native QF event pool operations... */ +/*$declare${QF-QMPool-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*${QF-QMPool-impl::QF_EPOOL_TYPE_} ........................................*/ +#define QF_EPOOL_TYPE_ QMPool + +/*${QF-QMPool-impl::QF_EPOOL_INIT_} ........................................*/ +#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \ + (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) + +/*${QF-QMPool-impl::QF_EPOOL_EVENT_SIZE_} ..................................*/ +#define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize) + +/*${QF-QMPool-impl::QF_EPOOL_GET_} .........................................*/ +#define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \ + ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) + +/*${QF-QMPool-impl::QF_EPOOL_PUT_} .........................................*/ +#define QF_EPOOL_PUT_(p_, e_, qs_id_) \ + (QMPool_put(&(p_), (e_), (qs_id_))) +/*$enddecl${QF-QMPool-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* QP_IMPL */ #endif /* QK_H */ diff --git a/include/qmpool.h b/include/qmpool.h index 214893bd..e13f2546 100644 --- a/include/qmpool.h +++ b/include/qmpool.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qmpool.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qmpool.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qmpool.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QP native, platform-independent memory pool ::QMPool interface. -* @ingroup qf */ #ifndef QMPOOL_H #define QMPOOL_H @@ -44,7 +57,7 @@ /*! The data type to store the block-size based on the macro * #QF_MPOOL_SIZ_SIZE. - * @description + * @details * The dynamic range of this data type determines the maximum size * of blocks that can be managed by the native QF event pool. */ @@ -69,7 +82,7 @@ /*! The data type to store the block-counter based on the macro * #QF_MPOOL_CTR_SIZE. - * @description + * @details * The dynamic range of this data type determines the maximum number * of blocks that can be stored in the pool. */ @@ -82,14 +95,26 @@ #error "QF_MPOOL_CTR_SIZE defined incorrectly, expected 1U, 2U, or 4U" #endif +/*! Memory pool element to allocate correctly aligned storage +* for QMPool class. +* @param[in] evType_ event type (name of the subclass of QEvt) +*/ +#define QF_MPOOL_EL(evType_) \ + struct { void *sto_[((sizeof(evType_) - 1U)/sizeof(void*)) + 1U]; } + /*==========================================================================*/ -/*! Native QF Memory Pool -* @description +/*$declare${QF::QMPool} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QMPool} ............................................................*/ +/*! @brief Native QF Memory Pool +* @class QMPool +* +* @details * A fixed block-size memory pool is a very fast and efficient data * structure for dynamic allocation of fixed block-size chunks of memory. * A memory pool offers fast and deterministic allocation and recycling of -* memory blocks and is not subject to fragmenation.@n -* @n +* memory blocks and is not subject to fragmenation.
    +* * The ::QMPool class describes the native QF memory pool, which can be used as * the event pool for dynamic event allocation, or as a fast, deterministic * fixed block-size heap for any other objects in your application. @@ -104,26 +129,42 @@ * #QF_EPOOL_TYPE_ as ::QMPool in the specific QF port header file. */ typedef struct { - /*! The head of the linked list of free blocks */ +/* private: */ + + /*! start of the memory managed by this memory pool + * @private @memberof QMPool + */ + void * start; + + /*! end of the memory managed by this memory pool + * @private @memberof QMPool + */ + void * end; + + /*! head of linked list of free blocks + * @private @memberof QMPool + */ void * volatile free_head; - /*! the original start this pool */ - void *start; - - /*! the last memory block managed by this memory pool */ - void *end; - - /*! maximum block size (in bytes) */ + /*! maximum block size (in bytes) + * @private @memberof QMPool + */ QMPoolSize blockSize; - /*! total number of blocks */ + /*! total number of blocks + * @private @memberof QMPool + */ QMPoolCtr nTot; - /*! number of free blocks remaining */ + /*! number of free blocks remaining + * @private @memberof QMPool + */ QMPoolCtr volatile nFree; /*! minimum number of free blocks ever present in this pool - * @description + * @private @memberof QMPool + * + * @details * this attribute remembers the low watermark of the pool, which * provides a valuable information for sizing event pools. * @sa QF_getPoolMin(). @@ -131,25 +172,114 @@ typedef struct { QMPoolCtr nMin; } QMPool; -/* public functions: */ +/* public: */ -/*! Initializes the native QF memory pool */ -void QMPool_init(QMPool * const me, void * const poolSto, - uint_fast32_t poolSize, uint_fast16_t blockSize); - -/*! Obtains a memory block from a memory pool. */ -void *QMPool_get(QMPool * const me, uint_fast16_t const margin, - uint_fast8_t const qs_id); - -/*! Recycles a memory block back to a memory pool. */ -void QMPool_put(QMPool * const me, void *b, - uint_fast8_t const qs_id); - -/*! Memory pool element to allocate correctly aligned storage -* for QMPool class. -* @param[in] evType_ event type (name of the subclass of QEvt) +/*! Initializes the native QF memory pool +* @public @memberof QMPool +* +* @details +* Initialize a fixed block-size memory pool by providing it with the pool +* memory to manage, size of this memory, and the block size. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] poolSto pointer to the memory buffer for pool storage +* @param[in] poolSize size of the storage buffer in bytes +* @param[in] blockSize fixed-size of the memory blocks in bytes +* +* @attention +* The caller of QMPool::init() must make sure that the @p poolSto +* pointer is properly **aligned**. In particular, it must be possible to +* efficiently store a pointer at the location pointed to by @p poolSto. +* Internally, the QMPool_init() function rounds up the block size +* @p blockSize so that it can fit an integer number of pointers. +* This is done to achieve proper alignment of the blocks within the pool. +* +* @note +* Due to the rounding of block size the actual capacity of the pool might +* be less than (@p poolSize / @p blockSize). You can check the capacity +* of the pool by calling the QF_getPoolMin() function. +* +* @note +* This function is **not** protected by a critical section, because +* it is intended to be called only during the initialization of the system, +* when interrupts are not allowed yet. +* +* @note +* Many QF ports use memory pools to implement the event pools. +* +* @usage +* The following example illustrates how to invoke QMPool_init(): +* @include qmp_init.c */ -#define QF_MPOOL_EL(evType_) \ - struct { void *sto_[((sizeof(evType_) - 1U)/sizeof(void*)) + 1U]; } +void QMPool_init(QMPool * const me, + void * const poolSto, + uint_fast32_t poolSize, + uint_fast16_t blockSize); -#endif /* QMPOOL_H */ +/*! Obtains a memory block from a memory pool. +* @public @memberof QMPool +* +* @details +* The function allocates a memory block from the pool and returns a pointer +* to the block back to the caller. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] margin the minimum number of unused blocks still available +* in the pool after the allocation. +* +* @returns +* A pointer to a memory block or NULL if no more blocks are available in +* the memory pool. +* +* @note +* This function can be called from any task level or ISR level. +* +* @note +* The memory pool @p me must be initialized before any events can +* be requested from it. Also, the QMPool_get() function uses internally a +* QF critical section, so you should be careful not to call it from within +* a critical section when nesting of critical section is not supported. +* +* @attention +* An allocated block must be later returned back to the **same** pool +* from which it has been allocated. +* +* @sa QMPool_put() +* +* @usage +* The following example illustrates how to use QMPool_get(): +* @include qmp_use.c +*/ +void * QMPool_get(QMPool * const me, + uint_fast16_t const margin, + uint_fast8_t const qs_id); + +/*! Recycles a memory block back to a memory pool. +* @public @memberof QMPool +* +* @details +* Recycle a memory block to the fixed block-size memory pool. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] b pointer to the memory block that is being recycled +* +* @attention +* The recycled block must be allocated from the **same** memory pool +* to which it is returned. +* +* @note +* This function can be called from any task level or ISR level. +* +* @sa +* QMPool_get() +* +* @usage +* The following example illustrates how to use QMPool_put(): +* @include qmp_use.c +*/ +void QMPool_put(QMPool * const me, + void * const b, + uint_fast8_t const qs_id); +/*$enddecl${QF::QMPool} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +#endif /* QMPOOL_H */ diff --git a/include/qpc.h b/include/qpc.h index dd41836f..233a22ec 100644 --- a/include/qpc.h +++ b/include/qpc.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qpc.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qpc.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,19 +32,19 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qpc.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-22 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QP/C public interface including backwards-compatibility layer -* @description +* @details * This header file must be included directly or indirectly * in all application modules (*.c files) that use QP/C. -* @ingroup qp */ #ifndef QPC_H #define QPC_H @@ -55,7 +68,7 @@ extern "C" { #ifndef QP_API_VERSION /*! Specifies the backwards compatibility with the QP/C API version. -* @description +* @details * For example, QP_API_VERSION==691 will cause generating the compatibility * layer with QP/C version 6.9.1 and newer, but not older than 6.9.1. * QP_API_VERSION==0 causes generation of the maximum currently supported diff --git a/include/qs.h b/include/qs.h index fff451b4..841910b9 100644 --- a/include/qs.h +++ b/include/qs.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qs.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qs.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qs.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QS/C platform-independent public interface. -* @ingroup qs */ #ifndef QS_H #define QS_H @@ -38,8 +51,75 @@ #endif /*==========================================================================*/ +/*$declare${QS-config} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QS-config::QS_TIME_SIZE} ...............................................*/ +/*! The size [bytes] of the QS time stamp. Valid values: 1U, 2U, or 4U; +* default 4U. +* +* @details +* This macro can be defined in the QS port file (qs_port.h) to +* configure the ::QSTimeCtr type. Here the macro is not defined so the +* default of 4 byte is chosen. +*/ +#ifndef QS_TIME_SIZE +#define QS_TIME_SIZE 4U +#endif /* ndef QS_TIME_SIZE */ + +/*${QS-config::QS_TIME_SIZE defined incorrectly~} ..........................*/ +#if (QS_TIME_SIZE != 1U) && (QS_TIME_SIZE != 2U) && (QS_TIME_SIZE != 4U) +#error QS_TIME_SIZE defined incorrectly, expected 1U, 2U, or 4U; +#endif /* (QS_TIME_SIZE != 1U) && (QS_TIME_SIZE != 2U) && (QS_TIME_SIZE != 4U) */ +/*$enddecl${QS-config} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*==========================================================================*/ +/*$declare${QS} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QS::QSTimeCtr} .........................................................*/ +/*! QS time stamp type, which determines the dynamic range of QS time stamps */ +#if (QS_TIME_SIZE == 4U) +typedef uint32_t QSTimeCtr; +#endif /* (QS_TIME_SIZE == 4U) */ + +/*${QS::QSTimeCtr} .........................................................*/ +#if (QS_TIME_SIZE == 2U) +typedef uint16_t QSTimeCtr; +#endif /* (QS_TIME_SIZE == 2U) */ + +/*${QS::QSTimeCtr} .........................................................*/ +#if (QS_TIME_SIZE == 1U) +typedef uint8_t QSTimeCtr; +#endif /* (QS_TIME_SIZE == 1U) */ + +/*${QS::QSFun} .............................................................*/ +/*! QS function pointer type (for serializing function pointers) */ +#if (QS_FUN_PTR_SIZE == 4U) +typedef uint32_t QSFun; +#endif /* (QS_FUN_PTR_SIZE == 4U) */ + +/*${QS::QSFun} .............................................................*/ +#if (QS_FUN_PTR_SIZE == 8U) +typedef uint64_t QSFun; +#endif /* (QS_FUN_PTR_SIZE == 8U) */ + +/*${QS::QSFun} .............................................................*/ +#if (QS_FUN_PTR_SIZE == 2U) +typedef uint16_t QSFun; +#endif /* (QS_FUN_PTR_SIZE == 2U) */ + +/*${QS::QSFun} .............................................................*/ +#if (QS_FUN_PTR_SIZE == 1U) +typedef uint8_t QSFun; +#endif /* (QS_FUN_PTR_SIZE == 1U) */ + +/*${QS::QSCtr} .............................................................*/ +/*! QS ring buffer counter and offset type */ +typedef uint_fast16_t QSCtr; + +/*${QS::QSpyPre} ...........................................................*/ /*! QS pre-defined record types (TX channel) -* @description +* +* @details * This enumeration specifies the record types used in the QP components. * You can specify your own record types starting from ::QS_USER offset. * Currently, the maximum of all records cannot exceed 125. @@ -51,7 +131,7 @@ * * @sa QS_GLB_FILTER() macro */ -enum QSpyRecords { +enum QSpyPre { /* [0] QS session (not maskable) */ QS_EMPTY, /*!< QS record for cleanly starting a session */ @@ -64,7 +144,7 @@ enum QSpyRecords { QS_QEP_TRAN, /*!< a regular transition was taken */ QS_QEP_IGNORED, /*!< an event was ignored (silently discarded) */ QS_QEP_DISPATCH, /*!< an event was dispatched (begin of RTC step) */ - QS_QEP_UNHANDLED, /*!< an event was unhandled due to a guard */ + QS_QEP_UNHANDLED, /*!< an event was un-handled due to a guard */ /* [10] Active Object (AO) records */ QS_QF_ACTIVE_DEFER, /*!< AO deferred an event */ @@ -91,12 +171,12 @@ enum QSpyRecords { QS_QF_MPOOL_PUT, /*!< a memory block was returned to memory pool */ /* [26] Additional Framework (QF) records */ - QS_QF_PUBLISH, /*!< an event was published */ + QS_QF_PUBLISH, /*!< an event was published to active objects */ QS_QF_NEW_REF, /*!< new event reference was created */ QS_QF_NEW, /*!< new event was created */ QS_QF_GC_ATTEMPT, /*!< garbage collection attempt */ QS_QF_GC, /*!< garbage collection */ - QS_QF_TICK, /*!< QF_tickX() was called */ + QS_QF_TICK, /*!< QTimeEvt_tick_() was called */ /* [32] Time Event (TE) records */ QS_QF_TIMEEVT_ARM, /*!< a time event was armed */ @@ -156,18 +236,9 @@ enum QSpyRecords { QS_MAX, /*!< the number of reserved signals */ }; -/*! QS user record group offsets for QS_GLB_FILTER() */ -enum QSpyUserOffsets { - QS_USER = 100, /*!< the first record available to QS users */ - QS_USER0 = (enum_t)QS_USER, /*!< offset for User Group 0 */ - QS_USER1 = (enum_t)QS_USER0 + 5, /*!< offset for User Group 1 */ - QS_USER2 = (enum_t)QS_USER1 + 5, /*!< offset for User Group 2 */ - QS_USER3 = (enum_t)QS_USER2 + 5, /*!< offset for User Group 3 */ - QS_USER4 = (enum_t)QS_USER3 + 5 /*!< offset for User Group 4 */ -}; - +/*${QS::QSpyGroups} ........................................................*/ /*! QS record groups for QS_GLB_FILTER() */ -enum QSpyRecordGroups { +enum QSpyGroups { QS_ALL_RECORDS = 0xF0,/*!< all maskable QS records */ QS_SM_RECORDS, /*!< State Machine QS records */ QS_AO_RECORDS, /*!< Active Object QS records */ @@ -184,6 +255,18 @@ enum QSpyRecordGroups { QS_UA_RECORDS /*!< All User records */ }; +/*${QS::QSpyUserOffsets} ...................................................*/ +/*! QS user record group offsets for QS_GLB_FILTER() */ +enum QSpyUserOffsets { + QS_USER = 100, /*!< the first record available to QS users */ + QS_USER0 = (enum_t)QS_USER, /*!< offset for User Group 0 */ + QS_USER1 = (enum_t)QS_USER0 + 5, /*!< offset for User Group 1 */ + QS_USER2 = (enum_t)QS_USER1 + 5, /*!< offset for User Group 2 */ + QS_USER3 = (enum_t)QS_USER2 + 5, /*!< offset for User Group 3 */ + QS_USER4 = (enum_t)QS_USER3 + 5 /*!< offset for User Group 4 */ +}; + +/*${QS::QSpyIdOffsets} .....................................................*/ /*! QS ID offsets for QS_LOC_FILTER() */ enum QSpyIdOffsets { QS_AO_ID = 0, /*!< offset for AO priorities */ @@ -192,6 +275,7 @@ enum QSpyIdOffsets { QS_AP_ID = 96, /*!< offset for Application-specific IDs */ }; +/*${QS::QSpyIdGroups} ......................................................*/ /*! QS ID groups for QS_LOC_FILTER() */ enum QSpyIdGroups { QS_ALL_IDS = 0xF0, /*!< all QS IDs */ @@ -201,277 +285,1048 @@ enum QSpyIdGroups { QS_AP_IDS = (0x80 + (enum_t)QS_AP_ID), /*!< Application-specific IDs */ }; -/*! QSpy ID type for applying local filtering */ +/*${QS::QSpyFunPtr} ........................................................*/ +/*! function pointer type for QS_fun_dict_pre_() */ +typedef void (* QSpyFunPtr )(void); + +/*${QS::QS_EOD} ............................................................*/ +/*! Constant representing End-Of-Data condition returned from the +* QS_getByte() function. +*/ +#define QS_EOD ((uint16_t)0xFFFFU) + +/*${QS::QSpyId} ............................................................*/ +/*! @brief QS ID type for applying local filtering */ typedef struct { uint8_t prio; } QSpyId; -#ifndef QS_TIME_SIZE - - /*! The size [bytes] of the QS time stamp. Valid values: 1U, 2U, or 4U; - * default 4U. - * @description - * This macro can be defined in the QS port file (qs_port.h) to - * configure the ::QSTimeCtr type. Here the macro is not defined so the - * default of 4 byte is chosen. - */ - #define QS_TIME_SIZE 4U -#endif - -#if (QS_TIME_SIZE == 1U) - typedef uint8_t QSTimeCtr; - #define QS_TIME_PRE_() (QS_u8_raw_(QS_onGetTime())) -#elif (QS_TIME_SIZE == 2U) - typedef uint16_t QSTimeCtr; - #define QS_TIME_PRE_() (QS_u16_raw_(QS_onGetTime())) -#elif (QS_TIME_SIZE == 4U) - /*! The type of the QS time stamp. This type determines the dynamic - * range of QS time stamps - */ - typedef uint32_t QSTimeCtr; - - /*! Internal macro to output time stamp to a QS record */ - #define QS_TIME_PRE_() (QS_u32_raw_(QS_onGetTime())) -#else - #error "QS_TIME_SIZE defined incorrectly, expected 1, 2, or 4" -#endif - -/*==========================================================================*/ -/*! QS software tracing facilities -* @description -* This class groups together QS services. It has only static members and -* should not be instantiated. +/*${QS::QS-tx::tx} .........................................................*/ +/*! @brief Software tracing, output QS-TX +* +* @details +* This class groups together QS services. */ typedef struct { - uint8_t dummy; -} QS; +/* public: */ -/*! Initialize the QS data buffer. -* @static @public @memberof QS + /*! global on/off QS filter */ + uint8_t glbFilter[16]; + + /*! local on/off QS filter */ + uint8_t locFilter[16]; + + /*! @deprecated old local QS filter */ + void const * locFilter_AP; + + /*! pointer to the start of the QS-TX ring buffer */ + uint8_t * buf; + + /*! offset of the end of the ring buffer */ + QSCtr end; + + /*! offset to where next byte will be inserted */ + QSCtr volatile head; + + /*! offset of where next record will be extracted */ + QSCtr volatile tail; + + /*! number of bytes currently in the ring buffer */ + QSCtr volatile used; + + /*! sequence number of the last inserted QS record */ + uint8_t volatile seq; + + /*! checksum of the currently inserted record */ + uint8_t volatile chksum; + + /*! critical section nesting level */ + uint8_t volatile critNest; +} QS_tx; + +/*${QS::QS-tx::preType} ....................................................*/ +/*! Enumerates data formats recognized by QS +* +* @details +* QS uses this enumeration is used only internally for the formatted +* user data elements. */ -void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize); +enum QS_preType { + QS_I8_T, /*!< signed 8-bit integer format */ + QS_U8_T, /*!< unsigned 8-bit integer format */ + QS_I16_T, /*!< signed 16-bit integer format */ + QS_U16_T, /*!< unsigned 16-bit integer format */ + QS_I32_T, /*!< signed 32-bit integer format */ + QS_U32_T, /*!< unsigned 32-bit integer format */ + QS_F32_T, /*!< 32-bit floating point format */ + QS_F64_T, /*!< 64-bit floating point format */ + QS_STR_T, /*!< zero-terminated ASCII string format */ + QS_MEM_T, /*!< up to 255-bytes memory block format */ + QS_SIG_T, /*!< event signal format */ + QS_OBJ_T, /*!< object pointer format */ + QS_FUN_T, /*!< function pointer format */ + QS_I64_T, /*!< signed 64-bit integer format */ + QS_U64_T, /*!< unsigned 64-bit integer format */ + QS_HEX_FMT /*!< HEX format for the "width" filed */ +}; -/*! Set/clear the global Filter for a given QS record or group of records. +/*${QS::QS-tx::priv_} ......................................................*/ +/*! the only instance of the QS-TX object (Singleton) */ +extern QS_tx QS_priv_; + +/*${QS::QS-tx::initBuf} ....................................................*/ +/*! Initialize the QS data buffer * @static @private @memberof QS +* +* @details +* This function should be called from QS_onStartup() to provide +* QS with the data buffer. The first argument `sto[]` is the address +* of the memory block, and the second argument `stoSize` is the size +* of this block [in bytes]. Currently the size of the QS buffer cannot +* exceed 64KB. +* +* @note +* QS can work with quite small data buffers, but you will start losing +* data if the buffer is too small for the bursts of tracing activity. +* The right size of the buffer depends on the data production rate and +* the data output rate. QS offers flexible filtering to reduce the data +* production rate. +* +* @note +* If the data output rate cannot keep up with the production rate, +* QS will start overwriting the older data with newer data. This is +* consistent with the "last-is-best" QS policy. The record sequence +* counters and check sums on each record allow the QSPY host utility +* to easily detect any data loss. +*/ +void QS_initBuf( + uint8_t * const sto, + uint_fast16_t const stoSize); + +/*${QS::QS-tx::getByte} ....................................................*/ +/*! Byte-oriented interface to the QS data buffer +* @static @private @memberof QS +* +* @details +* This function delivers one byte at a time from the QS data buffer. +* +* @returns +* the byte in the least-significant 8-bits of the 16-bit return +* value if the byte is available. If no more data is available at the +* time, the function returns ::QS_EOD (End-Of-Data). +* +* @note +* QS_getByte() is NOT protected with a critical section. +*/ +uint16_t QS_getByte(void); + +/*${QS::QS-tx::getBlock} ...................................................*/ +/*! Block-oriented interface to the QS data buffer +* @static @private @memberof QS +* +* @details +* This function delivers a contiguous block of data from the QS data +* buffer. The function returns the pointer to the beginning of the +* block, and writes the number of bytes in the block to the location +* pointed to by `pNbytes`. The argument `pNbytes` is also used as +* input to provide the maximum size of the data block that the caller +* can accept. +* +* @returns +* if data is available, the function returns pointer to the +* contiguous block of data and sets the value pointed to by `pNbytes` +* to the # available bytes. If data is available at the time the +* function is called, the function returns NULL pointer and sets the +* value pointed to by `pNbytes` to zero. +* +* @note +* Only the NULL return from QS_getBlock() indicates that the QS +* buffer is empty at the time of the call. The non-NULL return often +* means that the block is at the end of the buffer and you need to call +* QS_getBlock() again to obtain the rest of the data that +* "wrapped around" to the beginning of the QS data buffer. +* +* @note QS_getBlock() is **not** protected with a critical section. +*/ +uint8_t const * QS_getBlock(uint16_t * const pNbytes); + +/*${QS::QS-tx::glbFilter_} .................................................*/ +/*! Set/clear the global Filter for a given QS record +* or a group of records +* @static @private @memberof QS +* +* @details +* This function sets up the QS filter to enable record types specified +* in the `filter` parameter. The value #QS_ALL_RECORDS specifies to +* filter-in all records. This function should be called indirectly +* through the macro QS_GLB_FILTER() +* +* @param[in] filter the QS record-d or group to enable in the filter, +* if positive or disable, if negative. The record-id +* numbers must be in the range -127..127. +* @note +* Filtering based on the record-type is only the first layer of +* filtering. The second layer is based on the object-type. Both filter +* layers must be enabled for the QS record to be inserted in the +* QS buffer. +* +* @sa QS_locFilter_() */ void QS_glbFilter_(int_fast16_t const filter); -/*! Set/clear the local Filter for a given object-id or group of object-ids. +/*${QS::QS-tx::locFilter_} .................................................*/ +/*! Set/clear the local Filter for a given object-id +* or a group of object-ids * @static @private @memberof QS +* +* @details +* This function sets up the local QS filter to enable or disable the +* given QS object-id or a group of object-ids @a filter. +* This function should be called indirectly through the macro +* QS_LOC_FILTER() +* +* @param[in] filter the QS object-id or group to enable in the filter, +* if positive or disable, if negative. The qs_id numbers +* must be in the range 1..127. +* @note +* Filtering based on the object-id (local filter) is the second layer +* of filtering. The first layer is based on the QS record-type (global +* filter). Both filter layers must be enabled for the QS record to be +* inserted into the QS buffer. +* +* @sa QS_glbFilter_() */ void QS_locFilter_(int_fast16_t const filter); -/*! Mark the begin of a QS record @p rec +/*${QS::QS-tx::doOutput} ...................................................*/ +/*! Perform the QS-TX output (implemented in some QS ports) * @static @private @memberof QS */ -void QS_beginRec_(uint_fast8_t rec); +void QS_doOutput(void); -/*! Mark the end of a QS record @p rec +/*${QS::QS-tx::beginRec_} ..................................................*/ +/*! Mark the begin of a QS record @p rec * @static @private @memberof QS +* +* @details +* This function must be called at the beginning of each QS record. +* This function should be called indirectly through the macro QS_BEGIN_ID(), +* or QS_BEGIN_NOCRIT(), depending if it's called in a normal code or from +* a critical section. +*/ +void QS_beginRec_(uint_fast8_t const rec); + +/*${QS::QS-tx::endRec_} ....................................................*/ +/*! Mark the end of a QS record `rec` +* @static @private @memberof QS +* +* @details +* This function must be called at the end of each QS record. +* This function should be called indirectly through the macro QS_END(), +* or QS_END_NOCRIT(), depending if it's called in a normal code or from +* a critical section. */ void QS_endRec_(void); -/* unformatted (raw) data elements output ..................................*/ -/*! output raw uint8_t data element (without format information) +/*${QS::QS-tx::u8_raw_} ....................................................*/ +/*! output uint8_t data element without format information * @static @private @memberof QS */ -void QS_u8_raw_(uint8_t d); +void QS_u8_raw_(uint8_t const d); -/*! output two raw uint8_t data elements (without format information) +/*${QS::QS-tx::2u8_raw_} ...................................................*/ +/*! output two uint8_t data elements without format information * @static @private @memberof QS */ -void QS_2u8_raw_(uint8_t d1, uint8_t d2); +void QS_2u8_raw_( + uint8_t const d1, + uint8_t const d2); -/*! Output raw uint16_t data element (without format information) +/*${QS::QS-tx::u16_raw_} ...................................................*/ +/*! output uint16_t data element without format information * @static @private @memberof QS */ void QS_u16_raw_(uint16_t d); -/*! Output raw uint32_t data element (without format information) +/*${QS::QS-tx::u32_raw_} ...................................................*/ +/*! output uint32_t data element without format information * @static @private @memberof QS */ void QS_u32_raw_(uint32_t d); -/*! Output raw zero-terminated string element (without format information) -* @static @private @memberof QS -*/ -void QS_str_raw_(char const *str); - -/* formatted data elements output ..........................................*/ -/*! Output uint8_t data element with format information -* @static @private @memberof QS -*/ -void QS_u8_fmt_(uint8_t format, uint8_t d); - -/*! output uint16_t data element with format information -* @static @private @memberof QS -*/ -void QS_u16_fmt_(uint8_t format, uint16_t d); - -/*! Output uint32_t data element with format information -* @static @private @memberof QS -*/ -void QS_u32_fmt_(uint8_t format, uint32_t d); - -/*! Output 32-bit floating point data element with format information -* @static @private @memberof QS -*/ -void QS_f32_fmt_(uint8_t format, float32_t f); - -/*! Output 64-bit floating point data element with format information -* @static @private @memberof QS -*/ -void QS_f64_fmt_(uint8_t format, float64_t d); - +/*${QS::QS-tx::obj_raw_} ...................................................*/ /*! Output obj pointer data element without format information * @static @private @memberof QS +* +* @note This function is only to be used through macros, never in the +* client code directly. */ void QS_obj_raw_(void const * const obj); -/*! Output zero-terminated ASCII string element with format information +/*${QS::QS-tx::str_raw_} ...................................................*/ +/*! Output raw zero-terminated string element (without format information) +* @static @private @memberof QS +* +* @note This function is only to be used through macros, never in the +* client code directly. +*/ +void QS_str_raw_(char const * str); + +/*${QS::QS-tx::u8_fmt_} ....................................................*/ +/*! Output uint8_t data element with format information +* @static @private @memberof QS +* +* @details +* @note This function is only to be used through macros, never in the +* client code directly. +*/ +void QS_u8_fmt_( + uint8_t const format, + uint8_t const d); + +/*${QS::QS-tx::u16_fmt_} ...................................................*/ +/*! output uint16_t data element with format information +* @static @private @memberof QS +* +* @details +* This function is only to be used through macros, never in the +* client code directly. +*/ +void QS_u16_fmt_( + uint8_t format, + uint16_t d); + +/*${QS::QS-tx::u32_fmt_} ...................................................*/ +/*! Output uint32_t data element with format information +* @static @private @memberof QS +* +* @note This function is only to be used through macros, never in the +* client code directly. +*/ +void QS_u32_fmt_( + uint8_t format, + uint32_t d); + +/*${QS::QS-tx::str_fmt_} ...................................................*/ +/*! Output formatted zero-terminated ASCII string to the QS record * @static @private @memberof QS */ -void QS_str_fmt_(char const *str); +void QS_str_fmt_(char const * str); -/*! Output memory block of up to 255-bytes with format information +/*${QS::QS-tx::mem_fmt_} ...................................................*/ +/*! Output formatted memory block of up to 255 bytes to the QS record * @static @private @memberof QS */ -void QS_mem_fmt_(uint8_t const *blk, uint8_t size); +void QS_mem_fmt_( + uint8_t const * blk, + uint8_t size); -/*! Output raw uint64_t data element without format information +/*${QS::QS-tx::sig_dict_pre_} ..............................................*/ +/*! Output predefined signal-dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_SIG_DICTIONARY() +*/ +void QS_sig_dict_pre_( + enum_t const sig, + void const * const obj, + char const * const name); + +/*${QS::QS-tx::obj_dict_pre_} ..............................................*/ +/*! Output predefined object-dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_OBJ_DICTIONARY() +*/ +void QS_obj_dict_pre_( + void const * const obj, + char const * const name); + +/*${QS::QS-tx::obj_arr_dict_pre_} ..........................................*/ +/*! Output predefined object-array dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_OBJ_ARR_DICTIONARY() +*/ +void QS_obj_arr_dict_pre_( + void const * const obj, + uint_fast16_t const idx, + char const * const name); + +/*${QS::QS-tx::fun_dict_pre_} ..............................................*/ +/*! Output predefined function-dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_FUN_DICTIONARY() +*/ +void QS_fun_dict_pre_( + QSpyFunPtr fun, + char const * const name); + +/*${QS::QS-tx::usr_dict_pre_} ..............................................*/ +/*! Output predefined user-dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_USR_DICTIONARY() +*/ +void QS_usr_dict_pre_( + enum_t const rec, + char const * const name); + +/*${QS::QS-tx::ASSERTION} ..................................................*/ +/*! Output the predefined assertion failure trace record +* @static @public @memberof QS +* +* @details +* This trace record is intended to use from the Q_onAssert() callback. +*/ +void QS_ASSERTION( + char const * const module, + int_t const loc, + uint32_t const delay); + +/*${QS::QS-tx::target_info_pre_} ...........................................*/ +/*! Helper function to output the predefined Target-info trace record. +* @static @private @memberof QS +*/ +void QS_target_info_pre_(uint8_t const isReset); + +/*${QS::QS-tx::onStartup} ..................................................*/ +/*! Callback to startup the QS facility +* @static @public @memberof QS +*/ +uint8_t QS_onStartup(void const * arg); + +/*${QS::QS-tx::onCleanup} ..................................................*/ +void QS_onCleanup(void); + +/*${QS::QS-tx::onFlush} ....................................................*/ +void QS_onFlush(void); + +/*${QS::QS-tx::onGetTime} ..................................................*/ +QSTimeCtr QS_onGetTime(void); + +/*${QS::QS-tx-64bit::u64_raw_} .............................................*/ +/*! Output uint64_t data element without format information * @static @private @memberof QS */ void QS_u64_raw_(uint64_t d); +/*${QS::QS-tx-64bit::u64_fmt_} .............................................*/ /*! Output uint64_t data element with format information * @static @private @memberof QS +* @sa QS_U64(), QS_I64() */ -void QS_u64_fmt_(uint8_t format, uint64_t d); +void QS_u64_fmt_( + uint8_t format, + uint64_t d); -/* QS buffer access *********************************************************/ -/*! Byte-oriented interface to the QS data buffer. -* @static @public @memberof QS +/*${QS::QS-tx-fp::f32_fmt_} ................................................*/ +/*! Output 32-bit floating point data element with format information +* @static @private @memberof QS +* @sa QS_F32() */ -uint16_t QS_getByte(void); +void QS_f32_fmt_( + uint8_t format, + float32_t d); -/*! Constant for End-Of-Data condition returned from QS_getByte() */ -#define QS_EOD ((uint16_t)0xFFFFU) - -/*! Block-oriented interface to the QS data buffer. -* @static @public @memberof QS +/*${QS::QS-tx-fp::f64_fmt_} ................................................*/ +/*! Output 64-bit floating point data element with format information +* @static @private @memberof QS +* @sa QS_F64() */ -uint8_t const *QS_getBlock(uint16_t *pNbytes); +void QS_f64_fmt_( + uint8_t format, + float64_t d); +/*${QS::QS-rx::rx} .........................................................*/ +/*! @brief QS software tracing parameters for QS input (QS-RX) */ +typedef struct { +/* public: */ + void * currObj[8]; + uint8_t * buf; + QSCtr end; + QSCtr volatile head; + QSCtr volatile tail; +#ifdef Q_UTEST + bool inTestLoop; +#endif /* def Q_UTEST */ +} QS_rx; -/* platform-specific callback functions, need to be implemented by clients */ +/*${QS::QS-rx::rxPriv_} ....................................................*/ +/*! the only instance of the QS-RX object (Singleton) */ +extern QS_rx QS_rxPriv_; -/*! Callback to startup the QS facility -* @static @public @memberof QS -* @description -* This is a platform-dependent "callback" function invoked through the macro -* QS_INIT(). You need to implement this function in your application. -* At a minimum, the function must configure the QS buffer by calling -* QS_initBuf(). Typically, you will also want to open/configure the QS output -* channel, such as a serial port, or a data file. The void* argument @p arg -* can be used to pass parameter(s) needed to configure the output channel. +/*${QS::QS-rx::QSpyObjKind} ................................................*/ +/*! Kinds of objects used in QS_setCurrObj() and QS_queryCurrObj() */ +enum QS_QSpyObjKind { + SM_OBJ, /*!< state machine object */ + AO_OBJ, /*!< active object */ + MP_OBJ, /*!< event pool object */ + EQ_OBJ, /*!< raw queue object */ + TE_OBJ, /*!< time event object */ + AP_OBJ, /*!< generic Application-specific object */ + MAX_OBJ +}; + +/*${QS::QS-rx::OSpyObjCombnation} ..........................................*/ +/*! Object combinations for QS_setCurrObj() and QS_queryCurrObj() */ +enum QS_OSpyObjCombnation { + SM_AO_OBJ = (enum_t)MAX_OBJ /*!< combination of SM and AO */ +}; + +/*${QS::QS-rx::rxInitBuf} ..................................................*/ +/*! Initialize the QS RX data buffer +* @static @private @memberof QS * -* @returns the staus of initialization. Typically 1 (true) when the QS -* initialization was successful, or 0 (false) when it failed. +* @details +* This function should be called from QS::onStartup() to provide QS-RX +* with the receive data buffer. * -* @usage -* The following example illustrates an implementation of QS_onStartup(): -* @include qs_startup.c +* @param[in] sto[] the address of the memory block +* @param[in] stoSize the size of this block [bytes]. The size of the +* QS RX buffer cannot exceed 64KB. +* +* @note +* QS-RX can work with quite small data buffers, but you will start +* losing data if the buffer is not drained fast enough (e.g., in the +* idle task). +* +* @note +* If the data input rate exceeds the QS-RX processing rate, the data +* will be lost, but the QS protocol will notice that: +* (1) that the checksum in the incomplete QS records will fail; and +* (2) the sequence counter in QS records will show discontinuities. +* +* The QS-RX channel will report any data errors by sending the +* QS_RX_DATA_ERROR trace record. */ -uint8_t QS_onStartup(void const *arg); +void QS_rxInitBuf( + uint8_t * const sto, + uint16_t const stoSize); -/*! Callback to cleanup the QS facility -* @static @public @memberof QS -* @description -* This is a platform-dependent "callback" function invoked through the macro -* QS_EXIT(). You need to implement this function in your application. -* The main purpose of this function is to close the QS output channel, if -* necessary. +/*${QS::QS-rx::rxPut} ......................................................*/ +/*! Put one byte into the QS RX lock-free buffer +* @static @private @memberof QS */ -void QS_onCleanup(void); +static inline bool QS_rxPut(uint8_t const b) { + QSCtr head = QS_rxPriv_.head + 1U; + if (head == QS_rxPriv_.end) { + head = 0U; + } + if (head != QS_rxPriv_.tail) { /* buffer NOT full? */ + QS_rxPriv_.buf[QS_rxPriv_.head] = b; + QS_rxPriv_.head = head; /* update the head to a *valid* index */ + return true; /* byte placed in the buffer */ + } + else { + return false; /* byte NOT placed in the buffer */ + } +} -/*! Callback to flush the QS trace data to the host -* @static @public @memberof QS -* @description -* This is a platform-dependent "callback" function to flush the QS trace -* buffer to the host. The function typically busy-waits until all the data -* in the buffer is sent to the host. This is acceptable only in the initial -* transient. +/*${QS::QS-rx::rxGetNfree} .................................................*/ +/*! Obtain the number of free bytes in the QS RX data buffer +* @static @private @memberof QS +* +* @details +* This function is intended to be called from the ISR that reads the +* QS-RX bytes from the QSPY application. The function returns the +* conservative number of free bytes currently available in the buffer, +* assuming that the head pointer is not being moved concurrently. +* The tail pointer might be moving, meaning that bytes can be +* concurrently removed from the buffer. */ -void QS_onFlush(void); +uint16_t QS_rxGetNfree(void); -/*! Callback to obtain a timestamp for a QS record. -* @static @public @memberof QS -* @description -* This is a platform-dependent "callback" function invoked from the macro -* QS_TIME_PRE_() to add the time stamp to a QS record. -* -* @note Some of the predefined QS records from QP do not output the time -* stamp. However, ALL user records do output the time stamp. -* @note QS_onGetTime() is called in a critical section and should not -* exit the critical section. -* -* @returns the current timestamp. -* -* @usage -* The following example shows using a system call to implement QS -* time stamping: -* @include qs_onGetTime.c +/*${QS::QS-rx::doInput} ....................................................*/ +/*! Perform the QS-RX input (implemented in some QS ports) +* @static @private @memberof QS */ -QSTimeCtr QS_onGetTime(void); +void QS_doInput(void); + +/*${QS::QS-rx::setCurrObj} .................................................*/ +/*! Set the "current object" in the Target +* @static @private @memberof QS +* +* @details +* This function sets the "current object" in the Target. +*/ +void QS_setCurrObj( + uint8_t obj_kind, + void * obj_ptr); + +/*${QS::QS-rx::queryCurrObj} ...............................................*/ +/*! Query the "current object" in the Target +* @static @public @memberof QS +* +* @details +* This function programmatically generates the response to the query for +* a "current object". +*/ +void QS_queryCurrObj(uint8_t obj_kind); + +/*${QS::QS-rx::rxParse} ....................................................*/ +/*! Parse all bytes present in the QS RX data buffer +* @static @private @memberof QS +*/ +void QS_rxParse(void); + +/*${QS::QS-rx::rxHandleGoodFrame_} .........................................*/ +/*! internal function to handle incoming (QS-RX) packet +* @static @private @memberof QS +*/ +void QS_rxHandleGoodFrame_(uint8_t const state); + +/*${QS::QS-rx::onReset} ....................................................*/ +/*! callback function to reset the Target (to be implemented in the BSP) +* @static @public @memberof QS +*/ +void QS_onReset(void); + +/*${QS::QS-rx::onCommand} ..................................................*/ +/*! Callback function to execute user commands (to be implemented in BSP) +* @static @public @memberof QS +*/ +void QS_onCommand( + uint8_t cmdId, + uint32_t param1, + uint32_t param2, + uint32_t param3); + +/*${QS::QS-rx::RX_PUT} .....................................................*/ +/*! Put one byte into the QS RX lock-free buffer +* @static @public @memberof QSrx +*/ +bool QS_RX_PUT(uint8_t const b); +/*$enddecl${QS} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*==========================================================================*/ -/* Macros for adding QS instrumentation to the client code */ +/*$declare${QS-macros} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*! Initialize the QS facility. -* @description +/*${QS-macros::QS_INIT} ....................................................*/ +/*! Initialize the QS facility +* +* @details * This macro provides an indirection layer to invoke the QS initialization * routine if #Q_SPY is defined, or do nothing if #Q_SPY is not defined. -* @sa QS_onStartup(), example of setting up a QS filter in QS_GLB_FILTER() +* @sa QS_onStartup(), example of setting up a QS filter in +* QS_GLB_FILTER() */ -#define QS_INIT(arg_) (QS_onStartup(arg_)) +#define QS_INIT(arg_) (QS_onStartup(arg_)) -/*! Cleanup the QS facility. -* @description +/*${QS-macros::QS_EXIT} ....................................................*/ +/*! Cleanup the QS facility +* +* @details * This macro provides an indirection layer to invoke the QS cleanup * routine if #Q_SPY is defined, or do nothing if #Q_SPY is not defined. * @sa QS_onCleanup() */ -#define QS_EXIT() (QS_onCleanup()) +#define QS_EXIT() (QS_onCleanup()) -/*! Flush the QS trace data to the host. -* @description -* This macro invokes the QS_flush() platform-dependent callback function -* to flush the QS trace buffer to the host. The function typically -* busy-waits until all the data in the buffer is sent to the host. -* This is acceptable only in the initial transient. +/*${QS-macros::QS_OUTPUT} ..................................................*/ +/*! macro to handle the QS output from the application +* +* @note +* If this macro is used, the application must define QS_output(). */ -#define QS_FLUSH() (QS_onFlush()) +#define QS_OUTPUT() (QS_output()) -/*! Global Filter for a given record type @p rec -* @description -* This macro provides an indirection layer to call QS_glbFilter_() +/*${QS-macros::QS_RX_INPUT} ................................................*/ +/*! macro to handle the QS-RX input to the application +* +* @note +* If this macro is used, the application must define QS_doInput(). +*/ +#define QS_RX_INPUT() (QS_rx_input()) + +/*${QS-macros::QS_GLB_FILTER} ..............................................*/ +/*! Global Filter ON for a given record type `rec_` +* +* @details +* This macro provides an indirection layer to call QS_filterOn() * if #Q_SPY is defined, or do nothing if #Q_SPY is not defined. * +* @sa +* - ::QSpyRecordGroups - QS record groups that can be used as `rec_` +* - ::QSpyRecords - individual QS records that can be used as `rec_` +* +* @usage * The following example shows how to use QS filters: * @include qs_filter.c */ -#define QS_GLB_FILTER(rec_) (QS_glbFilter_((int_fast16_t)(rec_))) +#define QS_GLB_FILTER(rec_) (QS_glbFilter_((int_fast16_t)(rec_))) -/*! Local Filter for a given object-id @p qs_id -* @description +/*${QS-macros::QS_LOC_FILTER} ..............................................*/ +/*! Local Filter for a given state machine object `qs_id` +* +* @details * This macro provides an indirection layer to call QS_locFilter_() * if #Q_SPY is defined, or do nothing if #Q_SPY is not defined. * +* @sa +* - ::QSpyIdGroups - QS ID groups that can be used as `qs_id_` +* - ::QSpyIdOffsets - QS ID offsets for `qs_id_` (e.g., QS_AP_IDS + 5) +* * The following example shows how to use QS filters: * @include qs_filter.c */ -#define QS_LOC_FILTER(qs_id_) (QS_locFilter_((int_fast16_t)(qs_id_))) +#define QS_LOC_FILTER(qs_id_) (QS_locFilter_((int_fast16_t)(qs_id_))) + +/*${QS-macros::QS_BEGIN_ID} ................................................*/ +/*! Begin an application-specific QS record with entering critical section +* +* @details +* The following example shows how to build a user QS record using the +* macros QS_BEGIN_ID(), QS_END(), and the formatted output macros: +* QS_U8(), QS_STR(), etc. +* +* @note +* Must always be used in pair with QS_END() +* +* @include qs_user.c +*/ +#define QS_BEGIN_ID(rec_, qs_id_) \ +if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ + QS_CRIT_STAT_ \ + QS_CRIT_E_(); \ + QS_beginRec_((uint_fast8_t)(rec_)); \ + QS_TIME_PRE_(); { + +/*${QS-macros::QS_END} .....................................................*/ +/*! End an application-specific QS record with exiting critical section. +* +* @sa example for QS_BEGIN_ID() +* @note Must always be used in pair with QS_BEGIN_ID() +*/ +#define QS_END() } \ + QS_endRec_(); \ + QS_CRIT_X_(); \ +} + +/*${QS-macros::QS_FLUSH} ...................................................*/ +/*! Flush the QS trace data to the host +* +* @details +* This macro invokes the QS_flush() platform-dependent callback +* function to flush the QS trace buffer to the host. The function +* typically busy-waits until all the data in the buffer is sent to +* the host. This is acceptable only in the initial transient. +*/ +#define QS_FLUSH() (QS_onFlush()) + +/*${QS-macros::QS_BEGIN_NOCRIT} ............................................*/ +/*! Begin an application-specific QS record WITHOUT entering critical section */ +#define QS_BEGIN_NOCRIT(rec_, qs_id_) \ +if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ + QS_beginRec_((uint_fast8_t)(rec_)); \ + QS_TIME_PRE_(); { + +/*${QS-macros::QS_END_NOCRIT} ..............................................*/ +/*! End an application-specific QS record WITHOUT exiting critical section */ +#define QS_END_NOCRIT() } \ + QS_endRec_();\ +} + +/*${QS-macros::QS_GLB_CHECK_} ..............................................*/ +/*! Helper macro for checking the global QS filter */ +#define QS_GLB_CHECK_(rec_) \ + (((uint_fast8_t)QS_priv_.glbFilter[(uint_fast8_t)(rec_) >> 3U] \ + & ((uint_fast8_t)1U << ((uint_fast8_t)(rec_) & 7U))) != 0U) + +/*${QS-macros::QS_LOC_CHECK_} ..............................................*/ +/*! Helper macro for checking the local QS filter */ +#define QS_LOC_CHECK_(qs_id_) \ + (((uint_fast8_t)QS_priv_.locFilter[(uint_fast8_t)(qs_id_) >> 3U] \ + & ((uint_fast8_t)1U << ((uint_fast8_t)(qs_id_) & 7U))) != 0U) + +/*${QS-macros::QS_REC_DONE} ................................................*/ +#ifndef QS_REC_DONE +/*! Macro to execute user code when a QS record is produced +* +* @note +* This is a dummy definition in case this macro is undefined. +*/ +#define QS_REC_DONE() ((void)0) +#endif /* ndef QS_REC_DONE */ + +/*${QS-macros::QS_I8} ......................................................*/ +/*! Output formatted int8_t to the QS record */ +#define QS_I8(width_, data_) \ + (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I8_T, (data_))) + +/*${QS-macros::QS_U8} ......................................................*/ +/*! Output formatted uint8_t to the QS record */ +#define QS_U8(width_, data_) \ + (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_))) + +/*${QS-macros::QS_I16} .....................................................*/ +/*! Output formatted int16_t to the QS record */ +#define QS_I16(width_, data_) \ + (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_))) + +/*${QS-macros::QS_U16} .....................................................*/ +/*! Output formatted uint16_t to the QS record */ +#define QS_U16(width_, data_) \ + (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_))) + +/*${QS-macros::QS_I32} .....................................................*/ +/*! Output formatted int32_t to the QS record */ +#define QS_I32(width_, data_) \ + (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_))) + +/*${QS-macros::QS_U32} .....................................................*/ +/*! Output formatted uint32_t to the QS record */ +#define QS_U32(width_, data_) \ + (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_))) + +/*${QS-macros::QS_I64} .....................................................*/ +/*! Output formatted int64_t to the QS record */ +#define QS_I64(width_, data_) \ + (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_))) + +/*${QS-macros::QS_U64} .....................................................*/ +/*! Output formatted uint64_t to the QS record */ +#define QS_U64(width_, data_) \ + (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_))) + +/*${QS-macros::QS_F32} .....................................................*/ +/*! Output formatted 32-bit floating point number to the QS record */ +#define QS_F32(width_, data_) \ + (QS_f32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_))) + +/*${QS-macros::QS_F64} .....................................................*/ +/*! Output formatted 64-bit floating point number to the QS record */ +#define QS_F64(width_, data_) \ + (QS_f64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_))) + +/*${QS-macros::QS_STR} .....................................................*/ +/*! Output formatted zero-terminated ASCII string to the QS record */ +#define QS_STR(str_) (QS_str_fmt_((str_))) + +/*${QS-macros::QS_MEM} .....................................................*/ +/*! Output formatted memory block of up to 255 bytes to the QS record */ +#define QS_MEM(mem_, size_) (QS_mem_fmt_((mem_), (size_))) + +/*${QS-macros::QS_TIME_PRE_} ...............................................*/ +#if (QS_TIME_SIZE == 4U) +/*! Output time stamp to a QS record (used in predefined +* and application-specific trace records) +*/ +#define QS_TIME_PRE_() (QS_u32_raw_(QS_onGetTime())) +#endif /* (QS_TIME_SIZE == 4U) */ + +/*${QS-macros::QS_TIME_PRE_} ...............................................*/ +#if (QS_TIME_SIZE == 2U) +#define QS_TIME_PRE_() (QS_u16_raw_(QS_onGetTime())) +#endif /* (QS_TIME_SIZE == 2U) */ + +/*${QS-macros::QS_TIME_PRE_} ...............................................*/ +#if (QS_TIME_SIZE == 1U) +#define QS_TIME_PRE_() (QS_u8_raw_(QS_onGetTime())) +#endif /* (QS_TIME_SIZE == 1U) */ + +/*${QS-macros::QS_OBJ} .....................................................*/ +#if (QS_OBJ_PTR_SIZE == 4U) +/*! Output formatted object pointer to the QS record */ +#define QS_OBJ(obj_) (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_))) +#endif /* (QS_OBJ_PTR_SIZE == 4U) */ + +/*${QS-macros::QS_OBJ} .....................................................*/ +#if (QS_OBJ_PTR_SIZE == 2U) +#define QS_OBJ(obj_) (QS_u16_fmt_(QS_OBJ_T, (uint16_t)(obj_))) +#endif /* (QS_OBJ_PTR_SIZE == 2U) */ + +/*${QS-macros::QS_OBJ} .....................................................*/ +#if (QS_OBJ_PTR_SIZE == 1U) +#define QS_OBJ(obj_) (QS_u8_fmt_(QS_OBJ_T, (uint8_t)(obj_))) +#endif /* (QS_OBJ_PTR_SIZE == 1U) */ + +/*${QS-macros::QS_OBJ} .....................................................*/ +#if (QS_OBJ_PTR_SIZE == 8U) +#define QS_OBJ(obj_) (QS_u64_fmt_(QS_OBJ_T, (uint64_t)(obj_))) +#endif /* (QS_OBJ_PTR_SIZE == 8U) */ + +/*${QS-macros::QS_FUN} .....................................................*/ +#if (QS_FUN_PTR_SIZE == 4U) +/* Output formatted function pointer to the QS record */ +#define QS_FUN(fun_) (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_))) +#endif /* (QS_FUN_PTR_SIZE == 4U) */ + +/*${QS-macros::QS_FUN} .....................................................*/ +#if (QS_FUN_PTR_SIZE == 2U) +#define QS_FUN(fun_) (QS_u16_fmt_(QS_FUN_T, (uint16_t)(fun_))) +#endif /* (QS_FUN_PTR_SIZE == 2U) */ + +/*${QS-macros::QS_FUN} .....................................................*/ +#if (QS_FUN_PTR_SIZE == 1U) +#define QS_FUN(fun_) (QS_u8_fmt_(QS_FUN_T, (uint8_t)(fun_))) +#endif /* (QS_FUN_PTR_SIZE == 1U) */ + +/*${QS-macros::QS_FUN} .....................................................*/ +#if (QS_FUN_PTR_SIZE == 8U) +#define QS_FUN(fun_) (QS_u64_fmt_(QS_FUN_T, (uint64_t)(fun_))) +#endif /* (QS_FUN_PTR_SIZE == 8U) */ + +/*${QS-macros::QS_SIG} .....................................................*/ +#if (Q_SIGNAL_SIZE == 4U) +/*! Output formatted event signal (of type ::QSignal) and +* the state machine object to the user QS record +*/ +#define QS_SIG(sig_, obj_) \ + QS_u32_fmt_(QS_SIG_T, (sig_)); \ + QS_obj_raw_(obj_) +#endif /* (Q_SIGNAL_SIZE == 4U) */ + +/*${QS-macros::QS_SIG} .....................................................*/ +#if (Q_SIGNAL_SIZE == 2U) +#define QS_SIG(sig_, obj_) \ + QS_u16_fmt_(QS_SIG_T, (sig_)); \ + QS_obj_raw_(obj_) +#endif /* (Q_SIGNAL_SIZE == 2U) */ + +/*${QS-macros::QS_SIG} .....................................................*/ +#if (Q_SIGNAL_SIZE == 1U) +#define QS_SIG(sig_, obj_) \ + QS_u8_fmt_(QS_SIG_T, (sig_)); \ + QS_obj_raw_(obj_) +#endif /* (Q_SIGNAL_SIZE == 1U) */ + +/*${QS-macros::QS_SIG_DICTIONARY} ..........................................*/ +/*! Output signal dictionary record +* +* @details +* A signal dictionary record associates the numerical value of the signal +* and the binary address of the state machine that consumes that signal +* with the human-readable name of the signal. +* +* Providing a signal dictionary QS record can vastly improve readability of +* the QS log, because instead of dealing with cryptic machine addresses the +* QSpy host utility can display human-readable names. +* +* A signal dictionary entry is associated with both the signal value `sig_` +* and the state machine `obj_`, because signals are required to be unique +* only within a given state machine and therefore the same numerical values +* can represent different signals in different state machines. +* +* For the "global" signals that have the same meaning in all state machines +* (such as globally published signals), you can specify a signal dictionary +* entry with the `obj_` parameter set to NULL. +* +* The following example shows the definition of signal dictionary entries +* in the initial transition of the Table active object. Please note that +* signals HUNGRY_SIG and DONE_SIG are associated with the Table state +* machine only ("me" `obj_` pointer). The EAT_SIG signal, on the other +* hand, is global (0 `obj_` pointer): +* @include qs_sigDic.c +* +* @note The QSpy log utility must capture the signal dictionary record +* in order to use the human-readable information. You need to connect to +* the target before the dictionary entries have been transmitted. +* +* The following QSpy log example shows the signal dictionary records +* generated from the Table initial transition and subsequent records that +* show human-readable names of the signals: +* @include qs_sigLog.txt +* +* The following QSpy log example shows the same sequence of records, but +* with dictionary records removed. The human-readable signal names are not +* available. +*/ +#define QS_SIG_DICTIONARY(sig_, obj_) \ + (QS_sig_dict_pre_((sig_), (obj_), #sig_)) + +/*${QS-macros::QS_OBJ_DICTIONARY} ..........................................*/ +/*! Output object dictionary record +* +* @details +* An object dictionary record associates the binary address of an object +* in the target's memory with the human-readable name of the object. +* +* Providing an object dictionary QS record can vastly improve readability of +* the QS log, because instead of dealing with cryptic machine addresses the +* QSpy host utility can display human-readable object names. +* +* The following example shows the definition of object dictionary entry +* for the Table active object: +* @include qs_objDic.c +*/ +#define QS_OBJ_DICTIONARY(obj_) \ + (QS_obj_dict_pre_((obj_), #obj_)) + +/*${QS-macros::QS_OBJ_ARR_DICTIONARY} ......................................*/ +/*! Output object-array dictionary record +* +* @details +* An object array dictionary record associates the binary address of the +* object element in the target's memory with the human-readable name +* of the object. +* +* Providing a dictionary QS record can vastly improve readability of +* the QS log, because instead of dealing with cryptic machine addresses the +* QSpy host utility can display human-readable object names. +* +* The following example shows the definition of object array dictionary +* for `Philo::inst[n]` and `Philo::inst[n].m_timeEvt`: +* @include qs_objDic.c +*/ +#define QS_OBJ_ARR_DICTIONARY(obj_, idx_) \ + (QS_obj_arr_dict_pre_((obj_), (idx_), #obj_)) + +/*${QS-macros::QS_FUN_DICTIONARY} ..........................................*/ +/*! Output function dictionary record +* +* @details +* A function dictionary record associates the binary address of a function +* in the target's memory with the human-readable name of the function. +* +* Providing a function dictionary QS record can vastly improve readability +* of the QS log, because instead of dealing with cryptic machine addresses +* the QSpy host utility can display human-readable function names. +* +* The example from #QS_SIG_DICTIONARY shows the definition of a function +* dictionary. +*/ +#define QS_FUN_DICTIONARY(fun_) \ + (QS_fun_dict_pre_((void (*)(void))(fun_), #fun_)) + +/*${QS-macros::QS_USR_DICTIONARY} ..........................................*/ +/*! Output user QS record dictionary record +* +* @details +* A user QS record dictionary record associates the numerical value of a +* user record with the human-readable identifier. +*/ +#define QS_USR_DICTIONARY(rec_) \ + (QS_usr_dict_pre_((rec_), #rec_)) + +/*${QS-macros::QF_QS_CRIT_ENTRY} ...........................................*/ +/*! Output the critical section entry record */ +void QF_QS_CRIT_ENTRY(void); + +/*${QS-macros::QF_QS_CRIT_EXIT} ............................................*/ +/*! Output the critical section exit record */ +void QF_QS_CRIT_EXIT(void); + +/*${QS-macros::QF_QS_ISR_ENTRY} ............................................*/ +/*! Output the interrupt entry record */ +void QF_QS_ISR_ENTRY( + uint_fast8_t const isrnest, + uint_fast8_t const prio_); + +/*${QS-macros::QF_QS_ISR_EXIT} .............................................*/ +/*! Output the ISR exit +* @static @public @memberof QS +*/ +void QF_QS_ISR_EXIT( + uint_fast8_t isrnest, + uint_fast8_t prio); + +/*${QS-macros::QF_QS_ACTION} ...............................................*/ +/*! Execute an action that is only necessary for QS output */ +#define QF_QS_ACTION(act_) (act_) +/*$enddecl${QS-macros} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*==========================================================================*/ -/* Facilities for QS ciritical section */ +/* Facilities for QS critical section */ /* QS-specific critical section */ #ifdef QS_CRIT_ENTRY /* separate QS critical section defined? */ @@ -491,7 +1346,7 @@ QSTimeCtr QS_onGetTime(void); #ifndef QF_CRIT_STAT_TYPE /*! This is an internal macro for defining the critical section * status type. - * @description + * @details * The purpose of this macro is to enable writing the same code for the * case when critical section status type is defined and when it is not. * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro @@ -502,7 +1357,7 @@ QSTimeCtr QS_onGetTime(void); #define QS_CRIT_STAT_ /*! This is an internal macro for entering a critical section. - * @description + * @details * The purpose of this macro is to enable writing the same code for the * case when critical section status type is defined and when it is not. * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro @@ -513,7 +1368,7 @@ QSTimeCtr QS_onGetTime(void); #define QS_CRIT_E_() QF_CRIT_ENTRY(dummy) /*! This is an internal macro for exiting a critical section. - * @description + * @details * The purpose of this macro is to enable writing the same code for the * case when critical section status type is defined and when it is not. * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro @@ -534,548 +1389,213 @@ QSTimeCtr QS_onGetTime(void); #endif /* separate QS critical section not defined */ /*==========================================================================*/ -/* Macros to generate application-specific (user) QS records */ - -/*! Begin a QS user record without entering critical section. */ -#define QS_BEGIN_NOCRIT(rec_, qs_id_) \ - if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ - QS_beginRec_((uint_fast8_t)(rec_)); \ - QS_TIME_PRE_(); { - -/*! End a QS user record without exiting critical section. */ -#define QS_END_NOCRIT() } \ - QS_endRec_(); \ - } - -#ifndef QS_REC_DONE - /*! macro to hook up user code when a QS record is produced */ - #define QS_REC_DONE() ((void)0) -#endif /* QS_REC_DONE */ - -/*! helper macro for checking the global QS filter */ -#define QS_GLB_CHECK_(rec_) \ - (((uint_fast8_t)QS_priv_.glbFilter[(uint_fast8_t)(rec_) >> 3U] \ - & ((uint_fast8_t)1U << ((uint_fast8_t)(rec_) & 7U))) != 0U) - -/*! helper macro for checking the local QS filter */ -#define QS_LOC_CHECK_(qs_id_) \ - (((uint_fast8_t)QS_priv_.locFilter[(uint_fast8_t)(qs_id_) >> 3U] \ - & ((uint_fast8_t)1U << ((uint_fast8_t)(qs_id_) & 7U))) != 0U) - -/*! Begin an application-specific (user) QS record with object-id - * for the local filter. -* @usage -* The following example shows how to build a user QS record using the -* macros QS_BEGIN_ID(), QS_END(), and the formatted output macros: -* QS_U8(), QS_STR(), etc.. -* @include qs_ap.c -* @note Must always be used in pair with QS_END() -*/ -#define QS_BEGIN_ID(rec_, qs_id_) \ - if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ - QS_CRIT_STAT_ \ - QS_CRIT_E_(); \ - QS_beginRec_((uint_fast8_t)(rec_)); \ - QS_TIME_PRE_(); { - -/*! End a QS record with exiting critical section. -* @sa example for QS_BEGIN_ID() -* @note Must always be used in pair with QS_BEGIN_ID() -*/ -#define QS_END() } \ - QS_endRec_(); \ - QS_CRIT_X_(); \ - } - -/*! formats for application-specific data elements -* @description -* QS uses this enumeration is used only internally for the formatted user -* data elements. -*/ -enum { - QS_I8_T, /*!< signed 8-bit integer format */ - QS_U8_T, /*!< unsigned 8-bit integer format */ - QS_I16_T, /*!< signed 16-bit integer format */ - QS_U16_T, /*!< unsigned 16-bit integer format */ - QS_I32_T, /*!< signed 32-bit integer format */ - QS_U32_T, /*!< unsigned 32-bit integer format */ - QS_F32_T, /*!< 32-bit floating point format */ - QS_F64_T, /*!< 64-bit floating point format */ - QS_STR_T, /*!< zero-terminated ASCII string format */ - QS_MEM_T, /*!< up to 255-bytes memory block format */ - QS_SIG_T, /*!< event signal format */ - QS_OBJ_T, /*!< object pointer format */ - QS_FUN_T, /*!< function pointer format */ - QS_I64_T, /*!< signed 64-bit integer format */ - QS_U64_T, /*!< unsigned 64-bit integer format */ - QS_HEX_FMT /*!< HEX format for the "width" filed */ -}; - -/*! Output formatted int8_t to the QS record */ -#define QS_I8(width_, data_) \ - (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I8_T, (data_))) - -/*! Output formatted uint8_t to the QS record */ -#define QS_U8(width_, data_) \ - (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_))) - -/*! Output formatted int16_t to the QS record */ -#define QS_I16(width_, data_) \ - (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_))) - -/*! Output formatted uint16_t to the QS record */ -#define QS_U16(width_, data_) \ - (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_))) - -/*! Output formatted int32_t to the QS record */ -#define QS_I32(width_, data_) \ - (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_))) - -/*! Output formatted uint32_t to the QS record */ -#define QS_U32(width_, data_) \ - (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_))) - -/*! Output formatted 32-bit floating point number to the QS record */ -#define QS_F32(width_, data_) \ - (QS_f32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_))) - -/*! Output formatted 64-bit floating point number to the QS record */ -#define QS_F64(width_, data_) \ - (QS_f64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_))) - -/*! Output formatted int64_t to the QS record */ -#define QS_I64(width_, data_) \ - (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_))) - -/*! Output formatted uint64_t to the QS record */ -#define QS_U64(width_, data_) \ - (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_))) - -/*! Output formatted zero-terminated ASCII string to the QS record */ -#define QS_STR(str_) (QS_str_fmt_((str_))) - -/*! Output formatted memory block of up to 255 bytes to the QS record */ -#define QS_MEM(mem_, size_) (QS_mem_fmt_((mem_), (size_))) - - -#if (!defined QS_OBJ_PTR_SIZE || (QS_OBJ_PTR_SIZE == 1U)) - #define QS_OBJ(obj_) (QS_u8_fmt_(QS_OBJ_T, (uint8_t)(obj_))) -#elif (QS_OBJ_PTR_SIZE == 2U) - #define QS_OBJ(obj_) (QS_u16_fmt_(QS_OBJ_T, (uint16_t)(obj_))) -#elif (QS_OBJ_PTR_SIZE == 4U) - #define QS_OBJ(obj_) (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_))) -#elif (QS_OBJ_PTR_SIZE == 8U) - #define QS_OBJ(obj_) (QS_u64_fmt_(QS_OBJ_T, (uint64_t)(obj_))) -#else - /*! Output formatted object pointer to the QS record */ - #define QS_OBJ(obj_) (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_))) -#endif - - -#if (!defined QS_FUN_PTR_SIZE || (QS_FUN_PTR_SIZE == 1U)) - #define QS_FUN(fun_) (QS_u8_fmt_(QS_FUN_T, (uint8_t)(fun_))) -#elif (QS_FUN_PTR_SIZE == 2U) - #define QS_FUN(fun_) (QS_u16_fmt_(QS_FUN_T, (uint16_t)(fun_))) -#elif (QS_FUN_PTR_SIZE == 4U) - #define QS_FUN(fun_) (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_))) -#elif (QS_FUN_PTR_SIZE == 8U) - #define QS_FUN(fun_) (QS_u64_fmt_(QS_FUN_T, (uint64_t)(fun_))) -#else - /*! Output formatted function pointer to the QS record */ - #define QS_FUN(fun_) (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_))) -#endif - -#if (!defined Q_SIGNAL_SIZE || (Q_SIGNAL_SIZE == 1U)) - - #define QS_SIG(sig_, obj_) \ - QS_u8_fmt_(QS_SIG_T, (sig_)); \ - QS_obj_raw_(obj_) - -#elif (Q_SIGNAL_SIZE == 2U) - - #define QS_SIG(sig_, obj_) \ - QS_u16_fmt_(QS_SIG_T, (sig_)); \ - QS_obj_raw_(obj_) - -#elif (Q_SIGNAL_SIZE == 4U) - - #define QS_SIG(sig_, obj_) \ - QS_u32_fmt_(QS_SIG_T, (sig_)); \ - QS_obj_raw_(obj_) - -#else - /*! Output formatted event signal (of type ::QSignal) and - * the state machine object to the user QS record - */ - #define QS_SIG(sig_, obj_) \ - QS_u16_fmt_(QS_SIG_T, (sig_)); \ - QS_obj_raw_(obj_) - -#endif - -/*==========================================================================*/ -/* Dictionary trace records */ - -/*! Output signal dictionary record -* @description -* A signal dictionary record associates the numerical value of the signal -* and the binary address of the state machine that consumes that signal -* with the human-readable name of the signal. -* -* Providing a signal dictionary QS record can vastly improve readability of -* the QS log, because instead of dealing with cryptic machine addresses the -* QSpy host utility can display human-readable names. -* -* A signal dictionary entry is associated with both the signal value @p sig_ -* and the state machine @p obj_, because signals are required to be unique -* only within a given state machine and therefore the same numerical values -* can represent different signals in different state machines. -* -* For the "global" signals that have the same meaning in all state machines -* (such as globally published signals), you can specify a signal dictionary -* entry with the @p obj_ parameter set to NULL. -* -* The following example shows the definition of signal dictionary entries -* in the initial transition of the Table active object. Please note that -* signals HUNGRY_SIG and DONE_SIG are associated with the Table state machine -* only ("me" @p obj_ pointer). The EAT_SIG signal, on the other hand, -* is global (0 @p obj_ pointer): -* @include qs_sigDic.c -* -* @note The QSpy log utility must capture the signal dictionary record -* in order to use the human-readable information. You need to connect to -* the target before the dictionary entries have been transmitted. -* -* The following QSpy log example shows the signal dictionary records -* generated from the Table initial transition and subsequent records that -* show human-readable names of the signals: -* @include qs_sigLog.txt -* -* The following QSpy log example shows the same sequence of records, but -* with dictionary records removed. The human-readable signal names are not -* available. -* @include qs_sigLog0.txt -*/ -#define QS_SIG_DICTIONARY(sig_, obj_) \ - (QS_sig_dict_pre_((sig_), (obj_), #sig_)) - -/*! Output object dictionary record -* @description -* An object dictionary record associates the binary address of an object -* in the target's memory with the human-readable name of the object. -* -* Providing a dictionary QS record can vastly improve readability of -* the QS log, because instead of dealing with cryptic machine addresses the -* QSpy host utility can display human-readable object names. -* -* The following example shows the definition of object dictionary entry -* for the Table active object: -* @include qs_objDic.c -*/ -#define QS_OBJ_DICTIONARY(obj_) \ - (QS_obj_dict_pre_((obj_), #obj_)) - -/*! Output object-array dictionary record -* @description -* An object array dictionary record associates the binary address of the -* object element in the target's memory with the human-readable name -* of the object. -* -* Providing a dictionary QS record can vastly improve readability of -* the QS log, because instead of dealing with cryptic machine addresses the -* QSpy host utility can display human-readable object names. -* -* The following example shows the definition of object dictionary entry -* for the Table active object: -* @include qs_objDic.c -*/ -#define QS_OBJ_ARR_DICTIONARY(obj_, idx_) \ - (QS_obj_arr_dict_pre_((obj_), (idx_), #obj_)) - -/*! Output function dictionary record -* @description -* A function dictionary record associates the binary address of a function -* in the target's memory with the human-readable name of the function. -* -* Providing a function dictionary QS record can vastly improve readability of -* the QS log, because instead of dealing with cryptic machine addresses the -* QSpy host utility can display human-readable function names. -* -* The example from QS_SIG_DICTIONARY() shows the definition of a function -* dictionary. -*/ -#define QS_FUN_DICTIONARY(fun_) \ - (QS_fun_dict_pre_((void (*)(void))(fun_), #fun_)) - -/*! Output user QS-record dictionary record -* @description -* A user QS-record dictionary record associates the numerical value of a -* user record with the human-readable identifier. -*/ -#define QS_USR_DICTIONARY(rec_) \ - (QS_usr_dict_pre_((rec_), #rec_)) - -/*! Output predefined signal-dictionary record -* @static @private @memberof QS -*/ -void QS_sig_dict_pre_(enum_t const sig, void const * const obj, - char const *name); - -/*! Output predefined object-dictionary record -* @static @private @memberof QS -*/ -void QS_obj_dict_pre_(void const * const obj, - char const *name); - -/*! Output predefined object-array dictionary record -* @static @private @memberof QS -*/ -void QS_obj_arr_dict_pre_(void const * const obj, - uint_fast16_t idx, - char const *name); - -/*! Output predefined function-dictionary record -* @static @private @memberof QS -*/ -void QS_fun_dict_pre_(void (* const fun)(void), - char const *name); - -/*! Output predefined user-dictionary record -* @static @private @memberof QS -*/ -void QS_usr_dict_pre_(enum_t const rec, - char const * const name); - -/*==========================================================================*/ -/* Miscellaneous pre-formatted trace records used in applications */ - -/*! Output the assertion failure trace record -* @description -* This trace record is intended to use from the Q_onAssert() callback. -*/ -void QS_ASSERTION(char const * const module, - int_t const loc, - uint32_t delay); - -/*! Output the critical section entry -* @static @private @memberof QS -*/ -void QF_QS_CRIT_ENTRY(void); - -/*! Output the critical section exit -* @static @private @memberof QS -*/ -void QF_QS_CRIT_EXIT(void); - -/*! Output the interrupt entry record -* @static @private @memberof QS -*/ -void QF_QS_ISR_ENTRY(uint8_t const isrnest, uint8_t const prio); - -/*! Output the interrupt exit record -* @static @private @memberof QS -*/ -void QF_QS_ISR_EXIT(uint8_t const isrnest, uint8_t const prio); - -/*! Execute an action that is only necessary for QS output */ -#define QF_QS_ACTION(act_) (act_) - -/*==========================================================================*/ -/* QS private data (the TX channel) */ -typedef uint_fast16_t QSCtr; /*!< QS ring buffer counter and offset type */ - -/*! Kinds of objects used in QS. */ -enum QSpyObjKind { - SM_OBJ, /*!< state machine object */ - AO_OBJ, /*!< active object */ - MP_OBJ, /*!< event pool object */ - EQ_OBJ, /*!< raw queue object */ - TE_OBJ, /*!< time event object */ - AP_OBJ, /*!< generic Application-specific object */ - MAX_OBJ -}; - -enum OSpyObjCombnation { - SM_AO_OBJ = (enum_t)MAX_OBJ /*!< combination of SM and AO */ -}; - -/*! Private QS attributes to keep track of the filters and the trace buffer */ -typedef struct { - uint8_t glbFilter[16]; /*!< global on/off QS filter */ - uint8_t locFilter[16]; /*!< local QS filters */ - void const *locFilter_AP; /*!< deprecated local QS filter */ - uint8_t *buf; /*!< pointer to the start of the ring buffer */ - QSCtr end; /*!< offset of the end of the ring buffer */ - QSCtr volatile head; /*!< offset to where next byte will be inserted */ - QSCtr volatile tail; /*!< offset of where next byte will be extracted */ - QSCtr volatile used; /*!< number of bytes currently in the ring buffer */ - uint8_t volatile seq; /*!< the record sequence number */ - uint8_t volatile chksum; /*!< the checksum of the current record */ - - uint8_t volatile critNest; /*!< critical section nesting level */ -} QSPrivAttr; - -extern QSPrivAttr QS_priv_; - -/*==========================================================================*/ -/* QS receive channel */ - -/*! Initialize the QS RX data buffer. -* @static @public @memberof QS -*/ -void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize); - -/*! Parse all bytes present in the QS RX data buffer -* @static @public @memberof QS -*/ -void QS_rxParse(void); - -/*! Put one byte into the QS RX lock-free buffer -* @static @public @memberof QS -*/ -bool QS_RX_PUT(uint8_t const b); - -/*! Obtain the number of free bytes in the QS RX data buffer -* @static @public @memberof QS -*/ -uint16_t QS_rxGetNfree(void); - -/*! Set the "current object" in the Target -* @static @public @memberof QS -*/ -void QS_setCurrObj(uint8_t obj_kind, void *obj_ptr); - -/*! Query the "current object" in the Target -* @static @public @memberof QS -*/ -void QS_queryCurrObj(uint8_t obj_kind); - -/*! Callback function to reset the Target (to be implemented in the BSP) -* @static @public @memberof QS -*/ -void QS_onReset(void); - -/*! Callback function to execute user commands (to be implemented in BSP) -* @static @public @memberof QS -*/ -void QS_onCommand(uint8_t cmdId, uint32_t param1, - uint32_t param2, uint32_t param3); - -/*! Macro to handle the QS output from the application -* NOTE: if this macro is used, the application must define QS_output(). -*/ -#define QS_OUTPUT() (QS_output()) - -/*! Macro to handle the QS-RX input to the application -* NOTE: if this macro is used, the application must define QS_rx_input(). -*/ -#define QS_RX_INPUT() (QS_rx_input()) - -/*==========================================================================*/ -/* Facilities for use in QUTest only */ +/* Macros for use in QUTest only */ #ifdef Q_UTEST - /*! callback to setup a unit test inside the Target */ - void QS_onTestSetup(void); - /*! callback to teardown after a unit test inside the Target - * @static @public @memberof QS - */ - void QS_onTestTeardown(void); +/*$declare${QUTest} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ - /*! callback to run the test loop - * @static @public @memberof QS - */ - void QS_onTestLoop(void); +/*${QUTest::QS::TProbe} ....................................................*/ +/*! @brief Test Probe attributes */ +struct QS_TProbe { + QSFun addr; + uint32_t data; + uint8_t idx; +}; - /*! callback to "massage" the test event before dispatching/posting it - * @static @public @memberof QS - */ - void QS_onTestEvt(QEvt *e); +/*${QUTest::QS::TestData} ..................................................*/ +/*! @brief QUTest data */ +struct QS_TestData { + struct QS_TProbe tpBuf[16]; /*!< buffer of Test-Probes received so far */ + uint8_t tpNum; /*!< current number of Test-Probes */ + QSTimeCtr testTime; /*!< test time (tick counter) */ +}; - /*! callback to examine an event that is about to be posted - * @static @public @memberof QS - */ - void QS_onTestPost(void const *sender, QActive *recipient, - QEvt const *e, bool status); +/*${QUTest::QS::testData} ..................................................*/ +/*! QUTest data */ +extern struct QS_TestData QS_testData; - /*! QS internal function to process posted events during test - * @static @public @memberof QS - */ - void QS_processTestEvts_(void); +/*${QUTest::QS::processTestEvts_} ..........................................*/ +/*! internal function to process posted events during test +* @static @private @memberof QS +*/ +void QS_processTestEvts_(void); - /*! internal function to process armed time events during test - * @static @public @memberof QS - */ - void QS_tickX_(uint_fast8_t const tickRate, void const * const sender); +/*${QUTest::QS::test_pause_} ...............................................*/ +/*! internal function to pause test and enter the test event loop +* @static @private @memberof QS +*/ +void QS_test_pause_(void); - /*! QS internal function to get the Test-Probe for a given API - * @static @public @memberof QS - */ - uint32_t QS_getTestProbe_(void (* const api)(void)); +/*${QUTest::QS::getTestProbe_} .............................................*/ +/*! get the test probe data for the given API +* @static @private @memberof QS +*/ +uint32_t QS_getTestProbe_(QSpyFunPtr api); - /*! QS macro to define the Test-Probe for a given @p fun_ */ - #define QS_TEST_PROBE_DEF(fun_) \ - uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_)); +/*${QUTest::QS::onTestSetup} ...............................................*/ +/*! callback to setup a unit test inside the Target +* @static @public @memberof QS +*/ +void QS_onTestSetup(void); - /*! QS macro to apply a Test-Probe */ - #define QS_TEST_PROBE(code_) \ - if (qs_tp_ != 0U) { code_ } +/*${QUTest::QS::onTestTeardown} ............................................*/ +/*! callback to teardown after a unit test inside the Target +* @static @public @memberof QS +*/ +void QS_onTestTeardown(void); - /*! QS macro to apply a Test-Probe */ - #define QS_TEST_PROBE_ID(id_, code_) \ - if (qs_tp_ == (uint32_t)(id_)) { code_ } +/*${QUTest::QS::onTestEvt} .................................................*/ +/*! callback to "massage" the test event before dispatching/posting it +* @static @public @memberof QS +*/ +void QS_onTestEvt(QEvt * e); - /*! QS macro to pause test execution and enter the test event loop */ - #define QS_TEST_PAUSE() (QS_test_pause_()) +/*${QUTest::QS::onTestPost} ................................................*/ +/*! callback to examine an event that is about to be posted +* @static @public @memberof QS +*/ +void QS_onTestPost( + void const * sender, + QActive * recipient, + QEvt const * e, + bool status); - /*! QS internal function to pause test and enter the test event loop - * @static @private @memberof QS - */ - void QS_test_pause_(void); +/*${QUTest::QS::onTestLoop} ................................................*/ +/*! callback to run the test loop +* @static @public @memberof QS +*/ +void QS_onTestLoop(void); - enum QUTestUserRecords { - QUTEST_ON_POST = 124 - }; +/*${QUTest::QHsmDummy} .....................................................*/ +/*! @brief QHsmDummy class +* @class QHsmDummy +* @extends QHsm +* +* @details +* ::QHsmDummy is a test double for the role of "Orthogonal Components" +* HSM objects in QUTest unit testing. +*/ +typedef struct { +/* protected: */ + QHsm super; +} QHsmDummy; - /* interrupt nesting up-down counter */ - extern uint8_t volatile QF_intNest; +/* public: */ - /*! QHsmDummy class - * @description - * QHsmDummy is a test double for the role of "Orthogonal Components" - * HSM objects in QUTest unit testing. - */ - typedef struct { - QHsm super; /*< inherit QHsm */ - } QHsmDummy; +/*! Constructor of the QHsmDummy HSM class +* @public @memberof QHsmDummy +*/ +void QHsmDummy_ctor(QHsmDummy * const me); - /*! Constructor of the QHsmDummy HSM class - * @public @memberof QHsmDummy - */ - void QHsmDummy_ctor(QHsmDummy * const me); +/*! override for QHsm_init_() +* @private @memberof QHsmDummy +*/ +void QHsmDummy_init_( + QHsm * const me, + void const * const par, + uint_fast8_t const qs_id); - /*! QActiveDummy Object class - * @description - * QActiveDummy is a test double for the role of collaborating active - * objects in QUTest unit testing. - */ - typedef struct { - QActive super; /*< inherit QActive */ - } QActiveDummy; +/*! override for QHsm_dispatch_() +* @private @memberof QHsmDummy +*/ +void QHsmDummy_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id); - /*! Constructor of the QActiveDummy Active Object class - * @public @memberof QActiveDummy - */ - void QActiveDummy_ctor(QActiveDummy * const me); +/*${QUTest::QActiveDummy} ..................................................*/ +/*! @brief QActiveDummy Object class +* @class QActiveDummy +* @extends QActive +* +* @details +* QActiveDummy is a test double for the role of collaborating active +* objects in QUTest unit testing. +*/ +typedef struct { +/* protected: */ + QActive super; +} QActiveDummy; + +/* public: */ + +/*! Constructor of the QActiveDummy Active Object class +* @public @memberof QActiveDummy +*/ +void QActiveDummy_ctor(QActiveDummy * const me); + +/*! override for QHsm_init_() +* @private @memberof QActiveDummy +*/ +void QActiveDummy_init_( + QHsm * const me, + void const * const par, + uint_fast8_t const qs_id); + +/*! override for QHsm_dispatch_() +* @private @memberof QActiveDummy +*/ +void QActiveDummy_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id); + +/*! override for QActive_start_() +* @private @memberof QActiveDummy +*/ +void QActiveDummy_start_( + QActive * const me, + uint_fast8_t const prio, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par); + +/*! override for QActive_post_() +* @private @memberof QActiveDummy +*/ +bool QActiveDummy_post_( + QActive * const me, + QEvt const * const e, + uint_fast16_t const margin, + void const * const sender); + +/*! override for QActive_postLIFO_() +* @private @memberof QActiveDummy +*/ +void QActiveDummy_postLIFO_( + QActive * const me, + QEvt const * const e); + +/*${QUTest::QUTEST_ON_POST} ................................................*/ +/*! record-ID for posting events */ +#define QUTEST_ON_POST 124 +/*$enddecl${QUTest} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*! QS macro to define the Test-Probe for a given @p fun_ */ +#define QS_TEST_PROBE_DEF(fun_) \ + uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_)); + +/*! QS macro to apply a Test-Probe */ +#define QS_TEST_PROBE(code_) \ + if (qs_tp_ != 0U) { code_ } + +/*! QS macro to apply a Test-Probe */ +#define QS_TEST_PROBE_ID(id_, code_) \ + if (qs_tp_ == (uint32_t)(id_)) { code_ } + +/*! QS macro to pause test execution and enter the test event loop */ +#define QS_TEST_PAUSE() (QS_test_pause_()) #else /* Q_UTEST not defined */ - /* dummy definitions when not building for QUTEST */ - #define QS_TEST_PROBE_DEF(fun_) - #define QS_TEST_PROBE(code_) - #define QS_TEST_PROBE_ID(id_, code_) - #define QS_TEST_PAUSE() ((void)0) +/* dummy definitions when not building for QUTEST */ +#define QS_TEST_PROBE_DEF(fun_) +#define QS_TEST_PROBE(code_) +#define QS_TEST_PROBE_ID(id_, code_) +#define QS_TEST_PAUSE() ((void)0) #endif /* Q_UTEST */ -#endif /* QS_H */ +#endif /* def QS_H */ diff --git a/include/qs_dummy.h b/include/qs_dummy.h index 0dbbd3bc..b21e7edb 100644 --- a/include/qs_dummy.h +++ b/include/qs_dummy.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qs_dummy.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qs_dummy.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,9 +32,10 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qs_dummy.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! * @date Last updated on: 2021-12-23 * @version Last updated for: @ref qpc_7_0_0 @@ -29,7 +43,6 @@ * @file * @brief Dummy definitions of the QS macros that avoid code generation from * the QS instrumentation. -* @ingroup qs qpspy */ #ifndef QS_DUMMY_H #define QS_DUMMY_H diff --git a/include/qs_pkg.h b/include/qs_pkg.h new file mode 100644 index 00000000..537491f4 --- /dev/null +++ b/include/qs_pkg.h @@ -0,0 +1,275 @@ +/*$file${include::qs_pkg.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qs_pkg.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +*/ +/*$endhead${include::qs_pkg.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*! +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief Internal (package scope) QS/C interface. +*/ +#ifndef QS_PKG_H +#define QS_PKG_H + +/*==========================================================================*/ + +/*! QS received record types (RX channel) +* @details +* This enumeration specifies the record types for the QS receive channel +*/ +enum QSpyRxRecords { + QS_RX_INFO, /*!< query Target info (ver, config, tstamp) */ + QS_RX_COMMAND, /*!< execute a user-defined command in the Target */ + QS_RX_RESET, /*!< reset the Target */ + QS_RX_TICK, /*!< call QTIMEEVT_TICK_X() in the Target */ + QS_RX_PEEK, /*!< peek Target memory */ + QS_RX_POKE, /*!< poke Target memory */ + QS_RX_FILL, /*!< fill Target memory */ + QS_RX_TEST_SETUP, /*!< test setup */ + QS_RX_TEST_TEARDOWN, /*!< test teardown */ + QS_RX_TEST_PROBE, /*!< set a Test-Probe in the Target */ + QS_RX_GLB_FILTER, /*!< set global filters in the Target */ + QS_RX_LOC_FILTER, /*!< set local filters in the Target */ + QS_RX_AO_FILTER, /*!< set local AO filter in the Target */ + QS_RX_CURR_OBJ, /*!< set the "current-object" in the Target */ + QS_RX_TEST_CONTINUE, /*!< continue a test after QS_TEST_PAUSE() */ + QS_RX_QUERY_CURR, /*!< query the "current object" in the Target */ + QS_RX_EVENT /*!< inject an event to the Target */ +}; + +/*==========================================================================*/ +/*! Frame character of the QS output protocol */ +#define QS_FRAME (0x7EU) + +/*! Escape character of the QS output protocol */ +#define QS_ESC (0x7DU) + +/*! The expected checksum value over a correct QS record */ +#define QS_GOOD_CHKSUM (0xFFU) + +/*! Escape modifier of the QS output protocol */ +/** +* @details +* The escaped byte is XOR-ed with the escape modifier before it is inserted +* into the QS buffer. +*/ +#define QS_ESC_XOR (0x20U) + +/*==========================================================================*/ +/*! Internal QS macro to begin a predefined QS record with +* entering critical section. +* +* @note This macro is intended to use only inside QP components and NOT +* at the application level. +* @sa QS_BEGIN_ID() +*/ +#define QS_BEGIN_PRE_(rec_, qs_id_) \ + if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ + QS_CRIT_E_(); \ + QS_beginRec_((uint_fast8_t)(rec_)); + +/*! Internal QS macro to end a predefined QS record with +* exiting critical section. +* +* @note This macro is intended to use only inside QP components and NOT +* at the application level. +* @sa QS_END() +*/ +#define QS_END_PRE_() \ + QS_endRec_(); \ + QS_CRIT_X_(); \ + } + +/*! Internal macro to begin a predefined QS record without +* entering critical section. +* +* @note This macro is intended to use only inside QP components and NOT +* at the application level. +* @sa QS_BEGIN_NOCRIT() +*/ +#define QS_BEGIN_NOCRIT_PRE_(rec_, qs_id_) \ + if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ + QS_beginRec_((uint_fast8_t)(rec_)); + +/*! Internal QS macro to end a predefined QS record without +* exiting critical section +* +* @note This macro is intended to use only inside QP components and NOT +* at the application level. @sa #QS_END_NOCRIT +*/ +#define QS_END_NOCRIT_PRE_() QS_endRec_(); } + +/*! Internal QS macro to output a predefined uint8_t data element */ +#define QS_U8_PRE_(data_) (QS_u8_raw_((uint8_t)(data_))) + +/*! Internal QS macro to output 2 predefined uint8_t data elements */ +#define QS_2U8_PRE_(data1_, data2_) \ + (QS_2u8_raw_((uint8_t)(data1_), (uint8_t)(data2_))) + +/*! Internal QS macro to output an predefined uint16_t data element */ +#define QS_U16_PRE_(data_) (QS_u16_raw_((uint16_t)(data_))) + +/*! Internal QS macro to output a predefined uint32_t data element */ +#define QS_U32_PRE_(data_) (QS_u32_raw_((uint32_t)(data_))) + +/*! Internal QS macro to output a predefined zero-terminated string element */ +#define QS_STR_PRE_(msg_) (QS_str_raw_((msg_))) + +#if (!defined Q_SIGNAL_SIZE || (Q_SIGNAL_SIZE == 1U)) + /*! Internal macro to output an unformatted event signal data element */ + /** + * @note the size of the pointer depends on the macro #Q_SIGNAL_SIZE. + */ + #define QS_SIG_PRE_(sig_) (QS_u8_raw_((uint8_t)sig_)) +#elif (Q_SIGNAL_SIZE == 2U) + #define QS_SIG_PRE_(sig_) (QS_u16_raw_((uint16_t)sig_)) +#elif (Q_SIGNAL_SIZE == 4U) + #define QS_SIG_PRE_(sig_) (QS_u32_raw_((uint32_t)sig_)) +#endif + +#define QS_OBJ_PRE_(obj_) (QS_obj_raw_(obj_)) + +#if (!defined QS_FUN_PTR_SIZE || (QS_FUN_PTR_SIZE == 1U)) + #define QS_FUN_PRE_(fun_) (QS_u8_raw_((uint8_t)(fun_))) +#elif (QS_FUN_PTR_SIZE == 2U) + #define QS_FUN_PRE_(fun_) (QS_u16_raw_((uint16_t)(fun_))) +#elif (QS_FUN_PTR_SIZE == 4U) + #define QS_FUN_PRE_(fun_) (QS_u32_raw_((uint32_t)(fun_))) +#elif (QS_FUN_PTR_SIZE == 8U) + #define QS_FUN_PRE_(fun_) (QS_u64_raw_((uint64_t)(fun_))) +#else + /*! Internal macro to output an unformatted function pointer */ + /** @note the size of the pointer depends on the macro #QS_FUN_PTR_SIZE. + * If the size is not defined the size of pointer is assumed 4-bytes. + */ + #define QS_FUN_PRE_(fun_) (QS_u32_raw_((uint32_t)(fun_))) +#endif + +/*==========================================================================*/ +#if (!defined QF_EQUEUE_CTR_SIZE || (QF_EQUEUE_CTR_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted event queue counter + * data element. */ + /** + * @note the counter size depends on the macro #QF_EQUEUE_CTR_SIZE. + */ + #define QS_EQC_PRE_(ctr_) QS_u8_raw_((uint8_t)(ctr_)) +#elif (QF_EQUEUE_CTR_SIZE == 2U) + #define QS_EQC_PRE_(ctr_) QS_u16_raw_((uint16_t)(ctr_)) +#elif (QF_EQUEUE_CTR_SIZE == 4U) + #define QS_EQC_PRE_(ctr_) QS_u32_raw_((uint32_t)(ctr_)) +#endif + +#if (!defined QF_EVENT_SIZ_SIZE || (QF_EVENT_SIZ_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted event size + * data element. */ + /** + * @note the event size depends on the macro #QF_EVENT_SIZ_SIZE. + */ + #define QS_EVS_PRE_(size_) QS_u8_raw_((uint8_t)(size_)) +#elif (QF_EVENT_SIZ_SIZE == 2U) + #define QS_EVS_PRE_(size_) QS_u16_raw_((uint16_t)(size_)) +#elif (QF_EVENT_SIZ_SIZE == 4U) + #define QS_EVS_PRE_(size_) QS_u32_raw_((uint32_t)(size_)) +#endif + +#if (!defined QF_MPOOL_SIZ_SIZE || (QF_MPOOL_SIZ_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted memory pool + * block-size data element */ + /** + * @note the block-size depends on the macro #QF_MPOOL_SIZ_SIZE. + */ + #define QS_MPS_PRE_(size_) QS_u8_raw_((uint8_t)(size_)) +#elif (QF_MPOOL_SIZ_SIZE == 2U) + #define QS_MPS_PRE_(size_) QS_u16_raw_((uint16_t)(size_)) +#elif (QF_MPOOL_SIZ_SIZE == 4U) + #define QS_MPS_PRE_(size_) QS_u32_raw_((uint32_t)(size_)) +#endif + +#if (!defined QF_MPOOL_CTR_SIZE || (QF_MPOOL_CTR_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted memory pool + * block-counter data element. */ + /** + * @note the counter size depends on the macro #QF_MPOOL_CTR_SIZE. + */ + #define QS_MPC_PRE_(ctr_) QS_u8_raw_((uint8_t)(ctr_)) +#elif (QF_MPOOL_CTR_SIZE == 2U) + #define QS_MPC_PRE_(ctr_) QS_u16_raw_((uint16_t)(ctr_)) +#elif (QF_MPOOL_CTR_SIZE == 4U) + #define QS_MPC_PRE_(ctr_) QS_u32_raw_((uint16_t)(ctr_)) +#endif + +#if (!defined QF_TIMEEVT_CTR_SIZE || (QF_TIMEEVT_CTR_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted time event + * tick-counter data element */ + /** + * @note the counter size depends on the macro #QF_TIMEEVT_CTR_SIZE. + */ + #define QS_TEC_PRE_(ctr_) QS_u8_raw_((uint8_t)(ctr_)) +#elif (QF_TIMEEVT_CTR_SIZE == 2U) + #define QS_TEC_PRE_(ctr_) QS_u16_raw_((uint16_t)(ctr_)) +#elif (QF_TIMEEVT_CTR_SIZE == 4U) + #define QS_TEC_PRE_(ctr_) QS_u32_raw_((uint32_t)(ctr_)) +#endif + +/*==========================================================================*/ +/*! Internal QS macro to insert an un-escaped byte into the QS buffer */ +#define QS_INSERT_BYTE_(b_) \ + buf[head] = (b_); \ + ++head; \ + if (head == end) { \ + head = 0U; \ + } + +/*! Internal QS macro to insert an escaped byte into the QS buffer */ +#define QS_INSERT_ESC_BYTE_(b_) \ + chksum = (uint8_t)(chksum + (b_)); \ + if (((b_) != QS_FRAME) && ((b_) != QS_ESC)) { \ + QS_INSERT_BYTE_(b_) \ + } \ + else { \ + QS_INSERT_BYTE_(QS_ESC) \ + QS_INSERT_BYTE_((uint8_t)((b_) ^ QS_ESC_XOR))\ + ++QS_priv_.used; \ + } + +#endif /* QS_PKG_H */ diff --git a/include/qstamp.c b/include/qstamp.c index 0f415a3b..94a49df2 100644 --- a/include/qstamp.c +++ b/include/qstamp.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qstamp.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qstamp.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,22 +32,22 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qstamp.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! * @date Last updated on: 2021-12-23 * @version Last updated for: @ref qpc_7_0_0 * * @file * @brief Application build time-stamp -* @description +* @details * This module needs to be re-compiled in every new software build. To achive * this, it is recommended to delete the object file (qstamp.o, or qstamp.obj) * in the build directory before each build. (Most development tools allow * you to specify a pre-build command, which is the ideal place to delete * the qstamp object file.) -* @ingroup qs */ #include "qstamp.h" diff --git a/include/qstamp.h b/include/qstamp.h index 0ae496d7..f80cc09a 100644 --- a/include/qstamp.h +++ b/include/qstamp.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qstamp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qstamp.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qstamp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! * @date Last updated on: 2021-12-23 * @version Last updated for: @ref qpc_7_0_0 * * @file * @brief Application build time-stamp interface -* @ingroup qs */ #ifndef QSTAMP_H #define QSTAMP_H diff --git a/include/qv.h b/include/qv.h index 379e5de3..f77331f7 100644 --- a/include/qv.h +++ b/include/qv.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qv.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qv.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,82 +32,115 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qv.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QV/C (cooperative "Vanilla" kernel) platform-independent * public interface -* @ingroup qv */ #ifndef QV_H #define QV_H -#include "qequeue.h" /* QV kernel uses the native QP event queue */ -#include "qmpool.h" /* QV kernel uses the native QP memory pool */ -#include "qpset.h" /* QV kernel uses the native QP priority set */ +/*==========================================================================*/ +/* QF customization for QV -- data members of the QActive class... */ /* QV event-queue used for AOs */ -#define QF_EQUEUE_TYPE QEQueue +#define QF_EQUEUE_TYPE QEQueue +/*==========================================================================*/ +#include "qequeue.h" /* QV kernel uses the native QP event queue */ +#include "qmpool.h" /* QV kernel uses the native QP memory pool */ +#include "qf.h" /* QF framework integrates directly with QV */ + +//============================================================================ +/*$declare${QV::QV-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QV::QV-base::Attr} .....................................................*/ +/*! @brief QV cooperative kernel +* @class QV +*/ +typedef struct QV_Attr { + uint8_t dummy; /*< dummy attribute */ +} QV; + +/*${QV::QV-base::onIdle} ...................................................*/ /*! QV idle callback (customized in BSPs) -* @description +* @static @public @memberof QV +* +* @details * QV_onIdle() is called by the cooperative QV kernel (from QF_run()) when * the scheduler detects that no events are available for active objects * (the idle condition). This callback gives the application an opportunity * to enter a power-saving CPU mode, or perform some other idle processing * (such as QS software tracing output). * -* @note QV_onIdle() is invoked with interrupts DISABLED because the idle +* @note +* QV_onIdle() is invoked with interrupts **DISABLED** because the idle * condition can be asynchronously changed at any time by an interrupt. * QV_onIdle() MUST enable the interrupts internally, but not before * putting the CPU into the low-power mode. (Ideally, enabling interrupts and * low-power mode should happen atomically). At the very least, the function * MUST enable interrupts, otherwise interrupts will remain disabled * permanently. -* -* @note QV_onIdle() is only used by the cooperative QV kenrnel in the -* native (bare metal) QF ports, and is NOT used in any other QF ports. When -* QF is combined with the preemptive QK, the QK idle loop calls a different -* function QK_onIdle(), with different semantics than QV_onIdle(). When QF -* is combined with a 3rd-party RTOS or kernel, the idle processing mechanism -* of the RTOS or kernel is used instead of QV_onIdle(). */ void QV_onIdle(void); +/*$enddecl${QV::QV-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*==========================================================================*/ -/* interface used only inside QP implementation, but not in applications */ - +/* interface used only inside QF, but not in applications */ #ifdef QP_IMPL +/* QV-specific scheduler locking and event queue... */ +/*$declare${QV-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ - /* QV-specific scheduler locking (not needed in QV) */ - #define QF_SCHED_STAT_ - #define QF_SCHED_LOCK_(dummy) ((void)0) - #define QF_SCHED_UNLOCK_(dummy) ((void)0) +/*${QV-impl::QF_SCHED_STAT_} ...............................................*/ +/*! QV scheduler lock status (not needed in QV) */ +#define QF_SCHED_STAT_ - /* native QF event queue operations... */ - #define QACTIVE_EQUEUE_WAIT_(me_) \ - Q_ASSERT_ID(0, (me_)->eQueue.frontEvt != (QEvt *)0) +/*${QV-impl::QF_SCHED_LOCK_} ...............................................*/ +/*! QV scheduler locking (not needed in QV) */ +#define QF_SCHED_LOCK_(dummy) ((void)0) - #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - QPSet_insert(&QV_readySet_, (uint_fast8_t)(me_)->prio) +/*${QV-impl::QF_SCHED_UNLOCK_} .............................................*/ +/*! QV scheduler unlocking (not needed in QV) */ +#define QF_SCHED_UNLOCK_() ((void)0) - /* native QF event pool operations */ - #define QF_EPOOL_TYPE_ QMPool - #define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \ - (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) - #define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize) - #define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \ - ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) - #define QF_EPOOL_PUT_(p_, e_, qs_id_) \ - (QMPool_put(&(p_), (e_), (qs_id_))) +/*${QV-impl::QACTIVE_EQUEUE_WAIT_} .........................................*/ +#define QACTIVE_EQUEUE_WAIT_(me_) \ + Q_ASSERT_ID(0, (me_)->eQueue.frontEvt != (QEvt *)0) - extern QPSet QV_readySet_; /*!< QV ready-set of AOs */ +/*${QV-impl::QACTIVE_EQUEUE_SIGNAL_} .......................................*/ +/*! QV native event queue signaling */ +#define QACTIVE_EQUEUE_SIGNAL_(me_) \ + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio) +/*$enddecl${QV-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/* Native QF event pool operations... */ +/*$declare${QF-QMPool-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF-QMPool-impl::QF_EPOOL_TYPE_} ........................................*/ +#define QF_EPOOL_TYPE_ QMPool + +/*${QF-QMPool-impl::QF_EPOOL_INIT_} ........................................*/ +#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \ + (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) + +/*${QF-QMPool-impl::QF_EPOOL_EVENT_SIZE_} ..................................*/ +#define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize) + +/*${QF-QMPool-impl::QF_EPOOL_GET_} .........................................*/ +#define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \ + ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) + +/*${QF-QMPool-impl::QF_EPOOL_PUT_} .........................................*/ +#define QF_EPOOL_PUT_(p_, e_, qs_id_) \ + (QMPool_put(&(p_), (e_), (qs_id_))) +/*$enddecl${QF-QMPool-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* QP_IMPL */ #endif /* QV_H */ diff --git a/include/qxk.h b/include/qxk.h index c153655f..1c71bcf1 100644 --- a/include/qxk.h +++ b/include/qxk.h @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${include::qxk.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${include::qxk.h} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,89 +32,167 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${include::qxk.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-27 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QXK/C (preemptive dual-mode kernel) platform-independent * public interface. -* @ingroup qxk */ #ifndef QXK_H #define QXK_H -#include "qequeue.h" /* QXK kernel uses the native QP event queue */ -#include "qmpool.h" /* QXK kernel uses the native QP memory pool */ -#include "qpset.h" /* QXK kernel uses the native QP priority set */ - /*==========================================================================*/ /* QF configuration for QXK -- data members of the QActive class... */ /* QXK event-queue used for AOs */ -#define QF_EQUEUE_TYPE QEQueue +#define QF_EQUEUE_TYPE QEQueue -/* QXK OS-object used to store the private stack poiner for extended threads. +/* QXK OS-object used to store the private stack pointer for extended threads. * (The private stack pointer is NULL for basic-threads). */ #define QF_OS_OBJECT_TYPE void* -/* QXK thread type used to store the private Thread-Local Storage pointer. */ +/* QXK thread type used to store the private Thread-Local Storage pointer */ #define QF_THREAD_TYPE void* -/*! Access Thread-Local Storage (TLS) and cast it on the given @p type_ */ +/*! Access Thread-Local Storage (TLS) and cast it on the given `type_` */ #define QXK_TLS(type_) ((type_)QXK_current()->thread) /*==========================================================================*/ -struct QActive; /* forward declaration */ +#include "qequeue.h" /* QXK kernel uses the native QP event queue */ +#include "qmpool.h" /* QXK kernel uses the native QP memory pool */ +#include "qf.h" /* QF framework integrates directly with QXK */ /*==========================================================================*/ -/*! attributes of the QXK kernel */ -typedef struct { +/*$declare${QXK::QXK-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK::QXK-base::Attr} ...................................................*/ +/*! @brief The QXK kernel class +* @class QXK +*/ +typedef struct QXK_Attr { struct QActive * volatile curr; /*!< current thread pointer (NULL=basic) */ struct QActive * volatile next; /*!< next thread pointer to execute */ uint8_t volatile actPrio; /*!< prio of the active AO */ uint8_t volatile lockPrio; /*!< lock prio (0 == no-lock) */ uint8_t volatile lockHolder; /*!< prio of the lock holder */ - uint8_t volatile intNest; /*!< ISR nesting level */ - struct QActive * idleThread; /*!< pointer to the idle thread */ - QPSet readySet; /*!< ready-set of all threads */ -} QXK_PrivAttr; +} QXK; -/*! global attributes of the QXK kernel */ -extern QXK_PrivAttr QXK_attr_; +/*${QXK::QXK-base::attr_} ..................................................*/ +/*! attributes of the QXK kernel */ +extern QXK QXK_attr_; -/*==========================================================================*/ -#ifdef QXK_ON_CONTEXT_SW +/*${QXK::QXK-base::Timeouts} ...............................................*/ +/*! timeout signals for extended threads */ +enum QXK_Timeouts { + QXK_DELAY_SIG = Q_USER_SIG, + QXK_QUEUE_SIG, + QXK_SEMA_SIG +}; - /*! QXK context switch callback (customized in BSPs for QXK) - * @description - * This callback function provides a mechanism to perform additional - * custom operations when QXK switches context from one thread to - * another. - * - * @param[in] prev pointer to the previous thread (active object) - * (prev==0 means that @p prev was the QXK idle thread) - * @param[in] next pointer to the next thread (active object) - * (next==0) means that @p next is the QXK idle thread) - * @attention - * QXK_onContextSw() is invoked with interrupts **disabled** and must also - * return with interrupts **disabled**. - * - * @note - * This callback is enabled by defining the macro #QXK_ON_CONTEXT_SW. - * - * @include qxk_oncontextsw.c - */ - void QXK_onContextSw(struct QActive *prev, struct QActive *next); +/*${QXK::QXK-base::activate_} ..............................................*/ +/*! QXK activator activates the next active object. The activated AO preempts +* the currently executing AOs. +* @static @private @memberof QXK +* +* @attention +* QXK_activate_() must be always called with interrupts **disabled** and +* returns with interrupts **disabled**. +* +* @note +* The activate function might enable interrupts internally, but it always +* returns with interrupts **disabled**. +*/ +void QXK_activate_(void); -#endif /* QXK_ON_CONTEXT_SW */ +/*${QXK::QXK-base::sched_} .................................................*/ +/*! QXK scheduler finds the highest-priority thread ready to run +* @static @private @memberof QXK +* +* @details +* The QXK scheduler finds the priority of the highest-priority thread +* that is ready to run. +* +* @returns +* the 1-based priority of the the thread (basic or extended) run next, +* or zero if no eligible thread is found. +* +* @attention +* QXK_sched_() must be always called with interrupts **disabled** and +* returns with interrupts **disabled**. +*/ +uint_fast8_t QXK_sched_(void); +/*${QXK::QXK-base::schedLock} ..............................................*/ +/*! QXK Scheduler lock +* @static @public @memberof QXK +* +* @details +* This function locks the QXK scheduler to the specified ceiling. +* +* @param[in] ceiling priority ceiling to which the QXK scheduler +* needs to be locked +* +* @returns +* The previous QXK Scheduler lock status, which is to be used to unlock +* the scheduler by restoring its previous lock status in QXK_schedUnlock(). +* +* @note +* A QXK scheduler can be locked from both basic threads (AOs) and +* extended threads and the scheduler locks can nest. +* +* @note +* QXK_schedLock() must be always followed by the corresponding +* QXK_schedUnlock(). +* +* @attention +* QXK will fire an assertion if a thread holding the lock attempts +* to block. +* +* @sa QXK_schedUnlock() +* +* @usage +* The following example shows how to lock and unlock the QXK scheduler: +* @include qxk_lock.c +*/ +QSchedStatus QXK_schedLock(uint_fast8_t const ceiling); + +/*${QXK::QXK-base::schedUnlock} ............................................*/ +/*! QXK Scheduler unlock +* @static @public @memberof QXK +* +* @details +* This function unlocks the QXK scheduler to the previous status. +* +* @param[in] stat previous QXK Scheduler lock status returned from +* QXK_schedLock() +* +* @note +* A QXK scheduler can be locked from both basic threads (AOs) and +* extended threads and the scheduler locks can nest. +* +* @note +* QXK_schedUnlock() must always follow the corresponding QXK_schedLock(). +* +* @sa QXK_schedLock() +* +* @usage +* The following example shows how to lock and unlock the QXK scheduler: +* @include qxk_lock.c +*/ +void QXK_schedUnlock(QSchedStatus const stat); + +/*${QXK::QXK-base::onIdle} .................................................*/ /*! QXK idle callback (customized in BSPs for QXK) -* @description +* @static @public @memberof QXK +* +* @details * QXK_onIdle() is called continuously by the QXK idle thread. This callback * gives the application an opportunity to enter a power-saving CPU mode, * or perform some other idle processing. @@ -112,89 +203,820 @@ extern QXK_PrivAttr QXK_attr_; */ void QXK_onIdle(void); -/*==========================================================================*/ -/*! QXK scheduler finds the highest-priority thread ready to run */ -uint_fast8_t QXK_sched_(void); - -/*! QXK activator activates the next active object. The activated AO preempts -* the currently executing AOs. +/*${QXK::QXK-base::current} ................................................*/ +/*! obtain the currently executing active-object/thread +* @static @public @memberof QXK +* +* @returns +* pointer to the currently executing active-object/thread */ -void QXK_activate_(void); +QActive * QXK_current(void); -/*==========================================================================*/ -/*! return the currently executing active-object/thread */ -struct QActive *QXK_current(void); +/*${QXK::QXK-base::onContextSw} ............................................*/ +#ifdef QXK_ON_CONTEXT_SW +/*! QXK context switch callback (customized in BSPs for QXK) +* @static @public @memberof QXK +* +* @details +* This callback function provides a mechanism to perform additional +* custom operations when QXK switches context from one thread to +* another. +* +* @param[in] prev pointer to the previous thread (active object) +* (prev==0 means that @p prev was the QXK idle thread) +* @param[in] next pointer to the next thread (active object) +* (next==0) means that @p next is the QXK idle thread) +* @attention +* QXK_onContextSw() is invoked with interrupts **disabled** and must also +* return with interrupts **disabled**. +* +* @note +* This callback is enabled by defining the macro #QXK_ON_CONTEXT_SW. +* +* @include qxk_oncontextsw.c +*/ +void QXK_onContextSw( + QActive * prev, + QActive * next); +#endif /* def QXK_ON_CONTEXT_SW */ -/*==========================================================================*/ -/*! QXK Scheduler locking */ +/*${QXK::QXK-base::stackInit_} .............................................*/ +/*! initialize the private stack of a given AO */ +void QXK_stackInit_( + void * thr, + QXThreadHandler const handler, + void * const stkSto, + uint_fast16_t const stkSize); +/*$enddecl${QXK::QXK-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QXK::QXThread} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*! The scheduler lock status */ -typedef uint_fast16_t QSchedStatus; +/*${QXK::QXThread} .........................................................*/ +/*! @brief eXtended (blocking) thread of the QXK preemptive kernel +* @class QXThread +* @extends QActive +* +* @details +* ::QXThread represents the eXtended (blocking) thread of the QXK +* kernel. Each extended thread in the application must be represented +* by the corresponding ::QXThread instance +* +* @note +* Typically, ::QXThread is instantiated directly in the application code. +* The customization of the thread occurs in the QXThread_ctor(), where you +* provide the thread-handler function as the parameter. +* +* @usage +* The following example illustrates how to instantiate and use an extended +* thread in your application. +* @include qxk_thread.c +*/ +typedef struct QXThread { +/* protected: */ + QActive super; -/*! QXK Scheduler lock */ -QSchedStatus QXK_schedLock(uint_fast8_t ceiling); +/* private: */ -/*! QXK Scheduler unlock */ -void QXK_schedUnlock(QSchedStatus stat); + /*! time event to handle blocking timeouts */ + QTimeEvt timeEvt; +/* public: */ +} QXThread; + +/* public: */ + +/*! constructor of an extended-thread +* @public @memberof QXThread +* +* @details +* Performs the first step of QXThread initialization by assigning the +* thread-handler function and the tick rate at which it will handle +* the timeouts. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] handler the thread-handler function +* @param[in] tickRate the ticking rate for timeouts in this thread +* (see QXThread_delay() and QTIMEEVT_TICK_X()) +* +* @note +* Must be called only ONCE before QXTHREAD_START(). +* +* @usage +* The following example illustrates how to invoke QXThread_ctor() in the +* main() function +* +* @include +* qxk_thread_ctor.c +*/ +void QXThread_ctor(QXThread * const me, + QXThreadHandler const handler, + uint_fast8_t const tickRate); + +/*! delay (block) the current extended thread for a specified # ticks +* @static @public @memberof QXThread +* +* @details +* Blocking delay for the number of clock tick at the associated tick rate. +* +* @param[in] nTicks number of clock ticks (at the associated rate) +* to wait for the event to arrive. +* @note +* For the delay to work, the QTIMEEVT_TICK_X() macro needs to be called +* periodically at the associated clock tick rate. +* +* @sa QXThread_ctor() +* @sa QTIMEEVT_TICK_X() +*/ +bool QXThread_delay(uint_fast16_t const nTicks); + +/*! cancel the delay +* @public @memberof QXThread +* +* @details +* Cancel the blocking delay and cause return from the QXThread_delay() +* function. +* +* @returns +* "true" if the thread was actually blocked on QXThread_delay() and +* "false" otherwise. +*/ +bool QXThread_delayCancel(QXThread * const me); + +/*! obtain a message from the private message queue (block if no messages) +* @static @public @memberof QXThread +* +* @details +* The QXThread_queueGet() operation allows the calling extended thread to +* receive QP events directly into its own built-in event queue from an ISR, +* basic thread (AO), or another extended thread. +* +* If QXThread_queueGet() is called when no events are present in the +* thread's private event queue, the operation blocks the current extended +* thread until either an event is received, or a user-specified timeout +* expires. +* +* @param[in] nTicks number of clock ticks (at the associated rate) +* to wait for the event to arrive. The value of +* QXTHREAD_NO_TIMEOUT indicates that no timeout will +* occur and the queue will block indefinitely. +* @returns +* A pointer to the event. If the pointer is not NULL, the event was delivered. +* Otherwise the event pointer of NULL indicates that the queue has timed out. +*/ +QEvt const * QXThread_queueGet(uint_fast16_t const nTicks); + +/* protected: */ + +/*! Overrides QHsm_init_() */ +void QXThread_init_( + QHsm * const me, + void const * const par, + uint_fast8_t const qs_id); + +/*! Overrides QHsm_dispatch_() */ +void QXThread_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id); + +/*! start QXThread private implementation +* @private @memberof QXThread +* +* @details +* Starts execution of an extended thread and registers it with the framework. +* The extended thread becomes ready-to-run immediately and is scheduled +* if the QXK is already running. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] prio priority at which to start the extended thread +* @param[in] qSto pointer to the storage for the ring buffer of the +* event queue. This cold be NULL, if this extended +* thread does not use the built-in event queue. +* @param[in] qLen length of the event queue [in events], +* or zero if queue not used +* @param[in] stkSto pointer to the stack storage (must be provided) +* @param[in] stkSize stack size [in bytes] (must not be zero) +* @param[in] par pointer to an extra parameter (might be NULL). +* +* @note +* Should be called via the macro QXTHREAD_START(). +* +* @usage +* The following example shows starting an extended thread: +* @include qxk_start.c +*/ +void QXThread_start_( + QActive * const me, + uint_fast8_t const prio, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par); + +/*! post to the QXThread event queue private implementation +* @private @memberof QXThread +* +* @details +* Direct event posting is the simplest asynchronous communication method +* available in QF. The following example illustrates how the Philo active +* object posts directly the HUNGRY event to the Table active object.@n +* @n +* The parameter @p margin specifies the minimum number of free slots in +* the queue that must be available for posting to succeed. The function +* returns 1 (success) if the posting succeeded (with the provided margin) +* and 0 (failure) when the posting fails. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be posted +* @param[in] margin number of required free slots in the queue after +* posting the event. The special value #QF_NO_MARGIN +* means that this function will assert if posting fails. +* @param[in] sender pointer to a sender object (used only for QS tracing). +* +* @returns +* 'true' (success) if the posting succeeded (with the provided margin) and +* 'false' (failure) when the posting fails. +* +* @note +* Should be called only via the macro QXTHREAD_POST_X(). +* +* @note +* The #QF_NO_MARGIN value of the @p margin parameter is special and +* denotes situation when the post() operation is assumed to succeed +* (event delivery guarantee). An assertion fires, when the event cannot +* be delivered in this case. +* +* @note +* For compatibility with the V-table from the superclass ::QActive, the +* me-pointer is typed as pointing to QActive. However, the @p me pointer +* here actually points to the QXThread subclass. Therefore the downcast +* (QXThread *)me is always correct. +*/ +bool QXThread_post_( + QActive * const me, + QEvt const * const e, + uint_fast16_t const margin, + void const * const sender); + +/*! post to the QXThread event queue (LIFO) private implementation +* @private @memberof QXThread +* +* @details +* Last-In-First-Out (LIFO) policy is not supported for extened threads. +* +* @param[in] me pointer (see @ref oop) +* @param[in] e pointer to the event to post to the queue +* +* @sa +* QActive_postLIFO_() +*/ +void QXThread_postLIFO_( + QActive * const me, + QEvt const * const e); + +/* private: */ + +/*! block QXThread private implementation +* @private @memberof QXThread +* +* @details +* Internal implementation of blocking the given extended thread. +* +* @note +* Must be called from within a critical section +*/ +void QXThread_block_(QXThread const * const me); + +/*! unblock QXThread private implementation +* @private @memberof QXThread +* +* @details +* Internal implementation of un-blocking the given extended thread. +* +* @note +* must be called from within a critical section +*/ +void QXThread_unblock_(QXThread const * const me); + +/*! arm internal time event private implementation +* @private @memberof QXThread +* +* @details +* Internal implementation of arming the private time event for a given +* timeout at a given system tick rate. +* +* @note +* Must be called from within a critical section +*/ +void QXThread_teArm_(QXThread * const me, + enum_t const sig, + uint_fast16_t const nTicks); + +/*! disarm internal time event private implementation +* @private @memberof QXThread +* +* @details +* Internal implementation of disarming the private time event. +* +* @note +* Must be called from within a critical section +*/ +bool QXThread_teDisarm_(QXThread * const me); +extern QXThread QXThread_idle; +/*$enddecl${QXK::QXThread} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QXK::QXThreadVtable} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK::QXThreadVtable} ...................................................*/ +/*! @brief Virtual Table for the ::QXThread class +* (inherited from ::QActiveVtable) +* +* @note +* ::QXThread inherits ::QActive without adding any new virtual +* functions and therefore, ::QXThreadVtable is typedef'ed as ::QActiveVtable. +*/ +typedef QActiveVtable QXThreadVtable; +/*$enddecl${QXK::QXThreadVtable} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QXK::QXSemaphore} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK::QXSemaphore} ......................................................*/ +/*! @brief Counting Semaphore of the QXK preemptive kernel +* @class QXSemaphore +* +* @details +* ::QXSemaphore is a blocking mechanism intended primarily for signaling +* @ref ::QXThread "extended threads". The semaphore is initialized with +* the maximum count (see QXSemaphore_init()), which allows you to create +* a binary semaphore (when the maximum count is 1) and +* counting semaphore when the maximum count is > 1. +* +* @sa +* - QXSemaphore_init() +* - QXSemaphore_signal() +* - QXSemaphore_wait() +* - QXSemaphore_tryWait() +* +* @usage +* The following example illustrates how to instantiate and use the semaphore +* in your application. +* @include qxk_sema.c +*/ +typedef struct { +/* private: */ + + /*! set of extended threads waiting on this semaphore */ + QPSet waitSet; + + /*! semaphore up-down counter */ + uint16_t volatile count; + + /*! maximum value of the semaphore counter */ + uint16_t max_count; +} QXSemaphore; + +/* public: */ + +/*! initialize the counting semaphore +* @public @memberof QXSemaphore +* +* @details +* Initializes a semaphore with the specified count and maximum count. +* If the semaphore is used for resource sharing, both the initial count +* and maximum count should be set to the number of identical resources +* guarded by the semaphore. If the semaphore is used as a signaling +* mechanism, the initial count should set to 0 and maximum count to 1 +* (binary semaphore). +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] count initial value of the semaphore counter +* @param[in] max_count maximum value of the semaphore counter. +* The purpose of the max_count is to limit the counter +* so that the semaphore cannot unblock more times than +* the maximum. +* +* @note +* QXSemaphore_init() must be called **before** the semaphore can be used +* (signaled or waited on). +*/ +void QXSemaphore_init(QXSemaphore * const me, + uint_fast16_t const count, + uint_fast16_t const max_count); + +/*! wait (block) on the semaphore +* @public @memberof QXSemaphore +* +* @details +* When an extended thread calls QXSemaphore_wait() and the value of the +* semaphore counter is greater than 0, QXSemaphore_wait() decrements the +* semaphore counter and returns (true) to its caller. However, if the value +* of the semaphore counter is 0, the function places the calling thread in +* the waiting list for the semaphore. The thread waits until the semaphore +* is signaled by calling QXSemaphore_signal(), or the specified timeout +* expires. If the semaphore is signaled before the timeout expires, QXK +* resumes the highest-priority extended thread waiting for the semaphore. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] nTicks number of clock ticks (at the associated rate) +* to wait for the semaphore. The value of +* QXTHREAD_NO_TIMEOUT indicates that no timeout will +* occur and the semaphore will wait indefinitely. +* +* @returns +* 'true' if the semaphore has been signaled and 'false' if a timeout occurred. +* +* @note +* Multiple extended threads can wait for a given semaphore. +*/ +bool QXSemaphore_wait(QXSemaphore * const me, + uint_fast16_t const nTicks); + +/*! try wait on the semaphore (non-blocking) +* @public @memberof QXSemaphore +* +* @details +* This function checks if the semaphore counter is greater than 0, +* in which case the counter is decremented. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' if the semaphore has count available and 'false' NOT available. +* +* @note +* This function can be called from any context, including ISRs and basic +* threads (active objects). +*/ +bool QXSemaphore_tryWait(QXSemaphore * const me); + +/*! signal (unblock) the semaphore +* @public @memberof QXSemaphore +* +* @details +* If the semaphore counter value is 0 or more, it is incremented, and +* this function returns to its caller. If the extended threads are waiting +* for the semaphore to be signaled, QXSemaphore_signal() removes the highest- +* priority thread waiting for the semaphore from the waiting list and makes +* this thread ready-to-run. The QXK scheduler is then called to determine if +* the awakened thread is now the highest-priority thread that is ready-to-run. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' when the semaphore signaled and 'false' when the semaphore count +* exceeded the maximum. +* +* @note +* A semaphore can be signaled from many places, including from ISRs, basic +* threads (AOs), and extended threads. +*/ +bool QXSemaphore_signal(QXSemaphore * const me); +/*$enddecl${QXK::QXSemaphore} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QXK::QXMutex} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK::QXMutex} ..........................................................*/ +/*! @brief Blocking Mutex the QXK preemptive kernel +* @class QXMutex +* +* @details +* ::QXMutex is a blocking mutual exclusion mechanism that can also apply +* the **priority ceiling protocol** to avoid unbounded priority inversion +* (if initialized with a non-zero ceiling priority, see QXMutex_init()). +* In that case, ::QXMutex requires its own uinque QP priority level, which +* cannot be used by any thread or any other ::QXMutex. +* If initialized with zero ceiling priority, ::QXMutex does **not** use the +* priority ceiling protocol and does not require a unique QP priority +* (see QXMutex_init()). +* ::QXMutex is **recursive** (re-entrant), which means that it can be locked +* multiple times (up to 255 levels) by the *same* thread without causing +* deadlock. +* ::QXMutex is primarily intended for the @ref ::QXThread +* "extened (blocking) threads", but can also be used by the @ref ::QActive +* "basic threads" through the non-blocking QXMutex_tryLock() API. +* +* @note +* ::QXMutex should be used in situations when at least one of the extended +* threads contending for the mutex blocks while holding the mutex (between +* the QXMutex_lock() and QXMutex_unlock() operations). If no blocking is +* needed while holding the mutex, the more efficient non-blocking mechanism +* of @ref srs_qxk_schedLock() "selective QXK scheduler locking" should be used +* instead. @ref srs_qxk_schedLock() "Selective scheduler locking" is available +* for both @ref ::QActive "basic threads" and @ref ::QXThread "extended +* threads", so it is applicable to situations where resources are shared +* among all these threads. +* +* @usage +* The following example illustrates how to instantiate and use the mutex +* in your application. +* @include qxk_mutex.c +*/ +typedef struct { +/* private: */ + + /*! set of extended-threads waiting on this mutex */ + QPSet waitSet; + + /*! lock-nesting up-down counter */ + uint8_t volatile lockNest; + + /*! prio of the lock holder thread */ + uint8_t volatile holderPrio; + + /*! prioirty ceiling of this mutex */ + uint8_t ceiling; +} QXMutex; + +/* public: */ + +/*! initialize the QXK priority-ceiling mutex ::QXMutex +* @public @memberof QXMutex +* +* @details +* Initialize the QXK priority ceiling mutex. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] ceiling the ceiling-priority of this mutex or zero +* +* @note +* `ceiling == 0` means that the priority-ceiling protocol shall __not__ +* be used by this mutex. Such mutex will __not__ change (boost) the +* priority of the holding thread. +* +* @note +* `ceiling > 0` means that the priority-ceiling protocol shall be used +* by this mutex. Such mutex __will__ boost the priority of the holding +* thread to the `ceiling` level for as long as the thread holds this mutex. +* +* @attention +* When the priority-ceiling protocol is used (`ceiling > 0`), the +* `ceiling` priority must be unused by any other thread or mutex. +* Also, the `ceiling` priority must be higher than priority of any thread +* that uses this mutex. +* +* @usage +* @include qxk_mutex.c +*/ +void QXMutex_init(QXMutex * const me, + uint_fast8_t const ceiling); + +/*! lock the QXK priority-ceiling mutex ::QXMutex +* @public @memberof QXMutex +* +* @details +* Lock the QXK priority ceiling mutex ::QXMutex. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] nTicks number of clock ticks (at the associated rate) +* to wait for the semaphore. The value of +* QXTHREAD_NO_TIMEOUT indicates that no timeout will +* occur and the semaphore will wait indefinitely. +* @returns +* 'true' if the mutex has been acquired and 'false' if a timeout occurred. +* +* @note +* The mutex locks are allowed to nest, meaning that the same extended thread +* can lock the same mutex multiple times (< 255). However, each call to +* QXMutex_lock() must be balanced by the matching call to QXMutex_unlock(). +* +* @usage +* @include qxk_mutex.c +*/ +bool QXMutex_lock(QXMutex * const me, + uint_fast16_t const nTicks); + +/*! try to lock the QXK priority-ceiling mutex ::QXMutex +* @public @memberof QXMutex +* +* @details +* Try to lock the QXK priority ceiling mutex ::QXMutex. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' if the mutex was successfully locked and 'false' if the mutex was +* unavailable and was NOT locked. +* +* @note +* This function **can** be called from both basic threads (active objects) +* and extended threads. +* +* @note +* The mutex locks are allowed to nest, meaning that the same extended thread +* can lock the same mutex multiple times (<= 225). However, each successful +* call to QXMutex_tryLock() must be balanced by the matching call to +* QXMutex_unlock(). +*/ +bool QXMutex_tryLock(QXMutex * const me); + +/*! unlock the QXK priority-ceiling mutex ::QXMutex +* @public @memberof QXMutex +*! +* @details +* Unlock the QXK priority ceiling mutex. +* +* @param[in,out] me pointer (see @ref oop) +* +* @note +* This function **can** be called from both basic threads (active objects) +* and extended threads. +* +* @note +* The mutex locks are allowed to nest, meaning that the same extended thread +* can lock the same mutex multiple times (<= 225). However, each call to +* QXMutex_lock() or a *successful* call to QXMutex_tryLock() must be +* balanced by the matching call to QXMutex_unlock(). +* +* @usage +* @include qxk_mutex.c +*/ +void QXMutex_unlock(QXMutex * const me); +/*$enddecl${QXK::QXMutex} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$declare${QXK-macros} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK-macros::QXTHREAD_START} ............................................*/ +/*! Virtual call to start an extened thread +* +* @details +* Starts execution of the thread and registers the AO with the framework. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] prio_ priority at which to start the active object +* @param[in] qSto_ pointer to the storage for the ring buffer of the +* event queue (used only with the built-in ::QEQueue) +* @param[in] qLen_ length of the event queue (in events) +* @param[in] stkSto_ pointer to the stack storage (used only when +* per-AO stack is needed) +* @param[in] stkSize_ stack size (in bytes) +* @param[in] par_ pointer to the additional port-specific parameter(s) +* (might be NULL). +* @usage +* @include qxk_start.c +*/ +#define QXTHREAD_START(me_, prio_, qSto_, qLen_, stkSto_, stkSize_, par_) \ +do { \ + Q_ASSERT((me_)->super.super.vptr); \ + ((*((QActiveVtable const *)((me_)->super.super.vptr))->start)( \ + &(me_)->super, (prio_), (QEvt const **)(qSto_), (qLen_), \ + (stkSto_), (stkSize_), (par_))); \ +} while (false) + +/*${QXK-macros::QXTHREAD_NO_TIMEOUT} .......................................*/ +/*! No-timeout when blocking on semaphores, mutextes, and queues */ +#define QXTHREAD_NO_TIMEOUT ((uint_fast16_t)0) + +/*${QXK-macros::QXTHREAD_POST_X} ...........................................*/ +/*! Asynchronous posting events to the event queue of an eXtended thread +* @details +* This macro does not assert if the queue overflows and cannot accept +* the event with the specified margin of free slots remaining. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ pointer to the event to post +* @param[in] margin_ the minimum free slots in the queue, which +* must still be available after posting the event. +* The special value #QF_NO_MARGIN causes asserting +* failure in case event allocation fails. +* @param[in] sender_ pointer to the sender object (used in QS tracing) +* +* @returns +* 'true' if the posting succeeded, and 'false' if the posting failed due +* to insufficient margin of free slots available in the queue. +* +* @note +* The @p sender_ parameter is actually only used when QS tracing is enabled +* (macro #Q_SPY is defined). When QS software tracing is disabled, the +* QXTHREAD_POST_X() macro does not pass the @p sender_ argument, so the +* overhead of passing this extra argument is entirely avoided. +* +* @note +* The pointer to the sender object is not necessarily a pointer to an +* active object. In fact, if QXTHREAD_POST_X() is called from an interrupt +* or other context, you can create a unique object just to unambiguously +* identify the sender of the event. +* +* @usage +* @include qf_postx.c +*/ +#define QXTHREAD_POST_X(me_, e_, margin_, sender_) \ + QACTIVE_POST_X(&(me_)->super, (e_), (margin_), (sender_)) +/*$enddecl${QXK-macros} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*==========================================================================*/ /* interface used only inside QP implementation, but not in applications */ #ifdef QP_IMPL +/* QXK implementation... */ +/*$declare${QXK-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ - #ifndef QXK_ISR_CONTEXT_ - /*! Internal macro that reports the execution context (ISR vs. thread) - */ - /*! @returns true if the code executes in the ISR context and false - * otherwise - */ - #define QXK_ISR_CONTEXT_() (QXK_attr_.intNest != 0U) - #endif /* QXK_ISR_CONTEXT_ */ +/*${QXK-impl::QXK_ISR_CONTEXT_} ............................................*/ +#ifndef QXK_ISR_CONTEXT_ +/*! Internal macro that reports the execution context (ISR vs. thread) +* +* @returns true if the code executes in the ISR context and false +* otherwise +*/ +#define QXK_ISR_CONTEXT_() (QF_intNest_ != 0U) +#endif /* ndef QXK_ISR_CONTEXT_ */ - /* QF-specific scheduler locking */ - /*! Internal macro to represent the scheduler lock status - * that needs to be preserved to allow nesting of locks. - */ - #define QF_SCHED_STAT_ QSchedStatus lockStat_; +/*${QXK-impl::QF_SCHED_STAT_} ..............................................*/ +/*! QXK scheduler lock status */ +#define QF_SCHED_STAT_ QSchedStatus lockStat_; - /*! Internal macro for selective scheduler locking. */ - #define QF_SCHED_LOCK_(prio_) do { \ - if (QXK_ISR_CONTEXT_()) { \ - lockStat_ = 0xFFU; \ - } else { \ - lockStat_ = QXK_schedLock((prio_)); \ - } \ - } while (false) +/*${QXK-impl::QF_SCHED_LOCK_} ..............................................*/ +/*! QXK selective scheduler locking */ +#define QF_SCHED_LOCK_(prio_) do { \ + if (QXK_ISR_CONTEXT_()) { \ + lockStat_ = 0xFFU; \ + } else { \ + lockStat_ = QXK_schedLock((prio_)); \ + } \ +} while (false) - /*! Internal macro for selective scheduler unlocking. */ - #define QF_SCHED_UNLOCK_() do { \ - if (lockStat_ != 0xFFU) { \ - QXK_schedUnlock(lockStat_); \ - } \ - } while (false) +/*${QXK-impl::QF_SCHED_UNLOCK_} ............................................*/ +/*! QXK selective scheduler unlocking */ +#define QF_SCHED_UNLOCK_() do { \ + if (lockStat_ != 0xFFU) { \ + QXK_schedUnlock(lockStat_); \ + } \ +} while (false) - #define QACTIVE_EQUEUE_WAIT_(me_) \ - (Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0)) +/*${QXK-impl::QACTIVE_EQUEUE_WAIT_} ........................................*/ +/*! QXK native event queue waiting */ +#define QACTIVE_EQUEUE_WAIT_(me_) \ + (Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0)) - #define QACTIVE_EQUEUE_SIGNAL_(me_) do { \ - QPSet_insert(&QXK_attr_.readySet, (uint_fast8_t)(me_)->dynPrio); \ - if (!QXK_ISR_CONTEXT_()) { \ - if (QXK_sched_() != 0U) { \ - QXK_activate_(); \ - } \ - } \ - } while (false) +/*${QXK-impl::QACTIVE_EQUEUE_SIGNAL_} ......................................*/ +/*! QXK native event queue signaling */ +#define QACTIVE_EQUEUE_SIGNAL_(me_) do { \ + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->dynPrio); \ + if (!QXK_ISR_CONTEXT_()) { \ + if (QXK_sched_() != 0U) { \ + QXK_activate_(); \ + } \ + } \ +} while (false) - /* native QF event pool operations */ - #define QF_EPOOL_TYPE_ QMPool - #define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \ - (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) - #define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize) - #define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \ - ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) - #define QF_EPOOL_PUT_(p_, e_, qs_id_) \ - (QMPool_put(&(p_), (e_), (qs_id_))) +/*${QXK-impl::QXK_PTR_CAST_} ...............................................*/ +/*! internal macro to encapsulate casting of pointers for MISRA deviations +* +* @details +* This macro is specifically and exclusively used for casting pointers +* that are never de-referenced, but only used for internal bookkeeping and +* checking (via assertions) the correct operation of the QXK kernel. +* Such pointer casting is not compliant with MISRA-2012-Rule 11.3(req) +* as well as other messages (e.g., PC-Lint-Plus warning 826). +* Defining this specific macro for this purpose allows to selectively +* disable the warnings for this particular case. +*/ +#define QXK_PTR_CAST_(type_, ptr_) ((type_)(ptr_)) +/*${QXK-impl::QXTHREAD_CAST_} ..............................................*/ +/*! internal macro to encapsulate casting of pointers for MISRA deviations +* +* @details +* This macro is specifically and exclusively used for downcasting pointers +* to QActive to pointers to QXThread in situations when it is known +* that such downcasting is correct.However, such pointer casting is not +* compliant with MISRA-2012-Rule 11.3(req) as well as other messages (e.g., +* PC-Lint-Plus warning 826). Defining this specific macro for this purpose +* allows to selectively disable the warnings for this particular case. +*/ +#define QXTHREAD_CAST_(ptr_) ((QXThread *)(ptr_)) + +/*${QXK-impl::QXK_threadExit_} .............................................*/ +/*! called when QXThread exits +* @private @memberof QXThread +* +* @details +* Called when the extended-thread handler function returns. +* +* @note +* Most thread handler functions are structured as endless loops that never +* return. But it is also possible to structure threads as one-shot functions +* that perform their job and return. In that case this function peforms +* cleanup after the thread. +*/ +void QXK_threadExit_(void); +/*$enddecl${QXK-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/* Native QF event pool operations... */ +/*$declare${QF-QMPool-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF-QMPool-impl::QF_EPOOL_TYPE_} ........................................*/ +#define QF_EPOOL_TYPE_ QMPool + +/*${QF-QMPool-impl::QF_EPOOL_INIT_} ........................................*/ +#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \ + (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) + +/*${QF-QMPool-impl::QF_EPOOL_EVENT_SIZE_} ..................................*/ +#define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize) + +/*${QF-QMPool-impl::QF_EPOOL_GET_} .........................................*/ +#define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \ + ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) + +/*${QF-QMPool-impl::QF_EPOOL_PUT_} .........................................*/ +#define QF_EPOOL_PUT_(p_, e_, qs_id_) \ + (QMPool_put(&(p_), (e_), (qs_id_))) +/*$enddecl${QF-QMPool-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* QP_IMPL */ #endif /* QXK_H */ diff --git a/ports/arm-cm/qk/armclang/qep_port.h b/ports/arm-cm/qk/armclang/qep_port.h index fee5c9b9..feab46d8 100644 --- a/ports/arm-cm/qk/armclang/qep_port.h +++ b/ports/arm-cm/qk/armclang/qep_port.h @@ -1,5 +1,4 @@ /*============================================================================ -* QEP/C port to ARM Cortex-M, ARM-Clang * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -28,7 +27,6 @@ * * @file * @brief QEP/C port, ARM-Clang/LLVM compiler -* @ingroup qep */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qk/armclang/qk_port.c b/ports/arm-cm/qk/armclang/qk_port.c index 34601e15..7544a3a1 100644 --- a/ports/arm-cm/qk/armclang/qk_port.c +++ b/ports/arm-cm/qk/armclang/qk_port.c @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QK/C port to ARM Cortex-M, ARM-CLANG toolset @@ -35,15 +35,17 @@ /* prototypes --------------------------------------------------------------*/ void PendSV_Handler(void); -#ifndef QK_ARM_CM_USE_NMI - void SVC_Handler(void); -#else - void NMI_Handler(void); +#ifdef QK_USE_IRQ_HANDLER /* if use IRQ... */ +void QK_USE_IRQ_HANDLER(void); +#else /* use default (NMI) */ +void NMI_Handler(void); #endif #define SCnSCB_ICTR ((uint32_t volatile *)0xE000E004) #define SCB_SYSPRI ((uint32_t volatile *)0xE000ED14) -#define NVIC_IP ((uint32_t volatile *)0xE000E400) +#define NVIC_EN ((uint32_t volatile *)0xE000E100) +#define NVIC_IP ((uint8_t volatile *)0xE000E400) +#define NVIC_PEND 0xE000E200 #define NVIC_ICSR 0xE000ED04 /* helper macros to "stringify" values */ @@ -67,36 +69,38 @@ void PendSV_Handler(void); * changed by the application-level code. */ void QK_init(void) { - #if (__ARM_ARCH != 6) /* if ARMv7-M and higher... */ /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ - SCB_SYSPRI[1] |= (QF_BASEPRI << 16U) | (QF_BASEPRI << 8U) | QF_BASEPRI; + SCB_SYSPRI[1] = (SCB_SYSPRI[1] + | (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI); /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] |= (QF_BASEPRI << 24U); + SCB_SYSPRI[2] = (SCB_SYSPRI[2] | (QF_BASEPRI << 24)); /* SCB_SYSPRI3: SysTick, PendSV, Debug */ - SCB_SYSPRI[3] |= (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) | QF_BASEPRI; + SCB_SYSPRI[3] = (SCB_SYSPRI[3] + | (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI); /* set all implemented IRQ priories to QF_BASEPRI... */ - uint32_t n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3U); /*(# NVIC_PRIO regs)/4 */ - do { - --n; - NVIC_IP[n] = (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) - | (QF_BASEPRI << 8U) | QF_BASEPRI; - } while (n != 0U); + uint8_t nprio = (8U + ((*SCnSCB_ICTR & 0x7U) << 3U))*4; + for (uint8_t n = 0U; n < nprio; ++n) { + NVIC_IP[n] = QF_BASEPRI; + } -#endif /* ARMv7-M and higher */ +#endif /* ARMv7-M or higher */ /* SCB_SYSPRI3: PendSV set to priority 0xFF (lowest) */ - SCB_SYSPRI[3] |= (0xFFU << 16U); + SCB_SYSPRI[3] = (SCB_SYSPRI[3] | (0xFFU << 16U)); -#ifndef QK_ARM_CM_USE_NMI - /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] &= ~(0xFFU << 24U); /* prioiry 0 (highest) */ +#ifdef QK_USE_IRQ_NUM + /* The QK port is configured to use a given ARM Cortex-M IRQ # + * to return to thread mode (default is to use the NMI exception) + */ + NVIC_IP[QK_USE_IRQ_NUM] = 0U; /* priority 0 (highest) */ + NVIC_EN[QK_USE_IRQ_NUM / 32U] = (1U << (QK_USE_IRQ_NUM % 32U)); #endif } @@ -207,9 +211,13 @@ __asm volatile ( #endif /* VFP available */ #endif /* ARMv7-M and higher */ -#ifndef QK_ARM_CM_USE_NMI /* if use SVC... */ - " SVC #0 \n" /* trigger SVC */ -#else /* use NMI */ +#ifdef QK_USE_IRQ_NUM /* if use IRQ... */ + " LDR r0,=" STRINGIFY(NVIC_PEND + (QK_USE_IRQ_NUM / 32)) "\n" + " MOVS r1,#1 \n" + " LSLS r1,r1,#" STRINGIFY(QK_USE_IRQ_NUM % 32) "\n" /* r1 := IRQ bit */ + " STR r1,[r0] \n" /* pend the IRQ */ + " B . \n" /* wait for preemption by the IRQ */ +#else /* use the NMI */ " LDR r0,=" STRINGIFY(NVIC_ICSR) "\n" /* Interrupt Control and State */ " MOVS r1,#1 \n" " LSLS r1,r1,#31 \n" /* r1 := (1 << 31) (NMI bit) */ @@ -226,8 +234,8 @@ __asm volatile ( * stack frame that must be at the top of the stack. */ __attribute__ ((naked)) -#ifndef QK_ARM_CM_USE_NMI /* if use SVC... */ -void SVC_Handler(void) +#ifdef QK_USE_IRQ_HANDLER /* if use IRQ... */ +void QK_USE_IRQ_HANDLER(void) #else /* use NMI */ void NMI_Handler(void) #endif /* use NMI */ @@ -235,12 +243,12 @@ void NMI_Handler(void) __asm volatile ( " ADD sp,sp,#(8*4) \n" /* remove one 8-register exception frame */ -#if (__ARM_ARCH != 6) /* if ARMv7-M and higher... */ +#if (__ARM_ARCH != 6) /* if ARMv7-M or higher... */ #if (__ARM_FP != 0) /* if VFP available... */ " POP {r0,lr} \n" /* pop stack aligner and EXC_RETURN to LR */ " DSB \n" /* ARM Erratum 838869 */ #endif /* VFP available */ -#endif /* ARMv7-M and higher */ +#endif /* ARMv7-M or higher */ " BX lr \n" /* return to the preempted task */ ); } @@ -274,7 +282,7 @@ __asm volatile ( "QF_qlog2_3: \n" " LDR r2,=QF_qlog2_LUT \n" " LDRB r0,[r2,r0] \n" - " ADDS r0,r1, r0 \n" + " ADDS r0,r1,r0 \n" " BX lr \n" " .align \n" "QF_qlog2_LUT: \n" diff --git a/ports/arm-cm/qk/armclang/qk_port.h b/ports/arm-cm/qk/armclang/qk_port.h index 408d0090..d2ab1e98 100644 --- a/ports/arm-cm/qk/armclang/qk_port.h +++ b/ports/arm-cm/qk/armclang/qk_port.h @@ -23,7 +23,7 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 +* @date Last updated on: 2022-05-02 * @version Last updated for: @ref qpc_7_0_0 * * @file @@ -63,10 +63,19 @@ static inline uint32_t QK_get_IPSR(void) { */ #define QK_ARM_ERRATUM_838869() \ __asm volatile ("dsb" ::: "memory") -#endif +#endif /* ARMv6-M */ -/* Use NMI ARM Cortex-M exception to return to thread mode (default SVC) */ -//#define QK_ARM_CM_USE_NMI 1 +/* Use a given ARM Cortex-M IRQ to return to thread mode (default NMI) +* +* NOTE: +* If you need the NMI for other purposes, you can define the macros +* QK_USE_IRQ_NUM and QK_USE_IRQ_HANDLER to use thus specified IRQ +* instead of the NMI (the IRQ should not be used for anything else). +* These two macros can be defined on the command line to the compiler +* and are actually needed only to compile the qk_port.c file. +*/ +//#define QK_USE_IRQ_NUM 25 +//#define QK_USE_IRQ_HANDLER CRYPTO_IRQHandler /* initialization of the QK kernel */ #define QK_INIT() QK_init() diff --git a/ports/arm-cm/qk/armclang/qs_port.h b/ports/arm-cm/qk/armclang/qs_port.h index ff7c9621..e8b00882 100644 --- a/ports/arm-cm/qk/armclang/qs_port.h +++ b/ports/arm-cm/qk/armclang/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -43,13 +45,16 @@ #define QS_FUN_PTR_SIZE 4 /*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qk/gnu/qep_port.h b/ports/arm-cm/qk/gnu/qep_port.h index d22b37d8..5ff325e4 100644 --- a/ports/arm-cm/qk/gnu/qep_port.h +++ b/ports/arm-cm/qk/gnu/qep_port.h @@ -28,7 +28,6 @@ * * @file * @brief QEP/C port, GNU-ARM compiler -* @ingroup qep */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qk/gnu/qk_port.c b/ports/arm-cm/qk/gnu/qk_port.c index 3496d051..aa5e9962 100644 --- a/ports/arm-cm/qk/gnu/qk_port.c +++ b/ports/arm-cm/qk/gnu/qk_port.c @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QK/C port to ARM Cortex-M, GNU-ARM toolset @@ -35,15 +35,17 @@ /* prototypes --------------------------------------------------------------*/ void PendSV_Handler(void); -#ifndef QK_ARM_CM_USE_NMI - void SVC_Handler(void); -#else - void NMI_Handler(void); +#ifdef QK_USE_IRQ_HANDLER /* if use IRQ... */ +void QK_USE_IRQ_HANDLER(void); +#else /* use default (NMI) */ +void NMI_Handler(void); #endif #define SCnSCB_ICTR ((uint32_t volatile *)0xE000E004) #define SCB_SYSPRI ((uint32_t volatile *)0xE000ED14) -#define NVIC_IP ((uint32_t volatile *)0xE000E400) +#define NVIC_EN ((uint32_t volatile *)0xE000E100) +#define NVIC_IP ((uint8_t volatile *)0xE000E400) +#define NVIC_PEND 0xE000E200 #define NVIC_ICSR 0xE000ED04 /* helper macros to "stringify" values */ @@ -67,36 +69,38 @@ void PendSV_Handler(void); * changed by the application-level code. */ void QK_init(void) { - -#if (__ARM_ARCH != 6) /* if ARMv7-M and higher... */ +#if (__ARM_ARCH != 6) /* if ARMv7-M or higher... */ /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ - SCB_SYSPRI[1] |= (QF_BASEPRI << 16U) | (QF_BASEPRI << 8U) | QF_BASEPRI; + SCB_SYSPRI[1] = (SCB_SYSPRI[1] + | (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI); /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] |= (QF_BASEPRI << 24U); + SCB_SYSPRI[2] = (SCB_SYSPRI[2] | (QF_BASEPRI << 24)); /* SCB_SYSPRI3: SysTick, PendSV, Debug */ - SCB_SYSPRI[3] |= (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) | QF_BASEPRI; + SCB_SYSPRI[3] = (SCB_SYSPRI[3] + | (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI); /* set all implemented IRQ priories to QF_BASEPRI... */ - uint32_t n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3U); /*(# NVIC_PRIO regs)/4 */ - do { - --n; - NVIC_IP[n] = (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) - | (QF_BASEPRI << 8U) | QF_BASEPRI; - } while (n != 0U); + uint8_t nprio = (8U + ((*SCnSCB_ICTR & 0x7U) << 3U))*4; + for (uint8_t n = 0U; n < nprio; ++n) { + NVIC_IP[n] = QF_BASEPRI; + } -#endif /* ARMv7-M and higher */ +#endif /* ARMv7-M or higher */ /* SCB_SYSPRI3: PendSV set to priority 0xFF (lowest) */ - SCB_SYSPRI[3] |= (0xFFU << 16U); + SCB_SYSPRI[3] = (SCB_SYSPRI[3] | (0xFFU << 16U)); -#ifndef QK_ARM_CM_USE_NMI - /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] &= ~(0xFFU << 24U); /* prioiry 0 (highest) */ +#ifdef QK_USE_IRQ_NUM + /* The QK port is configured to use a given ARM Cortex-M IRQ # + * to return to thread mode (default is to use the NMI exception) + */ + NVIC_IP[QK_USE_IRQ_NUM] = 0U; /* priority 0 (highest) */ + NVIC_EN[QK_USE_IRQ_NUM / 32U] = (1U << (QK_USE_IRQ_NUM % 32U)); #endif } @@ -212,9 +216,13 @@ __asm volatile ( #endif /* VFP available */ #endif /* ARMv7-M and higher */ -#ifndef QK_ARM_CM_USE_NMI /* if use SVC... */ - " SVC #0 \n" /* trigger SVC */ -#else /* use NMI */ +#ifdef QK_USE_IRQ_NUM /* if use IRQ... */ + " LDR r0,=" STRINGIFY(NVIC_PEND + (QK_USE_IRQ_NUM / 32)) "\n" + " MOV r1,#1 \n" + " LSL r1,r1,#" STRINGIFY(QK_USE_IRQ_NUM % 32) "\n" /* r1 := IRQ bit */ + " STR r1,[r0] \n" /* pend the IRQ */ + " B . \n" /* wait for preemption by the IRQ */ +#else /* use the NMI */ " LDR r0,=" STRINGIFY(NVIC_ICSR) "\n" /* Interrupt Control and State */ " MOV r1,#1 \n" " LSL r1,r1,#31 \n" /* r1 := (1 << 31) (NMI bit) */ @@ -231,8 +239,8 @@ __asm volatile ( * stack frame that must be at the top of the stack. */ __attribute__ ((naked, optimize("-fno-stack-protector"))) -#ifndef QK_ARM_CM_USE_NMI /* if use SVC... */ -void SVC_Handler(void) +#ifdef QK_USE_IRQ_HANDLER /* if use IRQ... */ +void QK_USE_IRQ_HANDLER(void) #else /* use NMI */ void NMI_Handler(void) #endif /* use NMI */ diff --git a/ports/arm-cm/qk/gnu/qk_port.h b/ports/arm-cm/qk/gnu/qk_port.h index 00bf5158..cb167a5c 100644 --- a/ports/arm-cm/qk/gnu/qk_port.h +++ b/ports/arm-cm/qk/gnu/qk_port.h @@ -23,7 +23,7 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 +* @date Last updated on: 2022-05-02 * @version Last updated for: @ref qpc_7_0_0 * * @file @@ -65,8 +65,17 @@ static inline uint32_t QK_get_IPSR(void) { __asm volatile ("dsb" ::: "memory") #endif -/* Use NMI ARM Cortex-M exception to return to thread mode (default SVC) */ -//#define QK_ARM_CM_USE_NMI 1 +/* Use a given ARM Cortex-M IRQ to return to thread mode (default NMI) +* +* NOTE: +* If you need the NMI for other purposes, you can define the macros +* QK_USE_IRQ_NUM and QK_USE_IRQ_HANDLER to use thus specified IRQ +* instead of the NMI (the IRQ should not be used for anything else). +* These two macros can be defined on the command line to the compiler +* and are actually needed only to compile the qk_port.c file. +*/ +//#define QK_USE_IRQ_NUM 25 +//#define QK_USE_IRQ_HANDLER CRYPTO_IRQHandler /* initialization of the QK kernel */ #define QK_INIT() QK_init() diff --git a/ports/arm-cm/qk/gnu/qs_port.h b/ports/arm-cm/qk/gnu/qs_port.h index ff7c9621..e8b00882 100644 --- a/ports/arm-cm/qk/gnu/qs_port.h +++ b/ports/arm-cm/qk/gnu/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -43,13 +45,16 @@ #define QS_FUN_PTR_SIZE 4 /*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qk/iar/qep_port.h b/ports/arm-cm/qk/iar/qep_port.h index e7bd5320..eb838a52 100644 --- a/ports/arm-cm/qk/iar/qep_port.h +++ b/ports/arm-cm/qk/iar/qep_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QEP/C port to ARM Cortex-M, IAR +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -28,7 +28,6 @@ * * @file * @brief QEP/C port, generic IAR compiler -* @ingroup qep */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qk/iar/qf_port.h b/ports/arm-cm/qk/iar/qf_port.h index 9e74e086..393b2a0d 100644 --- a/ports/arm-cm/qk/iar/qf_port.h +++ b/ports/arm-cm/qk/iar/qf_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QF/C port to ARM Cortex-M, QK, IAR +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial diff --git a/ports/arm-cm/qk/iar/qk_port.c b/ports/arm-cm/qk/iar/qk_port.c index 110ac77d..a4a66da9 100644 --- a/ports/arm-cm/qk/iar/qk_port.c +++ b/ports/arm-cm/qk/iar/qk_port.c @@ -1,5 +1,5 @@ /*============================================================================ -* QK/C port to ARM Cortex-M, IAR +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QK/C port to ARM Cortex-M, IAR-ARM toolset @@ -35,15 +35,17 @@ /* prototypes --------------------------------------------------------------*/ void PendSV_Handler(void); -#ifndef QK_ARM_CM_USE_NMI - void SVC_Handler(void); -#else - void NMI_Handler(void); +#ifdef QK_USE_IRQ_HANDLER /* if use IRQ... */ +void QK_USE_IRQ_HANDLER(void); +#else /* use default (NMI) */ +void NMI_Handler(void); #endif #define SCnSCB_ICTR ((uint32_t volatile *)0xE000E004) #define SCB_SYSPRI ((uint32_t volatile *)0xE000ED14) -#define NVIC_IP ((uint32_t volatile *)0xE000E400) +#define NVIC_EN ((uint32_t volatile *)0xE000E100) +#define NVIC_IP ((uint8_t volatile *)0xE000E400) +#define NVIC_PEND 0xE000E200 #define NVIC_ICSR 0xE000ED04 /* helper macros to "stringify" values */ @@ -67,36 +69,38 @@ void PendSV_Handler(void); * changed by the application-level code. */ void QK_init(void) { - -#if (__ARM_ARCH != 6) /* if ARMv7-M and higher... */ +#if (__ARM_ARCH != 6) /* if ARMv7-M or higher... */ /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ - SCB_SYSPRI[1] |= (QF_BASEPRI << 16U) | (QF_BASEPRI << 8U) | QF_BASEPRI; + SCB_SYSPRI[1] = (SCB_SYSPRI[1] + | (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI); /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] |= (QF_BASEPRI << 24U); + SCB_SYSPRI[2] = (SCB_SYSPRI[2] | (QF_BASEPRI << 24)); /* SCB_SYSPRI3: SysTick, PendSV, Debug */ - SCB_SYSPRI[3] |= (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) | QF_BASEPRI; + SCB_SYSPRI[3] = (SCB_SYSPRI[3] + | (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI); /* set all implemented IRQ priories to QF_BASEPRI... */ - uint32_t n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3U); /*(# NVIC_PRIO regs)/4 */ - do { - --n; - NVIC_IP[n] = (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) - | (QF_BASEPRI << 8U) | QF_BASEPRI; - } while (n != 0U); + uint8_t nprio = (8U + ((*SCnSCB_ICTR & 0x7U) << 3U))*4; + for (uint8_t n = 0U; n < nprio; ++n) { + NVIC_IP[n] = QF_BASEPRI; + } -#endif /* ARMv7-M and higher */ +#endif /* ARMv7-M or higher */ /* SCB_SYSPRI3: PendSV set to priority 0xFF (lowest) */ - SCB_SYSPRI[3] |= (0xFFU << 16U); + SCB_SYSPRI[3] = (SCB_SYSPRI[3] | (0xFFU << 16U)); -#ifndef QK_ARM_CM_USE_NMI - /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] &= ~(0xFFU << 24U); /* prioiry 0 (highest) */ +#ifdef QK_USE_IRQ_NUM + /* The QK port is configured to use a given ARM Cortex-M IRQ # + * to return to thread mode (default is to use the NMI exception) + */ + NVIC_IP[QK_USE_IRQ_NUM] = 0U; /* priority 0 (highest) */ + NVIC_EN[QK_USE_IRQ_NUM / 32U] = (1U << (QK_USE_IRQ_NUM % 32U)); #endif } @@ -162,7 +166,7 @@ __asm volatile ( " LSRS r3,r1,#3 \n" /* r3 := (r1 >> 3), set the T bit (new xpsr) */ " LDR r2,=QK_activate_ \n" /* address of QK_activate_ */ " SUBS r2,r2,#1 \n" /* align Thumb-address at halfword (new pc) */ - " LDR r1,=QK_thread_ret\n" /* return address after the call (new lr) */ + " LDR r1,=QK_thread_ret \n" /* return address after the call (new lr) */ " SUB sp,sp,#8*4 \n" /* reserve space for exception stack frame */ " ADD r0,sp,#5*4 \n" /* r0 := 5 registers below the SP */ @@ -183,6 +187,7 @@ __asm volatile ( * NOTE: QK_thread_ret does not execute in the PendSV context! * NOTE: QK_thread_ret is entered with interrupts DISABLED. */ + __stackless void QK_thread_ret(void) { __asm volatile ( @@ -195,7 +200,7 @@ __asm volatile ( #if (__ARM_ARCH == 6) /* if ARMv6-M... */ " CPSIE i \n" /* enable interrupts (clear PRIMASK) */ -#else /* ARMv7-M and higher */ +#else /* ARMv7-M or higher */ " MOVS r0,#0 \n" " MSR BASEPRI,r0 \n" /* enable interrupts (clear BASEPRI) */ #if (__ARM_FP != 0) /* if VFP available... */ @@ -205,11 +210,19 @@ __asm volatile ( " MSR CONTROL,r0 \n" /* CONTROL := r0 (clear CONTROL[2] FPCA bit) */ " ISB \n" /* ISB after MSR CONTROL (ARM AN321,Sect.4.16) */ #endif /* VFP available */ -#endif /* ARMv7-M and higher */ +#endif /* ARMv7-M or higher */ -#ifndef QK_ARM_CM_USE_NMI /* if use SVC... */ - " SVC #0 \n" /* trigger SVC */ -#else /* use NMI */ +#ifdef QK_USE_IRQ_NUM /* if use IRQ... */ + " LDR r0,=" STRINGIFY(NVIC_PEND + (QK_USE_IRQ_NUM / 32)) "\n" + " MOVS r1,#1 \n" + /* NOTE: the following IRQ bit calculation should be done simply as + * (QK_USE_IRQ_NUM % 32), but the IAR assembler does not accept it. + * As a workaround the modulo (%) operation is replaced with the following: + */ + " LSLS r1,r1,#" STRINGIFY(QK_USE_IRQ_NUM - (QK_USE_IRQ_NUM/32)*32) "\n" + " STR r1,[r0] \n" /* pend the IRQ */ + " B . \n" /* wait for preemption by the IRQ */ +#else /* use the NMI */ " LDR r0,=" STRINGIFY(NVIC_ICSR) "\n" /* Interrupt Control and State */ " MOVS r1,#1 \n" " LSLS r1,r1,#31 \n" /* r1 := (1 << 31) (NMI bit) */ @@ -226,8 +239,8 @@ __asm volatile ( * stack frame that must be at the top of the stack. */ __stackless -#ifndef QK_ARM_CM_USE_NMI /* if use SVC... */ -void SVC_Handler(void) +#ifdef QK_USE_IRQ_HANDLER /* if use IRQ... */ +void QK_USE_IRQ_HANDLER(void) #else /* use NMI */ void NMI_Handler(void) #endif /* use NMI */ diff --git a/ports/arm-cm/qk/iar/qk_port.h b/ports/arm-cm/qk/iar/qk_port.h index 45ff1938..996807ca 100644 --- a/ports/arm-cm/qk/iar/qk_port.h +++ b/ports/arm-cm/qk/iar/qk_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QK/C port to ARM Cortex-M, IAR +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,7 +23,7 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 +* @date Last updated on: 2022-05-02 * @version Last updated for: @ref qpc_7_0_0 * * @file @@ -57,8 +57,17 @@ #define QK_ARM_ERRATUM_838869() __DSB() #endif -/* Use NMI ARM Cortex-M exception to return to thread mode (default SVC) */ -//#define QK_ARM_CM_USE_NMI 1 +/* Use a given ARM Cortex-M IRQ to return to thread mode (default NMI) +* +* NOTE: +* If you need the NMI for other purposes, you can define the macros +* QK_USE_IRQ_NUM and QK_USE_IRQ_HANDLER to use thus specified IRQ +* instead of the NMI (the IRQ should not be used for anything else). +* These two macros can be defined on the command line to the compiler +* and are actually needed only to compile the qk_port.c file. +*/ +//#define QK_USE_IRQ_NUM 25 +//#define QK_USE_IRQ_HANDLER CRYPTO_IRQHandler /* initialization of the QK kernel */ #define QK_INIT() QK_init() diff --git a/ports/arm-cm/qk/iar/qs_port.h b/ports/arm-cm/qk/iar/qs_port.h index ff7c9621..e8b00882 100644 --- a/ports/arm-cm/qk/iar/qs_port.h +++ b/ports/arm-cm/qk/iar/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -43,13 +45,16 @@ #define QS_FUN_PTR_SIZE 4 /*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qutest/qep_port.h b/ports/arm-cm/qutest/qep_port.h index a07c5d93..12e9074b 100644 --- a/ports/arm-cm/qutest/qep_port.h +++ b/ports/arm-cm/qutest/qep_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QEP/C port to ARM Cortex-M, generic C99 +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -28,7 +28,6 @@ * * @file * @brief QEP/C port, generic C99 compiler -* @ingroup qep */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qutest/qf_port.h b/ports/arm-cm/qutest/qf_port.h index 49577122..04ee4664 100644 --- a/ports/arm-cm/qutest/qf_port.h +++ b/ports/arm-cm/qutest/qf_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QF/C port to ARM Cortex-M, QUTest, generic C99 +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QF/C port to Cortex-M, QUTEST unit test harness, generic C99 compiler @@ -44,8 +44,8 @@ #define QF_MAX_TICK_RATE 2U /* QF interrupt disable/enable */ -#define QF_INT_DISABLE() (++QF_intNest) -#define QF_INT_ENABLE() (--QF_intNest) +#define QF_INT_DISABLE() (++QF_intNest_) +#define QF_INT_ENABLE() (--QF_intNest_) /* QF critical section */ /* QF_CRIT_STAT_TYPE not defined */ @@ -72,7 +72,7 @@ #define QACTIVE_EQUEUE_WAIT_(me_) \ Q_ASSERT_ID(0, (me_)->eQueue.frontEvt != (QEvt *)0) #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - QPSet_insert(&QS_rxPriv_.readySet, (uint_fast8_t)(me_)->prio) + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio) /* native QF event pool operations */ #define QF_EPOOL_TYPE_ QMPool diff --git a/ports/arm-cm/qutest/qs_port.h b/ports/arm-cm/qutest/qs_port.h index 777d1234..e8b00882 100644 --- a/ports/arm-cm/qutest/qs_port.h +++ b/ports/arm-cm/qutest/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, QUTest, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QS/C port to a 32-bit CPU and a generic C99 compiler. -* @ingroup qs +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -42,17 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4 -/* flush the QS output buffer after each QS record */ -#define QS_REC_DONE() QS_onFlush() - -//*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qv/armclang/qep_port.h b/ports/arm-cm/qv/armclang/qep_port.h index ab231c51..c1eb162f 100644 --- a/ports/arm-cm/qv/armclang/qep_port.h +++ b/ports/arm-cm/qv/armclang/qep_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QEP/C port to ARM Cortex-M, ARM-Clang +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -28,7 +28,6 @@ * * @file * @brief QEP/C port, ARM-Clang/LLVM compiler -* @ingroup qep */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qv/armclang/qf_port.h b/ports/arm-cm/qv/armclang/qf_port.h index 39c7ad43..9ca2d3aa 100644 --- a/ports/arm-cm/qv/armclang/qf_port.h +++ b/ports/arm-cm/qv/armclang/qf_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QF/C port to ARM Cortex-M, QK, ARM-CLANG +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial diff --git a/ports/arm-cm/qv/armclang/qs_port.h b/ports/arm-cm/qv/armclang/qs_port.h index ff7c9621..e8b00882 100644 --- a/ports/arm-cm/qv/armclang/qs_port.h +++ b/ports/arm-cm/qv/armclang/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -43,13 +45,16 @@ #define QS_FUN_PTR_SIZE 4 /*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qv/armclang/qv_port.c b/ports/arm-cm/qv/armclang/qv_port.c index 0eac3dba..e35b8681 100644 --- a/ports/arm-cm/qv/armclang/qv_port.c +++ b/ports/arm-cm/qv/armclang/qv_port.c @@ -1,5 +1,5 @@ /*============================================================================ -* QV/C port to ARM Cortex-M, ARM-CLANG +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QV/C port to ARM Cortex-M, ARM-CLANG toolset @@ -97,13 +97,15 @@ void QV_init(void) { /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ - SCB_SYSPRI[1] |= (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI; + SCB_SYSPRI[1] = (SCB_SYSPRI[1] + | (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI); /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] |= (QF_BASEPRI << 24); + SCB_SYSPRI[2] = (SCB_SYSPRI[2] | (QF_BASEPRI << 24)); /* SCB_SYSPRI3: SysTick, PendSV, Debug */ - SCB_SYSPRI[3] |= (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI; + SCB_SYSPRI[3] = (SCB_SYSPRI[3] + | (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI); /* set all implemented IRQ priories to QF_BASEPRI... */ n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3); /* (# NVIC_PRIO registers)/4 */ diff --git a/ports/arm-cm/qv/armclang/qv_port.h b/ports/arm-cm/qv/armclang/qv_port.h index 57292f6f..ec98d2a5 100644 --- a/ports/arm-cm/qv/armclang/qv_port.h +++ b/ports/arm-cm/qv/armclang/qv_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QV/C port to ARM Cortex-M, ARM-CLANG +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial diff --git a/ports/arm-cm/qv/gnu/qep_port.h b/ports/arm-cm/qv/gnu/qep_port.h index d22b37d8..67577b76 100644 --- a/ports/arm-cm/qv/gnu/qep_port.h +++ b/ports/arm-cm/qv/gnu/qep_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QEP/C port to ARM Cortex-M, GNU-ARM +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -28,7 +28,6 @@ * * @file * @brief QEP/C port, GNU-ARM compiler -* @ingroup qep */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qv/gnu/qf_port.h b/ports/arm-cm/qv/gnu/qf_port.h index 6ed5069c..9c2d1ac2 100644 --- a/ports/arm-cm/qv/gnu/qf_port.h +++ b/ports/arm-cm/qv/gnu/qf_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QF/C port to ARM Cortex-M, QV, GNU-ARM +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial diff --git a/ports/arm-cm/qv/gnu/qs_port.h b/ports/arm-cm/qv/gnu/qs_port.h index ff7c9621..e8b00882 100644 --- a/ports/arm-cm/qv/gnu/qs_port.h +++ b/ports/arm-cm/qv/gnu/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -43,13 +45,16 @@ #define QS_FUN_PTR_SIZE 4 /*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qv/gnu/qv_port.c b/ports/arm-cm/qv/gnu/qv_port.c index d00ead8e..33b7a17e 100644 --- a/ports/arm-cm/qv/gnu/qv_port.c +++ b/ports/arm-cm/qv/gnu/qv_port.c @@ -1,5 +1,5 @@ /*============================================================================ -* QV/C port to ARM Cortex-M, GNU-ARM +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QV/C port to ARM Cortex-M, GNU-ARM toolset @@ -103,13 +103,15 @@ void QV_init(void) { /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ - SCB_SYSPRI[1] |= (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI; + SCB_SYSPRI[1] = (SCB_SYSPRI[1] + | (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI); /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] |= (QF_BASEPRI << 24); + SCB_SYSPRI[2] = (SCB_SYSPRI[2] | (QF_BASEPRI << 24)); /* SCB_SYSPRI3: SysTick, PendSV, Debug */ - SCB_SYSPRI[3] |= (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI; + SCB_SYSPRI[3] = (SCB_SYSPRI[3] + | (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI); /* set all implemented IRQ priories to QF_BASEPRI... */ n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3); /* (# NVIC_PRIO registers)/4 */ diff --git a/ports/arm-cm/qv/gnu/qv_port.h b/ports/arm-cm/qv/gnu/qv_port.h index db9a0940..ef37fc4c 100644 --- a/ports/arm-cm/qv/gnu/qv_port.h +++ b/ports/arm-cm/qv/gnu/qv_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QV/C port to ARM Cortex-M, GNU-ARM +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial diff --git a/ports/arm-cm/qv/iar/qep_port.h b/ports/arm-cm/qv/iar/qep_port.h index 6e97f55f..3c327118 100644 --- a/ports/arm-cm/qv/iar/qep_port.h +++ b/ports/arm-cm/qv/iar/qep_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QEP/C port, generic IAR compiler -* @ingroup qep -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-21 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic IAR compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qv/iar/qf_port.h b/ports/arm-cm/qv/iar/qf_port.h index ec05b015..78b8d35b 100644 --- a/ports/arm-cm/qv/iar/qf_port.h +++ b/ports/arm-cm/qv/iar/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to Cortex-M, cooperative QV kernel, IAR-ARM toolset -* @cond -****************************************************************************** -* Last updated for version 6.3.8 -* Last updated on 2019-01-10 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to Cortex-M, cooperative QV kernel, IAR-ARM toolset */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/arm-cm/qv/iar/qs_port.h b/ports/arm-cm/qv/iar/qs_port.h index ff7c9621..e8b00882 100644 --- a/ports/arm-cm/qv/iar/qs_port.h +++ b/ports/arm-cm/qv/iar/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -43,13 +45,16 @@ #define QS_FUN_PTR_SIZE 4 /*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qv/iar/qv_port.c b/ports/arm-cm/qv/iar/qv_port.c index 510af6ad..f493d16a 100644 --- a/ports/arm-cm/qv/iar/qv_port.c +++ b/ports/arm-cm/qv/iar/qv_port.c @@ -1,48 +1,41 @@ -/** -* @file -* @brief QV/C port to ARM Cortex-M, IAR-ARM toolset -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-25 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-05-13 +* @version Last updated for: @ref qpcpp_7_0_1 +* +* @file +* @brief QV/C port to ARM Cortex-M, IAR-ARM toolset */ /* This QV port is part of the interanl QP implementation */ #define QP_IMPL 1U #include "qf_port.h" -#if (__ARM_ARCH == 6) /* Cortex-M0/M0+/M1 (v6-M, v6S-M)? */ +#if (__ARM_ARCH == 6) /* ARMv6-M? */ -/* hand-optimized quick LOG2 in assembly (M0/M0+ have no CLZ instruction) */ +/* hand-optimized quick LOG2 in assembly (no CLZ instruction in ARMv6-M) */ uint_fast8_t QF_qlog2(uint32_t x) { static uint8_t const log2LUT[16] = { 0U, 1U, 2U, 2U, 3U, 3U, 3U, 3U, @@ -75,7 +68,7 @@ uint_fast8_t QF_qlog2(uint32_t x) { return n + log2LUT[x]; } -#else /* NOT Cortex-M0/M0+/M1(v6-M, v6S-M)? */ +#else /* ARMv7-M or higher */ #define SCnSCB_ICTR ((uint32_t volatile *)0xE000E004) #define SCB_SYSPRI ((uint32_t volatile *)0xE000ED14) @@ -103,13 +96,15 @@ void QV_init(void) { /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ - SCB_SYSPRI[1] |= (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI; + SCB_SYSPRI[1] = (SCB_SYSPRI[1] + | (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI); /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] |= (QF_BASEPRI << 24); + SCB_SYSPRI[2] = (SCB_SYSPRI[2] | (QF_BASEPRI << 24)); /* SCB_SYSPRI3: SysTick, PendSV, Debug */ - SCB_SYSPRI[3] |= (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI; + SCB_SYSPRI[3] = (SCB_SYSPRI[3] + | (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI); /* set all implemented IRQ priories to QF_BASEPRI... */ n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3); /* (# NVIC_PRIO registers)/4 */ @@ -120,5 +115,5 @@ void QV_init(void) { } while (n != 0); } -#endif /* NOT Cortex-M0/M0+/M1 */ +#endif /* ARMv7-M or higher */ diff --git a/ports/arm-cm/qv/iar/qv_port.h b/ports/arm-cm/qv/iar/qv_port.h index 2be10996..629a6cd5 100644 --- a/ports/arm-cm/qv/iar/qv_port.h +++ b/ports/arm-cm/qv/iar/qv_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QV/C port to ARM Cortex-M, IAR-ARM toolset -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-23 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QV/C port to ARM Cortex-M, IAR-ARM toolset */ #ifndef QV_PORT_H #define QV_PORT_H diff --git a/ports/arm-cm/qxk/armclang/qep_port.h b/ports/arm-cm/qxk/armclang/qep_port.h index ab231c51..c1eb162f 100644 --- a/ports/arm-cm/qxk/armclang/qep_port.h +++ b/ports/arm-cm/qxk/armclang/qep_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QEP/C port to ARM Cortex-M, ARM-Clang +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -28,7 +28,6 @@ * * @file * @brief QEP/C port, ARM-Clang/LLVM compiler -* @ingroup qep */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qxk/armclang/qf_port.h b/ports/arm-cm/qxk/armclang/qf_port.h index c81fe347..ca494b21 100644 --- a/ports/arm-cm/qxk/armclang/qf_port.h +++ b/ports/arm-cm/qxk/armclang/qf_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QF/C port to ARM Cortex-M, QXK, ARM-CLANG +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-30 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QF/C port to Cortex-M, dual-mode QXK kernel, ARM-CLANG toolset @@ -104,8 +104,6 @@ #endif /* Cortex-M0/M0+/M1(v6-M, v6S-M) */ #include "qxk_port.h" /* QXK dual-mode kernel port */ -#include "qf.h" /* QF platform-independent public interface */ -#include "qxthread.h" /* QXK extended thread interface */ /***************************************************************************** * NOTE1: diff --git a/ports/arm-cm/qxk/armclang/qs_port.h b/ports/arm-cm/qxk/armclang/qs_port.h index ff7c9621..e8b00882 100644 --- a/ports/arm-cm/qxk/armclang/qs_port.h +++ b/ports/arm-cm/qxk/armclang/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -43,13 +45,16 @@ #define QS_FUN_PTR_SIZE 4 /*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qxk/armclang/qxk_port.c b/ports/arm-cm/qxk/armclang/qxk_port.c index b904fc0c..3def67a3 100644 --- a/ports/arm-cm/qxk/armclang/qxk_port.c +++ b/ports/arm-cm/qxk/armclang/qxk_port.c @@ -1,5 +1,5 @@ /*============================================================================ -* QXK/C port to ARM Cortex-M, ARM-CLANG +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-11 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QXK/C port to ARM Cortex-M, ARM-CLANG toolset @@ -32,19 +32,21 @@ /* This QXK port is part of the interanl QP implementation */ #define QP_IMPL 1U #include "qf_port.h" -#include "qxk_pkg.h" +#include "qf_pkg.h" /* prototypes --------------------------------------------------------------*/ void PendSV_Handler(void); -#ifndef QXK_ARM_CM_USE_NMI - void SVC_Handler(void); -#else - void NMI_Handler(void); +#ifdef QXK_USE_IRQ_HANDLER /* if use IRQ... */ +void QXK_USE_IRQ_HANDLER(void); +#else /* use default (NMI) */ +void NMI_Handler(void); #endif #define SCnSCB_ICTR ((uint32_t volatile *)0xE000E004) #define SCB_SYSPRI ((uint32_t volatile *)0xE000ED14) -#define NVIC_IP ((uint32_t volatile *)0xE000E400) +#define NVIC_EN ((uint32_t volatile *)0xE000E100) +#define NVIC_IP ((uint8_t volatile *)0xE000E400) +#define NVIC_PEND 0xE000E200 #define NVIC_ICSR 0xE000ED04 /* helper macros to "stringify" values */ @@ -74,30 +76,33 @@ void QXK_init(void) { /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ - SCB_SYSPRI[1] |= (QF_BASEPRI << 16U) | (QF_BASEPRI << 8U) | QF_BASEPRI; + SCB_SYSPRI[1] = (SCB_SYSPRI[1] + | (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI); /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] |= (QF_BASEPRI << 24U); + SCB_SYSPRI[2] = (SCB_SYSPRI[2] | (QF_BASEPRI << 24)); /* SCB_SYSPRI3: SysTick, PendSV, Debug */ - SCB_SYSPRI[3] |= (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) | QF_BASEPRI; + SCB_SYSPRI[3] = (SCB_SYSPRI[3] + | (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI); /* set all implemented IRQ priories to QF_BASEPRI... */ - uint32_t n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3U); /*(# NVIC_PRIO regs)/4 */ - do { - --n; - NVIC_IP[n] = (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) - | (QF_BASEPRI << 8U) | QF_BASEPRI; - } while (n != 0U); + uint8_t nprio = (8U + ((*SCnSCB_ICTR & 0x7U) << 3U))*4; + for (uint8_t n = 0U; n < nprio; ++n) { + NVIC_IP[n] = QF_BASEPRI; + } -#endif /* ARMv7-M and higher */ +#endif /* ARMv7-M or higher */ /* SCB_SYSPRI3: PendSV set to priority 0xFF (lowest) */ - SCB_SYSPRI[3] |= (0xFFU << 16U); + SCB_SYSPRI[3] = (SCB_SYSPRI[3] | (0xFFU << 16U)); -#ifndef QXK_ARM_CM_USE_NMI - /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] &= ~(0xFFU << 24U); /* prioiry 0 (highest) */ +#ifdef QXK_USE_IRQ_NUM + /* The QXK port is configured to use a given ARM Cortex-M IRQ # + * to return to thread mode (default is to use the NMI exception) + */ + NVIC_IP[QXK_USE_IRQ_NUM] = 0U; /* priority 0 (highest) */ + NVIC_EN[QXK_USE_IRQ_NUM / 32U] = (1U << (QXK_USE_IRQ_NUM % 32U)); #endif } @@ -125,7 +130,7 @@ void QXK_stackInit_(void *thr, QXThreadHandler const handler, /* synthesize the ARM Cortex-M exception stack frame...*/ *(--sp) = (1U << 24); /* xPSR (just the THUMB bit) */ *(--sp) = (uint32_t)handler; /* PC (the thread handler) */ - *(--sp) = (uint32_t)&QXK_threadRet_; /* LR (return from thread) */ + *(--sp) = (uint32_t)&QXK_threadExit_; /* LR (exit from thread) */ *(--sp) = 0x0000000CU; /* R12 */ *(--sp) = 0x00000003U; /* R3 */ *(--sp) = 0x00000002U; /* R2 */ @@ -533,9 +538,13 @@ __asm volatile ( #endif /* VFP available */ #endif /* ARMv7-M or higher */ -#ifndef QXK_ARM_CM_USE_NMI /* if use SVC... */ - " SVC #0 \n" /* trigger SVC */ -#else /* use NMI */ +#ifdef QXK_USE_IRQ_NUM /* if use IRQ... */ + " LDR r0,=" STRINGIFY(NVIC_PEND + (QXK_USE_IRQ_NUM / 32)) "\n" + " MOVS r1,#1 \n" + " LSLS r1,r1,#" STRINGIFY(QXK_USE_IRQ_NUM % 32) "\n" /* r1 := IRQ bit */ + " STR r1,[r0] \n" /* pend the IRQ */ + " B . \n" /* wait for preemption by the IRQ */ +#else /* use the NMI */ " LDR r0,=" STRINGIFY(NVIC_ICSR) "\n" /* Interrupt Control and State */ " MOVS r1,#1 \n" " LSLS r1,r1,#31 \n" /* r1 := (1 << 31) (NMI bit) */ @@ -552,8 +561,8 @@ __asm volatile ( * stack frame that must be at the top of the stack. */ __attribute__ ((naked)) -#ifndef QXK_ARM_CM_USE_NMI /* if use SVC... */ -void SVC_Handler(void) +#ifdef QXK_USE_IRQ_HANDLER /* if use IRQ... */ +void QXK_USE_IRQ_HANDLER(void) #else /* use NMI */ void NMI_Handler(void) #endif /* use NMI */ diff --git a/ports/arm-cm/qxk/armclang/qxk_port.h b/ports/arm-cm/qxk/armclang/qxk_port.h index 79a50562..578c15e0 100644 --- a/ports/arm-cm/qxk/armclang/qxk_port.h +++ b/ports/arm-cm/qxk/armclang/qxk_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QXK/C port to ARM Cortex-M, ARM-CLANG +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,7 +23,7 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 +* @date Last updated on: 2022-05-02 * @version Last updated for: @ref qpc_7_0_0 * * @file @@ -60,7 +60,7 @@ static inline uint32_t QXK_get_IPSR(void) { #if (__ARM_ARCH == 6) /* ARMv6-M? */ #define QXK_ARM_ERRATUM_838869() ((void)0) -#else /* Cortex-M3/M4/M7 (v7-M) */ +#else /* ARMv7-M or higher */ /* The following macro implements the recommended workaround for the * ARM Erratum 838869. Specifically, for Cortex-M3/M4/M7 the DSB * (memory barrier) instruction needs to be added before exiting an ISR. @@ -69,8 +69,17 @@ static inline uint32_t QXK_get_IPSR(void) { __asm volatile ("dsb" ::: "memory") #endif /* ARMv6-M */ -/* Use NMI ARM Cortex-M exception to return to thread mode (default SVC) */ -//#define QXK_ARM_CM_USE_NMI 1 +/* Use a given ARM Cortex-M IRQ to return to thread mode (default NMI) +* +* NOTE: +* If you need the NMI for other purposes, you can define the macros +* QXK_USE_IRQ_NUM and QXK_USE_IRQ_HANDLER to use thus specified IRQ +* instead of the NMI (the IRQ should not be used for anything else). +* These two macros can be defined on the command line to the compiler +* and are actually needed only to compile the qxk_port.c file. +*/ +//#define QXK_USE_IRQ_NUM 25 +//#define QXK_USE_IRQ_HANDLER CRYPTO_IRQHandler /* initialization of the QXK kernel */ #define QXK_INIT() QXK_init() diff --git a/ports/arm-cm/qxk/gnu/qep_port.h b/ports/arm-cm/qxk/gnu/qep_port.h index d22b37d8..67577b76 100644 --- a/ports/arm-cm/qxk/gnu/qep_port.h +++ b/ports/arm-cm/qxk/gnu/qep_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QEP/C port to ARM Cortex-M, GNU-ARM +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -28,7 +28,6 @@ * * @file * @brief QEP/C port, GNU-ARM compiler -* @ingroup qep */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qxk/gnu/qf_port.h b/ports/arm-cm/qxk/gnu/qf_port.h index 7070dcb5..c2ba3c92 100644 --- a/ports/arm-cm/qxk/gnu/qf_port.h +++ b/ports/arm-cm/qxk/gnu/qf_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QF/C port to ARM Cortex-M, QXK, GNU-ARM +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-30 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QF/C port to Cortex-M, dual-mode QXK kernel, GNU-ARM toolset @@ -104,8 +104,6 @@ #endif /* Cortex-M0/M0+/M1(v6-M, v6S-M) */ #include "qxk_port.h" /* QXK dual-mode kernel port */ -#include "qf.h" /* QF platform-independent public interface */ -#include "qxthread.h" /* QXK extended thread interface */ /***************************************************************************** * NOTE1: diff --git a/ports/arm-cm/qxk/gnu/qs_port.h b/ports/arm-cm/qxk/gnu/qs_port.h index ff7c9621..e8b00882 100644 --- a/ports/arm-cm/qxk/gnu/qs_port.h +++ b/ports/arm-cm/qxk/gnu/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -43,13 +45,16 @@ #define QS_FUN_PTR_SIZE 4 /*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qxk/gnu/qxk_port.c b/ports/arm-cm/qxk/gnu/qxk_port.c index 2446ac50..68eebef0 100644 --- a/ports/arm-cm/qxk/gnu/qxk_port.c +++ b/ports/arm-cm/qxk/gnu/qxk_port.c @@ -1,5 +1,5 @@ /*============================================================================ -* QXK/C port to ARM Cortex-M, GNU-ARM +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-11 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QXK/C port to ARM Cortex-M, GNU-ARM toolset @@ -32,19 +32,21 @@ /* This QXK port is part of the interanl QP implementation */ #define QP_IMPL 1U #include "qf_port.h" -#include "qxk_pkg.h" +#include "qf_pkg.h" /* prototypes --------------------------------------------------------------*/ void PendSV_Handler(void); -#ifndef QXK_ARM_CM_USE_NMI - void SVC_Handler(void); -#else - void NMI_Handler(void); +#ifdef QXK_USE_IRQ_HANDLER /* if use IRQ... */ +void QXK_USE_IRQ_HANDLER(void); +#else /* use default (NMI) */ +void NMI_Handler(void); #endif #define SCnSCB_ICTR ((uint32_t volatile *)0xE000E004) #define SCB_SYSPRI ((uint32_t volatile *)0xE000ED14) -#define NVIC_IP ((uint32_t volatile *)0xE000E400) +#define NVIC_EN ((uint32_t volatile *)0xE000E100) +#define NVIC_IP ((uint8_t volatile *)0xE000E400) +#define NVIC_PEND 0xE000E200 #define NVIC_ICSR 0xE000ED04 /* helper macros to "stringify" values */ @@ -74,30 +76,33 @@ void QXK_init(void) { /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ - SCB_SYSPRI[1] |= (QF_BASEPRI << 16U) | (QF_BASEPRI << 8U) | QF_BASEPRI; + SCB_SYSPRI[1] = (SCB_SYSPRI[1] + | (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI); /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] |= (QF_BASEPRI << 24U); + SCB_SYSPRI[2] = (SCB_SYSPRI[2] | (QF_BASEPRI << 24)); /* SCB_SYSPRI3: SysTick, PendSV, Debug */ - SCB_SYSPRI[3] |= (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) | QF_BASEPRI; + SCB_SYSPRI[3] = (SCB_SYSPRI[3] + | (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI); /* set all implemented IRQ priories to QF_BASEPRI... */ - uint32_t n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3U); /*(# NVIC_PRIO regs)/4 */ - do { - --n; - NVIC_IP[n] = (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) - | (QF_BASEPRI << 8U) | QF_BASEPRI; - } while (n != 0U); + uint8_t nprio = (8U + ((*SCnSCB_ICTR & 0x7U) << 3U))*4; + for (uint8_t n = 0U; n < nprio; ++n) { + NVIC_IP[n] = QF_BASEPRI; + } -#endif /* ARMv7-M and higher */ +#endif /* ARMv7-M or higher */ /* SCB_SYSPRI3: PendSV set to priority 0xFF (lowest) */ - SCB_SYSPRI[3] |= (0xFFU << 16U); + SCB_SYSPRI[3] = (SCB_SYSPRI[3] | (0xFFU << 16U)); -#ifndef QXK_ARM_CM_USE_NMI - /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] &= ~(0xFFU << 24U); /* prioiry 0 (highest) */ +#ifdef QXK_USE_IRQ_NUM + /* The QXK port is configured to use a given ARM Cortex-M IRQ # + * to return to thread mode (default is to use the NMI exception) + */ + NVIC_IP[QXK_USE_IRQ_NUM] = 0U; /* priority 0 (highest) */ + NVIC_EN[QXK_USE_IRQ_NUM / 32U] = (1U << (QXK_USE_IRQ_NUM % 32U)); #endif } @@ -125,7 +130,7 @@ void QXK_stackInit_(void *thr, QXThreadHandler const handler, /* synthesize the ARM Cortex-M exception stack frame...*/ *(--sp) = (1U << 24); /* xPSR (just the THUMB bit) */ *(--sp) = (uint32_t)handler; /* PC (the thread handler) */ - *(--sp) = (uint32_t)&QXK_threadRet_; /* LR (return from thread) */ + *(--sp) = (uint32_t)&QXK_threadExit_; /* LR (exit from thread) */ *(--sp) = 0x0000000CU; /* R12 */ *(--sp) = 0x00000003U; /* R3 */ *(--sp) = 0x00000002U; /* R2 */ @@ -538,9 +543,13 @@ __asm volatile ( #endif /* VFP available */ #endif /* ARMv7-M or higher */ -#ifndef QXK_ARM_CM_USE_NMI /* if use SVC... */ - " SVC #0 \n" /* trigger SVC */ -#else /* use NMI */ +#ifdef QXK_USE_IRQ_NUM /* if use IRQ... */ + " LDR r0,=" STRINGIFY(NVIC_PEND + (QXK_USE_IRQ_NUM / 32)) "\n" + " MOV r1,#1 \n" + " LSL r1,r1,#" STRINGIFY(QXK_USE_IRQ_NUM % 32) "\n" /* r1 := IRQ bit */ + " STR r1,[r0] \n" /* pend the IRQ */ + " B . \n" /* wait for preemption by the IRQ */ +#else /* use the NMI */ " LDR r0,=" STRINGIFY(NVIC_ICSR) "\n" /* Interrupt Control and State */ " MOV r1,#1 \n" " LSL r1,r1,#31 \n" /* r1 := (1 << 31) (NMI bit) */ @@ -557,8 +566,8 @@ __asm volatile ( * stack frame that must be at the top of the stack. */ __attribute__ ((naked, optimize("-fno-stack-protector"))) -#ifndef QXK_ARM_CM_USE_NMI /* if use SVC... */ -void SVC_Handler(void) +#ifdef QXK_USE_IRQ_HANDLER /* if use IRQ... */ +void QXK_USE_IRQ_HANDLER(void) #else /* use NMI */ void NMI_Handler(void) #endif /* use NMI */ diff --git a/ports/arm-cm/qxk/gnu/qxk_port.h b/ports/arm-cm/qxk/gnu/qxk_port.h index 21b5a1b1..7d122be2 100644 --- a/ports/arm-cm/qxk/gnu/qxk_port.h +++ b/ports/arm-cm/qxk/gnu/qxk_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QXK/C port to ARM Cortex-M, GNU-ARM +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-27 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QXK/C port to ARM Cortex-M, GNU-ARM compiler @@ -69,8 +69,17 @@ static inline uint32_t QXK_get_IPSR(void) { __asm volatile ("dsb" ::: "memory") #endif /* ARMv6-M */ -/* Use NMI ARM Cortex-M exception to return to thread mode (default SVC) */ -//#define QXK_ARM_CM_USE_NMI 1 +/* Use a given ARM Cortex-M IRQ to return to thread mode (default NMI) +* +* NOTE: +* If you need the NMI for other purposes, you can define the macros +* QXK_USE_IRQ_NUM and QXK_USE_IRQ_HANDLER to use thus specified IRQ +* instead of the NMI (the IRQ should not be used for anything else). +* These two macros can be defined on the command line to the compiler +* and are actually needed only to compile the qxk_port.c file. +*/ +//#define QXK_USE_IRQ_NUM 25 +//#define QXK_USE_IRQ_HANDLER CRYPTO_IRQHandler /* initialization of the QXK kernel */ #define QXK_INIT() QXK_init() diff --git a/ports/arm-cm/qxk/iar/qep_port.h b/ports/arm-cm/qxk/iar/qep_port.h index e7bd5320..eb838a52 100644 --- a/ports/arm-cm/qxk/iar/qep_port.h +++ b/ports/arm-cm/qxk/iar/qep_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QEP/C port to ARM Cortex-M, IAR +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -28,7 +28,6 @@ * * @file * @brief QEP/C port, generic IAR compiler -* @ingroup qep */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cm/qxk/iar/qf_port.h b/ports/arm-cm/qxk/iar/qf_port.h index 87f4c6e4..66cdf8d6 100644 --- a/ports/arm-cm/qxk/iar/qf_port.h +++ b/ports/arm-cm/qxk/iar/qf_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QF/C port to ARM Cortex-M, QXK, IAR +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-30 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QF/C port to Cortex-M, preemptive dual-mode QXK kernel, IAR-ARM @@ -106,8 +106,6 @@ #endif /* Cortex-M0/M0+/M1(v6-M, v6S-M) */ #include "qxk_port.h" /* QXK dual-mode kernel port */ -#include "qf.h" /* QF platform-independent public interface */ -#include "qxthread.h" /* QXK extended thread interface */ /***************************************************************************** * NOTE1: diff --git a/ports/arm-cm/qxk/iar/qs_port.h b/ports/arm-cm/qxk/iar/qs_port.h index ff7c9621..e8b00882 100644 --- a/ports/arm-cm/qxk/iar/qs_port.h +++ b/ports/arm-cm/qxk/iar/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to ARM Cortex-M, generic compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,12 +23,14 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -43,13 +45,16 @@ #define QS_FUN_PTR_SIZE 4 /*==========================================================================*/ -/* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/arm-cm/qxk/iar/qxk_port.c b/ports/arm-cm/qxk/iar/qxk_port.c index 8be1c7ad..3049fe39 100644 --- a/ports/arm-cm/qxk/iar/qxk_port.c +++ b/ports/arm-cm/qxk/iar/qxk_port.c @@ -1,5 +1,5 @@ /*============================================================================ -* QXK/C port to ARM Cortex-M, IAR +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,8 +23,8 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-11 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QXK/C port to ARM Cortex-M, IAR-ARM toolset @@ -32,19 +32,21 @@ /* This QXK port is part of the interanl QP implementation */ #define QP_IMPL 1U #include "qf_port.h" -#include "qxk_pkg.h" +#include "qf_pkg.h" /* prototypes --------------------------------------------------------------*/ void PendSV_Handler(void); -#ifndef QXK_ARM_CM_USE_NMI - void SVC_Handler(void); -#else - void NMI_Handler(void); +#ifdef QXK_USE_IRQ_HANDLER /* if use IRQ... */ +void QXK_USE_IRQ_HANDLER(void); +#else /* use default (NMI) */ +void NMI_Handler(void); #endif #define SCnSCB_ICTR ((uint32_t volatile *)0xE000E004) #define SCB_SYSPRI ((uint32_t volatile *)0xE000ED14) -#define NVIC_IP ((uint32_t volatile *)0xE000E400) +#define NVIC_EN ((uint32_t volatile *)0xE000E100) +#define NVIC_IP ((uint8_t volatile *)0xE000E400) +#define NVIC_PEND 0xE000E200 #define NVIC_ICSR 0xE000ED04 /* helper macros to "stringify" values */ @@ -74,30 +76,33 @@ void QXK_init(void) { /* set exception priorities to QF_BASEPRI... * SCB_SYSPRI1: Usage-fault, Bus-fault, Memory-fault */ - SCB_SYSPRI[1] |= (QF_BASEPRI << 16U) | (QF_BASEPRI << 8U) | QF_BASEPRI; + SCB_SYSPRI[1] = (SCB_SYSPRI[1] + | (QF_BASEPRI << 16) | (QF_BASEPRI << 8) | QF_BASEPRI); /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] |= (QF_BASEPRI << 24U); + SCB_SYSPRI[2] = (SCB_SYSPRI[2] | (QF_BASEPRI << 24)); /* SCB_SYSPRI3: SysTick, PendSV, Debug */ - SCB_SYSPRI[3] |= (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) | QF_BASEPRI; + SCB_SYSPRI[3] = (SCB_SYSPRI[3] + | (QF_BASEPRI << 24) | (QF_BASEPRI << 16) | QF_BASEPRI); /* set all implemented IRQ priories to QF_BASEPRI... */ - uint32_t n = 8U + ((*SCnSCB_ICTR & 0x7U) << 3U); /*(# NVIC_PRIO regs)/4 */ - do { - --n; - NVIC_IP[n] = (QF_BASEPRI << 24U) | (QF_BASEPRI << 16U) - | (QF_BASEPRI << 8U) | QF_BASEPRI; - } while (n != 0U); + uint8_t nprio = (8U + ((*SCnSCB_ICTR & 0x7U) << 3U))*4; + for (uint8_t n = 0U; n < nprio; ++n) { + NVIC_IP[n] = QF_BASEPRI; + } -#endif /* ARMv7-M and higher */ +#endif /* ARMv7-M or higher */ /* SCB_SYSPRI3: PendSV set to priority 0xFF (lowest) */ - SCB_SYSPRI[3] |= (0xFFU << 16U); + SCB_SYSPRI[3] = (SCB_SYSPRI[3] | (0xFFU << 16U)); -#ifndef QXK_ARM_CM_USE_NMI - /* SCB_SYSPRI2: SVCall */ - SCB_SYSPRI[2] &= ~(0xFFU << 24U); /* prioiry 0 (highest) */ +#ifdef QXK_USE_IRQ_NUM + /* The QXK port is configured to use a given ARM Cortex-M IRQ # + * to return to thread mode (default is to use the NMI exception) + */ + NVIC_IP[QXK_USE_IRQ_NUM] = 0U; /* priority 0 (highest) */ + NVIC_EN[QXK_USE_IRQ_NUM / 32U] = (1U << (QXK_USE_IRQ_NUM % 32U)); #endif } @@ -125,7 +130,7 @@ void QXK_stackInit_(void *thr, QXThreadHandler const handler, /* synthesize the ARM Cortex-M exception stack frame...*/ *(--sp) = (1U << 24); /* xPSR (just the THUMB bit) */ *(--sp) = (uint32_t)handler; /* PC (the thread handler) */ - *(--sp) = (uint32_t)&QXK_threadRet_; /* LR (return from thread) */ + *(--sp) = (uint32_t)&QXK_threadExit_; /* LR (exit from thread) */ *(--sp) = 0x0000000CU; /* R12 */ *(--sp) = 0x00000003U; /* R3 */ *(--sp) = 0x00000002U; /* R2 */ @@ -521,7 +526,7 @@ __asm ( #if (__ARM_ARCH == 6) /* if ARMv6-M... */ " CPSIE i \n" /* enable interrupts (clear PRIMASK) */ -#else /* ARMv7-M and higher */ +#else /* ARMv7-M or higher */ " MOVS r0,#0 \n" " MSR BASEPRI,r0 \n" /* enable interrupts (clear BASEPRI) */ #if (__ARM_FP != 0) /* if VFP available... */ @@ -533,9 +538,17 @@ __asm ( #endif /* VFP available */ #endif /* ARMv7-M or higher */ -#ifndef QXK_ARM_CM_USE_NMI /* if use SVC... */ - " SVC #0 \n" /* trigger SVC */ -#else /* use NMI */ +#ifdef QXK_USE_IRQ_NUM /* if use IRQ... */ + " LDR r0,=" STRINGIFY(NVIC_PEND + (QXK_USE_IRQ_NUM / 32)) "\n" + " MOVS r1,#1 \n" + /* NOTE: the following IRQ bit calculation should be done simply as + * (QK_USE_IRQ_NUM % 32), but the IAR assembler does not accept it. + * As a workaround the modulo (%) operation is replaced with the following: + */ + " LSLS r1,r1,#" STRINGIFY(QXK_USE_IRQ_NUM - (QXK_USE_IRQ_NUM/32)*32) "\n" + " STR r1,[r0] \n" /* pend the IRQ */ + " B . \n" /* wait for preemption by the IRQ */ +#else /* use the NMI */ " LDR r0,=" STRINGIFY(NVIC_ICSR) "\n" /* Interrupt Control and State */ " MOVS r1,#1 \n" " LSLS r1,r1,#31 \n" /* r1 := (1 << 31) (NMI bit) */ @@ -552,8 +565,8 @@ __asm ( * stack frame that must be at the top of the stack. */ __stackless -#ifndef QXK_ARM_CM_USE_NMI /* if use SVC... */ -void SVC_Handler(void) +#ifdef QXK_USE_IRQ_HANDLER /* if use IRQ... */ +void QXK_USE_IRQ_HANDLER(void) #else /* use NMI */ void NMI_Handler(void) #endif /* use NMI */ diff --git a/ports/arm-cm/qxk/iar/qxk_port.h b/ports/arm-cm/qxk/iar/qxk_port.h index 80f8c002..37540e54 100644 --- a/ports/arm-cm/qxk/iar/qxk_port.h +++ b/ports/arm-cm/qxk/iar/qxk_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QXK/C port to ARM Cortex-M, IAR +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,7 +23,7 @@ * ============================================================================*/ /*! -* @date Last updated on: 2022-04-09 +* @date Last updated on: 2022-05-02 * @version Last updated for: @ref qpc_7_0_0 * * @file @@ -61,8 +61,17 @@ #define QXK_ARM_ERRATUM_838869() __DSB() #endif /* ARMv6-M */ -/* Use NMI ARM Cortex-M exception to return to thread mode (default SVC) */ -//#define QXK_ARM_CM_USE_NMI 1 +/* Use a given ARM Cortex-M IRQ to return to thread mode (default NMI) +* +* NOTE: +* If you need the NMI for other purposes, you can define the macros +* QXK_USE_IRQ_NUM and QXK_USE_IRQ_HANDLER to use thus specified IRQ +* instead of the NMI (the IRQ should not be used for anything else). +* These two macros can be defined on the command line to the compiler +* and are actually needed only to compile the qxk_port.c file. +*/ +//#define QXK_USE_IRQ_NUM 25 +//#define QXK_USE_IRQ_HANDLER CRYPTO_IRQHandler /* initialization of the QXK kernel */ #define QXK_INIT() QXK_init() diff --git a/ports/arm-cm/qxk/llvm/README.txt b/ports/arm-cm/qxk/llvm/README.txt index 152488fe..9cd332f7 100644 --- a/ports/arm-cm/qxk/llvm/README.txt +++ b/ports/arm-cm/qxk/llvm/README.txt @@ -1,2 +1,2 @@ -The port to ARM-LLVM toolchain is identical to ARM-CLANG +The port to ARM-LLVM toolchain is identical to ARM-CLANG and is located in ports/arm-cm/armclang/ sub-directory \ No newline at end of file diff --git a/ports/arm-cr/qk/gnu/qep_port.h b/ports/arm-cr/qk/gnu/qep_port.h index 2e91c77e..6d17e338 100644 --- a/ports/arm-cr/qk/gnu/qep_port.h +++ b/ports/arm-cr/qk/gnu/qep_port.h @@ -1,41 +1,32 @@ -/** -* @file -* @brief QEP/C port, generic C99 compiler -* @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C99 compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cr/qk/gnu/qf_port.h b/ports/arm-cr/qk/gnu/qf_port.h index 5692f9da..a03016f6 100644 --- a/ports/arm-cr/qk/gnu/qf_port.h +++ b/ports/arm-cr/qk/gnu/qf_port.h @@ -1,40 +1,32 @@ -/** -* @file -* @brief QF/C port to Cortex-R, preemptive QK kernel, GNU-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-31 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to Cortex-R, preemptive QK kernel, GNU-ARM toolset */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/arm-cr/qk/gnu/qk_port.h b/ports/arm-cr/qk/gnu/qk_port.h index 2778b692..77f49c13 100644 --- a/ports/arm-cr/qk/gnu/qk_port.h +++ b/ports/arm-cr/qk/gnu/qk_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QK/C port to ARM Cortex-R, GNU-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.2 -* Date of the Last Update: 2016-09-26 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QK/C port to ARM Cortex-R, GNU-ARM toolset */ #ifndef QK_PORT_H #define QK_PORT_H @@ -57,7 +50,7 @@ __asm(" AND R3, SP, #4\n" \ " SUB SP, SP, R3\n" \ " PUSH {R3, LR}\n"); \ - ++QK_attr_.intNest; { + ++QF_intNest_; { #else #define QK_IRQ_BEGIN(name_) \ void name_(void) \ @@ -70,14 +63,14 @@ __asm(" AND R3, SP, #4\n" \ " SUB SP, SP, R3\n" \ " PUSH {R3, LR}\n"); \ - ++QK_attr_.intNest; { + ++QF_intNest_; { #endif /* QK-specific Interrupt Request handler END */ #ifdef __FPU_PRESENT #define QK_IRQ_END() \ - } --QK_attr_.intNest; \ - if (QK_attr_.intNest == 0U) { \ + } --QF_intNest_; \ + if (QF_intNest_ == 0U) { \ if (QK_sched_() != 0U) { \ QK_activate_(); \ } \ @@ -94,8 +87,8 @@ } #else #define QK_IRQ_END() \ - } --QK_attr_.intNest; \ - if (QK_attr_.intNest == 0U) { \ + } --QF_intNest_; \ + if (QF_intNest_ == 0U) { \ if (QK_sched_() != 0U) { \ QK_activate_(); \ } \ diff --git a/ports/arm-cr/qk/gnu/qs_port.h b/ports/arm-cr/qk/gnu/qs_port.h index 7617e3fb..e8b00882 100644 --- a/ports/arm-cr/qk/gnu/qs_port.h +++ b/ports/arm-cr/qk/gnu/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,14 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4 -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/arm-cr/qk/iar/qep_port.h b/ports/arm-cr/qk/iar/qep_port.h index 2e91c77e..a6607ff9 100644 --- a/ports/arm-cr/qk/iar/qep_port.h +++ b/ports/arm-cr/qk/iar/qep_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QEP/C port, generic C99 compiler -* @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C99 compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cr/qk/iar/qf_port.h b/ports/arm-cr/qk/iar/qf_port.h index ca003ece..a47b4df6 100644 --- a/ports/arm-cr/qk/iar/qf_port.h +++ b/ports/arm-cr/qk/iar/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to Cortex-R, preemptive QK kernel, IAR-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-31 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to Cortex-R, preemptive QK kernel, IAR-ARM toolset */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/arm-cr/qk/iar/qk_port.h b/ports/arm-cr/qk/iar/qk_port.h index a2a74ffb..8f6fd9a4 100644 --- a/ports/arm-cr/qk/iar/qk_port.h +++ b/ports/arm-cr/qk/iar/qk_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QK/C port to ARM Cortex-R, IAR-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.2 -* Date of the Last Update: 2016-09-26 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QK/C port to ARM Cortex-R, IAR-ARM toolset */ #ifndef QK_PORT_H #define QK_PORT_H @@ -55,7 +48,7 @@ __asm(" AND R3, SP, #4\n" \ " SUB SP, SP, R3\n" \ " PUSH {R3, LR}\n"); \ - ++QK_attr_.intNest; { + ++QF_intNest_; { #else #define QK_IRQ_BEGIN(name_) \ __stackless __arm void name_(void) { \ @@ -66,14 +59,14 @@ __asm(" AND R3, SP, #4\n" \ " SUB SP, SP, R3\n" \ " PUSH {R3, LR}\n"); \ - ++QK_attr_.intNest; { + ++QF_intNest_; { #endif /* QK-specific Interrupt Request handler END */ #ifdef __ARMVFP__ #define QK_IRQ_END() \ - } --QK_attr_.intNest; \ - if (QK_attr_.intNest == 0U) { \ + } --QF_intNest_; \ + if (QF_intNest_ == 0U) { \ if (QK_sched_() != 0U) { \ QK_activate_(); \ } \ @@ -90,8 +83,8 @@ } #else #define QK_IRQ_END() \ - } --QK_attr_.intNest; \ - if (QK_attr_.intNest == 0U) { \ + } --QF_intNest_; \ + if (QF_intNest_ == 0U) { \ if (QK_sched_() != 0U) { \ QK_activate_(); \ } \ diff --git a/ports/arm-cr/qk/iar/qs_port.h b/ports/arm-cr/qk/iar/qs_port.h index 7617e3fb..e8b00882 100644 --- a/ports/arm-cr/qk/iar/qs_port.h +++ b/ports/arm-cr/qk/iar/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,14 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4 -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/arm-cr/qk/ti/qep_port.h b/ports/arm-cr/qk/ti/qep_port.h index 2e91c77e..a6607ff9 100644 --- a/ports/arm-cr/qk/ti/qep_port.h +++ b/ports/arm-cr/qk/ti/qep_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QEP/C port, generic C99 compiler -* @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C99 compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cr/qk/ti/qf_port.h b/ports/arm-cr/qk/ti/qf_port.h index 3ba9883a..f0dc26bc 100644 --- a/ports/arm-cr/qk/ti/qf_port.h +++ b/ports/arm-cr/qk/ti/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to Cortex-R, preemptive QK kernel, TI-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-30 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ + * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to Cortex-R, preemptive QK kernel, TI-ARM toolset */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/arm-cr/qk/ti/qk_port.h b/ports/arm-cr/qk/ti/qk_port.h index 00e8897a..271b8794 100644 --- a/ports/arm-cr/qk/ti/qk_port.h +++ b/ports/arm-cr/qk/ti/qk_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QK/C port to ARM Cortex-R, TI-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.2 -* Date of the Last Update: 2016-09-26 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QK/C port to ARM Cortex-R, TI-ARM toolset */ #ifndef QK_PORT_H #define QK_PORT_H @@ -74,12 +67,12 @@ " POP {R0-R3, R12}\n" \ " RFEIA SP!\n"); \ void name_ ## _isr(void) { \ - ++QK_attr_.intNest; { + ++QF_intNest_; { /* QK-specific Interrupt Request handler END */ #define QK_IRQ_END() \ - } --QK_attr_.intNest; \ - if (QK_attr_.intNest == 0U) { \ + } --QF_intNest_; \ + if (QF_intNest_ == 0U) { \ if (QK_sched_() != 0U) { \ QK_activate_(); \ } \ diff --git a/ports/arm-cr/qk/ti/qs_port.h b/ports/arm-cr/qk/ti/qs_port.h index 7617e3fb..e8b00882 100644 --- a/ports/arm-cr/qk/ti/qs_port.h +++ b/ports/arm-cr/qk/ti/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,14 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4 -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/arm-cr/qv/gnu/qep_port.h b/ports/arm-cr/qv/gnu/qep_port.h index 2e91c77e..a6607ff9 100644 --- a/ports/arm-cr/qv/gnu/qep_port.h +++ b/ports/arm-cr/qv/gnu/qep_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QEP/C port, generic C99 compiler -* @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C99 compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cr/qv/gnu/qf_port.h b/ports/arm-cr/qv/gnu/qf_port.h index 8029c9a1..db10281d 100644 --- a/ports/arm-cr/qv/gnu/qf_port.h +++ b/ports/arm-cr/qv/gnu/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to Cortex-R, cooperative QV kernel, GNU-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-31 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to Cortex-R, cooperative QV kernel, GNU-ARM toolset */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/arm-cr/qv/gnu/qs_port.h b/ports/arm-cr/qv/gnu/qs_port.h index 7617e3fb..e8b00882 100644 --- a/ports/arm-cr/qv/gnu/qs_port.h +++ b/ports/arm-cr/qv/gnu/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,14 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4 -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/arm-cr/qv/gnu/qv_port.h b/ports/arm-cr/qv/gnu/qv_port.h index 0c2dbd1e..3033d20c 100644 --- a/ports/arm-cr/qv/gnu/qv_port.h +++ b/ports/arm-cr/qv/gnu/qv_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QV/C port to ARM Cortex-R, GNU-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-30 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QV/C port to ARM Cortex-R, GNU-ARM toolset */ #ifndef QV_PORT_H #define QV_PORT_H diff --git a/ports/arm-cr/qv/iar/qep_port.h b/ports/arm-cr/qv/iar/qep_port.h index 2e91c77e..a6607ff9 100644 --- a/ports/arm-cr/qv/iar/qep_port.h +++ b/ports/arm-cr/qv/iar/qep_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QEP/C port, generic C99 compiler -* @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C99 compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cr/qv/iar/qf_port.h b/ports/arm-cr/qv/iar/qf_port.h index 2f884fc8..efff9a99 100644 --- a/ports/arm-cr/qv/iar/qf_port.h +++ b/ports/arm-cr/qv/iar/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to Cortex-R, cooperative QV kernel, IAR-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-31 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to Cortex-R, cooperative QV kernel, IAR-ARM toolset */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/arm-cr/qv/iar/qs_port.h b/ports/arm-cr/qv/iar/qs_port.h index 7617e3fb..e8b00882 100644 --- a/ports/arm-cr/qv/iar/qs_port.h +++ b/ports/arm-cr/qv/iar/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,14 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4 -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/arm-cr/qv/iar/qv_port.h b/ports/arm-cr/qv/iar/qv_port.h index 07a76fcb..e597402d 100644 --- a/ports/arm-cr/qv/iar/qv_port.h +++ b/ports/arm-cr/qv/iar/qv_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QV/C port to ARM Cortex-R, IAR-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-26 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QV/C port to ARM Cortex-R, IAR-ARM toolset */ #ifndef QV_PORT_H #define QV_PORT_H diff --git a/ports/arm-cr/qv/ti/qep_port.h b/ports/arm-cr/qv/ti/qep_port.h index 2e91c77e..a6607ff9 100644 --- a/ports/arm-cr/qv/ti/qep_port.h +++ b/ports/arm-cr/qv/ti/qep_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QEP/C port, generic C99 compiler -* @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C99 compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/arm-cr/qv/ti/qf_port.h b/ports/arm-cr/qv/ti/qf_port.h index 047abb8b..5f47722c 100644 --- a/ports/arm-cr/qv/ti/qf_port.h +++ b/ports/arm-cr/qv/ti/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to Cortex-R, cooperative QV kernel, TI-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-30 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to Cortex-R, cooperative QV kernel, TI-ARM toolset */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/arm-cr/qv/ti/qs_port.h b/ports/arm-cr/qv/ti/qs_port.h index 7617e3fb..e8b00882 100644 --- a/ports/arm-cr/qv/ti/qs_port.h +++ b/ports/arm-cr/qv/ti/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-25 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,14 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4 -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/arm-cr/qv/ti/qv_port.h b/ports/arm-cr/qv/ti/qv_port.h index 03652503..42a1f197 100644 --- a/ports/arm-cr/qv/ti/qv_port.h +++ b/ports/arm-cr/qv/ti/qv_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QV/C port to ARM Cortex-R, TI-ARM toolset -* @cond -****************************************************************************** -* Last Updated for Version: 5.7.0 -* Date of the Last Update: 2016-08-26 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QV/C port to ARM Cortex-R, TI-ARM toolset */ #ifndef QV_PORT_H #define QV_PORT_H diff --git a/ports/embos/qep_port.h b/ports/embos/qep_port.h index 11151482..a6607ff9 100644 --- a/ports/embos/qep_port.h +++ b/ports/embos/qep_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QEP/C port, generic C99 compiler -* @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.4.0 -* Date of the Last Update: 2015-04-08 +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Copyright (C) 2005 Quantum Leaps, LLC. state-machine.com. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* Web: www.state-machine.com/licensing -* Email: info@state-machine.com -****************************************************************************** -* @endcond +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C99 compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/embos/qf_port.c b/ports/embos/qf_port.c index a0b40f7d..fa82299d 100644 --- a/ports/embos/qf_port.c +++ b/ports/embos/qf_port.c @@ -1,41 +1,33 @@ -/** -* @file -* @brief QF/C port to embOS -* @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.3 -* Last updated on 2021-04-09 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to embOS */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -119,7 +111,7 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, (void *)&qSto[0]); me->prio = prio; /* save the QF priority */ - QF_add_(me); /* make QF aware of this active object */ + QActive_register_(me); /* make QF aware of this active object */ QHSM_INIT(&me->super, par, me->prio); /* the top-most initial tran. */ QS_FLUSH(); /* flush the trace buffer to the host */ @@ -155,13 +147,8 @@ void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) { } } /*..........................................................................*/ -#ifndef Q_SPY -bool QActive_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin) -#else bool QActive_post_(QActive * const me, QEvt const * const e, uint_fast16_t const margin, void const * const sender) -#endif /* Q_SPY */ { uint_fast16_t nFree; bool status; diff --git a/ports/embos/qf_port.h b/ports/embos/qf_port.h index ae6da02e..c8319a36 100644 --- a/ports/embos/qf_port.h +++ b/ports/embos/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to embOS -* @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 6.9.3 / embOS v4.34.1 -* Last updated on 2021-04-09 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: * * -****************************************************************************** +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to embOS * @endcond */ #ifndef QF_PORT_H @@ -69,9 +62,8 @@ enum EmbOS_TaskAttrs { #include "qmpool.h" /* this QP port uses the native QF memory pool */ #include "qf.h" /* QF platform-independent public interface */ - -/***************************************************************************** -* interface used only inside QF, but not in applications +/*==========================================================================*/ +/* interface used only inside QF, but not in applications */ #ifdef QP_IMPL @@ -100,8 +92,8 @@ enum EmbOS_TaskAttrs { #endif /* ifdef QP_IMPL */ -/***************************************************************************** -* NOTE1: +/*==========================================================================*/ +/* NOTE1: * The maximum number of active objects in QP can be increased to 63, * inclusive, but it can be reduced to save some memory. Also, the number of * active objects cannot exceed the number of embOS thread priorities, diff --git a/ports/embos/qs_port.h b/ports/embos/qs_port.h index 3f1a2b49..e8b00882 100644 --- a/ports/embos/qs_port.h +++ b/ports/embos/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last updated for version 5.6.0 -* Last updated on 2015-12-18 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,14 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4 -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/freertos/qep_port.h b/ports/freertos/qep_port.h index 1ad38b93..be4fa2d4 100644 --- a/ports/freertos/qep_port.h +++ b/ports/freertos/qep_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QEP/C port, generic C99 compiler -* @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 6.0.4 -* Date of the Last Update: 2018-01-04 +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Copyright (C) 2005 Quantum Leaps, LLC. state-machine.com. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-03 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C99 compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/freertos/qf_port.c b/ports/freertos/qf_port.c index 32063c86..637a8048 100644 --- a/ports/freertos/qf_port.c +++ b/ports/freertos/qf_port.c @@ -23,12 +23,11 @@ * ============================================================================*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-13 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QF/C port to FreeRTOS 10.x -* @ingroup ports */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -54,6 +53,27 @@ Q_DEFINE_THIS_MODULE("qf_port") /* Local objects -----------------------------------------------------------*/ static void task_function(void *pvParameters); /* FreeRTOS task signature */ +/* The following macro provides the number of free slots in the FreeRTOS +* queue. +* +* NOTE1: +* The official FreeRTOS API uxQueueSpacesAvailable() is not used +* here, because that API uses task-level critical section internally. +* Instead, the free slots calculation happens here in already +* established critical section. Unfortunately, the bizarre "information +* obfuscating" policy of FreeRTOS (incorrectly called "information +* hiding") forces the use of the StaticQueue_t with "dummy" members. +* This could potentially break in the future releases of FreeRTOS. +* +* Currently, the correspondence between xQUEUE and StaticQueue_t +* is as follows (see queue.c and FreeRTOS.h, respectively): +* +* xQUEUE.uxMessagesWaiting == StaticQueue_t.uxDummy4[0]; +* xQUEUE.uxLength == StaticQueue_t.uxDummy4[1]; +*/ +#define FREERTOS_QUEUE_GET_FREE(me_) \ + ((me_)->osObject.uxDummy4[1] - (me_)->osObject.uxDummy4[0]) + /*==========================================================================*/ void QF_init(void) { /* empty for FreeRTOS */ @@ -76,18 +96,24 @@ int_t QF_run(void) { void QF_stop(void) { QF_onCleanup(); /* cleanup callback */ } + +/*..........................................................................*/ +static void task_function(void *pvParameters) { /* FreeRTOS task signature */ + QActive *act = (QActive *)pvParameters; + + /* event-loop */ + for (;;) { /* for-ever */ + QEvt const *e = QActive_get_(act); + QHSM_DISPATCH(&act->super, e, act->prio); + QF_gc(e); /* check if the event is garbage, and collect it if so */ + } +} /*..........................................................................*/ void QActive_start_(QActive * const me, uint_fast8_t prio, QEvt const * * const qSto, uint_fast16_t const qLen, void * const stkSto, uint_fast16_t const stkSize, void const * const par) { - TaskHandle_t thr; - /* task name provided by the user in QF_setTaskName() or default name */ - char const *taskName = (me->thread.pxDummy1 != (void *)0) - ? (char const *)me->thread.pxDummy1 - : (char const *)"AO"; - Q_REQUIRE_ID(200, (0U < prio) && (prio <= QF_MAX_ACTIVE) /* in range */ && (qSto != (QEvt const **)0) /* queue storage must be provided */ @@ -95,24 +121,34 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, && (stkSto != (void *)0) /* stack storage must be provided */ && (stkSize > 0U)); /* stack size must be provided */ - /* create the event queue for the AO */ - QEQueue_init(&me->eQueue, qSto, qLen); + /* create FreeRTOS message queue */ + me->eQueue = xQueueCreateStatic( + (UBaseType_t)qLen, /* length of the queue */ + (UBaseType_t)sizeof(QEvt *), /* element size */ + (uint8_t *)qSto, /* storage buffer */ + &me->osObject); /* static queue buffer */ + Q_ASSERT_ID(210, me->eQueue != (QueueHandle_t)0); me->prio = prio; /* save the QF priority */ - QF_add_(me); /* make QF aware of this active object */ + QActive_register_(me); /* make QF aware of this active object */ QHSM_INIT(&me->super, par, me->prio); /* the top-most initial tran. */ QS_FLUSH(); /* flush the QS trace buffer to the host */ + /* task name provided by the user in QF_setTaskName() or default name */ + char const *taskName = (me->thread.pxDummy1 != (void *)0) + ? (char const *)me->thread.pxDummy1 + : (char const *)"AO"; + /* statically create the FreeRTOS task for the AO */ - thr = xTaskCreateStatic( + Q_ALLEGE_ID(220, + (TaskHandle_t)0 != xTaskCreateStatic( &task_function, /* the task function */ taskName , /* the name of the task */ - stkSize/sizeof(portSTACK_TYPE), /* stack size */ + stkSize/sizeof(portSTACK_TYPE), /* stack length */ (void *)me, /* the 'pvParameters' parameter */ - (UBaseType_t)(prio + tskIDLE_PRIORITY), /* FreeRTOS priority */ + FREERTOS_TASK_PRIO(prio), /* FreeRTOS priority */ (StackType_t *)stkSto, /* stack storage */ - &me->thread); /* task buffer */ - Q_ENSURE_ID(210, thr != (TaskHandle_t)0); /* must be created */ + &me->thread)); /* task buffer */ } /*..........................................................................*/ void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) { @@ -128,51 +164,28 @@ void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) { /* ... */ } } -/*..........................................................................*/ -static void task_function(void *pvParameters) { /* FreeRTOS task signature */ - QActive *act = (QActive *)pvParameters; - - /* event-loop */ - for (;;) { /* for-ever */ - QEvt const *e = QActive_get_(act); - QHSM_DISPATCH(&act->super, e, act->prio); - QF_gc(e); /* check if the event is garbage, and collect it if so */ - } -} /*==========================================================================*/ -/* The "FromISR" QP APIs for the FreeRTOS port... */ -#ifdef Q_SPY -bool QActive_postFromISR_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, - BaseType_t * const pxHigherPriorityTaskWoken, - void const * const sender) -#else -bool QActive_postFromISR_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, - BaseType_t * const pxHigherPriorityTaskWoken) -#endif +bool QActive_post_(QActive * const me, QEvt const * const e, + uint_fast16_t const margin, void const * const sender) { - QEQueueCtr nFree; /* temporary to avoid UB for volatile access */ + QF_CRIT_STAT_ + QF_CRIT_E_(); + + /* find out the number of free slots available in the queue */ + uint_fast16_t const nFree = (uint_fast16_t)FREERTOS_QUEUE_GET_FREE(me); + bool status; - UBaseType_t uxSavedInterruptState; - - /** @pre event pointer must be valid */ - Q_REQUIRE_ID(400, e != (QEvt *)0); - - uxSavedInterruptState = taskENTER_CRITICAL_FROM_ISR(); - nFree = me->eQueue.nFree; /* get volatile into the temporary */ - if (margin == QF_NO_MARGIN) { if (nFree > 0U) { status = true; /* can post */ } else { status = false; /* cannot post */ - Q_ERROR_ID(410); /* must be able to post the event */ + Q_ERROR_ID(510); /* must be able to post the event */ } } - else if (nFree > (QEQueueCtr)margin) { + else if (nFree > margin) { status = true; /* can post */ } else { @@ -182,45 +195,25 @@ bool QActive_postFromISR_(QActive * const me, QEvt const * const e, if (status) { /* can post the event? */ QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, me->prio) - QS_TIME_PRE_(); /* timestamp */ - QS_OBJ_PRE_(sender); /* the sender object */ - QS_SIG_PRE_(e->sig); /* the signal of the event */ - QS_OBJ_PRE_(me); /* this active object (recipient) */ + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object (recipient) */ QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ - QS_EQC_PRE_(nFree); /* number of free entries */ - QS_EQC_PRE_(me->eQueue.nMin); /* min number of free entries */ + QS_EQC_PRE_((QEQueueCtr)nFree); /* # free entries available */ + QS_EQC_PRE_(0U); /* min # free entries (unknown) */ QS_END_NOCRIT_PRE_() - /* is it a pool event? */ - if (e->poolId_ != 0U) { + if (e->poolId_ != 0U) { /* is it a pool event? */ QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ } - --nFree; /* one free entry just used up */ - me->eQueue.nFree = nFree; /* update the volatile */ - if (me->eQueue.nMin > nFree) { - me->eQueue.nMin = nFree; /* update minimum so far */ - } + QF_CRIT_X_(); - /* empty queue? */ - if (me->eQueue.frontEvt == (QEvt *)0) { - me->eQueue.frontEvt = e; /* deliver event directly */ - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); - - /* signal the event queue */ - vTaskNotifyGiveFromISR((TaskHandle_t)&me->thread, - pxHigherPriorityTaskWoken); - } - /* queue is not empty, insert event into the ring-buffer */ - else { - /* insert event into the ring buffer (FIFO) */ - QF_PTR_AT_(me->eQueue.ring, me->eQueue.head) = e; - if (me->eQueue.head == 0U) { /* need to wrap head? */ - me->eQueue.head = me->eQueue.end; /* wrap around */ - } - --me->eQueue.head; /* advance the head (counter clockwise) */ - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); - } + /* posting to the FreeRTOS message queue must succeed, see NOTE3 */ + Q_ALLEGE_ID(520, + xQueueSend(me->eQueue, (void const *)&e, portMAX_DELAY) + == pdPASS); } else { @@ -230,34 +223,136 @@ bool QActive_postFromISR_(QActive * const me, QEvt const * const e, QS_SIG_PRE_(e->sig); /* the signal of the event */ QS_OBJ_PRE_(me); /* this active object (recipient) */ QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ - QS_EQC_PRE_(nFree); /* number of free entries */ + QS_EQC_PRE_((QEQueueCtr)nFree); /* # free entries available */ QS_EQC_PRE_(margin); /* margin requested */ QS_END_NOCRIT_PRE_() - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); - - QF_gcFromISR(e); /* recycle the event to avoid a leak */ - } + QF_CRIT_X_(); + } return status; } /*..........................................................................*/ -#ifdef Q_SPY -void QF_publishFromISR_(QEvt const * const e, - BaseType_t * const pxHigherPriorityTaskWoken, - void const * const sender) -#else -void QF_publishFromISR_(QEvt const * const e, - BaseType_t * const pxHigherPriorityTaskWoken) -#endif +void QActive_postLIFO_(QActive * const me, QEvt const * const e) { + QF_CRIT_STAT_ + QF_CRIT_E_(); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_((QEQueueCtr)FREERTOS_QUEUE_GET_FREE(me)); /* # free */ + QS_EQC_PRE_(0U); /* min # free entries (unknown) */ + QS_END_NOCRIT_PRE_() + + if (e->poolId_ != 0U) { /* is it a pool event? */ + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ + } + + QF_CRIT_X_(); + + /* LIFO posting to the FreeRTOS queue must succeed */ + Q_ALLEGE_ID(610, + xQueueSendToBack(me->eQueue, (void const *)&e, portMAX_DELAY) + == pdPASS); +} +/*..........................................................................*/ +QEvt const *QActive_get_(QActive * const me) { + QEvt const *e; + xQueueReceive(me->eQueue, (void *)&e, portMAX_DELAY); + + QS_CRIT_STAT_ + QS_BEGIN_PRE_(QS_QF_ACTIVE_GET, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_((QEQueueCtr)FREERTOS_QUEUE_GET_FREE(me)); /* # free */ + QS_END_PRE_() + + return e; +} + +/*==========================================================================*/ +/* The "FromISR" QP APIs for the FreeRTOS port... */ +bool QActive_postFromISR_(QActive * const me, QEvt const * const e, + uint_fast16_t const margin, + BaseType_t * const pxHigherPriorityTaskWoken, + void const * const sender) { - QPSet subscrList; /* local, modifiable copy of the subscriber list */ - UBaseType_t uxSavedInterruptState; + UBaseType_t uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); + /* find out the number of free slots in the queue */ + uint_fast16_t const nFree = (uint_fast16_t)FREERTOS_QUEUE_GET_FREE(me); + + bool status; + if (margin == QF_NO_MARGIN) { + if (nFree > 0U) { + status = true; /* can post */ + } + else { + status = false; /* cannot post */ + Q_ERROR_ID(810); /* must be able to post the event */ + } + } + else if (nFree > margin) { + status = true; /* can post */ + } + else { + status = false; /* cannot post */ + } + + if (status) { /* can post the event? */ + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object (recipient) */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* # free entries available */ + QS_EQC_PRE_(0U); /* min # free entries (unknown) */ + QS_END_NOCRIT_PRE_() + + if (e->poolId_ != 0U) { /* is it a pool event? */ + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ + } + + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); + + /* posting to the FreeRTOS message queue must succeed */ + Q_ALLEGE_ID(820, + xQueueSendFromISR(me->eQueue, (void const *)&e, + pxHigherPriorityTaskWoken) + == pdTRUE); + } + else { + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_ATTEMPT, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object (recipient) */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* # free entries available */ + QS_EQC_PRE_(margin); /* margin requested */ + QS_END_NOCRIT_PRE_() + + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); + } + + return status; +} +/*..........................................................................*/ +void QActive_publishFromISR_(QEvt const * const e, + BaseType_t * const pxHigherPriorityTaskWoken, + void const * const sender) +{ /** @pre the published signal must be within the configured range */ - Q_REQUIRE_ID(500, e->sig < (QSignal)QF_maxPubSignal_); + Q_REQUIRE_ID(500, e->sig < (QSignal)QActive_maxPubSignal_); - uxSavedInterruptState = taskENTER_CRITICAL_FROM_ISR(); + UBaseType_t uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); QS_BEGIN_NOCRIT_PRE_(QS_QF_PUBLISH, 0U) QS_TIME_PRE_(); /* the timestamp */ @@ -279,8 +374,8 @@ void QF_publishFromISR_(QEvt const * const e, } /* make a local, modifiable copy of the subscriber list */ - subscrList = QF_PTR_AT_(QF_subscrList_, e->sig); - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + QPSet subscrList = QActive_subscrList_[e->sig]; + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); if (QPSet_notEmpty(&subscrList)) { /* any subscribers? */ /* the highest-prio subscriber */ @@ -289,10 +384,10 @@ void QF_publishFromISR_(QEvt const * const e, /* no need to lock the scheduler in the ISR context */ do { /* loop over all subscribers */ /* the prio of the AO must be registered with the framework */ - Q_ASSERT_ID(510, QF_active_[p] != (QActive *)0); + Q_ASSERT_ID(510, QActive_registry_[p] != (QActive *)0); /* QACTIVE_POST_FROM_ISR() asserts if the queue overflows */ - QACTIVE_POST_FROM_ISR(QF_active_[p], e, + QACTIVE_POST_FROM_ISR(QActive_registry_[p], e, pxHigherPriorityTaskWoken, sender); QPSet_remove(&subscrList, p); /* remove the handled subscriber */ @@ -314,17 +409,12 @@ void QF_publishFromISR_(QEvt const * const e, QF_gcFromISR(e); } /*..........................................................................*/ -#ifdef Q_SPY -void QF_tickXFromISR_(uint_fast8_t const tickRate, +void QTimeEvt_tickFromISR_(uint_fast8_t const tickRate, BaseType_t * const pxHigherPriorityTaskWoken, void const * const sender) -#else -void QF_tickXFromISR_(uint_fast8_t const tickRate, - BaseType_t * const pxHigherPriorityTaskWoken) -#endif { - QTimeEvt *prev = &QF_timeEvtHead_[tickRate]; - UBaseType_t uxSavedInterruptState = taskENTER_CRITICAL_FROM_ISR(); + QTimeEvt *prev = &QTimeEvt_timeEvtHead_[tickRate]; + UBaseType_t uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); QS_BEGIN_NOCRIT_PRE_(QS_QF_TICK, 0U) ++prev->ctr; @@ -339,13 +429,13 @@ void QF_tickXFromISR_(uint_fast8_t const tickRate, /* end of the list? */ if (t == (QTimeEvt *)0) { - /* any new time events armed since the last run of QF_tickX_()? */ - if (QF_timeEvtHead_[tickRate].act != (void *)0) { + /* any new time events armed since the last QTimeEvt_tick_()? */ + if (QTimeEvt_timeEvtHead_[tickRate].act != (void *)0) { /* sanity check */ Q_ASSERT_ID(610, prev != (QTimeEvt *)0); - prev->next = (QTimeEvt *)QF_timeEvtHead_[tickRate].act; - QF_timeEvtHead_[tickRate].act = (void *)0; + prev->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act; + QTimeEvt_timeEvtHead_[tickRate].act = (void *)0; t = prev->next; /* switch to the new list */ } else { @@ -357,10 +447,10 @@ void QF_tickXFromISR_(uint_fast8_t const tickRate, if (t->ctr == 0U) { prev->next = t->next; /* mark time event 't' as NOT linked */ - t->super.refCtr_ &= (uint8_t)(~TE_IS_LINKED); + t->super.refCtr_ &= (uint8_t)(~QTE_IS_LINKED); /* do NOT advance the prev pointer */ /* exit crit. section to reduce latency */ - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); } else { --t->ctr; @@ -378,7 +468,7 @@ void QF_tickXFromISR_(uint_fast8_t const tickRate, else { prev->next = t->next; /* mark time event 't' as NOT linked */ - t->super.refCtr_ &= (uint8_t)(~TE_IS_LINKED); + t->super.refCtr_ &= (uint8_t)(~QTE_IS_LINKED); /* do NOT advance the prev pointer */ QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_AUTO_DISARM, act->prio) @@ -397,7 +487,7 @@ void QF_tickXFromISR_(uint_fast8_t const tickRate, QS_END_NOCRIT_PRE_() /* exit critical section before posting */ - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); /* QACTIVE_POST_FROM_ISR() asserts if the queue overflows */ QACTIVE_POST_FROM_ISR(act, &t->super, @@ -407,41 +497,35 @@ void QF_tickXFromISR_(uint_fast8_t const tickRate, else { prev = t; /* advance to this time event */ /* exit crit. section to reduce latency */ - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); } } /* re-enter crit. section to continue */ - uxSavedInterruptState = taskENTER_CRITICAL_FROM_ISR(); + uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); } - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); } /*..........................................................................*/ QEvt *QF_newXFromISR_(uint_fast16_t const evtSize, uint_fast16_t const margin, enum_t const sig) { - QEvt *e; - uint_fast8_t idx; -#ifdef Q_SPY - UBaseType_t uxSavedInterruptState; -#endif /* Q_SPY */ - /* find the pool index that fits the requested event size ... */ + uint_fast8_t idx; for (idx = 0U; idx < QF_maxPool_; ++idx) { - if (evtSize <= QF_EPOOL_EVENT_SIZE_(QF_pool_[idx])) { + if (evtSize <= QF_EPOOL_EVENT_SIZE_(QF_ePool_[idx])) { break; } } /* cannot run out of registered pools */ Q_ASSERT_ID(710, idx < QF_maxPool_); - /* get e -- platform-dependent */ #ifdef Q_SPY - e = QMPool_getFromISR(&QF_pool_[idx], + QEvt *e = QMPool_getFromISR(&QF_ePool_[idx], ((margin != QF_NO_MARGIN) ? margin : 0U), (uint_fast8_t)QS_EP_ID + idx + 1U); #else - e = QMPool_getFromISR(&QF_pool_[idx], + QEvt *e = QMPool_getFromISR(&QF_ePool_[idx], ((margin != QF_NO_MARGIN) ? margin : 0U), 0U); #endif @@ -452,13 +536,13 @@ QEvt *QF_newXFromISR_(uint_fast16_t const evtSize, e->refCtr_ = 0U; /* set the reference counter to 0 */ #ifdef Q_SPY - uxSavedInterruptState = taskENTER_CRITICAL_FROM_ISR(); + UBaseType_t uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); QS_BEGIN_PRE_(QS_QF_NEW, (uint_fast8_t)QS_EP_ID + e->poolId_) QS_TIME_PRE_(); /* timestamp */ QS_EVS_PRE_(evtSize); /* the size of the event */ QS_SIG_PRE_(sig); /* the signal of the event */ QS_END_NOCRIT_PRE_() - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); #endif /* Q_SPY */ } /* event cannot be allocated */ @@ -467,13 +551,13 @@ QEvt *QF_newXFromISR_(uint_fast16_t const evtSize, Q_ASSERT_ID(720, margin != QF_NO_MARGIN); #ifdef Q_SPY - uxSavedInterruptState = taskENTER_CRITICAL_FROM_ISR(); + UBaseType_t uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); QS_BEGIN_PRE_(QS_QF_NEW_ATTEMPT, (uint_fast8_t)QS_EP_ID + idx + 1U) QS_TIME_PRE_(); /* timestamp */ QS_EVS_PRE_(evtSize); /* the size of the event */ QS_SIG_PRE_(sig); /* the signal of the event */ QS_END_NOCRIT_PRE_() - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); #endif /* Q_SPY */ } return e; /* can't be NULL if we can't tolerate bad allocation */ @@ -483,8 +567,7 @@ void QF_gcFromISR(QEvt const * const e) { /* is it a dynamic event? */ if (e->poolId_ != 0U) { - UBaseType_t uxSavedInterruptState; - uxSavedInterruptState = taskENTER_CRITICAL_FROM_ISR(); + UBaseType_t uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); /* isn't this the last ref? */ if (e->refCtr_ > 1U) { @@ -496,7 +579,7 @@ void QF_gcFromISR(QEvt const * const e) { QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ QS_END_NOCRIT_PRE_() - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); } /* this is the last reference to this event, recycle it */ else { @@ -508,7 +591,7 @@ void QF_gcFromISR(QEvt const * const e) { QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ QS_END_NOCRIT_PRE_() - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); /* pool ID must be in range */ Q_ASSERT_ID(810, idx < QF_maxPool_); @@ -516,18 +599,16 @@ void QF_gcFromISR(QEvt const * const e) { #ifdef Q_SPY /* cast 'const' away in (QEvt *)e is OK, * because it's a pool event */ - QMPool_putFromISR(&QF_pool_[idx], (QEvt *)e, + QMPool_putFromISR(&QF_ePool_[idx], (QEvt *)e, (uint_fast8_t)QS_EP_ID + e->poolId_); #else - QMPool_putFromISR(&QF_pool_[idx], (QEvt *)e, 0U); + QMPool_putFromISR(&QF_ePool_[idx], (QEvt *)e, 0U); #endif } } } /*..........................................................................*/ void QMPool_putFromISR(QMPool * const me, void *b, uint_fast8_t const qs_id) { - UBaseType_t uxSavedInterruptState; - /** @pre # free blocks cannot exceed the total # blocks and * the block pointer must be from this pool. */ @@ -536,7 +617,7 @@ void QMPool_putFromISR(QMPool * const me, void *b, uint_fast8_t const qs_id) { (void)qs_id; /* unused parameter (outside Q_SPY build configuration) */ - uxSavedInterruptState = taskENTER_CRITICAL_FROM_ISR(); + UBaseType_t uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); ((QFreeBlock *)b)->next = (QFreeBlock *)me->free_head;/* link into list */ me->free_head = b; /* set as new head of the free list */ @@ -548,20 +629,18 @@ void QMPool_putFromISR(QMPool * const me, void *b, uint_fast8_t const qs_id) { QS_MPC_PRE_(me->nFree); /* # free blocks in the pool */ QS_END_NOCRIT_PRE_() - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); } /*..........................................................................*/ void *QMPool_getFromISR(QMPool * const me, uint_fast16_t const margin, uint_fast8_t const qs_id) { - QFreeBlock *fb; - UBaseType_t uxSavedInterruptState; - (void)qs_id; /* unused parameter (outside Q_SPY build configuration) */ - uxSavedInterruptState = taskENTER_CRITICAL_FROM_ISR(); + UBaseType_t uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); /* have more free blocks than the requested margin? */ + QFreeBlock *fb; if (me->nFree > (QMPoolCtr)margin) { void *fb_next; fb = (QFreeBlock *)me->free_head; /* get a free block */ @@ -615,7 +694,7 @@ void *QMPool_getFromISR(QMPool * const me, uint_fast16_t const margin, QS_MPC_PRE_(margin); /* the requested margin */ QS_END_NOCRIT_PRE_() } - taskEXIT_CRITICAL_FROM_ISR(uxSavedInterruptState); + portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus); return fb; /* return the pointer to memory block or NULL to the caller */ } diff --git a/ports/freertos/qf_port.h b/ports/freertos/qf_port.h index 9d57e745..6544c159 100644 --- a/ports/freertos/qf_port.h +++ b/ports/freertos/qf_port.h @@ -1,47 +1,40 @@ -/** -* @file -* @brief QF/C port to FreeRTOS 10.x, ARM Cortex-M, IAR-ARM toolset -* @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-10 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to FreeRTOS 10.x */ #ifndef QF_PORT_H #define QF_PORT_H /* FreeRTOS event queue and thread types */ -#define QF_EQUEUE_TYPE QEQueue +#define QF_EQUEUE_TYPE QueueHandle_t +#define QF_OS_OBJECT_TYPE StaticQueue_t #define QF_THREAD_TYPE StaticTask_t /* The maximum number of active objects in the application, see NOTE1 */ @@ -57,76 +50,71 @@ #define QF_CRIT_EXIT(stat_) taskEXIT_CRITICAL() #include "FreeRTOS.h" /* FreeRTOS master include file, see NOTE4 */ -#include "task.h" /* FreeRTOS task management */ +#include "task.h" /* FreeRTOS task management */ +#include "queue.h" /* FreeRTOS queue management */ #include "qep_port.h" /* QEP port */ -#include "qequeue.h" /* this QP port uses the native QF event queue */ -#include "qmpool.h" /* this QP port uses the native QF memory pool */ +#include "qequeue.h" /* QF event queue (for deferring events) */ +#include "qmpool.h" /* QF memory pool (for event pools) */ #include "qf.h" /* QF platform-independent public interface */ /* the "FromISR" versions of the QF APIs, see NOTE3 */ #ifdef Q_SPY - #define QACTIVE_POST_FROM_ISR(me_, e_, pxHigherPrioTaskWoken_, sender_) \ - ((void)QActive_postFromISR_((me_), (e_), QF_NO_MARGIN, \ - (pxHigherPrioTaskWoken_), (sender_))) - #define QACTIVE_POST_X_FROM_ISR(me_, e_, margin_, \ - pxHigherPrioTaskWoken_, sender_) \ - (QActive_postFromISR_((me_), (e_), (margin_), \ - (pxHigherPrioTaskWoken_), (sender_))) +#define QACTIVE_POST_FROM_ISR(me_, e_, pxHigherPrioTaskWoken_, sender_) \ + ((void)QActive_postFromISR_((me_), (e_), QF_NO_MARGIN, \ + (pxHigherPrioTaskWoken_), (sender_))) - #define QF_PUBLISH_FROM_ISR(e_, pxHigherPrioTaskWoken_, sender_) \ - (QF_publishFromISR_((e_), (pxHigherPrioTaskWoken_), \ - (void const *)(sender_))) +#define QACTIVE_POST_X_FROM_ISR(me_, e_, margin_, \ + pxHigherPrioTaskWoken_, sender_) \ + (QActive_postFromISR_((me_), (e_), (margin_), \ + (pxHigherPrioTaskWoken_), (sender_))) - #define QF_TICK_X_FROM_ISR(tickRate_, pxHigherPrioTaskWoken_, sender_) \ - (QF_tickXFromISR_((tickRate_), (pxHigherPrioTaskWoken_), (sender_))) +#define QACTIVE_PUBLISH_FROM_ISR(e_, pxHigherPrioTaskWoken_, sender_) \ + (QActive_publishFromISR_((e_), (pxHigherPrioTaskWoken_), \ + (void const *)(sender_))) - /* this function only to be used through macros QACTIVE_POST_FROM_ISR() - * and QACTIVE_POST_X_FROM_ISR(). - */ - bool QActive_postFromISR_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, - BaseType_t * const pxHigherPriorityTaskWoken, - void const * const sender); +#define QTIMEEVT_TICK_FROM_ISR(tickRate_, pxHigherPrioTaskWoken_, sender_) \ + (QTimeEvt_tickFromISR_((tickRate_), (pxHigherPrioTaskWoken_), (sender_))) - void QF_publishFromISR_(QEvt const * const e, - BaseType_t * const pxHigherPriorityTaskWoken, - void const * const sender); +#else /* ndef Q_SPY */ - void QF_tickXFromISR_(uint_fast8_t const tickRate, - BaseType_t * const pxHigherPriorityTaskWoken, - void const * const sender); -#else - #define QACTIVE_POST_FROM_ISR(me_, e_, pxHigherPrioTaskWoken_, dummy) \ - ((void)QActive_postFromISR_((me_), (e_), QF_NO_MARGIN, \ - (pxHigherPrioTaskWoken_))) +#define QACTIVE_POST_FROM_ISR(me_, e_, pxHigherPrioTaskWoken_, dummy) \ + ((void)QActive_postFromISR_((me_), (e_), QF_NO_MARGIN, \ + (pxHigherPrioTaskWoken_), (void *)0)) - #define QACTIVE_POST_X_FROM_ISR(me_, e_, margin_, \ - pxHigherPrioTaskWoken_, dummy) \ - (QActive_postFromISR_((me_), (e_), (margin_), \ - (pxHigherPrioTaskWoken_))) +#define QACTIVE_POST_X_FROM_ISR(me_, e_, margin_, \ + pxHigherPrioTaskWoken_, dummy) \ + (QActive_postFromISR_((me_), (e_), (margin_), \ + (pxHigherPrioTaskWoken_), (void *)0)) - #define QF_PUBLISH_FROM_ISR(e_, pxHigherPrioTaskWoken_, dummy) \ - (QF_publishFromISR_((e_), (pxHigherPrioTaskWoken_))) +#define QACTIVE_PUBLISH_FROM_ISR(e_, pxHigherPrioTaskWoken_, dummy) \ + (QActive_publishFromISR_((e_), (pxHigherPrioTaskWoken_), \ + (void *)0)) - #define QF_TICK_X_FROM_ISR(tickRate_, pxHigherPrioTaskWoken_, dummy) \ - (QF_tickXFromISR_((tickRate_), (pxHigherPrioTaskWoken_))) +#define QTIMEEVT_TICK_FROM_ISR(tickRate_, pxHigherPrioTaskWoken_, dummy) \ + (QTimeEvt_tickFromISR_((tickRate_), (pxHigherPrioTaskWoken_), (void *)0)) - bool QActive_postFromISR_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, - BaseType_t * const pxHigherPriorityTaskWoken); +#endif /* Q_SPY */ - void QF_publishFromISR_(QEvt const * const e, - BaseType_t * const pxHigherPriorityTaskWoken); +/* this function only to be used through macros QACTIVE_POST_FROM_ISR() +* and QACTIVE_POST_X_FROM_ISR(). +*/ +bool QActive_postFromISR_(QActive * const me, QEvt const * const e, + uint_fast16_t const margin, + BaseType_t * const pxHigherPriorityTaskWoken, + void const * const sender); - void QF_tickXFromISR_(uint_fast8_t const tickRate, - BaseType_t * const pxHigherPriorityTaskWoken); +void QActive_publishFromISR_(QEvt const * const e, + BaseType_t * const pxHigherPriorityTaskWoken, + void const * const sender); -#endif +void QTimeEvt_tickFromISR_(uint_fast8_t const tickRate, + BaseType_t * const pxHigherPriorityTaskWoken, + void const * const sender); #define QF_TICK_FROM_ISR(pxHigherPrioTaskWoken_, sender_) \ - QF_TICK_X_FROM_ISR(0U, pxHigherPrioTaskWoken_, sender_) + QTIMEEVT_TICK_FROM_ISR(0U, pxHigherPrioTaskWoken_, sender_) #ifdef Q_EVT_CTOR /* Shall the ctor for the ::QEvt class be provided? */ @@ -190,24 +178,28 @@ enum FreeRTOS_TaskAttrs { * interface used only inside QF, but not in applications */ #ifdef QP_IMPL - /* FreeRTOS blocking for event queue implementation (task level) */ - #define QACTIVE_EQUEUE_WAIT_(me_) \ - while ((me_)->eQueue.frontEvt == (QEvt *)0) { \ - QF_CRIT_X_(); \ - ulTaskNotifyTake(pdTRUE, portMAX_DELAY); \ - QF_CRIT_E_(); \ - } + #define FREERTOS_TASK_PRIO(qp_prio_) \ + ((UBaseType_t)((qp_prio_) + tskIDLE_PRIORITY)) - /* FreeRTOS signaling (unblocking) for event queue (task level) */ - #define QACTIVE_EQUEUE_SIGNAL_(me_) do { \ - QF_CRIT_X_(); \ - xTaskNotifyGive((TaskHandle_t)&(me_)->thread); \ - QF_CRIT_E_(); \ - } while (false) + /* FreeRTOS scheduler locking for QF_publish_() (task context only) */ + #define QF_SCHED_STAT_ \ + UBaseType_t curr_prio; \ + TaskHandle_t curr_task; + #define QF_SCHED_LOCK_(prio_) do { \ + curr_task = xTaskGetCurrentTaskHandle(); \ + curr_prio = uxTaskPriorityGet(curr_task); \ + if (FREERTOS_TASK_PRIO(prio_) > curr_prio) { \ + vTaskPrioritySet(curr_task, FREERTOS_TASK_PRIO(prio_));\ + } \ + else { \ + curr_prio = tskIDLE_PRIORITY; \ + } \ + } while (0) - #define QF_SCHED_STAT_ - #define QF_SCHED_LOCK_(dummy) vTaskSuspendAll() - #define QF_SCHED_UNLOCK_() xTaskResumeAll() + #define QF_SCHED_UNLOCK_() \ + if (curr_prio != tskIDLE_PRIORITY) { \ + vTaskPrioritySet(curr_task, curr_prio); \ + } else ((void)0) /* native QF event pool operations */ #define QF_EPOOL_TYPE_ QMPool @@ -238,6 +230,11 @@ enum FreeRTOS_TaskAttrs { * provides the "FromISR" variants for QP functions and "FROM_ISR" variants * for QP macros to be used inside ISRs. ONLY THESE "FROM_ISR" VARIANTS * ARE ALLOWED INSIDE ISRs AND CALLING THE TASK-LEVEL APIs IS AN ERROR. +* +* NOTE4: +* FreeRTOS does not support selective scheduler locking (up to the given +* priority ceiling). Therefore, this port uses only the crude global +* scheduler locking. */ #endif /* QF_PORT_H */ diff --git a/ports/freertos/qs_port.h b/ports/freertos/qs_port.h index 93e00ed3..e8b00882 100644 --- a/ports/freertos/qs_port.h +++ b/ports/freertos/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 6.0.4 -* Date of the Last Update: 2018-01-04 +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Copyright (C) 2005 Quantum Leaps, LLC. state-machine.com. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,14 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4 -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which -* case the separate definitions of the macros Q_ROM, QF_CRIT_STAT_TYPE, +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/lint-plus/16bit/qs_port.h b/ports/lint-plus/16bit/qs_port.h index 8a9ac734..97568991 100644 --- a/ports/lint-plus/16bit/qs_port.h +++ b/ports/lint-plus/16bit/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 16-bit CPU and generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last updated for version 6.8.2 -* Last updated on 2020-07-18 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H diff --git a/ports/lint-plus/32bit/qs_port.h b/ports/lint-plus/32bit/qs_port.h index 2faf2eaf..b1c77d47 100644 --- a/ports/lint-plus/32bit/qs_port.h +++ b/ports/lint-plus/32bit/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-19 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,8 +44,8 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4U -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" diff --git a/ports/lint-plus/lin.bat b/ports/lint-plus/lin.bat index 829680b4..0d83eb4f 100644 --- a/ports/lint-plus/lin.bat +++ b/ports/lint-plus/lin.bat @@ -1,69 +1,69 @@ -@echo off -:: =========================================================================== -:: Batch script for linting QP/C with PC-Lint-Plus -:: Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. -:: -:: SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial -:: -:: This software is dual-licensed under the terms of the open source GNU -:: General Public License version 3 (or any later version), or alternatively, -:: under the terms of one of the closed source Quantum Leaps commercial -:: licenses. -:: -:: The terms of the open source GNU General Public License version 3 -:: can be found at: -:: -:: The terms of the closed source Quantum Leaps commercial licenses -:: can be found at: -:: -:: Redistributions in source code must retain this top-level comment block. -:: Plagiarizing this software to sidestep the license obligations is illegal. -:: -:: Contact information: -:: -:: -:: =========================================================================== -@setlocal - -:: usage of lin.bat -@echo Usage: lin [16bit] [-d...] -@echo examples: -@echo lin -uQ_SPY -uQ_UTEST : use 32bit CPU (default) and undefine Q_SPY/Q_UTEST -@echo lin 16bit -uQ_SPY : use 16bit CPU includes and undefine Q_SPY -@echo. - -:: NOTE: adjust to for your installation directory of PC-Lint-Plus -@set PCLP=C:\tools\lint-plus\windows\pclp32.exe - -if NOT exist "%PCLP%" ( - @echo The PC-Lint-Plus toolset not found. Please adjust lin.bat - @goto end -) - -:: set the QP/C directory -@set QPC=..\.. - -if "%1"=="16bit" ( - set LINTFLAGS=std.lnt -i16bit options.lnt %2 %3 %4 - @echo 16bit CPU -) else ( - set LINTFLAGS=std.lnt -i32bit options.lnt %1 %2 %3 %4 - @echo 32bit CPU default -) - -:: cleanup -@del *.log - -:: linting ------------------------------------------------------------------- -%PCLP% -os(lint_qf.log) %LINTFLAGS% -iqv ..\..\src\qf\*.c - -%PCLP% -os(lint_qv.log) %LINTFLAGS% -iqv ..\..\src\qv\*.c - -%PCLP% -os(lint_qk.log) %LINTFLAGS% -iqk ..\..\src\qk\*.c - -%PCLP% -os(lint_qxk.log) %LINTFLAGS% -iqxk ..\..\src\qxk\*.c - -%PCLP% -os(lint_qs.log) %LINTFLAGS% -iqv ..\..\src\qs\*.c - -:end -@endlocal +@echo off +:: =========================================================================== +:: Batch script for linting QP/C with PC-Lint-Plus +:: Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +:: +:: SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +:: +:: This software is dual-licensed under the terms of the open source GNU +:: General Public License version 3 (or any later version), or alternatively, +:: under the terms of one of the closed source Quantum Leaps commercial +:: licenses. +:: +:: The terms of the open source GNU General Public License version 3 +:: can be found at: +:: +:: The terms of the closed source Quantum Leaps commercial licenses +:: can be found at: +:: +:: Redistributions in source code must retain this top-level comment block. +:: Plagiarizing this software to sidestep the license obligations is illegal. +:: +:: Contact information: +:: +:: +:: =========================================================================== +@setlocal + +:: usage of lin.bat +@echo Usage: lin [16bit] [-d...] +@echo examples: +@echo lin -uQ_SPY -uQ_UTEST : use 32bit CPU (default) and undefine Q_SPY/Q_UTEST +@echo lin 16bit -uQ_SPY : use 16bit CPU includes and undefine Q_SPY +@echo. + +:: NOTE: adjust to for your installation directory of PC-Lint-Plus +@set PCLP=C:\tools\lint-plus\windows\pclp64.exe + +if NOT exist "%PCLP%" ( + @echo The PC-Lint-Plus toolset not found. Please adjust lin.bat + @goto end +) + +:: set the QP/C directory +@set QPC=..\.. + +if "%1"=="16bit" ( + set LINTFLAGS=std.lnt -i16bit options.lnt %2 %3 %4 + @echo 16bit CPU +) else ( + set LINTFLAGS=std.lnt -i32bit options.lnt %1 %2 %3 %4 + @echo 32bit CPU default +) + +:: cleanup +@del *.log + +:: linting ------------------------------------------------------------------- +%PCLP% -os(lint_qf.log) %LINTFLAGS% -iqv ..\..\src\qf\*.c + +%PCLP% -os(lint_qv.log) %LINTFLAGS% -iqv ..\..\src\qv\*.c + +%PCLP% -os(lint_qk.log) %LINTFLAGS% -iqk ..\..\src\qk\*.c + +%PCLP% -os(lint_qxk.log) %LINTFLAGS% -iqxk ..\..\src\qxk\*.c + +%PCLP% -os(lint_qs.log) %LINTFLAGS% -iqv ..\..\src\qs\*.c + +:end +@endlocal diff --git a/ports/lint-plus/options.lnt b/ports/lint-plus/options.lnt index ce6aa1ba..15873938 100644 --- a/ports/lint-plus/options.lnt +++ b/ports/lint-plus/options.lnt @@ -22,8 +22,8 @@ // // //============================================================================ -//! @date Last updated on: 2021-12-23 -//! @version Last updated for version: 7.0.0 +//! @date Last updated on: 2022-07-24 +//! @version Last updated for version: 7.0.1 //! //! @file //! @brief PC-Lint-Plus option file for linting QP/C source code @@ -37,7 +37,6 @@ // include directories -i. // QP/C port includes (see also qk/ and qv/) -i%QPC%/include // QP/C public includes --i%QPC%/src // QP/C package-scope includes // standards // language standard... @@ -67,6 +66,7 @@ qpc.lnt // QP/C options -esym(9026, QEP_ENTER_, QEP_EXIT_, + QEP_TRIG_, QMSM_CAST_, QACTIVE_CAST_) @@ -137,7 +137,7 @@ qpc.lnt // QP/C options // M3-R11.5(A) conversion from pointer to void to other pointer type -efunc(9079, QMPool_init, - QF_tickX_, + QTimeEvt_tick_, QTimeEvt_armX, QTimeEvt_rearm) diff --git a/ports/lint-plus/qep_port.h b/ports/lint-plus/qep_port.h index eee35ab7..8ae53491 100644 --- a/ports/lint-plus/qep_port.h +++ b/ports/lint-plus/qep_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QEP/C port, generic C11 compiler -* @ingroup qep -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-21 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C11 compiler */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/lint-plus/qk/qf_port.h b/ports/lint-plus/qk/qf_port.h index c383bb1b..945d8718 100644 --- a/ports/lint-plus/qk/qf_port.h +++ b/ports/lint-plus/qk/qf_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QF/C port example for QK, generic C compiler. -* @ingroup qk -* @cond -****************************************************************************** -* Last updated for version 6.8.2 -* Last updated on 2020-07-17 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QEP/C port to ARM Cortex-M, GNU-ARM * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port example for QK, generic C compiler. */ #ifndef QF_PORT_H #define QF_PORT_H @@ -47,7 +39,7 @@ void intDisable(void); void intEnable(void); -/* QF critical section mechansim */ +/* QF critical section mechanism */ #define QF_CRIT_STAT_TYPE crit_stat_t #define QF_CRIT_ENTRY(stat_) ((stat_) = critEntry()) #define QF_CRIT_EXIT(stat_) critExit(stat_) @@ -58,7 +50,5 @@ void critExit(crit_stat_t stat); #include "qep_port.h" /* QEP port */ #include "qk_port.h" /* QK port */ -#include "qf.h" /* QF platform-independent public interface */ #endif /* QF_PORT_H */ - diff --git a/ports/lint-plus/qk/qk_port.h b/ports/lint-plus/qk/qk_port.h index 874030fc..152c11ba 100644 --- a/ports/lint-plus/qk/qk_port.h +++ b/ports/lint-plus/qk/qk_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QK/C port example for a generic C compiler. -* @ingroup qk -* @cond -****************************************************************************** -* Last updated for version 6.7.0 -* Last updated on 2019-12-18 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QK/C port example for a generic C compiler. */ #ifndef QK_PORT_H #define QK_PORT_H @@ -45,13 +37,7 @@ /*! enable the context-switch callback */ #define QK_ON_CONTEXT_SW 1 -/*! determination if the code executes in the ISR context */ -/** -* @note This is just an example of #QK_ISR_CONTEXT_ (for ARM Cortex-M). -* You need to define the macro appropriately for the CPU/compiler you're -* using. Also, some QK ports will not define this macro, but instead might -* test the interrupt nesting up-down counter (QK_intNest_). -*/ +/*! determination if the code executes in the ISR context (ARM Cortex-M) */ #define QK_ISR_CONTEXT_() (get_IPSR() != 0U) /* QK interrupt entry and exit... */ @@ -66,8 +52,8 @@ */ #define QK_ISR_ENTRY() do { \ QF_INT_DISABLE(); \ - ++QK_intNest_; \ - QF_QS_ISR_ENTRY(QK_intNest_, QK_currPrio_); \ + ++QF_intNest_; \ + QF_QS_ISR_ENTRY(QF_intNest_, QK_currPrio_); \ QF_INT_ENABLE(); \ } while (false) @@ -82,8 +68,8 @@ */ #define QK_ISR_EXIT() do { \ QF_INT_DISABLE(); \ - --QK_intNest_; \ - if (QK_intNest_ == 0U) { \ + --QF_intNest_; \ + if (QF_intNest_ == 0U) { \ if (QK_sched_() != 0U) { \ QK_activate_(); \ } \ diff --git a/ports/lint-plus/qpc.lnt b/ports/lint-plus/qpc.lnt index 5c5dae27..f12805e1 100644 --- a/ports/lint-plus/qpc.lnt +++ b/ports/lint-plus/qpc.lnt @@ -67,6 +67,7 @@ Q_ASSERT_STATIC, Q_ASSERT_COMPILE, Q_DEFINE_THIS_MODULE, + Q_UNUSED_PAR, Q_DIM) // definition of macro ends in semicolon @@ -87,6 +88,7 @@ Q_IGNORED, Q_HSM_UPCAST, Q_EVT_CAST, + QEVT_INITIALIZER, Q_UINT2PTR_CAST, Q_STATE_CAST, Q_ACTION_CAST, @@ -194,14 +196,14 @@ Q_NEW_X, Q_NEW_REF, Q_DELETE_REF, + QF_PUBLISH, + QF_TICK_X, + QF_TICK, QF_INT_DISABLE, QF_INT_ENABLE, QF_CRIT_ENTRY, QF_CRIT_EXIT, QF_CRIT_EXIT_NOP, - QF_TICK, - QF_TICK_X, - QF_PUBLISH, QF_MPOOL_EL, QF_LOG2, QF_QS_CRIT_ENTRY, @@ -218,9 +220,12 @@ QACTIVE_POST, QACTIVE_POST_X, QACTIVE_POST_LIFO, + QACTIVE_PUBLISH, QACTIVE_EQUEUE_WAIT_, QACTIVE_EQUEUE_SIGNAL_, - QACTIVE_EQUEUE_ONEMPTY_) + QACTIVE_EQUEUE_ONEMPTY_, + QTIMEEVT_TICK, + QTIMEEVT_TICK_X) // M3-R10.3(R) cannot assign enum to different essential type 'int_t' -emacro(9034, diff --git a/ports/lint-plus/qv/qf_port.h b/ports/lint-plus/qv/qf_port.h index 2e540edd..748fe467 100644 --- a/ports/lint-plus/qv/qf_port.h +++ b/ports/lint-plus/qv/qf_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QF/C port example for QV, generic C compiler. -* @ingroup qv -* @cond -****************************************************************************** -* Last updated for version 6.8.2 -* Last updated on 2020-07-17 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port example for QV, generic C compiler. */ #ifndef QF_PORT_H #define QF_PORT_H @@ -47,7 +39,7 @@ void intDisable(void); void intEnable(void); -/* QF critical section mechansim */ +/* QF critical section mechanism */ #define QF_CRIT_STAT_TYPE crit_stat_t #define QF_CRIT_ENTRY(stat_) ((stat_) = critEntry()) #define QF_CRIT_EXIT(stat_) critExit(stat_) @@ -58,7 +50,6 @@ void critExit(crit_stat_t stat); #include "qep_port.h" /* QEP port */ #include "qv_port.h" /* QV port */ -#include "qf.h" /* QF platform-independent public interface */ #endif /* QF_PORT_H */ diff --git a/ports/lint-plus/qv/qv_port.h b/ports/lint-plus/qv/qv_port.h index 1ff90b81..0a5243bd 100644 --- a/ports/lint-plus/qv/qv_port.h +++ b/ports/lint-plus/qv/qv_port.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief QV/C port example for a generic C compiler. -* @ingroup qv -* @cond -****************************************************************************** -* Last updated for version 6.8.2 -* Last updated on 2020-07-17 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QV/C port example for a generic C compiler. */ #ifndef QV_PORT_H #define QV_PORT_H diff --git a/ports/lint-plus/qxk/qf_port.h b/ports/lint-plus/qxk/qf_port.h index e786745a..01207481 100644 --- a/ports/lint-plus/qxk/qf_port.h +++ b/ports/lint-plus/qxk/qf_port.h @@ -23,264 +23,32 @@ * ============================================================================*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @ingroup qf * @brief QF/C port example for QXK, generic C99 compiler. -* @description -* This is an example QP/C port with the documentation for the main -* items, such as configuration macros, functions, and includes. */ #ifndef QF_PORT_H #define QF_PORT_H -/*! 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.h 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. */ -/** -* @description -* This macro can be defined in the QF ports and should be in range -* of 1U..255U, inclusive. The value of this macro determines the maximum -* event pools in the system. Not all event pools must be actually used, -* but the maximum number of pools cannot exceed #QF_MAX_EPOOL. -* -* If the macro is not defined, the default value is 3U. Defining the value -* below the maximum saves some memory, mostly for the subscriber-lists. -* @sa ::QSubscrList. -* -* @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.h 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 ::QEvtSize -* type. If the macro is not defined, the default of 2 byte will be chosen in -* qf.h. The valid #QF_EVENT_SIZ_SIZE values of 1U, 2U, or 4U, correspond -* to ::QEvtSize of uint8_t, uint16_t, and uint32_t, respectively. The -* ::QEvtSize data type determines the dynamic range of event-sizes in -* your application. -* @sa QF_poolInit(), QF_new_() -* -* @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.h 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 ::QEQueueCtr -* type. If the macro is not defined, the default of 1 byte will be chosen in -* qequeue.h. The valid #QF_EQUEUE_CTR_SIZE values of 1U, 2U, or 4U, correspond -* to ::QEQueueCtr of uint8_t, uint16_t, and uint32_t, respectively. The -* ::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 ::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.h 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 #QF_EVENT_SIZ_SIZE. -*/ -/** -* @description -* This macro can be defined in the QF ports to configure the ::QMPoolSize -* type. If the macro is not defined, the default of #QF_EVENT_SIZ_SIZE -* will be chosen in qmpool.h, 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 -* ::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The -* ::QMPoolSize data type determines the dynamic range of block-sizes that -* the native ::QMPool can handle. -* @sa #QF_EVENT_SIZ_SIZE, ::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.h 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 ::QMPoolCtr -* type. If the macro is not defined, the default of 2 bytes will be chosen -* in qmpool.h. The valid #QF_MPOOL_CTR_SIZE values of 1U, 2U, or 4U, -* correspond to ::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. -* The ::QMPoolCtr data type determines the dynamic range of block-counters -* that the native ::QMPool can handle, or, in other words, the maximum number -* of blocks that the native QF event pool can manage. -* @sa ::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.h 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 ::QTimeEvt struct. 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 2 -* bytes will be chosen in qf.h. The valid #QF_TIMEEVT_CTR_SIZE values of 1, -* 2, or 4, 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 ::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.h header file and henceforth include -* this header file in all builds. -*/ -#define QF_TIMEEVT_CTR_SIZE 2U - -/*! Define the interrupt disabling policy. -* -* 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. -*/ +/* interrupt disabling mechanism */ #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() void intDisable(void); void intEnable(void); -/*! Define the type of the critical section status. */ -/** -* @description -* Defining this macro configures the "saving and restoring critical section -* status" policy. Coversely, if this macro is not defined, the simple -* "unconditional critical section exit" is used. -*/ +/* QF critical section mechanism */ #define QF_CRIT_STAT_TYPE crit_stat_t - -/*! Define the critical section entry 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 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_) typedef unsigned int crit_stat_t; crit_stat_t critEntry(void); void critExit(crit_stat_t stat); -/*! Enable the QActive_stop() API in the QF port. */ -/** -* @description -* Defining this macro enables the QActive_stop() API in a given port. -* This feature should be used with caution, as stopping and re-starting -* active objects **cleanly** can be tricky. -*/ -#define QF_ACTIVE_STOP - -#include "qep_port.h" /* QEP port */ -#include "qxk_port.h" /* QXK dual-mode kernel port */ -#include "qf.h" /* QF platform-independent public interface */ -#include "qxthread.h" /* QXK extended thread interface */ +#include "qep_port.h" /* QEP port */ +#include "qxk_port.h" /* QXK port */ #endif /* QF_PORT_H */ - diff --git a/ports/lint-plus/qxk/qxk_port.h b/ports/lint-plus/qxk/qxk_port.h index 92c5ef2c..9a31220d 100644 --- a/ports/lint-plus/qxk/qxk_port.h +++ b/ports/lint-plus/qxk/qxk_port.h @@ -23,11 +23,10 @@ * ============================================================================*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @ingroup qxk * @brief QXK/C port example for a generic C99 compiler. * @description * This is an example of a QP/C port with the documentation for the @@ -38,16 +37,7 @@ /*==========================================================================*/ -/*! determination if the code executes in the ISR context -* (used internally in QXK only) -*/ -/*! determination if the code executes in the ISR context */ -/** -* @note This is just an example of #QXK_ISR_CONTEXT_ (for ARM Cortex-M). -* You need to define the macro appropriately for the CPU/compiler you're -* using. Also, some QK ports will not define this macro, but instead might -* test the interrupt nesting up-down counter (QXK_intNest_). -*/ +/*! determination if the code executes in the ISR context (ARM Cortex-M) */ #define QXK_ISR_CONTEXT_() (getSR() != 0U) /*! activate the context-switch callback */ @@ -60,17 +50,11 @@ /*! Define the ISR entry sequence, if the compiler supports writing * interrupts in C. */ -/** -* @note This is just an example of #QXK_ISR_ENTRY. You need to define -* the macro appropriately for the CPU/compiler you're using. Also, some -* QXK ports will not define this macro, but instead will provide ISR -* skeleton code in assembly. -*/ -#define QXK_ISR_ENTRY() do { \ - QF_INT_DISABLE(); \ - ++QXK_intNest_; \ - QF_QS_ISR_ENTRY(QXK_intNest_, QXK_currPrio_); \ - QF_INT_ENABLE(); \ +#define QXK_ISR_ENTRY() do { \ + QF_INT_DISABLE(); \ + ++QF_intNest_; \ + QF_QS_ISR_ENTRY(QF_intNest_, QXK_currPrio_); \ + QF_INT_ENABLE(); \ } while (false) @@ -82,13 +66,13 @@ * appropriately for the CPU/compiler you're using. Also, some QXK ports will * not define this macro, but instead will provide ISR skeleton in assembly. */ -#define QXK_ISR_EXIT() do { \ - QF_INT_DISABLE(); \ - --QXK_intNest_; \ - if (QXK_intNest_ == 0U) { \ - QXK_sched_(); \ - } \ - QF_INT_ENABLE(); \ +#define QXK_ISR_EXIT() do { \ + QF_INT_DISABLE(); \ + --QF_intNest_; \ + if (QF_intNest_ == 0U) { \ + QXK_sched_(); \ + } \ + QF_INT_ENABLE(); \ } while (false) uint32_t getSR(void); diff --git a/ports/msp430/qk/qep_port.h b/ports/msp430/qk/qep_port.h index 11151482..80c8ea98 100644 --- a/ports/msp430/qk/qep_port.h +++ b/ports/msp430/qk/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, generic C99 compiler * @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.4.0 -* Date of the Last Update: 2015-04-08 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* -* Copyright (C) 2005 Quantum Leaps, LLC. state-machine.com. -* -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* Web: www.state-machine.com/licensing -* Email: info@state-machine.com -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/msp430/qk/qf_port.h b/ports/msp430/qk/qf_port.h index cd6facba..afc2f5d7 100644 --- a/ports/msp430/qk/qf_port.h +++ b/ports/msp430/qk/qf_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C port to MSP430, preemptive QK kernel * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.0 -* Last updated on 2020-08-27 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QF_PORT_H #define QF_PORT_H @@ -73,8 +66,8 @@ #include "qk_port.h" /* QK preemptive kernel port */ #include "qf.h" /* QF platform-independent public interface */ -/***************************************************************************** -* NOTE01: +/*==========================================================================*/ +/* NOTE01: * The maximum number of active objects QF_MAX_ACTIVE can be increased * up to 64, if necessary. Here it is set to a lower level to save some RAM. */ diff --git a/ports/msp430/qk/qk_port.h b/ports/msp430/qk/qk_port.h index faf9ebf1..9eed3cdd 100644 --- a/ports/msp430/qk/qk_port.h +++ b/ports/msp430/qk/qk_port.h @@ -1,50 +1,43 @@ -/** -* @file -* @brief QK/C port port to MSP430 -* @cond -****************************************************************************** -* Last Updated for Version: 6.3.8 -* Date of the Last Update: 2019-01-23 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QK/C port port to MSP430 */ #ifndef QK_PORT_H #define QK_PORT_H /* QK interrupt entry and exit... */ -#define QK_ISR_ENTRY() (++QK_attr_.intNest) +#define QK_ISR_ENTRY() (++QF_intNest_) #define QK_ISR_EXIT() do { \ - --QK_attr_.intNest; \ - if (QK_attr_.intNest == 0U) { \ + --QF_intNest_; \ + if (QF_intNest_ == 0U) { \ if (QK_sched_() != 0U) { \ QK_activate_(); \ } \ @@ -57,4 +50,3 @@ #include "qk.h" /* QK platform-independent public interface */ #endif /* QK_PORT_H */ - diff --git a/ports/msp430/qk/qs_port.h b/ports/msp430/qk/qs_port.h index a5013385..b1c77d47 100644 --- a/ports/msp430/qk/qs_port.h +++ b/ports/msp430/qk/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to MSP340 and MSP430X CPUs -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 6.9.1 -* Date of the Last Update: 2020-10-03 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,15 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4U -/***************************************************************************** -* NOTE: -* QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/msp430/qutest/qep_port.h b/ports/msp430/qutest/qep_port.h index 2f71cce7..80c8ea98 100644 --- a/ports/msp430/qutest/qep_port.h +++ b/ports/msp430/qutest/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, generic C99 compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.6.0 -* Last updated on 2019-10-14 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/msp430/qutest/qf_port.h b/ports/msp430/qutest/qf_port.h index e057f674..c109041c 100644 --- a/ports/msp430/qutest/qf_port.h +++ b/ports/msp430/qutest/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to MSP430, QUTEST, generic C99 compiler -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-08 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to MSP430, QUTEST, generic C99 compiler */ #ifndef QF_PORT_H #define QF_PORT_H @@ -48,8 +41,8 @@ #define QF_MAX_ACTIVE 8U /* QF interrupt disable/enable */ -#define QF_INT_DISABLE() (++QF_intNest) -#define QF_INT_ENABLE() (--QF_intNest) +#define QF_INT_DISABLE() (++QF_intNest_) +#define QF_INT_ENABLE() (--QF_intNest_) /* QF critical section */ /* QF_CRIT_STAT_TYPE not defined */ @@ -63,9 +56,6 @@ #include "qmpool.h" /* QUTEST port uses QMPool memory-pool */ #include "qf.h" /* QF platform-independent public interface */ -/* interrupt nesting up-down counter */ -extern uint8_t volatile QF_intNest; - /****************************************************************************/ /* interface used only inside QF implementation, but not in applications */ #ifdef QP_IMPL @@ -79,7 +69,7 @@ extern uint8_t volatile QF_intNest; #define QACTIVE_EQUEUE_WAIT_(me_) \ Q_ASSERT_ID(0, (me_)->eQueue.frontEvt != (QEvt *)0) #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - QPSet_insert(&QS_rxPriv_.readySet, (uint_fast8_t)(me_)->prio) + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio) /* native QF event pool operations */ #define QF_EPOOL_TYPE_ QMPool diff --git a/ports/msp430/qutest/qs_port.h b/ports/msp430/qutest/qs_port.h index a5013385..b1c77d47 100644 --- a/ports/msp430/qutest/qs_port.h +++ b/ports/msp430/qutest/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to MSP340 and MSP430X CPUs -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 6.9.1 -* Date of the Last Update: 2020-10-03 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,15 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4U -/***************************************************************************** -* NOTE: -* QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/msp430/qv/qep_port.h b/ports/msp430/qv/qep_port.h index 11151482..80c8ea98 100644 --- a/ports/msp430/qv/qep_port.h +++ b/ports/msp430/qv/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, generic C99 compiler * @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.4.0 -* Date of the Last Update: 2015-04-08 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* -* Copyright (C) 2005 Quantum Leaps, LLC. state-machine.com. -* -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* Web: www.state-machine.com/licensing -* Email: info@state-machine.com -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/msp430/qv/qf_port.h b/ports/msp430/qv/qf_port.h index 4c938411..be2181c1 100644 --- a/ports/msp430/qv/qf_port.h +++ b/ports/msp430/qv/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to MSP430, cooperative QV kernel -* @cond -****************************************************************************** -* Last updated for version 6.9.0 -* Last updated on 2020-08-27 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to MSP430, cooperative QV kernel */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/msp430/qv/qs_port.h b/ports/msp430/qv/qs_port.h index a5013385..b1c77d47 100644 --- a/ports/msp430/qv/qs_port.h +++ b/ports/msp430/qv/qs_port.h @@ -1,41 +1,36 @@ -/** -* @file -* @brief QS/C port to MSP340 and MSP430X CPUs -* @ingroup qs -* @cond -****************************************************************************** -* Last Updated for Version: 6.9.1 -* Date of the Last Update: 2020-10-03 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H @@ -49,15 +44,17 @@ /* function pointer size in bytes */ #define QS_FUN_PTR_SIZE 4U -/***************************************************************************** -* NOTE: -* QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/msp430/qv/qv_port.h b/ports/msp430/qv/qv_port.h index 90804ada..8e824cf3 100644 --- a/ports/msp430/qv/qv_port.h +++ b/ports/msp430/qv/qv_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QV/C port port to MSP430 -* @cond -****************************************************************************** -* Last Updated for Version: 6.3.8 -* Date of the Last Update: 2019-01-23 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QV/C port port to MSP430 */ #ifndef QV_PORT_H #define QV_PORT_H @@ -42,4 +35,3 @@ #include "qv.h" /* QV platform-independent public interface */ #endif /* QV_PORT_H */ - diff --git a/ports/pic32/qk/xc32/qep_port.h b/ports/pic32/qk/xc32/qep_port.h index 7634edd5..b082aaec 100644 --- a/ports/pic32/qk/xc32/qep_port.h +++ b/ports/pic32/qk/xc32/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, GCC-ARM compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-26 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/pic32/qk/xc32/qf_port.h b/ports/pic32/qk/xc32/qf_port.h index 0ac0dc17..91a9ad44 100644 --- a/ports/pic32/qk/xc32/qf_port.h +++ b/ports/pic32/qk/xc32/qf_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C port, preemptive QK kernel, MPLAB-X XC32 compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.5.1 -* Last updated on 2019-06-12 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/pic32/qk/xc32/qk_port.c b/ports/pic32/qk/xc32/qk_port.c index c0d39afa..42e80c2e 100644 --- a/ports/pic32/qk/xc32/qk_port.c +++ b/ports/pic32/qk/xc32/qk_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QK/C port, preemptive QK kernel, MPLAB-X XC32 compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.5.1 -* Last updated on 2019-06-12 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #include "qf_port.h" diff --git a/ports/pic32/qk/xc32/qk_port.h b/ports/pic32/qk/xc32/qk_port.h index 0999fa81..69cc5f44 100644 --- a/ports/pic32/qk/xc32/qk_port.h +++ b/ports/pic32/qk/xc32/qk_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QK/C port, preemptive QK kernel, MPLAB-X XC32 compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.5.1 -* Last updated on 2019-06-12 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QK_PORT_H #define QK_PORT_H @@ -43,13 +36,13 @@ /* QK interrupt entry and exit */ #define QK_ISR_ENTRY() do { \ QF_INT_DISABLE(); \ - ++QK_attr_.intNest; \ + ++QF_intNest_; \ QF_INT_ENABLE(); \ } while (false) #define QK_ISR_EXIT() do { \ QF_INT_DISABLE(); \ - --QK_attr_.intNest; \ + --QF_intNest_; \ if (QK_sched_() != 0U) { \ IFS0SET = _IFS0_CS0IF_MASK; \ } \ @@ -62,8 +55,8 @@ void QK_init(void); #include "qk.h" /* QK platform-independent public interface */ -/***************************************************************************** -* NOTE01: +/*==========================================================================*/ +/* NOTE01: * Any interrupt service routine that interacts with QP must begin with the * QK_ISR_ENTRY() macro and must end with the QK_ISR_EXIT() macro. The source * file containing the interrupt service routine must #include . @@ -72,4 +65,3 @@ void QK_init(void); */ #endif /* QK_PORT_H */ - diff --git a/ports/pic32/qk/xc32/qs_port.h b/ports/pic32/qk/xc32/qs_port.h index ead535fb..b1c77d47 100644 --- a/ports/pic32/qk/xc32/qs_port.h +++ b/ports/pic32/qk/xc32/qs_port.h @@ -1,61 +1,60 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last updated for version 6.5.1 -* Last updated on 2019-05-22 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H /* QS time-stamp size in bytes */ -#define QS_TIME_SIZE 4 +#define QS_TIME_SIZE 4U /* object pointer size in bytes */ -#define QS_OBJ_PTR_SIZE 4 +#define QS_OBJ_PTR_SIZE 4U /* function pointer size in bytes */ -#define QS_FUN_PTR_SIZE 4 +#define QS_FUN_PTR_SIZE 4U -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/pic32/qutest/xc32/qep_port.h b/ports/pic32/qutest/xc32/qep_port.h index 7634edd5..b082aaec 100644 --- a/ports/pic32/qutest/xc32/qep_port.h +++ b/ports/pic32/qutest/xc32/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, GCC-ARM compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-26 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/pic32/qutest/xc32/qf_port.h b/ports/pic32/qutest/xc32/qf_port.h index 7f2d2ae6..4b2a66de 100644 --- a/ports/pic32/qutest/xc32/qf_port.h +++ b/ports/pic32/qutest/xc32/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to PIC32, QUTEST unit test harness, generic C99 compiler -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-08 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to PIC32, QUTEST unit test harness, generic C99 compiler */ #ifndef QF_PORT_H #define QF_PORT_H @@ -51,8 +44,8 @@ #define QF_MAX_TICK_RATE 2U /* QF interrupt disable/enable */ -#define QF_INT_DISABLE() (++QF_intNest) -#define QF_INT_ENABLE() (--QF_intNest) +#define QF_INT_DISABLE() (++QF_intNest_) +#define QF_INT_ENABLE() (--QF_intNest_) /* QF critical section */ /* QF_CRIT_STAT_TYPE not defined */ @@ -66,9 +59,6 @@ #include "qmpool.h" /* QUTEST port uses QMPool memory-pool */ #include "qf.h" /* QF platform-independent public interface */ -/* interrupt nesting up-down counter */ -extern uint8_t volatile QF_intNest; - /****************************************************************************/ /* interface used only inside QF implementation, but not in applications */ #ifdef QP_IMPL @@ -82,7 +72,7 @@ extern uint8_t volatile QF_intNest; #define QACTIVE_EQUEUE_WAIT_(me_) \ Q_ASSERT_ID(0, (me_)->eQueue.frontEvt != (QEvt *)0) #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - QPSet_insert(&QS_rxPriv_.readySet, (uint_fast8_t)(me_)->prio) + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio) /* native QF event pool operations */ #define QF_EPOOL_TYPE_ QMPool diff --git a/ports/pic32/qutest/xc32/qs_port.h b/ports/pic32/qutest/xc32/qs_port.h index fc903c91..b1c77d47 100644 --- a/ports/pic32/qutest/xc32/qs_port.h +++ b/ports/pic32/qutest/xc32/qs_port.h @@ -1,65 +1,60 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last updated for version 6.6.0 -* Last updated on 2019-10-18 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H /* QS time-stamp size in bytes */ -#define QS_TIME_SIZE 4 +#define QS_TIME_SIZE 4U /* object pointer size in bytes */ -#define QS_OBJ_PTR_SIZE 4 +#define QS_OBJ_PTR_SIZE 4U /* function pointer size in bytes */ -#define QS_FUN_PTR_SIZE 4 +#define QS_FUN_PTR_SIZE 4U -/* flush the QS output buffer after each QS record */ -#define QS_REC_DONE() QS_onFlush() - -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/pic32/qv/xc32/qep_port.h b/ports/pic32/qv/xc32/qep_port.h index 7634edd5..b082aaec 100644 --- a/ports/pic32/qv/xc32/qep_port.h +++ b/ports/pic32/qv/xc32/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, GCC-ARM compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-26 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/pic32/qv/xc32/qf_port.h b/ports/pic32/qv/xc32/qf_port.h index 82e05c7a..f06a72f3 100644 --- a/ports/pic32/qv/xc32/qf_port.h +++ b/ports/pic32/qv/xc32/qf_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C port, cooperative QV kernel, MPLAB-X XC32 compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.5.1 -* Last updated on 2019-06-12 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QF_PORT_H #define QF_PORT_H diff --git a/ports/pic32/qv/xc32/qs_port.h b/ports/pic32/qv/xc32/qs_port.h index ead535fb..b1c77d47 100644 --- a/ports/pic32/qv/xc32/qs_port.h +++ b/ports/pic32/qv/xc32/qs_port.h @@ -1,61 +1,60 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last updated for version 6.5.1 -* Last updated on 2019-05-22 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H /* QS time-stamp size in bytes */ -#define QS_TIME_SIZE 4 +#define QS_TIME_SIZE 4U /* object pointer size in bytes */ -#define QS_OBJ_PTR_SIZE 4 +#define QS_OBJ_PTR_SIZE 4U /* function pointer size in bytes */ -#define QS_FUN_PTR_SIZE 4 +#define QS_FUN_PTR_SIZE 4U -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which case -* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY, -* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with -* the other QP component, by simply including "qf_port.h" *before* "qs.h". +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/pic32/qv/xc32/qv_port.h b/ports/pic32/qv/xc32/qv_port.h index 88ea8405..c2848afe 100644 --- a/ports/pic32/qv/xc32/qv_port.h +++ b/ports/pic32/qv/xc32/qv_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QV/C port, cooperative QV kernel, MPLAB-X XC32 compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.5.1 -* Last updated on 2019-06-12 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QV_PORT_H #define QV_PORT_H diff --git a/ports/posix-qutest/qep_port.h b/ports/posix-qutest/qep_port.h index eee35ab7..ace4b3ad 100644 --- a/ports/posix-qutest/qep_port.h +++ b/ports/posix-qutest/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, generic C11 compiler * @ingroup qep -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-21 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/posix-qutest/qf_port.h b/ports/posix-qutest/qf_port.h index b33115ca..ecc89f88 100644 --- a/ports/posix-qutest/qf_port.h +++ b/ports/posix-qutest/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C "port" for QUTEST unit test harness, generic C99 compiler -* @cond -****************************************************************************** -* Last Updated for Version: 6.9.1 -* Date of the Last Update: 2020-09-08 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C "port" for QUTEST unit test harness, generic C99 compiler */ #ifndef QF_PORT_H #define QF_PORT_H @@ -54,8 +47,8 @@ #define QF_ACTIVE_STOP 1 /* QF interrupt disable/enable */ -#define QF_INT_DISABLE() (++QF_intNest) -#define QF_INT_ENABLE() (--QF_intNest) +#define QF_INT_DISABLE() (++QF_intNest_) +#define QF_INT_ENABLE() (--QF_intNest_) /* QF critical section */ /* QF_CRIT_STAT_TYPE not defined */ @@ -82,7 +75,7 @@ #define QACTIVE_EQUEUE_WAIT_(me_) \ Q_ASSERT_ID(0, (me_)->eQueue.frontEvt != (QEvt *)0) #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - QPSet_insert(&QS_rxPriv_.readySet, (uint_fast8_t)(me_)->prio) + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio) /* native QF event pool operations */ #define QF_EPOOL_TYPE_ QMPool diff --git a/ports/posix-qutest/qs_port.h b/ports/posix-qutest/qs_port.h index 3713c04f..8229b0e9 100644 --- a/ports/posix-qutest/qs_port.h +++ b/ports/posix-qutest/qs_port.h @@ -1,54 +1,46 @@ -/** -* @file -* @brief QS/C port to QUTEST, POSIX with GNU compiler -* @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-21 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to POSIX with GNU compiler +* @ingroup ports */ #ifndef QS_PORT_H #define QS_PORT_H -/* QS time-stamp size in bytes */ -#define QS_TIME_SIZE 4U +#define QS_TIME_SIZE 4U #if defined(__LP64__) || defined(_LP64) /* 64-bit architecture? */ - #define QS_OBJ_PTR_SIZE 8U - #define QS_FUN_PTR_SIZE 8U + #define QS_OBJ_PTR_SIZE 8U + #define QS_FUN_PTR_SIZE 8U #else /* 32-bit architecture */ - #define QS_OBJ_PTR_SIZE 4U - #define QS_FUN_PTR_SIZE 4U + #define QS_OBJ_PTR_SIZE 4U + #define QS_FUN_PTR_SIZE 4U #endif /* flush the QS output buffer after each QS record */ @@ -61,7 +53,11 @@ * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ + diff --git a/ports/posix-qutest/qutest_port.c b/ports/posix-qutest/qutest_port.c index 2efaa06b..ac0911f0 100644 --- a/ports/posix-qutest/qutest_port.c +++ b/ports/posix-qutest/qutest_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C QUTest port to POSIX * @ingroup ports -* @cond -****************************************************************************** -* Last updated for: @ref qpc_7_0_0 -* Last updated on 2021-06-17 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ /* expose features from the 2008 POSIX standard (IEEE Standard 1003.1-2008) */ #define _POSIX_C_SOURCE 200809L diff --git a/ports/posix-qutest/safe_std.h b/ports/posix-qutest/safe_std.h index 6f29be3b..7e0a2439 100644 --- a/ports/posix-qutest/safe_std.h +++ b/ports/posix-qutest/safe_std.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief "safe" and facilities -* @ingroup qpspy -* @cond -****************************************************************************** -* Last updated for version 6.9.0 -* Last updated on 2020-08-24 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief "safe" and facilities */ #ifndef SAFE_STD_H #define SAFE_STD_H diff --git a/ports/posix-qv/qep_port.h b/ports/posix-qv/qep_port.h index eee35ab7..ace4b3ad 100644 --- a/ports/posix-qv/qep_port.h +++ b/ports/posix-qv/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, generic C11 compiler * @ingroup qep -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-21 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/posix-qv/qf_port.c b/ports/posix-qv/qf_port.c index 8c607bcf..2eb282ea 100644 --- a/ports/posix-qv/qf_port.c +++ b/ports/posix-qv/qf_port.c @@ -59,7 +59,6 @@ Q_DEFINE_THIS_MODULE("qf_port") /* Global objects ==========================================================*/ -QPSet QV_readySet_; /* QV-ready set of active objects */ pthread_cond_t QV_condVar_; /* Cond.var. to signal events */ /* Local objects ===========================================================*/ @@ -162,9 +161,9 @@ int_t QF_run(void) { while (l_isRunning) { /* find the maximum priority AO ready to run */ - if (QPSet_notEmpty(&QV_readySet_)) { - uint_fast8_t p = QPSet_findMax(&QV_readySet_); - QActive *a = QF_active_[p]; + if (QPSet_notEmpty(&QF_readySet_)) { + uint_fast8_t p = QPSet_findMax(&QF_readySet_); + QActive *a = QActive_registry_[p]; QF_CRIT_X_(); /* the active object 'a' must still be registered in QF @@ -185,7 +184,7 @@ int_t QF_run(void) { QF_CRIT_E_(); if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ - QPSet_remove(&QV_readySet_, p); + QPSet_remove(&QF_readySet_, p); } } else { @@ -194,7 +193,7 @@ int_t QF_run(void) { * for events. Instead, the POSIX-QV port efficiently waits until * QP events become available. */ - while (QPSet_isEmpty(&QV_readySet_)) { + while (QPSet_isEmpty(&QF_readySet_)) { pthread_cond_wait(&QV_condVar_, &l_pThreadMutex); } } @@ -225,7 +224,7 @@ void QF_stop(void) { /* unblock the event-loop so it can terminate */ p = 1U; - QPSet_insert(&QV_readySet_, p); + QPSet_insert(&QF_readySet_, p); pthread_cond_signal(&QV_condVar_); } @@ -272,7 +271,7 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, * ... be provided */ QEQueue_init(&me->eQueue, qSto, qLen); me->prio = (uint8_t)prio; - QF_add_(me); /* make QF aware of this active object */ + QActive_register_(me); /* make QF aware of this active object */ /* the top-most initial tran. (virtual) */ QHSM_INIT(&me->super, par, me->prio); @@ -287,10 +286,10 @@ void QActive_stop(QActive * const me) { /* make sure the AO is no longer in "ready set" */ QF_CRIT_E_(); - QPSet_remove(&QV_readySet_, me->prio); + QPSet_remove(&QF_readySet_, me->prio); QF_CRIT_X_(); - QF_remove_(me); /* remove this AO from QF */ + QActive_unregister_(me); /* un-register this active object */ } #endif /*..........................................................................*/ @@ -306,7 +305,7 @@ static void *ticker_thread(void *arg) { /* for pthread_create() */ (void)arg; /* unused parameter */ while (l_isRunning) { /* the clock tick loop... */ nanosleep(&l_tick, NULL); /* sleep for the number of ticks, NOTE05 */ - QF_onClockTick(); /* clock tick callback (must call QF_TICK_X()) */ + QF_onClockTick(); /* clock tick callback (must call QTIMEEVT_TICK_X()) */ } return (void *)0; /* return success */ } @@ -317,8 +316,8 @@ static void sigIntHandler(int dummy) { exit(-1); } -/***************************************************************************** -* NOTE01: +/*==========================================================================*/ +/* NOTE01: * In Linux, the scheduler policy closest to real-time is the SCHED_FIFO * policy, available only with superuser privileges. QF_run() attempts to set * this policy as well as to maximize its priority, so that the ticking diff --git a/ports/posix-qv/qf_port.h b/ports/posix-qv/qf_port.h index f838f688..3c2f2bae 100644 --- a/ports/posix-qv/qf_port.h +++ b/ports/posix-qv/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to POSIX API (single-threaded, like the QV kernel) -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-08 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to POSIX API (single-threaded, like the QV kernel) */ #ifndef QF_PORT_H #define QF_PORT_H @@ -103,7 +96,7 @@ int QF_consoleWaitForKey(void); Q_ASSERT((me_)->eQueue.frontEvt != (QEvt *)0) #define QACTIVE_EQUEUE_SIGNAL_(me_) do { \ - QPSet_insert(&QV_readySet_, (me_)->prio); \ + QPSet_insert(&QF_readySet_, (me_)->prio); \ pthread_cond_signal(&QV_condVar_); \ } while (false) @@ -119,12 +112,11 @@ int QF_consoleWaitForKey(void); #include /* POSIX-thread API */ - extern QPSet QV_readySet_; /* QV-ready set of active objects */ extern pthread_cond_t QV_condVar_; /* Cond.var. to signal events */ #endif /* QP_IMPL */ -/****************************************************************************/ +/*==========================================================================*/ /* * NOTE1: * QF, like all real-time frameworks, needs to execute certain sections of @@ -156,4 +148,3 @@ int QF_consoleWaitForKey(void); */ #endif /* QF_PORT_H */ - diff --git a/ports/posix-qv/qs_port.c b/ports/posix-qv/qs_port.c index 4fac09a2..47a412f9 100644 --- a/ports/posix-qv/qs_port.c +++ b/ports/posix-qv/qs_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port to POSIX * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.2 -* Last updated on 2021-01-14 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ /* expose features from the 2008 POSIX standard (IEEE Standard 1003.1-2008) */ #define _POSIX_C_SOURCE 200809L diff --git a/ports/posix-qv/qs_port.h b/ports/posix-qv/qs_port.h index 2b5aa3cd..3aa99639 100644 --- a/ports/posix-qv/qs_port.h +++ b/ports/posix-qv/qs_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port to POSIX with GNU compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-21 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QS_PORT_H #define QS_PORT_H @@ -53,15 +46,17 @@ void QS_output(void); /* handle the QS output */ void QS_rx_input(void); /* handle the QS-RX input */ -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ - diff --git a/ports/posix-qv/safe_std.h b/ports/posix-qv/safe_std.h index 6f29be3b..7e0a2439 100644 --- a/ports/posix-qv/safe_std.h +++ b/ports/posix-qv/safe_std.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief "safe" and facilities -* @ingroup qpspy -* @cond -****************************************************************************** -* Last updated for version 6.9.0 -* Last updated on 2020-08-24 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief "safe" and facilities */ #ifndef SAFE_STD_H #define SAFE_STD_H diff --git a/ports/posix/qep_port.h b/ports/posix/qep_port.h index eee35ab7..ace4b3ad 100644 --- a/ports/posix/qep_port.h +++ b/ports/posix/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, generic C11 compiler * @ingroup qep -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-21 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/posix/qf_port.c b/ports/posix/qf_port.c index fc9010ef..411472ac 100644 --- a/ports/posix/qf_port.c +++ b/ports/posix/qf_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C port to POSIX API (multi-threaded) * @ingroup ports -* @cond -****************************************************************************** -* Last updated for: @ref qpc_7_0_0 -* Last updated on 2021-06-17 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ /* expose features from the 2008 POSIX standard (IEEE Standard 1003.1-2008) */ @@ -141,7 +134,7 @@ int_t QF_run(void) { l_isRunning = true; while (l_isRunning) { /* the clock tick loop... */ - QF_onClockTick(); /* clock tick callback (must call QF_TICK_X()) */ + QF_onClockTick(); /* clock tick callback (must call QTIMEEVT_TICK_X()) */ nanosleep(&l_tick, NULL); /* sleep for the number of ticks, NOTE05 */ } @@ -211,7 +204,7 @@ static void *thread_routine(void *arg) { /* the expected POSIX signature */ QF_gc(e); /* check if the event is garbage, and collect it if so */ } #ifdef QF_ACTIVE_STOP - QF_remove_(act); /* remove this object from QF */ + QActive_unregister_(act); /* un-register this active object */ #endif return (void *)0; /* return success */ } @@ -234,7 +227,7 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, pthread_cond_init(&me->osObject, NULL); me->prio = (uint8_t)prio; - QF_add_(me); /* make QF aware of this active object */ + QActive_register_(me); /* make QF aware of this active object */ /* the top-most initial tran. (virtual) */ QHSM_INIT(&me->super, par, me->prio); diff --git a/ports/posix/qf_port.h b/ports/posix/qf_port.h index 920f42c2..e1182ac9 100644 --- a/ports/posix/qf_port.h +++ b/ports/posix/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C port to POSIX API (multi-threaded) -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-08 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to POSIX API (multi-threaded) */ #ifndef QF_PORT_H #define QF_PORT_H @@ -100,7 +93,7 @@ int QF_consoleWaitForKey(void); while ((me_)->eQueue.frontEvt == (QEvt *)0) \ pthread_cond_wait(&(me_)->osObject, &QF_pThreadMutex_) #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - Q_ASSERT_ID(410, QF_active_[(me_)->prio] != (QActive *)0); \ + Q_ASSERT_ID(410, QActive_registry_[(me_)->prio] != (QActive *)0); \ pthread_cond_signal(&(me_)->osObject) /* native QF event pool operations */ diff --git a/ports/posix/qs_port.c b/ports/posix/qs_port.c index 4fac09a2..47a412f9 100644 --- a/ports/posix/qs_port.c +++ b/ports/posix/qs_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port to POSIX * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.2 -* Last updated on 2021-01-14 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ /* expose features from the 2008 POSIX standard (IEEE Standard 1003.1-2008) */ #define _POSIX_C_SOURCE 200809L diff --git a/ports/posix/qs_port.h b/ports/posix/qs_port.h index 2b5aa3cd..64be8230 100644 --- a/ports/posix/qs_port.h +++ b/ports/posix/qs_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port to POSIX with GNU compiler * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-21 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QS_PORT_H #define QS_PORT_H @@ -53,14 +46,17 @@ void QS_output(void); /* handle the QS output */ void QS_rx_input(void); /* handle the QS-RX input */ -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/posix/safe_std.h b/ports/posix/safe_std.h index 6f29be3b..7e0a2439 100644 --- a/ports/posix/safe_std.h +++ b/ports/posix/safe_std.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief "safe" and facilities -* @ingroup qpspy -* @cond -****************************************************************************** -* Last updated for version 6.9.0 -* Last updated on 2020-08-24 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief "safe" and facilities */ #ifndef SAFE_STD_H #define SAFE_STD_H diff --git a/ports/threadx/qep_port.h b/ports/threadx/qep_port.h index 11151482..24269658 100644 --- a/ports/threadx/qep_port.h +++ b/ports/threadx/qep_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QEP/C port, generic C99 compiler * @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.4.0 -* Date of the Last Update: 2015-04-08 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* -* Copyright (C) 2005 Quantum Leaps, LLC. state-machine.com. -* -* This program is open source software: you can redistribute it and/or -* modify it under the terms of the GNU General Public License as published -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* Web: www.state-machine.com/licensing -* Email: info@state-machine.com -****************************************************************************** -* @endcond */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/threadx/qf_port.c b/ports/threadx/qf_port.c index 9e618180..8354a125 100644 --- a/ports/threadx/qf_port.c +++ b/ports/threadx/qf_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C, port to ThreadX * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.3 -* Last updated on 2021-04-08 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -98,7 +91,7 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, == TX_SUCCESS); me->prio = prio; /* save the QF priority */ - QF_add_(me); /* make QF aware of this active object */ + QActive_register_(me); /* make QF aware of this active object */ QHSM_INIT(&me->super, par, me->prio); /* initial tran. (virtual) */ QS_FLUSH(); /* flush the trace buffer to the host */ @@ -135,13 +128,8 @@ void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) { } } /*..........................................................................*/ -#ifndef Q_SPY -bool QActive_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin) -#else bool QActive_post_(QActive * const me, QEvt const * const e, uint_fast16_t const margin, void const * const sender) -#endif /* Q_SPY */ { uint_fast16_t nFree; bool status; diff --git a/ports/threadx/qf_port.h b/ports/threadx/qf_port.h index 16df26dc..046a2099 100644 --- a/ports/threadx/qf_port.h +++ b/ports/threadx/qf_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QF/C, port to ThreadX -* @cond -****************************************************************************** -* Last updated for: @ref qpc_7_0_0 -* Last updated on 2021-12-05 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C, port to ThreadX */ #ifndef QF_PORT_H #define QF_PORT_H @@ -79,12 +72,12 @@ enum ThreadX_ThreadAttrs { } QFSchedLock; #define QF_SCHED_STAT_ QFSchedLock lockStat_; - #define QF_SCHED_LOCK_(prio_) do { \ - if (_tx_thread_system_state != 0U) { \ - lockStat_.lockPrio = 0U; \ - } else { \ - QFSchedLock_(&lockStat_, (prio_)); \ - } \ + #define QF_SCHED_LOCK_(prio_) do { \ + if (TX_THREAD_GET_SYSTEM_STATE() != 0U) { \ + lockStat_.lockPrio = 0U; \ + } else { \ + QFSchedLock_(&lockStat_, (prio_)); \ + } \ } while (false) #define QF_SCHED_UNLOCK_() do { \ @@ -96,7 +89,8 @@ enum ThreadX_ThreadAttrs { /* internal implementation of scheduler locking/unlocking */ void QFSchedLock_(QFSchedLock * const lockStat, uint_fast8_t prio); void QFSchedUnlock_(QFSchedLock const * const lockStat); - extern ULONG volatile _tx_thread_system_state; /* internal TX interrupt counter */ + /* internal TX interrupt counter for TX_THREAD_GET_SYSTEM_STATE() */ + extern ULONG volatile _tx_thread_system_state; /* native QF event pool operations */ #define QF_EPOOL_TYPE_ QMPool diff --git a/ports/threadx/qs_port.h b/ports/threadx/qs_port.h index 3f1a2b49..b1c77d47 100644 --- a/ports/threadx/qs_port.h +++ b/ports/threadx/qs_port.h @@ -1,62 +1,60 @@ -/** -* @file -* @brief QS/C port to a 32-bit CPU and a generic C compiler. -* @ingroup qs -* @cond -****************************************************************************** -* Last updated for version 5.6.0 -* Last updated on 2015-12-18 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. */ #ifndef QS_PORT_H #define QS_PORT_H /* QS time-stamp size in bytes */ -#define QS_TIME_SIZE 4 +#define QS_TIME_SIZE 4U /* object pointer size in bytes */ -#define QS_OBJ_PTR_SIZE 4 +#define QS_OBJ_PTR_SIZE 4U /* function pointer size in bytes */ -#define QS_FUN_PTR_SIZE 4 +#define QS_FUN_PTR_SIZE 4U -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/uc-os2/qep_port.h b/ports/uc-os2/qep_port.h index c2643c2b..a0919073 100644 --- a/ports/uc-os2/qep_port.h +++ b/ports/uc-os2/qep_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QEP/C port, generic C99 compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial diff --git a/ports/uc-os2/qf_port.c b/ports/uc-os2/qf_port.c index 9944f785..2abe8a20 100644 --- a/ports/uc-os2/qf_port.c +++ b/ports/uc-os2/qf_port.c @@ -1,5 +1,5 @@ /*============================================================================ -* QF/C port to uC-OS2, generic C99 compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -74,23 +74,21 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, void * const stkSto, uint_fast16_t const stkSize, void const * const par) { - INT8U p_ucos; - INT8U err; /* task name to be passed to OSTaskCreateExt() */ - void *task_name = (void *)me->eQueue; + void * const task_name = (void *)me->eQueue; me->eQueue = OSQCreate((void **)qSto, qLen); /* create uC-OS2 queue */ /* the uC-OS2 queue must be created correctly */ Q_ASSERT_ID(210, me->eQueue != (OS_EVENT *)0); me->prio = prio; /* save the QF priority */ - QF_add_(me); /* make QF aware of this active object */ + QActive_register_(me); /* make QF aware of this active object */ QHSM_INIT(&me->super, par, me->prio); /* initial tran. (virtual) */ QS_FLUSH(); /* flush the trace buffer to the host */ /* map from QP to uC/OS priority */ - p_ucos = (INT8U)(QF_MAX_ACTIVE - me->prio); + INT8U const p_ucos = (INT8U)(QF_MAX_ACTIVE - me->prio); /* create AO's task... */ /* @@ -99,7 +97,7 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, * stack memory. This is correct only for CPUs with downward-growing * stack, but must be changed for CPUs with upward-growing stack */ - err = OSTaskCreateExt(&task_function, /* the task function */ + INT8U const err = OSTaskCreateExt(&task_function, /* the task function */ (void *)me, /* the 'pdata' parameter */ #if OS_STK_GROWTH &((OS_STK *)stkSto)[(stkSize/sizeof(OS_STK)) - 1], /* ptos */ @@ -149,22 +147,16 @@ static void task_function(void *pdata) { /* uC-OS2 task signature */ } } /*..........................................................................*/ -#ifndef Q_SPY -bool QActive_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin) -#else bool QActive_post_(QActive * const me, QEvt const * const e, uint_fast16_t const margin, void const * const sender) -#endif { - bool status; - uint_fast16_t nFree; QF_CRIT_STAT_ - QF_CRIT_E_(); - nFree = (uint_fast16_t)(((OS_Q_DATA *)me->eQueue)->OSQSize - - ((OS_Q_DATA *)me->eQueue)->OSNMsgs); + uint_fast16_t const nFree = + (uint_fast16_t)(((OS_Q_DATA *)me->eQueue)->OSQSize + - ((OS_Q_DATA *)me->eQueue)->OSNMsgs); + bool status; if (margin == QF_NO_MARGIN) { if (nFree > 0U) { status = true; /* can post */ @@ -248,11 +240,11 @@ void QActive_postLIFO_(QActive * const me, QEvt const * const e) { /*..........................................................................*/ QEvt const *QActive_get_(QActive * const me) { INT8U err; - QS_CRIT_STAT_ QEvt const *e = (QEvt *)OSQPend((OS_EVENT *)me->eQueue, 0U, &err); Q_ASSERT_ID(910, err == OS_ERR_NONE); + QS_CRIT_STAT_ QS_BEGIN_PRE_(QS_QF_ACTIVE_GET, me->prio) QS_TIME_PRE_(); /* timestamp */ QS_SIG_PRE_(e->sig); /* the signal of this event */ diff --git a/ports/uc-os2/qf_port.h b/ports/uc-os2/qf_port.h index edb4304f..0bf456f8 100644 --- a/ports/uc-os2/qf_port.h +++ b/ports/uc-os2/qf_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QF/C port to uC-OS2, generic C99 compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial diff --git a/ports/uc-os2/qs_port.h b/ports/uc-os2/qs_port.h index 37dc9a0e..8d8acea5 100644 --- a/ports/uc-os2/qs_port.h +++ b/ports/uc-os2/qs_port.h @@ -1,5 +1,5 @@ /*============================================================================ -* QS/C port to uC-OS2, generic C99 compiler +* QP/C Real-Time Embedded Framework (RTEF) * Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial @@ -23,38 +23,39 @@ * ============================================================================*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @ingroup ports * @brief QS/C port to uC-OS2, generic C99 compiler */ #ifndef QS_PORT_H #define QS_PORT_H /* QS time-stamp size in bytes */ -#define QS_TIME_SIZE 4 +#define QS_TIME_SIZE 4U /* object pointer size in bytes */ -#define QS_OBJ_PTR_SIZE 4 +#define QS_OBJ_PTR_SIZE 4U /* function pointer size in bytes */ -#define QS_FUN_PTR_SIZE 4 +#define QS_FUN_PTR_SIZE 4U -/***************************************************************************** -* NOTE: QS might be used with or without other QP components, in which +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which * case the separate definitions of the macros QF_CRIT_STAT_TYPE, * QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif #if (OS_CRITICAL_METHOD == 3U) - #define QS_CRIT_STAT_ OS_CPU_SR cpu_sr; - #define QS_CRIT_E_() OS_ENTER_CRITICAL() - #define QS_CRIT_X_() OS_EXIT_CRITICAL(); QS_REC_DONE() + #define QS_CRIT_STAT_ OS_CPU_SR cpu_sr; + #define QS_CRIT_E_() OS_ENTER_CRITICAL() + #define QS_CRIT_X_() OS_EXIT_CRITICAL(); QS_REC_DONE() #endif /* OS_CRITICAL_METHOD */ #include "qs.h" /* QS platform-independent public interface */ diff --git a/ports/win32-quit/qep_port.h b/ports/win32-quit/qep_port.h index 103b43de..a68b88b2 100644 --- a/ports/win32-quit/qep_port.h +++ b/ports/win32-quit/qep_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QEP/C port to Win32 with GNU or Visual Studio C/C++ compilers -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-23 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port to Win32 with GNU or Visual Studio C/C++ compilers */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/win32-quit/qf_port.h b/ports/win32-quit/qf_port.h index 6b934fce..ba5f3d87 100644 --- a/ports/win32-quit/qf_port.h +++ b/ports/win32-quit/qf_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C "port" for QUIT unit internal test, Win32 with GNU or VisualC++ * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.2 -* Last updated on 2021-01-11 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QF_PORT_H #define QF_PORT_H @@ -55,8 +48,8 @@ #define QF_ACTIVE_STOP 1 /* QF interrupt disable/enable */ -#define QF_INT_DISABLE() (++QF_intNest) -#define QF_INT_ENABLE() (--QF_intNest) +#define QF_INT_DISABLE() (++QF_intNest_) +#define QF_INT_ENABLE() (--QF_intNest_) /* QUIT critical section */ /* QF_CRIT_STAT_TYPE not defined */ @@ -70,9 +63,6 @@ #include "qmpool.h" /* QUIT port uses QMPool memory-pool */ #include "qf.h" /* QF platform-independent public interface */ -/* interrupt nesting up-down counter */ -extern uint8_t volatile QF_intNest; - /****************************************************************************/ /* interface used only inside QP implementation, but not in applications */ #ifdef QP_IMPL @@ -86,7 +76,7 @@ extern uint8_t volatile QF_intNest; #define QACTIVE_EQUEUE_WAIT_(me_) \ Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0) #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - QPSet_insert(&QS_rxPriv_.readySet, (uint_fast8_t)(me_)->prio) + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio) /* native QF event pool operations */ #define QF_EPOOL_TYPE_ QMPool diff --git a/ports/win32-quit/qs_port.h b/ports/win32-quit/qs_port.h index 3c262a72..68d62e42 100644 --- a/ports/win32-quit/qs_port.h +++ b/ports/win32-quit/qs_port.h @@ -1,58 +1,50 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port to Win32 with GNU or Visual C++ compilers * @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.9.0 -* Date of the Last Update: 2017-05-16 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QS_PORT_H #define QS_PORT_H -/* QS time-stamp size in bytes */ -#define QS_TIME_SIZE 4 +#define QS_TIME_SIZE 4U #ifdef _WIN64 /* 64-bit architecture? */ - #define QS_OBJ_PTR_SIZE 8 - #define QS_FUN_PTR_SIZE 8 + #define QS_OBJ_PTR_SIZE 8U + #define QS_FUN_PTR_SIZE 8U #else /* 32-bit architecture */ - #define QS_OBJ_PTR_SIZE 4 - #define QS_FUN_PTR_SIZE 4 + #define QS_OBJ_PTR_SIZE 4U + #define QS_FUN_PTR_SIZE 4U #endif -/* flush the QS output buffer after each QS record */ -#define QS_REC_DONE() QS_onFlush() +void QS_output(void); /* handle the QS output */ +void QS_rx_input(void); /* handle the QS-RX input */ /***************************************************************************** * NOTE: QS might be used with or without other QP components, in which @@ -61,7 +53,11 @@ * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ -#endif /* QS_PORT_H */ +#endif /* QS_PORT_H */ + diff --git a/ports/win32-quit/quit_port.c b/ports/win32-quit/quit_port.c index 629ec3bc..cef5e2ed 100644 --- a/ports/win32-quit/quit_port.c +++ b/ports/win32-quit/quit_port.c @@ -1,40 +1,33 @@ -/** -* @file -* @brief QUIT (QP Unit Internal Test) port to Win32 with GNU or VisualC++ -* @cond -****************************************************************************** -* Last updated for version 6.9.2 -* Last updated on 2021-02-12 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QUIT (QP Unit Internal Test) port to Win32 with GNU or VisualC++ */ #include "quit.h" @@ -48,9 +41,6 @@ //Q_DEFINE_THIS_MODULE("quit_port") -/* Global objects ==========================================================*/ -uint8_t volatile QF_intNest; - /*..........................................................................*/ static int l_test_count; @@ -124,4 +114,4 @@ void QS_onCommand(uint8_t cmdId, uint32_t param1, (void)param3; } -#endif \ No newline at end of file +#endif diff --git a/ports/win32-qutest/Makefile b/ports/win32-qutest/Makefile index e7ff36a3..44321ce8 100644 --- a/ports/win32-qutest/Makefile +++ b/ports/win32-qutest/Makefile @@ -59,7 +59,6 @@ VPATH = \ # list of all include directories needed by this project INCLUDES = \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- diff --git a/ports/win32-qutest/qep_port.h b/ports/win32-qutest/qep_port.h index 103b43de..a68b88b2 100644 --- a/ports/win32-qutest/qep_port.h +++ b/ports/win32-qutest/qep_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QEP/C port to Win32 with GNU or Visual Studio C/C++ compilers -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-23 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port to Win32 with GNU or Visual Studio C/C++ compilers */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/win32-qutest/qf_port.h b/ports/win32-qutest/qf_port.h index df6c84bd..eb214404 100644 --- a/ports/win32-qutest/qf_port.h +++ b/ports/win32-qutest/qf_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C "port" for QUTest unit test harness, Win32 with GNU or VisualC++ * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-08 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QF_PORT_H #define QF_PORT_H @@ -55,8 +48,8 @@ #define QF_ACTIVE_STOP 1 /* QF interrupt disable/enable */ -#define QF_INT_DISABLE() (++QF_intNest) -#define QF_INT_ENABLE() (--QF_intNest) +#define QF_INT_DISABLE() (++QF_intNest_) +#define QF_INT_ENABLE() (--QF_intNest_) /* QUTest critical section */ /* QF_CRIT_STAT_TYPE not defined */ @@ -83,7 +76,7 @@ #define QACTIVE_EQUEUE_WAIT_(me_) \ Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0) #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - QPSet_insert(&QS_rxPriv_.readySet, (uint_fast8_t)(me_)->prio) + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio) /* native QF event pool operations */ #define QF_EPOOL_TYPE_ QMPool diff --git a/ports/win32-qutest/qp.sln b/ports/win32-qutest/qp.sln index 7720f89a..262db982 100644 --- a/ports/win32-qutest/qp.sln +++ b/ports/win32-qutest/qp.sln @@ -1,30 +1,30 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qp", "qp.vcxproj", "{3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - vc64|Win32 = vc64|Win32 - vc64|x64 = vc64|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.ActiveCfg = vc|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.Build.0 = vc|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.ActiveCfg = vc|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.Build.0 = vc|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|Win32.ActiveCfg = vc64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|Win32.Build.0 = vc64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|x64.ActiveCfg = vc64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|x64.Build.0 = vc64|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {C6427684-BAD9-48AF-A46A-5EAD5C053A5D} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qp", "qp.vcxproj", "{3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + vc64|Win32 = vc64|Win32 + vc64|x64 = vc64|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.ActiveCfg = vc|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.Build.0 = vc|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.ActiveCfg = vc|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.Build.0 = vc|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|Win32.ActiveCfg = vc64|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|Win32.Build.0 = vc64|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|x64.ActiveCfg = vc64|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.vc64|x64.Build.0 = vc64|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C6427684-BAD9-48AF-A46A-5EAD5C053A5D} + EndGlobalSection +EndGlobal diff --git a/ports/win32-qutest/qp.vcxproj b/ports/win32-qutest/qp.vcxproj index 8c587c91..4ba825c8 100644 --- a/ports/win32-qutest/qp.vcxproj +++ b/ports/win32-qutest/qp.vcxproj @@ -1,208 +1,208 @@ - - - - - vc64 - Win32 - - - vc64 - x64 - - - vc - Win32 - - - vc - x64 - - - - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9} - qp - ManagedCProj - 10.0 - - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - false - false - - - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY; Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY; Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY; Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY; Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - true - true - - - true - true - - - true - true - - - - - true - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + vc64 + Win32 + + + vc64 + x64 + + + vc + Win32 + + + vc + x64 + + + + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9} + qp + ManagedCProj + 10.0 + + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(Configuration)\ + false + false + false + false + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY; Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY; Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY; Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY; Q_UTEST;Q_HOST;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + true + true + + + true + true + + + true + true + + + + + true + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ports/win32-qutest/qp.vcxproj.filters b/ports/win32-qutest/qp.vcxproj.filters index 8c12f237..fb76617b 100644 --- a/ports/win32-qutest/qp.vcxproj.filters +++ b/ports/win32-qutest/qp.vcxproj.filters @@ -1,78 +1,78 @@ - - - - - {553ace6f-efbf-49d9-be33-15209894492c} - - - {f23cedd0-0f13-4d39-b4f1-77eaa32e87fd} - - - {60f745f8-1607-4e49-a403-3fd81b6e4a8c} - - - - - QP_port - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP_spy - - - QP_spy - - - QP_spy - - - QP_spy - - - QP_spy - - - QP - - - QP - - - - - QP_port - - - QP_port - - + + + + + {553ace6f-efbf-49d9-be33-15209894492c} + + + {f23cedd0-0f13-4d39-b4f1-77eaa32e87fd} + + + {60f745f8-1607-4e49-a403-3fd81b6e4a8c} + + + + + QP_port + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP_spy + + + QP_spy + + + QP_spy + + + QP_spy + + + QP_spy + + + QP + + + QP + + + + + QP_port + + + QP_port + + \ No newline at end of file diff --git a/ports/win32-qutest/qs_port.h b/ports/win32-qutest/qs_port.h index 3c262a72..38708843 100644 --- a/ports/win32-qutest/qs_port.h +++ b/ports/win32-qutest/qs_port.h @@ -1,47 +1,39 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port to Win32 with GNU or Visual C++ compilers * @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 5.9.0 -* Date of the Last Update: 2017-05-16 -* -* Q u a n t u m L e a P s -* --------------------------- -* innovating embedded systems -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QS_PORT_H #define QS_PORT_H -/* QS time-stamp size in bytes */ -#define QS_TIME_SIZE 4 +#define QS_TIME_SIZE 4 #ifdef _WIN64 /* 64-bit architecture? */ #define QS_OBJ_PTR_SIZE 8 @@ -61,7 +53,11 @@ * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ -#endif /* QS_PORT_H */ +#endif /* QS_PORT_H */ + diff --git a/ports/win32-qutest/qutest_port.c b/ports/win32-qutest/qutest_port.c index 69c07549..6ed0bba0 100644 --- a/ports/win32-qutest/qutest_port.c +++ b/ports/win32-qutest/qutest_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C QUTest port for Win32 * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.3 -* Last updated on 2021-03-16 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef Q_SPY #error "Q_SPY must be defined to compile qutest_port.c" diff --git a/ports/win32-qutest/safe_std.h b/ports/win32-qutest/safe_std.h index 6f29be3b..7e0a2439 100644 --- a/ports/win32-qutest/safe_std.h +++ b/ports/win32-qutest/safe_std.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief "safe" and facilities -* @ingroup qpspy -* @cond -****************************************************************************** -* Last updated for version 6.9.0 -* Last updated on 2020-08-24 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief "safe" and facilities */ #ifndef SAFE_STD_H #define SAFE_STD_H diff --git a/ports/win32-qv/Makefile b/ports/win32-qv/Makefile index 7eea5eb1..45600ae3 100644 --- a/ports/win32-qv/Makefile +++ b/ports/win32-qv/Makefile @@ -64,7 +64,6 @@ VPATH = \ # list of all include directories needed by this project INCLUDES = \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- diff --git a/ports/win32-qv/qep_port.h b/ports/win32-qv/qep_port.h index 103b43de..a68b88b2 100644 --- a/ports/win32-qv/qep_port.h +++ b/ports/win32-qv/qep_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QEP/C port to Win32 with GNU or Visual Studio C/C++ compilers -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-23 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port to Win32 with GNU or Visual Studio C/C++ compilers */ #ifndef QEP_PORT_H #define QEP_PORT_H diff --git a/ports/win32-qv/qf_port.c b/ports/win32-qv/qf_port.c index d667b056..33f41eb1 100644 --- a/ports/win32-qv/qf_port.c +++ b/ports/win32-qv/qf_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C port to Win32 API (single-threaded, like the QV kernel) * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-18 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -54,7 +47,6 @@ Q_DEFINE_THIS_MODULE("qf_port") /* Global objects ==========================================================*/ -QPSet QV_readySet_; /* QV-ready set of active objects */ HANDLE QV_win32Event_; /* Win32 event to signal events */ /* Local objects ===========================================================*/ @@ -107,9 +99,9 @@ int_t QF_run(void) { while (l_isRunning) { /* find the maximum priority AO ready to run */ - if (QPSet_notEmpty(&QV_readySet_)) { - uint_fast8_t p = QPSet_findMax(&QV_readySet_); - QActive *a = QF_active_[p]; + if (QPSet_notEmpty(&QF_readySet_)) { + uint_fast8_t p = QPSet_findMax(&QF_readySet_); + QActive *a = QActive_registry_[p]; QF_CRIT_X_(); /* the active object 'a' must still be registered in QF @@ -130,7 +122,7 @@ int_t QF_run(void) { QF_CRIT_E_(); if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ - QPSet_remove(&QV_readySet_, p); + QPSet_remove(&QF_readySet_, p); } } else { @@ -196,7 +188,7 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, QEQueue_init(&me->eQueue, qSto, qLen); me->prio = prio; /* set QF priority of this AO before adding it to QF */ - QF_add_(me); /* make QF aware of this AO */ + QActive_register_(me); /* make QF aware of this AO */ /* the top-most initial tran. (virtual) */ QHSM_INIT(&me->super, par, me->prio); @@ -211,10 +203,10 @@ void QActive_stop(QActive * const me) { /* make sure the AO is no longer in "ready set" */ QF_CRIT_E_(); - QPSet_remove(&QV_readySet_, me->prio); + QPSet_remove(&QF_readySet_, me->prio); QF_CRIT_X_(); - QF_remove_(me); /* remove this AO from QF */ + QActive_unregister_(me); /* un-register this active object */ } #endif /*..........................................................................*/ @@ -243,7 +235,7 @@ static DWORD WINAPI ticker_thread(LPVOID arg) { /* for CreateThread() */ while (l_isRunning) { Sleep(l_tickMsec); /* wait for the tick interval */ - QF_onClockTick(); /* clock tick callback (must call QF_TICK_X()) */ + QF_onClockTick(); /* clock tick callback (must call QTIMEEVT_TICK_X()) */ } (void)arg; /* unused parameter */ diff --git a/ports/win32-qv/qf_port.h b/ports/win32-qv/qf_port.h index e5bdbfdb..a6fea694 100644 --- a/ports/win32-qv/qf_port.h +++ b/ports/win32-qv/qf_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C port to Win32 API (single-threaded, like the QV kernel) * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-08 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QF_PORT_H #define QF_PORT_H @@ -108,7 +101,7 @@ int QF_consoleWaitForKey(void); #define QACTIVE_EQUEUE_WAIT_(me_) \ Q_ASSERT_ID(0, (me_)->eQueue.frontEvt != (QEvt *)0) #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - QPSet_insert(&QV_readySet_, (me_)->prio); \ + QPSet_insert(&QF_readySet_, (me_)->prio); \ (void)SetEvent(QV_win32Event_) /* native QF event pool operations */ @@ -135,7 +128,6 @@ int QF_consoleWaitForKey(void); #define WIN32_LEAN_AND_MEAN #include /* Win32 API */ - extern QPSet QV_readySet_; /* QV-ready set of active objects */ extern HANDLE QV_win32Event_; /* Win32 event to signal events */ #endif /* QP_IMPL */ diff --git a/ports/win32-qv/qp.sln b/ports/win32-qv/qp.sln index e7b22a56..19697b50 100644 --- a/ports/win32-qv/qp.sln +++ b/ports/win32-qv/qp.sln @@ -1,42 +1,42 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qp", "qp.vcxproj", "{3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - QSpy|Win32 = QSpy|Win32 - QSpy|x64 = QSpy|x64 - QSpy64|Win32 = QSpy64|Win32 - QSpy64|x64 = QSpy64|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.Build.0 = Debug|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.ActiveCfg = Debug|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.Build.0 = Debug|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.Build.0 = QSpy|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.ActiveCfg = QSpy|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.Build.0 = QSpy|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.ActiveCfg = QSpy64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.Build.0 = QSpy64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.ActiveCfg = QSpy64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.Build.0 = QSpy64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.ActiveCfg = Release|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.Build.0 = Release|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.ActiveCfg = Release|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {26B33241-845D-43F5-BCB4-456C2AB98376} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qp", "qp.vcxproj", "{3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + QSpy|Win32 = QSpy|Win32 + QSpy|x64 = QSpy|x64 + QSpy64|Win32 = QSpy64|Win32 + QSpy64|x64 = QSpy64|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.Build.0 = Debug|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.ActiveCfg = Debug|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.Build.0 = Debug|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.ActiveCfg = QSpy|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.Build.0 = QSpy|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.ActiveCfg = QSpy|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.Build.0 = QSpy|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.ActiveCfg = QSpy64|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.Build.0 = QSpy64|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.ActiveCfg = QSpy64|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.Build.0 = QSpy64|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.ActiveCfg = Release|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.Build.0 = Release|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.ActiveCfg = Release|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {26B33241-845D-43F5-BCB4-456C2AB98376} + EndGlobalSection +EndGlobal diff --git a/ports/win32-qv/qp.vcxproj b/ports/win32-qv/qp.vcxproj index b243ecca..4c0c7881 100644 --- a/ports/win32-qv/qp.vcxproj +++ b/ports/win32-qv/qp.vcxproj @@ -1,403 +1,403 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - QSpy64 - Win32 - - - QSpy64 - x64 - - - QSpy - x64 - - - Release - Win32 - - - QSpy - Win32 - - - Release - x64 - - - - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9} - qp - ManagedCProj - 10.0 - - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - true - v142 - - - StaticLibrary - NotSet - false - true - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - QSpy64\ - $(Configuration)\ - QSpy64\ - false - false - false - false - - - QSpy64\ - QSpy64\ - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Full - .;../../include;../../src;%(AdditionalIncludeDirectories) - QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - - - Default - 4127;%(DisableSpecificWarnings) - false - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Full - .;../../include;../../src;%(AdditionalIncludeDirectories) - QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - - - Default - 4127;%(DisableSpecificWarnings) - false - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - true - true - - - true - true - - - true - true - - - - - true - true - true - true - - - - - - - - - - - - - - - - - true - true - false - false - false - false - true - true - - - true - true - false - false - false - false - true - true - - - true - true - false - false - false - false - true - true - - - true - true - false - false - false - false - true - true - - - true - true - true - true - true - true - true - true - - - - true - true - true - true - - - - - - - - - - - - \ No newline at end of file + + + + + Debug + Win32 + + + Debug + x64 + + + QSpy64 + Win32 + + + QSpy64 + x64 + + + QSpy + x64 + + + Release + Win32 + + + QSpy + Win32 + + + Release + x64 + + + + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9} + qp + ManagedCProj + 10.0 + + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + true + v142 + + + StaticLibrary + NotSet + false + true + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + false + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + false + $(SolutionDir)$(Configuration)\ + QSpy64\ + $(Configuration)\ + QSpy64\ + false + false + false + false + + + QSpy64\ + QSpy64\ + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Full + .;../../include;%(AdditionalIncludeDirectories) + QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + + + Default + 4127;%(DisableSpecificWarnings) + false + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Full + .;../../include;%(AdditionalIncludeDirectories) + QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + + + Default + 4127;%(DisableSpecificWarnings) + false + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + true + true + + + true + true + + + true + true + + + + + true + true + true + true + + + + + + + + + + + + + + + + + true + true + false + false + false + false + true + true + + + true + true + false + false + false + false + true + true + + + true + true + false + false + false + false + true + true + + + true + true + false + false + false + false + true + true + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + + + + + + + + + + + + diff --git a/ports/win32-qv/qp.vcxproj.filters b/ports/win32-qv/qp.vcxproj.filters index 3dfce37d..7482ddb5 100644 --- a/ports/win32-qv/qp.vcxproj.filters +++ b/ports/win32-qv/qp.vcxproj.filters @@ -1,90 +1,90 @@ - - - - - {56273036-d67c-489b-bc4b-84d286c6a000} - - - {553ace6f-efbf-49d9-be33-15209894492c} - - - {f23cedd0-0f13-4d39-b4f1-77eaa32e87fd} - - - {a9d19e53-4919-44a0-b925-5b00e2189525} - - - - - QP_port - - - QWIN-GUI - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QS - - - QS - - - QS - - - QS - - - QS - - - QP_port - - - - - QP_port - - - QP_port - - - QWIN-GUI - - + + + + + {56273036-d67c-489b-bc4b-84d286c6a000} + + + {553ace6f-efbf-49d9-be33-15209894492c} + + + {f23cedd0-0f13-4d39-b4f1-77eaa32e87fd} + + + {a9d19e53-4919-44a0-b925-5b00e2189525} + + + + + QP_port + + + QWIN-GUI + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QS + + + QS + + + QS + + + QS + + + QS + + + QP_port + + + + + QP_port + + + QP_port + + + QWIN-GUI + + \ No newline at end of file diff --git a/ports/win32-qv/qs_port.c b/ports/win32-qv/qs_port.c index cb07e892..80b3f07d 100644 --- a/ports/win32-qv/qs_port.c +++ b/ports/win32-qv/qs_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port for Win32 API * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.3 -* Last updated on 2021-03-16 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef Q_SPY #error "Q_SPY must be defined to compile qs_port.c" diff --git a/ports/win32-qv/qs_port.h b/ports/win32-qv/qs_port.h index b3e409b9..fd484c47 100644 --- a/ports/win32-qv/qs_port.h +++ b/ports/win32-qv/qs_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port to Win32 with GNU or Visual C++ compilers * @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 6.3.6 -* Date of the Last Update: 2018-10-14 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QS_PORT_H #define QS_PORT_H @@ -60,7 +53,10 @@ void QS_rx_input(void); /* handle the QS-RX input */ * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/win32-qv/qwin_gui.c b/ports/win32-qv/qwin_gui.c index 88ed799a..48e4ef96 100644 --- a/ports/win32-qv/qwin_gui.c +++ b/ports/win32-qv/qwin_gui.c @@ -1,40 +1,33 @@ -/** -* @file -* @brief QWIN GUI facilities for building realistic embedded front panels -* @cond -****************************************************************************** -* Last updated for version 6.6.0 -* Last updated on 2019-07-30 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QWIN GUI facilities for building realistic embedded front panels */ #include "qwin_gui.h" #include diff --git a/ports/win32-qv/qwin_gui.h b/ports/win32-qv/qwin_gui.h index ecd2daac..f0531374 100644 --- a/ports/win32-qv/qwin_gui.h +++ b/ports/win32-qv/qwin_gui.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QWIN GUI facilities for building realistic embedded front panels -* @cond -****************************************************************************** -* Last updated for version 6.7.0 -* Last updated on 2019-12-18 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QWIN GUI facilities for building realistic embedded front panels */ #ifndef QWIN_GUI_H #define QWIN_GUI_H diff --git a/ports/win32-qv/safe_std.h b/ports/win32-qv/safe_std.h index 6f29be3b..7e0a2439 100644 --- a/ports/win32-qv/safe_std.h +++ b/ports/win32-qv/safe_std.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief "safe" and facilities -* @ingroup qpspy -* @cond -****************************************************************************** -* Last updated for version 6.9.0 -* Last updated on 2020-08-24 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief "safe" and facilities */ #ifndef SAFE_STD_H #define SAFE_STD_H diff --git a/ports/win32/Makefile b/ports/win32/Makefile index da3a4f72..f8135ff9 100644 --- a/ports/win32/Makefile +++ b/ports/win32/Makefile @@ -64,7 +64,6 @@ VPATH = \ # list of all include directories needed by this project INCLUDES = \ -I$(QPC)/include \ - -I$(QPC)/src \ -I$(QP_PORT_DIR) #----------------------------------------------------------------------------- diff --git a/ports/win32/qep_port.h b/ports/win32/qep_port.h index 103b43de..6a2e7e67 100644 --- a/ports/win32/qep_port.h +++ b/ports/win32/qep_port.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QEP/C port to Win32 with GNU or Visual Studio C/C++ compilers -* @cond -****************************************************************************** -* Last updated for version 6.8.0 -* Last updated on 2020-01-23 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port to Win32 with GNU or Visual Studio C/C++ compilers */ #ifndef QEP_PORT_H #define QEP_PORT_H @@ -57,13 +50,14 @@ * compiler in the C++ mode, which can happen when qep_port.h is included * in a C++ module, or the compilation is forced to C++ by the option /TP. * - * The following pragma suppresses the level-4 C++ warnings C4510, C4512, and - * C4610, which warn that default constructors and assignment operators could - * not be generated for structures QMState and QMTranActTable. + * The following pragma suppresses the level-4 C++ warnings C4510, C4512, + * and C4610, which warn that default constructors and assignment operators + * could not be generated for structures QMState and QMTranActTable. * - * The QP/C source code cannot be changed to avoid these C++ warnings, because - * the structures QMState and QMTranActTable must remain PODs (Plain Old - * Datatypes) to be initializable statically with constant initializers. + * The QP/C source code cannot be changed to avoid these C++ warnings + * because the structures QMState and QMTranActTable must remain PODs + * (Plain Old Datatypes) to be initializable statically with constant + * initializers. */ #pragma warning (disable: 4510 4512 4610) diff --git a/ports/win32/qf_port.c b/ports/win32/qf_port.c index 4f030a3d..9db6e3e5 100644 --- a/ports/win32/qf_port.c +++ b/ports/win32/qf_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C port to Win32 API * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-18 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -115,7 +108,7 @@ int_t QF_run(void) { while (l_isRunning) { Sleep(l_tickMsec); /* wait for the tick interval */ - QF_onClockTick(); /* clock tick callback (must call QF_TICKX()) */ + QF_onClockTick(); /* must call QTIMEEVT_TICK_X() */ } QF_onCleanup(); /* cleanup callback */ @@ -150,7 +143,7 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, && (stkSto == (void *)0)); /* statck storage must NOT... * ... be provided */ me->prio = prio; /* set QF priority of this AO before adding it to QF */ - QF_add_(me); /* make QF aware of this active object */ + QActive_register_(me); /* make QF aware of this active object */ QEQueue_init(&me->eQueue, qSto, qLen); @@ -226,7 +219,7 @@ static DWORD WINAPI ao_thread(LPVOID arg) { /* for CreateThread() */ QF_gc(e); /* check if the event is garbage, and collect it if so */ } #ifdef QF_ACTIVE_STOP - QF_remove_(act); /* remove this object from QF */ + QActive_unregister_(act); /* un-register this active object */ #endif return (DWORD)0; /* return success */ } diff --git a/ports/win32/qf_port.h b/ports/win32/qf_port.h index c100b4be..0eead8f7 100644 --- a/ports/win32/qf_port.h +++ b/ports/win32/qf_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QF/C port to Win32 API (multi-threaded) * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.1 -* Last updated on 2020-09-08 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QF_PORT_H #define QF_PORT_H @@ -119,7 +112,7 @@ int QF_consoleWaitForKey(void); QF_CRIT_E_(); \ } #define QACTIVE_EQUEUE_SIGNAL_(me_) \ - Q_ASSERT_ID(410, QF_active_[(me_)->prio] != (QActive *)0); \ + Q_ASSERT_ID(410, QActive_registry_[(me_)->prio] != (QActive *)0); \ (void)SetEvent((me_)->osObject) /* native QF event pool operations */ diff --git a/ports/win32/qp.sln b/ports/win32/qp.sln index e7b22a56..19697b50 100644 --- a/ports/win32/qp.sln +++ b/ports/win32/qp.sln @@ -1,42 +1,42 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qp", "qp.vcxproj", "{3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - QSpy|Win32 = QSpy|Win32 - QSpy|x64 = QSpy|x64 - QSpy64|Win32 = QSpy64|Win32 - QSpy64|x64 = QSpy64|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.Build.0 = Debug|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.ActiveCfg = Debug|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.Build.0 = Debug|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.ActiveCfg = QSpy|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.Build.0 = QSpy|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.ActiveCfg = QSpy|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.Build.0 = QSpy|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.ActiveCfg = QSpy64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.Build.0 = QSpy64|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.ActiveCfg = QSpy64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.Build.0 = QSpy64|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.ActiveCfg = Release|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.Build.0 = Release|Win32 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.ActiveCfg = Release|x64 - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {26B33241-845D-43F5-BCB4-456C2AB98376} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qp", "qp.vcxproj", "{3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + QSpy|Win32 = QSpy|Win32 + QSpy|x64 = QSpy|x64 + QSpy64|Win32 = QSpy64|Win32 + QSpy64|x64 = QSpy64|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|Win32.Build.0 = Debug|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.ActiveCfg = Debug|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Debug|x64.Build.0 = Debug|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.ActiveCfg = QSpy|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|Win32.Build.0 = QSpy|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.ActiveCfg = QSpy|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy|x64.Build.0 = QSpy|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.ActiveCfg = QSpy64|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|Win32.Build.0 = QSpy64|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.ActiveCfg = QSpy64|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.QSpy64|x64.Build.0 = QSpy64|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.ActiveCfg = Release|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|Win32.Build.0 = Release|Win32 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.ActiveCfg = Release|x64 + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {26B33241-845D-43F5-BCB4-456C2AB98376} + EndGlobalSection +EndGlobal diff --git a/ports/win32/qp.vcxproj b/ports/win32/qp.vcxproj index b243ecca..a16a87df 100644 --- a/ports/win32/qp.vcxproj +++ b/ports/win32/qp.vcxproj @@ -1,403 +1,403 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - QSpy64 - Win32 - - - QSpy64 - x64 - - - QSpy - x64 - - - Release - Win32 - - - QSpy - Win32 - - - Release - x64 - - - - {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9} - qp - ManagedCProj - 10.0 - - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - true - v142 - - - StaticLibrary - NotSet - false - true - v142 - - - StaticLibrary - NotSet - false - v142 - - - StaticLibrary - NotSet - false - v142 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - QSpy64\ - $(Configuration)\ - QSpy64\ - false - false - false - false - - - QSpy64\ - QSpy64\ - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Full - .;../../include;../../src;%(AdditionalIncludeDirectories) - QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - - - Default - 4127;%(DisableSpecificWarnings) - false - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Full - .;../../include;../../src;%(AdditionalIncludeDirectories) - QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - - - Default - 4127;%(DisableSpecificWarnings) - false - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - Disabled - .;../../include;../../src;%(AdditionalIncludeDirectories) - Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) - - - MultiThreaded - NotUsing - Level4 - ProgramDatabase - Default - 4127;%(DisableSpecificWarnings) - - - Cleanup - del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate - - - - - true - true - - - true - true - - - true - true - - - - - true - true - true - true - - - - - - - - - - - - - - - - - true - true - false - false - false - false - true - true - - - true - true - false - false - false - false - true - true - - - true - true - false - false - false - false - true - true - - - true - true - false - false - false - false - true - true - - - true - true - true - true - true - true - true - true - - - - true - true - true - true - - - - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + QSpy64 + Win32 + + + QSpy64 + x64 + + + QSpy + x64 + + + Release + Win32 + + + QSpy + Win32 + + + Release + x64 + + + + {3E9F0C4A-01B7-4357-95C6-0FE86BACB6D9} + qp + ManagedCProj + 10.0 + + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + true + v142 + + + StaticLibrary + NotSet + false + true + v142 + + + StaticLibrary + NotSet + false + v142 + + + StaticLibrary + NotSet + false + v142 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + false + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + false + $(SolutionDir)$(Configuration)\ + QSpy64\ + $(Configuration)\ + QSpy64\ + false + false + false + false + + + QSpy64\ + QSpy64\ + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Full + .;../../include;%(AdditionalIncludeDirectories) + QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + + + Default + 4127;%(DisableSpecificWarnings) + false + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Full + .;../../include;%(AdditionalIncludeDirectories) + QWIN_GUI;NDEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + + + Default + 4127;%(DisableSpecificWarnings) + false + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + Disabled + .;../../include;%(AdditionalIncludeDirectories) + Q_SPY;QWIN_GUI;_DEBUG;%(PreprocessorDefinitions) + + + MultiThreaded + NotUsing + Level4 + ProgramDatabase + Default + 4127;%(DisableSpecificWarnings) + + + Cleanup + del $(IntDir)*.obj $(IntDir)*.tlog $(IntDir)*.lastbuildstate + + + + + true + true + + + true + true + + + true + true + + + + + true + true + true + true + + + + + + + + + + + + + + + + + true + true + false + false + false + false + true + true + + + true + true + false + false + false + false + true + true + + + true + true + false + false + false + false + true + true + + + true + true + false + false + false + false + true + true + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/ports/win32/qp.vcxproj.filters b/ports/win32/qp.vcxproj.filters index 3dfce37d..7482ddb5 100644 --- a/ports/win32/qp.vcxproj.filters +++ b/ports/win32/qp.vcxproj.filters @@ -1,90 +1,90 @@ - - - - - {56273036-d67c-489b-bc4b-84d286c6a000} - - - {553ace6f-efbf-49d9-be33-15209894492c} - - - {f23cedd0-0f13-4d39-b4f1-77eaa32e87fd} - - - {a9d19e53-4919-44a0-b925-5b00e2189525} - - - - - QP_port - - - QWIN-GUI - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QP - - - QS - - - QS - - - QS - - - QS - - - QS - - - QP_port - - - - - QP_port - - - QP_port - - - QWIN-GUI - - + + + + + {56273036-d67c-489b-bc4b-84d286c6a000} + + + {553ace6f-efbf-49d9-be33-15209894492c} + + + {f23cedd0-0f13-4d39-b4f1-77eaa32e87fd} + + + {a9d19e53-4919-44a0-b925-5b00e2189525} + + + + + QP_port + + + QWIN-GUI + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QP + + + QS + + + QS + + + QS + + + QS + + + QS + + + QP_port + + + + + QP_port + + + QP_port + + + QWIN-GUI + + \ No newline at end of file diff --git a/ports/win32/qs_port.c b/ports/win32/qs_port.c index cb07e892..6fcadd9b 100644 --- a/ports/win32/qs_port.c +++ b/ports/win32/qs_port.c @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port for Win32 API * @ingroup ports -* @cond -****************************************************************************** -* Last updated for version 6.9.3 -* Last updated on 2021-03-16 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef Q_SPY #error "Q_SPY must be defined to compile qs_port.c" diff --git a/ports/win32/qs_port.h b/ports/win32/qs_port.h index b3e409b9..fd484c47 100644 --- a/ports/win32/qs_port.h +++ b/ports/win32/qs_port.h @@ -1,41 +1,34 @@ -/** +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* * @file * @brief QS/C port to Win32 with GNU or Visual C++ compilers * @ingroup ports -* @cond -****************************************************************************** -* Last Updated for Version: 6.3.6 -* Date of the Last Update: 2018-10-14 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* -* 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* -* Contact information: -* -* -****************************************************************************** -* @endcond */ #ifndef QS_PORT_H #define QS_PORT_H @@ -60,7 +53,10 @@ void QS_rx_input(void); /* handle the QS-RX input */ * to be used with the other QP component, by simply including "qf_port.h" * *before* "qs.h". */ +#ifndef QF_PORT_H #include "qf_port.h" /* use QS with QF */ +#endif + #include "qs.h" /* QS platform-independent public interface */ #endif /* QS_PORT_H */ diff --git a/ports/win32/qwin_gui.c b/ports/win32/qwin_gui.c index 88ed799a..92c06dac 100644 --- a/ports/win32/qwin_gui.c +++ b/ports/win32/qwin_gui.c @@ -1,40 +1,33 @@ -/** -* @file -* @brief QWIN GUI facilities for building realistic embedded front panels -* @cond -****************************************************************************** -* Last updated for version 6.6.0 -* Last updated on 2019-07-30 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QWIN GUI facilities for building realistic embedded front panels */ #include "qwin_gui.h" #include diff --git a/ports/win32/qwin_gui.h b/ports/win32/qwin_gui.h index ecd2daac..357a88f9 100644 --- a/ports/win32/qwin_gui.h +++ b/ports/win32/qwin_gui.h @@ -1,40 +1,33 @@ -/** -* @file -* @brief QWIN GUI facilities for building realistic embedded front panels -* @cond -****************************************************************************** -* Last updated for version 6.7.0 -* Last updated on 2019-12-18 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QWIN GUI facilities for building realistic embedded front panels */ #ifndef QWIN_GUI_H #define QWIN_GUI_H diff --git a/ports/win32/safe_std.h b/ports/win32/safe_std.h index 6f29be3b..7e0a2439 100644 --- a/ports/win32/safe_std.h +++ b/ports/win32/safe_std.h @@ -1,41 +1,33 @@ -/** -* @file -* @brief "safe" and facilities -* @ingroup qpspy -* @cond -****************************************************************************** -* Last updated for version 6.9.0 -* Last updated on 2020-08-24 -* -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software -* +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) * 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 -* by the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* Alternatively, this program may be distributed and modified under the -* terms of Quantum Leaps commercial licenses, which expressly supersede -* the GNU General Public License and are specifically designed for -* licensees interested in retaining the proprietary status of their code. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -****************************************************************************** -* @endcond +============================================================================*/ +/*! +* @date Last updated on: 2022-07-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief "safe" and facilities */ #ifndef SAFE_STD_H #define SAFE_STD_H diff --git a/ports/zephyr/README.md b/ports/zephyr/README.md new file mode 100644 index 00000000..12ba36cd --- /dev/null +++ b/ports/zephyr/README.md @@ -0,0 +1,3 @@ +The QP/C port to Zephyr is located in the `qpc/zephyr` directory +to follow the conventions established for +[Zephyr modules](https://docs.zephyrproject.org/latest/develop/modules.html) diff --git a/qpc.qm b/qpc.qm new file mode 100644 index 00000000..fcc09a1a --- /dev/null +++ b/qpc.qm @@ -0,0 +1,14202 @@ + + + QP/C Real-Time Embedded Framework (RTEF) +The model is used to generate the whole QP/C source code. + +Copyright (C) 2005 Quantum Leaps, LLC <state-machine.com>. + +SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial + +This software is dual-licensed under the terms of the open source GNU +General Public License version 3 (or any later version), or alternatively, +under the terms of one of the closed source Quantum Leaps commercial +licenses. + +The terms of the open source GNU General Public License version 3 +can be found at: <www.gnu.org/licenses/gpl-3.0> + +The terms of the closed source Quantum Leaps commercial licenses +can be found at: <www.state-machine.com/licensing> + +Redistributions in source code must retain this copyright notice. +Plagiarizing this software to sidestep the license obligations is illegal. + +Contact information: +<www.state-machine.com/licensing> +<info@state-machine.com> + + + + /*! typedef for assertions-ids and line numbers in assertions. +* +* @details +* This typedef specifies integer type for exclusive use in assertions. +* Use of this type, rather than plain 'int', is in compliance +* with the MISRA-C 2012 Dir 4.6 (adv). +*/ + + + /*! no-return function specifier */ + void + + + /*! Define the file name (with `__FILE__`) for assertions in this file +* +* @details +* Macro to be placed at the top of each C/C++ module to define the +* single instance of the file name string to be used in reporting +* assertions in this module. +* +* @note +* The file name string literal is defined by means of the standard +* preprocessor macro `__FILE__`. However, please note that, depending +* on the compiler, the `__FILE__` macro might contain the whole path name +* to the file, which might be inconvenient to log assertions. +* +* @attention +* This macro should **not** be terminated by a semicolon. +* +* @sa Q_DEFINE_THIS_MODULE() +*/ + Q_DEFINE_THIS_MODULE(__FILE__) + + + /*! Define the user-specified module name for assertions in this file. +* +* @details +* Macro to be placed at the top of each C/C++ module to define the +* single instance of the module name string to be used in reporting +* assertions in this module. This macro takes the user-supplied parameter +* @p name_ instead of `__FILE__` to precisely control the name of the +* module. +* +* @param[in] name_ string constant representing the module name +* +* @note +* This macro should **not** be terminated by a semicolon. +*/ + + \ + static char const Q_this_module_[] = name_; + + + /*! inactive version of Q_DEFINE_THIS_MODULE() */ + + + + /*! General purpose assertion with user-specified ID number. +* +* @details +* Makes sure the `test_` parameter is TRUE. Calls the Q_onAssert() +* callback if the `test_` evaluates to FALSE. This assertion takes the +* user-supplied parameter @p id_ to identify the location of this +* assertion within the file. This avoids the volatility of using line +* numbers, which change whenever a line of code is added or removed +* upstream from the assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression to check +* +* @note +* The `test_` expression is **not** evaluated if assertions are +* disabled with the ::Q_NASSERT switch. +*/ + + + ((expr_) \ + ? ((void)0) : Q_onAssert(&Q_this_module_[0], (id_))) + + + /*! inactive version of Q_ASSERT_ID() */ + + + ((void)0) + + + /*! Assertion with user-specified ID for a wrong path through the code +* +* @details +* Calls the Q_onAssert() callback if ever executed. This assertion +* takes the user-supplied parameter `id_` to identify the location of +* this assertion within the file. This avoids the volatility of using +* line numbers, which change whenever a line of code is added or removed +* upstream from the assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* +* @note +* Does noting if assertions are disabled with the ::Q_NASSERT switch. +*/ + + Q_onAssert(&Q_this_module_[0], (id_)) + + + /*! inactive version of Q_ERROR_ID() */ + + ((void)0) + + + /*! General purpose assertion with user-specified ID number that +* **always** evaluates the `expr_` expression. +* +* @details +* Like the Q_ASSERT_ID() macro, except it **always** evaluates the +* `expr_` expression even when assertions are disabled with the +* ::Q_NASSERT macro. However, when the ::Q_NASSERT macro is defined, the +* Q_onAssert() callback is **not** called, even if `expr_` evaluates +* to FALSE. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression to check +*/ + + + Q_ASSERT_ID((id_), (expr_)) + + + /*! inactive version of Q_ALLEGE_ID() +* +* @attention +* The expression `expr_` **is** executed. +*/ + + + ((void)(expr_)) + + + /*! Assertion for checking preconditions. +* +* @details +* This macro is equivalent to Q_ASSERT_ID(), except the name provides a better +* documentation of the intention of this assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression +*/ + + + Q_ASSERT_ID((id_), (expr_)) + + + /*! Assertion for checking preconditions (based on __LINE__). +* +* @details +* Equivalent to Q_ASSERT(), except the name provides a better documentation +* of the intention of this assertion. +* +* @param[in] expr_ Boolean expression +*/ + + Q_REQUIRE_ID(__LINE__, (expr_)) + + + /*! Assertion for checking postconditions. +* +* @details +* This macro is equivalent to Q_ASSERT_ID(), except the name provides a better +* documentation of the intention of this assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression +*/ + + + Q_ASSERT_ID((id_), (expr_)) + + + /*! Assertion for checking postconditions. +* +* @details +* Equivalent to Q_ASSERT(), except the name provides a better documentation +* of the intention of this assertion. +* +* @param[in] expr_ Boolean expression +*/ + + Q_ENSURE_ID(__LINE__, (expr_)) + + + /*! Assertion for checking invariants. +* +* @details +* Equivalent to Q_ASSERT(), except the name provides a better documentation +* of the intention of this assertion. +* +* @param[in] id_ ID number (unique within the module) of the assertion +* @param[in] expr_ Boolean expression +*/ + + + Q_ASSERT_ID((id_), (expr_)) + + + /*! Assertion for checking invariants. +* +* @details +* Equivalent to Q_ASSERT(), except the name provides a better documentation +* of the intention of this assertion. +* +* @param[in] expr_ Boolean expression +*/ + + Q_INVARIANT_ID(__LINE__, (expr_)) + + + /*! Assertion for a wrong path through the code (based on __LINE__) +* +* @details +* Calls the Q_onAssert() callback if ever executed. +* +* @note +* This macro identifies the problem location with the line number, +* which might change as the code is modified. +* +* @sa Q_ASSERT_ID() +*/ + + Q_ASSERT_ID(__LINE__, (expr_)) + + + /*! Assertion for a wrong path through the code +* +* @details +* Calls the Q_onAssert() callback if ever executed. +* +* @note +* This macro identifies the problem location with the line number, +* which might change as the code is modified. +* +* @sa Q_ERROR_ID() +*/ + Q_ERROR_ID(__LINE__) + + + /*! General purpose assertion with user-specified ID number that +* **always** evaluates the `expr_` expression. +* +* @details +* Like the Q_ASSERT_ID() macro, except it **always** evaluates the +* `expr_` expression even when assertions are disabled with the +* ::Q_NASSERT macro. However, when the ::Q_NASSERT macro is defined, the +* Q_onAssert() callback is **not** called, even if `expr_` evaluates +* to FALSE. +* +* @param[in] expr_ Boolean expression to check +* +* @sa Q_ALLEGE_ID() +*/ + + Q_ALLEGE_ID(__LINE__, (expr_)) + + + /*! Static (compile-time) assertion. +* +* @details +* This type of assertion deliberately causes a compile-time error when +* the `expr_` Boolean expression evaluates to FALSE. The macro exploits +* the fact that in C/C++ a dimension of an array cannot be negative. +* The compile-time assertion has no runtime side effects. +* +* @param[in] expr_ Compile-time Boolean expression +* +* @note +* The static assertion macro is provided for backwards compatibility with +* older C standards. Newer C11 supports `_Static_assert()`, which should +* be used instead of Q_ASSERT_STATIC(). +*/ + + extern int_t Q_static_assert_[(expr_) ? 1 : -1] + + + /*! Static (compile-time) assertion. +* +* @deprecated +* Use Q_ASSERT_STATIC() or better yet `_Static_assert()` instead. +*/ + + Q_ASSERT_STATIC(expr_) + + + /*! Callback function invoked in case of an assertion failure. +* +* @details +* This is an application-specific callback function needs to be defined in +* the application to perform the clean system shutdown and perhaps a reset. +* The Q_onAssert() function is the last line of defense after the +* system failure and its implementation shouild be very **carefully** +* designed and **tested** under various fault conditions, including but +* not limited to: stack overflow, stack corruption, or calling Q_onAssert() +* from an interrupt. + +* @param[in] module name of the file/module in which the assertion failed +* (constant, zero-terminated C string) +* @param[in] location location of the assertion within the module. This could +* be a line number or a user-specified ID-number. +* +* @returns +* This callback function should **not return** (see ::Q_NORETURN), +* as continuation after an assertion failure does not make sense. +* +* @note +* It is typically a **bad idea** to implement Q_onAssert() as an endless +* loop that ties up the CPU. During debuggin, Q_onAssert() is an ideal +* place to put a breakpoint. +* +* Called by the following: Q_ASSERT_ID(), Q_ERROR_ID(), Q_REQUIRE_ID(), +* Q_ENSURE_ID(), Q_INVARIANT_ID() and Q_ALLEGE_ID() as well as: +* Q_ASSERT(), Q_ERROR(), Q_REQUIRE(), Q_ENSURE(), Q_INVARIANT(), +* and Q_ALLEGE(). +*/ + + + + + + + /*! The current QP version as an unsigned number +* +* @details +* ::QP_VERSION is a decimal constant, where XX is a 1-digit or 2-digit +* major version number, Y is a 1-digit minor version number, and Z is +* a 1-digit release number. +*/ + 701U + + + /*! The current QP version as a zero terminated string literal. +* +* @details +* ::QP_VERSION_STR is of the form "XX.Y.Z", where XX is a 1-or 2-digit +* major version number, Y is a 1-digit minor version number, and Z is +* a 1-digit release number. +*/ + "7.0.1" + + + /*! Encrypted current QP release (7.0.1) and date (2022-06-30) */ + 0x7C7E85E2U + + + /*! the current QP version number string in ROM, based on #QP_VERSION_STR */ + = QP_VERSION_STR; + + + + + /*! alias for line numbers in assertions and return from QF_run() */ + + + /*! alias for enumerations used for event signals */ + + + /*! alias for IEEE 754 32-bit floating point number, +* MISRA-C 2012 Dir 4.6(A) +* +* @note +* QP does not use floating-point types anywhere in the internal +* implementation, except in QS software tracing, where utilities for +* output of floating-point numbers are provided for application-specific +* trace records. +*/ + + + /*! alias for IEEE 754 64-bit floating point number, +* MISRA-C 2012 Dir 4.6(A) +* +* @note +* QP does not use floating-point types anywhere in the internal +* implementation, except in QS software tracing, where utilities for +* output of floating-point numbers are provided for application-specific +* trace records. +*/ + + + + + /*! The size (in bytes) of the signal of an event. Valid values: +* 1U, 2U, or 4U; default 2U +* +* @details +* This macro can be defined in the QEP port file (qep_port.h) to +* configure the ::QSignal type. When the macro is not defined, the +* default of 2 bytes is applied. +*/ + 2U + + + + + /*! Virtual call to the top-most initial transition in a HSM. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ constant pointer the ::QEvt or a class derived from +* ::QEvt (see @ref oop) +* @param[in] qs_id_ QS local filter ID (used only when Q_SPY is defined) +* +* @note Must be called only ONCE after the SM "constructor". +* +* @tr{RQP102} +* +* @usage +* The following example illustrates how to initialize a SM, and dispatch +* events to it: +* @include qep_qhsm_use.c +*/ + + + + do { \ + Q_ASSERT((me_)->vptr); \ + (*(me_)->vptr->init)((me_), (par_), (qs_id_)); \ +} while (false) + + + + + + do { \ + Q_ASSERT((me_)->vptr); \ + (*(me_)->vptr->init)((me_), (par_), 0U); \ +} while (false) + + + /*! Virtual call to dispatch an event to a HSM +* +* @details +* Processes one event at a time in Run-to-Completion fashion. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ constant pointer the ::QEvt or a class +* derived from ::QEvt (see @ref oop) +* @param[in] qs_id_ QS local filter ID (used only when Q_SPY is defined) +* +* @note Must be called after the "constructor" and after QHSM_INIT(). +* +* @tr{RQP102} +*/ + + + + \ + ((*(me_)->vptr->dispatch)((me_), (e_), (qs_id_))) + + + + + + \ + ((*(me_)->vptr->dispatch)((me_), (e_), 0U)) + + + /*! Perform upcast from a subclass of ::QHsm to the base class ::QHsm +* +* @details +* Upcasting from a subclass to superclass is a very frequent and **safe** +* operation in object-oriented programming and object-oriented languages +* (such as C++) perform such upcasting automatically. However, OOP is +* implemented in C just as a set of coding conventions (see @ref oop), +* and the C compiler does not "know" that certain types are related by +* inheritance. Therefore for C, the upcast must be performed explicitly. +* Unfortunately, pointer casting violates the advisory MISRA-C 2012 +* Rule 11.3(req) "A cast shall not be performed between a pointer to object +* type and a pointer to a different object type". This macro encapsulates +* this deviation and provides a descriptive name for the reason of this cast. +*/ + + ((QHsm *)(ptr_)) + + + /*! Perform upcast from a subclass of ::QHsm to the base class ::QHsm +* +* @details +* Upcasting from a subclass to superclass is a very frequent and **safe** +* operation in object-oriented programming and object-oriented languages +* (such as C++) perform such upcasting automatically. However, OOP is +* implemented in C just as a set of coding conventions (see @ref oop), +* and the C compiler does not "know" that certain types are related by +* inheritance. Therefore for C, the upcast must be performed explicitly. +* Unfortunately, pointer casting violates the advisory MISRA-C 2012 +* Rule 11.3(req) "A cast shall not be performed between a pointer to object +* type and a pointer to a different object type". This macro encapsulates +* this deviation and provides a descriptive name for the reason of this cast. +*/ + + \ + ((Q_HSM_UPCAST(me))->temp.fun = Q_STATE_CAST(target_), Q_RET_TRAN) + + + /*! Macro to call in a state-handler when it executes a transition +* to history. Applicable only to HSMs. +* +* @tr{RQP103} @tr{RQP120H} +* +* @usage +* @include qep_qhist.c +*/ + + \ + ((Q_HSM_UPCAST(me))->temp.fun = (hist_), Q_RET_TRAN_HIST) + + + /*! Macro to call in a state-handler when it designates the superstate +* of a given state. Applicable only to ::QHsm subclasses. +* +* @tr{RQP103} +* +* @usage +* @include qep_qsuper.c +*/ + + \ + ((Q_HSM_UPCAST(me))->temp.fun = Q_STATE_CAST(super_), Q_RET_SUPER) + + + /*! Macro to call in a state-handler when it handles an event. +* @tr{RQP103} @tr{RQP120B} @tr{RQP120C} +*/ + (Q_RET_HANDLED) + + + /*! Macro to call in a state-handler when it attempts to handle +* an event but a guard condition evaluates to 'false' and there is no other +* explicit way of handling the event. Applicable only to ::QHsm subclasses. +*/ + (Q_RET_UNHANDLED) + + + /*! Macro to provide strictly-typed zero-action to terminate action lists +*! in the transition-action-tables +*/ + ((QActionHandler)0) + + + /*! Perform downcast of an event onto a subclass of ::QEvt `class_` +* +* @details +* This macro encapsulates the downcast of ::QEvt pointers, which violates +* MISRA-C 2012 Rule 11.3(R) "A cast shall not be performed between a +* pointer to object type and a pointer to a different object type". This +* macro helps to localize this deviation. +* +* @param class_ a subclass of ::QEvt +* +* @tr{RQP003} +* @tr{PQA11_3} +*/ + + ((class_ const *)(e)) + + + /*! Perform cast to ::QStateHandler. +* @details +* This macro encapsulates the cast of a specific state handler function +* pointer to ::QStateHandler, which violates MISRA:C-2012 Rule 11.1(req) +* "Conversions shall not be performed between a pointer to function and +* any other type". This macro helps to localize this deviation. +* +* @tr{PQP11_1} @tr{PQA11_1} +* +* @usage +* @include qep_qhsm_ctor.c +*/ + + ((QStateHandler)(handler_)) + + + /*! Perform cast to ::QActionHandler. +* @details +* This macro encapsulates the cast of a specific action handler function +* pointer to ::QActionHandler, which violates MISRA:C-2012 Rule 11.1(R) +* "Conversions shall not be performed between a pointer to function and +* any other type". This macro helps to localize this deviation. +* +* @tr{PQP11_1} @tr{PQA11_1} +*/ + + ((QActionHandler)(action_)) + + + /*! Helper macro to clearly mark unused parameters of functions. */ + + ((void)(par_)) + + + /*! Helper macro to calculate static dimension of a 1-dim `array_` +* +* @param array_ 1-dimensional array +* @returns the length of the array (number of elements it can hold) +*/ + + (sizeof(array_) / sizeof((array_)[0U])) + + + /*! Perform cast from unsigned integer `uint_` to pointer of type `type_` +* +* @details +* This macro encapsulates the cast to (type_ *), which QP ports or +* application might use to access embedded hardware registers. +* Such uses can trigger PC-Lint "Note 923: cast from int to pointer" +* and this macro helps to encapsulate this deviation. +*/ + + + ((type_ *)(uint_)) + + + /*! Initializer of static constant QEvt instances +* +* @details +* This macro encapsulates the ugly casting of enumerated signals +* to QSignal and constants for QEvt.poolID and QEvt.refCtr_. +*/ + + { (QSignal)(sig_), 0U, 0U } + + + /*! Macro to call in a QM action-handler when it executes +* an entry action. Applicable only to ::QMsm subclasses. +*/ + + \ + ((Q_HSM_UPCAST(me))->temp.obj = (state_), Q_RET_ENTRY) + + + + (Q_RET_ENTRY) + + + /*! Macro to call in a QM action-handler when it executes +* an exit action. Applicable only to ::QMsm subclasses. +*/ + + \ + ((Q_HSM_UPCAST(me))->temp.obj = (state_), Q_RET_EXIT) + + + + (Q_RET_EXIT) + + + /*! Macro to call in a QM submachine exit-handler. +* Applicable only to subclasses of ::QMsm. +*/ + + \ + ((Q_HSM_UPCAST(me))->temp.obj = (state_), Q_RET_EXIT) + + + /*! Macro to call in a QM state-handler when it executes a regular +* transition. Applicable only to ::QMsm subclasses. +*/ + + ((Q_HSM_UPCAST(me))->temp.tatbl \ + = (struct QMTranActTable const *)(tatbl_), Q_RET_TRAN) + + + /*! Macro to call in a QM state-handler when it executes an initial +* transition. Applicable only to ::QMsm subclasses. +*/ + + ((Q_HSM_UPCAST(me))->temp.tatbl \ + = (struct QMTranActTable const *)(tatbl_), Q_RET_TRAN_INIT) + + + /*! Macro to call in a QM state-handler when it executes a transition +* to history. Applicable only to ::QMsm subclasses. +*/ + + + \ + ((((Q_HSM_UPCAST(me))->state.obj = (history_)), \ + ((Q_HSM_UPCAST(me))->temp.tatbl = \ + (struct QMTranActTable const *)(tatbl_))), \ + Q_RET_TRAN_HIST) + + + /*! Macro to call in a QM state-handler when it executes a transition +* to the submachine via an entry point. +*/ + + ((Q_HSM_UPCAST(me))->temp.tatbl \ + = (struct QMTranActTable const *)(tatbl_), Q_RET_TRAN_EP) + + + /*! Macro to call in a QM state-handler when it executes a transition +* to exit point. Applicable only to ::QMsm subclasses. +*/ + + + \ + ((((Q_HSM_UPCAST(me))->state.act = (xp_)), \ + ((Q_HSM_UPCAST(me))->temp.tatbl = \ + (struct QMTranActTable const *)(tatbl_))), \ + Q_RET_TRAN_XP) + + + /*! Macro to call in a QM state-handler when it handled an event. +* Applicable only to ::QMsm subclasses. +*/ + (Q_RET_HANDLED) + + + /*! Macro to call in a QM state-handler when when it attempts to +* handle an event but a guard condition evaluates to 'false' and there is +* no other explicit way of handling the event. Applicable only to +* ::QMsm subclasses. +*/ + (Q_RET_UNHANDLED) + + + /*! Macro to call in a QM state-handler when it designates the +* superstate to handle an event. Applicable only to QMSMs. +*/ + + (Q_RET_SUPER) + + + /*! Macro to call in a QM submachine-handler when it designates the +* host state to handle an event. Applicable only to subclasses of ::QMsm. +*/ + + \ + ((Q_HSM_UPCAST(me))->temp.obj = (host_), Q_RET_SUPER_SUB) + + + /*! Macro to provide strictly-typed zero-state to use for submachines. +*! Applicable to subclasses of ::QMsm. +*/ + ((QMState *)0) + + + + + /*! ::QSignal represents the signal of an event +* +* @details +* The relationship between an event and a signal is as follows. A signal +* in UML is the specification of an asynchronous stimulus that triggers +* reactions, and as such is an essential part of an event. (The signal +* conveys the type of the occurrence--what happened?) However, an event +* can also contain additional quantitative information about the +* occurrence in form of event parameters. +*/ + + + + + /*! @brief Event class +* @class QEvt +* +* @details +* ::QEvt represents events without parameters and serves as the base class +* for derivation of events with parameters. +* +* @tr{RQP001} @tr{RQP004} +* @tr{AQP210} +* +* @usage +* The following example illustrates how to add an event parameter by +* derivation of the ::QEvt class. Please note that the ::QEvt member +* super is defined as the FIRST member of the derived struct. +* @include qep_qevt.c +*/ + + /*! Signal of the event. +* @public @memberof QEvt +* +* @tr{RQP002} +*/ + + + /*! Pool ID (==0 for immutable event) +* @private @memberof QEvt +* +* @tr{RQP003} +*/ + + + /*! Reference counter (for mutable events) +* @private @memberof QEvt +* +* @tr{RQP003} +*/ + + + /*! Custom event constructor +* @public @memberof QEvt +* +* @tr{RQP005} +*/ + + + + + /*! All possible values returned from state/action handlers +* +* @note +* The order matters for algorithmic correctness. +*/ + { + /* unhandled and need to "bubble up" */ + Q_RET_SUPER, /*!< event passed to superstate to handle */ + Q_RET_SUPER_SUB, /*!< event passed to submachine superstate */ + Q_RET_UNHANDLED, /*!< event unhandled due to a guard */ + + /* handled and do not need to "bubble up" */ + Q_RET_HANDLED, /*!< event handled (internal transition) */ + Q_RET_IGNORED, /*!< event silently ignored (bubbled up to top) */ + + /* entry/exit */ + Q_RET_ENTRY, /*!< state entry action executed */ + Q_RET_EXIT, /*!< state exit action executed */ + + /* no side effects */ + Q_RET_NULL, /*!< return value without any effect */ + + /* transitions need to execute transition-action table in ::QMsm */ + Q_RET_TRAN, /*!< regular transition */ + Q_RET_TRAN_INIT, /*!< initial transition in a state or submachine */ + Q_RET_TRAN_EP, /*!< entry-point transition into a submachine */ + + /* transitions that additionally clobber me->state */ + Q_RET_TRAN_HIST, /*!< transition to history of a given state */ + Q_RET_TRAN_XP /*!< exit-point transition out of a submachine */ +}; + + + /*! Type returned from state-handler functions */ + + + /*! Pointer to a state-handler function. */ + )(void * const me, QEvt const * const e); + + + /*! Pointer to an action-handler function. */ + )(void * const me); + + + /* forward declaration */ + + + /*! Pointer to an eXthended thread handler function */ + )(struct QXThread * const me); + + + /*! @brief State object for the ::QMsm class (QM State Machine). +* +* @details +* This class groups together the attributes of a ::QMsm state, such as the +* parent state (state nesting), the associated state handler function and +* the exit action handler function. These attributes are used inside the +* QMsm_dispatch() and QMsm_init() functions. +* +* @tr{RQP104} +* +* @attention +* The ::QMState class is only intended for the QM code generator and should +* not be used in hand-crafted code. +*/ + { + struct QMState const *superstate; /*!< superstate of this state */ + QStateHandler const stateHandler; /*!< state handler function */ + QActionHandler const entryAction; /*!< entry action handler function */ + QActionHandler const exitAction; /*!< exit action handler function */ + QActionHandler const initAction; /*!< init action handler function */ +} QMState; + + + /*! @brief Transition-Action Table for the ::QMsm State Machine. */ + { + QMState const *target; /*!< target of the transition */ + QActionHandler const act[1]; /*!< array of actions */ +} QMTranActTable; + + + /*! @brief Attribute of for the ::QHsm class (Hierarchical State Machine). +* +* @details +* This union represents possible values stored in the 'state' and 'temp' +* attributes of the ::QHsm class. +*/ + { + QStateHandler fun; /*!< @private pointer to a state-handler */ + QActionHandler act; /*!< @private pointer to an action-handler */ + QXThreadHandler thr; /*!< @private pointer to an thread-handler */ + QMTranActTable const *tatbl; /*!< @private transition-action table */ + struct QMState const *obj; /*!< @private pointer to QMState object */ +}; + + + /*! maximum depth of state nesting in a HSM (including the top level), +* must be >= 3 +*/ + = 6}; + + + /*! Reserved signals by the HSM-style state machine +* implementation strategy. +*/ + { + Q_ENTRY_SIG = 1, /*!< signal for coding entry actions */ + Q_EXIT_SIG, /*!< signal for coding exit actions */ + Q_INIT_SIG, /*!< signal for coding initial transitions */ + Q_USER_SIG /*!< offset for the user signals (QP Application) */ +}; + + + /*! @brief Hierarchical State Machine class +* @class QHsm +* +* @details +* QHsm represents a Hierarchical State Machine (HSM) with full support for +* hierarchical nesting of states, entry/exit actions, initial transitions, +* and transitions to history in any composite state. This class is designed +* for ease of manual coding of HSMs in C, but it is also supported by the +* QM modeling tool.<br> +* +* QHsm is also the base class for the QMsm state machine, which provides +* a superior efficiency, but requires the use of the QM modeling tool to +* generate code. +* +* @note +* QHsm is not intended to be instantiated directly, but rather serves as the +* abstract base class for derivation of state machines in the QP application. +* +* @tr{RQP103} +* @tr{AQP211} +* +* @usage +* The following example illustrates how to derive a state machine class +* from QHsm. Please note that the QHsm member `super` is defined as the +* FIRST member of the derived class. +* @include qep_qhsm.c +*/ + + /*! Virtual pointer +* @private @memberof QHsm +* +* @tr{RQP102} +*/ + + + /*! Current active state (state-variable). +* @private @memberof QHsm +*/ + + + /*! Temporary: target/act-table, etc. +* @private @memberof QHsm +*/ + + + /*! Tests if a given state is part of the current active state +* configuration in ::QHsm subclasses. +* @public @memberof QHsm +* +* @details +* Tests if a state machine derived from QHsm is-in a given state. +* +* @note For a HSM, to "be in a state" means also to be in a superstate of +* of the state. +* +* @param[in] me pointer (see @ref oop) +* @param[in] state pointer to the state-handler function to be tested +* +* @returns +*'true' if the HSM "is in" the @p state and 'false' otherwise +* +* @tr{RQP103} +* @tr{RQP120S} +*/ + + /*! @pre the state configuration must be stable */ +Q_REQUIRE_ID(600, me->temp.fun == me->state.fun); + +bool inState = false; /* assume that this HSM is not in 'state' */ + +/* scan the state hierarchy bottom-up */ +QState r; +do { + /* do the states match? */ + if (me->temp.fun == state) { + inState = true; /* 'true' means that match found */ + r = Q_RET_IGNORED; /* break out of the loop */ + } + else { + r = QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); + } +} while (r != Q_RET_IGNORED); /* QHsm_top() state not reached */ +me->temp.fun = me->state.fun; /* restore the stable state configuration */ + +return inState; /* return the status */ + + + /*! Obtain the current active state from a HSM (read only). +* @public @memberof QHsm +* +* @param[in] me pointer (see @ref oop) +* +* @returns the current active state of the QHsm class +* +* @note +* This function is used in QM for auto-generating code for state history. +*/ + return Q_STATE_CAST(me->state.fun); + + + /*! Obtain the current active child state of a given parent in ::QHsm +* @public @memberof QHsm +* +* @details +* Finds the child state of the given `parent`, such that this child state +* is an ancestor of the currently active state. The main purpose of this +* function is to support **shallow history** transitions in state machines +* derived from QHsm. +* +* @param[in] me pointer (see @ref oop) +* @param[in] parent pointer to the state-handler function +* +* @returns +* the child of a given `parent` state, which is an ancestor of the current +* active state. For the corner case when the currently active state is the +* given `parent` state, function returns the `parent` state. +* +* @note +* this function is designed to be called during state transitions, so it +* does not necessarily start in a stable state configuration. +* However, the function establishes stable state configuration upon exit. +* +* @tr{RQP103} +* @tr{RQP120H} +*/ + + QStateHandler child = me->state.fun; /* start with the current state */ +bool isFound = false; /* start with the child not found */ + +/* establish stable state configuration */ +me->temp.fun = me->state.fun; +QState r; +do { + /* is this the parent of the current child? */ + if (me->temp.fun == parent) { + isFound = true; /* child is found */ + r = Q_RET_IGNORED; /* break out of the loop */ + } + else { + child = me->temp.fun; + r = QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); + } +} while (r != Q_RET_IGNORED); /* QHsm_top() state not reached */ +me->temp.fun = me->state.fun; /* establish stable state configuration */ + +/*! @post the child must be found */ +Q_ENSURE_ID(810, isFound); + +#ifdef Q_NASSERT +(void)isFound; /* avoid compiler warning about unused variable */ +#endif + +return child; /* return the child */ + + + /*! Protected "constructor" of ::QHsm +* @protected @memberof QHsm +* +* @details +* Performs the first step of HSM initialization by assigning the initial +* pseudostate to the currently active state of the state machine. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] initial pointer to the top-most initial state-handler +* function in the derived state machine +* +* @note Must be called only by the constructors of the derived state +* machines. +* +* @note Must be called only ONCE before QHSM_INIT(). +* +* @usage +* The following example illustrates how to invoke QHsm_ctor() in the +* "constructor" of a derived state machine: +* @include qep_qhsm_ctor.c +* +* @tr{RQP103} +*/ + + static struct QHsmVtable const vtable = { /* QHsm virtual table */ + &QHsm_init_, + &QHsm_dispatch_ +#ifdef Q_SPY + ,&QHsm_getStateHandler_ +#endif +}; +me->vptr = &vtable; +me->state.fun = Q_STATE_CAST(&QHsm_top); +me->temp.fun = initial; + + + const + /*! The top-state of QHsm. +* @protected @memberof QHsm +* +* @details +* QHsm_top() is the ultimate root of state hierarchy in all HSMs derived +* from ::QHsm. +* +* @param[in] me pointer (see @ref oop) +* @param[in] e pointer to the event to be dispatched to the FSM +* +* @returns +* Always returns ::Q_RET_IGNORED, which means that the top state ignores +* all events. +* +* @note The parameters to this state handler are not used. They are provided +* for conformance with the state-handler function signature ::QStateHandler. +* +* @tr{RQP103} @tr{RQP120T} +*/ + + Q_UNUSED_PAR(me); +Q_UNUSED_PAR(e); +return Q_RET_IGNORED; /* the top state ignores all events */ + + + /*! Implementation of the top-most initial tran. in ::QHsm. +* @protected @memberof QHsm +* +* @details +* Executes the top-most initial transition in a HSM. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to an extra parameter (might be NULL) +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @note Must be called only ONCE after the QHsm_ctor(). +* +* @tr{RQP103} @tr{RQP120I} @tr{RQP120D} +*/ + + + #ifndef Q_SPY +(void)qs_id; /* unused parameter */ +#endif + +QStateHandler t = me->state.fun; + +/*! @pre the virtual pointer must be initialized, the top-most initial +* transition must be initialized, and the initial transition must not +* be taken yet. +*/ +Q_REQUIRE_ID(200, (me->vptr != (struct QHsmVtable *)0) + && (me->temp.fun != Q_STATE_CAST(0)) + && (t == Q_STATE_CAST(&QHsm_top))); + +/* execute the top-most initial tran. */ +QState r = (*me->temp.fun)(me, Q_EVT_CAST(QEvt)); + +/* the top-most initial transition must be taken */ +Q_ASSERT_ID(210, r == Q_RET_TRAN); + +QS_CRIT_STAT_ +QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(t); /* the source state */ + QS_FUN_PRE_(me->temp.fun); /* the target of the initial transition */ +QS_END_PRE_() + +/* drill down into the state hierarchy with initial transitions... */ +do { + QStateHandler path[QHSM_MAX_NEST_DEPTH_]; /* tran entry path array */ + int_fast8_t ip = 0; /* tran entry path index */ + + path[0] = me->temp.fun; + (void)QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); + while (me->temp.fun != t) { + ++ip; + Q_ASSERT_ID(220, ip < QHSM_MAX_NEST_DEPTH_); + path[ip] = me->temp.fun; + (void)QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); + } + me->temp.fun = path[0]; + + /* nested initial transition, drill into the target hierarchy... */ + do { + QEP_ENTER_(path[ip], qs_id); /* enter path[ip] */ + --ip; + } while (ip >= 0); + + t = path[0]; /* current state becomes the new source */ + + r = QEP_TRIG_(t, Q_INIT_SIG); /* execute initial transition */ + +#ifdef Q_SPY + if (r == Q_RET_TRAN) { + QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(t); /* the source state */ + QS_FUN_PRE_(me->temp.fun); /* target of the initial tran. */ + QS_END_PRE_() + } +#endif /* Q_SPY */ + +} while (r == Q_RET_TRAN); + +QS_BEGIN_PRE_(QS_QEP_INIT_TRAN, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(t); /* the new active state */ +QS_END_PRE_() + +me->state.fun = t; /* change the current active state */ +me->temp.fun = t; /* mark the configuration as stable */ + + + /*! Implementation of dispatching events to a ::QHsm +* @protected @memberof QHsm +* +* @details +* Dispatches an event for processing to a hierarchical state machine (HSM). +* The processing of an event represents one run-to-completion (RTC) step. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be dispatched to the HSM +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @note +* This function should be called only via the virtual table (see +* QHSM_DISPATCH()) and should NOT be called directly in the applications. +* +* @tr{RQP103} +* @tr{RQP120A} @tr{RQP120B} @tr{RQP120C} @tr{RQP120D} @tr{RQP120E} +*/ + + + Q_UNUSED_PAR(qs_id); /* unused when Q_SPY undefined */ + +QStateHandler t = me->state.fun; +QS_CRIT_STAT_ + +/*! @pre the current state must be initialized and +* the state configuration must be stable +*/ +Q_REQUIRE_ID(400, (t != Q_STATE_CAST(0)) + && (t == me->temp.fun)); + +QS_BEGIN_PRE_(QS_QEP_DISPATCH, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(t); /* the current state */ +QS_END_PRE_() + +QStateHandler s; +QState r; +/* process the event hierarchically... */ +do { + s = me->temp.fun; + r = (*s)(me, e); /* invoke state handler s */ + + if (r == Q_RET_UNHANDLED) { /* unhandled due to a guard? */ + + QS_BEGIN_PRE_(QS_QEP_UNHANDLED, qs_id) + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(s); /* the current state */ + QS_END_PRE_() + + r = QEP_TRIG_(s, QEP_EMPTY_SIG_); /* find superstate of s */ + } +} while (r == Q_RET_SUPER); + +/* regular transition taken? */ +/*! @tr{RQP120E} */ +if (r >= Q_RET_TRAN) { + QStateHandler path[QHSM_MAX_NEST_DEPTH_]; + + path[0] = me->temp.fun; /* save the target of the transition */ + path[1] = t; + path[2] = s; + + /* exit current state to transition source s... */ + /*! @tr{RQP120C} */ + for (; t != s; t = me->temp.fun) { + if (QEP_TRIG_(t, Q_EXIT_SIG) == Q_RET_HANDLED) { + QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(t); /* the exited state */ + QS_END_PRE_() + + /* find superstate of t */ + (void)QEP_TRIG_(t, QEP_EMPTY_SIG_); + } + } + + int_fast8_t ip = QHsm_tran_(me, path, qs_id); /* the HSM transition */ + +#ifdef Q_SPY + if (r == Q_RET_TRAN_HIST) { + QS_BEGIN_PRE_(QS_QEP_TRAN_HIST, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(t); /* the source of the transition */ + QS_FUN_PRE_(path[0]); /* the target of the tran. to history */ + QS_END_PRE_() + } +#endif /* Q_SPY */ + + /* execute state entry actions in the desired order... */ + /*! @tr{RQP120B} */ + for (; ip >= 0; --ip) { + QEP_ENTER_(path[ip], qs_id); /* enter path[ip] */ + } + + t = path[0]; /* stick the target into register */ + me->temp.fun = t; /* update the next state */ + + /* while nested initial transition... */ + /*! @tr{RQP120I} */ + while (QEP_TRIG_(t, Q_INIT_SIG) == Q_RET_TRAN) { + + QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(t); /* the source (pseudo)state */ + QS_FUN_PRE_(me->temp.fun); /* the target of the transition */ + QS_END_PRE_() + + ip = 0; + path[0] = me->temp.fun; + + /* find superstate */ + (void)QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); + + while (me->temp.fun != t) { + ++ip; + path[ip] = me->temp.fun; + /* find superstate */ + (void)QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); + } + me->temp.fun = path[0]; + + /* entry path must not overflow */ + Q_ASSERT_ID(410, ip < QHSM_MAX_NEST_DEPTH_); + + /* retrace the entry path in reverse (correct) order... */ + do { + QEP_ENTER_(path[ip], qs_id); /* enter path[ip] */ + --ip; + } while (ip >= 0); + + t = path[0]; /* current state becomes the new source */ + } + + QS_BEGIN_PRE_(QS_QEP_TRAN, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(s); /* the source of the transition */ + QS_FUN_PRE_(t); /* the new active state */ + QS_END_PRE_() +} + +#ifdef Q_SPY +else if (r == Q_RET_HANDLED) { + + QS_BEGIN_PRE_(QS_QEP_INTERN_TRAN, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(s); /* the source state */ + QS_END_PRE_() + +} +else { + + QS_BEGIN_PRE_(QS_QEP_IGNORED, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(me->state.fun); /* the current state */ + QS_END_PRE_() + +} +#endif /* Q_SPY */ + +me->state.fun = t; /* change the current active state */ +me->temp.fun = t; /* mark the configuration as stable */ + + + /*! Implementation of getting the state handler in a ::QHsm subclass +* @private @memberof QHsm +*/ + return me->state.fun; + + + /*! Helper function to execute transition sequence in a hierarchical state +* machine (HSM). +* @private @memberof QHsm +* +* @param[in,out] path array of pointers to state-handler functions +* to execute the entry actions +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @returns +* the depth of the entry path stored in the @p path parameter. +* +* @tr{RQP103} +* @tr{RQP120E} @tr{RQP120F} +*/ + + + Q_UNUSED_PAR(qs_id); // unused when Q_SPY undefined + +int_fast8_t ip = -1; /* transition entry path index */ +QStateHandler t = path[0]; +QStateHandler const s = path[2]; +QS_CRIT_STAT_ + +/* (a) check source==target (transition to self)... */ +if (s == t) { + QEP_EXIT_(s, qs_id); /* exit the source */ + ip = 0; /* enter the target */ +} +else { + /* find superstate of target */ + (void)QEP_TRIG_(t, QEP_EMPTY_SIG_); + + t = me->temp.fun; + + /* (b) check source==target->super... */ + if (s == t) { + ip = 0; /* enter the target */ + } + else { + /* find superstate of src */ + (void)QEP_TRIG_(s, QEP_EMPTY_SIG_); + + /* (c) check source->super==target->super... */ + if (me->temp.fun == t) { + QEP_EXIT_(s, qs_id); /* exit the source */ + ip = 0; /* enter the target */ + } + else { + /* (d) check source->super==target... */ + if (me->temp.fun == path[0]) { + QEP_EXIT_(s, qs_id); /* exit the source */ + } + else { + /* (e) check rest of source==target->super->super.. + * and store the entry path along the way + */ + int_fast8_t iq = 0; /* indicate that LCA not found */ + ip = 1; /* enter target and its superstate */ + path[1] = t; /* save the superstate of target */ + t = me->temp.fun; /* save source->super */ + + /* find target->super->super... */ + QState r = QEP_TRIG_(path[1], QEP_EMPTY_SIG_); + while (r == Q_RET_SUPER) { + ++ip; + path[ip] = me->temp.fun; /* store the entry path */ + if (me->temp.fun == s) { /* is it the source? */ + iq = 1; /* indicate that LCA found */ + + /* entry path must not overflow */ + Q_ASSERT_ID(510, + ip < QHSM_MAX_NEST_DEPTH_); + --ip; /* do not enter the source */ + r = Q_RET_HANDLED; /* terminate loop */ + } + /* it is not the source, keep going up */ + else { + r = QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); + } + } + + /* the LCA not found yet? */ + if (iq == 0) { + + /* entry path must not overflow */ + Q_ASSERT_ID(520, ip < QHSM_MAX_NEST_DEPTH_); + + QEP_EXIT_(s, qs_id); /* exit the source */ + + /* (f) check the rest of source->super + * == target->super->super... + */ + iq = ip; + r = Q_RET_IGNORED; /* LCA NOT found */ + do { + if (t == path[iq]) { /* is this the LCA? */ + r = Q_RET_HANDLED; /* LCA found */ + ip = iq - 1; /* do not enter LCA */ + iq = -1; /* cause termintion of the loop */ + } + else { + --iq; /* try lower superstate of target */ + } + } while (iq >= 0); + + /* LCA not found? */ + if (r != Q_RET_HANDLED) { + /* (g) check each source->super->... + * for each target->super... + */ + r = Q_RET_IGNORED; /* keep looping */ + do { + /* exit t unhandled? */ + if (QEP_TRIG_(t, Q_EXIT_SIG) + == Q_RET_HANDLED) + { + QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) + QS_OBJ_PRE_(me); + QS_FUN_PRE_(t); + QS_END_PRE_() + + (void)QEP_TRIG_(t, QEP_EMPTY_SIG_); + } + t = me->temp.fun; /* set to super of t */ + iq = ip; + do { + /* is this LCA? */ + if (t == path[iq]) { + /* do not enter LCA */ + ip = (int_fast8_t)(iq - 1); + iq = -1; /* break out of inner loop */ + /* break out of outer loop */ + r = Q_RET_HANDLED; + } + else { + --iq; + } + } while (iq >= 0); + } while (r != Q_RET_HANDLED); + } + } + } + } + } +} +return ip; + + + + /*! @brief Virtual table for the ::QHsm class. +* +* @tr{RQP102} +*/ + { + /*! Triggers the top-most initial transition in the HSM. */ + void (*init)(QHsm * const me, void const * const e, + uint_fast8_t const qs_id); + + /*! Dispatches an event to the HSM. */ + void (*dispatch)(QHsm * const me, QEvt const * const e, + uint_fast8_t const qs_id); + +#ifdef Q_SPY + /*! Get the current state handler of the HSM. */ + QStateHandler (*getStateHandler)(QHsm * const me); +#endif /* Q_SPY */ +}; + + + /*! @brief QM state machine implementation strategy +* @class QMsm +* @extends QHsm +* +* @details +* QMsm (QM State Machine) provides a more efficient state machine +* implementation strategy than ::QHsm, but requires the use of the QM +* modeling tool, but are the fastest and need the least run-time +* support (the smallest event-processor taking up the least code space). +* +* @note +* QMsm is not intended to be instantiated directly, but rather serves +* as the abstrace base class for derivation of state machines in the +* application code. +* +* @tr{RQP104} +* +* @usage +* The following example illustrates how to derive a state machine class +* from QMsm. Please note that the QMsm member `super` is defined +* as the *first* member of the derived struct. +* @include qep_qmsm.c +*/ + + const + /*! Tests if a given state is part of the current active state +* configuration in a MSM. +* @public @memberof QMsm +* +* @details +* Tests if a state machine derived from QMsm is-in a given state. +* +* @note +* For a MSM, to "be-in" a state means also to "be-in" a superstate of +* of the state. +* +* @param[in] me pointer (see @ref oop) +* @param[in] state pointer to the QMState object that corresponds to the +* tested state. +* @returns +* 'true' if the MSM "is in" the @p state and 'false' otherwise +*/ + + bool inState = false; /* assume that this MSM is not in 'state' */ + +for (QMState const *s = me->super.state.obj; + s != (QMState *)0; + s = s->superstate) +{ + if (s == state) { + inState = true; /* match found, return 'true' */ + break; + } +} +return inState; + + + /*! Obtain the current active state from a MSM (read only) +* @public @memberof QMsm +* +* @param[in] me pointer (see @ref oop) +* +* @returns the current active state-object +* +* @note +* This function is used in QM for auto-generating code for state history +*/ + + return me->state.obj; + + + /*! Obtain the current active child state of a given parent in ::QMsm +* @public @memberof QMsm +* +* @details +* Finds the child state of the given @c parent, such that this child state +* is an ancestor of the currently active state. The main purpose of this +* function is to support **shallow history** transitions in state machines +* derived from QMsm. +* +* @param[in] me pointer (see @ref oop) +* @param[in] parent pointer to the state-handler object +* +* @returns +* the child of a given @c parent state, which is an ancestor of +* the currently active state. For the corner case when the currently active +* state is the given @c parent state, function returns the @c parent state. +* +* @sa QMsm_childStateObj() +*/ + + + QMState const *child = me->state.obj; +bool isFound = false; /* start with the child not found */ + +for (QMState const *s = me->state.obj; + s != (QMState *)0; + s = s->superstate) +{ + if (s == parent) { + isFound = true; /* child is found */ + break; + } + else { + child = s; + } +} + +/*! @post the child must be found */ +Q_ENSURE_ID(810, isFound); + +#ifdef Q_NASSERT +(void)isFound; /* avoid compiler warning about unused variable */ +#endif + +return child; /* return the child */ + + + /*! Constructor of ::QMsm +* @protected @memberof QMsm +* +* @details +* Performs the first step of QMsm initialization by assigning the initial +* pseudostate to the currently active state of the state machine. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] initial the top-most initial transition for the MSM. +* +* @note +* Must be called only ONCE before QHSM_INIT(). +* +* @note +* QMsm inherits QHsm, so by the @ref oop convention it should call the +* constructor of the superclass, i.e., QHsm_ctor(). However, this would pull +* in the QHsmVtable, which in turn will pull in the code for QHsm_init_() and +* QHsm_dispatch_() implemetations. To avoid this code size penalty, in case +* ::QHsm is not used in a given project, the QMsm_ctor() performs direct +* intitialization of the Vtable, which avoids pulling in the code for QMsm. +* +* @usage +* The following example illustrates how to invoke QMsm_ctor() in the +* "constructor" of a derived state machine: +* @include qep_qmsm_ctor.c +*/ + + static struct QHsmVtable const vtable = { /* QHsm virtual table */ + &QMsm_init_, + &QMsm_dispatch_ +#ifdef Q_SPY + ,&QMsm_getStateHandler_ +#endif +}; +/* do not call the QHsm_ctor() here */ +me->super.vptr = &vtable; +me->super.state.obj = &l_msm_top_s; /* the current state (top) */ +me->super.temp.fun = initial; /* the initial transition handler */ + + + /*! Implementation of the top-most initial tran. in ::QMsm. +* @private @memberof QMsm +* +* @details +* Executes the top-most initial transition in a MSM. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to an extra parameter (might be NULL) +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @note +* This function should be called only via the virtual table (see +* QHSM_INIT()) and should NOT be called directly in the applications. +*/ + + + + #ifndef Q_SPY +(void)qs_id; /* unused parameter */ +#endif + +/*! @pre the virtual pointer must be initialized, the top-most initial +* transition must be initialized, and the initial transition must not +* be taken yet. +*/ +Q_REQUIRE_ID(200, (me->vptr != (struct QHsmVtable *)0) + && (me->temp.fun != Q_STATE_CAST(0)) + && (me->state.obj == &l_msm_top_s)); + +/* execute the top-most initial tran. */ +QState r = (*me->temp.fun)(me, Q_EVT_CAST(QEvt)); + +/* the top-most initial transition must be taken */ +Q_ASSERT_ID(210, r == Q_RET_TRAN_INIT); + +QS_CRIT_STAT_ +QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(me->state.obj->stateHandler); /* source state */ + QS_FUN_PRE_(me->temp.tatbl->target->stateHandler); /* target state */ +QS_END_PRE_() + +/* set state to the last tran. target */ +me->state.obj = me->temp.tatbl->target; + +/* drill down into the state hierarchy with initial transitions... */ +/* execute the tran. table */ +do { + r = QMsm_execTatbl_(me, me->temp.tatbl, qs_id); +} while (r >= Q_RET_TRAN_INIT); + +QS_BEGIN_PRE_(QS_QEP_INIT_TRAN, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(me->state.obj->stateHandler); /* the new current state */ +QS_END_PRE_() + + + /*! Implementation of dispatching events to a ::QMsm +* @private @memberof QMsm +* +* @details +* Dispatches an event for processing to a meta state machine (MSM). +* The processing of an event represents one run-to-completion (RTC) step. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be dispatched to the MSM +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @note +* This function should be called only via the virtual table (see +* QHSM_DISPATCH()) and should NOT be called directly in the applications. +*/ + + + + #ifndef Q_SPY +(void)qs_id; /* unused parameter */ +#endif + +QMState const *s = me->state.obj; /* store the current state */ +QMState const *t = s; + +/*! @pre current state must be initialized */ +Q_REQUIRE_ID(300, s != (QMState *)0); + +QS_CRIT_STAT_ +QS_BEGIN_PRE_(QS_QEP_DISPATCH, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(s->stateHandler); /* the current state handler */ +QS_END_PRE_() + +/* scan the state hierarchy up to the top state... */ +QState r; +do { + r = (*t->stateHandler)(me, e); /* call state handler function */ + + /* event handled? (the most frequent case) */ + if (r >= Q_RET_HANDLED) { + break; /* done scanning the state hierarchy */ + } + /* event unhandled and passed to the superstate? */ + else if (r == Q_RET_SUPER) { + t = t->superstate; /* advance to the superstate */ + } + /* event unhandled and passed to a submachine superstate? */ + else if (r == Q_RET_SUPER_SUB) { + t = me->temp.obj; /* current host state of the submachie */ + } + /* event unhandled due to a guard? */ + else if (r == Q_RET_UNHANDLED) { + + QS_BEGIN_PRE_(QS_QEP_UNHANDLED, qs_id) + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(t->stateHandler); /* the current state */ + QS_END_PRE_() + + t = t->superstate; /* advance to the superstate */ + } + else { + /* no other return value should be produced */ + Q_ERROR_ID(310); + } +} while (t != (QMState *)0); + + +/* any kind of transition taken? */ +if (r >= Q_RET_TRAN) { +#ifdef Q_SPY + QMState const * const ts = t; /* transition source for QS tracing */ + + /* the transition source state must not be NULL */ + Q_ASSERT_ID(320, ts != (QMState *)0); +#endif /* Q_SPY */ + + do { + /* save the transition-action table before it gets clobbered */ + struct QMTranActTable const * const tatbl = me->temp.tatbl; + union QHsmAttr tmp; /* temporary to save intermediate values */ + + /* was TRAN, TRAN_INIT, or TRAN_EP taken? */ + if (r <= Q_RET_TRAN_EP) { + QMsm_exitToTranSource_(me, s, t, qs_id); + r = QMsm_execTatbl_(me, tatbl, qs_id); + s = me->state.obj; + } + /* was a transition segment to history taken? */ + else if (r == Q_RET_TRAN_HIST) { + tmp.obj = me->state.obj; /* save history */ + me->state.obj = s; /* restore the original state */ + QMsm_exitToTranSource_(me, s, t, qs_id); + (void)QMsm_execTatbl_(me, tatbl, qs_id); + r = QMsm_enterHistory_(me, tmp.obj, qs_id); + s = me->state.obj; + } + /* was a transition segment to an exit point taken? */ + else if (r == Q_RET_TRAN_XP) { + tmp.act = me->state.act; /* save XP action */ + me->state.obj = s; /* restore the original state */ + r = (*tmp.act)(me); /* execute the XP action */ + if (r == Q_RET_TRAN) { /* XP -> TRAN ? */ + tmp.tatbl = me->temp.tatbl; /* save me->temp */ + QMsm_exitToTranSource_(me, s, t, qs_id); + /* take the tran-to-XP segment inside submachine */ + (void)QMsm_execTatbl_(me, tatbl, qs_id); + s = me->state.obj; +#ifdef Q_SPY + me->temp.tatbl = tmp.tatbl; /* restore me->temp */ +#endif /* Q_SPY */ + } + else if (r == Q_RET_TRAN_HIST) { /* XP -> HIST ? */ + tmp.obj = me->state.obj; /* save the history */ + me->state.obj = s; /* restore the original state */ + s = me->temp.obj; /* save me->temp */ + QMsm_exitToTranSource_(me, me->state.obj, t, qs_id); + /* take the tran-to-XP segment inside submachine */ + (void)QMsm_execTatbl_(me, tatbl, qs_id); +#ifdef Q_SPY + me->temp.obj = s; /* restore me->temp */ +#endif /* Q_SPY */ + s = me->state.obj; + me->state.obj = tmp.obj; /* restore the history */ + } + else { + /* TRAN_XP must NOT be followed by any other tran type */ + Q_ASSERT_ID(330, r < Q_RET_TRAN); + } + } + else { + /* no other return value should be produced */ + Q_ERROR_ID(340); + } + + t = s; /* set target to the current state */ + + } while (r >= Q_RET_TRAN); + + QS_BEGIN_PRE_(QS_QEP_TRAN, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(ts->stateHandler); /* the transition source */ + QS_FUN_PRE_(s->stateHandler); /* the new active state */ + QS_END_PRE_() +} + +#ifdef Q_SPY +/* was the event handled? */ +else if (r == Q_RET_HANDLED) { + /* internal tran. source can't be NULL */ + Q_ASSERT_ID(340, t != (QMState *)0); + + QS_BEGIN_PRE_(QS_QEP_INTERN_TRAN, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(t->stateHandler); /* the source state */ + QS_END_PRE_() + +} +/* event bubbled to the 'top' state? */ +else if (t == (QMState *)0) { + + QS_BEGIN_PRE_(QS_QEP_IGNORED, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(s->stateHandler); /* the current state */ + QS_END_PRE_() + +} +#endif /* Q_SPY */ +else { + /* empty */ +} + + + /*! Implementation of getting the state handler in a ::QMsm subclass +* @public @memberof QMsm +*/ + + return me->state.obj->stateHandler; + + + /*! Execute transition-action table +* @private @memberof QMsm +* +* @details +* Helper function to execute transition sequence in a transition-action table. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] tatbl pointer to the transition-action table +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @returns +* status of the last action from the transition-action table. +* +* @note +* This function is for internal use inside the QEP event processor and +* should **not** be called directly from the applications. +*/ + + + + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + +QState r = Q_RET_NULL; +QS_CRIT_STAT_ + +/*! @pre the transition-action table pointer must not be NULL */ +Q_REQUIRE_ID(400, tatbl != (struct QMTranActTable *)0); + +for (QActionHandler const *a = &tatbl->act[0]; + *a != Q_ACTION_CAST(0); + ++a) +{ + r = (*(*a))(me); /* call the action through the 'a' pointer */ +#ifdef Q_SPY + if (r == Q_RET_ENTRY) { + + QS_BEGIN_PRE_(QS_QEP_STATE_ENTRY, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(me->temp.obj->stateHandler);/*entered state */ + QS_END_PRE_() + } + else if (r == Q_RET_EXIT) { + + QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(me->temp.obj->stateHandler); /* exited state */ + QS_END_PRE_() + } + else if (r == Q_RET_TRAN_INIT) { + + QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(tatbl->target->stateHandler); /* source */ + QS_FUN_PRE_(me->temp.tatbl->target->stateHandler);/* target */ + QS_END_PRE_() + } + else if (r == Q_RET_TRAN_EP) { + + QS_BEGIN_PRE_(QS_QEP_TRAN_EP, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(tatbl->target->stateHandler); /* source */ + QS_FUN_PRE_(me->temp.tatbl->target->stateHandler);/* target */ + QS_END_PRE_() + } + else if (r == Q_RET_TRAN_XP) { + + QS_BEGIN_PRE_(QS_QEP_TRAN_XP, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(tatbl->target->stateHandler); /* source */ + QS_FUN_PRE_(me->temp.tatbl->target->stateHandler);/* target */ + QS_END_PRE_() + } + else { + /* empty */ + } +#endif /* Q_SPY */ +} + +me->state.obj = (r >= Q_RET_TRAN) + ? me->temp.tatbl->target + : tatbl->target; +return r; + + + /*! Exit the current state up to the explicit transition source +* @private @memberof QMsm +* +* @details +* Static helper function to exit the current state configuration to the +* transition source, which in a hierarchical state machine might be a +* superstate of the current state. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] cs pointer to the current state +* @param[in] ts pointer to the transition source state +* @param[in] qs_id QS-id of this state machine (for QS local filter) +*/ + + + + + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + +QMState const *s = cs; + +/* exit states from the current state to the tran. source state */ +while (s != ts) { + /* exit action provided in state 's'? */ + if (s->exitAction != Q_ACTION_CAST(0)) { + QS_CRIT_STAT_ + + (void)(*s->exitAction)(me); /* execute the exit action */ + + QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(s->stateHandler); /* the exited state handler */ + QS_END_PRE_() + } + + s = s->superstate; /* advance to the superstate */ + + if (s == (QMState *)0) { /* reached the top of a submachine? */ + s = me->temp.obj; /* the superstate from QM_SM_EXIT() */ + Q_ASSERT_ID(510, s != (QMState *)0); /* must be valid */ + } +} + + + /*! Enter history of a composite state +* @private @memberof QMsm +* +* @details +* Static helper function to execute the segment of transition to history +* after entering the composite state and +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] hist pointer to the history substate +* @param[in] qs_id QS-id of this state machine (for QS local filter) +* +* @returns +* #Q_RET_TRAN_INIT, if an initial transition has been executed in the last +* entered state or #Q_RET_NULL if no such transition was taken. +*/ + + + + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + +QMState const *s = hist; +QMState const *ts = me->state.obj; /* transition source */ +QMState const *epath[QMSM_MAX_ENTRY_DEPTH_]; +QS_CRIT_STAT_ + +QS_BEGIN_PRE_(QS_QEP_TRAN_HIST, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(ts->stateHandler); /* source state handler */ + QS_FUN_PRE_(hist->stateHandler); /* target state handler */ +QS_END_PRE_() + +int_fast8_t i = 0; /* transition entry path index */ +while (s != ts) { + if (s->entryAction != Q_ACTION_CAST(0)) { + Q_ASSERT_ID(620, i < QMSM_MAX_ENTRY_DEPTH_); + epath[i] = s; + ++i; + } + s = s->superstate; + if (s == (QMState *)0) { + ts = s; /* force exit from the for-loop */ + } +} + +/* retrace the entry path in reverse (desired) order... */ +while (i > 0) { + --i; + (void)(*epath[i]->entryAction)(me); /* run entry action in epath[i] */ + + QS_BEGIN_PRE_(QS_QEP_STATE_ENTRY, qs_id) + QS_OBJ_PRE_(me); + QS_FUN_PRE_(epath[i]->stateHandler); /* entered state handler */ + QS_END_PRE_() +} + +me->state.obj = hist; /* set current state to the transition target */ + +/* initial tran. present? */ +QState r; +if (hist->initAction != Q_ACTION_CAST(0)) { + r = (*hist->initAction)(me); /* execute the transition action */ +} +else { + r = Q_RET_NULL; +} +return r; + + + + + + /*! Maximum number of active objects (configurable value in qf_port.hpp) +* Valid values: [1U..64U]; default 32U +*/ + 32U + + + + /*! Maximum number of clock rates (configurable value in qf_port.hpp) +* Valid values: [0U..15U]; default 1U +*/ + 1U + + + + /*! Maximum number of event pools (configurable value in qf_port.hpp) +* Valid values: [1U..15U]; default 3U +*/ + 3U + + + + /*! Size of the QTimeEvt counter (configurable value in qf_port.hpp) +* Valid values: 1U, 2U, or 4U; default 2U +*/ + 2U + + + + /*! Size of the event-size (configurable value in qf_port.hpp) +* Valid values: 1U, 2U, or 4U; default 2U +*/ + 2U + + + + + + /*! bitmask for the internal representation of QPSet elements */ + + + + + /*! Data type to store the block-size defined based on the macro +* #QF_TIMEEVT_CTR_SIZE. +* +* @details +* The dynamic range of this data type determines the maximum block +* size that can be managed by the pool. +*/ + + + + + const + /*! Log-base-2 calculation when hardware acceleration +* is NOT provided (#QF_LOG2 not defined). +*/ + + static uint8_t const log2LUT[16] = { + 0U, 1U, 2U, 2U, 3U, 3U, 3U, 3U, + 4U, 4U, 4U, 4U, 4U, 4U, 4U, 4U +}; +uint_fast8_t n = 0U; +QPSetBits t; + +#if (QF_MAX_ACTIVE > 16U) +t = (QPSetBits)(x >> 16U); +if (t != 0U) { + n += 16U; + x = t; +} +#endif +#if (QF_MAX_ACTIVE > 8U) +t = (x >> 8U); +if (t != 0U) { + n += 8U; + x = t; +} +#endif +t = (x >> 4U); +if (t != 0U) { + n += 4U; + x = t; +} +return n + log2LUT[x]; + + + /*! @brief Priority Set of up to #QF_MAX_ACTIVE elements +* @class QPSet +* +* @details +* The priority set represents the set of active objects that are ready to +* run and need to be considered by the scheduling algorithm. The set is +* capable of storing up to #QF_MAX_ACTIVE priority levels, which can be +* configured in the rage 1..64, inclusive. +*/ + + /*! bitmask with a bit for each element */ + + + /*! bitmasks with a bit for each element */ + + + /*! Make the priority set empty */ + #if (QF_MAX_ACTIVE <= 32) + me->bits = 0U; +#else + me->bits[0] = 0U; + me->bits[1] = 0U; +#endif + + + const + /*! Return 'true' if the priority set is empty */ + #if (QF_MAX_ACTIVE <= 32) + return (me->bits == 0U); +#else + return (me->bits[0] == 0U) ? (me->bits[1] == 0U) : false; +#endif + + + const + /*! Return 'true' if the priority set is NOT empty */ + #if (QF_MAX_ACTIVE <= 32) + return (me->bits != 0U); +#else + return (me->bits[0] != 0U) ? true : (me->bits[1] != 0U); +#endif + + + const + /*! Return 'true' if the priority set has the element n. */ + + #if (QF_MAX_ACTIVE <= 32U) + return (me->bits & (1U << (n - 1U))) != 0U; +#else + return (n <= 32U) + ? ((me->bits[0] & ((uint32_t)1U << (n - 1U))) != 0U) + : ((me->bits[1] & ((uint32_t)1U << (n - 33U))) != 0U); +#endif + + + /*! insert element `n` into the set (n = 1..::QF_MAX_ACTIVE) */ + + #if (QF_MAX_ACTIVE <= 32U) + me->bits = (me->bits | (1U << (n - 1U))); +#else + if (n <= 32U) { + me->bits[0] = (me->bits[0] | ((uint32_t)1U << (n - 1U))); + } + else { + me->bits[1] = (me->bits[1] | ((uint32_t)1U << (n - 33U))); + } +#endif + + + /*! Remove element `n` from the set (n = 1U..::QF_MAX_ACTIVE) */ + + #if (QF_MAX_ACTIVE <= 32U) + me->bits = (me->bits & + (QPSetBits)(~((QPSetBits)1U << (n - 1U)))); +#else + if (n <= 32U) { + (me->bits[0] = (me->bits[0] & ~((uint32_t)1U << (n - 1U)))); + } + else { + (me->bits[1] = (me->bits[1] & ~((uint32_t)1U << (n - 33U)))); + } +#endif + + + const + /*! Find the maximum element in the set, returns zero if the set is empty */ + #if (QF_MAX_ACTIVE <= 32) + return QF_LOG2(me->bits); +#else + return (me->bits[1] != 0U) + ? (QF_LOG2(me->bits[1]) + 32U) + : (QF_LOG2(me->bits[0])); +#endif + + + + /*! Subscriber List (for publish-subscribe) +* +* @details +* This data type represents a set of active objects that subscribe to +* a given signal. The set is represented as priority-set, where each +* bit corresponds to the unique priority of an active object. +*/ + + + /*! The scheduler lock status */ + + + + + /*! Special value of margin that causes asserting failure in case +* event allocation or event posting fails +*/ + ((uint_fast16_t)0xFFFFU) + + + /*! No-operation for exiting a critical section +* +* @details +* In some QF ports the critical section exit takes effect only on the +* next machine instruction. If this next instruction is another entry +* to a critical section, the critical section won't be really exited, +* but rather the two adjecent critical sections would be merged. +* The QF_CRIT_EXIT_NOP() macro contains minimal code required to +* prevent such merging of critical sections in such merging of +* critical sections in QF ports, in which it can occur. +*/ + ((void)0) + + + /*! Allocate a dynamic event (case when ::QEvt is a POD) +* +* @details +* The macro calls the internal QF function QF::newX_() with +* margin == ::QF_NO_MARGIN, which causes an assertion when the event +* cannot be successfully allocated. +* +* @param[in] evtT_ event type (class name) of the event to allocate +* @param[in] sig_ signal to assign to the newly allocated event +* +* @returns a valid event pointer cast to the type `evtT_`. +* +* @note +* If #Q_EVT_CTOR is defined, the Q_NEW() macro becomes variadic and +* takes all the arguments needed by the constructor of the event +* class being allocated. The constructor is then called by means +* of the placement-new operator. +* +* @usage +* The following example illustrates dynamic allocation of an event: +* @include qf_post.c +*/ + + + ((evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ + QF_NO_MARGIN, (enum_t)(sig_))) + + + /*! Asserting allocate a dynamic event +* (case when ::QEvt is not a POD) +*/ + + + + \ + (evtT_##_ctor((evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ + QF_NO_MARGIN, 0), (enum_t)(sig_), ##__VA_ARGS__)) + + + + /*! Non-asserting allocate a dynamic event (case when ::QEvt is a POD). +* +* @details +* This macro allocates a new event and sets the pointer @p e_, while +* leaving at least @p margin_ of events still available in the pool +* +* @param[out] e_ pointer to the newly allocated event +* @param[in] evtT_ event type (class name) of the event to allocate +* @param[in] margin_ number of events that must remain available +* in the given pool after this allocation. The +* special value ::QF_NO_MARGIN causes asserting +* failure in case event allocation fails. +* @param[in] sig_ signal to assign to the newly allocated event +* +* @returns an event pointer cast to the type @p evtT_ or NULL if the +* event cannot be allocated with the specified @p margin. +* +* @note +* If #Q_EVT_CTOR is defined, the Q_NEW_X() macro becomes variadic and +* takes all the arguments needed by the constructor of the event +* class being allocated. The constructor is then called by means +* of the placement-new operator. +* +* @usage +* The following example illustrates dynamic allocation of an event: +* @include qf_postx.c +*/ + + + + + ((e_) = \ + (evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ + (margin_), (enum_t)(sig_))) + + + /*! Non-asserting allocate a dynamic event +* (case when ::QEvt is not a POD) +*/ + + + + + + do { \ + (e_) = (evtT_ *)QF_newX_((uint_fast16_t)sizeof(evtT_), \ + (margin_), 0);\ + if ((e_) != (evtT_ *)0) { \ + evtT_##_ctor((e_), (enum_t)(sig_), ##__VA_ARGS__); \ + } \ + } while (false) + + + /*! Create a new reference of the current event `e` +* +* @details +* The current event processed by an active object is available only for +* the duration of the run-to-completion (RTC) step. After that step, the +* current event is no longer available and the framework might recycle +* (garbage-collect) the event. The macro Q_NEW_REF() explicitly creates +* a new reference to the current event that can be stored and used beyond +* the current RTC step, until the reference is explicitly recycled by +* means of the macro Q_DELETE_REF(). +* +* @param[in,out] evtRef_ event reference to create +* @param[in] evtT_ event type (class name) of the event reference +* +* @usage +* The example **defer** in the directory `examples/win32/defer` illustrates +* the use of Q_NEW_REF() +* +* @sa Q_DELETE_REF() +*/ + + + \ + ((evtRef_) = (evtT_ const *)QF_newRef_(e, (evtRef_))) + + + /*! Delete the event reference +* +* @details +* Every event reference created with the macro Q_NEW_REF() needs to be +* eventually deleted by means of the macro Q_DELETE_REF() to avoid leaking +* the event. +* +* @param[in,out] evtRef_ event reference to delete +* +* @usage +* The example **defer** in the directory `examples/win32/defer` illustrates +* the use of Q_DELETE_REF() +* +* @sa Q_NEW_REF() +*/ + + do { \ + QF_deleteRef_((evtRef_)); \ + (evtRef_) = (void *)0; \ +} while (false) + + + /*! Virtual call to start an active object. +* +* @details +* Starts execution of the AO and registers the AO with the framework. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] prio_ priority at which to start the active object +* @param[in] qSto_ pointer to the storage for the ring buffer of the +* event queue (used only with the built-in ::QEQueue) +* @param[in] qLen_ length of the event queue (in events) +* @param[in] stkSto_ pointer to the stack storage (used only when +* per-AO stack is needed) +* @param[in] stkSize_ stack size (in bytes) +* @param[in] par_ pointer to the additional port-specific parameter(s) +* (might be NULL). +* @usage +* @include qf_start.c +*/ + + + + + + + + do { \ + Q_ASSERT((Q_HSM_UPCAST(me_))->vptr); \ + (*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->start)( \ + (QActive *)(me_), (prio_), \ + (qSto_), (qLen_), (stkSto_), (stkSize_), (par_)); \ +} while (false) + + + /*! Invoke the direct event posting facility QActive_post_() +* +* @details +* This macro asserts if the queue overflows and cannot accept the event. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ pointer to the event to post +* @param[in] sender_ pointer to the sender object. +* +* @note +* The @p sendedr_ parameter is actually only used when QS tracing +* is enabled (macro #Q_SPY is defined). When QS software tracing is +* disenabled, the QACTIVE_POST() macro does not pass the `sender_` +* parameter, so the overhead of passing this extra parameter is entirely +* avoided. +* +* @note the pointer to the sender object is not necessarily a pointer +* to an active object. In fact, if QACTIVE_POST() is called from an +* interrupt or other context, you can create a unique object just to +* unambiguously identify the sender of the event. +* +* @sa QActive_post_() +*/ + + + + \ + ((void)(*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)(\ + (me_), (e_), QF_NO_MARGIN, (sender_))) + + + + + + \ + ((void)(*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)(\ + (me_), (e_), QF_NO_MARGIN, (void *)0)) + + + /*! Invoke the direct event posting facility QActive::post_() +* without delivery guarantee +* +* @details +* This macro does not assert if the queue overflows and cannot accept +* the event with the specified margin of free slots remaining. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ pointer to the event to post +* @param[in] margin_ the minimum free slots in the queue, which +* must still be available after posting the event. +* The special value ::QF_NO_MARGIN causes +* asserting failure in case event posting fails. +* @param[in] sender_ pointer to the sender object. +* +* @returns +* 'true' if the posting succeeded, and 'false' if the posting +* failed due to insufficient margin of free entries available in +* the queue. +* +* @note +* The @p sender_ parameter is actually only used when QS tracing +* is enabled (macro #Q_SPY is defined). When QS software tracing is +* disabled, the POST_X() macro does not pass the @p sender_ parameter, +* so the overhead of passing this extra parameter is entirely avoided. +* +* @note +* The pointer to the sender object is not necessarily a pointer +* to an active object. In fact, if POST_X() is called from an +* interrupt or other context, you can create a unique object just to +* unambiguously identify the sender of the event. +* +* @usage +* @include qf_postx.c +*/ + + + + + \ + ((*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)((me_),\ + (e_), (margin_), (sender_))) + + + + + + + \ + ((*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->post)((me_),\ + (e_), (margin_), (void *)0)) + + + /*! Virtual call to post an event to an active object using the +* Last-In-First-Out (LIFO) policy. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ pointer to the event to post +*/ + + + + \ + ((*((QActiveVtable const *)((Q_HSM_UPCAST(me_))->vptr))->postLIFO)( \ + (me_), (e_))) + + + /*! Invoke the event publishing facility QActive_publish_(). +* +* @details +* This macro is the recommended way of publishing events, because it +* provides the vital information for software tracing and avoids any +* overhead when the tracing is disabled. +* +* @param[in] e_ pointer to the posted event +* @param[in] sender_ pointer to the sender object. This parameter is +* actually only used when QS software tracing is enabled +* (macro #Q_SPY is defined). When QS software tracing is +* disabled, the macro calls QF_publish_() without the +* @p sender_ parameter, so the overhead of passing this +* extra parameter is entirely avoided. +* +* @note +* The pointer to the sender object is not necessarily a pointer +* to an active object. In fact, if QF_PUBLISH() is called from an +* interrupt or other context, you can create a unique object just to +* unambiguously identify the publisher of the event. +* +* @sa QActive_publish_() +*/ + + + \ + (QActive_publish_((e_), (void const *)(sender_), (sender_)->prio)) + + + + + (QActive_publish_((e_), (void *)0, 0U)) + + + /*! Invoke the system clock tick processing QTimeEvt_tick_() +* +* @details +* This macro is the recommended way of invoking clock tick processing, +* because it provides the vital information for software tracing and +* avoids any overhead when the tracing is disabled. +* +* @param[in] tickRate_ clock tick rate to be serviced through this call +* @param[in] sender_ pointer to the sender object. This parameter +* is actually only used when QS software tracing is enabled +* (macro #Q_SPY is defined) +* @note +* When QS software tracing is disabled, the macro calls QTimeEvt_tick_() +* without the `sender` parameter, so the overhead of passing this +* extra parameter is entirely avoided. +* +* @note +* The pointer to the sender object is not necessarily a pointer +* to an active object. In fact, when QTIMEEVT_TICK_X() is called from +* an interrupt, you would create a unique object just to unambiguously +* identify the ISR as the sender of the time events. +* +* @sa QTimeEvt_tick_() +*/ + + + \ + (QTimeEvt_tick_((tickRate_), (sender_))) + + + + + \ + (QTimeEvt_tick_((tickRate_), (void *)0)) + + + /*! Invoke the system clock tick processing +* for tick rate 0 +*/ + + QTIMEEVT_TICK_X(0U, (sender_)) + + + /*! Invoke the system clock tick processing +* +* @deprecated +* superseded by QTIMEEVT_TICK_X() +*/ + + + QTIMEEVT_TICK_X((tickRate_), (sender_)) + + + /*! Invoke the system clock tick processing +* for tick rate 0 +* +* @deprecated +* superseded by QTIMEEVT_TICK() +*/ + + QTIMEEVT_TICK(sender_) + + + /*! Invoke the event publishing facility QActive_publish_(). +* +* @deprecated +* superseded by QACTIVE_PUBLISH() +*/ + + + QACTIVE_PUBLISH((e_), (sender_)) + + + + + /*! @brief Active object class (based on the QHsm implementation strategy) +* @class QActive +* @extends QHsm +* +* @details +* Active objects are encapsulated tasks (each containing an event queue and +* a state machine) that communicate with one another asynchronously by +* sending and receiving events. Within an active object, events are +* processed in a run-to-completion (RTC) fashion, while QF encapsulates +* all the details of thread-safe event exchange and queuing.<br> +* +* QActive represents an active object that uses the QHsm-style +* implementation strategy for state machines. This strategy is tailored +* to manual coding, but it is also supported by the QM modeling tool. +* The resulting code is slower than in the ::QMsm-style implementation +* strategy. +* +* @note +* QActive is not intended to be instantiated directly, but rather serves +* as the abstract base class for derivation of active objects in the +* applications. +* +* @sa QMActive +* +* @usage +* The following example illustrates how to derive an active object from +* QActive. +* @include qf_qactive.c +*/ + + /*! OS-dependent event-queue type +* @private @memberof QActive +* +* @details +* The type of the queue depends on the underlying operating system or +* a kernel. Many kernels support "message queues" that can be adapted +* to deliver QF events to the active object. Alternatively, QF provides +* a native event queue implementation that can be used as well. +* +* @note +* The native QF event queue is configured by defining the macro +* #QF_EQUEUE_TYPE as ::QEQueue. +*/ + + + /*! OS-dependent per-thread object +* @private @memberof QActive +* +* @details +* This data might be used in various ways, depending on the QF port. +* In some ports me->osObject is used to block the calling thread when +* the native QF queue is empty. In other QF ports the OS-dependent +* object might be used differently. +*/ + + + /*! OS-dependent representation of the thread of the active object +* @private @memberof QActive +* +* @details +* This data might be used in various ways, depending on the QF port. +* In some ports me->thread is used store the thread handle. In other ports +* me->thread can be a pointer to the Thread-Local-Storage (TLS). +*/ + + + /*! QXK dynamic priority (1..#QF_MAX_ACTIVE) of AO/thread. +* @private @memberof QActive +*/ + + + /*! QF priority (1..#QF_MAX_ACTIVE) of this active object. +* @private @memberof QActive +*/ + + + /*! Internal array of registered active objects +* @static @private @memberof QActive +*/ + + + /*! pointer to the array of all subscriber AOs for a given event signal. +* @static @private @memberof QActive +*/ + + + /*! The maximum published signal (the size of the subscrList_ array) +* @static @private @memberof QActive +*/ + + + /*! Internal array of registered active objects +* @static @private @memberof QActive +*/ + + + /*! ::QActive constructor (abstract base class) +* @protected @memberof QActive +*/ + + static QActiveVtable const vtable = { /* QActive virtual table */ + { &QHsm_init_, + &QHsm_dispatch_ +#ifdef Q_SPY + ,&QHsm_getStateHandler_ +#endif + }, + &QActive_start_, + &QActive_post_, + &QActive_postLIFO_ +}; +/* clear the whole QActive object, so that the framework can start +* correctly even if the startup code fails to clear the uninitialized +* data (as is required by the C Standard). +*/ +QF_bzero(me, sizeof(*me)); + +QHsm_ctor(&me->super, initial); /* explicitly call superclass' ctor */ +me->super.vptr = &vtable.super; /* hook the vptr to QActive vtable */ + + + /*! Starts execution of an active object and registers the object +* with the framework +* @private @memberof QActive +* +* @details +* Starts execution of the AO and registers the AO with the framework. +* +* @param[in] prio priority at which to start the active object +* @param[in] qSto pointer to the storage for the ring buffer of the +* event queue +* @param[in] qLen length of the event queue [# ::QEvt* pointers] +* @param[in] stkSto pointer to the stack storage (might be nullptr) +* @param[in] stkSize stack size [bytes] +* @param[in] par pointer to an extra parameter (might be nullptr) +* +* @usage +* The following example shows starting an AO when a per-task stack +* is needed: +* @include qf_start.c +*/ + + + + + + + + + /*! Stops execution of an active object and removes it from the +* framework's supervision +* @protected @memberof QActive +* +* @attention +* QActive_stop() must be called only from the AO that is about +* to stop its execution. By that time, any pointers or references +* to the AO are considered invalid (dangling) and it becomes +* illegal for the rest of the application to post events to the AO. +*/ + + + /*! Posts an event `e` directly to the event queue of the active object +* using the First-In-First-Out (FIFO) policy. +* @private @memberof QActive +* +* @details +* Direct event posting is the simplest asynchronous communication +* method available in QF. +* +* @param[in] e pointer to the event to be posted +* @param[in] margin number of required free slots in the queue +* after posting the event or ::QF_NO_MARGIN. +* @param[in] sender pointer to a sender object (used in QS only) +* +* @returns +* 'true' (success) if the posting succeeded (with the provided margin) +* and 'false' (failure) when the posting fails. +* +* @attention +* For `margin` == ::QF_NO_MARGIN, this function will assert internally +* if the event posting fails. In that case, it is unnecessary to check +* the retrun value from this function. +* +* @note +* This function might be implemented differently in various QP/C++ +* ports. The provided implementation assumes that the ::QEQueue +* class is used for the ::QActive event queue. +* +* @usage +* @include qf_post.cpp +* +* @sa +* QActive_postLIFO() +*/ + + + + Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ + +/*! @pre event pointer must be valid */ +Q_REQUIRE_ID(100, e != (QEvt *)0); + +QF_CRIT_STAT_ +QF_CRIT_E_(); +QEQueueCtr nFree = me->eQueue.nFree; /* get volatile into the temporary */ + +/* test-probe#1 for faking queue overflow */ +QS_TEST_PROBE_DEF(&QActive_post_) +QS_TEST_PROBE_ID(1, + nFree = 0U; +) + +bool status; +if (margin == QF_NO_MARGIN) { + if (nFree > 0U) { + status = true; /* can post */ + } + else { + status = false; /* cannot post */ + Q_ERROR_CRIT_(110); /* must be able to post the event */ + } +} +else if (nFree > (QEQueueCtr)margin) { + status = true; /* can post */ +} +else { + status = false; /* cannot post, but don't assert */ +} + +/* is it a dynamic event? */ +if (e->poolId_ != 0U) { + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ +} + +if (status) { /* can post the event? */ + + --nFree; /* one free entry just used up */ + me->eQueue.nFree = nFree; /* update the volatile */ + if (me->eQueue.nMin > nFree) { + me->eQueue.nMin = nFree; /* increase minimum so far */ + } + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object (recipient) */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_EQC_PRE_(me->eQueue.nMin); /* min number of free entries */ + QS_END_NOCRIT_PRE_() + +#ifdef Q_UTEST + /* callback to examine the posted event under the same conditions + * as producing the #QS_QF_ACTIVE_POST trace record, which are: + * the local filter for this AO ('me->prio') is set + */ + if (QS_LOC_CHECK_(me->prio)) { + /* callback to examine the posted event */ + QS_onTestPost(sender, me, e, status); + } +#endif + + /* empty queue? */ + if (me->eQueue.frontEvt == (QEvt *)0) { + me->eQueue.frontEvt = e; /* deliver event directly */ + QACTIVE_EQUEUE_SIGNAL_(me); /* signal the event queue */ + } + /* queue is not empty, insert event into the ring-buffer */ + else { + /* insert event into the ring buffer (FIFO) */ + me->eQueue.ring[me->eQueue.head] = e; + + if (me->eQueue.head == 0U) { /* need to wrap head? */ + me->eQueue.head = me->eQueue.end; /* wrap around */ + } + --me->eQueue.head; /* advance the head (counter clockwise) */ + } + + QF_CRIT_X_(); +} +else { /* cannot post the event */ + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_ATTEMPT, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object (recipient) */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_EQC_PRE_(margin); /* margin requested */ + QS_END_NOCRIT_PRE_() + +#ifdef Q_UTEST + /* callback to examine the posted event under the same conditions + * as producing the #QS_QF_ACTIVE_POST trace record, which are: + * the local filter for this AO ('me->prio') is set + */ + if (QS_LOC_CHECK_(me->prio)) { + QS_onTestPost(sender, me, e, status); + } +#endif + + QF_CRIT_X_(); + + QF_gc(e); /* recycle the event to avoid a leak */ +} + +return status; + + + /*! Posts an event `e` directly to the event queue of the active object +* using the Last-In-First-Out (LIFO) policy. +* @private @memberof QActive +* +* @details +* The LIFO policy should be used only for self-posting and with caution, +* because it alters order of events in the queue. +* +* @param[in] e pointer to the event to be posted +* +* @attention +* This function asserts internally if the posting fails. +* +* @note +* This function might be implemented differently in various QP/C++ +* ports. The provided implementation assumes that the ::QEQueue +* class is used for the QActive event queue. +* +* @sa +* QActive_post() +*/ + + QF_CRIT_STAT_ +QF_CRIT_E_(); +QEQueueCtr nFree = me->eQueue.nFree; /* get volatile into the temporary */ + +/* test-probe#1 for faking queue overflow */ +QS_TEST_PROBE_DEF(&QActive_postLIFO_) +QS_TEST_PROBE_ID(1, + nFree = 0U; +) + +/* the queue must be able to accept the event (cannot overflow) */ +Q_ASSERT_CRIT_(210, nFree != 0U); + +/* is it a dynamic event? */ +if (e->poolId_ != 0U) { + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ +} + +--nFree; /* one free entry just used up */ +me->eQueue.nFree = nFree; /* update the volatile */ +if (me->eQueue.nMin > nFree) { + me->eQueue.nMin = nFree; /* update minimum so far */ +} + +QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_);/* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* # free entries */ + QS_EQC_PRE_(me->eQueue.nMin); /* min number of free entries */ +QS_END_NOCRIT_PRE_() + +#ifdef Q_UTEST + /* callback to examine the posted event under the same conditions + * as producing the #QS_QF_ACTIVE_POST trace record, which are: + * the local filter for this AO ('me->prio') is set + */ + if (QS_LOC_CHECK_(me->prio)) { + QS_onTestPost((QActive *)0, me, e, true); + } +#endif + +/* temporary to avoid UB for volatile access */ +QEvt const * const frontEvt = me->eQueue.frontEvt; +me->eQueue.frontEvt = e; /* deliver the event directly to the front */ + +/* was the queue empty? */ +if (frontEvt == (QEvt *)0) { + QACTIVE_EQUEUE_SIGNAL_(me); /* signal the event queue */ +} +/* queue was not empty, leave the event in the ring-buffer */ +else { + ++me->eQueue.tail; + /* need to wrap the tail? */ + if (me->eQueue.tail == me->eQueue.end) { + me->eQueue.tail = 0U; /* wrap around */ + } + + me->eQueue.ring[me->eQueue.tail] = frontEvt; +} +QF_CRIT_X_(); + + + /*! Get an event from the event queue of an active object +* @private @memberof QActive +* +* @details +* The behavior of this function depends on the kernel used in the +* QF port. For built-in kernels (Vanilla or QK) the function can be +* called only when the queue is not empty, so it doesn't block. For +* a blocking kernel/OS the function can block and wait for delivery +* of an event. +* +* @returns +* A pointer to the received event. The returned pointer is guaranteed +* to be valid (can't be nullptr). +* +* @note +* This function might be implemented differently in various QP/C++ +* ports. The provided implementation assumes that the ::QEQueue +* class is used for the QActive event queue. +*/ + QF_CRIT_STAT_ +QF_CRIT_E_(); +QACTIVE_EQUEUE_WAIT_(me); /* wait for event to arrive directly */ + +/* always remove event from the front */ +QEvt const * const e = me->eQueue.frontEvt; +QEQueueCtr const nFree = me->eQueue.nFree + 1U; /* volatile into tmp */ +me->eQueue.nFree = nFree; /* update the number of free */ + +/* any events in the ring buffer? */ +if (nFree <= me->eQueue.end) { + + /* remove event from the tail */ + me->eQueue.frontEvt = me->eQueue.ring[me->eQueue.tail]; + if (me->eQueue.tail == 0U) { /* need to wrap the tail? */ + me->eQueue.tail = me->eQueue.end; /* wrap around */ + } + --me->eQueue.tail; + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_GET, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* # free entries */ + QS_END_NOCRIT_PRE_() +} +else { + me->eQueue.frontEvt = (QEvt *)0; /* queue becomes empty */ + + /* all entries in the queue must be free (+1 for fronEvt) */ + Q_ASSERT_CRIT_(310, nFree == (me->eQueue.end + 1U)); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_GET_LAST, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_END_NOCRIT_PRE_() +} +QF_CRIT_X_(); +return e; + + + const + /*! Subscribes for delivery of signal `sig` to the active object +* @public @memberof QActive +* +* @details +* This function is part of the Publish-Subscribe event delivery +* mechanism available in QF. Subscribing to an event means that the +* framework will start posting all published events with a given signal +* `sig` to the event queue of the active object. +* +* @param[in] sig event signal to subscribe +* +* The following example shows how the Table active object subscribes +* to three signals in the initial transition: +* @include qf_subscribe.cpp +* +* @sa +* QActive_publish_(), QActive_unsubscribe(), and +* QActive_unsubscribeAll() +*/ + + uint_fast8_t const p = (uint_fast8_t)me->prio; + +Q_REQUIRE_ID(300, ((enum_t)Q_USER_SIG <= sig) + && (sig < QActive_maxPubSignal_) + && (0U < p) && (p <= QF_MAX_ACTIVE) + && (QActive_registry_[p] == me)); + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_SUBSCRIBE, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ +QS_END_NOCRIT_PRE_() + +/* set the priority bit */ +QPSet_insert(&QActive_subscrList_[sig], p); + +QF_CRIT_X_(); + + + const + /*! Unsubscribes from the delivery of signal `sig` to the active object +* @public @memberof QActive +* +* @details +* This function is part of the Publish-Subscribe event delivery +* mechanism available in QF. Un-subscribing from an event means that +* the framework will stop posting published events with a given signal +* `sig` to the event queue of the active object. +* +* @param[in] sig event signal to unsubscribe +* +* @note +* Due to the latency of event queues, an active object should NOT +* assume that a given signal @p sig will never be dispatched to the +* state machine of the active object after un-subscribing from that +* signal. The event might be already in the queue, or just about to +* be posted and the un-subscribe operation will not flush such events. +* +* @note +* Un-subscribing from a signal that has never been subscribed in the +* first place is considered an error and QF will raise an assertion. +* +* @sa +* QActive_publish_(), QActive_subscribe(), and +* QActive_unsubscribeAll() +*/ + + uint_fast8_t const p = (uint_fast8_t)me->prio; + +/*! @pre the singal and the prioriy must be in ragne, the AO must also +* be registered with the framework +*/ +Q_REQUIRE_ID(400, ((enum_t)Q_USER_SIG <= sig) + && (sig < QActive_maxPubSignal_) + && (0U < p) && (p <= QF_MAX_ACTIVE) + && (QActive_registry_[p] == me)); + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_UNSUBSCRIBE, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ +QS_END_NOCRIT_PRE_() + +/* clear priority bit */ +QPSet_remove(&QActive_subscrList_[sig], p); + +QF_CRIT_X_(); + + + const + /*! Unsubscribes from the delivery of all signals to the active object +* @public @memberof QActive +* +* @details +* This function is part of the Publish-Subscribe event delivery +* mechanism available in QF. Un-subscribing from all events means that +* the framework will stop posting any published events to the event +* queue of the active object. +* +* @note +* Due to the latency of event queues, an active object should NOT +* assume that no events will ever be dispatched to the state machine of +* the active object after un-subscribing from all events. +* The events might be already in the queue, or just about to be posted +* and the un-subscribe operation will not flush such events. Also, the +* alternative event-delivery mechanisms, such as direct event posting or +* time events, can be still delivered to the event queue of the active +* object. +* +* @sa +* QActive_publish_(), QActive_subscribe(), and QActive_unsubscribe() +*/ + uint_fast8_t const p = (uint_fast8_t)me->prio; + +Q_REQUIRE_ID(500, (0U < p) && (p <= QF_MAX_ACTIVE) + && (QActive_registry_[p] == me)); + +for (enum_t sig = (enum_t)Q_USER_SIG; sig < QActive_maxPubSignal_; ++sig) { + QF_CRIT_STAT_ + QF_CRIT_E_(); + if (QPSet_hasElement(&QActive_subscrList_[sig], p)) { + QPSet_remove(&QActive_subscrList_[sig], p); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_UNSUBSCRIBE, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_END_NOCRIT_PRE_() + } + QF_CRIT_X_(); + + /* prevent merging critical sections */ + QF_CRIT_EXIT_NOP(); +} + + + /*! Publish event to all subscribers of a given signal `e->sig` +* @static @public @memberof QActive +* +* @details +* This function posts (using the FIFO policy) the event @a e to **all** +* active objects that have subscribed to the signal @a e->sig, which is +* called _multicasting_. The multicasting performed in this function is +* very efficient based on reference-counting inside the published event +* ("zero-copy" event multicasting). This function is designed to be +* callable from any part of the system, including ISRs, device drivers, +* and active objects. +* +* @note +* To avoid any unexpected re-ordering of events posted into AO queues, +* the event multicasting is performed with scheduler **locked**. +* However, the scheduler is locked only up to the priority level of +* the highest-priority subscriber, so any AOs of even higher priority, +* which did not subscribe to this event are *not* affected. +*/ + + + QActive_subscrList_ = subscrSto; +QActive_maxPubSignal_ = maxSignal; + +/* zero the subscriber list, so that the framework can start correctly +* even if the startup code fails to clear the uninitialized data +* (as is required by the C Standard). +*/ +QF_bzero(subscrSto, (uint_fast16_t)maxSignal * sizeof(QSubscrList)); + + + /*! Publish event to all subscribers of a given signal `e->sig` +* @static @private @memberof QActive +* +* @details +* This function posts (using the FIFO policy) the event @a e to **all** +* active objects that have subscribed to the signal @a e->sig, which is +* called _multicasting_. The multicasting performed in this function is +* very efficient based on reference-counting inside the published event +* ("zero-copy" event multicasting). This function is designed to be +* callable from any part of the system, including ISRs, device drivers, +* and active objects. +* +* @note +* To avoid any unexpected re-ordering of events posted into AO queues, +* the event multicasting is performed with scheduler **locked**. +* However, the scheduler is locked only up to the priority level of +* the highest-priority subscriber, so any AOs of even higher priority, +* which did not subscribe to this event are *not* affected. +*/ + + + + Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ +Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + +/*! @pre the published signal must be within the configured range */ +Q_REQUIRE_ID(200, e->sig < (QSignal)QActive_maxPubSignal_); + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +QS_BEGIN_NOCRIT_PRE_(QS_QF_PUBLISH, qs_id) + QS_TIME_PRE_(); /* the timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_2U8_PRE_(e->poolId_, e->refCtr_);/* pool Id & ref Count */ +QS_END_NOCRIT_PRE_() + +/* is it a dynamic event? */ +if (e->poolId_ != 0U) { + /* NOTE: The reference counter of a dynamic event is incremented to + * prevent premature recycling of the event while the multicasting + * is still in progress. At the end of the function, the garbage + * collector step (QF_gc()) decrements the reference counter and + * recycles the event if the counter drops to zero. This covers the + * case when the event was published without any subscribers. + */ + QF_EVT_REF_CTR_INC_(e); +} + +/* make a local, modifiable copy of the subscriber list */ +QPSet subscrList = QActive_subscrList_[e->sig]; +QF_CRIT_X_(); + +if (QPSet_notEmpty(&subscrList)) { /* any subscribers? */ + /* the highest-prio subscriber */; + uint_fast8_t p = QPSet_findMax(&subscrList); + QF_SCHED_STAT_ + + QF_SCHED_LOCK_(p); /* lock the scheduler up to prio 'p' */ + do { /* loop over all subscribers */ + /* the prio of the AO must be registered with the framework */ + Q_ASSERT_ID(210, QActive_registry_[p] != (QActive *)0); + + /* QACTIVE_POST() asserts internally if the queue overflows */ + QACTIVE_POST(QActive_registry_[p], e, sender); + + QPSet_remove(&subscrList, p); /* remove the handled subscriber */ + if (QPSet_notEmpty(&subscrList)) { /* still more subscribers? */ + /* highest-prio subscriber */ + p = QPSet_findMax(&subscrList); + } + else { + p = 0U; /* no more subscribers */ + } + } while (p != 0U); + QF_SCHED_UNLOCK_(); /* unlock the scheduler */ +} + +/* The following garbage collection step decrements the reference counter +* and recycles the event if the counter drops to zero. This covers both +* cases when the event was published with or without any subscribers. +*/ +QF_gc(e); + + + const + /*! Defer an event to a given separate event queue +* @protected @memberof QActive +* +* @details +* This function is part of the event deferral support. An active object +* uses this function to defer an event @p e to the QF-supported native +* event queue @p eq. QF correctly accounts for another outstanding +* reference to the event and will not recycle the event at the end of +* the RTC step. Later, the active object might recall one event at a +* time from the event queue. +* +* @param[in] eq pointer to a "raw" thread-safe queue to recall +* an event from. +* @param[in] e pointer to the event to be deferred +* +* @returns +* 'true' (success) when the event could be deferred and 'false' +* (failure) if event deferral failed due to overflowing the queue. +* +* An active object can use multiple event queues to defer events of +* different kinds. +* +* @sa +* QActive_recall(), ::QEQueue, QActive_flushDeferred() +*/ + + + bool const status = QEQueue_post(eq, e, 0U, me->prio); +QS_CRIT_STAT_ + +QS_BEGIN_PRE_(QS_QF_ACTIVE_DEFER, me->prio) + QS_TIME_PRE_(); /* time stamp */ + QS_OBJ_PRE_(me); /* this active object */ + QS_OBJ_PRE_(eq); /* the deferred queue */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ +QS_END_PRE_() + +return status; + + + /*! Recall a deferred event from a given event queue +* @protected @memberof QActive +* +* @details +* This function is part of the event deferral support. An active object +* uses this function to recall a deferred event from a given QF +* event queue. Recalling an event means that it is removed from the +* deferred event queue @p eq and posted (LIFO) to the event queue of +* the active object. +* +* @param[in] eq pointer to a "raw" thread-safe queue to recall +* an event from. +* +* @returns +* 'true' if an event has been recalled and 'false' if not. +* +* @note +* An active object can use multiple event queues to defer events of +* different kinds. +* +* @sa +* QActive_recall(), QActive_postLIFO_(), ::QEQueue +*/ + + QEvt const * const e = QEQueue_get(eq, me->prio); +bool recalled; + +/* event available? */ +if (e != (QEvt *)0) { + QF_CRIT_STAT_ + + QACTIVE_POST_LIFO(me, e); /* post it to the front of the AO's queue */ + + QF_CRIT_E_(); + + /* is it a dynamic event? */ + if (e->poolId_ != 0U) { + + /* after posting to the AO's queue the event must be referenced + * at least twice: once in the deferred event queue (eq->get() + * did NOT decrement the reference counter) and once in the + * AO's event queue. + */ + Q_ASSERT_CRIT_(210, e->refCtr_ >= 2U); + + /* we need to decrement the reference counter once, to account + * for removing the event from the deferred event queue. + */ + QF_EVT_REF_CTR_DEC_(e); /* decrement the reference counter */ + } + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_RECALL, me->prio) + QS_TIME_PRE_(); /* time stamp */ + QS_OBJ_PRE_(me); /* this active object */ + QS_OBJ_PRE_(eq); /* the deferred queue */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_END_NOCRIT_PRE_() + + QF_CRIT_X_(); + recalled = true; +} +else { + QS_CRIT_STAT_ + + QS_BEGIN_PRE_(QS_QF_ACTIVE_RECALL_ATTEMPT, me->prio) + QS_TIME_PRE_(); /* time stamp */ + QS_OBJ_PRE_(me); /* this active object */ + QS_OBJ_PRE_(eq); /* the deferred queue */ + QS_END_PRE_() + + recalled = false; +} +return recalled; + + + const + /*! Flush the specified deferred queue 'eq' +* @protected @memberof QActive +* +* @details +* This function is part of the event deferral support. An active object +* can use this function to flush a given QF event queue. The function +* makes sure that the events are not leaked. +* +* @param[in] eq pointer to a "raw" thread-safe queue to flush. +* +* @returns +* the number of events actually flushed from the queue. +* +* @sa +* QActive_defer(), QActive_recall(), ::QEQueue +*/ + + uint_fast16_t n = 0U; +for (QEvt const *e = QEQueue_get(eq, me->prio); + e != (QEvt *)0; + e = QEQueue_get(eq, me->prio)) +{ + QF_gc(e); /* garbage collect */ + ++n; /* count the flushed event */ +} +return n; + + + const + /*! Get the priority of the active object. +* @public @memberof QActive +*/ + return (uint_fast8_t)me->prio; + + + /*! Set the priority of the active object +* @public @memberof QActive +*/ + + me->prio = (uint8_t)prio; + + + /*! Generic setting of additional attributes (useful in QP ports) +* @public @memberof QActive +*/ + + + + + /*! Thread routine for executing an active object `act` +* @private @memberof QActive +*/ + + + + /*! Register this active object to be managed by the framework +* @protected @memberof QActive +* +* @details +* This function adds a given active object to the active objects +* managed by the QF framework. It should not be called by the +* application directly, only through the function QActive::start(). +* +* @note +* The priority of the active object a should be set before calling +* this function. +* +* @sa QActive_unregister_() +*/ + uint_fast8_t const p = (uint_fast8_t)me->prio; + +/*! @pre the priority of the active object must not be zero and cannot +* exceed the maximum #QF_MAX_ACTIVE. Also, the priority of the active +* object must not be already in use. QF requires each active object to +* have a **unique** priority. +*/ +Q_REQUIRE_ID(100, (0U < p) + && (p <= QF_MAX_ACTIVE) + && (QActive_registry_[p] == (QActive *)0)); +QF_CRIT_STAT_ +QF_CRIT_E_(); +QActive_registry_[p] = me; /* register the active object at this priority */ +QF_CRIT_X_(); + + + /*! Un-register the active object from the framework +* @protected @memberof QActive +* +* @details +* This function un-registers a given active object from the active objects +* managed by the QF framework. It should not be called by the QP ports. +* +* @param[in] me pointer to the active object to remove from the +* framework. +* +* @note +* The active object that is removed from the framework can no longer +* participate in any event exchange. +* +* @sa QActive_register_() +*/ + uint_fast8_t const p = (uint_fast8_t)me->prio; + +/*! @pre the priority of the active object must not be zero and cannot +* exceed the maximum #QF_MAX_ACTIVE. Also, the priority of the active +* object must be already registered with the framework. +*/ +Q_REQUIRE_ID(200, (0U < p) && (p <= QF_MAX_ACTIVE) + && (QActive_registry_[p] == me)); +QF_CRIT_STAT_ +QF_CRIT_E_(); +QActive_registry_[p] = (QActive *)0; /* free-up the priority level */ +me->super.state.fun = Q_STATE_CAST(0); /* invalidate the state */ +QF_CRIT_X_(); + + + /*! the "FromISR" variant used in the QP port to "FreeRTOS" +* @private @memberof QActive +*/ + + + + + + + /*! the "FromISR" variant used in the QP port to "FreeRTOS" +* @private @memberof QActive +*/ + + + + + + + /*! @brief Virtual table for the QActive class */ + { + struct QHsmVtable super; /*!< @protected inherits ::QHsmVtable */ + + /*! @private virtual function to start the AO/thread + * @sa QACTIVE_START() + */ + void (*start)(QActive * const me, uint_fast8_t prio, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par); + + /*! @private virtual function to asynchronously post (FIFO) + * an event to the AO + * @sa QACTIVE_POST() and QACTIVE_POST_X() + */ + bool (*post)(QActive * const me, QEvt const * const e, + uint_fast16_t const margin, void const * const sender); + + /*! @private virtual function to asynchronously post (LIFO) + * an event to the AO + * @sa QACTIVE_POST_LIFO() + */ + void (*postLIFO)(QActive * const me, QEvt const * const e); + +} QActiveVtable; + + + /*! @brief Active object class (based on QMsm implementation strategy) +* @class QMActive +* @extends QActive +* +* @details +* ::QMActive represents an active object that uses the ::QMsm style state +* machine implementation strategy. This strategy requires the use of the +* QM modeling tool to generate state machine code automatically, but the +* code is faster than in the ::QHsm style implementation strategy and needs +* less run-time support (smaller event-processor). +* +* @note +* ::QMActive is not intended to be instantiated directly, but rather serves +* as the base class for derivation of active objects in the application. +* +* @tr{AQP214} +* +* @usage +* The following example illustrates how to derive an active object from +* ::QMActive. Please note that the ::QActive member @c super is defined as +* the **first** member of the derived struct (see @ref oop). +* @include qf_qmactive.c +*/ + + /*! Constructor of ::QMActive class. +* @protected @memberof QMActive +* +* @details +* Performs the first step of active object initialization by assigning +* the virtual pointer and calling the superclass constructor. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] initial pointer to the event to be dispatched to the MSM +* +* @note Must be called only ONCE before QHSM_INIT(). +* +* @sa QHsm_ctor() +*/ + + static QMActiveVtable const vtable = { /* QMActive virtual table */ + { &QMsm_init_, + &QMsm_dispatch_ +#ifdef Q_SPY + ,&QMsm_getStateHandler_ +#endif + }, + &QActive_start_, + &QActive_post_, + &QActive_postLIFO_ +}; + +/* clear the whole QActive object, so that the framework can start +* correctly even if the startup code fails to clear the uninitialized +* data (as is required by the C Standard). +*/ +QF_bzero(me, sizeof(*me)); + +/*! +* @note QMActive inherits QActive, so by the @ref oop convention +* it should call the constructor of the superclass, i.e., QActive_ctor(). +* However, this would pull in the QActiveVtable, which in turn will pull +* in the code for QHsm_init_() and QHsm_dispatch_() implemetations, +* which is expensive. To avoid this code size penalty, in case QHsm is +* not used in a given project, the call to QMsm_ctor() avoids pulling +* in the code for QHsm. +*/ +QMsm_ctor(QMSM_CAST_(&me->super.super), initial); + +me->super.super.vptr = &vtable.super; /* hook vptr to QMActive vtable */ + + + + /*! @brief Virtual Table for the ::QMActive class (inherited +* from ::QActiveVtable) +* +* @note +* ::QMActive inherits ::QActive exactly, without adding any new virtual +* functions and therefore, ::QMActiveVtable is typedef'ed as ::QActiveVtable. +*/ + + + /*! @brief Time Event class +* @class QTimeEvt +* @extends QEvt +* +* @details +* Time events are special QF events equipped with the notion of time passage. +* The basic usage model of the time events is as follows. An active object +* allocates one or more ::QTimeEvt objects (provides the storage for them). +* When the active object needs to arrange for a timeout, it arms one of its +* time events to fire either just once (one-shot) or periodically. Each time +* event times out independently from the others, so a QF application can make +* multiple parallel timeout requests (from the same or different active +* objects). When QF detects that the appropriate moment has arrived, it +* inserts the time event directly into the recipient's event queue. The +* recipient then processes the time event just like any other event. +* +* Time events, as any other QF events derive from the ::QEvt base class. +* Typically, you will use a time event as-is, but you can also further +* derive more specialized time events from it by adding some more data +* members and/or specialized functions that operate on the specialized +* time events. +* +* Internally, the armed time events are organized into linked lists--one +* list for every supported ticking rate. These linked lists are scanned in +* every invocation of the QTIMEEVT_TICK_X() macro. Only armed (timing out) +* time events are in the list, so only armed time events consume CPU cycles. +* +* @sa ::QTimeEvt for the description of the data members +* +* @tr{AQP215} +* +* @note +* QF manages the time events in the QTIMEEVT_TICK_X() macro, which must +* be called periodically, from the clock tick ISR or from other periodic +* source. QTIMEEVT_TICK_X() caYou might also use the special ::QTicker +* active object. +* +* @note +* Even though ::QTimeEvt is a subclass of ::QEvt, ::QTimeEvt instances can NOT +* be allocated dynamically from event pools. In other words, it is illegal to +* allocate ::QTimeEvt instances with the Q_NEW() or Q_NEW_X() macros. +*/ + + /*! link to the next time event in the list +* @private @memberof QTimeEvt +*/ + + + /*! The active object that receives the time events +* @private @memberof QTimeEvt +*/ + + + /*! Internal down-counter of the time event. +* @private @memberof QTimeEvt +* +* @details +* The down-counter is decremented by 1 in every QTimeEvt_tick_() call. +* The time event fires (gets posted or published) when the down-counter +* reaches zero. +*/ + + + /*! Interval for periodic time event (zero for one-shot time event) +* @private @memberof QTimeEvt +* +* @details +* The value of the interval is re-loaded to the internal down-counter +* when the time event expires, so that the time event keeps timing out +* periodically. +*/ + + + /*! heads of linked lists of time events, one for every clock tick rate */ + + + /*! The extended "constructor" to initialize a Time Event. +* @public @memberof QTimeEvt +* +* @details +* When creating a time event, you must commit it to a specific active object +* @p act, tick rate @p tickRate and event signal @p sig. You cannot change +* these attributes later. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] act pointer to the active object associated with this +* time event. The time event will post itself to this AO. +* @param[in] sig signal to associate with this time event. +* @param[in] tickRate system clock tick rate to associate with this +* time event in the range [0..15]. +* +* @note You should call the constructor exactly once for every Time Event +* object **before** arming the Time Event. The ideal place for initializing +* the time event(s) associated with a given AO is the AO's constructor. +*/ + + + + /*! @pre The signal must be valid and the tick rate in range */ +Q_REQUIRE_ID(300, (sig >= (enum_t)Q_USER_SIG) + && (tickRate < QF_MAX_TICK_RATE)); + +me->next = (QTimeEvt *)0; +me->ctr = 0U; +me->interval = 0U; +me->super.sig = (QSignal)sig; + +/* For backwards compatibility with QTimeEvt_ctor(), the active object +* pointer can be uninitialized (NULL) and is NOT validated in the +* precondition. The active object pointer is validated in preconditions +* to QTimeEvt_arm_() and QTimeEvt_rearm(). +*/ +me->act = act; + +/* Setting the POOL_ID event attribute to zero is correct only for +* events not allocated from event pools, which must be the case +* for Time Events. +*/ +me->super.poolId_ = 0U; + +/* The refCtr_ attribute is not used in time events, so it is +* reused to hold the tickRate as well as other information +*/ +me->super.refCtr_ = (uint8_t)tickRate; + + + /*! Arm a time event (one shot or periodic) for direct event posting. +* @public @memberof QTimeEvt +* +* @details +* Arms a time event to fire in a specified number of clock ticks and with +* a specified interval. If the interval is zero, the time event is armed for +* one shot ('one-shot' time event). When the timeout expires, the time event +* gets directly posted (using the FIFO policy) into the event queue of the +* host active object. After posting, a one-shot time event gets automatically +* disarmed while a periodic time event (interval != 0) is automatically +* re-armed. +* +* A time event can be disarmed at any time by calling QTimeEvt_disarm(). +* Also, a time event can be re-armed to fire in a different number of clock +* ticks by calling the QTimeEvt_rearm(). +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] nTicks number of clock ticks (at the associated rate) +* to rearm the time event with. +* @param[in] interval interval (in clock ticks) for periodic time event. +* +* @attention +* Arming an already armed time event is __not__ allowed and is considered +* a programming error. The QP/C framework will assert if it detects an +* attempt to arm an already armed time event. +* +* @usage +* The following example shows how to arm a periodic time event as well as +* one-shot time event from a state machine of an active object: +* @include qf_tevt.c +*/ + + + uint_fast8_t const tickRate + = ((uint_fast8_t)me->super.refCtr_ & QTE_TICK_RATE); +QTimeEvtCtr const ctr = me->ctr; +#ifdef Q_SPY +uint_fast8_t const qs_id = ((QActive *)(me->act))->prio; +#endif + +/*! @pre the host AO must be valid, time evnet must be disarmed, +* number of clock ticks cannot be zero, and the signal must be valid. +*/ +Q_REQUIRE_ID(400, (me->act != (void *)0) + && (ctr == 0U) + && (nTicks != 0U) + && (tickRate < (uint_fast8_t)QF_MAX_TICK_RATE) + && (me->super.sig >= (QSignal)Q_USER_SIG)); +#ifdef Q_NASSERT +(void)ctr; /* avoid compiler warning about unused variable */ +#endif + +QF_CRIT_STAT_ +QF_CRIT_E_(); +me->ctr = nTicks; +me->interval = interval; + +/* is the time event unlinked? +* NOTE: For the duration of a single clock tick of the specified tick +* rate a time event can be disarmed and yet still linked into the list, +* because un-linking is performed exclusively in QTimeEvt_tick_(). +*/ +if ((me->super.refCtr_ & QTE_IS_LINKED) == 0U) { + me->super.refCtr_ |= QTE_IS_LINKED; /* mark as linked */ + + /* The time event is initially inserted into the separate + * "freshly armed" link list based on QTimeEvt_timeEvtHead_[tickRate].act. + * Only later, inside the QTimeEvt_tick_() function, the "freshly armed" + * list is appended to the main list of armed time events based on + * QTimeEvt_timeEvtHead_[tickRate].next. Again, this is to keep any + * changes to the main list exclusively inside the QTimeEvt_tick_() + * function. + */ + me->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act; + QTimeEvt_timeEvtHead_[tickRate].act = me; +} + +QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_ARM, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(me); /* this time event object */ + QS_OBJ_PRE_(me->act); /* the active object */ + QS_TEC_PRE_(nTicks); /* the number of ticks */ + QS_TEC_PRE_(interval); /* the interval */ + QS_U8_PRE_(tickRate); /* tick rate */ +QS_END_NOCRIT_PRE_() + +QF_CRIT_X_(); + + + /*! Disarm a time event. +* @public @memberof QTimeEvt +* +* @details +* Disarm the time event so it can be safely reused. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' if the time event was truly disarmed, that is, it was running. +* The return of 'false' means that the time event was not truly disarmed, +* because it was not running. The 'false' return is only possible for one- +* shot time events that have been automatically disarmed upon expiration. +* In this case the 'false' return means that the time event has already +* been posted or published and should be expected in the active object's +* state machine. +* +* @note +* there is no harm in disarming an already disarmed time event +*/ + #ifdef Q_SPY +uint_fast8_t const qs_id = QACTIVE_CAST_(me->act)->prio; +#endif + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +/* is the time event actually armed? */ +bool wasArmed; +if (me->ctr != 0U) { + wasArmed = true; + me->super.refCtr_ |= QTE_WAS_DISARMED; + + QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_DISARM, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(me); /* this time event object */ + QS_OBJ_PRE_(me->act); /* the target AO */ + QS_TEC_PRE_(me->ctr); /* the number of ticks */ + QS_TEC_PRE_(me->interval); /* the interval */ + QS_U8_PRE_(me->super.refCtr_ & QTE_TICK_RATE); + QS_END_NOCRIT_PRE_() + + me->ctr = 0U; /* schedule removal from the list */ +} +else { /* the time event was already disarmed automatically */ + wasArmed = false; + me->super.refCtr_ &= (uint8_t)(~QTE_WAS_DISARMED & 0xFFU); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_DISARM_ATTEMPT, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(me); /* this time event object */ + QS_OBJ_PRE_(me->act); /* the target AO */ + QS_U8_PRE_(me->super.refCtr_ & QTE_TICK_RATE); + QS_END_NOCRIT_PRE_() + +} +QF_CRIT_X_(); + +return wasArmed; + + + /*! Rearm a time event. +* @public @memberof QTimeEvt +* +* @details +* Rearms a time event with a new number of clock ticks. This function can +* be used to adjust the current period of a periodic time event or to +* prevent a one-shot time event from expiring (e.g., a watchdog time event). +* Rearming a periodic timer leaves the interval unchanged and is a convenient +* method to adjust the phasing of a periodic time event. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] nTicks number of clock ticks (at the associated rate) +* to rearm the time event with. +* +* @returns +* 'true' if the time event was running as it was re-armed. The 'false' +* return means that the time event was not truly rearmed because it was +* not running. The 'false' return is only possible for one-shot time events +* that have been automatically disarmed upon expiration. In this case the +* 'false' return means that the time event has already been posted or +* published and should be expected in the active object's state machine. +*/ + + uint_fast8_t const tickRate + = (uint_fast8_t)me->super.refCtr_ & QTE_TICK_RATE; +#ifdef Q_SPY +uint_fast8_t const qs_id = ((QActive *)(me->act))->prio; +#endif + +/*! @pre AO must be valid, tick rate must be in range, nTicks must not +* be zero, and the signal of this time event must be valid +*/ +Q_REQUIRE_ID(600, (me->act != (void *)0) + && (tickRate < QF_MAX_TICK_RATE) + && (nTicks != 0U) + && (me->super.sig >= (QSignal)Q_USER_SIG)); + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +/* is the time evt not running? */ +bool wasArmed; +if (me->ctr == 0U) { + wasArmed = false; + + /* NOTE: For the duration of a single clock tick of the specified + * tick rate a time event can be disarmed and yet still linked into + * the list, because unlinking is performed exclusively in the + * QTimeEvt_tick_() function. + */ + /* is the time event linked yet? */ + if ((me->super.refCtr_ & QTE_IS_LINKED) == 0U) { + me->super.refCtr_ |= QTE_IS_LINKED; /* mark as linked */ + + /* The time event is initially inserted into the separate + * "freshly armed" list based on QTimeEvt_timeEvtHead_[tickRate].act. + * Only later, inside the QTimeEvt_tick_() function, the "freshly + * armed" list is appended to the main list of armed time events + * based on QTimeEvt_timeEvtHead_[tickRate].next. Again, this is + * to keep any changes to the main list exclusively inside the + * QTimeEvt_tick_() function. + */ + me->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act; + QTimeEvt_timeEvtHead_[tickRate].act = me; + } +} +else { /* the time event was armed */ + wasArmed = true; +} +me->ctr = nTicks; /* re-load the tick counter (shift the phasing) */ + +QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_REARM, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(me); /* this time event object */ + QS_OBJ_PRE_(me->act); /* the target AO */ + QS_TEC_PRE_(me->ctr); /* the number of ticks */ + QS_TEC_PRE_(me->interval); /* the interval */ + QS_2U8_PRE_(tickRate, (wasArmed ? 1U : 0U)); +QS_END_NOCRIT_PRE_() + +QF_CRIT_X_(); + +return wasArmed; + + + /*! Check the "was disarmed" status of a time event. +* @public @memberof QTimeEvt +* +* @details +* Useful for checking whether a one-shot time event was disarmed in the +* QTimeEvt_disarm() operation. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' if the time event was truly disarmed in the last QTimeEvt_disarm() +* operation. The 'false' return means that the time event was not truly +* disarmed, because it was not running at that time. The 'false' return is +* only possible for one-shot time events that have been automatically disarmed +* upon expiration. In this case the 'false' return means that the time event +* has already been posted or published and should be expected in the active +* object's event queue. +* +* @note +* This function has a **side effect** of setting the "was disarmed" status, +* which means that the second and subsequent times this function is called +* the function will return 'true'. +*/ + uint8_t const wasDisarmed = (me->super.refCtr_ & QTE_WAS_DISARMED); +me->super.refCtr_ |= QTE_WAS_DISARMED; /* mark as disarmed */ +return wasDisarmed != 0U; + + + const + /*! Get the current value of the down-counter of a time event. +* @public @memberof QTimeEvt +* +* @details +* Useful for checking how many clock ticks (at the tick rate associated +* with the time event) remain until the time event expires. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* For an armed time event, the function returns the current value of the +* down-counter of the given time event. If the time event is not armed, +* the function returns 0. +* +* @note +* The function is thread-safe. +*/ + QF_CRIT_STAT_ +QF_CRIT_E_(); +QTimeEvtCtr const ret = me->ctr; +QF_CRIT_X_(); + +return ret; + + + /*! Processes all armed time events at every clock tick. +* @static @private @memberof QTimeEvt +* +* @details +* This internal helper function processes all armed ::QTimeEvt objects +* associated wit the tick rate @p tickRate . +* +* This function must be called periodically from a time-tick ISR or from +* a task so that QF can manage the timeout events assigned to the given +* system clock tick rate. +* +* @param[in] tickRate clock tick rate serviced in this call [1..15]. +* @param[in] sender pointer to a sender object (only for QS tracing) +* +* @note +* this function should be called only via the macro QTIMEEVT_TICK_X() +* +* @note +* the calls to QTimeEvt_tick_() with different @p tickRate parameter can +* preempt each other. For example, higher clock tick rates might be +* serviced from interrupts while others from tasks (active objects). +* +* @sa ::QTimeEvt. +*/ + + + Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ + +QTimeEvt *prev = &QTimeEvt_timeEvtHead_[tickRate]; + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +QS_BEGIN_NOCRIT_PRE_(QS_QF_TICK, 0U) + ++prev->ctr; + QS_TEC_PRE_(prev->ctr); /* tick ctr */ + QS_U8_PRE_(tickRate); /* tick rate */ +QS_END_NOCRIT_PRE_() + +/* scan the linked-list of time events at this rate... */ +for (;;) { + QTimeEvt *t = prev->next; /* advance down the time evt. list */ + + /* end of the list? */ + if (t == (QTimeEvt *)0) { + + /* any new time events armed since the last QTimeEvt_tick_()? */ + if (QTimeEvt_timeEvtHead_[tickRate].act != (void *)0) { + + /* sanity check */ + Q_ASSERT_CRIT_(110, prev != (QTimeEvt *)0); + prev->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act; + QTimeEvt_timeEvtHead_[tickRate].act = (void *)0; + t = prev->next; /* switch to the new list */ + } + else { + break; /* all currently armed time evts. processed */ + } + } + + /* time event scheduled for removal? */ + if (t->ctr == 0U) { + prev->next = t->next; + /* mark time event 't' as NOT linked */ + t->super.refCtr_ &= (uint8_t)(~QTE_IS_LINKED & 0xFFU); + /* do NOT advance the prev pointer */ + QF_CRIT_X_(); /* exit crit. section to reduce latency */ + + /* prevent merging critical sections, see NOTE1 below */ + QF_CRIT_EXIT_NOP(); + } + else { + --t->ctr; + + /* is time event about to expire? */ + if (t->ctr == 0U) { + /* temporary for volatile */ + QActive * const act = (QActive *)t->act; + + /* periodic time evt? */ + if (t->interval != 0U) { + t->ctr = t->interval; /* rearm the time event */ + prev = t; /* advance to this time event */ + } + /* one-shot time event: automatically disarm */ + else { + prev->next = t->next; + /* mark time event 't' as NOT linked */ + t->super.refCtr_ &= (uint8_t)(~QTE_IS_LINKED & 0xFFU); + /* do NOT advance the prev pointer */ + + QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_AUTO_DISARM, act->prio) + QS_OBJ_PRE_(t); /* this time event object */ + QS_OBJ_PRE_(act); /* the target AO */ + QS_U8_PRE_(tickRate); /* tick rate */ + QS_END_NOCRIT_PRE_() + } + + QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_POST, act->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(t); /* the time event object */ + QS_SIG_PRE_(t->super.sig); /* signal of this time event */ + QS_OBJ_PRE_(act); /* the target AO */ + QS_U8_PRE_(tickRate); /* tick rate */ + QS_END_NOCRIT_PRE_() + + QF_CRIT_X_(); /* exit critical section before posting */ + + /* QACTIVE_POST() asserts internally if the queue overflows */ + QACTIVE_POST(act, &t->super, sender); + } + else { + prev = t; /* advance to this time event */ + QF_CRIT_X_(); /* exit crit. section to reduce latency */ + + /* prevent merging critical sections + * In some QF ports the critical section exit takes effect only + * on the next machine instruction. If this case, the next + * instruction is another entry to a critical section, the + * critical section won't be really exited, but rather the + * two adjacent critical sections would be merged. The + * QF_CRIT_EXIT_NOP() macro contains minimal code required + * to prevent such merging of critical sections in QF ports, + * in which it can occur. + */ + QF_CRIT_EXIT_NOP(); + } + } + QF_CRIT_E_(); /* re-enter crit. section to continue */ +} +QF_CRIT_X_(); + + + /*! Processes one clock tick for QUTest */ + + + + + /*! Returns 'true' if there are no armed time events at a given tick rate. +* @static @public @memberof QTimeEvt +* +* @details +* Find out if any time events are armed at the given clock tick rate. +* +* @param[in] tickRate system clock tick rate to find out about. +* +* @returns +* 'true' if no time events are armed at the given tick rate and +* 'false' otherwise. +* +* @note +* This function should be called in critical section. +*/ + + /*! @pre the tick rate must be in range */ +Q_REQUIRE_ID(200, tickRate < QF_MAX_TICK_RATE); + +bool inactive; +if (QTimeEvt_timeEvtHead_[tickRate].next != (QTimeEvt *)0) { + inactive = false; +} +else if ((QTimeEvt_timeEvtHead_[tickRate].act != (void *)0)) { + inactive = false; +} +else { + inactive = true; +} +return inactive; + + + + /*! @brief "Ticker" Active Object class +* @class QTicker +* @extends QActive +* +* @details +* QTicker is an efficient active object specialized to process QF system +* clock tick at a specified tick rate [0..#QF_MAX_TICK_RATE]. +* Placing system clock tick processing in an active object allows you +* to remove the non-deterministic QTIMEEVT_TICK_X() processing from the +* interrupt level and move it into the thread-level, where you can prioritize +* it as low as you wish. +* +* @usage +* The following example illustrates use of QTicker active objects: +* @include qf_ticker.c +*/ + + /*! Constructor of the QTicker Active Object class +* @public @memberof QTicker +*/ + + static QActiveVtable const vtable = { /* QActive virtual table */ + { &QTicker_init_, + &QTicker_dispatch_ +#ifdef Q_SPY + ,&QHsm_getStateHandler_ +#endif + }, + &QActive_start_, + &QTicker_post_, + &QTicker_postLIFO_ +}; +QActive_ctor(&me->super, Q_STATE_CAST(0)); /* superclass' ctor */ +me->super.super.vptr = &vtable.super; /* hook the vptr */ + +/* reuse eQueue.head for tick-rate */ +me->super.eQueue.head = (QEQueueCtr)tickRate; + + + /*! initialization (override) +* @private @memberof QTicker +*/ + + + + Q_UNUSED_PAR(me); +Q_UNUSED_PAR(par); +Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + +QTICKER_CAST_(me)->eQueue.tail = 0U; + + + /*! dispatching (override) +* @private @memberof QTicker +*/ + + + + QEQueueCtr nTicks; /* # ticks since the last call */ +QF_CRIT_STAT_ + +Q_UNUSED_PAR(e); +Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + +QF_CRIT_E_(); +nTicks = QTICKER_CAST_(me)->eQueue.tail; /* save the # of ticks */ +QTICKER_CAST_(me)->eQueue.tail = 0U; /* clear the # ticks */ +QF_CRIT_X_(); + +for (; nTicks > 0U; --nTicks) { + QTimeEvt_tick_((uint_fast8_t)QTICKER_CAST_(me)->eQueue.head, me); +} + + + /*! post (override) +* @private @memberof QTicker +*/ + + + + + Q_UNUSED_PAR(e); +Q_UNUSED_PAR(margin); +Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ + +QF_CRIT_STAT_ +QF_CRIT_E_(); +if (me->eQueue.frontEvt == (QEvt *)0) { + + static QEvt const tickEvt = { 0U, 0U, 0U }; + me->eQueue.frontEvt = &tickEvt; /* deliver event directly */ + --me->eQueue.nFree; /* one less free event */ + + QACTIVE_EQUEUE_SIGNAL_(me); /* signal the event queue */ +} + +++me->eQueue.tail; /* account for one more tick event */ + +QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(0U); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(0U, 0U); /* pool Id & refCtr of the evt */ + QS_EQC_PRE_(0U); /* number of free entries */ + QS_EQC_PRE_(0U); /* min number of free entries */ +QS_END_NOCRIT_PRE_() + +QF_CRIT_X_(); + +return true; /* the event is always posted correctly */ + + + /*! post-LIFO (override) +* @private @memberof QTicker +*/ + + + Q_UNUSED_PAR(me); +Q_UNUSED_PAR(e); + +Q_ERROR_ID(900); + + + + /*! @brief Native QF Event Queue +* @class QEQueue +* +* @details +* This class describes the native QF event queue, which can be used as +* the event queue for active objects, or as a simple "raw" event queue for +* thread-safe event passing among non-framework entities, such as ISRs, +* device drivers, or other third-party components.<br> +* +* The native QF event queue is configured by defining the macro +* #QF_EQUEUE_TYPE as ::QEQueue in the specific QF port header file.<br> +* <br> +* The ::QEQueue structure contains only data members for managing an event +* queue, but does not contain the storage for the queue buffer, which must +* be provided externally during the queue initialization.<br> +* <br> +* The event queue can store only event pointers, not the whole events. The +* internal implementation uses the standard ring-buffer plus one external +* location that optimizes the queue operation for the most frequent case +* of empty queue.<br> +* <br> +* The ::QEQueue structure is used with two sets of functions. One set is for +* the active object event queue, which might need to block the active object +* task when the event queue is empty and might need to unblock it when +* events are posted to the queue. The interface for the native active object +* event queue consists of the following functions: QActive_post(), +* QActive_postLIFO(), and QActive_get_(). Additionally the function +* QEQueue_init() is used to initialize the queue.<br> +* <br> +* The other set of functions, uses ::QEQueue as a simple "raw" event +* queue to pass events between entities other than active objects, such as +* ISRs. The "raw" event queue is not capable of blocking on the get() +* operation, but is still thread-safe because it uses QF critical section +* to protect its integrity. The interface for the "raw" thread-safe queue +* consists of the following functions: QEQueue_post(), +* QEQueue_postLIFO(), and QEQueue_get(). Additionally the function +* QEQueue_init() is used to initialize the queue. +* +* <br>ote Most event queue operations (both the active object queues and +* the "raw" queues) internally use the QF critical section. You should be +* careful not to invoke those operations from other critical sections when +* nesting of critical sections is not supported. +* +* @sa ::QEQueue for the description of the data members +*/ + + /*! pointer to event at the front of the queue. +* @private @memberof QEQueue +* +* @details +* All incoming and outgoing events pass through the frontEvt location. +* When the queue is empty (which is most of the time), the extra +* frontEvt location allows to bypass the ring buffer altogether, +* greatly optimizing the performance of the queue. Only bursts of events +* engage the ring buffer. +* +* <br>ote The additional role of this attribute is to indicate the empty +* status of the queue. The queue is empty when frontEvt is NULL. +*/ + + + /*! pointer to the start of the ring buffer +* @private @memberof QEQueue +*/ + + + /*! offset of the end of the ring buffer from the start of the buffer +* @private @memberof QEQueue +*/ + + + /*! offset to where next event will be inserted into the buffer +* @private @memberof QEQueue +*/ + + + /*! offset of where next event will be extracted from the buffer +* @private @memberof QEQueue +*/ + + + /*! number of free events in the ring buffer +* @private @memberof QEQueue +*/ + + + /*! Minimum number of free events ever in the ring buffer. +* @private @memberof QEQueue +* +* @details +* This attribute remembers the low-watermark of the ring buffer, +* which provides a valuable information for sizing event queues. +* @sa QF_getQueueMargin(). +*/ + + + /*! Initialize the native QF event queue. +* @public @memberof QEQueue +* +* @details +* Initialize the event queue by giving it the storage for the ring buffer. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] qSto an array of pointers to ::QEvt to sereve as the +* ring buffer for the event queue +* @param[in] qLen the length of the @p qSto buffer (in ::QEvt pointers) +* +* @note The actual capacity of the queue is qLen + 1, because of the extra +* location forntEvt. +* +* @note +* This function is also used to initialize the event queues of active +* objects in the built-int QV and QK kernels, as well as other +* QP ports to OSes/RTOSes that do provide a suitable message queue. +*/ + + + me->frontEvt = (QEvt *)0; /* no events in the queue */ +me->ring = qSto; /* the beginning of the ring buffer */ +me->end = (QEQueueCtr)qLen; +if (qLen != 0U) { + me->head = 0U; + me->tail = 0U; +} +me->nFree = (QEQueueCtr)(qLen + 1U); /* +1 for frontEvt */ +me->nMin = me->nFree; + + + /*! Post an event to the "raw" thread-safe event queue (FIFO). +* @public @memberof QEQueue +* +* @details +* Post an event to the "raw" thread-safe event queue using the +* First-In-First-Out (FIFO) order. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be posted to the queue +* @param[in] margin number of required free slots in the queue after +* posting the event. The special value #QF_NO_MARGIN +* means that this function will assert if posting +* @note +* The #QF_NO_MARGIN value of the @p margin parameter is special and +* denotes situation when the post() operation is assumed to succeed (event +* delivery guarantee). An assertion fires, when the event cannot be +* delivered in this case. +* +* @returns 'true' (success) when the posting succeeded with the provided +* margin and 'false' (failure) when the posting fails. +* +* @note This function can be called from any task context or ISR context. +* +* @sa QEQueue_postLIFO(), QEQueue_get() +*/ + + + + /* @pre event must be valid */ +Q_REQUIRE_ID(200, e != (QEvt *)0); + +(void)qs_id; /* unused parameter (outside Q_SPY build configuration) */ + +QF_CRIT_STAT_ +QF_CRIT_E_(); +QEQueueCtr nFree = me->nFree; /* get volatile into the temporary */ + +/* required margin available? */ +bool status; +if (((margin == QF_NO_MARGIN) && (nFree > 0U)) + || (nFree > (QEQueueCtr)margin)) +{ + /* is it a dynamic event? */ + if (e->poolId_ != 0U) { + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ + } + + --nFree; /* one free entry just used up */ + me->nFree = nFree; /* update the volatile */ + if (me->nMin > nFree) { + me->nMin = nFree; /* update minimum so far */ + } + + QS_BEGIN_NOCRIT_PRE_(QS_QF_EQUEUE_POST, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this queue object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_EQC_PRE_(me->nMin); /* min number of free entries */ + QS_END_NOCRIT_PRE_() + + /* was the queue empty? */ + if (me->frontEvt == (QEvt *)0) { + me->frontEvt = e; /* deliver event directly */ + } + /* queue was not empty, insert event into the ring-buffer */ + else { + /* insert event into the ring buffer (FIFO)... */ + me->ring[me->head] = e; /* insert e into buffer */ + /* need to wrap the head? */ + if (me->head == 0U) { + me->head = me->end; /* wrap around */ + } + --me->head; + } + status = true; /* event posted successfully */ +} +else { + /*! @note assert if event cannot be posted and dropping events is + * not acceptable + */ + Q_ASSERT_CRIT_(210, margin != QF_NO_MARGIN); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_EQUEUE_POST_ATTEMPT, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this queue object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_EQC_PRE_(margin); /* margin requested */ + QS_END_NOCRIT_PRE_() + + status = false; +} +QF_CRIT_X_(); + +return status; + + + /*! Post an event to the "raw" thread-safe event queue (LIFO). +* @public @memberof QEQueue +* +* @details +* Post an event to the "raw" thread-safe event queue using the +* Last-In-First-Out (LIFO) order. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be posted to the queue +* +* @attention +* The LIFO policy should be used only with great __caution__, because +* it alters the order of events in the queue. +* +* @note +* This function can be called from any task context or ISR context. +* +* @note +* this function is used for the "raw" thread-safe queues and __not__ +* for the queues of active objects. +* +* @sa +* QEQueue_post(), QEQueue_get(), QActive_defer() +*/ + + + (void)qs_id; /* unused parameter, if Q_SPY not defined */ + +QF_CRIT_STAT_ +QF_CRIT_E_(); +QEQueueCtr nFree = me->nFree; /* get volatile into the temporary */ + +/*! @pre the queue must be able to accept the event (cannot overflow) */ +Q_REQUIRE_CRIT_(300, nFree != 0U); + +/* is it a dynamic event? */ +if (e->poolId_ != 0U) { + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ +} + +--nFree; /* one free entry just used up */ +me->nFree = nFree; /* update the volatile */ +if (me->nMin > nFree) { + me->nMin = nFree; /* update minimum so far */ +} + +QS_BEGIN_NOCRIT_PRE_(QS_QF_EQUEUE_POST_LIFO, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this queue object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_);/* pool Id & ref Count of event */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_EQC_PRE_(me->nMin); /* min number of free entries */ +QS_END_NOCRIT_PRE_() + +QEvt const * const frontEvt = me->frontEvt; /* read volatile into temp */ +me->frontEvt = e; /* deliver event directly to the front of the queue */ + +/* was the queue not empty? */ +if (frontEvt != (QEvt *)0) { + ++me->tail; + if (me->tail == me->end) { /* need to wrap the tail? */ + me->tail = 0U; /* wrap around */ + } + me->ring[me->tail] = frontEvt; /* save old front evt */ +} +QF_CRIT_X_(); + + + /*! Obtain an event from the "raw" thread-safe queue. +* @public @memberof QEQueue +* +* @details +* Retrieves an event from the front of the "raw" thread-safe queue and +* returns a pointer to this event to the caller. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* pointer to event at the front of the queue, if the queue is +* not empty and NULL if the queue is empty. +* +* @note +* this function is used for the "raw" thread-safe queues and __not__ +* for the queues of active objects. +* +* @sa +* QEQueue_post(), QEQueue_postLIFO(), QActive_recall() +*/ + + (void)qs_id; /* unused parameter (outside Q_SPY build configuration) */ + +QF_CRIT_STAT_ +QF_CRIT_E_(); +QEvt const * const e = me->frontEvt; /* remove event from the front */ + +/* was the queue not empty? */ +if (e != (QEvt *)0) { + /* use a temporary variable to increment volatile me->nFree */ + QEQueueCtr const nFree = me->nFree + 1U; + me->nFree = nFree; /* update the number of free */ + + /* any events in the ring buffer? */ + if (nFree <= me->end) { + me->frontEvt = me->ring[me->tail]; /* get from tail */ + if (me->tail == 0U) { /* need to wrap the tail? */ + me->tail = me->end; /* wrap around */ + } + --me->tail; + + QS_BEGIN_NOCRIT_PRE_(QS_QF_EQUEUE_GET, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this queue object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_);/* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_END_NOCRIT_PRE_() + } + else { + me->frontEvt = (QEvt *)0; /* queue becomes empty */ + + /* all entries in the queue must be free (+1 for fronEvt) */ + Q_ASSERT_CRIT_(410, nFree == (me->end + 1U)); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_EQUEUE_GET_LAST, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this queue object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_END_NOCRIT_PRE_() + } +} +QF_CRIT_X_(); +return e; + + + const + /*! "raw" thread-safe QF event queue operation for obtaining the number +* of free entries still available in the queue. +* @public @memberof QEQueue +* +* @details +* This operation needs to be used with caution because the number of free +* entries can change unexpectedly. The main intent for using this operation +* is in conjunction with event deferral. In this case the queue is accessed +* only from a single thread (by a single AO), so the number of free +* entries cannot change unexpectedly. +* +* @param[in] me pointer (see @ref oop) +* +* @returns the current number of free slots in the queue. +*/ + return me->nFree; + + + const + /*! "raw" thread-safe QF event queue operation for obtaining the minimum +* number of free entries ever in the queue (a.k.a. "low-watermark"). +* @public @memberof QEQueue +* +* @details +* This operation needs to be used with caution because the "low-watermark" +* can change unexpectedly. The main intent for using this operation is to +* get an idea of queue usage to size the queue adequately. +* +* @param[in] me pointer (see @ref oop) +* +* @returns the minimum number of free entries ever in the queue since init. +*/ + return me->nMin; + + + const + /*! "raw" thread-safe QF event queue operation to find out if the queue +* is empty. +* @public @memberof QEQueue +* +* @details +* This operation needs to be used with caution because the queue status +* can change unexpectedly. The main intent for using this operation is in +* conjunction with event deferral. In this case the queue is accessed only +* from a single thread (by a single AO), so no other entity can post +* events to the queue. +* +* @param[in] me_ pointer (see @ref oop) +* +* @returns 'true' if the queue is current empty and 'false' otherwise. +*/ + return me->frontEvt == (QEvt *)0; + + + + /*! @brief Native QF Memory Pool +* @class QMPool +* +* @details +* A fixed block-size memory pool is a very fast and efficient data +* structure for dynamic allocation of fixed block-size chunks of memory. +* A memory pool offers fast and deterministic allocation and recycling of +* memory blocks and is not subject to fragmenation.<br> +* +* The ::QMPool class describes the native QF memory pool, which can be used as +* the event pool for dynamic event allocation, or as a fast, deterministic +* fixed block-size heap for any other objects in your application. +* +* @note +* ::QMPool contains only data members for managing a memory pool, but +* does not contain the pool storage, which must be provided externally +* during the pool initialization. +* +* @note +* The native QF event pool is configured by defining the macro +* #QF_EPOOL_TYPE_ as ::QMPool in the specific QF port header file. +*/ + + /*! start of the memory managed by this memory pool +* @private @memberof QMPool +*/ + + + /*! end of the memory managed by this memory pool +* @private @memberof QMPool +*/ + + + /*! head of linked list of free blocks +* @private @memberof QMPool +*/ + + + /*! maximum block size (in bytes) +* @private @memberof QMPool +*/ + + + /*! total number of blocks +* @private @memberof QMPool +*/ + + + /*! number of free blocks remaining +* @private @memberof QMPool +*/ + + + /*! minimum number of free blocks ever present in this pool +* @private @memberof QMPool +* +* @details +* this attribute remembers the low watermark of the pool, which +* provides a valuable information for sizing event pools. +* @sa QF_getPoolMin(). +*/ + + + /*! Initializes the native QF memory pool +* @public @memberof QMPool +* +* @details +* Initialize a fixed block-size memory pool by providing it with the pool +* memory to manage, size of this memory, and the block size. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] poolSto pointer to the memory buffer for pool storage +* @param[in] poolSize size of the storage buffer in bytes +* @param[in] blockSize fixed-size of the memory blocks in bytes +* +* @attention +* The caller of QMPool::init() must make sure that the @p poolSto +* pointer is properly **aligned**. In particular, it must be possible to +* efficiently store a pointer at the location pointed to by @p poolSto. +* Internally, the QMPool_init() function rounds up the block size +* @p blockSize so that it can fit an integer number of pointers. +* This is done to achieve proper alignment of the blocks within the pool. +* +* @note +* Due to the rounding of block size the actual capacity of the pool might +* be less than (@p poolSize / @p blockSize). You can check the capacity +* of the pool by calling the QF_getPoolMin() function. +* +* @note +* This function is **not** protected by a critical section, because +* it is intended to be called only during the initialization of the system, +* when interrupts are not allowed yet. +* +* @note +* Many QF ports use memory pools to implement the event pools. +* +* @usage +* The following example illustrates how to invoke QMPool_init(): +* @include qmp_init.c +*/ + + + + /*! @pre The memory block must be valid +* and the poolSize must fit at least one free block +* and the blockSize must not be too close to the top of the dynamic range +*/ +Q_REQUIRE_ID(100, (poolSto != (void *)0) + && (poolSize >= (uint_fast32_t)sizeof(QFreeBlock)) + && ((uint_fast16_t)(blockSize + sizeof(QFreeBlock)) > blockSize)); + +me->free_head = poolSto; + +/* round up the blockSize to fit an integer # free blocks, no division */ +me->blockSize = (QMPoolSize)sizeof(QFreeBlock); /* start with just one */ + +/* #free blocks that fit in one memory block */ +uint_fast16_t nblocks = 1U; +while (me->blockSize < (QMPoolSize)blockSize) { + me->blockSize += (QMPoolSize)sizeof(QFreeBlock); + ++nblocks; +} +blockSize = (uint_fast16_t)me->blockSize; /* round-up to nearest block */ + +/* the pool buffer must fit at least one rounded-up block */ +Q_ASSERT_ID(110, poolSize >= blockSize); + +/* chain all blocks together in a free-list... */ +poolSize -= (uint_fast32_t)blockSize; /* don't count the last block */ +me->nTot = 1U; /* the last block already in the pool */ + +/* start at the head of the free list */ +QFreeBlock *fb = (QFreeBlock *)me->free_head; + +/* chain all blocks together in a free-list... */ +while (poolSize >= (uint_fast32_t)blockSize) { + fb->next = &fb[nblocks]; /* point next link to next block */ + fb = fb->next; /* advance to the next block */ + poolSize -= (uint_fast32_t)blockSize; /* reduce available pool size */ + ++me->nTot; /* increment the number of blocks so far */ +} + +fb->next = (QFreeBlock *)0; /* the last link points to NULL */ +me->nFree = me->nTot; /* all blocks are free */ +me->nMin = me->nTot; /* the minimum number of free blocks */ +me->start = poolSto; /* the original start this pool buffer */ +me->end = fb; /* the last block in this pool */ + + + /*! Obtains a memory block from a memory pool. +* @public @memberof QMPool +* +* @details +* The function allocates a memory block from the pool and returns a pointer +* to the block back to the caller. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] margin the minimum number of unused blocks still available +* in the pool after the allocation. +* +* @returns +* A pointer to a memory block or NULL if no more blocks are available in +* the memory pool. +* +* @note +* This function can be called from any task level or ISR level. +* +* @note +* The memory pool @p me must be initialized before any events can +* be requested from it. Also, the QMPool_get() function uses internally a +* QF critical section, so you should be careful not to call it from within +* a critical section when nesting of critical section is not supported. +* +* @attention +* An allocated block must be later returned back to the **same** pool +* from which it has been allocated. +* +* @sa QMPool_put() +* +* @usage +* The following example illustrates how to use QMPool_get(): +* @include qmp_use.c +*/ + + + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +/* have more free blocks than the requested margin? */ +QFreeBlock *fb; +if (me->nFree > (QMPoolCtr)margin) { + void *fb_next; + fb = (QFreeBlock *)me->free_head; /* get a free block */ + + /* the pool has some free blocks, so a free block must be available */ + Q_ASSERT_CRIT_(310, fb != (QFreeBlock *)0); + + fb_next = fb->next; /* put volatile to a temporary to avoid UB */ + + /* is the pool becoming empty? */ + --me->nFree; /* one less free block */ + if (me->nFree == 0U) { + /* pool is becoming empty, so the next free block must be NULL */ + Q_ASSERT_CRIT_(320, fb_next == (QFreeBlock *)0); + + me->nMin = 0U; /* remember that the pool got empty */ + } + else { + /* pool is not empty, so the next free block must be in range + * + * NOTE: the next free block pointer can fall out of range + * when the client code writes past the memory block, thus + * corrupting the next block. + */ + Q_ASSERT_CRIT_(330, QF_PTR_RANGE_(fb_next, me->start, me->end)); + + /* is the number of free blocks the new minimum so far? */ + if (me->nMin > me->nFree) { + me->nMin = me->nFree; /* remember the new minimum */ + } + } + + me->free_head = fb_next; /* set the head to the next free block */ + + QS_BEGIN_NOCRIT_PRE_(QS_QF_MPOOL_GET, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(me); /* this memory pool */ + QS_MPC_PRE_(me->nFree); /* # of free blocks in the pool */ + QS_MPC_PRE_(me->nMin); /* min # free blocks ever in the pool */ + QS_END_NOCRIT_PRE_() +} +/* don't have enough free blocks at this point */ +else { + fb = (QFreeBlock *)0; + + QS_BEGIN_NOCRIT_PRE_(QS_QF_MPOOL_GET_ATTEMPT, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(me); /* this memory pool */ + QS_MPC_PRE_(me->nFree); /* # of free blocks in the pool */ + QS_MPC_PRE_(margin); /* the requested margin */ + QS_END_NOCRIT_PRE_() +} +QF_CRIT_X_(); + +return fb; /* return the block or NULL pointer to the caller */ + + + /*! Recycles a memory block back to a memory pool. +* @public @memberof QMPool +* +* @details +* Recycle a memory block to the fixed block-size memory pool. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] b pointer to the memory block that is being recycled +* +* @attention +* The recycled block must be allocated from the **same** memory pool +* to which it is returned. +* +* @note +* This function can be called from any task level or ISR level. +* +* @sa +* QMPool_get() +* +* @usage +* The following example illustrates how to use QMPool_put(): +* @include qmp_use.c +*/ + + + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + +/*! @pre # free blocks cannot exceed the total # blocks and +* the block pointer must be from this pool. +*/ +Q_REQUIRE_ID(200, (me->nFree < me->nTot) + && QF_PTR_RANGE_(b, me->start, me->end)); + +QF_CRIT_STAT_ +QF_CRIT_E_(); +((QFreeBlock *)b)->next = (QFreeBlock *)me->free_head;/* link into list */ +me->free_head = b; /* set as new head of the free list */ +++me->nFree; /* one more free block in this pool */ + +QS_BEGIN_NOCRIT_PRE_(QS_QF_MPOOL_PUT, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(me); /* this memory pool */ + QS_MPC_PRE_(me->nFree); /* the number of free blocks in the pool */ +QS_END_NOCRIT_PRE_() + +QF_CRIT_X_(); + + + + + /*! @brief QF active object framework +* @class QF +*/ + { + uint8_t dummy; /*< dummy attribute */ +} QF; + + + /*! Interrupt nesting up-down counter (used in QF ports ) +* @static @private @memberof QF +*/ + + + /*! QF initialization +* @static @public @memberof QF +* +* @details +* Initializes QF and must be called exactly once before any other QF +* function. Typcially, QF_init() is called from main() even before +* initializing the Board Support Package (BSP). +* +* @note +* QF_init() clears the internal QF variables, so that the framework +* can start correctly even if the startup code fails to clear the +* uninitialized data (as is required by the C Standard). +*/ + + + /*! Function invoked by the application layer to stop the QF +* application and return control to the OS/Kernel. +* @static @public @memberof QF +* +* @details +* This function stops the QF application. After calling this function, +* QF attempts to gracefully stop the application. This graceful shutdown +* might take some time to complete. The typical use of this function is +* for terminating the QF application to return back to the operating +* system or for handling fatal errors that require shutting down +* (and possibly re-setting) the system. +* +* @attention +* After calling QF_stop() the application must terminate and cannot +* continue. In particular, QF_stop() is **not** intended to be followed +* by a call to QF_init() to "resurrect" the application. +* +* @sa QF_onCleanup() +*/ + + + /*! Transfers control to QF to run the application. +* @static @public @memberof QF +* +* @details +* QF_run() is typically called from your startup code after you initialize +* the QF and start at least one active object with QACTIVE_START(). +* +* @returns +* In QK, the QF_run() does not return. +*/ + + + /*! initialization of publish-subscribe +* +* @deprecated +* @sa QActive_psInit() +*/ + + + QActive_psInit(subscrSto, maxSignal); + + + /*! This function returns the minimum of free entries of +* the given event queue. +* @static @public @memberof QF +* +* @details +* Queries the minimum of free ever present in the given event queue of +* an active object with priority @p prio, since the active object +* was started. +* +* @note +* This function is available only when the native QF event queue +* implementation is used. Requesting the queue minimum of an unused +* priority level raises an assertion in the QF. (A priority level becomes +* used in QF after the call to the QActive_register_() function.) +* +* @param[in] prio Priority of the active object, whose queue is queried +* +* @returns +* the minimum of free ever present in the given event queue of an active +* object with priority @p prio, since the active object was started. +*/ + + Q_REQUIRE_ID(400, (prio <= QF_MAX_ACTIVE) + && (QActive_registry_[prio] != (QActive *)0)); +QF_CRIT_STAT_ +QF_CRIT_E_(); +uint_fast16_t const min = + (uint_fast16_t)QActive_registry_[prio]->eQueue.nMin; +QF_CRIT_X_(); + +return min; + + + /*! Startup QF callback. +* @static @public @memberof QF +* +* @details +* The timeline for calling QF_onStartup() depends on the particular +* QF port. In most cases, QF_onStartup() is called from QF_run(), right +* before starting any multitasking kernel or the background loop. +*/ + + + /*! Cleanup QF callback. +* @static @public @memberof QF +* +* @details +* QF_onCleanup() is called in some QF ports before QF returns to the +* underlying operating system or RTOS. +* +* This function is strongly platform-specific and is not implemented in +* the QF, but either in the QF port or in the Board Support Package (BSP) +* for the given application. Some QF ports might not require implementing +* QF_onCleanup() at all, because many embedded applications don't have +* anything to exit to. +* +* @sa QF_stop() +*/ + + + + + /*! Event pool initialization for dynamic allocation of events. +* @static @public @memberof QF +* +* @details +* This function initializes one event pool at a time and must be called +* exactly once for each event pool before the pool can be used. +* +* @param[in] poolSto pointer to the storage for the event pool +* @param[in] poolSize size of the storage for the pool in bytes +* @param[in] evtSize the block-size of the pool in bytes, which determines +* the maximum size of events that can be allocated from the pool. +* +* @attention +* You might initialize many event pools by making many consecutive calls +* to the QF_poolInit() function. However, for the simplicity of the internal +* implementation, you must initialize event pools in the **ascending order** +* of the event size. +* +* Many RTOSes provide fixed block-size heaps, a.k.a. memory pools that can +* be adapted for QF event pools. In case such support is missing, QF provides +* a native QF event pool implementation. The macro #QF_EPOOL_TYPE_ determines +* the type of event pool used by a particular QF port. See structure ::QMPool +* for more information. +* +* @note The actual number of events available in the pool might be actually +* less than (@p poolSize / @p evtSize) due to the internal alignment +* of the blocks that the pool might perform. You can always check the +* capacity of the pool by calling QF_getPoolMin(). +* +* @note The dynamic allocation of events is optional, meaning that you +* might choose not to use dynamic events. In that case calling QF_poolInit() +* and using up memory for the memory blocks is unnecessary. +* +* @sa QF initialization example for QF_init() +*/ + + + + /*! @pre cannot exceed the number of available memory pools */ +Q_REQUIRE_ID(200, QF_maxPool_ < QF_MAX_EPOOL); + +/*! @pre please initialize event pools in ascending order of evtSize: */ +Q_REQUIRE_ID(201, (QF_maxPool_ == 0U) + || (QF_EPOOL_EVENT_SIZE_(QF_ePool_[QF_maxPool_ - 1U]) + < evtSize)); + +/* perform the platform-dependent initialization of the pool */ +QF_EPOOL_INIT_(QF_ePool_[QF_maxPool_], poolSto, poolSize, evtSize); +++QF_maxPool_; /* one more pool */ + +#ifdef Q_SPY +/* generate the object-dictionary entry for the initialized pool */ +{ + uint8_t obj_name[9] = "EvtPool?"; + obj_name[7] = (uint8_t)(((uint8_t)'0' + QF_maxPool_) & 0x7FU); + QS_obj_dict_pre_(&QF_ePool_[QF_maxPool_ - 1U], (char const *)obj_name); +} +#endif /* Q_SPY*/ + + + /*! Obtain the block size of any registered event pools. +* @static @public @memberof QF +* +* @details +* Obtain the block size of any registered event pools +*/ + return QF_EPOOL_EVENT_SIZE_(QF_ePool_[QF_maxPool_ - 1U]); + + + /*! Obtain the minimum of free entries of the given event pool. +* @static @public @memberof QF +* +* @details +* This function obtains the minimum number of free blocks in the given +* event pool since this pool has been initialized by a call to QF_poolInit(). +* +* @param[in] poolId event pool ID in the range 1..QF_maxPool_, where +* QF_maxPool_ is the number of event pools initialized +* with the function QF_poolInit(). +* +* @returns +* the minimum number of unused blocks in the given event pool. +*/ + + /*! @pre the poolId must be in range */ +Q_REQUIRE_ID(400, (poolId <= QF_MAX_EPOOL) + && (0U < poolId) && (poolId <= QF_maxPool_)); + +QF_CRIT_STAT_ +QF_CRIT_E_(); +uint_fast16_t const min = (uint_fast16_t)QF_ePool_[poolId - 1U].nMin; +QF_CRIT_X_(); + +return min; + + + /*! Internal QF implementation of creating new dynamic event. +* @static @private @memberof QF +* +* @details +* Allocates an event dynamically from one of the QF event pools. +* +* @param[in] evtSize the size (in bytes) of the event to allocate +* @param[in] margin the number of un-allocated events still available +* in a given event pool after the allocation completes. +* The special value ::QF_NO_MARGIN means that this function +* will assert if allocation fails. +* @param[in] sig the signal to be assigned to the allocated event +* +* @returns +* pointer to the newly allocated event. This pointer can be NULL only if +* margin != #QF_NO_MARGIN and the event cannot be allocated with the +* specified margin still available in the given pool. +* +* @note +* The internal QF function QF_newX_() raises an assertion when the +* @p margin parameter is #QF_NO_MARGIN and allocation of the event turns +* out to be impossible due to event pool depletion, or incorrect (too big) +* size of the requested event. +* +* @note +* The application code should not call this function directly. +* The only allowed use is thorough the macros Q_NEW() or Q_NEW_X(). +*/ + + + + uint_fast8_t idx; + +/* find the pool index that fits the requested event size ... */ +for (idx = 0U; idx < QF_maxPool_; ++idx) { + if (evtSize <= QF_EPOOL_EVENT_SIZE_(QF_ePool_[idx])) { + break; + } +} +/* cannot run out of registered pools */ +Q_ASSERT_ID(310, idx < QF_maxPool_); + +/* get e -- platform-dependent */ +QEvt *e; + +#ifdef Q_SPY +QF_EPOOL_GET_(QF_ePool_[idx], e, + ((margin != QF_NO_MARGIN) ? margin : 0U), + (uint_fast8_t)QS_EP_ID + idx + 1U); +#else +QF_EPOOL_GET_(QF_ePool_[idx], e, + ((margin != QF_NO_MARGIN) ? margin : 0U), 0U); +#endif + +/* was e allocated correctly? */ +QS_CRIT_STAT_ +if (e != (QEvt *)0) { + e->sig = (QSignal)sig; /* set signal for this event */ + e->poolId_ = (uint8_t)(idx + 1U); /* store the pool ID */ + e->refCtr_ = 0U; /* set the reference counter to 0 */ + + QS_BEGIN_PRE_(QS_QF_NEW, (uint_fast8_t)QS_EP_ID + e->poolId_) + QS_TIME_PRE_(); /* timestamp */ + QS_EVS_PRE_(evtSize); /* the size of the event */ + QS_SIG_PRE_(sig); /* the signal of the event */ + QS_END_PRE_() +} +/* event cannot be allocated */ +else { + /* This assertion means that the event allocation failed, + * and this failure cannot be tolerated. The most frequent + * reason is an event leak in the application. + */ + Q_ASSERT_ID(320, margin != QF_NO_MARGIN); + + QS_BEGIN_PRE_(QS_QF_NEW_ATTEMPT, (uint_fast8_t)QS_EP_ID + idx + 1U) + QS_TIME_PRE_(); /* timestamp */ + QS_EVS_PRE_(evtSize); /* the size of the event */ + QS_SIG_PRE_(sig); /* the signal of the event */ + QS_END_PRE_() +} +return e; /* can't be NULL if we can't tolerate failed allocation */ + + + /*! Recycle a dynamic event +* @static @private @memberof QF +* +* @details +* This function implements a simple garbage collector for the dynamic events. +* Only dynamic events are candidates for recycling. (A dynamic event is one +* that is allocated from an event pool, which is determined as non-zero +* e->poolId_ attribute.) Next, the function decrements the reference counter +* of the event (e->refCtr_), and recycles the event only if the counter drops +* to zero (meaning that no more references are outstanding for this event). +* The dynamic event is recycled by returning it to the pool from which +* it was originally allocated. +* +* @param[in] e pointer to the event to recycle +* +* @note +* QF invokes the garbage collector at all appropriate contexts, when +* an event can become garbage (automatic garbage collection), so the +* application code should have no need to call QF_gc() directly. The QF_gc() +* function is exposed only for special cases when your application sends +* dynamic events to the "raw" thread-safe queues (see ::QEQueue). Such +* queues are processed outside of QF and the automatic garbage collection +* is **NOT** performed for these events. In this case you need to call +* QF_gc() explicitly. +*/ + + /* is it a dynamic event? */ +if (e->poolId_ != 0U) { + QF_CRIT_STAT_ + QF_CRIT_E_(); + + /* isn't this the last reference? */ + if (e->refCtr_ > 1U) { + + QS_BEGIN_NOCRIT_PRE_(QS_QF_GC_ATTEMPT, + (uint_fast8_t)QS_EP_ID + e->poolId_) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_END_NOCRIT_PRE_() + + QF_EVT_REF_CTR_DEC_(e); /* decrement the ref counter */ + + QF_CRIT_X_(); + } + /* this is the last reference to this event, recycle it */ + else { + uint_fast8_t const idx = (uint_fast8_t)e->poolId_ - 1U; + + QS_BEGIN_NOCRIT_PRE_(QS_QF_GC, + (uint_fast8_t)QS_EP_ID + e->poolId_) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_END_NOCRIT_PRE_() + + QF_CRIT_X_(); + + /* pool ID must be in range */ + Q_ASSERT_ID(410, idx < QF_maxPool_); + + /* cast 'const' away, which is OK, because it's a pool event */ +#ifdef Q_SPY + QF_EPOOL_PUT_(QF_ePool_[idx], QF_EVT_CONST_CAST_(e), + (uint_fast8_t)QS_EP_ID + e->poolId_); +#else + QF_EPOOL_PUT_(QF_ePool_[idx], QF_EVT_CONST_CAST_(e), 0U); +#endif + } +} + + + /*! Internal QF implementation of creating new event reference. +* @static @private @memberof QF +* +* @details +* Creates and returns a new reference to the current event e +* +* @param[in] e pointer to the current event +* @param[in] evtRef the event reference +* +* @returns +* the newly created reference to the event `e` +* +* @note +* The application code should not call this function directly. +* The only allowed use is thorough the macro Q_NEW_REF(). +*/ + + + /*! @pre the event must be dynamic and the provided event reference +* must not be already in use */ +Q_REQUIRE_ID(500, + (e->poolId_ != 0U) + && (evtRef == (void *)0)); + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +QF_EVT_REF_CTR_INC_(e); /* increments the ref counter */ + +QS_BEGIN_NOCRIT_PRE_(QS_QF_NEW_REF, + (uint_fast8_t)QS_EP_ID + e->poolId_) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ +QS_END_NOCRIT_PRE_() + +QF_CRIT_X_(); + +return e; + + + /*! Internal QF implementation of deleting event reference. +* @static @private @memberof QF +* +* @details +* Deletes an existing reference to the event e +* +* @param[in] evtRef the event reference +* +* @note +* The application code should not call this function directly. +* The only allowed use is thorough the macro Q_DELETE_REF(). +*/ + + QS_CRIT_STAT_ +QEvt const * const e = (QEvt const *)evtRef; + +QS_BEGIN_PRE_(QS_QF_DELETE_REF, + (uint_fast8_t)QS_EP_ID + e->poolId_) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ +QS_END_PRE_() + +QF_gc(e); + + + + + /*! "Ready-set" of all threads used in the built-in kernels +* @static @private @memberof QF +*/ + + + /*! array of event pools managed by QF */ + + + /*! number of initialized event pools */ + + + /*! Clear a specified region of memory to zero. +* @static @public @memberof QF +* +* @details +* Clears a memory buffer by writing zeros byte-by-byte. +* +* @param[in] start pointer to the beginning of a memory buffer. +* @param[in] len length of the memory buffer to clear (in bytes) +* +* @note The main application of this function is clearing the internal QF +* variables upon startup. This is done to avoid problems with non-standard +* startup code provided with some compilers and toolsets (e.g., TI DSPs or +* Microchip MPLAB), which does not zero the uninitialized variables, as +* required by the ANSI C standard. +*/ + + + uint8_t *ptr = (uint8_t *)start; +for (uint_fast16_t n = len; n > 0U; --n) { + *ptr = 0U; + ++ptr; +} + + + + + + Native QF event pool + QMPool + + + Native QF event pool initialization + + + + + \ + (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) + + + Native QF event pool event-size getter + + ((uint_fast16_t)(p_).blockSize) + + + Native QF event pool get-event + + + + + \ + ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) + + + Native QF event pool put-event + + + + \ + (QMPool_put(&(p_), (e_), (qs_id_))) + + + + + /*! The size [bytes] of the QS time stamp. Valid values: 1U, 2U, or 4U; +* default 4U. +* +* @details +* This macro can be defined in the QS port file (qs_port.h) to +* configure the ::QSTimeCtr type. Here the macro is not defined so the +* default of 4 byte is chosen. +*/ + 4U + + + + + + /*! Initialize the QS facility +* +* @details +* This macro provides an indirection layer to invoke the QS initialization +* routine if #Q_SPY is defined, or do nothing if #Q_SPY is not defined. +* @sa QS_onStartup(), example of setting up a QS filter in +* QS_GLB_FILTER() +*/ + + (QS_onStartup(arg_)) + + + /*! Cleanup the QS facility +* +* @details +* This macro provides an indirection layer to invoke the QS cleanup +* routine if #Q_SPY is defined, or do nothing if #Q_SPY is not defined. +* @sa QS_onCleanup() +*/ + (QS_onCleanup()) + + + /*! macro to handle the QS output from the application +* +* @note +* If this macro is used, the application must define QS_output(). +*/ + (QS_output()) + + + /*! macro to handle the QS-RX input to the application +* +* @note +* If this macro is used, the application must define QS_doInput(). +*/ + (QS_rx_input()) + + + /*! Global Filter ON for a given record type `rec_` +* +* @details +* This macro provides an indirection layer to call QS_filterOn() +* if #Q_SPY is defined, or do nothing if #Q_SPY is not defined. +* +* @sa +* - ::QSpyRecordGroups - QS record groups that can be used as `rec_` +* - ::QSpyRecords - individual QS records that can be used as `rec_` +* +* @usage +* The following example shows how to use QS filters: +* @include qs_filter.c +*/ + + (QS_glbFilter_((int_fast16_t)(rec_))) + + + /*! Local Filter for a given state machine object `qs_id` +* +* @details +* This macro provides an indirection layer to call QS_locFilter_() +* if #Q_SPY is defined, or do nothing if #Q_SPY is not defined. +* +* @sa +* - ::QSpyIdGroups - QS ID groups that can be used as `qs_id_` +* - ::QSpyIdOffsets - QS ID offsets for `qs_id_` (e.g., QS_AP_IDS + 5) +* +* The following example shows how to use QS filters: +* @include qs_filter.c +*/ + + (QS_locFilter_((int_fast16_t)(qs_id_))) + + + /*! Begin an application-specific QS record with entering critical section +* +* @details +* The following example shows how to build a user QS record using the +* macros QS_BEGIN_ID(), QS_END(), and the formatted output macros: +* QS_U8(), QS_STR(), etc. +* +* @note +* Must always be used in pair with QS_END() +* +* @include qs_user.c +*/ + + + \ +if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ + QS_CRIT_STAT_ \ + QS_CRIT_E_(); \ + QS_beginRec_((uint_fast8_t)(rec_)); \ + QS_TIME_PRE_(); { + + + /*! End an application-specific QS record with exiting critical section. +* +* @sa example for QS_BEGIN_ID() +* @note Must always be used in pair with QS_BEGIN_ID() +*/ + } \ + QS_endRec_(); \ + QS_CRIT_X_(); \ +} + + + /*! Flush the QS trace data to the host +* +* @details +* This macro invokes the QS_flush() platform-dependent callback +* function to flush the QS trace buffer to the host. The function +* typically busy-waits until all the data in the buffer is sent to +* the host. This is acceptable only in the initial transient. +*/ + (QS_onFlush()) + + + /*! Begin an application-specific QS record WITHOUT entering critical section */ + + + \ +if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ + QS_beginRec_((uint_fast8_t)(rec_)); \ + QS_TIME_PRE_(); { + + + /*! End an application-specific QS record WITHOUT exiting critical section */ + } \ + QS_endRec_();\ +} + + + /*! Helper macro for checking the global QS filter */ + + \ + (((uint_fast8_t)QS_priv_.glbFilter[(uint_fast8_t)(rec_) >> 3U] \ + & ((uint_fast8_t)1U << ((uint_fast8_t)(rec_) & 7U))) != 0U) + + + /*! Helper macro for checking the local QS filter */ + + \ + (((uint_fast8_t)QS_priv_.locFilter[(uint_fast8_t)(qs_id_) >> 3U] \ + & ((uint_fast8_t)1U << ((uint_fast8_t)(qs_id_) & 7U))) != 0U) + + + /*! Macro to execute user code when a QS record is produced +* +* @note +* This is a dummy definition in case this macro is undefined. +*/ + ((void)0) + + + /*! Output formatted int8_t to the QS record */ + + + \ + (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I8_T, (data_))) + + + /*! Output formatted uint8_t to the QS record */ + + + \ + (QS_u8_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U8_T, (data_))) + + + /*! Output formatted int16_t to the QS record */ + + + \ + (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I16_T, (data_))) + + + /*! Output formatted uint16_t to the QS record */ + + + \ + (QS_u16_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U16_T, (data_))) + + + /*! Output formatted int32_t to the QS record */ + + + \ + (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I32_T, (data_))) + + + /*! Output formatted uint32_t to the QS record */ + + + \ + (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U32_T, (data_))) + + + /*! Output formatted int64_t to the QS record */ + + + \ + (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_I64_T, (data_))) + + + /*! Output formatted uint64_t to the QS record */ + + + \ + (QS_u64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_U64_T, (data_))) + + + /*! Output formatted 32-bit floating point number to the QS record */ + + + \ + (QS_f32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F32_T, (data_))) + + + /*! Output formatted 64-bit floating point number to the QS record */ + + + \ + (QS_f64_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)QS_F64_T, (data_))) + + + /*! Output formatted zero-terminated ASCII string to the QS record */ + + (QS_str_fmt_((str_))) + + + /*! Output formatted memory block of up to 255 bytes to the QS record */ + + + (QS_mem_fmt_((mem_), (size_))) + + + /*! Output time stamp to a QS record (used in predefined +* and application-specific trace records) +*/ + (QS_u32_raw_(QS_onGetTime())) + + + (QS_u16_raw_(QS_onGetTime())) + + + (QS_u8_raw_(QS_onGetTime())) + + + /*! Output formatted object pointer to the QS record */ + + (QS_u32_fmt_(QS_OBJ_T, (uint32_t)(obj_))) + + + + (QS_u16_fmt_(QS_OBJ_T, (uint16_t)(obj_))) + + + + (QS_u8_fmt_(QS_OBJ_T, (uint8_t)(obj_))) + + + + (QS_u64_fmt_(QS_OBJ_T, (uint64_t)(obj_))) + + + /* Output formatted function pointer to the QS record */ + + (QS_u32_fmt_(QS_FUN_T, (uint32_t)(fun_))) + + + + (QS_u16_fmt_(QS_FUN_T, (uint16_t)(fun_))) + + + + (QS_u8_fmt_(QS_FUN_T, (uint8_t)(fun_))) + + + + (QS_u64_fmt_(QS_FUN_T, (uint64_t)(fun_))) + + + /*! Output formatted event signal (of type ::QSignal) and +* the state machine object to the user QS record +*/ + + + \ + QS_u32_fmt_(QS_SIG_T, (sig_)); \ + QS_obj_raw_(obj_) + + + + + \ + QS_u16_fmt_(QS_SIG_T, (sig_)); \ + QS_obj_raw_(obj_) + + + + + \ + QS_u8_fmt_(QS_SIG_T, (sig_)); \ + QS_obj_raw_(obj_) + + + /*! Output signal dictionary record +* +* @details +* A signal dictionary record associates the numerical value of the signal +* and the binary address of the state machine that consumes that signal +* with the human-readable name of the signal. +* +* Providing a signal dictionary QS record can vastly improve readability of +* the QS log, because instead of dealing with cryptic machine addresses the +* QSpy host utility can display human-readable names. +* +* A signal dictionary entry is associated with both the signal value `sig_` +* and the state machine `obj_`, because signals are required to be unique +* only within a given state machine and therefore the same numerical values +* can represent different signals in different state machines. +* +* For the "global" signals that have the same meaning in all state machines +* (such as globally published signals), you can specify a signal dictionary +* entry with the `obj_` parameter set to NULL. +* +* The following example shows the definition of signal dictionary entries +* in the initial transition of the Table active object. Please note that +* signals HUNGRY_SIG and DONE_SIG are associated with the Table state +* machine only ("me" `obj_` pointer). The EAT_SIG signal, on the other +* hand, is global (0 `obj_` pointer): +* @include qs_sigDic.c +* +* @note The QSpy log utility must capture the signal dictionary record +* in order to use the human-readable information. You need to connect to +* the target before the dictionary entries have been transmitted. +* +* The following QSpy log example shows the signal dictionary records +* generated from the Table initial transition and subsequent records that +* show human-readable names of the signals: +* @include qs_sigLog.txt +* +* The following QSpy log example shows the same sequence of records, but +* with dictionary records removed. The human-readable signal names are not +* available. +*/ + + + \ + (QS_sig_dict_pre_((sig_), (obj_), #sig_)) + + + /*! Output object dictionary record +* +* @details +* An object dictionary record associates the binary address of an object +* in the target's memory with the human-readable name of the object. +* +* Providing an object dictionary QS record can vastly improve readability of +* the QS log, because instead of dealing with cryptic machine addresses the +* QSpy host utility can display human-readable object names. +* +* The following example shows the definition of object dictionary entry +* for the Table active object: +* @include qs_objDic.c +*/ + + \ + (QS_obj_dict_pre_((obj_), #obj_)) + + + /*! Output object-array dictionary record +* +* @details +* An object array dictionary record associates the binary address of the +* object element in the target's memory with the human-readable name +* of the object. +* +* Providing a dictionary QS record can vastly improve readability of +* the QS log, because instead of dealing with cryptic machine addresses the +* QSpy host utility can display human-readable object names. +* +* The following example shows the definition of object array dictionary +* for `Philo::inst[n]` and `Philo::inst[n].m_timeEvt`: +* @include qs_objDic.c +*/ + + + \ + (QS_obj_arr_dict_pre_((obj_), (idx_), #obj_)) + + + /*! Output function dictionary record +* +* @details +* A function dictionary record associates the binary address of a function +* in the target's memory with the human-readable name of the function. +* +* Providing a function dictionary QS record can vastly improve readability +* of the QS log, because instead of dealing with cryptic machine addresses +* the QSpy host utility can display human-readable function names. +* +* The example from #QS_SIG_DICTIONARY shows the definition of a function +* dictionary. +*/ + + \ + (QS_fun_dict_pre_((void (*)(void))(fun_), #fun_)) + + + /*! Output user QS record dictionary record +* +* @details +* A user QS record dictionary record associates the numerical value of a +* user record with the human-readable identifier. +*/ + + \ + (QS_usr_dict_pre_((rec_), #rec_)) + + + /*! Output the critical section entry record */ + + + /*! Output the critical section exit record */ + + + /*! Output the interrupt entry record *//*! Output the ISR entry +* @static @public @memberof QS +*/ + + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ISR_ENTRY, 0U) + QS_TIME_PRE_(); + QS_2u8_raw_(isrnest, prio); +QS_END_NOCRIT_PRE_() + + + /*! Output the ISR exit +* @static @public @memberof QS +*/ + + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ISR_EXIT, 0U) + QS_TIME_PRE_(); + QS_2u8_raw_(isrnest, prio); +QS_END_NOCRIT_PRE_() + + + /*! Execute an action that is only necessary for QS output */ + + (act_) + + + + + /*! QS time stamp type, which determines the dynamic range of QS time stamps */ + + + + + /*! QS function pointer type (for serializing function pointers) */ + + + + + + /*! QS ring buffer counter and offset type */ + + + /*! QS pre-defined record types (TX channel) +* +* @details +* This enumeration specifies the record types used in the QP components. +* You can specify your own record types starting from ::QS_USER offset. +* Currently, the maximum of all records cannot exceed 125. +* +* @note +* The QS records labeled as "not maskable" are always enabled and cannot +* be turend off with the QS_GLB_FILTER() macro. Other QS trace records +* can be disabled by means of the "global filters" +* +* @sa QS_GLB_FILTER() macro +*/ + { + /* [0] QS session (not maskable) */ + QS_EMPTY, /*!< QS record for cleanly starting a session */ + + /* [1] SM records */ + QS_QEP_STATE_ENTRY, /*!< a state was entered */ + QS_QEP_STATE_EXIT, /*!< a state was exited */ + QS_QEP_STATE_INIT, /*!< an initial transition was taken in a state */ + QS_QEP_INIT_TRAN, /*!< the top-most initial transition was taken */ + QS_QEP_INTERN_TRAN, /*!< an internal transition was taken */ + QS_QEP_TRAN, /*!< a regular transition was taken */ + QS_QEP_IGNORED, /*!< an event was ignored (silently discarded) */ + QS_QEP_DISPATCH, /*!< an event was dispatched (begin of RTC step) */ + QS_QEP_UNHANDLED, /*!< an event was un-handled due to a guard */ + + /* [10] Active Object (AO) records */ + QS_QF_ACTIVE_DEFER, /*!< AO deferred an event */ + QS_QF_ACTIVE_RECALL, /*!< AO recalled an event */ + QS_QF_ACTIVE_SUBSCRIBE, /*!< an AO subscribed to an event */ + QS_QF_ACTIVE_UNSUBSCRIBE, /*!< an AO unsubscribed to an event */ + QS_QF_ACTIVE_POST, /*!< an event was posted (FIFO) directly to AO */ + QS_QF_ACTIVE_POST_LIFO, /*!< an event was posted (LIFO) directly to AO */ + QS_QF_ACTIVE_GET, /*!< AO got an event and its queue is not empty */ + QS_QF_ACTIVE_GET_LAST,/*!< AO got an event and its queue is empty */ + QS_QF_ACTIVE_RECALL_ATTEMPT, /*!< AO attempted to recall an event */ + + /* [19] Event Queue (EQ) records */ + QS_QF_EQUEUE_POST, /*!< an event was posted (FIFO) to a raw queue */ + QS_QF_EQUEUE_POST_LIFO, /*!< an event was posted (LIFO) to a raw queue */ + QS_QF_EQUEUE_GET, /*!< get an event and queue still not empty */ + QS_QF_EQUEUE_GET_LAST,/*!< get the last event from the queue */ + + /* [23] Framework (QF) records */ + QS_QF_NEW_ATTEMPT, /*!< an attempt to allocate an event failed */ + + /* [24] Memory Pool (MP) records */ + QS_QF_MPOOL_GET, /*!< a memory block was removed from memory pool */ + QS_QF_MPOOL_PUT, /*!< a memory block was returned to memory pool */ + + /* [26] Additional Framework (QF) records */ + QS_QF_PUBLISH, /*!< an event was published to active objects */ + QS_QF_NEW_REF, /*!< new event reference was created */ + QS_QF_NEW, /*!< new event was created */ + QS_QF_GC_ATTEMPT, /*!< garbage collection attempt */ + QS_QF_GC, /*!< garbage collection */ + QS_QF_TICK, /*!< QTimeEvt_tick_() was called */ + + /* [32] Time Event (TE) records */ + QS_QF_TIMEEVT_ARM, /*!< a time event was armed */ + QS_QF_TIMEEVT_AUTO_DISARM, /*!< a time event expired and was disarmed */ + QS_QF_TIMEEVT_DISARM_ATTEMPT,/*!< attempt to disarm a disarmed QTimeEvt */ + QS_QF_TIMEEVT_DISARM, /*!< true disarming of an armed time event */ + QS_QF_TIMEEVT_REARM, /*!< rearming of a time event */ + QS_QF_TIMEEVT_POST, /*!< a time event posted itself directly to an AO */ + + /* [38] Additional Framework (QF) records */ + QS_QF_DELETE_REF, /*!< an event reference is about to be deleted */ + QS_QF_CRIT_ENTRY, /*!< critical section was entered */ + QS_QF_CRIT_EXIT, /*!< critical section was exited */ + QS_QF_ISR_ENTRY, /*!< an ISR was entered */ + QS_QF_ISR_EXIT, /*!< an ISR was exited */ + QS_QF_INT_DISABLE, /*!< interrupts were disabled */ + QS_QF_INT_ENABLE, /*!< interrupts were enabled */ + + /* [45] Additional Active Object (AO) records */ + QS_QF_ACTIVE_POST_ATTEMPT,/*!< attempt to post an evt to AO failed */ + + /* [46] Additional Event Queue (EQ) records */ + QS_QF_EQUEUE_POST_ATTEMPT,/*!< attempt to post an evt to QEQueue failed */ + + /* [47] Additional Memory Pool (MP) records */ + QS_QF_MPOOL_GET_ATTEMPT, /*!< attempt to get a memory block failed */ + + /* [48] Scheduler (SC) records */ + QS_MUTEX_LOCK, /*!< a mutex was locked */ + QS_MUTEX_UNLOCK, /*!< a mutex was unlocked */ + QS_SCHED_LOCK, /*!< scheduler was locked */ + QS_SCHED_UNLOCK, /*!< scheduler was unlocked */ + QS_SCHED_NEXT, /*!< scheduler found next task to execute */ + QS_SCHED_IDLE, /*!< scheduler became idle */ + QS_SCHED_RESUME, /*!< scheduler resumed previous task (not idle) */ + + /* [55] Additional QEP records */ + QS_QEP_TRAN_HIST, /*!< a tran to history was taken */ + QS_QEP_TRAN_EP, /*!< a tran to entry point into a submachine */ + QS_QEP_TRAN_XP, /*!< a tran to exit point out of a submachine */ + + /* [58] Miscellaneous QS records (not maskable) */ + QS_TEST_PAUSED, /*!< test has been paused */ + QS_TEST_PROBE_GET, /*!< reports that Test-Probe has been used */ + QS_SIG_DICT, /*!< signal dictionary entry */ + QS_OBJ_DICT, /*!< object dictionary entry */ + QS_FUN_DICT, /*!< function dictionary entry */ + QS_USR_DICT, /*!< user QS record dictionary entry */ + QS_TARGET_INFO, /*!< reports the Target information */ + QS_TARGET_DONE, /*!< reports completion of a user callback */ + QS_RX_STATUS, /*!< reports QS data receive status */ + QS_QUERY_DATA, /*!< reports the data from "current object" query */ + QS_PEEK_DATA, /*!< reports the data from the PEEK query */ + QS_ASSERT_FAIL, /*!< assertion failed in the code */ + QS_QF_RUN, /*!< QF_run() was entered */ + + QS_MAX, /*!< the number of reserved signals */ +}; + + + /*! QS record groups for QS_GLB_FILTER() */ + { + QS_ALL_RECORDS = 0xF0,/*!< all maskable QS records */ + QS_SM_RECORDS, /*!< State Machine QS records */ + QS_AO_RECORDS, /*!< Active Object QS records */ + QS_EQ_RECORDS, /*!< Event Queues QS records */ + QS_MP_RECORDS, /*!< Memory Pools QS records */ + QS_TE_RECORDS, /*!< Time Events QS records */ + QS_QF_RECORDS, /*!< QF QS records */ + QS_SC_RECORDS, /*!< Scheduler QS records */ + QS_U0_RECORDS, /*!< User Group 100-104 records */ + QS_U1_RECORDS, /*!< User Group 105-109 records */ + QS_U2_RECORDS, /*!< User Group 110-114 records */ + QS_U3_RECORDS, /*!< User Group 115-119 records */ + QS_U4_RECORDS, /*!< User Group 120-124 records */ + QS_UA_RECORDS /*!< All User records */ +}; + + + /*! QS user record group offsets for QS_GLB_FILTER() */ + { + QS_USER = 100, /*!< the first record available to QS users */ + QS_USER0 = (enum_t)QS_USER, /*!< offset for User Group 0 */ + QS_USER1 = (enum_t)QS_USER0 + 5, /*!< offset for User Group 1 */ + QS_USER2 = (enum_t)QS_USER1 + 5, /*!< offset for User Group 2 */ + QS_USER3 = (enum_t)QS_USER2 + 5, /*!< offset for User Group 3 */ + QS_USER4 = (enum_t)QS_USER3 + 5 /*!< offset for User Group 4 */ +}; + + + /*! QS ID offsets for QS_LOC_FILTER() */ + { + QS_AO_ID = 0, /*!< offset for AO priorities */ + QS_EP_ID = 64, /*!< offset for event-pool IDs */ + QS_EQ_ID = 80, /*!< offset for event-queue IDs */ + QS_AP_ID = 96, /*!< offset for Application-specific IDs */ +}; + + + /*! QS ID groups for QS_LOC_FILTER() */ + { + QS_ALL_IDS = 0xF0, /*!< all QS IDs */ + QS_AO_IDS = (0x80 + (enum_t)QS_AO_ID), /*!< AO IDs (priorities) */ + QS_EP_IDS = (0x80 + (enum_t)QS_EP_ID), /*!< event-pool IDs */ + QS_EQ_IDS = (0x80 + (enum_t)QS_EQ_ID), /*!< event-queue IDs */ + QS_AP_IDS = (0x80 + (enum_t)QS_AP_ID), /*!< Application-specific IDs */ +}; + + + /*! function pointer type for QS_fun_dict_pre_() */ + )(void); + + + /*! Constant representing End-Of-Data condition returned from the +* QS_getByte() function. +*/ + ((uint16_t)0xFFFFU) + + + /*! @brief QS ID type for applying local filtering */ + + + + /*! @brief Software tracing, output QS-TX +* +* @details +* This class groups together QS services. +*/ + + /*! global on/off QS filter */ + + + /*! local on/off QS filter */ + + + /*! @deprecated old local QS filter */ + + + /*! pointer to the start of the QS-TX ring buffer */ + + + /*! offset of the end of the ring buffer */ + + + /*! offset to where next byte will be inserted */ + + + /*! offset of where next record will be extracted */ + + + /*! number of bytes currently in the ring buffer */ + + + /*! sequence number of the last inserted QS record */ + + + /*! checksum of the currently inserted record */ + + + /*! critical section nesting level */ + + + + /*! Enumerates data formats recognized by QS +* +* @details +* QS uses this enumeration is used only internally for the formatted +* user data elements. +*/ + { + QS_I8_T, /*!< signed 8-bit integer format */ + QS_U8_T, /*!< unsigned 8-bit integer format */ + QS_I16_T, /*!< signed 16-bit integer format */ + QS_U16_T, /*!< unsigned 16-bit integer format */ + QS_I32_T, /*!< signed 32-bit integer format */ + QS_U32_T, /*!< unsigned 32-bit integer format */ + QS_F32_T, /*!< 32-bit floating point format */ + QS_F64_T, /*!< 64-bit floating point format */ + QS_STR_T, /*!< zero-terminated ASCII string format */ + QS_MEM_T, /*!< up to 255-bytes memory block format */ + QS_SIG_T, /*!< event signal format */ + QS_OBJ_T, /*!< object pointer format */ + QS_FUN_T, /*!< function pointer format */ + QS_I64_T, /*!< signed 64-bit integer format */ + QS_U64_T, /*!< unsigned 64-bit integer format */ + QS_HEX_FMT /*!< HEX format for the "width" filed */ +}; + + + /*! the only instance of the QS-TX object (Singleton) */ + + + /*! Initialize the QS data buffer +* @static @private @memberof QS +* +* @details +* This function should be called from QS_onStartup() to provide +* QS with the data buffer. The first argument `sto[]` is the address +* of the memory block, and the second argument `stoSize` is the size +* of this block [in bytes]. Currently the size of the QS buffer cannot +* exceed 64KB. +* +* @note +* QS can work with quite small data buffers, but you will start losing +* data if the buffer is too small for the bursts of tracing activity. +* The right size of the buffer depends on the data production rate and +* the data output rate. QS offers flexible filtering to reduce the data +* production rate. +* +* @note +* If the data output rate cannot keep up with the production rate, +* QS will start overwriting the older data with newer data. This is +* consistent with the "last-is-best" QS policy. The record sequence +* counters and check sums on each record allow the QSPY host utility +* to easily detect any data loss. +*/ + + + /* the provided buffer must be at least 8 bytes long */ +Q_REQUIRE_ID(100, stoSize > 8U); + +QS_priv_.buf = &sto[0]; +QS_priv_.end = (QSCtr)stoSize; +QS_priv_.head = 0U; +QS_priv_.tail = 0U; +QS_priv_.used = 0U; +QS_priv_.seq = 0U; +QS_priv_.chksum = 0U; +QS_priv_.critNest = 0U; + +QS_glbFilter_(-(int_fast16_t)QS_ALL_RECORDS); /* all global filters OFF */ +QS_locFilter_((int_fast16_t)QS_ALL_IDS); /* all local filters ON */ +QS_priv_.locFilter_AP = (void *)0; /* deprecated "AP-filter" */ + +/* produce an empty record to "flush" the QS trace buffer */ +QS_beginRec_((uint_fast8_t)QS_EMPTY); +QS_endRec_(); + +/* produce the reset record to inform QSPY of a new session */ +QS_target_info_pre_(0xFFU); /* send Reset and Target info */ + +/* hold off flushing after successfull initialization (see QS_INIT()) */ + + + /*! Byte-oriented interface to the QS data buffer +* @static @private @memberof QS +* +* @details +* This function delivers one byte at a time from the QS data buffer. +* +* @returns +* the byte in the least-significant 8-bits of the 16-bit return +* value if the byte is available. If no more data is available at the +* time, the function returns ::QS_EOD (End-Of-Data). +* +* @note +* QS_getByte() is NOT protected with a critical section. +*/ + uint16_t ret; +if (QS_priv_.used == 0U) { + ret = QS_EOD; /* set End-Of-Data */ +} +else { + uint8_t const * const buf = QS_priv_.buf; /* put in a temporary */ + QSCtr tail = QS_priv_.tail; /* put in a temporary (register) */ + ret = (uint16_t)buf[tail]; /* set the byte to return */ + ++tail; /* advance the tail */ + if (tail == QS_priv_.end) { /* tail wrap around? */ + tail = 0U; + } + QS_priv_.tail = tail; /* update the tail */ + --QS_priv_.used; /* one less byte used */ +} +return ret; /* return the byte or EOD */ + + + /*! Block-oriented interface to the QS data buffer +* @static @private @memberof QS +* +* @details +* This function delivers a contiguous block of data from the QS data +* buffer. The function returns the pointer to the beginning of the +* block, and writes the number of bytes in the block to the location +* pointed to by `pNbytes`. The argument `pNbytes` is also used as +* input to provide the maximum size of the data block that the caller +* can accept. +* +* @returns +* if data is available, the function returns pointer to the +* contiguous block of data and sets the value pointed to by `pNbytes` +* to the # available bytes. If data is available at the time the +* function is called, the function returns NULL pointer and sets the +* value pointed to by `pNbytes` to zero. +* +* @note +* Only the NULL return from QS_getBlock() indicates that the QS +* buffer is empty at the time of the call. The non-NULL return often +* means that the block is at the end of the buffer and you need to call +* QS_getBlock() again to obtain the rest of the data that +* "wrapped around" to the beginning of the QS data buffer. +* +* @note QS_getBlock() is **not** protected with a critical section. +*/ + + QSCtr const used = QS_priv_.used; /* put in a temporary (register) */ +uint8_t const *buf; + +/* any bytes used in the ring buffer? */ +if (used != 0U) { + QSCtr tail = QS_priv_.tail; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + QSCtr n = (QSCtr)(end - tail); + if (n > used) { + n = used; + } + if (n > (QSCtr)(*pNbytes)) { + n = (QSCtr)(*pNbytes); + } + *pNbytes = (uint16_t)n; /* n-bytes available */ + buf = &QS_priv_.buf[tail]; /* the bytes are at the tail */ + + QS_priv_.used = (QSCtr)(used - n); + tail += n; + if (tail == end) { + tail = 0U; + } + QS_priv_.tail = tail; +} + +else { /* no bytes available */ + *pNbytes = 0U; /* no bytes available right now */ + buf = (uint8_t *)0; /* no bytes available right now */ +} +return buf; + + + /*! Set/clear the global Filter for a given QS record +* or a group of records +* @static @private @memberof QS +* +* @details +* This function sets up the QS filter to enable record types specified +* in the `filter` parameter. The value #QS_ALL_RECORDS specifies to +* filter-in all records. This function should be called indirectly +* through the macro QS_GLB_FILTER() +* +* @param[in] filter the QS record-d or group to enable in the filter, +* if positive or disable, if negative. The record-id +* numbers must be in the range -127..127. +* @note +* Filtering based on the record-type is only the first layer of +* filtering. The second layer is based on the object-type. Both filter +* layers must be enabled for the QS record to be inserted in the +* QS buffer. +* +* @sa QS_locFilter_() +*/ + + bool const isRemove = (filter < 0); +uint8_t const rec = isRemove ? (uint8_t)(-filter) : (uint8_t)filter; +switch (rec) { + case QS_ALL_RECORDS: { + uint8_t const tmp = (isRemove ? 0x00U : 0xFFU); + uint_fast8_t i; + /* set all global filters (partially unrolled loop) */ + for (i = 0U; i < Q_DIM(QS_priv_.glbFilter); i += 4U) { + QS_priv_.glbFilter[i ] = tmp; + QS_priv_.glbFilter[i + 1U] = tmp; + QS_priv_.glbFilter[i + 2U] = tmp; + QS_priv_.glbFilter[i + 3U] = tmp; + } + if (isRemove) { + /* leave the "not maskable" filters enabled, + * see qs.h, Miscellaneous QS records (not maskable) + */ + QS_priv_.glbFilter[0] = 0x01U; + QS_priv_.glbFilter[7] = 0xFCU; + QS_priv_.glbFilter[8] = 0x7FU; + } + else { + /* never turn the last 3 records on (0x7D, 0x7E, 0x7F) */ + QS_priv_.glbFilter[15] = 0x1FU; + } + break; + } + case QS_SM_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[0] &= (uint8_t)(~0xFEU & 0xFFU); + QS_priv_.glbFilter[1] &= (uint8_t)(~0x03U & 0xFFU); + QS_priv_.glbFilter[6] &= (uint8_t)(~0x80U & 0xFFU); + QS_priv_.glbFilter[7] &= (uint8_t)(~0x03U & 0xFFU); + } + else { + QS_priv_.glbFilter[0] |= 0xFEU; + QS_priv_.glbFilter[1] |= 0x03U; + QS_priv_.glbFilter[6] |= 0x80U; + QS_priv_.glbFilter[7] |= 0x03U; + } + break; + case QS_AO_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[1] &= (uint8_t)(~0xFCU & 0xFFU); + QS_priv_.glbFilter[2] &= (uint8_t)(~0x07U & 0xFFU); + QS_priv_.glbFilter[5] &= (uint8_t)(~0x20U & 0xFFU); + } + else { + QS_priv_.glbFilter[1] |= 0xFCU; + QS_priv_.glbFilter[2] |= 0x07U; + QS_priv_.glbFilter[5] |= 0x20U; + } + break; + case QS_EQ_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[2] &= (uint8_t)(~0x78U & 0xFFU); + QS_priv_.glbFilter[5] &= (uint8_t)(~0x40U & 0xFFU); + } + else { + QS_priv_.glbFilter[2] |= 0x78U; + QS_priv_.glbFilter[5] |= 0x40U; + } + break; + case QS_MP_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[3] &= (uint8_t)(~0x03U & 0xFFU); + QS_priv_.glbFilter[5] &= (uint8_t)(~0x80U & 0xFFU); + } + else { + QS_priv_.glbFilter[3] |= 0x03U; + QS_priv_.glbFilter[5] |= 0x80U; + } + break; + case QS_QF_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[2] &= (uint8_t)(~0x80U & 0xFFU); + QS_priv_.glbFilter[3] &= (uint8_t)(~0xFCU & 0xFFU); + QS_priv_.glbFilter[4] &= (uint8_t)(~0xC0U & 0xFFU); + QS_priv_.glbFilter[5] &= (uint8_t)(~0x1FU & 0xFFU); + } + else { + QS_priv_.glbFilter[2] |= 0x80U; + QS_priv_.glbFilter[3] |= 0xFCU; + QS_priv_.glbFilter[4] |= 0xC0U; + QS_priv_.glbFilter[5] |= 0x1FU; + } + break; + case QS_TE_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[4] &= (uint8_t)(~0x3FU & 0xFFU); + } + else { + QS_priv_.glbFilter[4] |= 0x3FU; + } + break; + case QS_SC_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[6] &= (uint8_t)(~0x7FU & 0xFFU); + } + else { + QS_priv_.glbFilter[6] |= 0x7FU; + } + break; + case QS_U0_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[12] &= (uint8_t)(~0xF0U & 0xFFU); + QS_priv_.glbFilter[13] &= (uint8_t)(~0x01U & 0xFFU); + } + else { + QS_priv_.glbFilter[12] |= 0xF0U; + QS_priv_.glbFilter[13] |= 0x01U; + } + break; + case QS_U1_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[13] &= (uint8_t)(~0x3EU & 0xFFU); + } + else { + QS_priv_.glbFilter[13] |= 0x3EU; + } + break; + case QS_U2_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[13] &= (uint8_t)(~0xC0U & 0xFFU); + QS_priv_.glbFilter[14] &= (uint8_t)(~0x07U & 0xFFU); + } + else { + QS_priv_.glbFilter[13] |= 0xC0U; + QS_priv_.glbFilter[14] |= 0x07U; + } + break; + case QS_U3_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[14] &= (uint8_t)(~0xF8U & 0xFFU); + } + else { + QS_priv_.glbFilter[14] |= 0xF8U; + } + break; + case QS_U4_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[15] &= 0x1FU; + } + else { + QS_priv_.glbFilter[15] |= 0x1FU; + } + break; + case QS_UA_RECORDS: + if (isRemove) { + QS_priv_.glbFilter[12] &= (uint8_t)(~0xF0U & 0xFFU); + QS_priv_.glbFilter[13] = 0U; + QS_priv_.glbFilter[14] = 0U; + QS_priv_.glbFilter[15] &= (uint8_t)(~0x1FU & 0xFFU); + } + else { + QS_priv_.glbFilter[12] |= 0xF0U; + QS_priv_.glbFilter[13] |= 0xFFU; + QS_priv_.glbFilter[14] |= 0xFFU; + QS_priv_.glbFilter[15] |= 0x1FU; + } + break; + default: + /* QS rec number can't exceed 0x7D, so no need for escaping */ + Q_ASSERT_ID(210, rec < 0x7DU); + + if (isRemove) { + QS_priv_.glbFilter[rec >> 3U] + &= (uint8_t)(~(1U << (rec & 7U)) & 0xFFU); + } + else { + QS_priv_.glbFilter[rec >> 3U] + |= (1U << (rec & 7U)); + /* never turn the last 3 records on (0x7D, 0x7E, 0x7F) */ + QS_priv_.glbFilter[15] &= 0x1FU; + } + break; +} + + + /*! Set/clear the local Filter for a given object-id +* or a group of object-ids +* @static @private @memberof QS +* +* @details +* This function sets up the local QS filter to enable or disable the +* given QS object-id or a group of object-ids @a filter. +* This function should be called indirectly through the macro +* QS_LOC_FILTER() +* +* @param[in] filter the QS object-id or group to enable in the filter, +* if positive or disable, if negative. The qs_id numbers +* must be in the range 1..127. +* @note +* Filtering based on the object-id (local filter) is the second layer +* of filtering. The first layer is based on the QS record-type (global +* filter). Both filter layers must be enabled for the QS record to be +* inserted into the QS buffer. +* +* @sa QS_glbFilter_() +*/ + + bool const isRemove = (filter < 0); +uint8_t const qs_id = isRemove ? (uint8_t)(-filter) : (uint8_t)filter; +uint8_t const tmp = (isRemove ? 0x00U : 0xFFU); +uint_fast8_t i; +switch (qs_id) { + case QS_ALL_IDS: + /* set all local filters (partially unrolled loop) */ + for (i = 0U; i < Q_DIM(QS_priv_.locFilter); i += 4U) { + QS_priv_.locFilter[i ] = tmp; + QS_priv_.locFilter[i + 1U] = tmp; + QS_priv_.locFilter[i + 2U] = tmp; + QS_priv_.locFilter[i + 3U] = tmp; + } + break; + case QS_AO_IDS: + for (i = 0U; i < 8U; i += 4U) { + QS_priv_.locFilter[i ] = tmp; + QS_priv_.locFilter[i + 1U] = tmp; + QS_priv_.locFilter[i + 2U] = tmp; + QS_priv_.locFilter[i + 3U] = tmp; + } + break; + case QS_EP_IDS: + i = 8U; + QS_priv_.locFilter[i ] = tmp; + QS_priv_.locFilter[i + 1U] = tmp; + break; + case QS_AP_IDS: + i = 12U; + QS_priv_.locFilter[i ] = tmp; + QS_priv_.locFilter[i + 1U] = tmp; + QS_priv_.locFilter[i + 2U] = tmp; + QS_priv_.locFilter[i + 3U] = tmp; + break; + default: + if (qs_id < 0x7FU) { + if (isRemove) { + QS_priv_.locFilter[qs_id >> 3U] + &= (uint8_t)(~(1U << (qs_id & 7U)) & 0xFFU); + } + else { + QS_priv_.locFilter[qs_id >> 3U] + |= (1U << (qs_id & 7U)); + } + } + else { + Q_ERROR_ID(310); /* incorrect qs_id */ + } + break; +} +QS_priv_.locFilter[0] |= 0x01U; /* leave QS_ID == 0 always on */ + + + /*! Perform the QS-TX output (implemented in some QS ports) +* @static @private @memberof QS +*/ + + + /*! Mark the begin of a QS record @p rec +* @static @private @memberof QS +* +* @details +* This function must be called at the beginning of each QS record. +* This function should be called indirectly through the macro QS_BEGIN_ID(), +* or QS_BEGIN_NOCRIT(), depending if it's called in a normal code or from +* a critical section. +*/ + + + uint8_t const b = (uint8_t)(QS_priv_.seq + 1U); +uint8_t chksum = 0U; /* reset the checksum */ +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + +QS_priv_.seq = b; /* store the incremented sequence num */ +QS_priv_.used += 2U; /* 2 bytes about to be added */ + +QS_INSERT_ESC_BYTE_(b) + +chksum = (uint8_t)(chksum + rec); /* update checksum */ +QS_INSERT_BYTE_((uint8_t)rec) /* rec byte does not need escaping */ + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! Mark the end of a QS record `rec` +* @static @private @memberof QS +* +* @details +* This function must be called at the end of each QS record. +* This function should be called indirectly through the macro QS_END(), +* or QS_END_NOCRIT(), depending if it's called in a normal code or from +* a critical section. +*/ + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; +QSCtr const end = QS_priv_.end; +uint8_t b = QS_priv_.chksum; +b ^= 0xFFU; /* invert the bits in the checksum */ + +QS_priv_.used += 2U; /* 2 bytes about to be added */ + +if ((b != QS_FRAME) && (b != QS_ESC)) { + QS_INSERT_BYTE_(b) +} +else { + QS_INSERT_BYTE_(QS_ESC) + QS_INSERT_BYTE_(b ^ QS_ESC_XOR) + ++QS_priv_.used; /* account for the ESC byte */ +} + +QS_INSERT_BYTE_(QS_FRAME) /* do not escape this QS_FRAME */ + +QS_priv_.head = head; /* save the head */ + +/* overrun over the old data? */ +if (QS_priv_.used > end) { + QS_priv_.used = end; /* the whole buffer is used */ + QS_priv_.tail = head; /* shift the tail to the old data */ +} + + + /*! output uint8_t data element without format information +* @static @private @memberof QS +*/ + + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + +QS_priv_.used += 1U; /* 1 byte about to be added */ +QS_INSERT_ESC_BYTE_(d) + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! output two uint8_t data elements without format information +* @static @private @memberof QS +*/ + + + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + +QS_priv_.used += 2U; /* 2 bytes are about to be added */ +QS_INSERT_ESC_BYTE_(d1) +QS_INSERT_ESC_BYTE_(d2) + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! output uint16_t data element without format information +* @static @private @memberof QS +*/ + + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ +uint16_t x = d; + +QS_priv_.used += 2U; /* 2 bytes are about to be added */ + +QS_INSERT_ESC_BYTE_((uint8_t)x) +x >>= 8U; +QS_INSERT_ESC_BYTE_((uint8_t)x) + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! output uint32_t data element without format information +* @static @private @memberof QS +*/ + + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ +uint32_t x = d; + +QS_priv_.used += 4U; /* 4 bytes are about to be added */ +for (uint_fast8_t i = 4U; i != 0U; --i) { + QS_INSERT_ESC_BYTE_((uint8_t)x) + x >>= 8U; +} + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! Output obj pointer data element without format information +* @static @private @memberof QS +* +* @note This function is only to be used through macros, never in the +* client code directly. +*/ + + + #if (QS_OBJ_PTR_SIZE == 1U) + QS_u8_raw_((uint8_t)obj); +#elif (QS_OBJ_PTR_SIZE == 2U) + QS_u16_raw_((uint16_t)obj); +#elif (QS_OBJ_PTR_SIZE == 4U) + QS_u32_raw_((uint32_t)obj); +#elif (QS_OBJ_PTR_SIZE == 8U) + QS_u64_raw_((uint64_t)obj); +#else + QS_u32_raw_((uint32_t)obj); +#endif + + + /*! Output raw zero-terminated string element (without format information) +* @static @private @memberof QS +* +* @note This function is only to be used through macros, never in the +* client code directly. +*/ + + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ +QSCtr used = QS_priv_.used; /* put in a temporary (register) */ + +for (char const *s = str; *s != '\0'; ++s) { + chksum += (uint8_t)*s; /* update checksum */ + QS_INSERT_BYTE_((uint8_t)*s) /* ASCII char doesn't need escaping */ + ++used; +} +QS_INSERT_BYTE_((uint8_t)'\0') /* zero-terminate the string */ +++used; + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ +QS_priv_.used = used; /* save # of used buffer space */ + + + /*! Output uint8_t data element with format information +* @static @private @memberof QS +* +* @details +* @note This function is only to be used through macros, never in the +* client code directly. +*/ + + + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + +QS_priv_.used += 2U; /* 2 bytes about to be added */ + +QS_INSERT_ESC_BYTE_(format) +QS_INSERT_ESC_BYTE_(d) + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! output uint16_t data element with format information +* @static @private @memberof QS +* +* @details +* This function is only to be used through macros, never in the +* client code directly. +*/ + + + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ +uint8_t b = (uint8_t)d; + +QS_priv_.used += 3U; /* 3 bytes about to be added */ + +QS_INSERT_ESC_BYTE_(format) +QS_INSERT_ESC_BYTE_(b) +b = (uint8_t)(d >> 8U); +QS_INSERT_ESC_BYTE_(b) + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! Output uint32_t data element with format information +* @static @private @memberof QS +* +* @note This function is only to be used through macros, never in the +* client code directly. +*/ + + + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ +uint32_t x = d; + +QS_priv_.used += 5U; /* 5 bytes about to be added */ +QS_INSERT_ESC_BYTE_(format) /* insert the format byte */ + +/* insert 4 bytes... */ +for (uint_fast8_t i = 4U; i != 0U; --i) { + QS_INSERT_ESC_BYTE_((uint8_t)x) + x >>= 8U; +} + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! Output formatted zero-terminated ASCII string to the QS record +* @static @private @memberof QS +*/ + + uint8_t chksum = QS_priv_.chksum; +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ +QSCtr used = QS_priv_.used; /* put in a temporary (register) */ + +used += 2U; /* account for the format byte and the terminating-0 */ +QS_INSERT_BYTE_((uint8_t)QS_STR_T) +chksum += (uint8_t)QS_STR_T; + +for (char const *s = str; *s != '\0'; ++s) { + QS_INSERT_BYTE_((uint8_t)*s) /* ASCII char doesn't need escaping */ + chksum += (uint8_t)*s; /* update checksum */ + ++used; +} +QS_INSERT_BYTE_(0U) /* zero-terminate the string */ + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ +QS_priv_.used = used; /* save # of used buffer space */ + + + /*! Output formatted memory block of up to 255 bytes to the QS record +* @static @private @memberof QS +*/ + + + uint8_t chksum = QS_priv_.chksum; +uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ +QSCtr head = QS_priv_.head; /* put in a temporary (register) */ +QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ +uint8_t const *pb = blk; + +QS_priv_.used += ((QSCtr)size + 2U); /* size+2 bytes to be added */ + +QS_INSERT_BYTE_((uint8_t)QS_MEM_T) +chksum += (uint8_t)QS_MEM_T; + +QS_INSERT_ESC_BYTE_(size) +/* output the 'size' number of bytes */ +for (uint8_t len = size; len > 0U; --len) { + QS_INSERT_ESC_BYTE_(*pb) + ++pb; +} + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! Output predefined signal-dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_SIG_DICTIONARY() +*/ + + + + QS_CRIT_STAT_ + +QS_CRIT_E_(); +QS_beginRec_((uint_fast8_t)QS_SIG_DICT); +QS_SIG_PRE_(sig); +QS_OBJ_PRE_(obj); +QS_str_raw_((*name == '&') ? &name[1] : name); +QS_endRec_(); +QS_CRIT_X_(); +QS_onFlush(); + + + /*! Output predefined object-dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_OBJ_DICTIONARY() +*/ + + + QS_CRIT_STAT_ + +QS_CRIT_E_(); +QS_beginRec_((uint_fast8_t)QS_OBJ_DICT); +QS_OBJ_PRE_(obj); +QS_str_raw_((*name == '&') ? &name[1] : name); +QS_endRec_(); +QS_CRIT_X_(); +QS_onFlush(); + + + /*! Output predefined object-array dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_OBJ_ARR_DICTIONARY() +*/ + + + + Q_REQUIRE_ID(400, idx < 1000U); + +/* format idx into a char buffer as "xxx\0" */ +uint8_t idx_str[4]; +uint_fast16_t tmp = idx; +uint8_t i; +idx_str[3] = 0U; /* zero-terminate */ +idx_str[2] = (uint8_t)((uint8_t)'0' + (tmp % 10U)); +tmp /= 10U; +idx_str[1] = (uint8_t)((uint8_t)'0' + (tmp % 10U)); +if (idx_str[1] == (uint8_t)'0') { + i = 2U; +} +else { + tmp /= 10U; + idx_str[0] = (uint8_t)((uint8_t)'0' + (tmp % 10U)); + if (idx_str[0] == (uint8_t)'0') { + i = 1U; + } + else { + i = 0U; + } +} + +QS_CRIT_STAT_ +uint8_t j = ((*name == '&') ? 1U : 0U); + +QS_CRIT_E_(); +QS_beginRec_((uint_fast8_t)QS_OBJ_DICT); +QS_OBJ_PRE_(obj); +for (; name[j] != '\0'; ++j) { + QS_U8_PRE_(name[j]); + if (name[j] == '[') { + ++j; + break; + } +} +for (; idx_str[i] != 0U; ++i) { + QS_U8_PRE_(idx_str[i]); +} +/* skip chars until ']' */ +for (; name[j] != '\0'; ++j) { + if (name[j] == ']') { + break; + } +} +for (; name[j] != '\0'; ++j) { + QS_U8_PRE_(name[j]); +} +QS_U8_PRE_(0U); /* zero-terminate */ +QS_endRec_(); +QS_CRIT_X_(); +QS_onFlush(); + + + /*! Output predefined function-dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_FUN_DICTIONARY() +*/ + + + QS_CRIT_STAT_ + +QS_CRIT_E_(); +QS_beginRec_((uint_fast8_t)QS_FUN_DICT); +QS_FUN_PRE_(fun); +QS_str_raw_((*name == '&') ? &name[1] : name); +QS_endRec_(); +QS_CRIT_X_(); +QS_onFlush(); + + + /*! Output predefined user-dictionary record +* @static @private @memberof QS +* +* @note This function is only to be used through macro QS_USR_DICTIONARY() +*/ + + + QS_CRIT_STAT_ + +QS_CRIT_E_(); +QS_beginRec_((uint_fast8_t)QS_USR_DICT); +QS_u8_raw_((uint8_t)rec); +QS_str_raw_(name); +QS_endRec_(); +QS_CRIT_X_(); +QS_onFlush(); + + + /*! Output the predefined assertion failure trace record +* @static @public @memberof QS +* +* @details +* This trace record is intended to use from the Q_onAssert() callback. +*/ + + + + QS_BEGIN_NOCRIT_PRE_(QS_ASSERT_FAIL, 0U) + QS_TIME_PRE_(); + QS_U16_PRE_(loc); + QS_STR_PRE_((module != (char *)0) ? module : "?"); +QS_END_NOCRIT_PRE_() +QS_onFlush(); + +for (uint32_t volatile delay_ctr = delay; delay_ctr > 0U; --delay_ctr) { +} +QS_onCleanup(); + + + /*! Helper function to output the predefined Target-info trace record. +* @static @private @memberof QS +*/ + + static uint8_t const ZERO = (uint8_t)'0'; +static uint8_t const * const TIME = (uint8_t const *)&Q_BUILD_TIME[0]; +static uint8_t const * const DATE = (uint8_t const *)&Q_BUILD_DATE[0]; +static union { + uint16_t u16; + uint8_t u8[2]; +} endian_test; + +endian_test.u16 = 0x0102U; +QS_beginRec_((uint_fast8_t)QS_TARGET_INFO); + QS_U8_PRE_(isReset); + QS_U16_PRE_(((endian_test.u8[0] == 0x01U) /* big endian? */ + ? (0x8000U | QP_VERSION) + : QP_VERSION)); /* target endianness + version number */ + + /* send the object sizes... */ + QS_U8_PRE_(Q_SIGNAL_SIZE | (QF_EVENT_SIZ_SIZE << 4U)); + +#ifdef QF_EQUEUE_CTR_SIZE + QS_U8_PRE_(QF_EQUEUE_CTR_SIZE | (QF_TIMEEVT_CTR_SIZE << 4U)); +#else + QS_U8_PRE_(QF_TIMEEVT_CTR_SIZE << 4U); +#endif /* QF_EQUEUE_CTR_SIZE */ + +#ifdef QF_MPOOL_CTR_SIZE + QS_U8_PRE_(QF_MPOOL_SIZ_SIZE | (QF_MPOOL_CTR_SIZE << 4U)); +#else + QS_U8_PRE_(0U); +#endif /* QF_MPOOL_CTR_SIZE */ + + QS_U8_PRE_(QS_OBJ_PTR_SIZE | (QS_FUN_PTR_SIZE << 4U)); + QS_U8_PRE_(QS_TIME_SIZE); + + /* send the limits... */ + QS_U8_PRE_(QF_MAX_ACTIVE); + QS_U8_PRE_(QF_MAX_EPOOL | (QF_MAX_TICK_RATE << 4U)); + + /* send the build time in three bytes (sec, min, hour)... */ + QS_U8_PRE_((10U * (uint8_t)(TIME[6] - ZERO)) + + (uint8_t)(TIME[7] - ZERO)); + QS_U8_PRE_((10U * (uint8_t)(TIME[3] - ZERO)) + + (uint8_t)(TIME[4] - ZERO)); + if (Q_BUILD_TIME[0] == ' ') { + QS_U8_PRE_(TIME[1] - ZERO); + } + else { + QS_U8_PRE_((10U * (uint8_t)(TIME[0] - ZERO)) + + (uint8_t)(TIME[1] - ZERO)); + } + + /* send the build date in three bytes (day, month, year) ... */ + if (Q_BUILD_DATE[4] == ' ') { + QS_U8_PRE_(DATE[5] - ZERO); + } + else { + QS_U8_PRE_((10U * (uint8_t)(DATE[4] - ZERO)) + + (uint8_t)(DATE[5] - ZERO)); + } + /* convert the 3-letter month to a number 1-12 ... */ + uint8_t b; + switch ((int_t)DATE[0] + (int_t)DATE[1] + (int_t)DATE[2]) { + case (int_t)'J' + (int_t)'a' + (int_t)'n': + b = 1U; + break; + case (int_t)'F' + (int_t)'e' + (int_t)'b': + b = 2U; + break; + case (int_t)'M' + (int_t)'a' + (int_t)'r': + b = 3U; + break; + case (int_t)'A' + (int_t)'p' + (int_t)'r': + b = 4U; + break; + case (int_t)'M' + (int_t)'a' + (int_t)'y': + b = 5U; + break; + case (int_t)'J' + (int_t)'u' + (int_t)'n': + b = 6U; + break; + case (int_t)'J' + (int_t)'u' + (int_t)'l': + b = 7U; + break; + case (int_t)'A' + (int_t)'u' + (int_t)'g': + b = 8U; + break; + case (int_t)'S' + (int_t)'e' + (int_t)'p': + b = 9U; + break; + case (int_t)'O' + (int_t)'c' + (int_t)'t': + b = 10U; + break; + case (int_t)'N' + (int_t)'o' + (int_t)'v': + b = 11U; + break; + case (int_t)'D' + (int_t)'e' + (int_t)'c': + b = 12U; + break; + default: + b = 0U; + break; + } + QS_U8_PRE_(b); /* store the month */ + QS_U8_PRE_((10U * (uint8_t)(DATE[9] - ZERO)) + + (uint8_t)(DATE[10] - ZERO)); +QS_endRec_(); + + + /*! Callback to startup the QS facility +* @static @public @memberof QS +*/ + + + + * Callback to cleanup the QS facility + + + * Callback to flush the QS trace data to the host + + + * Callback to obtain a timestamp for a QS record + + + + + /*! Output uint64_t data element without format information +* @static @private @memberof QS +*/ + + uint8_t chksum = QS_priv_.chksum; +uint8_t * const buf = QS_priv_.buf; +QSCtr head = QS_priv_.head; +QSCtr const end = QS_priv_.end; + +QS_priv_.used += 8U; /* 8 bytes are about to be added */ +uint_fast8_t i; +for (i = 8U; i != 0U; --i) { + uint8_t const b = (uint8_t)d; + QS_INSERT_ESC_BYTE_(b) + d >>= 8U; +} + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! Output uint64_t data element with format information +* @static @private @memberof QS +* @sa QS_U64(), QS_I64() +*/ + + + uint8_t chksum = QS_priv_.chksum; +uint8_t * const buf = QS_priv_.buf; +QSCtr head = QS_priv_.head; +QSCtr const end = QS_priv_.end; + +QS_priv_.used += 9U; /* 9 bytes are about to be added */ +QS_INSERT_ESC_BYTE_(format) /* insert the format byte */ + +/* output 8 bytes of data... */ +uint_fast8_t i; +for (i = 8U; i != 0U; --i) { + format = (uint8_t)d; + QS_INSERT_ESC_BYTE_(format) + d >>= 8U; +} + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + + + /*! Output 32-bit floating point data element with format information +* @static @private @memberof QS +* @sa QS_F32() +*/ + + + union F32Rep { + float32_t f; + uint32_t u; +} fu32; /* the internal binary representation */ +uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ +uint8_t * const buf = QS_priv_.buf; +QSCtr head = QS_priv_.head; +QSCtr const end = QS_priv_.end; +uint_fast8_t i; + +fu32.f = d; /* assign the binary representation */ + +QS_priv_.used += 5U; /* 5 bytes about to be added */ +QS_INSERT_ESC_BYTE_(format) /* insert the format byte */ + +/* insert 4 bytes... */ +for (i = 4U; i != 0U; --i) { + QS_INSERT_ESC_BYTE_((uint8_t)fu32.u) + fu32.u >>= 8U; +} + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + /*! Output 64-bit floating point data element with format information +* @static @private @memberof QS +* @sa QS_F64() +*/ + + + union F64Rep { + float64_t d; + uint32_t u[2]; +} fu64; /* the internal binary representation */ +uint8_t chksum = QS_priv_.chksum; +uint8_t * const buf = QS_priv_.buf; +QSCtr head = QS_priv_.head; +QSCtr const end = QS_priv_.end; +uint32_t i; + +/* static constant untion to detect endianness of the machine */ +static union U32Rep { + uint32_t u32; + uint8_t u8; +} const endian = { 1U }; + +fu64.d = d; /* assign the binary representation */ + +/* is this a big-endian machine? */ +if (endian.u8 == 0U) { + /* swap fu64.u[0] <-> fu64.u[1]... */ + i = fu64.u[0]; + fu64.u[0] = fu64.u[1]; + fu64.u[1] = i; +} + +QS_priv_.used += 9U; /* 9 bytes about to be added */ +QS_INSERT_ESC_BYTE_(format) /* insert the format byte */ + +/* output 4 bytes from fu64.u[0]... */ +for (i = 4U; i != 0U; --i) { + QS_INSERT_ESC_BYTE_((uint8_t)fu64.u[0]) + fu64.u[0] >>= 8U; +} + +/* output 4 bytes from fu64.u[1]... */ +for (i = 4U; i != 0U; --i) { + QS_INSERT_ESC_BYTE_((uint8_t)fu64.u[1]) + fu64.u[1] >>= 8U; +} + +QS_priv_.head = head; /* save the head */ +QS_priv_.chksum = chksum; /* save the checksum */ + + + + + /*! @brief QS software tracing parameters for QS input (QS-RX) */ + + * current objects + + + * pointer to the start of the ring buffer + + + * offset of the end of the ring buffer + + + * offset to where next byte will be inserted + + + * offset of where next byte will be extracted + + + * QUTest event loop is running + + + + /*! the only instance of the QS-RX object (Singleton) */ + + + /*! Kinds of objects used in QS_setCurrObj() and QS_queryCurrObj() */ + { + SM_OBJ, /*!< state machine object */ + AO_OBJ, /*!< active object */ + MP_OBJ, /*!< event pool object */ + EQ_OBJ, /*!< raw queue object */ + TE_OBJ, /*!< time event object */ + AP_OBJ, /*!< generic Application-specific object */ + MAX_OBJ +}; + + + /*! Object combinations for QS_setCurrObj() and QS_queryCurrObj() */ + { + SM_AO_OBJ = (enum_t)MAX_OBJ /*!< combination of SM and AO */ +}; + + + /*! Initialize the QS RX data buffer +* @static @private @memberof QS +* +* @details +* This function should be called from QS::onStartup() to provide QS-RX +* with the receive data buffer. +* +* @param[in] sto[] the address of the memory block +* @param[in] stoSize the size of this block [bytes]. The size of the +* QS RX buffer cannot exceed 64KB. +* +* @note +* QS-RX can work with quite small data buffers, but you will start +* losing data if the buffer is not drained fast enough (e.g., in the +* idle task). +* +* @note +* If the data input rate exceeds the QS-RX processing rate, the data +* will be lost, but the QS protocol will notice that: +* (1) that the checksum in the incomplete QS records will fail; and +* (2) the sequence counter in QS records will show discontinuities. +* +* The QS-RX channel will report any data errors by sending the +* QS_RX_DATA_ERROR trace record. +*/ + + + QS_rxPriv_.buf = &sto[0]; +QS_rxPriv_.end = (QSCtr)stoSize; +QS_rxPriv_.head = 0U; +QS_rxPriv_.tail = 0U; + +QS_rxPriv_.currObj[SM_OBJ] = (void *)0; +QS_rxPriv_.currObj[AO_OBJ] = (void *)0; +QS_rxPriv_.currObj[MP_OBJ] = (void *)0; +QS_rxPriv_.currObj[EQ_OBJ] = (void *)0; +QS_rxPriv_.currObj[TE_OBJ] = (void *)0; +QS_rxPriv_.currObj[AP_OBJ] = (void *)0; + +QS_RX_TRAN_(WAIT4_SEQ); +l_rx.esc = 0U; +l_rx.seq = 0U; +l_rx.chksum = 0U; + +QS_beginRec_((uint_fast8_t)QS_OBJ_DICT); + QS_OBJ_PRE_(&QS_rxPriv_); + QS_STR_PRE_("QS_RX"); +QS_endRec_(); +/* no QS_REC_DONE(), because QS is not running yet */ + +#ifdef Q_UTEST +QS_testData.tpNum = 0U; +QS_testData.testTime = 0U; +#endif /* Q_UTEST */ + + + /*! Put one byte into the QS RX lock-free buffer +* @static @private @memberof QS +*/ + + QSCtr head = QS_rxPriv_.head + 1U; +if (head == QS_rxPriv_.end) { + head = 0U; +} +if (head != QS_rxPriv_.tail) { /* buffer NOT full? */ + QS_rxPriv_.buf[QS_rxPriv_.head] = b; + QS_rxPriv_.head = head; /* update the head to a *valid* index */ + return true; /* byte placed in the buffer */ +} +else { + return false; /* byte NOT placed in the buffer */ +} + + + /*! Obtain the number of free bytes in the QS RX data buffer +* @static @private @memberof QS +* +* @details +* This function is intended to be called from the ISR that reads the +* QS-RX bytes from the QSPY application. The function returns the +* conservative number of free bytes currently available in the buffer, +* assuming that the head pointer is not being moved concurrently. +* The tail pointer might be moving, meaning that bytes can be +* concurrently removed from the buffer. +*/ + QSCtr const head = QS_rxPriv_.head; +if (head == QS_rxPriv_.tail) { /* buffer empty? */ + return (uint16_t)(QS_rxPriv_.end - 1U); +} +else if (head < QS_rxPriv_.tail) { + return (uint16_t)(QS_rxPriv_.tail - (head + 1U)); +} +else { + return (uint16_t)(QS_rxPriv_.end + QS_rxPriv_.tail - (head + 1U)); +} + + + /*! Perform the QS-RX input (implemented in some QS ports) +* @static @private @memberof QS +*/ + + + /*! Set the "current object" in the Target +* @static @private @memberof QS +* +* @details +* This function sets the "current object" in the Target. +*/ + + + Q_REQUIRE_ID(100, obj_kind < Q_DIM(QS_rxPriv_.currObj)); +QS_rxPriv_.currObj[obj_kind] = obj_ptr; + + + /*! Query the "current object" in the Target +* @static @public @memberof QS +* +* @details +* This function programmatically generates the response to the query for +* a "current object". +*/ + + if (QS_rxPriv_.currObj[obj_kind] != (void *)0) { + QS_CRIT_STAT_ + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_QUERY_DATA); + QS_TIME_PRE_(); /* timestamp */ + QS_U8_PRE_(obj_kind); /* object kind */ + QS_OBJ_PRE_(QS_rxPriv_.currObj[obj_kind]); + switch (obj_kind) { + case SM_OBJ: /* intentionally fall through */ + case AO_OBJ: + QS_FUN_PRE_((*((QHsm *)QS_rxPriv_.currObj[obj_kind])->vptr + ->getStateHandler)( + ((QHsm *)QS_rxPriv_.currObj[obj_kind]))); + break; + case MP_OBJ: + QS_MPC_PRE_(((QMPool *)QS_rxPriv_.currObj[obj_kind]) + ->nFree); + QS_MPC_PRE_(((QMPool *)QS_rxPriv_.currObj[obj_kind]) + ->nMin); + break; + case EQ_OBJ: + QS_EQC_PRE_(((QEQueue *)QS_rxPriv_.currObj[obj_kind]) + ->nFree); + QS_EQC_PRE_(((QEQueue *)QS_rxPriv_.currObj[obj_kind]) + ->nMin); + break; + case TE_OBJ: + QS_OBJ_PRE_(((QTimeEvt *)QS_rxPriv_.currObj[obj_kind]) + ->act); + QS_TEC_PRE_(((QTimeEvt *)QS_rxPriv_.currObj[obj_kind]) + ->ctr); + QS_TEC_PRE_(((QTimeEvt *)QS_rxPriv_.currObj[obj_kind]) + ->interval); + QS_SIG_PRE_(((QTimeEvt *)QS_rxPriv_.currObj[obj_kind]) + ->super.sig); + QS_U8_PRE_ (((QTimeEvt *)QS_rxPriv_.currObj[obj_kind]) + ->super.refCtr_); + break; + default: + /* intentionally empty */ + break; + } + QS_endRec_(); + QS_CRIT_X_(); + + QS_REC_DONE(); /* user callback (if defined) */ +} +else { + QS_rxReportError_((int8_t)QS_RX_QUERY_CURR); +} + + + /*! Parse all bytes present in the QS RX data buffer +* @static @private @memberof QS +*/ + QSCtr tail = QS_rxPriv_.tail; +while (QS_rxPriv_.head != tail) { /* QS-RX buffer NOT empty? */ + uint8_t b = QS_rxPriv_.buf[tail]; + + ++tail; + if (tail == QS_rxPriv_.end) { + tail = 0U; + } + QS_rxPriv_.tail = tail; /* update the tail to a *valid* index */ + + if (l_rx.esc != 0U) { /* escaped byte arrived? */ + l_rx.esc = 0U; + b ^= QS_ESC_XOR; + + l_rx.chksum += b; + QS_rxParseData_(b); + } + else if (b == QS_ESC) { + l_rx.esc = 1U; + } + else if (b == QS_FRAME) { + /* get ready for the next frame */ + b = l_rx.state; /* save the current state in b */ + l_rx.esc = 0U; + QS_RX_TRAN_(WAIT4_SEQ); + + if (l_rx.chksum == QS_GOOD_CHKSUM) { + l_rx.chksum = 0U; + QS_rxHandleGoodFrame_(b); + } + else { /* bad checksum */ + l_rx.chksum = 0U; + QS_rxReportError_(0x41); + QS_rxHandleBadFrame_(b); + } + } + else { + l_rx.chksum += b; + QS_rxParseData_(b); + } +} + + + /*! internal function to handle incoming (QS-RX) packet +* @static @private @memberof QS +*/ + + uint8_t i; +uint8_t *ptr; +QS_CRIT_STAT_ + +switch (state) { + case WAIT4_INFO_FRAME: { + /* no need to report Ack or Done */ + QS_CRIT_E_(); + QS_target_info_pre_(0U); /* send only Target info */ + QS_CRIT_X_(); + break; + } + case WAIT4_RESET_FRAME: { + /* no need to report Ack or Done, because Target resets */ + QS_onReset(); /* reset the Target */ + break; + } + case WAIT4_CMD_PARAM1: /* intentionally fall-through */ + case WAIT4_CMD_PARAM2: /* intentionally fall-through */ + case WAIT4_CMD_PARAM3: /* intentionally fall-through */ + case WAIT4_CMD_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_COMMAND); + QS_onCommand(l_rx.var.cmd.cmdId, l_rx.var.cmd.param1, + l_rx.var.cmd.param2, l_rx.var.cmd.param3); +#ifdef Q_UTEST + QS_processTestEvts_(); /* process all events produced */ +#endif + QS_rxReportDone_((int8_t)QS_RX_COMMAND); + break; + } + case WAIT4_TICK_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TICK); +#ifdef Q_UTEST + QTimeEvt_tick1_((uint_fast8_t)l_rx.var.tick.rate, &QS_rxPriv_); + QS_processTestEvts_(); /* process all events produced */ +#else + QTimeEvt_tick_((uint_fast8_t)l_rx.var.tick.rate, &QS_rxPriv_); +#endif + QS_rxReportDone_((int8_t)QS_RX_TICK); + break; + } + case WAIT4_PEEK_FRAME: { + + /* no need to report Ack or Done */ + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_PEEK_DATA); + ptr = (uint8_t *)QS_rxPriv_.currObj[AP_OBJ]; + ptr = &ptr[l_rx.var.peek.offs]; + QS_TIME_PRE_(); /* timestamp */ + QS_U16_PRE_(l_rx.var.peek.offs); /* data offset */ + QS_U8_PRE_(l_rx.var.peek.size); /* data size */ + QS_U8_PRE_(l_rx.var.peek.num); /* number of data items */ + for (i = 0U; i < l_rx.var.peek.num; ++i) { + switch (l_rx.var.peek.size) { + case 1: + QS_U8_PRE_(ptr[i]); + break; + case 2: + QS_U16_PRE_(((uint16_t *)ptr)[i]); + break; + case 4: + QS_U32_PRE_(((uint32_t *)ptr)[i]); + break; + default: + /* intentionally empty */ + break; + } + } + QS_endRec_(); + QS_CRIT_X_(); + + QS_REC_DONE(); /* user callback (if defined) */ + break; + } + case WAIT4_POKE_DATA: { + /* received less than expected poke data items */ + QS_rxReportError_((int8_t)QS_RX_POKE); + break; + } + case WAIT4_POKE_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_POKE); + /* no need to report done */ + break; + } + case WAIT4_FILL_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_FILL); + ptr = (uint8_t *)QS_rxPriv_.currObj[AP_OBJ]; + ptr = &ptr[l_rx.var.poke.offs]; + for (i = 0U; i < l_rx.var.poke.num; ++i) { + switch (l_rx.var.poke.size) { + case 1: + ptr[i] = (uint8_t)l_rx.var.poke.data; + break; + case 2: + ((uint16_t *)ptr)[i] + = (uint16_t)l_rx.var.poke.data; + break; + case 4: + ((uint32_t *)ptr)[i] = l_rx.var.poke.data; + break; + default: + /* intentionally empty */ + break; + } + } + break; + } + case WAIT4_FILTER_FRAME: { + QS_rxReportAck_(l_rx.var.flt.recId); + + /* apply the received filters */ + if (l_rx.var.flt.recId == (int8_t)QS_RX_GLB_FILTER) { + for (i = 0U; i < Q_DIM(QS_priv_.glbFilter); ++i) { + QS_priv_.glbFilter[i] = l_rx.var.flt.data[i]; + } + /* leave the "not maskable" filters enabled, + * see qs.h, Miscellaneous QS records (not maskable) + */ + QS_priv_.glbFilter[0] |= 0x01U; + QS_priv_.glbFilter[7] |= 0xFCU; + QS_priv_.glbFilter[8] |= 0x7FU; + + /* never enable the last 3 records (0x7D, 0x7E, 0x7F) */ + QS_priv_.glbFilter[15] &= 0x1FU; + } + else if (l_rx.var.flt.recId == (int8_t)QS_RX_LOC_FILTER) { + for (i = 0U; i < Q_DIM(QS_priv_.locFilter); ++i) { + QS_priv_.locFilter[i] = l_rx.var.flt.data[i]; + } + /* leave QS_ID == 0 always on */ + QS_priv_.locFilter[0] |= 0x01U; + } + else { + QS_rxReportError_(l_rx.var.flt.recId); + } + /* no need to report Done */ + break; + } + case WAIT4_OBJ_FRAME: { + i = l_rx.var.obj.kind; + if (i < (uint8_t)MAX_OBJ) { + if (l_rx.var.obj.recId == (int8_t)QS_RX_CURR_OBJ) { + QS_rxPriv_.currObj[i] = (void *)l_rx.var.obj.addr; + QS_rxReportAck_((int8_t)QS_RX_CURR_OBJ); + } + else if (l_rx.var.obj.recId == (int8_t)QS_RX_AO_FILTER) { + if (l_rx.var.obj.addr != 0U) { + int_fast16_t const filter = + (int_fast16_t)((QActive *)l_rx.var.obj.addr)->prio; + QS_locFilter_((i == 0U) + ? filter + :-filter); + QS_rxReportAck_((int8_t)QS_RX_AO_FILTER); + } + else { + QS_rxReportError_((int8_t)QS_RX_AO_FILTER); + } + } + else { + QS_rxReportError_(l_rx.var.obj.recId); + } + } + /* both SM and AO */ + else if (i == (uint8_t)SM_AO_OBJ) { + if (l_rx.var.obj.recId == (int8_t)QS_RX_CURR_OBJ) { + QS_rxPriv_.currObj[SM_OBJ] = (void *)l_rx.var.obj.addr; + QS_rxPriv_.currObj[AO_OBJ] = (void *)l_rx.var.obj.addr; + } + QS_rxReportAck_(l_rx.var.obj.recId); + } + else { + QS_rxReportError_(l_rx.var.obj.recId); + } + break; + } + case WAIT4_QUERY_FRAME: { + QS_queryCurrObj(l_rx.var.obj.kind); + break; + } + case WAIT4_EVT_FRAME: { + /* NOTE: Ack was already reported in the WAIT4_EVT_LEN state */ +#ifdef Q_UTEST + QS_onTestEvt(l_rx.var.evt.e); /* adjust the event, if needed */ +#endif /* Q_UTEST */ + i = 0U; /* use 'i' as status, 0 == success,no-recycle */ + + if (l_rx.var.evt.prio == 0U) { /* publish */ + QActive_publish_(l_rx.var.evt.e, &QS_rxPriv_, 0U); + } + else if (l_rx.var.evt.prio < QF_MAX_ACTIVE) { + if (!QACTIVE_POST_X(QActive_registry_[l_rx.var.evt.prio], + l_rx.var.evt.e, + 0U, /* margin */ + &QS_rxPriv_)) + { + /* failed QACTIVE_POST() recycles the event */ + i = 0x80U; /* failure status, no recycle */ + } + } + else if (l_rx.var.evt.prio == 255U) { /* special prio */ + /* dispatch to the current SM object */ + if (QS_rxPriv_.currObj[SM_OBJ] != (void *)0) { + /* increment the ref-ctr to simulate the situation + * when the event is just retreived from a queue. + * This is expected for the following QF_gc() call. + */ + ++l_rx.var.evt.e->refCtr_; + + QHSM_DISPATCH((QHsm *)QS_rxPriv_.currObj[SM_OBJ], + l_rx.var.evt.e, 0U); + i = 0x01U; /* success status, recycle needed */ + } + else { + i = 0x81U; /* failure status, recycle needed */ + } + } + else if (l_rx.var.evt.prio == 254U) { /* special prio */ + /* init the current SM object" */ + if (QS_rxPriv_.currObj[SM_OBJ] != (void *)0) { + /* increment the ref-ctr to simulate the situation + * when the event is just retreived from a queue. + * This is expected for the following QF_gc() call. + */ + ++l_rx.var.evt.e->refCtr_; + + QHSM_INIT((QHsm *)QS_rxPriv_.currObj[SM_OBJ], + l_rx.var.evt.e, 0U); + i = 0x01U; /* success status, recycle needed */ + } + else { + i = 0x81U; /* failure status, recycle needed */ + } + } + else if (l_rx.var.evt.prio == 253U) { /* special prio */ + /* post to the current AO */ + if (QS_rxPriv_.currObj[AO_OBJ] != (void *)0) { + if (!QACTIVE_POST_X( + (QActive *)QS_rxPriv_.currObj[AO_OBJ], + l_rx.var.evt.e, + 0U, /* margin */ + &QS_rxPriv_)) + { + /* failed QACTIVE_POST() recycles the event */ + i = 0x80U; /* failure status, no recycle */ + } + } + else { + i = 0x81U; /* failure status, recycle needed */ + } + } + else { + i = 0x81U; /* failure status, recycle needed */ + } + + if ((i & 0x01U) != 0U) { /* recycle needed? */ + QF_gc(l_rx.var.evt.e); + } + + if ((i & 0x80U) != 0U) { /* failure? */ + QS_rxReportError_((int8_t)QS_RX_EVENT); + } + else { +#ifdef Q_UTEST + QS_processTestEvts_(); /* process all events produced */ +#endif + QS_rxReportDone_((int8_t)QS_RX_EVENT); + } + break; + } + +#ifdef Q_UTEST + case WAIT4_TEST_SETUP_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TEST_SETUP); + QS_testData.tpNum = 0U; /* clear the Test-Probes */ + QS_testData.testTime = 0U; /* clear the time tick */ + /* don't clear current objects */ + QS_onTestSetup(); /* application-specific test setup */ + /* no need to report Done */ + break; + } + case WAIT4_TEST_TEARDOWN_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TEST_TEARDOWN); + QS_onTestTeardown(); /* application-specific test teardown */ + /* no need to report Done */ + break; + } + case WAIT4_TEST_CONTINUE_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TEST_CONTINUE); + QS_rxPriv_.inTestLoop = false; /* exit the QUTest loop */ + /* no need to report Done */ + break; + } + case WAIT4_TEST_PROBE_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TEST_PROBE); + Q_ASSERT_ID(815, QS_testData.tpNum + < (sizeof(QS_testData.tpBuf) / sizeof(QS_testData.tpBuf[0]))); + QS_testData.tpBuf[QS_testData.tpNum] = l_rx.var.tp; + ++QS_testData.tpNum; + /* no need to report Done */ + break; + } +#endif /* Q_UTEST */ + + case ERROR_STATE: { + /* keep ignoring all bytes until new frame */ + break; + } + default: { + QS_rxReportError_(0x47); + break; + } +} + + + + /*! callback function to reset the Target (to be implemented in the BSP) +* @static @public @memberof QS +*/ + + + /*! Callback function to execute user commands (to be implemented in BSP) +* @static @public @memberof QS +*/ + + + + + + + /*! Put one byte into the QS RX lock-free buffer +* @static @public @memberof QSrx +*/ + + QSCtr head = QS_rxPriv_.head + 1U; +if (head == QS_rxPriv_.end) { + head = 0U; +} +if (head != QS_rxPriv_.tail) { /* buffer NOT full? */ + QS_rxPriv_.buf[QS_rxPriv_.head] = b; + QS_rxPriv_.head = head; /* update the head to a *valid* index */ + return true; /* byte placed in the buffer */ +} +else { + return false; /* byte NOT placed in the buffer */ +} + + + + + + + /*! @brief Test Probe attributes */ + { + QSFun addr; + uint32_t data; + uint8_t idx; +}; + + + /*! @brief QUTest data */ + { + struct QS_TProbe tpBuf[16]; /*!< buffer of Test-Probes received so far */ + uint8_t tpNum; /*!< current number of Test-Probes */ + QSTimeCtr testTime; /*!< test time (tick counter) */ +}; + + + /*! QUTest data */ + + + /*! internal function to process posted events during test +* @static @private @memberof QS +*/ + QS_TEST_PROBE_DEF(&QS_processTestEvts_) + +/* return immediately (do nothing) for Test Probe != 0 */ +QS_TEST_PROBE(return;) + +while (QPSet_notEmpty(&QF_readySet_)) { + uint_fast8_t const p = QPSet_findMax(&QF_readySet_); + QActive * const a = QActive_registry_[p]; + + /* perform the run-to-completion (RTC) step... + * 1. retrieve the event from the AO's event queue, which by this + * time must be non-empty and The "Vanialla" kernel asserts it. + * 2. dispatch the event to the AO's state machine. + * 3. determine if event is garbage and collect it if so + */ + QEvt const * const e = QActive_get_(a); + QHSM_DISPATCH(&a->super, e, a->prio); + QF_gc(e); + + if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ + QPSet_remove(&QF_readySet_, p); + } +} + + + /*! internal function to pause test and enter the test event loop +* @static @private @memberof QS +*/ + QS_beginRec_((uint_fast8_t)QS_TEST_PAUSED); +QS_endRec_(); +QS_onTestLoop(); + + + /*! get the test probe data for the given API +* @static @private @memberof QS +*/ + + uint32_t data = 0U; +uint_fast8_t i; +for (i = 0U; i < QS_testData.tpNum; ++i) { + uint_fast8_t j; + + if (QS_testData.tpBuf[i].addr == (QSFun)api) { + QS_CRIT_STAT_ + + data = QS_testData.tpBuf[i].data; + + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_TEST_PROBE_GET); + QS_TIME_PRE_(); /* timestamp */ + QS_FUN_PRE_(api); /* the calling API */ + QS_U32_PRE_(data); /* the Test-Probe data */ + QS_endRec_(); + QS_CRIT_X_(); + + QS_REC_DONE(); /* user callback (if defined) */ + + --QS_testData.tpNum; /* one less Test-Probe */ + /* move all remaining entries in the buffer up by one */ + for (j = i; j < QS_testData.tpNum; ++j) { + QS_testData.tpBuf[j] = QS_testData.tpBuf[j + 1U]; + } + break; /* we are done (Test-Probe retreived) */ + } +} +return data; + + + /*! callback to setup a unit test inside the Target +* @static @public @memberof QS +*/ + + + /*! callback to teardown after a unit test inside the Target +* @static @public @memberof QS +*/ + + + /*! callback to "massage" the test event before dispatching/posting it +* @static @public @memberof QS +*/ + + + + /*! callback to examine an event that is about to be posted +* @static @public @memberof QS +*/ + + + + + + + /*! callback to run the test loop +* @static @public @memberof QS +*/ + + + + /*! @brief QHsmDummy class +* @class QHsmDummy +* @extends QHsm +* +* @details +* ::QHsmDummy is a test double for the role of "Orthogonal Components" +* HSM objects in QUTest unit testing. +*/ + + /*! Constructor of the QHsmDummy HSM class +* @public @memberof QHsmDummy +*/ + static struct QHsmVtable const vtable = { /* QHsm virtual table */ + &QHsmDummy_init_, + &QHsmDummy_dispatch_ +#ifdef Q_SPY + ,&QHsm_getStateHandler_ +#endif +}; +/* superclass' ctor */ +QHsm_ctor(&me->super, Q_STATE_CAST(0)); +me->super.vptr = &vtable; /* hook the vptr */ + + + /*! override for QHsm_init_() +* @private @memberof QHsmDummy +*/ + + + + Q_UNUSED_PAR(par); + +QS_CRIT_STAT_ +QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(me->state.fun); /* the source state */ + QS_FUN_PRE_(me->temp.fun); /* the target of the initial transition */ +QS_END_PRE_() + + + /*! override for QHsm_dispatch_() +* @private @memberof QHsmDummy +*/ + + + + QS_CRIT_STAT_ +QS_BEGIN_PRE_(QS_QEP_DISPATCH, qs_id) + QS_TIME_PRE_(); /* time stamp */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this state machine object */ + QS_FUN_PRE_(me->state.fun); /* the current state */ +QS_END_PRE_() + + + + /*! @brief QActiveDummy Object class +* @class QActiveDummy +* @extends QActive +* +* @details +* QActiveDummy is a test double for the role of collaborating active +* objects in QUTest unit testing. +*/ + + /*! Constructor of the QActiveDummy Active Object class +* @public @memberof QActiveDummy +*/ + static QActiveVtable const vtable = { /* QActive virtual table */ + { &QActiveDummy_init_, + &QActiveDummy_dispatch_ +#ifdef Q_SPY + ,&QHsm_getStateHandler_ +#endif + }, + &QActiveDummy_start_, + &QActiveDummy_post_, + &QActiveDummy_postLIFO_ +}; +/* superclass' ctor */ +QActive_ctor(&me->super, Q_STATE_CAST(0)); +me->super.super.vptr = &vtable.super; /* hook the vptr */ + + + /*! override for QHsm_init_() +* @private @memberof QActiveDummy +*/ + + + + (void)qs_id; /* unused parameter */ + +QHsmDummy_init_(me, par, ((QActive const *)me)->prio); + + + /*! override for QHsm_dispatch_() +* @private @memberof QActiveDummy +*/ + + + + (void)qs_id; /* unused parameter */ + +QHsmDummy_dispatch_(me, e, ((QActive const *)me)->prio); + + + /*! override for QActive_start_() +* @private @memberof QActiveDummy +*/ + + + + + + + + /* No special preconditions for checking parameters to allow starting +* dummy AOs the exact same way as the real counterparts. +*/ +(void)qSto; /* unusuded parameter */ +(void)qLen; /* unusuded parameter */ +(void)stkSto; /* unusuded parameter */ +(void)stkSize; /* unusuded parameter */ + +me->prio = (uint8_t)prio; /* set the current priority of the AO */ + +QActive_register_(me); /* make QF aware of this active object */ + +/* the top-most initial tran. (virtual) */ +QHSM_INIT(&me->super, par, me->prio); +//QS_FLUSH(); + + + /*! override for QActive_post_() +* @private @memberof QActiveDummy +*/ + + + + + QS_TEST_PROBE_DEF(&QActive_post_) + +/* test-probe#1 for faking queue overflow */ +bool status = true; +QS_TEST_PROBE_ID(1, + status = false; + if (margin == QF_NO_MARGIN) { + /* fake assertion Mod=qf_actq,Loc=110 */ + Q_onAssert("qf_actq", 110); + } +) + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +/* is it a dynamic event? */ +if (e->poolId_ != 0U) { + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ +} + +uint_fast8_t const rec = (status ? (uint_fast8_t)QS_QF_ACTIVE_POST + : (uint_fast8_t)QS_QF_ACTIVE_POST_ATTEMPT); +QS_BEGIN_NOCRIT_PRE_(rec, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & refCtr of the evt */ + QS_EQC_PRE_(0U); /* number of free entries */ + QS_EQC_PRE_(margin); /* margin requested */ +QS_END_NOCRIT_PRE_() + +/* callback to examine the posted event under the same conditions +* as producing the #QS_QF_ACTIVE_POST trace record, which are: +* the local filter for this AO ('me->prio') is set +*/ +if ((QS_priv_.locFilter[me->prio >> 3U] + & (1U << (me->prio & 7U))) != 0U) +{ + QS_onTestPost(sender, me, e, status); +} +QF_CRIT_X_(); + +/* recycle the event immediately, because it was not really posted */ +QF_gc(e); + +return status; /* the event is "posted" correctly */ + + + /*! override for QActive_postLIFO_() +* @private @memberof QActiveDummy +*/ + + + QS_TEST_PROBE_DEF(&QActive_postLIFO_) + +/* test-probe#1 for faking queue overflow */ +QS_TEST_PROBE_ID(1, + /* fake assertion Mod=qf_actq,Loc=210 */ + Q_onAssert("qf_actq", 210); +) + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +/* is it a dynamic event? */ +if (e->poolId_ != 0U) { + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ +} + +QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & refCtr of the evt */ + QS_EQC_PRE_(0U); /* number of free entries */ + QS_EQC_PRE_(0U); /* min number of free entries */ +QS_END_NOCRIT_PRE_() + +/* callback to examine the posted event under the same conditions +* as producing the #QS_QF_ACTIVE_POST trace record, which are: +* the local filter for this AO ('me->prio') is set +*/ +if ((QS_priv_.locFilter[me->prio >> 3U] + & (1U << (me->prio & 7U))) != 0U) +{ + QS_onTestPost((QActive *)0, me, e, true); +} + +QF_CRIT_X_(); + +/* recycle the event immediately, because it was not really posted */ +QF_gc(e); + + + + /*! record-ID for posting events */ + 124 + + + + + + /*! QF initialization for QUTest */ + /* Clear the internal QF variables, so that the framework can start +* correctly even if the startup code fails to clear the uninitialized +* data (as is required by the C Standard). +*/ +QF_maxPool_ = 0U; +QF_intNest_ = 0U; +QActive_subscrList_ = (QSubscrList *)0; +QActive_maxPubSignal_ = 0; + +QF_bzero(&QActive_registry_[0], sizeof(QActive_registry_)); +QF_bzero(&QF_readySet_, sizeof(QF_readySet_)); + + + /*! stop the QF customization for QUTest */ + QS_onReset(); + + + /*! QF_run() customization for QUTest */ + /* function dictionaries for the standard API */ +QS_FUN_DICTIONARY(&QActive_post_); +QS_FUN_DICTIONARY(&QActive_postLIFO_); +QS_FUN_DICTIONARY(&QS_processTestEvts_); + +/* produce the QS_QF_RUN trace record */ +QS_CRIT_STAT_ +QS_BEGIN_PRE_(QS_QF_RUN, 0U) +QS_END_PRE_() + +QS_onTestLoop(); /* run the test loop */ +QS_onCleanup(); /* application cleanup */ +return 0; /* return no error */ + + + + + /*! callback to provide time-stampe (QUTest customization) */ + return (++QS_testData.testTime); + + + + /*! QActive active object class customization for QUTest */ + + /*! QActive_start_() customization for QUTest +* @public @memberof QActive +*/ + + + + + + + (void)stkSto; /* unused parameter */ +(void)stkSize; /* unused parameter */ + +/* priority must be in range */ +Q_REQUIRE_ID(200, (0U < prio) && (prio <= QF_MAX_ACTIVE)); + +QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ +me->prio = (uint8_t)prio; /* set the current priority of the AO */ + +QActive_register_(me); /* make QF aware of this active object */ + +QHSM_INIT(&me->super, par, me->prio); /* the top-most initial tran. */ + + + /*! Stops execution of an active object and unregisters the object +* with the framework customized for QUTest +* @public @memberof QActive +*/ + QActive_unsubscribeAll(me); /* unsubscribe from all events */ +QActive_unregister_(me); /* un-register this active object */ + + + + /*! QTimeEvt class customization for QUTest */ + + /*! Processes one clock tick for QUTest */ + + + QF_CRIT_STAT_ +QF_CRIT_E_(); + +QTimeEvt *prev = &QTimeEvt_timeEvtHead_[tickRate]; + +QS_BEGIN_NOCRIT_PRE_(QS_QF_TICK, 0U) + ++prev->ctr; + QS_TEC_PRE_(prev->ctr); /* tick ctr */ + QS_U8_PRE_(tickRate); /* tick rate */ +QS_END_NOCRIT_PRE_() + +/* is current Time Event object provided? */ +QTimeEvt *t = (QTimeEvt *)QS_rxPriv_.currObj[TE_OBJ]; +if (t != (QTimeEvt *)0) { + + /* the time event must be armed */ + Q_ASSERT_ID(810, t->ctr != 0U); + + /* temp. for volatile */ + QActive * const act = (QActive * const)(t->act); + + /* the recipient AO must be provided */ + Q_ASSERT_ID(820, act != (QActive *)0); + + /* periodic time evt? */ + if (t->interval != 0U) { + t->ctr = t->interval; /* rearm the time event */ + } + else { /* one-shot time event: automatically disarm */ + t->ctr = 0U; /* auto-disarm */ + /* mark time event 't' as NOT linked */ + t->super.refCtr_ &= (uint8_t)(~(uint8_t)QTE_IS_LINKED); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_AUTO_DISARM, act->prio) + QS_OBJ_PRE_(t); /* this time event object */ + QS_OBJ_PRE_(act); /* the target AO */ + QS_U8_PRE_(tickRate); /* tick rate */ + QS_END_NOCRIT_PRE_() + } + + QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_POST, act->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(t); /* the time event object */ + QS_SIG_PRE_(t->super.sig); /* signal of this time event */ + QS_OBJ_PRE_(act); /* the target AO */ + QS_U8_PRE_(tickRate); /* tick rate */ + QS_END_NOCRIT_PRE_() + + QF_CRIT_X_(); /* exit critical section before posting */ + + QACTIVE_POST(act, &t->super, sender); /* asserts if queue overflows */ + + QF_CRIT_E_(); +} + +/* update the linked list of time events */ +for (;;) { + t = prev->next; /* advance down the time evt. list */ + + /* end of the list? */ + if (t == (QTimeEvt *)0) { + + /* any new time events armed since the last QTimeEvt_tick_()? */ + if (QTimeEvt_timeEvtHead_[tickRate].act != (void *)0) { + + /* sanity check */ + Q_ASSERT_CRIT_(830, prev != (QTimeEvt *)0); + prev->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act; + QTimeEvt_timeEvtHead_[tickRate].act = (void *)0; + t = prev->next; /* switch to the new list */ + } + else { + break; /* all currently armed time evts. processed */ + } + } + + /* time event scheduled for removal? */ + if (t->ctr == 0U) { + prev->next = t->next; + /* mark time event 't' as NOT linked */ + t->super.refCtr_ &= (uint8_t)(~(uint8_t)QTE_IS_LINKED); + /* do NOT advance the prev pointer */ + QF_CRIT_X_(); /* exit crit. section to reduce latency */ + + /* prevent merging critical sections, see NOTE1 below */ + QF_CRIT_EXIT_NOP(); + } + else { + prev = t; /* advance to this time event */ + QF_CRIT_X_(); /* exit crit. section to reduce latency */ + + /* prevent merging critical sections, see NOTE1 below */ + QF_CRIT_EXIT_NOP(); + } + QF_CRIT_E_(); /* re-enter crit. section to continue */ +} + +QF_CRIT_X_(); + + + + + /*! Assertion handler customization for QUTest */ + + + QS_BEGIN_NOCRIT_PRE_(QS_ASSERT_FAIL, 0U) + QS_TIME_PRE_(); + QS_U16_PRE_(location); + QS_STR_PRE_((module != (char *)0) ? module : "?"); +QS_END_NOCRIT_PRE_() + +QS_onFlush(); /* flush the assertion record to the host */ +QS_onTestLoop(); /* loop to wait for commands (typically reset) */ +QS_onReset(); /* in case the QUTEST loop ever returns, reset manually */ +for (;;) { /* QS_onReset() should not return, but to ensure no-return */ +} + + + + + + /*! @brief QV cooperative kernel +* @class QV +*/ + { + uint8_t dummy; /*< dummy attribute */ +} QV; + + + /*! QV idle callback (customized in BSPs) +* @static @public @memberof QV +* +* @details +* QV_onIdle() is called by the cooperative QV kernel (from QF_run()) when +* the scheduler detects that no events are available for active objects +* (the idle condition). This callback gives the application an opportunity +* to enter a power-saving CPU mode, or perform some other idle processing +* (such as QS software tracing output). +* +* @note +* QV_onIdle() is invoked with interrupts **DISABLED** because the idle +* condition can be asynchronously changed at any time by an interrupt. +* QV_onIdle() MUST enable the interrupts internally, but not before +* putting the CPU into the low-power mode. (Ideally, enabling interrupts and +* low-power mode should happen atomically). At the very least, the function +* MUST enable interrupts, otherwise interrupts will remain disabled +* permanently. +*/ + + + + + /*! QF initialization for QV */ + QF_maxPool_ = 0U; +QActive_subscrList_ = (QSubscrList *)0; +QActive_maxPubSignal_ = 0; + +QF_bzero(&QTimeEvt_timeEvtHead_[0], sizeof(QTimeEvt_timeEvtHead_)); +QF_bzero(&QActive_registry_[0], sizeof(QActive_registry_)); +QF_bzero(&QF_readySet_, sizeof(QF_readySet_)); + +#ifdef QV_INIT +QV_INIT(); /* port-specific initialization of the QV kernel */ +#endif + + + /*! stop the QF customization for QV +* +* @sa QF_onCleanup() +*/ + QF_onCleanup(); /* application-specific cleanup callback */ +/* nothing else to do for the cooperative QV kernel */ + + + /*! QF_run() customization for QV kernel */ + #ifdef Q_SPY +uint_fast8_t pprev = 0U; /* previously used priority */ +#endif + +QF_onStartup(); /* application-specific startup callback */ + +/* the combined event-loop and background-loop of the QV kernel... */ +QF_INT_DISABLE(); + +/* produce the QS_QF_RUN trace record */ +QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, 0U) +QS_END_NOCRIT_PRE_() + +for (;;) { + /* find the maximum priority AO ready to run */ + if (QPSet_notEmpty(&QF_readySet_)) { + uint_fast8_t const p = QPSet_findMax(&QF_readySet_); + QActive * const a = QActive_registry_[p]; + +#ifdef Q_SPY + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(p, /* priority of the scheduled AO */ + pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() + + pprev = p; /* update previous priority */ +#endif /* Q_SPY */ + + QF_INT_ENABLE(); + + /* perform the run-to-completion (RTC) step... + * 1. retrieve the event from the AO's event queue, which by this + * time must be non-empty and The "Vanialla" kernel asserts it. + * 2. dispatch the event to the AO's state machine. + * 3. determine if event is garbage and collect it if so + */ + QEvt const * const e = QActive_get_(a); + QHSM_DISPATCH(&a->super, e, a->prio); + QF_gc(e); + + QF_INT_DISABLE(); + + if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ + QPSet_remove(&QF_readySet_, p); + } + } + else { /* no AO ready to run --> idle */ +#ifdef Q_SPY + if (pprev != 0U) { + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_IDLE, 0U) + QS_TIME_PRE_(); /* timestamp */ + QS_U8_PRE_(pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() + + pprev = 0U; /* update previous priority */ + } +#endif /* Q_SPY */ + + /* QV_onIdle() must be called with interrupts DISABLED because + * the determination of the idle condition (no events in the + * queues) can change at any time by an interrupt posting events + * to a queue. QV_onIdle() MUST enable interrupts internally, + * perhaps at the same time as putting the CPU into a power-saving + * mode. + */ + QV_onIdle(); + + QF_INT_DISABLE(); + } +} +#ifdef __GNUC__ /* GNU compiler? */ +return 0; +#endif + + + + /*! QActive active object class customization for QV */ + + /*! Starts execution of an active object and registers the object +* with the framework customized for QV +*/ + + + + + + + Q_UNUSED_PAR(stkSize); + +/*! @pre The priority must be in range and the stack storage must not +* be provided, because the QV kernel does not need per-AO stacks. +*/ +Q_REQUIRE_ID(500, (0U < prio) && (prio <= QF_MAX_ACTIVE) + && (stkSto == (void *)0)); + +QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ +me->prio = (uint8_t)prio; /* set the current priority of the AO */ +QActive_register_(me); /* register this active object */ + +QHSM_INIT(&me->super, par, me->prio); /* top-most initial tran. */ +QS_FLUSH(); /* flush the trace buffer to the host */ + + + + + + /*! QV scheduler lock status (not needed in QV) */ + + + /*! QV scheduler locking (not needed in QV) */ + + ((void)0) + + + /*! QV scheduler unlocking (not needed in QV) */ + ((void)0) + + + * QV native event queue waiting + + \ + Q_ASSERT_ID(0, (me_)->eQueue.frontEvt != (QEvt *)0) + + + /*! QV native event queue signaling */ + + \ + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio) + + + + + + /*! @brief QK preemptive non-blocking kernel +* @class QK +*/ + { + uint8_t volatile actPrio; /*!< prio of the active AO */ + uint8_t volatile nextPrio; /*!< prio of the next AO to execute */ + uint8_t volatile lockPrio; /*!< lock prio (0 == no-lock) */ + uint8_t volatile lockHolder; /*!< prio of the AO holding the lock */ +} QK; + + + /*! attributes of the QK kernel */ + + + /*! QK activator activates the next active object. The activated AO preempts +* the currently executing AOs. +* @static @private @memberof QK +* +* @details +* QK_activate_() activates ready-to run AOs that are above the initial +* active priority (QK_attr_.actPrio). +* +* @note +* The activator might enable interrupts internally, but always returns with +* interrupts **disabled**. +*/ + uint_fast8_t const pin = (uint_fast8_t)QK_attr_.actPrio; /* save */ +uint_fast8_t p = (uint_fast8_t)QK_attr_.nextPrio; /* next prio to run */ +#if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) +uint_fast8_t pprev; +#endif /* QK_ON_CONTEXT_SW || Q_SPY */ + +/* QK_attr_.actPrio and QK_attr_.nextPrio must be in range */ +Q_REQUIRE_ID(500, (pin < QF_MAX_ACTIVE) + && (0U < p) && (p < QF_MAX_ACTIVE)); + +#if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) +pprev = pin; +#endif /* QK_ON_CONTEXT_SW || Q_SPY */ + +QK_attr_.nextPrio = 0U; /* clear for the next time */ + +/* loop until no more ready-to-run AOs of higher prio than the initial */ +QActive *a; +do { + QEvt const *e; + a = QActive_registry_[p]; /* obtain the pointer to the AO */ + QK_attr_.actPrio = (uint8_t)p; /* this becomes the active prio */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(p, /* priority of the scheduled AO */ + pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() + +#if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) + if (p != pprev) { /* changing threads? */ + +#ifdef QK_ON_CONTEXT_SW + /* context-switch callback*/ + QK_onContextSw(((pprev != 0U) + ? QActive_registry_[pprev] + : (QActive *)0), a); +#endif /* QK_ON_CONTEXT_SW */ + + pprev = p; /* update previous priority */ + } +#endif /* QK_ON_CONTEXT_SW || Q_SPY */ + + QF_INT_ENABLE(); /* unconditionally enable interrupts */ + + /* perform the run-to-completion (RTC) step... + * 1. retrieve the event from the AO's event queue, which by this + * time must be non-empty and QActive_get_() asserts it. + * 2. dispatch the event to the AO's state machine. + * 3. determine if event is garbage and collect it if so + */ + e = QActive_get_(a); + QHSM_DISPATCH(&a->super, e, a->prio); + QF_gc(e); + + /* determine the next highest-priority AO ready to run... */ + QF_INT_DISABLE(); /* unconditionally disable interrupts */ + + if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ + QPSet_remove(&QF_readySet_, p); + } + + /* find new highest-prio AO ready to run... */ + p = QPSet_findMax(&QF_readySet_); + + /* is the new priority below the initial preemption threshold? */ + if (p <= pin) { + p = 0U; + } + else if (p <= (uint_fast8_t)QK_attr_.lockPrio) {/* below lock prio? */ + p = 0U; /* active object not eligible */ + } + else { + Q_ASSERT_ID(510, p <= QF_MAX_ACTIVE); + } +} while (p != 0U); + +QK_attr_.actPrio = (uint8_t)pin; /* restore the active priority */ + +#if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) +if (pin != 0U) { /* resuming an active object? */ + a = QActive_registry_[pin]; /* the pointer to the preempted AO */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_RESUME, a->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(pin, /* priority of the resumed AO */ + pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() +} +else { /* resuming priority==0 --> idle */ + a = (QActive *)0; /* QK idle loop */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_IDLE, 0U) + QS_TIME_PRE_(); /* timestamp */ + QS_U8_PRE_(pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() +} + +#ifdef QK_ON_CONTEXT_SW +QK_onContextSw(QActive_registry_[pprev], a); /* context-switch callback */ +#endif /* QK_ON_CONTEXT_SW */ + +#endif /* QK_ON_CONTEXT_SW || Q_SPY */ + + + + /*! QK scheduler finds the highest-priority thread ready to run +* @static @private @memberof QK +* +* @details +* The QK scheduler finds out the priority of the highest-priority AO +* that (1) has events to process and (2) has priority that is above the +* current priority. +* +* @returns +* the 1-based priority of the the active object, or zero if no eligible +* active object is ready to run. +* +* @attention +* QK_sched_() must be always called with interrupts **disabled** and +* returns with interrupts **disabled**. +*/ + /* find the highest-prio AO with non-empty event queue */ +uint_fast8_t p = QPSet_findMax(&QF_readySet_); + +/* is the highest-prio below the active priority? */ +if (p <= (uint_fast8_t)QK_attr_.actPrio) { + p = 0U; /* no activation needed */ +} +else if (p <= (uint_fast8_t)QK_attr_.lockPrio) { /* below the lock prio?*/ + p = 0U; /* no activation needed */ +} +else { + Q_ASSERT_ID(410, p <= QF_MAX_ACTIVE); + QK_attr_.nextPrio = (uint8_t)p; /* next AO to run */ +} +return p; + + + /*! QK selective scheduler lock +* +* @details +* This function locks the QK scheduler to the specified ceiling. +* +* @param[in] ceiling priority ceiling to which the QK scheduler +* needs to be locked +* +* @returns +* The previous QK Scheduler lock status, which is to be used to unlock +* the scheduler by restoring its previous lock status in +* QK_schedUnlock(). +* +* @note +* QK_schedLock() must be always followed by the corresponding +* QK_schedUnlock(). +* +* @sa QK_schedUnlock() +* +* @usage +* The following example shows how to lock and unlock the QK scheduler: +* @include qk_lock.c +*/ + + QF_CRIT_STAT_ +QF_CRIT_E_(); + +/*! @pre The QK scheduler lock: +* - cannot be called from an ISR; +*/ +Q_REQUIRE_ID(600, !QK_ISR_CONTEXT_()); + +/* first store the previous lock prio */ +QSchedStatus stat; +if (QK_attr_.lockPrio < ceiling) { /* raising lock prio? */ + stat = ((QSchedStatus)QK_attr_.lockPrio << 8U); + QK_attr_.lockPrio = (uint8_t)ceiling; + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_LOCK, 0U) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(stat, /* the previous lock prio */ + QK_attr_.lockPrio); /* the new lock prio */ + QS_END_NOCRIT_PRE_() + + /* add the previous lock holder priority */ + stat |= (QSchedStatus)QK_attr_.lockHolder; + + QK_attr_.lockHolder = QK_attr_.actPrio; +} +else { + stat = 0xFFU; +} +QF_CRIT_X_(); + +return stat; /* return the status to be saved in a stack variable */ + + + /*! QK selective scheduler unlock +* +* @details +* This function unlocks the QK scheduler to the previous status. +* +* @param[in] stat previous QK Scheduler lock status returned from +* QK_schedLock() +* @note +* QK_schedUnlock() must always follow the corresponding +* QK_schedLock(). +* +* @sa QK_schedLock() +* +* @usage +* The following example shows how to lock and unlock the QK scheduler: +* @include qk_lock.c +*/ + + /* has the scheduler been actually locked by the last QK_schedLock()? */ +if (stat != 0xFFU) { + uint_fast8_t const lockPrio = (uint_fast8_t)QK_attr_.lockPrio; + uint_fast8_t const prevPrio = (uint_fast8_t)(stat >> 8U); + QF_CRIT_STAT_ + QF_CRIT_E_(); + + /*! @pre The scheduler cannot be unlocked: + * - from the ISR context; and + * - the current lock priority must be greater than the previous + */ + Q_REQUIRE_ID(700, (!QK_ISR_CONTEXT_()) + && (lockPrio > prevPrio)); + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_UNLOCK, 0U) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(lockPrio, /* lock prio before unlocking */ + prevPrio); /* lock prio after unlocking */ + QS_END_NOCRIT_PRE_() + + /* restore the previous lock priority and lock holder */ + QK_attr_.lockPrio = (uint8_t)prevPrio; + QK_attr_.lockHolder = (uint8_t)(stat & 0xFFU); + + /* find the highest-prio thread ready to run */ + if (QK_sched_() != 0U) { /* priority found? */ + QK_activate_(); /* activate any unlocked basic threads */ + } + + QF_CRIT_X_(); +} + + + /*! QK idle callback (customized in BSPs for QK) +* @static @public @memberof QK +* +* @details +* QK_onIdle() is called continuously by the QK idle loop. This callback +* gives the application an opportunity to enter a power-saving CPU mode, +* or perform some other idle processing. +* +* @note +* QK_onIdle() is invoked with interrupts enabled and must also return with +* interrupts enabled. +*/ + + + /*! QK context switch callback (customized in BSPs for QK) +* @static @public @memberof QK +* +* @details +* This callback function provides a mechanism to perform additional +* custom operations when QK switches context from one thread to +* another. +* +* @param[in] prev pointer to the previous thread (active object) +* (prev==0 means that @p prev was the QK idle loop) +* @param[in] next pointer to the next thread (active object) +* (next==0) means that @p next is the QK idle loop) +* @attention +* QK_onContextSw() is invoked with interrupts **disabled** and must also +* return with interrupts **disabled**. +* +* @note +* This callback is enabled by defining the macro #QK_ON_CONTEXT_SW. +* +* @include qk_oncontextsw.c +*/ + + + + + + + /*! QF initialization for QK */ + QF_maxPool_ = 0U; +QActive_subscrList_ = (QSubscrList *)0; +QActive_maxPubSignal_ = 0; + +QF_bzero(&QTimeEvt_timeEvtHead_[0], sizeof(QTimeEvt_timeEvtHead_)); +QF_bzero(&QActive_registry_[0], sizeof(QActive_registry_)); +QF_bzero(&QK_attr_, sizeof(QK_attr_)); + +QK_attr_.actPrio = 0U; /* priority of the QK idle loop */ +QK_attr_.lockPrio = QF_MAX_ACTIVE; /* scheduler locked */ + +#ifdef QK_INIT +QK_INIT(); /* port-specific initialization of the QK kernel */ +#endif + + + /*! stop the QF customization for QK +* +* @sa QF_onCleanup() +*/ + QF_onCleanup(); /* application-specific cleanup callback */ +/* nothing else to do for the cooperative QK kernel */ + + + /*! QF_run() customization for QK kernel */ + QF_INT_DISABLE(); +QK_attr_.lockPrio = 0U; /* scheduler unlocked */ + +/* any active objects need to be scheduled before starting event loop? */ +if (QK_sched_() != 0U) { + QK_activate_(); /* activate AOs to process all events posted so far */ +} + +QF_onStartup(); /* application-specific startup callback */ + +/* produce the QS_QF_RUN trace record */ +QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, 0U) +QS_END_NOCRIT_PRE_() + +QF_INT_ENABLE(); + +/* the QK idle loop... */ +for (;;) { + QK_onIdle(); /* application-specific QK on-idle callback */ +} +#ifdef __GNUC__ +return 0; +#endif + + + + /*! QActive active object class customization for QK */ + + /*! Starts execution of an active object and registers the object +* with the framework customized for QK +*/ + + + + + + + Q_UNUSED_PAR(stkSize); /* unused in QK */ + +/*! @pre AO cannot be started from an ISR, the priority must be in range +* and the stack storage must not be provided, because the QK kernel does +* not need per-AO stacks. +*/ +Q_REQUIRE_ID(300, (!QK_ISR_CONTEXT_()) + && (0U < prio) && (prio <= QF_MAX_ACTIVE) + && (stkSto == (void *)0)); + +QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ + +me->prio = (uint8_t)prio; /* set the QF priority of the AO */ +QActive_register_(me); /* make QF aware of this active object */ + +QHSM_INIT(&me->super, par, me->prio); /* top-most initial tran. */ +QS_FLUSH(); /* flush the trace buffer to the host */ + +/* See if this AO needs to be scheduled in case QK is already running */ +QF_CRIT_STAT_ +QF_CRIT_E_(); +if (QK_sched_() != 0U) { /* activation needed? */ + QK_activate_(); +} +QF_CRIT_X_(); + + + + + + /*! Internal macro that reports the execution context (ISR vs. thread) +* +* @returns true if the code executes in the ISR context and false +* otherwise +*/ + (QF_intNest_ != 0U) + + + /*! QK scheduler lock status */ + QSchedStatus lockStat_; + + + /*! QK selective scheduler locking */ + + do { \ + if (QK_ISR_CONTEXT_()) { \ + lockStat_ = 0xFFU; \ + } else { \ + lockStat_ = QK_schedLock((prio_)); \ + } \ +} while (false) + + + /*! QK selective scheduler unlocking */ + do { \ + if (lockStat_ != 0xFFU) { \ + QK_schedUnlock(lockStat_); \ + } \ +} while (false) + + + /*! QK native event queue waiting */ + + \ + (Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0)) + + + /*! QK native event queue signaling */ + + do { \ + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->prio); \ + if (!QK_ISR_CONTEXT_()) { \ + if (QK_sched_() != 0U) { \ + QK_activate_(); \ + } \ + } \ +} while (false) + + + + + + /*! @brief The QXK kernel class +* @class QXK +*/ + { + struct QActive * volatile curr; /*!< current thread pointer (NULL=basic) */ + struct QActive * volatile next; /*!< next thread pointer to execute */ + uint8_t volatile actPrio; /*!< prio of the active AO */ + uint8_t volatile lockPrio; /*!< lock prio (0 == no-lock) */ + uint8_t volatile lockHolder; /*!< prio of the lock holder */ +} QXK; + + + /*! attributes of the QXK kernel */ + + + /*! timeout signals for extended threads */ + { + QXK_DELAY_SIG = Q_USER_SIG, + QXK_QUEUE_SIG, + QXK_SEMA_SIG +}; + + + /*! QXK activator activates the next active object. The activated AO preempts +* the currently executing AOs. +* @static @private @memberof QXK +* +* @attention +* QXK_activate_() must be always called with interrupts **disabled** and +* returns with interrupts **disabled**. +* +* @note +* The activate function might enable interrupts internally, but it always +* returns with interrupts **disabled**. +*/ + uint_fast8_t const pin = (uint_fast8_t)QXK_attr_.actPrio; +QActive *a = QXK_attr_.next; /* the next AO (basic-thread) to run */ + +/* QXK Context switch callback defined or QS tracing enabled? */ +#if (defined QXK_ON_CONTEXT_SW) || (defined Q_SPY) +uint_fast8_t pprev = pin; +#endif /* QXK_ON_CONTEXT_SW || Q_SPY */ + +/*! @pre QXK_attr_.next must be valid */ +Q_REQUIRE_ID(700, (a != (QActive *)0) && (pin < QF_MAX_ACTIVE)); + +/* dynamic priority of the next AO */ +uint_fast8_t p = (uint_fast8_t)a->dynPrio; + +/* loop until no more ready-to-run AOs of higher prio than the initial */ +do { + a = QActive_registry_[p]; /* obtain the pointer to the AO */ + QXK_attr_.actPrio = (uint8_t)p; /* this becomes the base prio */ + QXK_attr_.next = (QActive *)0; /* clear the next AO */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) + QS_TIME_PRE_(); /* timestamp */ + /* next prio & prev prio */ + QS_2U8_PRE_(p, pprev); + QS_END_NOCRIT_PRE_() + +#if (defined QXK_ON_CONTEXT_SW) || (defined Q_SPY) + if (p != pprev) { /* changing threads? */ + +#ifdef QXK_ON_CONTEXT_SW + Q_ASSERT_ID(710, pprev < QF_MAX_ACTIVE); + + /* context-switch callback */ + QXK_onContextSw(((pprev != 0U) ? QActive_registry_[pprev] + : (QActive*)0), + a); +#endif /* QXK_ON_CONTEXT_SW */ + + pprev = p; /* update previous priority */ + } +#endif /* QXK_ON_CONTEXT_SW || Q_SPY */ + + QF_INT_ENABLE(); /* unconditionally enable interrupts */ + + /* perform the run-to-completion (RTC) step... + * 1. retrieve the event from the AO's event queue, which by this + * time must be non-empty and QActive_get_() asserts it. + * 2. dispatch the event to the AO's state machine. + * 3. determine if event is garbage and collect it if so + */ + QEvt const * const e = QActive_get_(a); + QHSM_DISPATCH(&a->super, e, a->prio); + QF_gc(e); + + QF_INT_DISABLE(); /* unconditionally disable interrupts */ + + if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ + QPSet_remove(&QF_readySet_, p); + } + + /* find new highest-prio AO ready to run... + * NOTE: this part must match the QXK_sched_(), + * current is a basic-thread path. + */ + p = QPSet_findMax(&QF_readySet_); + + if (p <= (uint_fast8_t)QXK_attr_.lockPrio) { /* below lock prio? */ + p = (uint_fast8_t)QXK_attr_.lockHolder; /* thread holding lock */ + if (p != 0U) { + Q_ASSERT_ID(710, QPSet_hasElement(&QF_readySet_, p)); + } + } + a = QActive_registry_[p]; + + /* the AO must be registered in QF */ + Q_ASSERT_ID(720, a != (QActive *)0); + + /* is the next a basic thread? */ + if (a->osObject == (void *)0) { + if (p > pin) { + QXK_attr_.next = a; + } + else { + QXK_attr_.next = (QActive *)0; + p = 0U; /* no activation needed */ + } + } + else { /* next is the extened thread */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) + QS_TIME_PRE_(); /* timestamp */ + /* next prio & curr prio */ + QS_2U8_PRE_(p, QXK_attr_.actPrio); + QS_END_NOCRIT_PRE_() + + QXK_attr_.next = a; + p = 0U; /* no activation needed */ + QXK_CONTEXT_SWITCH_(); + } +} while (p != 0U); /* while activation needed */ + +QXK_attr_.actPrio = (uint8_t)pin; /* restore the base prio */ + +#if (defined QXK_ON_CONTEXT_SW) || (defined Q_SPY) +if (pin != 0U) { /* resuming an active object? */ + a = QActive_registry_[pin]; /* the pointer to the preempted AO */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_RESUME, a->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(pin, pprev); /* resumed prio & previous prio */ + QS_END_NOCRIT_PRE_() +} +else { /* resuming priority==0 --> idle */ + a = (QActive *)0; + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_IDLE, 0U) + QS_TIME_PRE_(); /* timestamp */ + QS_U8_PRE_(pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() +} + +#ifdef QXK_ON_CONTEXT_SW +/* context-switch callback */ +QXK_onContextSw(QActive_registry_[pprev], a); +#endif /* QXK_ON_CONTEXT_SW */ + +#endif /* QXK_ON_CONTEXT_SW || Q_SPY */ + + + /*! QXK scheduler finds the highest-priority thread ready to run +* @static @private @memberof QXK +* +* @details +* The QXK scheduler finds the priority of the highest-priority thread +* that is ready to run. +* +* @returns +* the 1-based priority of the the thread (basic or extended) run next, +* or zero if no eligible thread is found. +* +* @attention +* QXK_sched_() must be always called with interrupts **disabled** and +* returns with interrupts **disabled**. +*/ + /* find the highest-prio thread ready to run */ +uint_fast8_t p = QPSet_findMax(&QF_readySet_); + +if (p <= (uint_fast8_t)QXK_attr_.lockPrio) { /* below the lock prio? */ + /* dynamic priority of the thread holding the lock */ + p = (uint_fast8_t)QActive_registry_[QXK_attr_.lockHolder]->dynPrio; + if (p != 0U) { + Q_ASSERT_ID(610, QPSet_hasElement(&QF_readySet_, p)); + } +} + +QActive * const next = QActive_registry_[p]; + +/* the next thread found must be registered in QF */ +Q_ASSERT_ID(620, next != (QActive *)0); + +/* is the current thread a basic-thread? */ +if (QXK_attr_.curr == (QActive *)0) { + + /* is next a basic-thread? */ + if (next->osObject == (void *)0) { + if (p > (uint_fast8_t)QXK_attr_.actPrio) { + QXK_attr_.next = next; /* set the next AO to activate */ + } + else { + QXK_attr_.next = (QActive *)0; + p = 0U; /* no activation needed */ + } + } + else { /* this is an extened-thread */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, next->prio) + QS_TIME_PRE_(); /* timestamp */ + /* prio of the next AO & prio of the curr AO */ + QS_2U8_PRE_(p, QXK_attr_.actPrio); + QS_END_NOCRIT_PRE_() + + QXK_attr_.next = next; + p = 0U; /* no activation needed */ + QXK_CONTEXT_SWITCH_(); + } +} +else { /* currently executing an extended-thread */ + + /* is the next thread different from the current? */ + if (next != QXK_attr_.curr) { + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, next->prio) + QS_TIME_PRE_(); /* timestamp */ + /* next prio & current prio */ + QS_2U8_PRE_(p, QXK_attr_.curr->prio); + QS_END_NOCRIT_PRE_() + + QXK_attr_.next = next; + p = 0U; /* no activation needed */ + QXK_CONTEXT_SWITCH_(); + } + else { /* next is the same as the current */ + QXK_attr_.next = (QActive *)0; /* no need to context-switch */ + p = 0U; /* no activation needed */ + } +} +return p; + + + /*! QXK Scheduler lock +* @static @public @memberof QXK +* +* @details +* This function locks the QXK scheduler to the specified ceiling. +* +* @param[in] ceiling priority ceiling to which the QXK scheduler +* needs to be locked +* +* @returns +* The previous QXK Scheduler lock status, which is to be used to unlock +* the scheduler by restoring its previous lock status in QXK_schedUnlock(). +* +* @note +* A QXK scheduler can be locked from both basic threads (AOs) and +* extended threads and the scheduler locks can nest. +* +* @note +* QXK_schedLock() must be always followed by the corresponding +* QXK_schedUnlock(). +* +* @attention +* QXK will fire an assertion if a thread holding the lock attempts +* to block. +* +* @sa QXK_schedUnlock() +* +* @usage +* The following example shows how to lock and unlock the QXK scheduler: +* @include qxk_lock.c +*/ + + QF_CRIT_STAT_ +QF_CRIT_E_(); + +/*! @pre The QXK scheduler lock: +* - cannot be called from an ISR; +*/ +Q_REQUIRE_ID(400, !QXK_ISR_CONTEXT_()); + +/* first store the previous lock prio if below the ceiling */ +QSchedStatus stat; +if ((uint_fast8_t)QXK_attr_.lockPrio < ceiling) { + stat = ((QSchedStatus)QXK_attr_.lockPrio << 8U); + QXK_attr_.lockPrio = (uint8_t)ceiling; + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_LOCK, 0U) + QS_TIME_PRE_(); /* timestamp */ + /* the previous lock prio & new lock prio */ + QS_2U8_PRE_(stat, QXK_attr_.lockPrio); + QS_END_NOCRIT_PRE_() + + /* add the previous lock holder priority */ + stat |= (QSchedStatus)QXK_attr_.lockHolder; + QXK_attr_.lockHolder = (QXK_attr_.curr != (QActive *)0) + ? QXK_attr_.curr->prio + : 0U; +} +else { + stat = 0xFFU; +} +QF_CRIT_X_(); + +return stat; /* return the status to be saved in a stack variable */ + + + /*! QXK Scheduler unlock +* @static @public @memberof QXK +* +* @details +* This function unlocks the QXK scheduler to the previous status. +* +* @param[in] stat previous QXK Scheduler lock status returned from +* QXK_schedLock() +* +* @note +* A QXK scheduler can be locked from both basic threads (AOs) and +* extended threads and the scheduler locks can nest. +* +* @note +* QXK_schedUnlock() must always follow the corresponding QXK_schedLock(). +* +* @sa QXK_schedLock() +* +* @usage +* The following example shows how to lock and unlock the QXK scheduler: +* @include qxk_lock.c +*/ + + /* has the scheduler been actually locked by the last QXK_schedLock()? */ +if (stat != 0xFFU) { + uint_fast8_t const lockPrio = (uint_fast8_t)QXK_attr_.lockPrio; + uint_fast8_t const prevPrio = (uint_fast8_t)(stat >> 8U); + QF_CRIT_STAT_ + QF_CRIT_E_(); + + /*! @pre The scheduler cannot be unlocked: + * - from the ISR context; and + * - the current lock priority must be greater than the previous + */ + Q_REQUIRE_ID(500, (!QXK_ISR_CONTEXT_()) + && (lockPrio > prevPrio)); + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_UNLOCK, 0U) + QS_TIME_PRE_(); /* timestamp */ + /* prio before unlocking & prio after unlocking */ + QS_2U8_PRE_(lockPrio, prevPrio); + QS_END_NOCRIT_PRE_() + + /* restore the previous lock priority and lock holder */ + QXK_attr_.lockPrio = (uint8_t)prevPrio; + QXK_attr_.lockHolder = (uint8_t)(stat & 0xFFU); + + /* find the highest-prio thread ready to run */ + if (QXK_sched_() != 0U) { /* priority found? */ + QXK_activate_(); /* activate any unlocked basic threads */ + } + + QF_CRIT_X_(); +} + + + /*! QXK idle callback (customized in BSPs for QXK) +* @static @public @memberof QXK +* +* @details +* QXK_onIdle() is called continuously by the QXK idle thread. This callback +* gives the application an opportunity to enter a power-saving CPU mode, +* or perform some other idle processing. +* +* @note +* QXK_onIdle() is invoked with interrupts enabled and must also return with +* interrupts enabled. +*/ + + + /*! obtain the currently executing active-object/thread +* @static @public @memberof QXK +* +* @returns +* pointer to the currently executing active-object/thread +*/ + /*! @pre the QXK kernel must be running */ +Q_REQUIRE_ID(800, QXK_attr_.lockPrio <= QF_MAX_ACTIVE); + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +struct QActive *curr = QXK_attr_.curr; +if (curr == (QActive *)0) { /* basic thread? */ + curr = QActive_registry_[QXK_attr_.actPrio]; +} +QF_CRIT_X_(); + +/*! @post the current thread must be valid */ +Q_ENSURE_ID(890, curr != (QActive *)0); + +return curr; + + + /*! QXK context switch callback (customized in BSPs for QXK) +* @static @public @memberof QXK +* +* @details +* This callback function provides a mechanism to perform additional +* custom operations when QXK switches context from one thread to +* another. +* +* @param[in] prev pointer to the previous thread (active object) +* (prev==0 means that @p prev was the QXK idle thread) +* @param[in] next pointer to the next thread (active object) +* (next==0) means that @p next is the QXK idle thread) +* @attention +* QXK_onContextSw() is invoked with interrupts **disabled** and must also +* return with interrupts **disabled**. +* +* @note +* This callback is enabled by defining the macro #QXK_ON_CONTEXT_SW. +* +* @include qxk_oncontextsw.c +*/ + + + + + /*! initialize the private stack of a given AO */ + + + + + + + + + /*! QF initialization for QXK */ + QF_maxPool_ = 0U; +QActive_subscrList_ = (QSubscrList *)0; +QActive_maxPubSignal_ = 0; + +QF_bzero(&QTimeEvt_timeEvtHead_[0], sizeof(QTimeEvt_timeEvtHead_)); +QF_bzero(&QActive_registry_[0], sizeof(QActive_registry_)); +QF_bzero(&QXK_attr_, sizeof(QXK_attr_)); +QF_bzero(&QXThread_idle, sizeof(QXThread_idle)); + +/* setup the QXK scheduler as initially locked and not running */ +QXK_attr_.lockPrio = (QF_MAX_ACTIVE + 1U); + +/* setup the QXK idle thread... */ +QActive_registry_[0] = &QXThread_idle.super; /* register idle thread */ +QXK_attr_.actPrio = QXThread_idle.super.prio; /* set the base priority */ + +#ifdef QXK_INIT +QXK_INIT(); /* port-specific initialization of the QXK kernel */ +#endif + + + /*! stop the QF customization for QXK +* +* @sa QF_onCleanup() +*/ + QF_onCleanup(); /* application-specific cleanup callback */ +/* nothing else to do for the cooperative QXK kernel */ + + + /*! QF_run() customization for QXK kernel */ + QF_INT_DISABLE(); +QXK_attr_.lockPrio = 0U; /* unlock the scheduler */ + +/* any active objects need to be scheduled before starting event loop? */ +if (QXK_sched_() != 0U) { + QXK_activate_(); /* activate AOs to process all events posted so far*/ +} +QF_onStartup(); /* application-specific startup callback */ + +/* produce the QS_QF_RUN trace record */ +QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, 0U) +QS_END_NOCRIT_PRE_() + +QF_INT_ENABLE(); + +/* the QXK idle loop... */ +for (;;) { + QXK_onIdle(); /* application-specific QXK idle callback */ +} + +#ifdef __GNUC__ +return 0; +#endif + + + + /*! @brief eXtended (blocking) thread of the QXK preemptive kernel +* @class QXThread +* @extends QActive +* +* @details +* ::QXThread represents the eXtended (blocking) thread of the QXK +* kernel. Each extended thread in the application must be represented +* by the corresponding ::QXThread instance +* +* @note +* Typically, ::QXThread is instantiated directly in the application code. +* The customization of the thread occurs in the QXThread_ctor(), where you +* provide the thread-handler function as the parameter. +* +* @usage +* The following example illustrates how to instantiate and use an extended +* thread in your application. +* @include qxk_thread.c +*/ + + /*! time event to handle blocking timeouts */ + + + + /*! constructor of an extended-thread +* @public @memberof QXThread +* +* @details +* Performs the first step of QXThread initialization by assigning the +* thread-handler function and the tick rate at which it will handle +* the timeouts. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] handler the thread-handler function +* @param[in] tickRate the ticking rate for timeouts in this thread +* (see QXThread_delay() and QTIMEEVT_TICK_X()) +* +* @note +* Must be called only ONCE before QXTHREAD_START(). +* +* @usage +* The following example illustrates how to invoke QXThread_ctor() in the +* main() function +* +* @include +* qxk_thread_ctor.c +*/ + + + static QXThreadVtable const vtable = { /* QXThread virtual table */ + { &QXThread_init_, /* not used in QXThread */ + &QXThread_dispatch_ /* not used in QXThread */ +#ifdef Q_SPY + ,&QHsm_getStateHandler_ /* not used in QXThread */ +#endif + }, + &QXThread_start_, + &QXThread_post_, + &QXThread_postLIFO_ +}; +union QHsmAttr tmp; +tmp.thr = handler; + +QActive_ctor(&me->super, tmp.fun); /* superclass' ctor */ +me->super.super.vptr = &vtable.super; /* hook to QXThread vtable */ +me->super.super.state.act = Q_ACTION_CAST(0); /*mark as extended thread */ + +/* construct the time event member added in the QXThread class */ +QTimeEvt_ctorX(&me->timeEvt, &me->super, + (enum_t)QXK_DELAY_SIG, tickRate); + + + /*! delay (block) the current extended thread for a specified # ticks +* @static @public @memberof QXThread +* +* @details +* Blocking delay for the number of clock tick at the associated tick rate. +* +* @param[in] nTicks number of clock ticks (at the associated rate) +* to wait for the event to arrive. +* @note +* For the delay to work, the QTIMEEVT_TICK_X() macro needs to be called +* periodically at the associated clock tick rate. +* +* @sa QXThread_ctor() +* @sa QTIMEEVT_TICK_X() +*/ + + QF_CRIT_STAT_ +QF_CRIT_E_(); + +QXThread * const thr = QXTHREAD_CAST_(QXK_attr_.curr); + +/*! @pre this function must: +* - NOT be called from an ISR; +* - number of ticks cannot be zero +* - be called from an extended thread; +* - the thread must NOT be already blocked on any object. +*/ +Q_REQUIRE_ID(800, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ + && (nTicks != 0U) /* number of ticks cannot be zero */ + && (thr != (QXThread *)0) /* current thread must be extended */ + && (thr->super.super.temp.obj == (QMState *)0)); /* !blocked */ +/*! @pre also: the thread must NOT be holding a scheduler lock. */ +Q_REQUIRE_ID(801, QXK_attr_.lockHolder != thr->super.prio); + +/* remember the blocking object */ +thr->super.super.temp.obj = QXK_PTR_CAST_(QMState const*, &thr->timeEvt); +QXThread_teArm_(thr, (enum_t)QXK_DELAY_SIG, nTicks); +QXThread_block_(thr); +QF_CRIT_X_(); +QF_CRIT_EXIT_NOP(); /* BLOCK here */ + +QF_CRIT_E_(); +/* the blocking object must be the time event */ +Q_ENSURE_ID(890, thr->super.super.temp.obj + == QXK_PTR_CAST_(QMState const*, &thr->timeEvt)); +thr->super.super.temp.obj = (QMState *)0; /* clear */ +QF_CRIT_X_(); + +/* signal of zero means that the time event was posted without +* being canceled. +*/ +return thr->timeEvt.super.sig == 0U; + + + /*! cancel the delay +* @public @memberof QXThread +* +* @details +* Cancel the blocking delay and cause return from the QXThread_delay() +* function. +* +* @returns +* "true" if the thread was actually blocked on QXThread_delay() and +* "false" otherwise. +*/ + QF_CRIT_STAT_ +QF_CRIT_E_(); + +bool wasArmed; +if (me->super.super.temp.obj == QXK_PTR_CAST_(QMState*, &me->timeEvt)) { + wasArmed = QXThread_teDisarm_(me); + QXThread_unblock_(me); +} +else { + wasArmed = false; +} +QF_CRIT_X_(); + +return wasArmed; + + + /*! obtain a message from the private message queue (block if no messages) +* @static @public @memberof QXThread +* +* @details +* The QXThread_queueGet() operation allows the calling extended thread to +* receive QP events directly into its own built-in event queue from an ISR, +* basic thread (AO), or another extended thread. +* +* If QXThread_queueGet() is called when no events are present in the +* thread's private event queue, the operation blocks the current extended +* thread until either an event is received, or a user-specified timeout +* expires. +* +* @param[in] nTicks number of clock ticks (at the associated rate) +* to wait for the event to arrive. The value of +* QXTHREAD_NO_TIMEOUT indicates that no timeout will +* occur and the queue will block indefinitely. +* @returns +* A pointer to the event. If the pointer is not NULL, the event was delivered. +* Otherwise the event pointer of NULL indicates that the queue has timed out. +*/ + + QF_CRIT_STAT_ +QF_CRIT_E_(); + +QXThread * const thr = QXTHREAD_CAST_(QXK_attr_.curr); + +/*! @pre this function must: +* - NOT be called from an ISR; +* - be called from an extended thread; +* - the thread must NOT be already blocked on any object. +*/ +Q_REQUIRE_ID(500, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ + && (thr != (QXThread *)0) /* current thread must be extended */ + && (thr->super.super.temp.obj == (QMState *)0)); /* !blocked */ +/*! @pre also: the thread must NOT be holding a scheduler lock. */ +Q_REQUIRE_ID(501, QXK_attr_.lockHolder != thr->super.prio); + +/* is the queue empty? */ +if (thr->super.eQueue.frontEvt == (QEvt *)0) { + + /* remember the blocking object (the thread's queue) */ + thr->super.super.temp.obj + = QXK_PTR_CAST_(QMState const*, &thr->super.eQueue); + + QXThread_teArm_(thr, (enum_t)QXK_QUEUE_SIG, nTicks); + QPSet_remove(&QF_readySet_, (uint_fast8_t)thr->super.dynPrio); + (void)QXK_sched_(); + QF_CRIT_X_(); + QF_CRIT_EXIT_NOP(); /* BLOCK here */ + + QF_CRIT_E_(); + /* the blocking object must be this queue */ + Q_ASSERT_ID(510, thr->super.super.temp.obj + == QXK_PTR_CAST_(QMState const*, &thr->super.eQueue)); + thr->super.super.temp.obj = (QMState *)0; /* clear */ +} + +/* is the queue not empty? */ +QEvt const *e; +if (thr->super.eQueue.frontEvt != (QEvt *)0) { + e = thr->super.eQueue.frontEvt; /* remove from the front */ + QEQueueCtr const nFree= thr->super.eQueue.nFree + 1U; + thr->super.eQueue.nFree = nFree; /* update the number of free */ + + /* any events in the ring buffer? */ + if (nFree <= thr->super.eQueue.end) { + + /* remove event from the tail */ + thr->super.eQueue.frontEvt = + thr->super.eQueue.ring[thr->super.eQueue.tail]; + if (thr->super.eQueue.tail == 0U) { /* need to wrap? */ + thr->super.eQueue.tail = thr->super.eQueue.end; /* wrap */ + } + --thr->super.eQueue.tail; + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_GET, thr->super.prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(&thr->super); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_END_NOCRIT_PRE_() + } + else { + thr->super.eQueue.frontEvt = (QEvt *)0; /* empty queue */ + + /* all entries in the queue must be free (+1 for fronEvt) */ + Q_ASSERT_ID(520, nFree == (thr->super.eQueue.end + 1U)); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_GET_LAST, thr->super.prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(&thr->super); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_END_NOCRIT_PRE_() + } +} +else { /* the queue is still empty -- the timeout must have fired */ + e = (QEvt *)0; +} +QF_CRIT_X_(); + +return e; + + + + /*! Overrides QHsm_init_() */ + + + + Q_UNUSED_PAR(me); +Q_UNUSED_PAR(par); +Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + +Q_ERROR_ID(110); + + + /*! Overrides QHsm_dispatch_() */ + + + + Q_UNUSED_PAR(me); +Q_UNUSED_PAR(e); +Q_UNUSED_PAR(qs_id); + +Q_ERROR_ID(120); + + + /*! start QXThread private implementation +* @private @memberof QXThread +* +* @details +* Starts execution of an extended thread and registers it with the framework. +* The extended thread becomes ready-to-run immediately and is scheduled +* if the QXK is already running. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] prio priority at which to start the extended thread +* @param[in] qSto pointer to the storage for the ring buffer of the +* event queue. This cold be NULL, if this extended +* thread does not use the built-in event queue. +* @param[in] qLen length of the event queue [in events], +* or zero if queue not used +* @param[in] stkSto pointer to the stack storage (must be provided) +* @param[in] stkSize stack size [in bytes] (must not be zero) +* @param[in] par pointer to an extra parameter (might be NULL). +* +* @note +* Should be called via the macro QXTHREAD_START(). +* +* @usage +* The following example shows starting an extended thread: +* @include qxk_start.c +*/ + + + + + + + + Q_UNUSED_PAR(par); + +/*! @pre this function must: +* - NOT be called from an ISR; +* - the thread priority cannot exceed #QF_MAX_ACTIVE; +* - the stack storage must be provided; +* - the thread must be instantiated (see QXThread_ctor()). +*/ +Q_REQUIRE_ID(200, (!QXK_ISR_CONTEXT_()) /* don't call from an ISR! */ + && (prio <= QF_MAX_ACTIVE) + && (stkSto != (void *)0) /* stack must be provided */ + && (stkSize != 0U) + && (me->super.state.act == (QActionHandler)0)); + +/* is storage for the queue buffer provided? */ +if (qSto != (QEvt const **)0) { + QEQueue_init(&me->eQueue, qSto, qLen); +} + +/* extended thread constructor puts the thread handler in place of +* the top-most initial transition 'me->super.temp.act' +*/ +QXK_stackInit_(me, me->super.temp.thr, stkSto, stkSize); + +me->prio = (uint8_t)prio; +me->dynPrio = (uint8_t)prio; + +/* the new thread is not blocked on any object */ +me->super.temp.obj = (QMState *)0; + +QActive_register_(me); /* make QF aware of this extended thread */ + +QF_CRIT_STAT_ +QF_CRIT_E_(); +/* extended-thread becomes ready immediately */ +QPSet_insert(&QF_readySet_, (uint_fast8_t)me->dynPrio); + +/* see if this thread needs to be scheduled in case QXK is running */ +(void)QXK_sched_(); +QF_CRIT_X_(); + + + /*! post to the QXThread event queue private implementation +* @private @memberof QXThread +* +* @details +* Direct event posting is the simplest asynchronous communication method +* available in QF. The following example illustrates how the Philo active +* object posts directly the HUNGRY event to the Table active object.@n +* @n +* The parameter @p margin specifies the minimum number of free slots in +* the queue that must be available for posting to succeed. The function +* returns 1 (success) if the posting succeeded (with the provided margin) +* and 0 (failure) when the posting fails. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] e pointer to the event to be posted +* @param[in] margin number of required free slots in the queue after +* posting the event. The special value #QF_NO_MARGIN +* means that this function will assert if posting fails. +* @param[in] sender pointer to a sender object (used only for QS tracing). +* +* @returns +* 'true' (success) if the posting succeeded (with the provided margin) and +* 'false' (failure) when the posting fails. +* +* @note +* Should be called only via the macro QXTHREAD_POST_X(). +* +* @note +* The #QF_NO_MARGIN value of the @p margin parameter is special and +* denotes situation when the post() operation is assumed to succeed +* (event delivery guarantee). An assertion fires, when the event cannot +* be delivered in this case. +* +* @note +* For compatibility with the V-table from the superclass ::QActive, the +* me-pointer is typed as pointing to QActive. However, the @p me pointer +* here actually points to the QXThread subclass. Therefore the downcast +* (QXThread *)me is always correct. +*/ + + + + + Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ + +QF_CRIT_STAT_ +QS_TEST_PROBE_DEF(&QXThread_post_) + +/* is it the private time event? */ +bool status; +if (e == &QXTHREAD_CAST_(me)->timeEvt.super) { + QF_CRIT_E_(); + /* the private time event is disarmed and not in any queue, + * so it is safe to change its signal. The signal of 0 means + * that the time event has expired. + */ + QXTHREAD_CAST_(me)->timeEvt.super.sig = 0U; + + QXThread_unblock_(QXTHREAD_CAST_(me)); + QF_CRIT_X_(); + + status = true; +} +/* is the event queue provided? */ +else if (me->eQueue.end != 0U) { + QEQueueCtr nFree; /* temporary to avoid UB for volatile access */ + + /*! @pre event pointer must be valid */ + Q_REQUIRE_ID(300, e != (QEvt *)0); + + QF_CRIT_E_(); + nFree = me->eQueue.nFree; /* get volatile into the temporary */ + + /* test-probe#1 for faking queue overflow */ + QS_TEST_PROBE_ID(1, + nFree = 0U; + ) + + if (margin == QF_NO_MARGIN) { + if (nFree > 0U) { + status = true; /* can post */ + } + else { + status = false; /* cannot post */ + Q_ERROR_CRIT_(310); /* must be able to post the event */ + } + } + else if (nFree > (QEQueueCtr)margin) { + status = true; /* can post */ + } + else { + status = false; /* cannot post, but don't assert */ + } + + /* is it a dynamic event? */ + if (e->poolId_ != 0U) { + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ + } + + if (status) { /* can post the event? */ + + --nFree; /* one free entry just used up */ + me->eQueue.nFree = nFree; /* update the volatile */ + if (me->eQueue.nMin > nFree) { + me->eQueue.nMin = nFree; /* update minimum so far */ + } + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object (recipient) */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_EQC_PRE_(me->eQueue.nMin); /* min number of free entries */ + QS_END_NOCRIT_PRE_() + + /* queue empty? */ + if (me->eQueue.frontEvt == (QEvt *)0) { + me->eQueue.frontEvt = e; /* deliver event directly */ + + /* is this thread blocked on the queue? */ + if (me->super.temp.obj + == QXK_PTR_CAST_(QMState*, &me->eQueue)) + { + (void)QXThread_teDisarm_(QXTHREAD_CAST_(me)); + QPSet_insert(&QF_readySet_, + (uint_fast8_t)me->dynPrio); + if (!QXK_ISR_CONTEXT_()) { + (void)QXK_sched_(); + } + } + } + /* queue is not empty, insert event into the ring-buffer */ + else { + /* insert event into the ring buffer (FIFO) */ + me->eQueue.ring[me->eQueue.head] = e; + + /* need to wrap the head counter? */ + if (me->eQueue.head == 0U) { + me->eQueue.head = me->eQueue.end; /* wrap around */ + } + --me->eQueue.head; /* advance the head (counter clockwise) */ + } + + QF_CRIT_X_(); + } + else { /* cannot post the event */ + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_ATTEMPT, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object (recipient) */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_EQC_PRE_(margin); /* margin requested */ + QS_END_NOCRIT_PRE_() + + QF_CRIT_X_(); + + QF_gc(e); /* recycle the event to avoid a leak */ + } +} +else { /* the queue is not available */ + QF_gc(e); /* make sure the event is not leaked */ + status = false; + Q_ERROR_ID(320); /* this extended thread cannot accept events */ +} + +return status; + + + + /*! post to the QXThread event queue (LIFO) private implementation +* @private @memberof QXThread +* +* @details +* Last-In-First-Out (LIFO) policy is not supported for extened threads. +* +* @param[in] me pointer (see @ref oop) +* @param[in] e pointer to the event to post to the queue +* +* @sa +* QActive_postLIFO_() +*/ + + + Q_UNUSED_PAR(me); +Q_UNUSED_PAR(e); + +Q_ERROR_ID(410); + + + const + /*! block QXThread private implementation +* @private @memberof QXThread +* +* @details +* Internal implementation of blocking the given extended thread. +* +* @note +* Must be called from within a critical section +*/ + /*! @pre the thread holding the lock cannot block! */ +Q_REQUIRE_ID(600, (QXK_attr_.lockHolder != me->super.prio)); + +QPSet_remove(&QF_readySet_, (uint_fast8_t)me->super.dynPrio); +(void)QXK_sched_(); + + + const + /*! unblock QXThread private implementation +* @private @memberof QXThread +* +* @details +* Internal implementation of un-blocking the given extended thread. +* +* @note +* must be called from within a critical section +*/ + QPSet_insert(&QF_readySet_, (uint_fast8_t)me->super.dynPrio); +if ((!QXK_ISR_CONTEXT_()) /* not inside ISR? */ + && (QActive_registry_[0] != (QActive *)0)) /* kernel started? */ +{ + (void)QXK_sched_(); +} + + + /*! arm internal time event private implementation +* @private @memberof QXThread +* +* @details +* Internal implementation of arming the private time event for a given +* timeout at a given system tick rate. +* +* @note +* Must be called from within a critical section +*/ + + + /*! @pre the time event must be unused */ +Q_REQUIRE_ID(700, me->timeEvt.ctr == 0U); + +me->timeEvt.super.sig = (QSignal)sig; + +if (nTicks != QXTHREAD_NO_TIMEOUT) { + me->timeEvt.ctr = (QTimeEvtCtr)nTicks; + me->timeEvt.interval = 0U; + + /* is the time event unlinked? + * NOTE: For the duration of a single clock tick of the specified tick + * rate a time event can be disarmed and yet still linked in the list, + * because un-linking is performed exclusively in QTimeEvt_tick_(). + */ + if ((me->timeEvt.super.refCtr_ & QTE_IS_LINKED) == 0U) { + uint_fast8_t const tickRate + = ((uint_fast8_t)me->timeEvt.super.refCtr_ & QTE_TICK_RATE); + Q_ASSERT_ID(710, tickRate < QF_MAX_TICK_RATE); + + me->timeEvt.super.refCtr_ |= QTE_IS_LINKED; + + /* The time event is initially inserted into the separate + * "freshly armed" list based on QTimeEvt_timeEvtHead_[tickRate].act. + * Only later, inside the QTimeEvt_tick_() function, the "freshly + * armed" list is appended to the main list of armed time events + * based on QTimeEvt_timeEvtHead_[tickRate].next. Again, this is + * to keep any changes to the main list exclusively inside + * QTimeEvt_tick_(). + */ + me->timeEvt.next + = QXK_PTR_CAST_(QTimeEvt*, QTimeEvt_timeEvtHead_[tickRate].act); + QTimeEvt_timeEvtHead_[tickRate].act = &me->timeEvt; + } +} + + + /*! disarm internal time event private implementation +* @private @memberof QXThread +* +* @details +* Internal implementation of disarming the private time event. +* +* @note +* Must be called from within a critical section +*/ + bool wasArmed; +/* is the time evt running? */ +if (me->timeEvt.ctr != 0U) { + wasArmed = true; + me->timeEvt.ctr = 0U; /* schedule removal from list */ +} +/* the time event was already automatically disarmed */ +else { + wasArmed = false; +} +return wasArmed; + + + + /*! @brief Virtual Table for the ::QXThread class +* (inherited from ::QActiveVtable) +* +* @note +* ::QXThread inherits ::QActive without adding any new virtual +* functions and therefore, ::QXThreadVtable is typedef'ed as ::QActiveVtable. +*/ + + + /*! QActive active object class customization for QK */ + + /*! Starts execution of an active object and registers the object +* with the framework customized for QXK +*/ + + + + + + + /*! @pre AO cannot be started: +* - from an ISR; +* - the priority must be in range; +* - the stack storage must NOT be provided (because the QK kernel does +* not need per-AO stacks). +*/ +Q_REQUIRE_ID(200, (!QXK_ISR_CONTEXT_()) + && (0U < prio) && (prio <= QF_MAX_ACTIVE) + && (stkSto == (void *)0) + && (stkSize == 0U)); + +QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ +me->osObject = (void *)0; /* no private stack for AO */ +me->prio = (uint8_t)prio; /* set the current priority of the AO */ +me->dynPrio = (uint8_t)prio; /* set the dynamic priority of the AO */ +QActive_register_(me); /* make QF aware of this active object */ + +QHSM_INIT(&me->super, par, me->prio); /* top-most initial tran. */ +QS_FLUSH(); /* flush the trace buffer to the host */ + +/* see if this AO needs to be scheduled in case QXK is already running */ +QF_CRIT_STAT_ +QF_CRIT_E_(); +if (QXK_sched_() != 0U) { /* activation needed? */ + QXK_activate_(); +} +QF_CRIT_X_(); + + + + /*! @brief Counting Semaphore of the QXK preemptive kernel +* @class QXSemaphore +* +* @details +* ::QXSemaphore is a blocking mechanism intended primarily for signaling +* @ref ::QXThread "extended threads". The semaphore is initialized with +* the maximum count (see QXSemaphore_init()), which allows you to create +* a binary semaphore (when the maximum count is 1) and +* counting semaphore when the maximum count is > 1. +* +* @sa +* - QXSemaphore_init() +* - QXSemaphore_signal() +* - QXSemaphore_wait() +* - QXSemaphore_tryWait() +* +* @usage +* The following example illustrates how to instantiate and use the semaphore +* in your application. +* @include qxk_sema.c +*/ + + /*! set of extended threads waiting on this semaphore */ + + + /*! semaphore up-down counter */ + + + /*! maximum value of the semaphore counter */ + + + /*! initialize the counting semaphore +* @public @memberof QXSemaphore +* +* @details +* Initializes a semaphore with the specified count and maximum count. +* If the semaphore is used for resource sharing, both the initial count +* and maximum count should be set to the number of identical resources +* guarded by the semaphore. If the semaphore is used as a signaling +* mechanism, the initial count should set to 0 and maximum count to 1 +* (binary semaphore). +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] count initial value of the semaphore counter +* @param[in] max_count maximum value of the semaphore counter. +* The purpose of the max_count is to limit the counter +* so that the semaphore cannot unblock more times than +* the maximum. +* +* @note +* QXSemaphore_init() must be called **before** the semaphore can be used +* (signaled or waited on). +*/ + + + /*! @pre max_count must be greater than zero */ +Q_REQUIRE_ID(100, max_count > 0U); + +me->count = (uint16_t)count; +me->max_count = (uint16_t)max_count; +QPSet_setEmpty(&me->waitSet); + + + /*! wait (block) on the semaphore +* @public @memberof QXSemaphore +* +* @details +* When an extended thread calls QXSemaphore_wait() and the value of the +* semaphore counter is greater than 0, QXSemaphore_wait() decrements the +* semaphore counter and returns (true) to its caller. However, if the value +* of the semaphore counter is 0, the function places the calling thread in +* the waiting list for the semaphore. The thread waits until the semaphore +* is signaled by calling QXSemaphore_signal(), or the specified timeout +* expires. If the semaphore is signaled before the timeout expires, QXK +* resumes the highest-priority extended thread waiting for the semaphore. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] nTicks number of clock ticks (at the associated rate) +* to wait for the semaphore. The value of +* QXTHREAD_NO_TIMEOUT indicates that no timeout will +* occur and the semaphore will wait indefinitely. +* +* @returns +* 'true' if the semaphore has been signaled and 'false' if a timeout occurred. +* +* @note +* Multiple extended threads can wait for a given semaphore. +*/ + + QF_CRIT_STAT_ +QF_CRIT_E_(); + +/* volatile into temp. */ +QXThread * const curr = QXK_PTR_CAST_(QXThread*, QXK_attr_.curr); + +/*! @pre this function must: +* - NOT be called from an ISR; +* - the semaphore must be initialized +* - be called from an extended thread; +* - the thread must NOT be already blocked on any object. +*/ +Q_REQUIRE_ID(200, (!QXK_ISR_CONTEXT_()) /* can't wait inside an ISR */ + && (me->max_count > 0U) /* sema must be initialized */ + && (curr != (QXThread *)0) /* curr must be extended */ + && (curr->super.super.temp.obj == (QMState *)0)); /* NOT blocked */ +/*! @pre also: the thread must NOT be holding a scheduler lock. */ +Q_REQUIRE_ID(201, QXK_attr_.lockHolder != curr->super.prio); + +bool signaled = true; /* assume that the semaphore will be signaled */ +if (me->count > 0U) { + --me->count; /* semaphore taken: decrement the count */ +} +else { + uint_fast8_t const p = (uint_fast8_t)curr->super.dynPrio; + + /* remember the blocking object (this semaphore) */ + curr->super.super.temp.obj = QXK_PTR_CAST_(QMState*, me); + QXThread_teArm_(curr, (enum_t)QXK_SEMA_SIG, nTicks); + + /* remove this curr prio from the ready set (will block) + * and insert to the waiting set on this semaphore */ + QPSet_insert(&me->waitSet, p); /* add to waiting-set */ + QPSet_remove(&QF_readySet_, p); /* remove from ready-set */ + + /* schedule the next thread if multitasking started */ + (void)QXK_sched_(); + QF_CRIT_X_(); + QF_CRIT_EXIT_NOP(); /* BLOCK here !!! */ + + QF_CRIT_E_(); /* AFTER unblocking... */ + /* the blocking object must be this semaphore */ + Q_ASSERT_ID(240, curr->super.super.temp.obj + == QXK_PTR_CAST_(QMState*, me)); + + /* did the blocking time-out? (signal of zero means that it did) */ + if (curr->timeEvt.super.sig == 0U) { + if (QPSet_hasElement(&me->waitSet, p)) { /* still waiting? */ + QPSet_remove(&me->waitSet, p); /* remove unblocked thread */ + signaled = false; /* the semaphore was NOT signaled */ + /* semaphore NOT taken: do NOT decrement the count */ + } + else { /* semaphore was both signaled and timed out */ + --me->count; /* semaphore signaled: decrement the count */ + } + } + else { /* blocking did NOT time out */ + /* the thread must NOT be waiting on this semaphore */ + Q_ASSERT_ID(250,!QPSet_hasElement(&me->waitSet, p)); + + --me->count; /* semaphore signaled: decrement the count */ + } + curr->super.super.temp.obj = (QMState *)0; /* clear blocking obj. */ +} +QF_CRIT_X_(); + +return signaled; + + + /*! try wait on the semaphore (non-blocking) +* @public @memberof QXSemaphore +* +* @details +* This function checks if the semaphore counter is greater than 0, +* in which case the counter is decremented. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' if the semaphore has count available and 'false' NOT available. +* +* @note +* This function can be called from any context, including ISRs and basic +* threads (active objects). +*/ + /*! @pre the semaphore must be initialized */ +Q_REQUIRE_ID(300, me->max_count > 0U); + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +bool isAvailable; +/* is the semaphore available? */ +if (me->count > 0U) { + --me->count; + isAvailable = true; +} +else { /* the semaphore is NOT available (would block) */ + isAvailable = false; +} +QF_CRIT_X_(); + +return isAvailable; + + + /*! signal (unblock) the semaphore +* @public @memberof QXSemaphore +* +* @details +* If the semaphore counter value is 0 or more, it is incremented, and +* this function returns to its caller. If the extended threads are waiting +* for the semaphore to be signaled, QXSemaphore_signal() removes the highest- +* priority thread waiting for the semaphore from the waiting list and makes +* this thread ready-to-run. The QXK scheduler is then called to determine if +* the awakened thread is now the highest-priority thread that is ready-to-run. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' when the semaphore signaled and 'false' when the semaphore count +* exceeded the maximum. +* +* @note +* A semaphore can be signaled from many places, including from ISRs, basic +* threads (AOs), and extended threads. +*/ + /*! @pre the semaphore must be initialized */ +Q_REQUIRE_ID(400, me->max_count > 0U); + +QF_CRIT_STAT_ +QF_CRIT_E_(); + +bool signaled = true; /* assume that the semaphore will be signaled */ +if (me->count < me->max_count) { + + ++me->count; /* increment the semaphore count */ + + if (QPSet_notEmpty(&me->waitSet)) { + /* find the highest-priority thread waiting on this semaphore */ + uint_fast8_t const p = QPSet_findMax(&me->waitSet); + QXThread * const thr = + QXK_PTR_CAST_(QXThread*, QActive_registry_[p]); + + /* assert that the tread: + * - must be registered in QF; + * - must be extended; and + * - must be blocked on this semaphore; + */ + Q_ASSERT_ID(410, (thr != (QXThread *)0) + && (thr->super.osObject != (struct QActive *)0) + && (thr->super.super.temp.obj + == QXK_PTR_CAST_(QMState*, me))); + + /* disarm the internal time event */ + (void)QXThread_teDisarm_(thr); + + /* make the thread ready to run and remove from the wait-list */ + QPSet_insert(&QF_readySet_, p); + QPSet_remove(&me->waitSet, p); + + if (!QXK_ISR_CONTEXT_()) { /* not inside ISR? */ + (void)QXK_sched_(); /* schedule the next thread */ + } + } +} +else { + signaled = false; /* semaphore NOT signaled */ +} +QF_CRIT_X_(); + +return signaled; + + + + /*! @brief Blocking Mutex the QXK preemptive kernel +* @class QXMutex +* +* @details +* ::QXMutex is a blocking mutual exclusion mechanism that can also apply +* the **priority ceiling protocol** to avoid unbounded priority inversion +* (if initialized with a non-zero ceiling priority, see QXMutex_init()). +* In that case, ::QXMutex requires its own uinque QP priority level, which +* cannot be used by any thread or any other ::QXMutex. +* If initialized with zero ceiling priority, ::QXMutex does **not** use the +* priority ceiling protocol and does not require a unique QP priority +* (see QXMutex_init()). +* ::QXMutex is **recursive** (re-entrant), which means that it can be locked +* multiple times (up to 255 levels) by the *same* thread without causing +* deadlock. +* ::QXMutex is primarily intended for the @ref ::QXThread +* "extened (blocking) threads", but can also be used by the @ref ::QActive +* "basic threads" through the non-blocking QXMutex_tryLock() API. +* +* @note +* ::QXMutex should be used in situations when at least one of the extended +* threads contending for the mutex blocks while holding the mutex (between +* the QXMutex_lock() and QXMutex_unlock() operations). If no blocking is +* needed while holding the mutex, the more efficient non-blocking mechanism +* of @ref srs_qxk_schedLock() "selective QXK scheduler locking" should be used +* instead. @ref srs_qxk_schedLock() "Selective scheduler locking" is available +* for both @ref ::QActive "basic threads" and @ref ::QXThread "extended +* threads", so it is applicable to situations where resources are shared +* among all these threads. +* +* @usage +* The following example illustrates how to instantiate and use the mutex +* in your application. +* @include qxk_mutex.c +*/ + + /*! set of extended-threads waiting on this mutex */ + + + /*! lock-nesting up-down counter */ + + + /*! prio of the lock holder thread */ + + + /*! prioirty ceiling of this mutex */ + + + /*! initialize the QXK priority-ceiling mutex ::QXMutex +* @public @memberof QXMutex +* +* @details +* Initialize the QXK priority ceiling mutex. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] ceiling the ceiling-priority of this mutex or zero +* +* @note +* `ceiling == 0` means that the priority-ceiling protocol shall __not__ +* be used by this mutex. Such mutex will __not__ change (boost) the +* priority of the holding thread. +* +* @note +* `ceiling > 0` means that the priority-ceiling protocol shall be used +* by this mutex. Such mutex __will__ boost the priority of the holding +* thread to the `ceiling` level for as long as the thread holds this mutex. +* +* @attention +* When the priority-ceiling protocol is used (`ceiling > 0`), the +* `ceiling` priority must be unused by any other thread or mutex. +* Also, the `ceiling` priority must be higher than priority of any thread +* that uses this mutex. +* +* @usage +* @include qxk_mutex.c +*/ + + QF_CRIT_STAT_ +QF_CRIT_E_(); + +/*! @pre the ceiling priority of the mutex must: +* - cannot exceed the maximum #QF_MAX_ACTIVE; +* - the ceiling priority of the mutex must not be already in use; +* (QF requires priority to be **unique**). +*/ +Q_REQUIRE_ID(100, + (ceiling <= QF_MAX_ACTIVE) + && ((ceiling == 0U) + || (QActive_registry_[ceiling] == (QActive *)0))); + +me->ceiling = (uint8_t)ceiling; +me->lockNest = 0U; +me->holderPrio = 0U; +QF_bzero((void *)&me->waitSet, sizeof(me->waitSet)); + +if (ceiling != 0U) { + /* reserve the ceiling priority level for this mutex */ + QActive_registry_[ceiling] = QXK_PTR_CAST_(QActive*, me); +} +QF_CRIT_X_(); + + + /*! lock the QXK priority-ceiling mutex ::QXMutex +* @public @memberof QXMutex +* +* @details +* Lock the QXK priority ceiling mutex ::QXMutex. +* +* @param[in,out] me pointer (see @ref oop) +* @param[in] nTicks number of clock ticks (at the associated rate) +* to wait for the semaphore. The value of +* QXTHREAD_NO_TIMEOUT indicates that no timeout will +* occur and the semaphore will wait indefinitely. +* @returns +* 'true' if the mutex has been acquired and 'false' if a timeout occurred. +* +* @note +* The mutex locks are allowed to nest, meaning that the same extended thread +* can lock the same mutex multiple times (< 255). However, each call to +* QXMutex_lock() must be balanced by the matching call to QXMutex_unlock(). +* +* @usage +* @include qxk_mutex.c +*/ + + QF_CRIT_STAT_ +QF_CRIT_E_(); + +QXThread * const curr = QXK_PTR_CAST_(QXThread*, QXK_attr_.curr); + +/*! @pre this function must: +* - NOT be called from an ISR; +* - be called from an extended thread; +* - the ceiling priority must not be used; or if used +* - the thread priority must be below the ceiling of the mutex; +* - the ceiling must be in range +* - the thread must NOT be already blocked on any object. +*/ +Q_REQUIRE_ID(200, (!QXK_ISR_CONTEXT_()) /* don't call from an ISR! */ + && (curr != (QXThread *)0) /* current thread must be extended */ + && ((me->ceiling == 0U) + || (curr->super.prio < me->ceiling)) /* below ceiling */ + && (me->ceiling <= QF_MAX_ACTIVE) /* in range */ + && (curr->super.super.temp.obj == (QMState *)0)); /* not blocked */ +/*! @pre also: the thread must NOT be holding a scheduler lock. */ +Q_REQUIRE_ID(201, QXK_attr_.lockHolder != curr->super.prio); + +/* is the mutex available? */ +bool locked = true; /* assume that the mutex will be locked */ +if (me->lockNest == 0U) { + me->lockNest = 1U; + + if (me->ceiling != 0U) { + /* the priority slot must be occupied by this mutex */ + Q_ASSERT_ID(210, QActive_registry_[me->ceiling] + == QXK_PTR_CAST_(QActive*, me)); + + /* boost the dynamic priority of this thread to the ceiling */ + QPSet_remove(&QF_readySet_, (uint_fast8_t)curr->super.dynPrio); + curr->super.dynPrio = me->ceiling; + QPSet_insert(&QF_readySet_, (uint_fast8_t)curr->super.dynPrio); + QActive_registry_[me->ceiling] = &curr->super; + } + + /* make the curr thread the new mutex holder */ + me->holderPrio = (uint8_t)curr->super.prio; + + QS_BEGIN_NOCRIT_PRE_(QS_MUTEX_LOCK, curr->super.prio) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(curr->super.prio, /* the start prio */ + me->ceiling); /* current ceiling */ + QS_END_NOCRIT_PRE_() +} +/* is the mutex locked by this thread already (nested locking)? */ +else if (me->holderPrio == curr->super.prio) { + + /* the nesting level must not exceed the dynamic range of uint8_t */ + Q_ASSERT_ID(220, me->lockNest < 0xFFU); + + ++me->lockNest; /* lock one level */ +} +else { /* the mutex is already locked by a different thread */ + /* the ceiling holder priority must be valid */ + Q_ASSERT_ID(230, 0U < me->holderPrio); + Q_ASSERT_ID(231, me->holderPrio <= QF_MAX_ACTIVE); + + if (me->ceiling != 0U) { + /* the prio slot must be occupied by the thr. holding the mutex */ + Q_ASSERT_ID(240, QActive_registry_[me->ceiling] + == QActive_registry_[me->holderPrio]); + } + + /* remove the curr dynamic prio from the ready set (block) + * and insert it to the waiting set on this mutex + */ + uint_fast8_t const p = (uint_fast8_t)curr->super.dynPrio; + QPSet_remove(&QF_readySet_, p); + QPSet_insert(&me->waitSet, p); + + /* store the blocking object (this mutex) */ + curr->super.super.temp.obj = QXK_PTR_CAST_(QMState*, me); + QXThread_teArm_(curr, (enum_t)QXK_SEMA_SIG, nTicks); + + /* schedule the next thread if multitasking started */ + (void)QXK_sched_(); + QF_CRIT_X_(); + QF_CRIT_EXIT_NOP(); /* BLOCK here !!! */ + + QF_CRIT_E_(); /* AFTER unblocking... */ + /* the blocking object must be this mutex */ + Q_ASSERT_ID(240, curr->super.super.temp.obj + == QXK_PTR_CAST_(QMState*, me)); + + /* did the blocking time-out? (signal of zero means that it did) */ + if (curr->timeEvt.super.sig == 0U) { + if (QPSet_hasElement(&me->waitSet, p)) { /* still waiting? */ + QPSet_remove(&me->waitSet, p); /* remove unblocked thread */ + locked = false; /* the mutex was NOT locked */ + } + } + else { /* blocking did NOT time out */ + /* the thread must NOT be waiting on this mutex */ + Q_ASSERT_ID(250, !QPSet_hasElement(&me->waitSet, p)); + } + curr->super.super.temp.obj = (QMState *)0; /* clear blocking obj. */ +} +QF_CRIT_X_(); + +return locked; + + + /*! try to lock the QXK priority-ceiling mutex ::QXMutex +* @public @memberof QXMutex +* +* @details +* Try to lock the QXK priority ceiling mutex ::QXMutex. +* +* @param[in,out] me pointer (see @ref oop) +* +* @returns +* 'true' if the mutex was successfully locked and 'false' if the mutex was +* unavailable and was NOT locked. +* +* @note +* This function **can** be called from both basic threads (active objects) +* and extended threads. +* +* @note +* The mutex locks are allowed to nest, meaning that the same extended thread +* can lock the same mutex multiple times (<= 225). However, each successful +* call to QXMutex_tryLock() must be balanced by the matching call to +* QXMutex_unlock(). +*/ + QF_CRIT_STAT_ +QF_CRIT_E_(); + +QActive *curr = QXK_attr_.curr; +if (curr == (QActive *)0) { /* called from a basic thread? */ + curr = QActive_registry_[QXK_attr_.actPrio]; +} + +/*! @pre this function must: +* - NOT be called from an ISR; +* - the calling thread must be valid; +* - the ceiling must be not used; or +* - the thread priority must be below the ceiling of the mutex; +* - the ceiling must be in range +*/ +Q_REQUIRE_ID(300, (!QXK_ISR_CONTEXT_()) /* don't call from an ISR! */ + && (curr != (QActive *)0) /* current thread must be valid */ + && ((me->ceiling == 0U) /* ceiling not used */ + || (curr->prio < me->ceiling)) /* below ceiling */ + && (me->ceiling <= QF_MAX_ACTIVE)); +/*! @pre also: the thread must NOT be holding a scheduler lock. */ +Q_REQUIRE_ID(301, QXK_attr_.lockHolder != curr->prio); + +/* is the mutex available? */ +if (me->lockNest == 0U) { + me->lockNest = 1U; + + if (me->ceiling != 0U) { + /* the priority slot must be set to this mutex */ + Q_ASSERT_ID(310, QActive_registry_[me->ceiling] + == QXK_PTR_CAST_(QActive*, me)); + + /* boost the dynamic priority of this thread to the ceiling */ + QPSet_remove(&QF_readySet_, (uint_fast8_t)curr->dynPrio); + curr->dynPrio = me->ceiling; + QPSet_insert(&QF_readySet_, (uint_fast8_t)curr->dynPrio); + QActive_registry_[me->ceiling] = curr; + } + + /* make curr thread the new mutex holder */ + me->holderPrio = curr->prio; + + QS_BEGIN_NOCRIT_PRE_(QS_MUTEX_LOCK, curr->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(curr->prio, me->ceiling); + QS_END_NOCRIT_PRE_() +} +/* is the mutex held by this thread already (nested locking)? */ +else if (me->holderPrio == curr->prio) { + /* the nesting level must not exceed the dynamic range of uint8_t */ + Q_ASSERT_ID(320, me->lockNest < 0xFFU); + + ++me->lockNest; /* lock one level */ +} +else { /* the mutex is alredy locked by a different thread */ + if (me->ceiling != 0U) { + /* the prio slot must be claimed by the mutex holder */ + Q_ASSERT_ID(330, QActive_registry_[me->ceiling] + == QActive_registry_[me->holderPrio]); + } + curr = (QActive *)0; /* means that mutex is NOT available */ +} +QF_CRIT_X_(); + +return curr != (QActive *)0; + + + /*! unlock the QXK priority-ceiling mutex ::QXMutex +* @public @memberof QXMutex +*! +* @details +* Unlock the QXK priority ceiling mutex. +* +* @param[in,out] me pointer (see @ref oop) +* +* @note +* This function **can** be called from both basic threads (active objects) +* and extended threads. +* +* @note +* The mutex locks are allowed to nest, meaning that the same extended thread +* can lock the same mutex multiple times (<= 225). However, each call to +* QXMutex_lock() or a *successful* call to QXMutex_tryLock() must be +* balanced by the matching call to QXMutex_unlock(). +* +* @usage +* @include qxk_mutex.c +*/ + QF_CRIT_STAT_ +QF_CRIT_E_(); + +QActive *curr = QXK_attr_.curr; +if (curr == (QActive *)0) { /* called from a basic thread? */ + curr = QActive_registry_[QXK_attr_.actPrio]; +} + +/*! @pre this function must: +* - NOT be called from an ISR; +* - the calling thread must be valid; +* - the ceiling must not be used or +* - the current thread must have priority equal to the mutex ceiling. +* - the ceiling must be in range +*/ +Q_REQUIRE_ID(400, (!QXK_ISR_CONTEXT_()) /* don't call from an ISR! */ + && (curr != (QActive *)0) /* current thread must be valid */ + && ((me->ceiling == 0U) /* ceiling not used OR... */ + || (curr->dynPrio == me->ceiling)) /* curr at ceiling prio */ + && (me->ceiling <= QF_MAX_ACTIVE)); +/*! @pre also: the mutex must be already locked at least once. */ +Q_REQUIRE_ID(401, me->lockNest > 0U); +/*! @pre also: the mutex must be held by this thread. */ +Q_REQUIRE_ID(402, me->holderPrio == curr->prio); + +/* is this the last nesting level? */ +if (me->lockNest == 1U) { + + if (me->ceiling != 0U) { + /* restore the holding thread's dynamic prio to the original */ + QPSet_remove(&QF_readySet_, (uint_fast8_t)curr->dynPrio); + curr->dynPrio = curr->prio; + QPSet_insert(&QF_readySet_, (uint_fast8_t)curr->dynPrio); + + /* put the mutex at the priority ceiling slot */ + QActive_registry_[me->ceiling] = QXK_PTR_CAST_(QActive*, me); + } + + /* the mutex no longer held by a thread */ + me->holderPrio = 0U; + + QS_BEGIN_NOCRIT_PRE_(QS_MUTEX_UNLOCK, curr->prio) + QS_TIME_PRE_(); /* timestamp */ + /* start prio & the mutex ceiling */ + QS_2U8_PRE_(curr->prio, me->ceiling); + QS_END_NOCRIT_PRE_() + + /* are any other threads waiting for this mutex? */ + if (QPSet_notEmpty(&me->waitSet)) { + /* find the highest-priority thread waiting on this mutex */ + uint_fast8_t const p = QPSet_findMax(&me->waitSet); + QXThread * const thr = QXK_PTR_CAST_(QXThread*, QActive_registry_[p]); + + /* the waiting thread must: + * - the ceiling must not be used; or if used + * - the thread must have priority below the ceiling + * - be registered in QF + * - have the dynamic priority the same as initial priority + * - be blocked on this mutex + */ + Q_ASSERT_ID(410, + ((me->ceiling == 0U) || (p < (uint_fast8_t)me->ceiling)) + && (thr != (QXThread *)0) + && (thr->super.dynPrio == thr->super.prio) + && (thr->super.super.temp.obj + == QXK_PTR_CAST_(QMState*, me))); + + /* disarm the internal time event */ + (void)QXThread_teDisarm_(thr); + + if (me->ceiling != 0U) { + /* boost the dynamic priority of this thread to the ceiling */ + thr->super.dynPrio = me->ceiling; + QActive_registry_[me->ceiling] = &thr->super; + } + + /* make the thread the new mutex holder */ + me->holderPrio = (uint8_t)thr->super.prio; + + /* make the thread ready to run (at the ceiling prio) + * and remove from the waiting list */ + QPSet_insert(&QF_readySet_, (uint_fast8_t)thr->super.dynPrio); + QPSet_remove(&me->waitSet, p); + + QS_BEGIN_NOCRIT_PRE_(QS_MUTEX_LOCK, thr->super.prio) + QS_TIME_PRE_(); /* timestamp */ + /* start priority & ceiling priority */ + QS_2U8_PRE_(thr->super.prio, me->ceiling); + QS_END_NOCRIT_PRE_() + } + else { /* no threads are waiting for this mutex */ + me->lockNest = 0U; + + if (me->ceiling != 0U) { + /* put the mutex at the priority ceiling slot */ + QActive_registry_[me->ceiling] = QXK_PTR_CAST_(QActive*, me); + } + } + + /* schedule the next thread if multitasking started */ + if (QXK_sched_() != 0U) { + QXK_activate_(); /* activate a basic thread */ + } +} +else { /* releasing the mutex */ + --me->lockNest; /* unlock one level */ +} +QF_CRIT_X_(); + + + + + + /*! Virtual call to start an extened thread +* +* @details +* Starts execution of the thread and registers the AO with the framework. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] prio_ priority at which to start the active object +* @param[in] qSto_ pointer to the storage for the ring buffer of the +* event queue (used only with the built-in ::QEQueue) +* @param[in] qLen_ length of the event queue (in events) +* @param[in] stkSto_ pointer to the stack storage (used only when +* per-AO stack is needed) +* @param[in] stkSize_ stack size (in bytes) +* @param[in] par_ pointer to the additional port-specific parameter(s) +* (might be NULL). +* @usage +* @include qxk_start.c +*/ + + + + + + + + \ +do { \ + Q_ASSERT((me_)->super.super.vptr); \ + ((*((QActiveVtable const *)((me_)->super.super.vptr))->start)( \ + &(me_)->super, (prio_), (QEvt const **)(qSto_), (qLen_), \ + (stkSto_), (stkSize_), (par_))); \ +} while (false) + + + /*! No-timeout when blocking on semaphores, mutextes, and queues */ + ((uint_fast16_t)0) + + + /*! Asynchronous posting events to the event queue of an eXtended thread +* @details +* This macro does not assert if the queue overflows and cannot accept +* the event with the specified margin of free slots remaining. +* +* @param[in,out] me_ pointer (see @ref oop) +* @param[in] e_ pointer to the event to post +* @param[in] margin_ the minimum free slots in the queue, which +* must still be available after posting the event. +* The special value #QF_NO_MARGIN causes asserting +* failure in case event allocation fails. +* @param[in] sender_ pointer to the sender object (used in QS tracing) +* +* @returns +* 'true' if the posting succeeded, and 'false' if the posting failed due +* to insufficient margin of free slots available in the queue. +* +* @note +* The @p sender_ parameter is actually only used when QS tracing is enabled +* (macro #Q_SPY is defined). When QS software tracing is disabled, the +* QXTHREAD_POST_X() macro does not pass the @p sender_ argument, so the +* overhead of passing this extra argument is entirely avoided. +* +* @note +* The pointer to the sender object is not necessarily a pointer to an +* active object. In fact, if QXTHREAD_POST_X() is called from an interrupt +* or other context, you can create a unique object just to unambiguously +* identify the sender of the event. +* +* @usage +* @include qf_postx.c +*/ + + + + + \ + QACTIVE_POST_X(&(me_)->super, (e_), (margin_), (sender_)) + + + + + /*! Internal macro that reports the execution context (ISR vs. thread) +* +* @returns true if the code executes in the ISR context and false +* otherwise +*/ + (QF_intNest_ != 0U) + + + /*! QXK scheduler lock status */ + QSchedStatus lockStat_; + + + /*! QXK selective scheduler locking */ + + do { \ + if (QXK_ISR_CONTEXT_()) { \ + lockStat_ = 0xFFU; \ + } else { \ + lockStat_ = QXK_schedLock((prio_)); \ + } \ +} while (false) + + + /*! QXK selective scheduler unlocking */ + do { \ + if (lockStat_ != 0xFFU) { \ + QXK_schedUnlock(lockStat_); \ + } \ +} while (false) + + + /*! QXK native event queue waiting */ + + \ + (Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0)) + + + /*! QXK native event queue signaling */ + + do { \ + QPSet_insert(&QF_readySet_, (uint_fast8_t)(me_)->dynPrio); \ + if (!QXK_ISR_CONTEXT_()) { \ + if (QXK_sched_() != 0U) { \ + QXK_activate_(); \ + } \ + } \ +} while (false) + + + <type_> + /*! internal macro to encapsulate casting of pointers for MISRA deviations +* +* @details +* This macro is specifically and exclusively used for casting pointers +* that are never de-referenced, but only used for internal bookkeeping and +* checking (via assertions) the correct operation of the QXK kernel. +* Such pointer casting is not compliant with MISRA-2012-Rule 11.3(req) +* as well as other messages (e.g., PC-Lint-Plus warning 826). +* Defining this specific macro for this purpose allows to selectively +* disable the warnings for this particular case. +*/ + + + ((type_)(ptr_)) + + + /*! internal macro to encapsulate casting of pointers for MISRA deviations +* +* @details +* This macro is specifically and exclusively used for downcasting pointers +* to QActive to pointers to QXThread in situations when it is known +* that such downcasting is correct.However, such pointer casting is not +* compliant with MISRA-2012-Rule 11.3(req) as well as other messages (e.g., +* PC-Lint-Plus warning 826). Defining this specific macro for this purpose +* allows to selectively disable the warnings for this particular case. +*/ + + ((QXThread *)(ptr_)) + + + /*! called when QXThread exits +* @private @memberof QXThread +* +* @details +* Called when the extended-thread handler function returns. +* +* @note +* Most thread handler functions are structured as endless loops that never +* return. But it is also possible to structure threads as one-shot functions +* that perform their job and return. In that case this function peforms +* cleanup after the thread. +*/ + + QF_CRIT_STAT_ +QF_CRIT_E_(); + +QXThread const * const thr = QXTHREAD_CAST_(QXK_attr_.curr); + +/*! @pre this function must: +* - NOT be called from an ISR; +* - be called from an extended thread; +*/ +Q_REQUIRE_ID(900, (!QXK_ISR_CONTEXT_()) /* can't be in the ISR context */ + && (thr != (QXThread *)0)); /* current thread must be extended */ +/*! @pre also: the thread must NOT be holding a scheduler lock. */ +Q_REQUIRE_ID(901, QXK_attr_.lockHolder != thr->super.prio); + +uint_fast8_t const p = (uint_fast8_t)thr->super.prio; + +/* remove this thread from the QF */ +QActive_registry_[p] = (QActive *)0; +QPSet_remove(&QF_readySet_, p); +(void)QXK_sched_(); +QF_CRIT_X_(); + + + + + /*! +* @date Last updated on: 2022-05-23 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief Customizable and memory-efficient Design by Contract (DbC) +* for embedded systems +* +* @note +* This header file can be used in C, C++, and mixed C/C++ programs. +* +* @note +* The preprocessor switch #Q_NASSERT disables checking assertions. +* However, it is generally __not__ advisable to disable assertions, +* __especially__ in the production code. Instead, the assertion handler +* Q_onAssert() should be very carefully designed and tested. +*/ +#ifndef QASSERT_H +#define QASSERT_H + +#ifdef __cplusplus + extern "C" { +#endif + +#ifndef QP_VERSION /* is quassert.h used outside QP? */ + + /* provide facilities so that qassert.h could be used "standalone"... */ + + /*! Alias for assertions-ids and line numbers in assertions. + * + * @details + * This typedef specifies integer type in compliance with the + * MISRA-C 2012 Dir 4.6 (adv). + */ + typedef int int_t; + + /*! Helper macro to calculate static dimension of a 1-dim `array_` + * + * @param array_ 1-dimensional array + * @returns the length of the array (number of elements it can hold) + */ + #define Q_DIM(array_) (sizeof(array_) / sizeof((array_)[0U])) + +#endif + +$declare ${DbC} + +#ifdef __cplusplus + } +#endif + +#endif /* QASSERT_H */ + + + /*! +* @date Last updated on: 2022-07-27 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C platform-independent public interface. +* +* @tr{RQP001} @tr{RQP101} +*/ +#ifndef QEP_H +#define QEP_H + +/*==========================================================================*/ +$declare ${version} +$declare ${glob-types} +$declare ${QEP-config} + +/*==========================================================================*/ +$declare ${QEP} + +/*==========================================================================*/ +$declare ${QEP-macros} + +#endif /* QEP_H */ + + + /*! +* @date Last updated on: 2022-07-20 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C platform-independent public interface. +*/ +#ifndef QF_H +#define QF_H + +/*==========================================================================*/ +$declare ${QF-config} + +/*==========================================================================*/ +$declare ${QF-types} +$declare ${QF::QActive} +$declare ${QF::QActiveVtable} +$declare ${QF::QMActive} +$declare ${QF::QMActiveVtable} +$declare ${QF::QTimeEvt} +$declare ${QF::QTicker} + +$declare ${QF::QF-base} +$declare ${QF::QF-dyn} + +/*==========================================================================*/ +$declare ${QF-macros} + +#endif /* QF_H */ + + + /*! +* @date Last updated on: 2022-07-26 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief Internal (package scope) QF/C interface. +*/ +#ifndef QF_PKG_H +#define QF_PKG_H + +/*==========================================================================*/ +$declare ${QF::QF-pkg} + +/*==========================================================================*/ +/* QF-specific critical section */ +#ifndef QF_CRIT_STAT_TYPE + /*! This is an internal macro for defining the critical section + * status type. */ + /** + * @details + * The purpose of this macro is to enable writing the same code for the + * case when critical section status type is defined and when it is not. + * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro + * provides the definition of the critical section status variable. + * Otherwise this macro is empty. + * @sa #QF_CRIT_STAT_TYPE + */ + #define QF_CRIT_STAT_ + + /*! This is an internal macro for entering a critical section. */ + /** + * @details + * The purpose of this macro is to enable writing the same code for the + * case when critical section status type is defined and when it is not. + * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro + * invokes QF_CRIT_ENTRY() passing the key variable as the parameter. + * Otherwise QF_CRIT_ENTRY() is invoked with a dummy parameter. + * @sa QF_CRIT_ENTRY() + */ + #define QF_CRIT_E_() QF_CRIT_ENTRY(dummy) + + /*! This is an internal macro for exiting a critical section. */ + /** + * @details + * The purpose of this macro is to enable writing the same code for the + * case when critical section status type is defined and when it is not. + * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro + * invokes #QF_CRIT_EXIT passing the key variable as the parameter. + * Otherwise #QF_CRIT_EXIT is invoked with a dummy parameter. + * @sa #QF_CRIT_EXIT + */ + #define QF_CRIT_X_() QF_CRIT_EXIT(dummy) + +#elif (!defined QF_CRIT_STAT_) + #define QF_CRIT_STAT_ QF_CRIT_STAT_TYPE critStat_; + #define QF_CRIT_E_() QF_CRIT_ENTRY(critStat_) + #define QF_CRIT_X_() QF_CRIT_EXIT(critStat_) +#endif + +/*==========================================================================*/ +/* Assertions inside the critical section */ +#ifdef Q_NASSERT /* Q_NASSERT defined--assertion checking disabled */ + + #define Q_ASSERT_CRIT_(id_, test_) ((void)0) + #define Q_REQUIRE_CRIT_(id_, test_) ((void)0) + #define Q_ERROR_CRIT_(id_) ((void)0) + +#else /* Q_NASSERT not defined--assertion checking enabled */ + + #define Q_ASSERT_CRIT_(id_, test_) do { \ + if ((test_)) {} else { \ + QF_CRIT_X_(); \ + Q_onAssert(&Q_this_module_[0], (int_t)(id_)); \ + } \ + } while (false) + + #define Q_REQUIRE_CRIT_(id_, test_) Q_ASSERT_CRIT_((id_), (test_)) + + #define Q_ERROR_CRIT_(id_) do { \ + QF_CRIT_X_(); \ + Q_onAssert(&Q_this_module_[0], (int_t)(id_)); \ + } while (false) + +#endif /* Q_NASSERT */ + +/*==========================================================================*/ + +/* The following bitmasks are for the fields of the @c refCtr_ attribute +* of the QTimeEvt struct (inherited from QEvt). This attribute is NOT used +* for reference counting in time events, because the @c poolId_ attribute +* is zero ("immutable events"). +*/ +#define QTE_IS_LINKED (1U << 7U) +#define QTE_WAS_DISARMED (1U << 6U) +#define QTE_TICK_RATE 0x0FU + +/*! @brief structure representing a free block in the Native QF Memory Pool */ +typedef struct QFreeBlock { + struct QFreeBlock * volatile next; +} QFreeBlock; + +/* internal helper macros ***************************************************/ + +/*! helper macro to cast const away from an event pointer @p e_ */ +#define QF_EVT_CONST_CAST_(e_) ((QEvt *)(e_)) + +/*! increment the refCtr of an event @p e_ casting const away */ +#define QF_EVT_REF_CTR_INC_(e_) (++QF_EVT_CONST_CAST_(e_)->refCtr_) + +/*! decrement the refCtr of an event @p e_ casting const away */ +#define QF_EVT_REF_CTR_DEC_(e_) (--QF_EVT_CONST_CAST_(e_)->refCtr_) + +/** +* @details +* This macro is specifically and exclusively used for checking the range +* of a block pointer returned to the pool. Such a check must rely on the +* pointer arithmetic not compliant with the MISRA-C 2012 Rule 18.3(R). +* Defining a specific macro for this purpose allows to selectively disable +* the warnings for this particular case. +*/ +#define QF_PTR_RANGE_(x_, min_, max_) (((min_) <= (x_)) && ((x_) <= (max_))) + +#endif /* QF_PKG_H */ + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QP natvie, platform-independent, thread-safe event queue interface +* @details +* This header file must be included in all QF ports that use native QF +* event queue for active objects. Also, this file needs to be included +* in the QP/C library when the application uses QActive_defer()/ +* QActive_recall(). Finally, this file is also needed when the "raw" +* thread-safe queues are used for communication between active objects +* and non-framework entities, such as ISRs, device drivers, or legacy +* code. +*/ +#ifndef QEQUEUE_H +#define QEQUEUE_H + +#ifndef QF_EQUEUE_CTR_SIZE + + /*! The size [bytes] of the ring-buffer counters used in the + * native QF event queue implementation. Valid values: 1U, 2U, or 4U; + * default 1U. + * @details + * This macro can be defined in the QF port file (qf_port.h) to + * configure the ::QEQueueCtr type. Here the macro is not defined so the + * default of 1 byte is chosen. + */ + #define QF_EQUEUE_CTR_SIZE 1U +#endif +#if (QF_EQUEUE_CTR_SIZE == 1U) + + /*! The data type to store the ring-buffer counters based on + * the macro #QF_EQUEUE_CTR_SIZE. + * @details + * The dynamic range of this data type determines the maximum length + * of the ring buffer managed by the native QF event queue. + */ + typedef uint8_t QEQueueCtr; +#elif (QF_EQUEUE_CTR_SIZE == 2U) + typedef uint16_t QEQueueCtr; +#elif (QF_EQUEUE_CTR_SIZE == 4U) + typedef uint32_t QEQueueCtr; +#else + #error "QF_EQUEUE_CTR_SIZE defined incorrectly, expected 1U, 2U, or 4U" +#endif + +/*==========================================================================*/ +$declare ${QF::QEQueue} + +#endif /* QEQUEUE_H */ + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QP native, platform-independent memory pool ::QMPool interface. +*/ +#ifndef QMPOOL_H +#define QMPOOL_H + +/*==========================================================================*/ +#ifndef QF_MPOOL_SIZ_SIZE + /*! macro to override the default ::QMPoolSize size [bytes]. + * Valid values 1U, 2U, or 4U; default 2U + */ + #define QF_MPOOL_SIZ_SIZE 2U +#endif +#if (QF_MPOOL_SIZ_SIZE == 1U) + + /*! The data type to store the block-size based on the macro + * #QF_MPOOL_SIZ_SIZE. + * @details + * The dynamic range of this data type determines the maximum size + * of blocks that can be managed by the native QF event pool. + */ + typedef uint8_t QMPoolSize; +#elif (QF_MPOOL_SIZ_SIZE == 2U) + + typedef uint16_t QMPoolSize; +#elif (QF_MPOOL_SIZ_SIZE == 4U) + typedef uint32_t QMPoolSize; +#else + #error "QF_MPOOL_SIZ_SIZE defined incorrectly, expected 1U, 2U, or 4U" +#endif + +/*==========================================================================*/ +#ifndef QF_MPOOL_CTR_SIZE + /*! macro to override the default ::QMPoolCtr size [bytes]. + * Valid values 1U, 2U, or 4U; default 2U + */ + #define QF_MPOOL_CTR_SIZE 2U +#endif +#if (QF_MPOOL_CTR_SIZE == 1U) + + /*! The data type to store the block-counter based on the macro + * #QF_MPOOL_CTR_SIZE. + * @details + * The dynamic range of this data type determines the maximum number + * of blocks that can be stored in the pool. + */ + typedef uint8_t QMPoolCtr; +#elif (QF_MPOOL_CTR_SIZE == 2U) + typedef uint16_t QMPoolCtr; +#elif (QF_MPOOL_CTR_SIZE == 4U) + typedef uint32_t QMPoolCtr; +#else + #error "QF_MPOOL_CTR_SIZE defined incorrectly, expected 1U, 2U, or 4U" +#endif + +/*! Memory pool element to allocate correctly aligned storage +* for QMPool class. +* @param[in] evType_ event type (name of the subclass of QEvt) +*/ +#define QF_MPOOL_EL(evType_) \ + struct { void *sto_[((sizeof(evType_) - 1U)/sizeof(void*)) + 1U]; } + +/*==========================================================================*/ +$declare ${QF::QMPool} + +#endif /* QMPOOL_H */ + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QV/C (cooperative "Vanilla" kernel) platform-independent +* public interface +*/ +#ifndef QV_H +#define QV_H + +/*==========================================================================*/ +/* QF customization for QV -- data members of the QActive class... */ + +/* QV event-queue used for AOs */ +#define QF_EQUEUE_TYPE QEQueue + +/*==========================================================================*/ +#include "qequeue.h" /* QV kernel uses the native QP event queue */ +#include "qmpool.h" /* QV kernel uses the native QP memory pool */ +#include "qf.h" /* QF framework integrates directly with QV */ + +//============================================================================ +$declare ${QV::QV-base} + +/*==========================================================================*/ +/* interface used only inside QF, but not in applications */ +#ifdef QP_IMPL +/* QV-specific scheduler locking and event queue... */ +$declare ${QV-impl} + +/* Native QF event pool operations... */ +$declare ${QF-QMPool-impl} +#endif /* QP_IMPL */ + +#endif /* QV_H */ + + + /*! +* @date Last updated on: 2022-06-13 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QK/C (preemptive non-blocking kernel) platform-independent +* public interface. +*/ +#ifndef QK_H +#define QK_H + +/*==========================================================================*/ +/* QF configuration for QK -- data members of the QActive class... */ + +/* QK event-queue used for AOs */ +#define QF_EQUEUE_TYPE QEQueue + +/* QK thread type used for AOs +* QK uses this member to store the private Thread-Local Storage pointer. +*/ +#define QF_THREAD_TYPE void* + +#include "qequeue.h" /* QK kernel uses the native QP event queue */ +#include "qmpool.h" /* QK kernel uses the native QP memory pool */ +#include "qf.h" /* QF framework integrates directly with QK */ + +/*==========================================================================*/ +$declare ${QK::QK-base} + +/*==========================================================================*/ +/* interface used only inside QF, but not in applications */ +#ifdef QP_IMPL +/* QK-specific scheduler locking and event queue... */ +$declare ${QK-impl} + +/* Native QF event pool operations... */ +$declare ${QF-QMPool-impl} +#endif /* QP_IMPL */ + +#endif /* QK_H */ + + + /*! +* @date Last updated on: 2022-07-27 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QXK/C (preemptive dual-mode kernel) platform-independent +* public interface. +*/ +#ifndef QXK_H +#define QXK_H + +/*==========================================================================*/ +/* QF configuration for QXK -- data members of the QActive class... */ + +/* QXK event-queue used for AOs */ +#define QF_EQUEUE_TYPE QEQueue + +/* QXK OS-object used to store the private stack pointer for extended threads. +* (The private stack pointer is NULL for basic-threads). +*/ +#define QF_OS_OBJECT_TYPE void* + +/* QXK thread type used to store the private Thread-Local Storage pointer */ +#define QF_THREAD_TYPE void* + +/*! Access Thread-Local Storage (TLS) and cast it on the given `type_` */ +#define QXK_TLS(type_) ((type_)QXK_current()->thread) + +/*==========================================================================*/ +#include "qequeue.h" /* QXK kernel uses the native QP event queue */ +#include "qmpool.h" /* QXK kernel uses the native QP memory pool */ +#include "qf.h" /* QF framework integrates directly with QXK */ + +/*==========================================================================*/ +$declare ${QXK::QXK-base} +$declare ${QXK::QXThread} +$declare ${QXK::QXThreadVtable} +$declare ${QXK::QXSemaphore} +$declare ${QXK::QXMutex} +$declare ${QXK-macros} + +/*==========================================================================*/ +/* interface used only inside QP implementation, but not in applications */ +#ifdef QP_IMPL +/* QXK implementation... */ +$declare ${QXK-impl} + +/* Native QF event pool operations... */ +$declare ${QF-QMPool-impl} +#endif /* QP_IMPL */ + +#endif /* QXK_H */ + + + /*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C platform-independent public interface. +*/ +#ifndef QS_H +#define QS_H + +#ifndef Q_SPY + #error "Q_SPY must be defined to include qs.h" +#endif + +/*==========================================================================*/ +$declare ${QS-config} + +/*==========================================================================*/ +$declare ${QS} + +/*==========================================================================*/ +$declare ${QS-macros} + +/*==========================================================================*/ +/* Facilities for QS critical section */ + +/* QS-specific critical section */ +#ifdef QS_CRIT_ENTRY /* separate QS critical section defined? */ + +#ifndef QS_CRIT_STAT_TYPE + #define QS_CRIT_STAT_ + #define QS_CRIT_E_() QS_CRIT_ENTRY(dummy) + #define QS_CRIT_X_() QS_CRIT_EXIT(dummy); QS_REC_DONE() +#else + #define QS_CRIT_STAT_ QS_CRIT_STAT_TYPE critStat_; + #define QS_CRIT_E_() QS_CRIT_ENTRY(critStat_) + #define QS_CRIT_X_() QS_CRIT_EXIT(critStat_); QS_REC_DONE() +#endif /* QS_CRIT_STAT_TYPE */ + +#else /* separate QS critical section not defined--use the QF definition */ + +#ifndef QF_CRIT_STAT_TYPE + /*! This is an internal macro for defining the critical section + * status type. + * @details + * The purpose of this macro is to enable writing the same code for the + * case when critical section status type is defined and when it is not. + * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro + * provides the definition of the critical section status variable. + * Otherwise this macro is empty. + * @sa #QF_CRIT_STAT_TYPE + */ + #define QS_CRIT_STAT_ + + /*! This is an internal macro for entering a critical section. + * @details + * The purpose of this macro is to enable writing the same code for the + * case when critical section status type is defined and when it is not. + * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro + * invokes QF_CRIT_ENTRY() passing the key variable as the parameter. + * Otherwise QF_CRIT_ENTRY() is invoked with a dummy parameter. + * @sa QF_CRIT_ENTRY() + */ + #define QS_CRIT_E_() QF_CRIT_ENTRY(dummy) + + /*! This is an internal macro for exiting a critical section. + * @details + * The purpose of this macro is to enable writing the same code for the + * case when critical section status type is defined and when it is not. + * If the macro #QF_CRIT_STAT_TYPE is defined, this internal macro + * invokes QF_CRIT_EXIT() passing the key variable as the parameter. + * Otherwise QF_CRIT_EXIT() is invoked with a dummy parameter. + * @sa QF_CRIT_EXIT() + */ + #define QS_CRIT_X_() QF_CRIT_EXIT(dummy); QS_REC_DONE() + +#elif (!defined QS_CRIT_STAT_) + + #define QS_CRIT_STAT_ QF_CRIT_STAT_TYPE critStat_; + #define QS_CRIT_E_() QF_CRIT_ENTRY(critStat_) + #define QS_CRIT_X_() QF_CRIT_EXIT(critStat_); QS_REC_DONE() + +#endif /* simple unconditional interrupt disabling used */ + +#endif /* separate QS critical section not defined */ + +/*==========================================================================*/ +/* Macros for use in QUTest only */ +#ifdef Q_UTEST + +$declare ${QUTest} + +/*! QS macro to define the Test-Probe for a given @p fun_ */ +#define QS_TEST_PROBE_DEF(fun_) \ + uint32_t const qs_tp_ = QS_getTestProbe_((void (*)(void))(fun_)); + +/*! QS macro to apply a Test-Probe */ +#define QS_TEST_PROBE(code_) \ + if (qs_tp_ != 0U) { code_ } + +/*! QS macro to apply a Test-Probe */ +#define QS_TEST_PROBE_ID(id_, code_) \ + if (qs_tp_ == (uint32_t)(id_)) { code_ } + +/*! QS macro to pause test execution and enter the test event loop */ +#define QS_TEST_PAUSE() (QS_test_pause_()) + +#else /* Q_UTEST not defined */ + +/* dummy definitions when not building for QUTEST */ +#define QS_TEST_PROBE_DEF(fun_) +#define QS_TEST_PROBE(code_) +#define QS_TEST_PROBE_ID(id_, code_) +#define QS_TEST_PAUSE() ((void)0) + +#endif /* Q_UTEST */ + +#endif /* def QS_H */ + + + /*! +* @date Last updated on: 2021-12-23 +* @version Last updated for: @ref qpc_7_0_0 +* +* @file +* @brief Dummy definitions of the QS macros that avoid code generation from +* the QS instrumentation. +*/ +#ifndef QS_DUMMY_H +#define QS_DUMMY_H + +#ifdef Q_SPY + #error "Q_SPY must NOT be defined to include qs_dummy.h" +#endif + +#define QS_INIT(arg_) ((uint8_t)1U) +#define QS_EXIT() ((void)0) +#define QS_DUMP() ((void)0) +#define QS_GLB_FILTER(rec_) ((void)0) +#define QS_LOC_FILTER(qs_id_) ((void)0) + +#define QS_GET_BYTE(pByte_) ((uint16_t)0xFFFFU) +#define QS_GET_BLOCK(pSize_) ((uint8_t *)0) + +#define QS_BEGIN_ID(rec_, qs_id_) if (false) { +#define QS_END() } +#define QS_BEGIN_NOCRIT(rec_, qs_id_) if (false) { +#define QS_END_NOCRIT() } + +#define QS_I8(width_, data_) ((void)0) +#define QS_U8(width_, data_) ((void)0) +#define QS_I16(width_, data_) ((void)0) +#define QS_U16(width_, data_) ((void)0) +#define QS_I32(width_, data_) ((void)0) +#define QS_U32(width_, data_) ((void)0) +#define QS_F32(width_, data_) ((void)0) +#define QS_F64(width_, data_) ((void)0) +#define QS_U64(width_, data_) ((void)0) +#define QS_STR(str_) ((void)0) +#define QS_MEM(mem_, size_) ((void)0) +#define QS_SIG(sig_, obj_) ((void)0) +#define QS_OBJ(obj_) ((void)0) +#define QS_FUN(fun_) ((void)0) + +#define QS_SIG_DICTIONARY(sig_, obj_) ((void)0) +#define QS_OBJ_DICTIONARY(obj_) ((void)0) +#define QS_OBJ_ARR_DICTIONARY(obj_, idx_) ((void)0) +#define QS_FUN_DICTIONARY(fun_) ((void)0) +#define QS_USR_DICTIONARY(rec_) ((void)0) +#define QS_ASSERTION(module_, loc_, delay_) ((void)0) +#define QS_FLUSH() ((void)0) + +#define QS_TEST_PROBE_DEF(fun_) +#define QS_TEST_PROBE(code_) +#define QS_TEST_PROBE_ID(id_, code_) +#define QS_TEST_PAUSE() ((void)0) + +#define QS_OUTPUT() ((void)0) +#define QS_RX_INPUT() ((void)0) + +/*==========================================================================*/ +/* internal QS macros used only in the QP components */ + +#ifdef QP_IMPL + /* predefined QS trace records */ + #define QS_BEGIN_PRE_(rec_, qs_id_) if (false) { + #define QS_END_PRE_() } + #define QS_BEGIN_NOCRIT_PRE_(rec_, qs_id_) if (false) { + #define QS_END_NOCRIT_PRE_() } + #define QS_U8_PRE_(data_) ((void)0) + #define QS_2U8_PRE_(data1_, data2_) ((void)0) + #define QS_U16_PRE_(data_) ((void)0) + #define QS_U32_PRE_(data_) ((void)0) + #define QS_TIME_PRE_() ((void)0) + #define QS_SIG_PRE_(sig_) ((void)0) + #define QS_EVS_PRE_(size_) ((void)0) + #define QS_OBJ_PRE_(obj_) ((void)0) + #define QS_FUN_PRE_(fun_) ((void)0) + #define QS_EQC_PRE_(ctr_) ((void)0) + #define QS_MPC_PRE_(ctr_) ((void)0) + #define QS_MPS_PRE_(size_) ((void)0) + #define QS_TEC_PRE_(ctr_) ((void)0) + + #define QS_CRIT_STAT_ + #define QF_QS_CRIT_ENTRY() ((void)0) + #define QF_QS_CRIT_EXIT() ((void)0) + #define QF_QS_ISR_ENTRY(isrnest_, prio_) ((void)0) + #define QF_QS_ISR_EXIT(isrnest_, prio_) ((void)0) + #define QF_QS_ACTION(act_) ((void)0) +#endif /* QP_IMPL */ + +#endif /* QS_DUMMY_H */ + + + /*! +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief Internal (package scope) QS/C interface. +*/ +#ifndef QS_PKG_H +#define QS_PKG_H + +/*==========================================================================*/ + +/*! QS received record types (RX channel) +* @details +* This enumeration specifies the record types for the QS receive channel +*/ +enum QSpyRxRecords { + QS_RX_INFO, /*!< query Target info (ver, config, tstamp) */ + QS_RX_COMMAND, /*!< execute a user-defined command in the Target */ + QS_RX_RESET, /*!< reset the Target */ + QS_RX_TICK, /*!< call QTIMEEVT_TICK_X() in the Target */ + QS_RX_PEEK, /*!< peek Target memory */ + QS_RX_POKE, /*!< poke Target memory */ + QS_RX_FILL, /*!< fill Target memory */ + QS_RX_TEST_SETUP, /*!< test setup */ + QS_RX_TEST_TEARDOWN, /*!< test teardown */ + QS_RX_TEST_PROBE, /*!< set a Test-Probe in the Target */ + QS_RX_GLB_FILTER, /*!< set global filters in the Target */ + QS_RX_LOC_FILTER, /*!< set local filters in the Target */ + QS_RX_AO_FILTER, /*!< set local AO filter in the Target */ + QS_RX_CURR_OBJ, /*!< set the "current-object" in the Target */ + QS_RX_TEST_CONTINUE, /*!< continue a test after QS_TEST_PAUSE() */ + QS_RX_QUERY_CURR, /*!< query the "current object" in the Target */ + QS_RX_EVENT /*!< inject an event to the Target */ +}; + +/*==========================================================================*/ +/*! Frame character of the QS output protocol */ +#define QS_FRAME (0x7EU) + +/*! Escape character of the QS output protocol */ +#define QS_ESC (0x7DU) + +/*! The expected checksum value over a correct QS record */ +#define QS_GOOD_CHKSUM (0xFFU) + +/*! Escape modifier of the QS output protocol */ +/** +* @details +* The escaped byte is XOR-ed with the escape modifier before it is inserted +* into the QS buffer. +*/ +#define QS_ESC_XOR (0x20U) + +/*==========================================================================*/ +/*! Internal QS macro to begin a predefined QS record with +* entering critical section. +* +* @note This macro is intended to use only inside QP components and NOT +* at the application level. +* @sa QS_BEGIN_ID() +*/ +#define QS_BEGIN_PRE_(rec_, qs_id_) \ + if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ + QS_CRIT_E_(); \ + QS_beginRec_((uint_fast8_t)(rec_)); + +/*! Internal QS macro to end a predefined QS record with +* exiting critical section. +* +* @note This macro is intended to use only inside QP components and NOT +* at the application level. +* @sa QS_END() +*/ +#define QS_END_PRE_() \ + QS_endRec_(); \ + QS_CRIT_X_(); \ + } + +/*! Internal macro to begin a predefined QS record without +* entering critical section. +* +* @note This macro is intended to use only inside QP components and NOT +* at the application level. +* @sa QS_BEGIN_NOCRIT() +*/ +#define QS_BEGIN_NOCRIT_PRE_(rec_, qs_id_) \ + if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qs_id_)) { \ + QS_beginRec_((uint_fast8_t)(rec_)); + +/*! Internal QS macro to end a predefined QS record without +* exiting critical section +* +* @note This macro is intended to use only inside QP components and NOT +* at the application level. @sa #QS_END_NOCRIT +*/ +#define QS_END_NOCRIT_PRE_() QS_endRec_(); } + +/*! Internal QS macro to output a predefined uint8_t data element */ +#define QS_U8_PRE_(data_) (QS_u8_raw_((uint8_t)(data_))) + +/*! Internal QS macro to output 2 predefined uint8_t data elements */ +#define QS_2U8_PRE_(data1_, data2_) \ + (QS_2u8_raw_((uint8_t)(data1_), (uint8_t)(data2_))) + +/*! Internal QS macro to output an predefined uint16_t data element */ +#define QS_U16_PRE_(data_) (QS_u16_raw_((uint16_t)(data_))) + +/*! Internal QS macro to output a predefined uint32_t data element */ +#define QS_U32_PRE_(data_) (QS_u32_raw_((uint32_t)(data_))) + +/*! Internal QS macro to output a predefined zero-terminated string element */ +#define QS_STR_PRE_(msg_) (QS_str_raw_((msg_))) + +#if (!defined Q_SIGNAL_SIZE || (Q_SIGNAL_SIZE == 1U)) + /*! Internal macro to output an unformatted event signal data element */ + /** + * @note the size of the pointer depends on the macro #Q_SIGNAL_SIZE. + */ + #define QS_SIG_PRE_(sig_) (QS_u8_raw_((uint8_t)sig_)) +#elif (Q_SIGNAL_SIZE == 2U) + #define QS_SIG_PRE_(sig_) (QS_u16_raw_((uint16_t)sig_)) +#elif (Q_SIGNAL_SIZE == 4U) + #define QS_SIG_PRE_(sig_) (QS_u32_raw_((uint32_t)sig_)) +#endif + +#define QS_OBJ_PRE_(obj_) (QS_obj_raw_(obj_)) + +#if (!defined QS_FUN_PTR_SIZE || (QS_FUN_PTR_SIZE == 1U)) + #define QS_FUN_PRE_(fun_) (QS_u8_raw_((uint8_t)(fun_))) +#elif (QS_FUN_PTR_SIZE == 2U) + #define QS_FUN_PRE_(fun_) (QS_u16_raw_((uint16_t)(fun_))) +#elif (QS_FUN_PTR_SIZE == 4U) + #define QS_FUN_PRE_(fun_) (QS_u32_raw_((uint32_t)(fun_))) +#elif (QS_FUN_PTR_SIZE == 8U) + #define QS_FUN_PRE_(fun_) (QS_u64_raw_((uint64_t)(fun_))) +#else + /*! Internal macro to output an unformatted function pointer */ + /** @note the size of the pointer depends on the macro #QS_FUN_PTR_SIZE. + * If the size is not defined the size of pointer is assumed 4-bytes. + */ + #define QS_FUN_PRE_(fun_) (QS_u32_raw_((uint32_t)(fun_))) +#endif + +/*==========================================================================*/ +#if (!defined QF_EQUEUE_CTR_SIZE || (QF_EQUEUE_CTR_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted event queue counter + * data element. */ + /** + * @note the counter size depends on the macro #QF_EQUEUE_CTR_SIZE. + */ + #define QS_EQC_PRE_(ctr_) QS_u8_raw_((uint8_t)(ctr_)) +#elif (QF_EQUEUE_CTR_SIZE == 2U) + #define QS_EQC_PRE_(ctr_) QS_u16_raw_((uint16_t)(ctr_)) +#elif (QF_EQUEUE_CTR_SIZE == 4U) + #define QS_EQC_PRE_(ctr_) QS_u32_raw_((uint32_t)(ctr_)) +#endif + +#if (!defined QF_EVENT_SIZ_SIZE || (QF_EVENT_SIZ_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted event size + * data element. */ + /** + * @note the event size depends on the macro #QF_EVENT_SIZ_SIZE. + */ + #define QS_EVS_PRE_(size_) QS_u8_raw_((uint8_t)(size_)) +#elif (QF_EVENT_SIZ_SIZE == 2U) + #define QS_EVS_PRE_(size_) QS_u16_raw_((uint16_t)(size_)) +#elif (QF_EVENT_SIZ_SIZE == 4U) + #define QS_EVS_PRE_(size_) QS_u32_raw_((uint32_t)(size_)) +#endif + +#if (!defined QF_MPOOL_SIZ_SIZE || (QF_MPOOL_SIZ_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted memory pool + * block-size data element */ + /** + * @note the block-size depends on the macro #QF_MPOOL_SIZ_SIZE. + */ + #define QS_MPS_PRE_(size_) QS_u8_raw_((uint8_t)(size_)) +#elif (QF_MPOOL_SIZ_SIZE == 2U) + #define QS_MPS_PRE_(size_) QS_u16_raw_((uint16_t)(size_)) +#elif (QF_MPOOL_SIZ_SIZE == 4U) + #define QS_MPS_PRE_(size_) QS_u32_raw_((uint32_t)(size_)) +#endif + +#if (!defined QF_MPOOL_CTR_SIZE || (QF_MPOOL_CTR_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted memory pool + * block-counter data element. */ + /** + * @note the counter size depends on the macro #QF_MPOOL_CTR_SIZE. + */ + #define QS_MPC_PRE_(ctr_) QS_u8_raw_((uint8_t)(ctr_)) +#elif (QF_MPOOL_CTR_SIZE == 2U) + #define QS_MPC_PRE_(ctr_) QS_u16_raw_((uint16_t)(ctr_)) +#elif (QF_MPOOL_CTR_SIZE == 4U) + #define QS_MPC_PRE_(ctr_) QS_u32_raw_((uint16_t)(ctr_)) +#endif + +#if (!defined QF_TIMEEVT_CTR_SIZE || (QF_TIMEEVT_CTR_SIZE == 1U)) + + /*! Internal QS macro to output an unformatted time event + * tick-counter data element */ + /** + * @note the counter size depends on the macro #QF_TIMEEVT_CTR_SIZE. + */ + #define QS_TEC_PRE_(ctr_) QS_u8_raw_((uint8_t)(ctr_)) +#elif (QF_TIMEEVT_CTR_SIZE == 2U) + #define QS_TEC_PRE_(ctr_) QS_u16_raw_((uint16_t)(ctr_)) +#elif (QF_TIMEEVT_CTR_SIZE == 4U) + #define QS_TEC_PRE_(ctr_) QS_u32_raw_((uint32_t)(ctr_)) +#endif + +/*==========================================================================*/ +/*! Internal QS macro to insert an un-escaped byte into the QS buffer */ +#define QS_INSERT_BYTE_(b_) \ + buf[head] = (b_); \ + ++head; \ + if (head == end) { \ + head = 0U; \ + } + +/*! Internal QS macro to insert an escaped byte into the QS buffer */ +#define QS_INSERT_ESC_BYTE_(b_) \ + chksum = (uint8_t)(chksum + (b_)); \ + if (((b_) != QS_FRAME) && ((b_) != QS_ESC)) { \ + QS_INSERT_BYTE_(b_) \ + } \ + else { \ + QS_INSERT_BYTE_(QS_ESC) \ + QS_INSERT_BYTE_((uint8_t)((b_) ^ QS_ESC_XOR))\ + ++QS_priv_.used; \ + } + +#endif /* QS_PKG_H */ + + + /*! +* @date Last updated on: 2022-07-22 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QP/C public interface including backwards-compatibility layer +* @details +* This header file must be included directly or indirectly +* in all application modules (*.c files) that use QP/C. +*/ +#ifndef QPC_H +#define QPC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/*==========================================================================*/ +#include "qf_port.h" /* QF/C port from the port directory */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ + +#ifdef Q_SPY /* software tracing enabled? */ + #include "qs_port.h" /* QS/C port from the port directory */ +#else + #include "qs_dummy.h" /* QS/C dummy (inactive) interface */ +#endif + +/*==========================================================================*/ + +#ifndef QP_API_VERSION + +/*! Specifies the backwards compatibility with the QP/C API version. +* @details +* For example, QP_API_VERSION==691 will cause generating the compatibility +* layer with QP/C version 6.9.1 and newer, but not older than 6.9.1. +* QP_API_VERSION==0 causes generation of the maximum currently supported +* backwards compatibility. This is the default.<br> +* <br> +* Conversely, QP_API_VERSION==9999 means that no compatibility layer should +* be generated. This setting is useful for checking if an application +* complies with the latest QP/C API. +*/ +#define QP_API_VERSION 0 + +#endif /* #ifndef QP_API_VERSION */ + +/*==========================================================================*/ +/* QP API compatibility layer... */ + +#if (QP_API_VERSION < 700) + +/*! @deprecated plain 'char' is no longer forbidden in MISRA-C 2012 */ +typedef char char_t; + +/*==========================================================================*/ +#if (QP_API_VERSION < 691) + +/*! @deprecated enable the QS global filter */ +#define QS_FILTER_ON(rec_) QS_GLB_FILTER((rec_)) + +/*! @deprecated disable the QS global filter */ +#define QS_FILTER_OFF(rec_) QS_GLB_FILTER(-(rec_)) + +/*! @deprecated enable the QS local filter for SM (state machine) object */ +#define QS_FILTER_SM_OBJ(obj_) ((void)0) + +/*! @deprecated enable the QS local filter for AO (active objects) */ +#define QS_FILTER_AO_OBJ(obj_) ((void)0) + +/*! @deprecated enable the QS local filter for MP (memory pool) object */ +#define QS_FILTER_MP_OBJ(obj_) ((void)0) + +/*! @deprecated enable the QS local filter for EQ (event queue) object */ +#define QS_FILTER_EQ_OBJ(obj_) ((void)0) + +/*! @deprecated enable the QS local filter for TE (time event) object */ +#define QS_FILTER_TE_OBJ(obj_) ((void)0) + +#ifdef Q_SPY + +/*! @deprecated local Filter for a generic application object @p obj_. */ +#define QS_FILTER_AP_OBJ(obj_) (QS_priv_.locFilter_AP = (obj_)) + +/*! @deprecated begin of a user QS record, instead use QS_BEGIN_ID() */ +#define QS_BEGIN(rec_, obj_) \ + if (((QS_priv_.glbFilter[(uint_fast8_t)(rec_) >> 3U] \ + & (1U << ((uint_fast8_t)(rec_) & 7U))) != 0U) \ + && ((QS_priv_.locFilter_AP == (void *)0) \ + || (QS_priv_.locFilter_AP == (obj_)))) \ + { \ + QS_CRIT_STAT_ \ + QS_CRIT_E_(); \ + QS_beginRec_((uint_fast8_t)(rec_)); \ + QS_TIME_PRE_(); { + +/*! @deprecated Output formatted uint32_t to the QS record */ +#define QS_U32_HEX(width_, data_) \ + (QS_u32_fmt_((uint8_t)(((width_) << 4)) | (uint8_t)0x0FU, (data_))) + +#else + +#define QS_FILTER_AP_OBJ(obj_) ((void)0) +#define QS_BEGIN(rec_, obj_) if (false) { +#define QS_U32_HEX(width_, data_) ((void)0) + +#endif + +/*==========================================================================*/ +#if (QP_API_VERSION < 660) + +/*! @deprecated casting to QXThreadHandler +* instead use: the new signature of QXThreadHandler and don't cast +*/ +#define Q_XTHREAD_CAST(handler_) ((QXThreadHandler)(handler_)) + +/*==========================================================================*/ +#if (QP_API_VERSION < 580) + +/*! @deprecated call to the QMSM_INIT() operation; instead use: QHSM_INIT() */ +#define QMSM_INIT(me_, e_) QHSM_INIT((me_), (e_)) + +/*! @deprecated call to the QMSM_DISPATCH() operation; +* instead use: QHSM_DISPATCH() */ +#define QMSM_DISPATCH(me_, e_) QHSM_DISPATCH((me_), (e_), 0U) + +/*==========================================================================*/ +#if (QP_API_VERSION < 540) + +/*! @deprecated QFsm state machine; +* instead use: ::QHsm. Legacy state machines coded in the "QFsm-style" will +* continue to work, but will use the ::QHsm implementation internally. +* There is no longer any efficiency advantage in using the "QFsm-style" +* state machines. +* +* @note +* For efficiency, the recommended migration path is to use the ::QMsm +* state machine and the QM modeling tool. +*/ +typedef QHsm QFsm; + +/*! @deprecated QFsm state machine constructor; instead use: QHsm_ctor() */ +#define QFsm_ctor QHsm_ctor + +/*! deprecated macro to call in QFsm state-handler when it +* ignores (does not handle) an event (instead use Q_SUPER()) +*/ +#define Q_IGNORED() (Q_SUPER(&QHsm_top)) + +/*! @deprecated macro for cooperativew "Vanilla" kernel; +* instead use: QV_onIdle() */ +#define QF_onIdle QV_onIdle + +#endif /* QP_API_VERSION < 540 */ +#endif /* QP_API_VERSION < 580 */ +#endif /* QP_API_VERSION < 660 */ +#endif /* QP_API_VERSION < 691 */ +#endif /* QP_API_VERSION < 700 */ + +#ifdef __cplusplus +} +#endif + +#endif /* QPC_H */ + + + /*! +* @date Last updated on: 2021-12-23 +* @version Last updated for: @ref qpc_7_0_0 +* +* @file +* @brief Application build time-stamp interface +*/ +#ifndef QSTAMP_H +#define QSTAMP_H + +extern char const Q_BUILD_DATE[12]; +extern char const Q_BUILD_TIME[9]; + +#endif /* QSTAMP_H */ + + + /*! +* @date Last updated on: 2021-12-23 +* @version Last updated for: @ref qpc_7_0_0 +* +* @file +* @brief Application build time-stamp +* @details +* This module needs to be re-compiled in every new software build. To achive +* this, it is recommended to delete the object file (qstamp.o, or qstamp.obj) +* in the build directory before each build. (Most development tools allow +* you to specify a pre-build command, which is the ideal place to delete +* the qstamp object file.) +*/ + +#include "qstamp.h" + +/*! the calendar date of the last translation of the form: "Mmm dd yyyy" */ +char const Q_BUILD_DATE[12] = __DATE__; + +/*! the time of the last translation of the form: "hh:mm:ss" */ +char const Q_BUILD_TIME[9] = __TIME__; + + + + + + /*! +* @date Last updated on: 2022-07-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief ::QHsm implementation +* +* @tr{RQP103} @tr{RQP104} @tr{RQP120} @tr{RQP130} +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qep_port.h" /* QEP port */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qep_hsm") + +/*==========================================================================*/ +$define ${version} + +/*! internal QEP constants */ +enum { + QEP_EMPTY_SIG_ = 0, /*!< reserved empty signal for internal use only */ +}; + +/*! Immutable events corresponding to the reserved signals. +* +* @details +* Static, pre-allocated standard events that the QEP event processor sends +* to state handler functions of QHsm-style state machine to execute entry +* actions, exit actions, and initial transitions. +*/ +static QEvt const QEP_reservedEvt_[] = { + { (QSignal)QEP_EMPTY_SIG_, 0U, 0U }, + { (QSignal)Q_ENTRY_SIG, 0U, 0U }, + { (QSignal)Q_EXIT_SIG, 0U, 0U }, + { (QSignal)Q_INIT_SIG, 0U, 0U } +}; + +/*! helper macro to trigger internal event in an HSM */ +#define QEP_TRIG_(state_, sig_) \ + ((*(state_))(me, &QEP_reservedEvt_[sig_])) + +#ifdef Q_SPY + #define QEP_EXIT_(state_, qs_id_) do { \ + if ((*(state_))(me, &QEP_reservedEvt_[Q_EXIT_SIG]) \ + == Q_RET_HANDLED) { \ + QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, (qs_id_)) \ + QS_OBJ_PRE_(me); \ + QS_FUN_PRE_(state_); \ + QS_END_PRE_() \ + } \ + } while (false) + + #define QEP_ENTER_(state_, qs_id_) do { \ + if ((*(state_))(me, &QEP_reservedEvt_[Q_ENTRY_SIG]) \ + == Q_RET_HANDLED) { \ + QS_BEGIN_PRE_(QS_QEP_STATE_ENTRY, (qs_id_)) \ + QS_OBJ_PRE_(me); \ + QS_FUN_PRE_(state_); \ + QS_END_PRE_() \ + } \ + } while (false) + +#else + #define QEP_EXIT_(state_, dummy_) \ + ((void)(*(state_))(me, &QEP_reservedEvt_[Q_EXIT_SIG])) + + #define QEP_ENTER_(state_, dummy_) \ + ((void)(*(state_))(me, &QEP_reservedEvt_[Q_ENTRY_SIG])) + +#endif /* Q_SPY */ + +$define ${QEP::QHsm} + + + /*! +* @date Last updated on: 2022-05-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief ::QMsm implementation +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qep_port.h" /* QEP port */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qep_msm") + +/*==========================================================================*/ +/*! internal QEP constants */ + +/*! maximum depth of entry levels in a MSM for transition to history. */ +#define QMSM_MAX_ENTRY_DEPTH_ 4 + +static struct QMState const l_msm_top_s = { + (struct QMState *)0, + Q_STATE_CAST(0), + Q_ACTION_CAST(0), + Q_ACTION_CAST(0), + Q_ACTION_CAST(0) +}; + +/*==========================================================================*/ +$define ${QEP::QMsm} + + + /*! +* @date Last updated on: 2022-06-30 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @deprecated +* Empty file kept only for backwards compatibility. +* @sa qf_qact.c +*/ +extern char const dummy; /* declaration */ +char const dummy = '\0'; /* definition */ + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief ::QActive native queue operations (based on ::QEQueue) +* +* @note +* this source file is only included in the application build when the native +* QF active object queue is used (instead of a message queue of an RTOS). +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qf_actq") + +/*==========================================================================*/ +$define ${QF::QActive::post_} +$define ${QF::QActive::postLIFO_} +$define ${QF::QActive::get_} + +$define ${QF::QF-base::getQueueMin} + +/*==========================================================================*/ +/*! Perform downcast to QTicker pointer. +* +* @details +* This macro encapsulates the downcast to (QTicker *), which is used in +* QTicker_init_() and QTicker_dispatch_(). Such casts violate MISRA-C 2012 +* Rule 11.3(req) "cast from pointer to object type to pointer to different +* object type". +*/ +#define QTICKER_CAST_(me_) ((QActive *)(me_)) + +$define ${QF::QTicker} + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QActive_defer() and QActive_recall() implementation. +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qf_defer") + +$define ${QF::QActive::defer} +$define ${QF::QActive::recall} +$define ${QF::QActive::flushDeferred} + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C dynamic event management +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qf_dyn") + +//============================================================================ +$define ${QEP::QEvt} + +//============================================================================ +$define ${QF::QF-dyn} + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief ::QMPool implementatin (Memory Pool) +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qf_mem") + +$define ${QF::QMPool} + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QActive_ctor() definition +* +* @details +* This file must remain separate from the rest to avoid pulling in the +* "virtual" functions QHsm_init_() and QHsm_dispatch_() in case they +* are not used by the application. +* +* @sa qf_qmact.c +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ + +Q_DEFINE_THIS_MODULE("qf_qact") + +//============================================================================ +$define ${QF::QActive::registry_[QF_MAX_ACTIVE + 1U]} +$define ${QF::QF-base::intNest_} +$define ${QF::QF-pkg} + +//============================================================================ +$define ${QF::QActive::ctor} +$define ${QF::QActive::register_} +$define ${QF::QActive::unregister_} + +//============================================================================ +$define ${QF-types::QF_LOG2} + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QMActive_ctor() definition +* +* @details +* This file must remain separate from the rest to avoid pulling in the +* "virtual" functions QHsm_init_() and QHsm_dispatch_() in case they +* are not used by the application. +* +* @sa qf_qact.c +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ + +/*Q_DEFINE_THIS_MODULE("qf_qmact")*/ + +/* +* This internal macro encapsulates the violation of MISRA-C 2012 +* Rule 11.3(req) "A cast shall not be performed between a pointer to +* object type and a poiner to a different object type". +*/ +#define QMSM_CAST_(ptr_) ((QMsm *)(ptr_)) + +$define ${QF::QMActive} + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief ::QEQueue implementation (QP native thread-safe queue) +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qf_qeq") + +$define ${QF::QEQueue} + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief Publish-Subscribe services +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qf_ps") + +/*==========================================================================*/ +$define ${QF::QActive::subscrList_} +$define ${QF::QActive::maxPubSignal_} + +$define ${QF::QActive::psInit} +$define ${QF::QActive::publish_} +$define ${QF::QActive::subscribe} +$define ${QF::QActive::unsubscribe} +$define ${QF::QActive::unsubscribeAll} + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C time events and time management services +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qf_time") + +#ifdef Q_SPY +/*! intertnal macro to encapsulate a MISRA deviation +* @details +* This internal macro encapsulates the violation of MISRA-C 2012 +* Rule 11.5(A) "A conversion should not be performed from pointer to void +* into pointer to object". +*/ +#define QACTIVE_CAST_(ptr_) ((QActive *)(ptr_)) +#endif + +$define ${QF::QTimeEvt} + + + + + /*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief Cooperative QV kernel, implementation of kernel-specific functions. +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope internal interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +/* protection against including this source file in a wrong project */ +#ifndef QV_H + #error "Source file included in a project NOT based on the QV kernel" +#endif /* QV_H */ + +Q_DEFINE_THIS_MODULE("qv") + +/*==========================================================================*/ +$define ${QV::QV-base} +$define ${QV::QF-cust} +$define ${QV::QActive} + + + + + /*! +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QK preemptive kernel implementation +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope internal interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +/* protection against including this source file in a wrong project */ +#ifndef QK_H + #error "Source file included in a project NOT based on the QK kernel" +#endif /* QK_H */ + +Q_DEFINE_THIS_MODULE("qk") + +/*==========================================================================*/ +$define ${QK::QK-base} +$define ${QK::QF-cust} +$define ${QK::QActive} + + + + + /*! +* @date Last updated on: 2022-07-27 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QXK preemptive dual-mode kernel core functions +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope internal interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +/* protection against including this source file in a wrong project */ +#ifndef QXK_H + #error "Source file included in a project NOT based on the QXK kernel" +#endif /* QXK_H */ + +Q_DEFINE_THIS_MODULE("qxk") + +/*==========================================================================*/ +$define ${QXK::QXK-base} +$define ${QXK::QF-cust} +$define ${QXK::QActive} +/*==========================================================================*/ +$define ${QXK-impl} + + + /*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QXMutex_init(), QXMutex_lock(), QXMutex_tryLock() and +* QXMutex_unlock() definitions. +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +/* protection against including this source file in a wrong project */ +#ifndef QXK_H + #error "Source file included in a project NOT based on the QXK kernel" +#endif /* QXK_H */ + +Q_DEFINE_THIS_MODULE("qxk_mutex") + +/*==========================================================================*/ +$define ${QXK::QXMutex} + + + /*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QXK preemptive kernel semaphore functions +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope internal interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +/* protection against including this source file in a wrong project */ +#ifndef QXK_H + #error "Source file included in a project NOT based on the QXK kernel" +#endif /* QXK_H */ + +Q_DEFINE_THIS_MODULE("qxk_sema") + +/*==========================================================================*/ +$define ${QXK::QXSemaphore} + + + /*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QXK preemptive kernel extended (blocking) thread functions +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope internal interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +/* protection against including this source file in a wrong project */ +#ifndef QXK_H + #error "Source file included in a project NOT based on the QXK kernel" +#endif /* QXK_H */ + +Q_DEFINE_THIS_MODULE("qxk_xthr") + +/*==========================================================================*/ +$define ${QXK::QXThread} + + + + + /*! +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS software tracing services +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qs_port.h" /* QS port */ +#include "qs_pkg.h" /* QS package-scope interface */ +#include "qstamp.h" /* QP time-stamp */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ + +Q_DEFINE_THIS_MODULE("qs") + +/*==========================================================================*/ +$define ${QS::QS-tx} + + + /*! +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS long-long (64-bit) output +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qs_port.h" /* QS port */ +#include "qs_pkg.h" /* QS package-scope internal interface */ + +$define ${QS::QS-tx-64bit} + + + /** +* @date Last updated on: 2021-12-23 +* @version Last updated for: @ref qpc_7_0_0 +* +* @file +* @brief QS floating point output implementation +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qs_port.h" /* QS port */ +#include "qs_pkg.h" /* QS package-scope internal interface */ + +$define ${QS::QS-tx-fp} + + + /*! +* @date Last updated on: 2022-06-15 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C receive channel services +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qs_port.h" /* QS port */ +#include "qs_pkg.h" /* QS package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ + +Q_DEFINE_THIS_MODULE("qs_rx") + +/*==========================================================================*/ +#if (QS_OBJ_PTR_SIZE == 1U) + typedef uint8_t QSObj; +#elif (QS_OBJ_PTR_SIZE == 2U) + typedef uint16_t QSObj; +#elif (QS_OBJ_PTR_SIZE == 4U) + typedef uint32_t QSObj; +#elif (QS_OBJ_PTR_SIZE == 8U) + typedef uint64_t QSObj; +#endif + +/*! @cond +* Exclude the following internals from the Doxygen documentation +* Extended-state variables used for parsing various QS-RX Records +*/ +typedef struct { + uint32_t param1; + uint32_t param2; + uint32_t param3; + uint8_t idx; + uint8_t cmdId; +} CmdVar; + +typedef struct { + uint_fast8_t rate; +} TickVar; + +typedef struct { + uint16_t offs; + uint8_t size; + uint8_t num; + uint8_t idx; +} PeekVar; + +typedef struct { + uint32_t data; + uint16_t offs; + uint8_t size; + uint8_t num; + uint8_t idx; + uint8_t fill; +} PokeVar; + +typedef struct { + uint8_t data[16]; + uint8_t idx; + int8_t recId; /* global/local */ +} FltVar; + +typedef struct { + QSObj addr; + uint8_t idx; + uint8_t kind; /* see qs.h, enum QSpyObjKind */ + int8_t recId; +} ObjVar; + +typedef struct { + QEvt *e; + uint8_t *p; + QSignal sig; + uint16_t len; + uint8_t prio; + uint8_t idx; +} EvtVar; + +/* extended-state variables for the current state */ +static struct { + union Variant { + CmdVar cmd; + TickVar tick; + PeekVar peek; + PokeVar poke; + FltVar flt; + ObjVar obj; + EvtVar evt; +#ifdef Q_UTEST + struct QS_TProbe tp; +#endif /* Q_UTEST */ + } var; + uint8_t state; + uint8_t esc; + uint8_t seq; + uint8_t chksum; +} l_rx; + +enum { + ERROR_STATE, + WAIT4_SEQ, + WAIT4_REC, + WAIT4_INFO_FRAME, + WAIT4_CMD_ID, + WAIT4_CMD_PARAM1, + WAIT4_CMD_PARAM2, + WAIT4_CMD_PARAM3, + WAIT4_CMD_FRAME, + WAIT4_RESET_FRAME, + WAIT4_TICK_RATE, + WAIT4_TICK_FRAME, + WAIT4_PEEK_OFFS, + WAIT4_PEEK_SIZE, + WAIT4_PEEK_NUM, + WAIT4_PEEK_FRAME, + WAIT4_POKE_OFFS, + WAIT4_POKE_SIZE, + WAIT4_POKE_NUM, + WAIT4_POKE_DATA, + WAIT4_POKE_FRAME, + WAIT4_FILL_DATA, + WAIT4_FILL_FRAME, + WAIT4_FILTER_LEN, + WAIT4_FILTER_DATA, + WAIT4_FILTER_FRAME, + WAIT4_OBJ_KIND, + WAIT4_OBJ_ADDR, + WAIT4_OBJ_FRAME, + WAIT4_QUERY_KIND, + WAIT4_QUERY_FRAME, + WAIT4_EVT_PRIO, + WAIT4_EVT_SIG, + WAIT4_EVT_LEN, + WAIT4_EVT_PAR, + WAIT4_EVT_FRAME, + +#ifdef Q_UTEST + WAIT4_TEST_SETUP_FRAME, + WAIT4_TEST_TEARDOWN_FRAME, + WAIT4_TEST_PROBE_DATA, + WAIT4_TEST_PROBE_ADDR, + WAIT4_TEST_PROBE_FRAME, + WAIT4_TEST_CONTINUE_FRAME, +#endif /* Q_UTEST */ +}; + +/* static helper functions... */ +static void QS_rxParseData_(uint8_t b); +//static void QS_rxHandleGoodFrame_(uint8_t state); +static void QS_rxHandleBadFrame_(uint8_t state); +static void QS_rxReportAck_(int8_t recId); +static void QS_rxReportError_(int8_t code); +static void QS_rxReportDone_(int8_t recId); +static void QS_rxPoke_(void); + +/*! Internal QS-RX macro to encapsulate transition in the QS-RX FSM */ +#define QS_RX_TRAN_(target_) (l_rx.state = (uint8_t)(target_)) + +/*! @endcond */ + +/*==========================================================================*/ +$define ${QS::QS-rx} + +/*==========================================================================*/ +static void QS_rxParseData_(uint8_t b) { + switch (l_rx.state) { + case WAIT4_SEQ: { + ++l_rx.seq; + if (l_rx.seq != b) { + QS_rxReportError_(0x42); + l_rx.seq = b; /* update the sequence */ + } + QS_RX_TRAN_(WAIT4_REC); + break; + } + case WAIT4_REC: { + switch (b) { + case QS_RX_INFO: + QS_RX_TRAN_(WAIT4_INFO_FRAME); + break; + case QS_RX_COMMAND: + QS_RX_TRAN_(WAIT4_CMD_ID); + break; + case QS_RX_RESET: + QS_RX_TRAN_(WAIT4_RESET_FRAME); + break; + case QS_RX_TICK: + QS_RX_TRAN_(WAIT4_TICK_RATE); + break; + case QS_RX_PEEK: + if (QS_rxPriv_.currObj[AP_OBJ] != (void *)0) { + l_rx.var.peek.offs = 0U; + l_rx.var.peek.idx = 0U; + QS_RX_TRAN_(WAIT4_PEEK_OFFS); + } + else { + QS_rxReportError_((int8_t)QS_RX_PEEK); + QS_RX_TRAN_(ERROR_STATE); + } + break; + case QS_RX_POKE: /* intentionally fall-through */ + case QS_RX_FILL: + l_rx.var.poke.fill = + ((b == (uint8_t)QS_RX_FILL) ? 1U : 0U); + if (QS_rxPriv_.currObj[AP_OBJ] != (void *)0) { + l_rx.var.poke.offs = 0U; + l_rx.var.poke.idx = 0U; + QS_RX_TRAN_(WAIT4_POKE_OFFS); + } + else { + QS_rxReportError_((l_rx.var.poke.fill != 0U) + ? (int8_t)QS_RX_FILL + : (int8_t)QS_RX_POKE); + QS_RX_TRAN_(ERROR_STATE); + } + break; + case QS_RX_GLB_FILTER: /* intentionally fall-through */ + case QS_RX_LOC_FILTER: + l_rx.var.flt.recId = (int8_t)b; + QS_RX_TRAN_(WAIT4_FILTER_LEN); + break; + case QS_RX_AO_FILTER: /* intentionally fall-through */ + case QS_RX_CURR_OBJ: + l_rx.var.obj.recId = (int8_t)b; + QS_RX_TRAN_(WAIT4_OBJ_KIND); + break; + case QS_RX_QUERY_CURR: + l_rx.var.obj.recId = (int8_t)QS_RX_QUERY_CURR; + QS_RX_TRAN_(WAIT4_QUERY_KIND); + break; + case QS_RX_EVENT: + QS_RX_TRAN_(WAIT4_EVT_PRIO); + break; + +#ifdef Q_UTEST + case QS_RX_TEST_SETUP: + QS_RX_TRAN_(WAIT4_TEST_SETUP_FRAME); + break; + case QS_RX_TEST_TEARDOWN: + QS_RX_TRAN_(WAIT4_TEST_TEARDOWN_FRAME); + break; + case QS_RX_TEST_CONTINUE: + QS_RX_TRAN_(WAIT4_TEST_CONTINUE_FRAME); + break; + case QS_RX_TEST_PROBE: + if (QS_testData.tpNum + < (uint8_t)(sizeof(QS_testData.tpBuf) + / sizeof(QS_testData.tpBuf[0]))) + { + l_rx.var.tp.data = 0U; + l_rx.var.tp.idx = 0U; + QS_RX_TRAN_(WAIT4_TEST_PROBE_DATA); + } + else { /* the number of Test-Probes exceeded */ + QS_rxReportError_((int8_t)QS_RX_TEST_PROBE); + QS_RX_TRAN_(ERROR_STATE); + } + break; +#endif /* Q_UTEST */ + + default: + QS_rxReportError_(0x43); + QS_RX_TRAN_(ERROR_STATE); + break; + } + break; + } + case WAIT4_INFO_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_CMD_ID: { + l_rx.var.cmd.cmdId = b; + l_rx.var.cmd.idx = 0U; + l_rx.var.cmd.param1 = 0U; + l_rx.var.cmd.param2 = 0U; + l_rx.var.cmd.param3 = 0U; + QS_RX_TRAN_(WAIT4_CMD_PARAM1); + break; + } + case WAIT4_CMD_PARAM1: { + l_rx.var.cmd.param1 |= ((uint32_t)b << l_rx.var.cmd.idx); + l_rx.var.cmd.idx += 8U; + if (l_rx.var.cmd.idx == (8U * 4U)) { + l_rx.var.cmd.idx = 0U; + QS_RX_TRAN_(WAIT4_CMD_PARAM2); + } + break; + } + case WAIT4_CMD_PARAM2: { + l_rx.var.cmd.param2 |= ((uint32_t)b << l_rx.var.cmd.idx); + l_rx.var.cmd.idx += 8U; + if (l_rx.var.cmd.idx == (8U * 4U)) { + l_rx.var.cmd.idx = 0U; + QS_RX_TRAN_(WAIT4_CMD_PARAM3); + } + break; + } + case WAIT4_CMD_PARAM3: { + l_rx.var.cmd.param3 |= ((uint32_t)b << l_rx.var.cmd.idx); + l_rx.var.cmd.idx += 8U; + if (l_rx.var.cmd.idx == (8U * 4U)) { + l_rx.var.cmd.idx = 0U; + QS_RX_TRAN_(WAIT4_CMD_FRAME); + } + break; + } + case WAIT4_CMD_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_RESET_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_TICK_RATE: { + l_rx.var.tick.rate = (uint_fast8_t)b; + QS_RX_TRAN_(WAIT4_TICK_FRAME); + break; + } + case WAIT4_TICK_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_PEEK_OFFS: { + if (l_rx.var.peek.idx == 0U) { + l_rx.var.peek.offs = (uint16_t)b; + l_rx.var.peek.idx += 8U; + } + else { + l_rx.var.peek.offs |= (uint16_t)((uint16_t)b << 8U); + QS_RX_TRAN_(WAIT4_PEEK_SIZE); + } + break; + } + case WAIT4_PEEK_SIZE: { + if ((b == 1U) || (b == 2U) || (b == 4U)) { + l_rx.var.peek.size = b; + QS_RX_TRAN_(WAIT4_PEEK_NUM); + } + else { + QS_rxReportError_((int8_t)QS_RX_PEEK); + QS_RX_TRAN_(ERROR_STATE); + } + break; + } + case WAIT4_PEEK_NUM: { + l_rx.var.peek.num = b; + QS_RX_TRAN_(WAIT4_PEEK_FRAME); + break; + } + case WAIT4_PEEK_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_POKE_OFFS: { + if (l_rx.var.poke.idx == 0U) { + l_rx.var.poke.offs = (uint16_t)b; + l_rx.var.poke.idx = 1U; + } + else { + l_rx.var.poke.offs |= (uint16_t)((uint16_t)b << 8U); + QS_RX_TRAN_(WAIT4_POKE_SIZE); + } + break; + } + case WAIT4_POKE_SIZE: { + if ((b == 1U) || (b == 2U) || (b == 4U)) { + l_rx.var.poke.size = b; + QS_RX_TRAN_(WAIT4_POKE_NUM); + } + else { + QS_rxReportError_((l_rx.var.poke.fill != 0U) + ? (int8_t)QS_RX_FILL + : (int8_t)QS_RX_POKE); + QS_RX_TRAN_(ERROR_STATE); + } + break; + } + case WAIT4_POKE_NUM: { + if (b > 0U) { + l_rx.var.poke.num = b; + l_rx.var.poke.data = 0U; + l_rx.var.poke.idx = 0U; + QS_RX_TRAN_((l_rx.var.poke.fill != 0U) + ? WAIT4_FILL_DATA + : WAIT4_POKE_DATA); + } + else { + QS_rxReportError_((l_rx.var.poke.fill != 0U) + ? (int8_t)QS_RX_FILL + : (int8_t)QS_RX_POKE); + QS_RX_TRAN_(ERROR_STATE); + } + break; + } + case WAIT4_FILL_DATA: { + l_rx.var.poke.data |= ((uint32_t)b << l_rx.var.poke.idx); + l_rx.var.poke.idx += 8U; + if ((uint8_t)(l_rx.var.poke.idx >> 3U) == l_rx.var.poke.size) { + QS_RX_TRAN_(WAIT4_FILL_FRAME); + } + break; + } + case WAIT4_POKE_DATA: { + l_rx.var.poke.data |= ((uint32_t)b << l_rx.var.poke.idx); + l_rx.var.poke.idx += 8U; + if ((uint8_t)(l_rx.var.poke.idx >> 3U) == l_rx.var.poke.size) { + QS_rxPoke_(); + --l_rx.var.poke.num; + if (l_rx.var.poke.num == 0U) { + QS_RX_TRAN_(WAIT4_POKE_FRAME); + } + } + break; + } + case WAIT4_FILL_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_POKE_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_FILTER_LEN: { + if (b == sizeof(l_rx.var.flt.data)) { + l_rx.var.flt.idx = 0U; + QS_RX_TRAN_(WAIT4_FILTER_DATA); + } + else { + QS_rxReportError_(l_rx.var.flt.recId); + QS_RX_TRAN_(ERROR_STATE); + } + break; + } + case WAIT4_FILTER_DATA: { + l_rx.var.flt.data[l_rx.var.flt.idx] = b; + ++l_rx.var.flt.idx; + if (l_rx.var.flt.idx == sizeof(l_rx.var.flt.data)) { + QS_RX_TRAN_(WAIT4_FILTER_FRAME); + } + break; + } + case WAIT4_FILTER_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_OBJ_KIND: { + if (b <= (uint8_t)SM_AO_OBJ) { + l_rx.var.obj.kind = b; + l_rx.var.obj.addr = 0U; + l_rx.var.obj.idx = 0U; + QS_RX_TRAN_(WAIT4_OBJ_ADDR); + } + else { + QS_rxReportError_(l_rx.var.obj.recId); + QS_RX_TRAN_(ERROR_STATE); + } + break; + } + case WAIT4_OBJ_ADDR: { + l_rx.var.obj.addr |= ((QSObj)b << l_rx.var.obj.idx); + l_rx.var.obj.idx += 8U; + if (l_rx.var.obj.idx == (uint8_t)(8U * QS_OBJ_PTR_SIZE)) { + QS_RX_TRAN_(WAIT4_OBJ_FRAME); + } + break; + } + case WAIT4_OBJ_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_QUERY_KIND: { + if (b < (uint8_t)MAX_OBJ) { + l_rx.var.obj.kind = b; + QS_RX_TRAN_(WAIT4_QUERY_FRAME); + } + else { + QS_rxReportError_(l_rx.var.obj.recId); + QS_RX_TRAN_(ERROR_STATE); + } + break; + } + case WAIT4_QUERY_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_EVT_PRIO: { + l_rx.var.evt.prio = b; + l_rx.var.evt.sig = 0U; + l_rx.var.evt.idx = 0U; + QS_RX_TRAN_(WAIT4_EVT_SIG); + break; + } + case WAIT4_EVT_SIG: { + l_rx.var.evt.sig |= (QSignal)((uint32_t)b << l_rx.var.evt.idx); + l_rx.var.evt.idx += 8U; + if (l_rx.var.evt.idx == (uint8_t)(8U * Q_SIGNAL_SIZE)) { + l_rx.var.evt.len = 0U; + l_rx.var.evt.idx = 0U; + QS_RX_TRAN_(WAIT4_EVT_LEN); + } + break; + } + case WAIT4_EVT_LEN: { + l_rx.var.evt.len |= (uint16_t)((uint32_t)b << l_rx.var.evt.idx); + l_rx.var.evt.idx += 8U; + if (l_rx.var.evt.idx == (8U * 2U)) { + if ((l_rx.var.evt.len + sizeof(QEvt)) <= + QF_poolGetMaxBlockSize()) + { + /* report Ack before generating any other QS records */ + QS_rxReportAck_((int8_t)QS_RX_EVENT); + + l_rx.var.evt.e = QF_newX_( + ((uint_fast16_t)l_rx.var.evt.len + sizeof(QEvt)), + 0U, /* margin */ + (enum_t)l_rx.var.evt.sig); + if (l_rx.var.evt.e != (QEvt *)0) { /* evt allocated? */ + l_rx.var.evt.p = (uint8_t *)l_rx.var.evt.e; + l_rx.var.evt.p = &l_rx.var.evt.p[sizeof(QEvt)]; + if (l_rx.var.evt.len > 0U) { + QS_RX_TRAN_(WAIT4_EVT_PAR); + } + else { + QS_RX_TRAN_(WAIT4_EVT_FRAME); + } + } + else { + QS_rxReportError_((int8_t)QS_RX_EVENT); + QS_RX_TRAN_(ERROR_STATE); + } + } + else { + QS_rxReportError_((int8_t)QS_RX_EVENT); + QS_RX_TRAN_(ERROR_STATE); + } + } + break; + } + case WAIT4_EVT_PAR: { /* event parameters */ + *l_rx.var.evt.p = b; + ++l_rx.var.evt.p; + --l_rx.var.evt.len; + if (l_rx.var.evt.len == 0U) { + QS_RX_TRAN_(WAIT4_EVT_FRAME); + } + break; + } + case WAIT4_EVT_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + +#ifdef Q_UTEST + case WAIT4_TEST_SETUP_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_TEST_TEARDOWN_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_TEST_CONTINUE_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } + case WAIT4_TEST_PROBE_DATA: { + l_rx.var.tp.data |= ((uint32_t)b << l_rx.var.tp.idx); + l_rx.var.tp.idx += 8U; + if (l_rx.var.tp.idx == (uint8_t)(8U * sizeof(uint32_t))) { + l_rx.var.tp.addr = 0U; + l_rx.var.tp.idx = 0U; + QS_RX_TRAN_(WAIT4_TEST_PROBE_ADDR); + } + break; + } + case WAIT4_TEST_PROBE_ADDR: { + l_rx.var.tp.addr |= ((QSFun)b << l_rx.var.tp.idx); + l_rx.var.tp.idx += 8U; + if (l_rx.var.tp.idx == (uint8_t)(8U * QS_FUN_PTR_SIZE)) { + QS_RX_TRAN_(WAIT4_TEST_PROBE_FRAME); + } + break; + } + case WAIT4_TEST_PROBE_FRAME: { + /* keep ignoring the data until a frame is collected */ + break; + } +#endif /* Q_UTEST */ + + case ERROR_STATE: { + /* keep ignoring the data until a good frame is collected */ + break; + } + default: { /* unexpected or unimplemented state */ + QS_rxReportError_(0x45); + QS_RX_TRAN_(ERROR_STATE); + break; + } + } +} + +/*..........................................................................*/ +static void QS_rxHandleBadFrame_(uint8_t state) { + QS_rxReportError_(0x50); /* report error for all bad frames */ + switch (state) { + case WAIT4_EVT_FRAME: { + Q_ASSERT_ID(910, l_rx.var.evt.e != (QEvt *)0); + QF_gc(l_rx.var.evt.e); /* don't leak an allocated event */ + break; + } + default: { + /* intentionally empty */ + break; + } + } +} + +/*..........................................................................*/ +static void QS_rxReportAck_(int8_t recId) { + QS_CRIT_STAT_ + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_RX_STATUS); + QS_U8_PRE_(recId); /* record ID */ + QS_endRec_(); + QS_CRIT_X_(); + + QS_REC_DONE(); /* user callback (if defined) */ +} + +/*..........................................................................*/ +static void QS_rxReportError_(int8_t code) { + QS_CRIT_STAT_ + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_RX_STATUS); + QS_U8_PRE_(0x80U | (uint8_t)code); /* error code */ + QS_endRec_(); + QS_CRIT_X_(); + + QS_REC_DONE(); /* user callback (if defined) */ +} + +/*..........................................................................*/ +static void QS_rxReportDone_(int8_t recId) { + QS_CRIT_STAT_ + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_TARGET_DONE); + QS_TIME_PRE_(); /* timestamp */ + QS_U8_PRE_(recId); /* record ID */ + QS_endRec_(); + QS_CRIT_X_(); + + QS_REC_DONE(); /* user callback (if defined) */ +} + +/*..........................................................................*/ +static void QS_rxPoke_(void) { + uint8_t *ptr = (uint8_t *)QS_rxPriv_.currObj[AP_OBJ]; + ptr = &ptr[l_rx.var.poke.offs]; + switch (l_rx.var.poke.size) { + case 1: + *ptr = (uint8_t)l_rx.var.poke.data; + break; + case 2: + *(uint16_t *)ptr = (uint16_t)l_rx.var.poke.data; + break; + case 4: + *(uint32_t *)ptr = l_rx.var.poke.data; + break; + default: + Q_ERROR_ID(900); + break; + } + + l_rx.var.poke.data = 0U; + l_rx.var.poke.idx = 0U; + l_rx.var.poke.offs += (uint16_t)l_rx.var.poke.size; +} + + + /*! +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C stub for QUTEST unit testing +*/ +/* only build when Q_UTEST is defined */ +#ifdef Q_UTEST + +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ +#include "qs_port.h" /* include QS port */ +#include "qs_pkg.h" /* QS facilities for pre-defined trace records */ + +Q_DEFINE_THIS_MODULE("qutest") + +/*==========================================================================*/ +/* QUTest unit testing harness */ +$define ${QUTest} + +/*==========================================================================*/ +/* QF/C stub for QUTest */ +$define ${QUTest-stub} + +#endif /* Q_UTEST */ + + + + diff --git a/src/qf/qep_hsm.c b/src/qf/qep_hsm.c index e57a60b0..5c7eb3ad 100644 --- a/src/qf/qep_hsm.c +++ b/src/qf/qep_hsm.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qep_hsm.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qep_hsm.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,18 +32,18 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qep_hsm.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-12 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief ::QHsm implementation -* @ingroup qep * -* @rtr{RQP103} @rtr{RQP120} +* @tr{RQP103} @tr{RQP104} @tr{RQP120} @tr{RQP130} */ #define QP_IMPL /* this is QP implementation */ #include "qep_port.h" /* QEP port */ @@ -45,26 +58,30 @@ Q_DEFINE_THIS_MODULE("qep_hsm") /*==========================================================================*/ -char const QP_versionStr[7] = QP_VERSION_STR; +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${version} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${version::QP_versionStr[8]} .............................................*/ +char const QP_versionStr[8] = QP_VERSION_STR; +/*$enddef${version} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*==========================================================================*/ /*! internal QEP constants */ enum { QEP_EMPTY_SIG_ = 0, /*!< reserved empty signal for internal use only */ - - /*! maximum depth of state nesting in a HSM (including the top level), - * must be >= 3 - */ - QHSM_MAX_NEST_DEPTH_ = 6 }; -/*! -* @description -* Static, preallocated standard events that the QEP event processor sends +/*! Immutable events corresponding to the reserved signals. +* +* @details +* Static, pre-allocated standard events that the QEP event processor sends * to state handler functions of QHsm-style state machine to execute entry * actions, exit actions, and initial transitions. -* -* @rtr{RQP002B} */ static QEvt const QEP_reservedEvt_[] = { { (QSignal)QEP_EMPTY_SIG_, 0U, 0U }, @@ -73,17 +90,14 @@ static QEvt const QEP_reservedEvt_[] = { { (QSignal)Q_INIT_SIG, 0U, 0U } }; -/*! helper function to trigger reserved event in an HSM */ -static inline QState QHsm_trig_(QHsm * const me, - QStateHandler const state, QSignal sig) -{ - return (*state)(me, &QEP_reservedEvt_[sig]); -} +/*! helper macro to trigger internal event in an HSM */ +#define QEP_TRIG_(state_, sig_) \ + ((*(state_))(me, &QEP_reservedEvt_[sig_])) #ifdef Q_SPY #define QEP_EXIT_(state_, qs_id_) do { \ if ((*(state_))(me, &QEP_reservedEvt_[Q_EXIT_SIG]) \ - == (QState)Q_RET_HANDLED) { \ + == Q_RET_HANDLED) { \ QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, (qs_id_)) \ QS_OBJ_PRE_(me); \ QS_FUN_PRE_(state_); \ @@ -93,7 +107,7 @@ static inline QState QHsm_trig_(QHsm * const me, #define QEP_ENTER_(state_, qs_id_) do { \ if ((*(state_))(me, &QEP_reservedEvt_[Q_ENTRY_SIG]) \ - == (QState)Q_RET_HANDLED) { \ + == Q_RET_HANDLED) { \ QS_BEGIN_PRE_(QS_QEP_STATE_ENTRY, (qs_id_)) \ QS_OBJ_PRE_(me); \ QS_FUN_PRE_(state_); \ @@ -101,10 +115,6 @@ static inline QState QHsm_trig_(QHsm * const me, } \ } while (false) - /*! helper function to execute state transition */ - static int_fast8_t QHsm_tran_(QHsm * const me, - QStateHandler path[QHSM_MAX_NEST_DEPTH_], - uint_fast8_t const qs_id); #else #define QEP_EXIT_(state_, dummy_) \ ((void)(*(state_))(me, &QEP_reservedEvt_[Q_EXIT_SIG])) @@ -112,67 +122,110 @@ static inline QState QHsm_trig_(QHsm * const me, #define QEP_ENTER_(state_, dummy_) \ ((void)(*(state_))(me, &QEP_reservedEvt_[Q_ENTRY_SIG])) - static int_fast8_t QHsm_tran_(QHsm * const me, - QStateHandler path[QHSM_MAX_NEST_DEPTH_]); #endif /* Q_SPY */ -/*==========================================================================*/ -/*! -* @protected @memberof QHsm -* @description -* Performs the first step of HSM initialization by assigning the initial -* pseudostate to the currently active state of the state machine. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] initial pointer to the top-most initial state-handler -* function in the derived state machine -* -* @note Must be called only by the constructors of the derived state -* machines. -* -* @note Must be called only ONCE before QHSM_INIT(). -* -* @usage -* The following example illustrates how to invoke QHsm_ctor() in the -* "constructor" of a derived state machine: -* @include qep_qhsm_ctor.c -* -* @rtr{RQP103} -*/ -void QHsm_ctor(QHsm * const me, QStateHandler initial) { +/*$define${QEP::QHsm} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QEP::QHsm} .............................................................*/ + +/*${QEP::QHsm::isIn} .......................................................*/ +bool QHsm_isIn(QHsm * const me, + QStateHandler const state) +{ + /*! @pre the state configuration must be stable */ + Q_REQUIRE_ID(600, me->temp.fun == me->state.fun); + + bool inState = false; /* assume that this HSM is not in 'state' */ + + /* scan the state hierarchy bottom-up */ + QState r; + do { + /* do the states match? */ + if (me->temp.fun == state) { + inState = true; /* 'true' means that match found */ + r = Q_RET_IGNORED; /* break out of the loop */ + } + else { + r = QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); + } + } while (r != Q_RET_IGNORED); /* QHsm_top() state not reached */ + me->temp.fun = me->state.fun; /* restore the stable state configuration */ + + return inState; /* return the status */ +} + +/*${QEP::QHsm::state} ......................................................*/ +QStateHandler QHsm_state(QHsm * const me) { + return Q_STATE_CAST(me->state.fun); +} + +/*${QEP::QHsm::childState} .................................................*/ +QStateHandler QHsm_childState(QHsm * const me, + QStateHandler const parent) +{ + QStateHandler child = me->state.fun; /* start with the current state */ + bool isFound = false; /* start with the child not found */ + + /* establish stable state configuration */ + me->temp.fun = me->state.fun; + QState r; + do { + /* is this the parent of the current child? */ + if (me->temp.fun == parent) { + isFound = true; /* child is found */ + r = Q_RET_IGNORED; /* break out of the loop */ + } + else { + child = me->temp.fun; + r = QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); + } + } while (r != Q_RET_IGNORED); /* QHsm_top() state not reached */ + me->temp.fun = me->state.fun; /* establish stable state configuration */ + + /*! @post the child must be found */ + Q_ENSURE_ID(810, isFound); + + #ifdef Q_NASSERT + (void)isFound; /* avoid compiler warning about unused variable */ + #endif + + return child; /* return the child */ +} + +/*${QEP::QHsm::ctor} .......................................................*/ +void QHsm_ctor(QHsm * const me, + QStateHandler initial) +{ static struct QHsmVtable const vtable = { /* QHsm virtual table */ &QHsm_init_, &QHsm_dispatch_ -#ifdef Q_SPY + #ifdef Q_SPY ,&QHsm_getStateHandler_ -#endif + #endif }; me->vptr = &vtable; me->state.fun = Q_STATE_CAST(&QHsm_top); me->temp.fun = initial; } -/*==========================================================================*/ -/*! -* @private @memberof QHsm -* @description -* Executes the top-most initial transition in a HSM. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] e pointer to an extra parameter (might be NULL) -* @param[in] qs_id QS-id of this state machine (for QS local filter) -* -* @note Must be called only ONCE after the QHsm_ctor(). -* -* @rtr{RQP120I} -*/ -#ifdef Q_SPY -void QHsm_init_(QHsm * const me, void const * const e, - uint_fast8_t const qs_id) -#else -void QHsm_init_(QHsm * const me, void const * const e) -#endif +/*${QEP::QHsm::top} ........................................................*/ +QState QHsm_top(QHsm const * const me, + QEvt const * const e) { + Q_UNUSED_PAR(me); + Q_UNUSED_PAR(e); + return Q_RET_IGNORED; /* the top state ignores all events */ +} + +/*${QEP::QHsm::init_} ......................................................*/ +void QHsm_init_(QHsm * const me, + void const * const e, + uint_fast8_t const qs_id) +{ + #ifndef Q_SPY + (void)qs_id; /* unused parameter */ + #endif + QStateHandler t = me->state.fun; /*! @pre the virtual pointer must be initialized, the top-most initial @@ -187,7 +240,7 @@ void QHsm_init_(QHsm * const me, void const * const e) QState r = (*me->temp.fun)(me, Q_EVT_CAST(QEvt)); /* the top-most initial transition must be taken */ - Q_ASSERT_ID(210, r == (QState)Q_RET_TRAN); + Q_ASSERT_ID(210, r == Q_RET_TRAN); QS_CRIT_STAT_ QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) @@ -202,17 +255,16 @@ void QHsm_init_(QHsm * const me, void const * const e) int_fast8_t ip = 0; /* tran entry path index */ path[0] = me->temp.fun; - (void)QHsm_trig_(me, me->temp.fun, QEP_EMPTY_SIG_); + (void)QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); while (me->temp.fun != t) { ++ip; Q_ASSERT_ID(220, ip < QHSM_MAX_NEST_DEPTH_); path[ip] = me->temp.fun; - (void)QHsm_trig_(me, me->temp.fun, QEP_EMPTY_SIG_); + (void)QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); } me->temp.fun = path[0]; /* nested initial transition, drill into the target hierarchy... */ - /*! @rtr{RQP120D} */ do { QEP_ENTER_(path[ip], qs_id); /* enter path[ip] */ --ip; @@ -220,19 +272,19 @@ void QHsm_init_(QHsm * const me, void const * const e) t = path[0]; /* current state becomes the new source */ - r = QHsm_trig_(me, t, Q_INIT_SIG); /* execute initial transition */ + r = QEP_TRIG_(t, Q_INIT_SIG); /* execute initial transition */ -#ifdef Q_SPY - if (r == (QState)Q_RET_TRAN) { + #ifdef Q_SPY + if (r == Q_RET_TRAN) { QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ QS_FUN_PRE_(t); /* the source state */ QS_FUN_PRE_(me->temp.fun); /* target of the initial tran. */ QS_END_PRE_() } -#endif /* Q_SPY */ + #endif /* Q_SPY */ - } while (r == (QState)Q_RET_TRAN); + } while (r == Q_RET_TRAN); QS_BEGIN_PRE_(QS_QEP_INIT_TRAN, qs_id) QS_TIME_PRE_(); /* time stamp */ @@ -244,54 +296,13 @@ void QHsm_init_(QHsm * const me, void const * const e) me->temp.fun = t; /* mark the configuration as stable */ } -/*==========================================================================*/ -/*! -* @protected @memberof QHsm -* @description -* QHsm_top() is the ultimate root of state hierarchy in all HSMs derived -* from ::QHsm. -* -* @param[in] me pointer (see @ref oop) -* @param[in] e pointer to the event to be dispatched to the FSM -* -* @returns Always returns #Q_RET_IGNORED, which means that the top state -* ignores all events. -* -* @note The parameters to this state handler are not used. They are provided -* for conformance with the state-handler function signature ::QStateHandler. -* -* @rtr{RQP120T} -*/ -QState QHsm_top(void const * const me, QEvt const * const e) { - (void)me; /* suppress the "unused parameter" compiler warning */ - (void)e; /* suppress the "unused parameter" compiler warning */ - return (QState)Q_RET_IGNORED; /* the top state ignores all events */ -} - -/*==========================================================================*/ -/*! -* @private @memberof QHsm -* @description -* Dispatches an event for processing to a hierarchical state machine (HSM). -* The processing of an event represents one run-to-completion (RTC) step. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] e pointer to the event to be dispatched to the HSM -* @param[in] qs_id QS-id of this state machine (for QS local filter) -* -* @note -* This function should be called only via the virtual table (see -* QHSM_DISPATCH()) and should NOT be called directly in the applications. -* -* @rtr{RQP103} -*/ -#ifdef Q_SPY -void QHsm_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id) -#else -void QHsm_dispatch_(QHsm * const me, QEvt const * const e) -#endif +/*${QEP::QHsm::dispatch_} ..................................................*/ +void QHsm_dispatch_(QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id) { + Q_UNUSED_PAR(qs_id); /* unused when Q_SPY undefined */ + QStateHandler t = me->state.fun; QS_CRIT_STAT_ @@ -311,12 +322,11 @@ void QHsm_dispatch_(QHsm * const me, QEvt const * const e) QStateHandler s; QState r; /* process the event hierarchically... */ - /*! @rtr{RQP120A} */ do { s = me->temp.fun; r = (*s)(me, e); /* invoke state handler s */ - if (r == (QState)Q_RET_UNHANDLED) { /* unhandled due to a guard? */ + if (r == Q_RET_UNHANDLED) { /* unhandled due to a guard? */ QS_BEGIN_PRE_(QS_QEP_UNHANDLED, qs_id) QS_SIG_PRE_(e->sig); /* the signal of the event */ @@ -324,13 +334,13 @@ void QHsm_dispatch_(QHsm * const me, QEvt const * const e) QS_FUN_PRE_(s); /* the current state */ QS_END_PRE_() - r = QHsm_trig_(me, s, QEP_EMPTY_SIG_); /* find superstate of s */ + r = QEP_TRIG_(s, QEP_EMPTY_SIG_); /* find superstate of s */ } - } while (r == (QState)Q_RET_SUPER); + } while (r == Q_RET_SUPER); /* regular transition taken? */ - /*! @rtr{RQP120E} */ - if (r >= (QState)Q_RET_TRAN) { + /*! @tr{RQP120E} */ + if (r >= Q_RET_TRAN) { QStateHandler path[QHSM_MAX_NEST_DEPTH_]; path[0] = me->temp.fun; /* save the target of the transition */ @@ -338,36 +348,33 @@ void QHsm_dispatch_(QHsm * const me, QEvt const * const e) path[2] = s; /* exit current state to transition source s... */ - /*! @rtr{RQP120C} */ + /*! @tr{RQP120C} */ for (; t != s; t = me->temp.fun) { - if (QHsm_trig_(me, t, Q_EXIT_SIG) == (QState)Q_RET_HANDLED) { + if (QEP_TRIG_(t, Q_EXIT_SIG) == Q_RET_HANDLED) { QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ QS_FUN_PRE_(t); /* the exited state */ QS_END_PRE_() /* find superstate of t */ - (void)QHsm_trig_(me, t, QEP_EMPTY_SIG_); + (void)QEP_TRIG_(t, QEP_EMPTY_SIG_); } } - int_fast8_t ip; + int_fast8_t ip = QHsm_tran_(me, path, qs_id); /* the HSM transition */ -#ifdef Q_SPY - ip = QHsm_tran_(me, path, qs_id); - if (r == (QState)Q_RET_TRAN_HIST) { + #ifdef Q_SPY + if (r == Q_RET_TRAN_HIST) { QS_BEGIN_PRE_(QS_QEP_TRAN_HIST, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ QS_FUN_PRE_(t); /* the source of the transition */ QS_FUN_PRE_(path[0]); /* the target of the tran. to history */ QS_END_PRE_() } -#else - ip = QHsm_tran_(me, path); -#endif /* Q_SPY */ + #endif /* Q_SPY */ /* execute state entry actions in the desired order... */ - /*! @rtr{RQP120B} */ + /*! @tr{RQP120B} */ for (; ip >= 0; --ip) { QEP_ENTER_(path[ip], qs_id); /* enter path[ip] */ } @@ -376,8 +383,8 @@ void QHsm_dispatch_(QHsm * const me, QEvt const * const e) me->temp.fun = t; /* update the next state */ /* while nested initial transition... */ - /*! @rtr{RQP120D} */ - while (QHsm_trig_(me, t, Q_INIT_SIG) == (QState)Q_RET_TRAN) { + /*! @tr{RQP120I} */ + while (QEP_TRIG_(t, Q_INIT_SIG) == Q_RET_TRAN) { QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ @@ -389,13 +396,13 @@ void QHsm_dispatch_(QHsm * const me, QEvt const * const e) path[0] = me->temp.fun; /* find superstate */ - (void)QHsm_trig_(me, me->temp.fun, QEP_EMPTY_SIG_); + (void)QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); while (me->temp.fun != t) { ++ip; path[ip] = me->temp.fun; /* find superstate */ - (void)QHsm_trig_(me, me->temp.fun, QEP_EMPTY_SIG_); + (void)QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); } me->temp.fun = path[0]; @@ -420,8 +427,8 @@ void QHsm_dispatch_(QHsm * const me, QEvt const * const e) QS_END_PRE_() } -#ifdef Q_SPY - else if (r == (QState)Q_RET_HANDLED) { + #ifdef Q_SPY + else if (r == Q_RET_HANDLED) { QS_BEGIN_PRE_(QS_QEP_INTERN_TRAN, qs_id) QS_TIME_PRE_(); /* time stamp */ @@ -441,38 +448,26 @@ void QHsm_dispatch_(QHsm * const me, QEvt const * const e) QS_END_PRE_() } -#endif /* Q_SPY */ + #endif /* Q_SPY */ me->state.fun = t; /* change the current active state */ me->temp.fun = t; /* mark the configuration as stable */ } -/*==========================================================================*/ -/*! -* @private @memberof QHsm -* @description -* Static helper function to execute transition sequence in a hierarchical -* state machine (HSM). -* -* @param[in,out] me pointer (see @ref oop) -* @param[in,out] path array of pointers to state-handler functions -* to execute the entry actions -* @param[in] qs_id QS-id of this state machine (for QS local filter) -* -* @returns -* the depth of the entry path stored in the @p path parameter. -* -* @rtr{RQP120E} @rtr{RQP120F} -*/ +/*${QEP::QHsm::getStateHandler_} ...........................................*/ #ifdef Q_SPY -static int_fast8_t QHsm_tran_(QHsm * const me, - QStateHandler path[QHSM_MAX_NEST_DEPTH_], - uint_fast8_t const qs_id) -#else -static int_fast8_t QHsm_tran_(QHsm * const me, - QStateHandler path[QHSM_MAX_NEST_DEPTH_]) -#endif +QStateHandler QHsm_getStateHandler_(QHsm * const me) { + return me->state.fun; +} +#endif /* def Q_SPY */ + +/*${QEP::QHsm::tran_} ......................................................*/ +int_fast8_t QHsm_tran_(QHsm * const me, + QStateHandler path[QHSM_MAX_NEST_DEPTH_], + uint_fast8_t const qs_id) { + Q_UNUSED_PAR(qs_id); // unused when Q_SPY undefined + int_fast8_t ip = -1; /* transition entry path index */ QStateHandler t = path[0]; QStateHandler const s = path[2]; @@ -485,7 +480,7 @@ static int_fast8_t QHsm_tran_(QHsm * const me, } else { /* find superstate of target */ - (void)QHsm_trig_(me, t, QEP_EMPTY_SIG_); + (void)QEP_TRIG_(t, QEP_EMPTY_SIG_); t = me->temp.fun; @@ -495,7 +490,7 @@ static int_fast8_t QHsm_tran_(QHsm * const me, } else { /* find superstate of src */ - (void)QHsm_trig_(me, s, QEP_EMPTY_SIG_); + (void)QEP_TRIG_(s, QEP_EMPTY_SIG_); /* (c) check source->super==target->super... */ if (me->temp.fun == t) { @@ -517,8 +512,8 @@ static int_fast8_t QHsm_tran_(QHsm * const me, t = me->temp.fun; /* save source->super */ /* find target->super->super... */ - QState r = QHsm_trig_(me, path[1], QEP_EMPTY_SIG_); - while (r == (QState)Q_RET_SUPER) { + QState r = QEP_TRIG_(path[1], QEP_EMPTY_SIG_); + while (r == Q_RET_SUPER) { ++ip; path[ip] = me->temp.fun; /* store the entry path */ if (me->temp.fun == s) { /* is it the source? */ @@ -528,11 +523,11 @@ static int_fast8_t QHsm_tran_(QHsm * const me, Q_ASSERT_ID(510, ip < QHSM_MAX_NEST_DEPTH_); --ip; /* do not enter the source */ - r = (QState)Q_RET_HANDLED; /* terminate loop */ + r = Q_RET_HANDLED; /* terminate loop */ } /* it is not the source, keep going up */ else { - r = QHsm_trig_(me, me->temp.fun, QEP_EMPTY_SIG_); + r = QEP_TRIG_(me->temp.fun, QEP_EMPTY_SIG_); } } @@ -548,10 +543,10 @@ static int_fast8_t QHsm_tran_(QHsm * const me, * == target->super->super... */ iq = ip; - r = (QState)Q_RET_IGNORED; /* LCA NOT found */ + r = Q_RET_IGNORED; /* LCA NOT found */ do { if (t == path[iq]) { /* is this the LCA? */ - r = (QState)Q_RET_HANDLED; /* LCA found */ + r = Q_RET_HANDLED; /* LCA found */ ip = iq - 1; /* do not enter LCA */ iq = -1; /* cause termintion of the loop */ } @@ -561,22 +556,22 @@ static int_fast8_t QHsm_tran_(QHsm * const me, } while (iq >= 0); /* LCA not found? */ - if (r != (QState)Q_RET_HANDLED) { + if (r != Q_RET_HANDLED) { /* (g) check each source->super->... * for each target->super... */ - r = (QState)Q_RET_IGNORED; /* keep looping */ + r = Q_RET_IGNORED; /* keep looping */ do { /* exit t unhandled? */ - if (QHsm_trig_(me, t, Q_EXIT_SIG) - == (QState)Q_RET_HANDLED) + if (QEP_TRIG_(t, Q_EXIT_SIG) + == Q_RET_HANDLED) { QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) QS_OBJ_PRE_(me); QS_FUN_PRE_(t); QS_END_PRE_() - (void)QHsm_trig_(me, t, QEP_EMPTY_SIG_); + (void)QEP_TRIG_(t, QEP_EMPTY_SIG_); } t = me->temp.fun; /* set to super of t */ iq = ip; @@ -587,13 +582,13 @@ static int_fast8_t QHsm_tran_(QHsm * const me, ip = (int_fast8_t)(iq - 1); iq = -1; /* break out of inner loop */ /* break out of outer loop */ - r = (QState)Q_RET_HANDLED; + r = Q_RET_HANDLED; } else { --iq; } } while (iq >= 0); - } while (r != (QState)Q_RET_HANDLED); + } while (r != Q_RET_HANDLED); } } } @@ -602,106 +597,4 @@ static int_fast8_t QHsm_tran_(QHsm * const me, } return ip; } - -/*==========================================================================*/ -#ifdef Q_SPY -QStateHandler QHsm_getStateHandler_(QHsm * const me) { - return me->state.fun; -} -#endif - -/*==========================================================================*/ -/*! -* @public @memberof QHsm -* @description -* Tests if a state machine derived from QHsm is-in a given state. -* -* @note For a HSM, to "be in a state" means also to be in a superstate of -* of the state. -* -* @param[in] me pointer (see @ref oop) -* @param[in] state pointer to the state-handler function to be tested -* -* @returns -*'true' if the HSM "is in" the @p state and 'false' otherwise -* -* @rtr{RQP120S} -*/ -bool QHsm_isIn(QHsm * const me, QStateHandler const state) { - - /*! @pre the state configuration must be stable */ - Q_REQUIRE_ID(600, me->temp.fun == me->state.fun); - - bool inState = false; /* assume that this HSM is not in 'state' */ - - /* scan the state hierarchy bottom-up */ - QState r; - do { - /* do the states match? */ - if (me->temp.fun == state) { - inState = true; /* 'true' means that match found */ - r = (QState)Q_RET_IGNORED; /* break out of the loop */ - } - else { - r = QHsm_trig_(me, me->temp.fun, QEP_EMPTY_SIG_); - } - } while (r != (QState)Q_RET_IGNORED); /* QHsm_top() state not reached */ - me->temp.fun = me->state.fun; /* restore the stable state configuration */ - - return inState; /* return the status */ -} - -/*==========================================================================*/ -/*! -* @public @memberof QHsm -* @description -* Finds the child state of the given @c parent, such that this child state -* is an ancestor of the currently active state. The main purpose of this -* function is to support **shallow history** transitions in state machines -* derived from QHsm. -* -* @param[in] me pointer (see @ref oop) -* @param[in] parent pointer to the state-handler function -* -* @returns -* the child of a given @c parent state, which is an ancestor of the current -* active state. For the corner case when the currently active state is the -* given @c parent state, function returns the @c parent state. -* -* @note -* this function is designed to be called during state transitions, so it -* does not necessarily start in a stable state configuration. -* However, the function establishes stable state configuration upon exit. -* -* @rtr{RQP120H} -*/ -QStateHandler QHsm_childState(QHsm * const me, - QStateHandler const parent) -{ - QStateHandler child = me->state.fun; /* start with the current state */ - bool isFound = false; /* start with the child not found */ - - /* establish stable state configuration */ - me->temp.fun = me->state.fun; - QState r; - do { - /* is this the parent of the current child? */ - if (me->temp.fun == parent) { - isFound = true; /* child is found */ - r = (QState)Q_RET_IGNORED; /* break out of the loop */ - } - else { - child = me->temp.fun; - r = QHsm_trig_(me, me->temp.fun, QEP_EMPTY_SIG_); - } - } while (r != (QState)Q_RET_IGNORED); /* QHsm_top() state not reached */ - me->temp.fun = me->state.fun; /* establish stable state configuration */ - - /*! @post the child must be found */ - Q_ENSURE_ID(810, isFound); -#ifdef Q_NASSERT - (void)isFound; /* avoid compiler warning about unused variable */ -#endif - - return child; /* return the child */ -} +/*$enddef${QEP::QHsm} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qep_msm.c b/src/qf/qep_msm.c index 72cbfc1f..d50e0d95 100644 --- a/src/qf/qep_msm.c +++ b/src/qf/qep_msm.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qep_msm.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qep_msm.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qep_msm.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-31 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-05-24 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief ::QMsm implementation -* @ingroup qep */ #define QP_IMPL /* this is QP implementation */ #include "qep_port.h" /* QEP port */ @@ -56,69 +69,82 @@ static struct QMState const l_msm_top_s = { Q_ACTION_CAST(0) }; -#ifdef Q_SPY - /*! helper function to execute a transition-action table. - * @private @memberof QMsm - */ - static QState QMsm_execTatbl_(QHsm * const me, - struct QMTranActTable const *tatbl, - uint_fast8_t const qs_id); - - /*! helper function to exit the current state up to the transition source - * @private @memberof QMsm - */ - static void QMsm_exitToTranSource_(QHsm * const me, QMState const *cs, - QMState const *ts, - uint_fast8_t const qs_id); - - /*! helper function to execute a transition to history - * @private @memberof QMsm - */ - static QState QMsm_enterHistory_(QHsm * const me, - QMState const * const hist, - uint_fast8_t const qs_id); -#else - static QState QMsm_execTatbl_(QHsm * const me, - struct QMTranActTable const *tatbl); - static void QMsm_exitToTranSource_(QHsm * const me, QMState const *cs, - QMState const *ts); - static QState QMsm_enterHistory_(QHsm * const me, - QMState const * const hist); -#endif /* Q_SPY */ - /*==========================================================================*/ -/*! -* @protected @memberof QMsm -* @description -* Performs the first step of QMsm initialization by assigning the initial -* pseudostate to the currently active state of the state machine. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] initial the top-most initial transition for the MSM. -* -* @note -* Must be called only ONCE before QHSM_INIT(). -* -* @note -* QMsm inherits QHsm, so by the @ref oop convention it should call the -* constructor of the superclass, i.e., QHsm_ctor(). However, this would pull -* in the QHsmVtable, which in turn will pull in the code for QHsm_init_() and -* QHsm_dispatch_() implemetations. To avoid this code size penalty, in case -* ::QHsm is not used in a given project, the QMsm_ctor() performs direct -* intitialization of the Vtable, which avoids pulling in the code for QMsm. -* -* @usage -* The following example illustrates how to invoke QMsm_ctor() in the -* "constructor" of a derived state machine: -* @include qep_qmsm_ctor.c -*/ -void QMsm_ctor(QMsm * const me, QStateHandler initial) { +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QEP::QMsm} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QEP::QMsm} .............................................................*/ + +/*${QEP::QMsm::isInState} ..................................................*/ +bool QMsm_isInState(QMsm const * const me, + QMState const * const state) +{ + bool inState = false; /* assume that this MSM is not in 'state' */ + + for (QMState const *s = me->super.state.obj; + s != (QMState *)0; + s = s->superstate) + { + if (s == state) { + inState = true; /* match found, return 'true' */ + break; + } + } + return inState; +} + +/*${QEP::QMsm::stateObj} ...................................................*/ +QMState const * QMsm_stateObj(QHsm const * const me) { + return me->state.obj; +} + +/*${QEP::QMsm::childStateObj} ..............................................*/ +QMState const * QMsm_childStateObj( + QHsm const * const me, + QMState const * const parent) +{ + QMState const *child = me->state.obj; + bool isFound = false; /* start with the child not found */ + + for (QMState const *s = me->state.obj; + s != (QMState *)0; + s = s->superstate) + { + if (s == parent) { + isFound = true; /* child is found */ + break; + } + else { + child = s; + } + } + + /*! @post the child must be found */ + Q_ENSURE_ID(810, isFound); + + #ifdef Q_NASSERT + (void)isFound; /* avoid compiler warning about unused variable */ + #endif + + return child; /* return the child */ +} + +/*${QEP::QMsm::ctor} .......................................................*/ +void QMsm_ctor(QMsm * const me, + QStateHandler initial) +{ static struct QHsmVtable const vtable = { /* QHsm virtual table */ &QMsm_init_, &QMsm_dispatch_ -#ifdef Q_SPY + #ifdef Q_SPY ,&QMsm_getStateHandler_ -#endif + #endif }; /* do not call the QHsm_ctor() here */ me->super.vptr = &vtable; @@ -126,27 +152,15 @@ void QMsm_ctor(QMsm * const me, QStateHandler initial) { me->super.temp.fun = initial; /* the initial transition handler */ } -/*==========================================================================*/ -/*! -* @public @memberof QMsm -* @description -* Executes the top-most initial transition in a MSM. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] e pointer to an extra parameter (might be NULL) -* @param[in] qs_id QS-id of this state machine (for QS local filter) -* -* @note -* Must be called only ONCE after the QMsm_ctor(). -*/ -#ifdef Q_SPY -void QMsm_init_(QHsm * const me, void const * const e, - uint_fast8_t const qs_id) -#else -void QMsm_init_(QHsm * const me, void const * const e) -#endif +/*${QEP::QMsm::init_} ......................................................*/ +void QMsm_init_( + QHsm * const me, + void const * const e, + uint_fast8_t const qs_id) { - QS_CRIT_STAT_ + #ifndef Q_SPY + (void)qs_id; /* unused parameter */ + #endif /*! @pre the virtual pointer must be initialized, the top-most initial * transition must be initialized, and the initial transition must not @@ -160,8 +174,9 @@ void QMsm_init_(QHsm * const me, void const * const e) QState r = (*me->temp.fun)(me, Q_EVT_CAST(QEvt)); /* the top-most initial transition must be taken */ - Q_ASSERT_ID(210, r == (QState)Q_RET_TRAN_INIT); + Q_ASSERT_ID(210, r == Q_RET_TRAN_INIT); + QS_CRIT_STAT_ QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ QS_FUN_PRE_(me->state.obj->stateHandler); /* source state */ @@ -174,12 +189,8 @@ void QMsm_init_(QHsm * const me, void const * const e) /* drill down into the state hierarchy with initial transitions... */ /* execute the tran. table */ do { -#ifdef Q_SPY r = QMsm_execTatbl_(me, me->temp.tatbl, qs_id); -#else - r = QMsm_execTatbl_(me, me->temp.tatbl); -#endif - } while (r >= (QState)Q_RET_TRAN_INIT); + } while (r >= Q_RET_TRAN_INIT); QS_BEGIN_PRE_(QS_QEP_INIT_TRAN, qs_id) QS_TIME_PRE_(); /* time stamp */ @@ -188,36 +199,23 @@ void QMsm_init_(QHsm * const me, void const * const e) QS_END_PRE_() } -/*==========================================================================*/ -/*! -* @private @memberof QMsm -* @description -* Dispatches an event for processing to a meta state machine (MSM). -* The processing of an event represents one run-to-completion (RTC) step. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] e pointer to the event to be dispatched to the MSM -* @param[in] qs_id QS-id of this state machine (for QS local filter) -* -* @note -* This function should be called only via the virtual table (see -* QHSM_DISPATCH()) and should NOT be called directly in the applications. -*/ -#ifdef Q_SPY -void QMsm_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id) -#else -void QMsm_dispatch_(QHsm * const me, QEvt const * const e) -#endif +/*${QEP::QMsm::dispatch_} ..................................................*/ +void QMsm_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id) { + #ifndef Q_SPY + (void)qs_id; /* unused parameter */ + #endif + QMState const *s = me->state.obj; /* store the current state */ QMState const *t = s; - QState r; - QS_CRIT_STAT_ /*! @pre current state must be initialized */ Q_REQUIRE_ID(300, s != (QMState *)0); + QS_CRIT_STAT_ QS_BEGIN_PRE_(QS_QEP_DISPATCH, qs_id) QS_TIME_PRE_(); /* time stamp */ QS_SIG_PRE_(e->sig); /* the signal of the event */ @@ -226,23 +224,24 @@ void QMsm_dispatch_(QHsm * const me, QEvt const * const e) QS_END_PRE_() /* scan the state hierarchy up to the top state... */ + QState r; do { r = (*t->stateHandler)(me, e); /* call state handler function */ /* event handled? (the most frequent case) */ - if (r >= (QState)Q_RET_HANDLED) { + if (r >= Q_RET_HANDLED) { break; /* done scanning the state hierarchy */ } /* event unhandled and passed to the superstate? */ - else if (r == (QState)Q_RET_SUPER) { + else if (r == Q_RET_SUPER) { t = t->superstate; /* advance to the superstate */ } /* event unhandled and passed to a submachine superstate? */ - else if (r == (QState)Q_RET_SUPER_SUB) { + else if (r == Q_RET_SUPER_SUB) { t = me->temp.obj; /* current host state of the submachie */ } /* event unhandled due to a guard? */ - else if (r == (QState)Q_RET_UNHANDLED) { + else if (r == Q_RET_UNHANDLED) { QS_BEGIN_PRE_(QS_QEP_UNHANDLED, qs_id) QS_SIG_PRE_(e->sig); /* the signal of the event */ @@ -260,13 +259,13 @@ void QMsm_dispatch_(QHsm * const me, QEvt const * const e) /* any kind of transition taken? */ - if (r >= (QState)Q_RET_TRAN) { -#ifdef Q_SPY + if (r >= Q_RET_TRAN) { + #ifdef Q_SPY QMState const * const ts = t; /* transition source for QS tracing */ /* the transition source state must not be NULL */ Q_ASSERT_ID(320, ts != (QMState *)0); -#endif /* Q_SPY */ + #endif /* Q_SPY */ do { /* save the transition-action table before it gets clobbered */ @@ -274,74 +273,51 @@ void QMsm_dispatch_(QHsm * const me, QEvt const * const e) union QHsmAttr tmp; /* temporary to save intermediate values */ /* was TRAN, TRAN_INIT, or TRAN_EP taken? */ - if (r <= (QState)Q_RET_TRAN_EP) { -#ifdef Q_SPY + if (r <= Q_RET_TRAN_EP) { QMsm_exitToTranSource_(me, s, t, qs_id); r = QMsm_execTatbl_(me, tatbl, qs_id); -#else - QMsm_exitToTranSource_(me, s, t); - r = QMsm_execTatbl_(me, tatbl); -#endif s = me->state.obj; } /* was a transition segment to history taken? */ - else if (r == (QState)Q_RET_TRAN_HIST) { + else if (r == Q_RET_TRAN_HIST) { tmp.obj = me->state.obj; /* save history */ me->state.obj = s; /* restore the original state */ -#ifdef Q_SPY QMsm_exitToTranSource_(me, s, t, qs_id); (void)QMsm_execTatbl_(me, tatbl, qs_id); r = QMsm_enterHistory_(me, tmp.obj, qs_id); -#else - QMsm_exitToTranSource_(me, s, t); - (void)QMsm_execTatbl_(me, tatbl); - r = QMsm_enterHistory_(me, tmp.obj); -#endif s = me->state.obj; } /* was a transition segment to an exit point taken? */ - else if (r == (QState)Q_RET_TRAN_XP) { + else if (r == Q_RET_TRAN_XP) { tmp.act = me->state.act; /* save XP action */ me->state.obj = s; /* restore the original state */ r = (*tmp.act)(me); /* execute the XP action */ - if (r == (QState)Q_RET_TRAN) { /* XP -> TRAN ? */ -#ifdef Q_SPY + if (r == Q_RET_TRAN) { /* XP -> TRAN ? */ tmp.tatbl = me->temp.tatbl; /* save me->temp */ QMsm_exitToTranSource_(me, s, t, qs_id); /* take the tran-to-XP segment inside submachine */ (void)QMsm_execTatbl_(me, tatbl, qs_id); -#else - QMsm_exitToTranSource_(me, s, t); - /* take the tran-to-XP segment inside submachine */ - (void)QMsm_execTatbl_(me, tatbl); -#endif /* Q_SPY */ s = me->state.obj; -#ifdef Q_SPY + #ifdef Q_SPY me->temp.tatbl = tmp.tatbl; /* restore me->temp */ -#endif /* Q_SPY */ + #endif /* Q_SPY */ } - else if (r == (QState)Q_RET_TRAN_HIST) { /* XP -> HIST ? */ + else if (r == Q_RET_TRAN_HIST) { /* XP -> HIST ? */ tmp.obj = me->state.obj; /* save the history */ me->state.obj = s; /* restore the original state */ -#ifdef Q_SPY s = me->temp.obj; /* save me->temp */ QMsm_exitToTranSource_(me, me->state.obj, t, qs_id); /* take the tran-to-XP segment inside submachine */ (void)QMsm_execTatbl_(me, tatbl, qs_id); -#else - QMsm_exitToTranSource_(me, me->state.obj, t); - /* take the tran-to-XP segment inside submachine */ - (void)QMsm_execTatbl_(me, tatbl); -#endif /* Q_SPY */ -#ifdef Q_SPY + #ifdef Q_SPY me->temp.obj = s; /* restore me->temp */ -#endif /* Q_SPY */ + #endif /* Q_SPY */ s = me->state.obj; me->state.obj = tmp.obj; /* restore the history */ } else { /* TRAN_XP must NOT be followed by any other tran type */ - Q_ASSERT_ID(330, r < (QState)Q_RET_TRAN); + Q_ASSERT_ID(330, r < Q_RET_TRAN); } } else { @@ -351,7 +327,7 @@ void QMsm_dispatch_(QHsm * const me, QEvt const * const e) t = s; /* set target to the current state */ - } while (r >= (QState)Q_RET_TRAN); + } while (r >= Q_RET_TRAN); QS_BEGIN_PRE_(QS_QEP_TRAN, qs_id) QS_TIME_PRE_(); /* time stamp */ @@ -362,9 +338,9 @@ void QMsm_dispatch_(QHsm * const me, QEvt const * const e) QS_END_PRE_() } -#ifdef Q_SPY + #ifdef Q_SPY /* was the event handled? */ - else if (r == (QState)Q_RET_HANDLED) { + else if (r == Q_RET_HANDLED) { /* internal tran. source can't be NULL */ Q_ASSERT_ID(340, t != (QMState *)0); @@ -387,46 +363,28 @@ void QMsm_dispatch_(QHsm * const me, QEvt const * const e) QS_END_PRE_() } -#endif /* Q_SPY */ + #endif /* Q_SPY */ else { /* empty */ } } -/*==========================================================================*/ +/*${QEP::QMsm::getStateHandler_} ...........................................*/ #ifdef Q_SPY QStateHandler QMsm_getStateHandler_(QHsm * const me) { return me->state.obj->stateHandler; } -#endif +#endif /* def Q_SPY */ -/*==========================================================================*/ -/*! -* @private @memberof QMsm -* @description -* Helper function to execute transition sequence in a transition-action table. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] tatbl pointer to the transition-action table -* @param[in] qs_id QS-id of this state machine (for QS local filter) -* -* @returns -* status of the last action from the transition-action table. -* -* @note -* This function is for internal use inside the QEP event processor and -* should __not__ be called directly from the applications. -*/ -#ifdef Q_SPY -static QState QMsm_execTatbl_(QHsm * const me, - struct QMTranActTable const *tatbl, - uint_fast8_t const qs_id) -#else -static QState QMsm_execTatbl_(QHsm * const me, - struct QMTranActTable const *tatbl) -#endif +/*${QEP::QMsm::execTatbl_} .................................................*/ +QState QMsm_execTatbl_( + QHsm * const me, + QMTranActTable const * tatbl, + uint_fast8_t const qs_id) { - QState r = (QState)Q_RET_NULL; + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + + QState r = Q_RET_NULL; QS_CRIT_STAT_ /*! @pre the transition-action table pointer must not be NULL */ @@ -437,22 +395,22 @@ static QState QMsm_execTatbl_(QHsm * const me, ++a) { r = (*(*a))(me); /* call the action through the 'a' pointer */ -#ifdef Q_SPY - if (r == (QState)Q_RET_ENTRY) { + #ifdef Q_SPY + if (r == Q_RET_ENTRY) { QS_BEGIN_PRE_(QS_QEP_STATE_ENTRY, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ QS_FUN_PRE_(me->temp.obj->stateHandler);/*entered state */ QS_END_PRE_() } - else if (r == (QState)Q_RET_EXIT) { + else if (r == Q_RET_EXIT) { QS_BEGIN_PRE_(QS_QEP_STATE_EXIT, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ QS_FUN_PRE_(me->temp.obj->stateHandler); /* exited state */ QS_END_PRE_() } - else if (r == (QState)Q_RET_TRAN_INIT) { + else if (r == Q_RET_TRAN_INIT) { QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ @@ -460,7 +418,7 @@ static QState QMsm_execTatbl_(QHsm * const me, QS_FUN_PRE_(me->temp.tatbl->target->stateHandler);/* target */ QS_END_PRE_() } - else if (r == (QState)Q_RET_TRAN_EP) { + else if (r == Q_RET_TRAN_EP) { QS_BEGIN_PRE_(QS_QEP_TRAN_EP, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ @@ -468,7 +426,7 @@ static QState QMsm_execTatbl_(QHsm * const me, QS_FUN_PRE_(me->temp.tatbl->target->stateHandler);/* target */ QS_END_PRE_() } - else if (r == (QState)Q_RET_TRAN_XP) { + else if (r == Q_RET_TRAN_XP) { QS_BEGIN_PRE_(QS_QEP_TRAN_XP, qs_id) QS_OBJ_PRE_(me); /* this state machine object */ @@ -479,37 +437,24 @@ static QState QMsm_execTatbl_(QHsm * const me, else { /* empty */ } -#endif /* Q_SPY */ + #endif /* Q_SPY */ } - me->state.obj = (r >= (QState)Q_RET_TRAN) + me->state.obj = (r >= Q_RET_TRAN) ? me->temp.tatbl->target : tatbl->target; return r; } -/*==========================================================================*/ -/*! -* @private @memberof QMsm -* @description -* Static helper function to exit the current state configuration to the -* transition source, which in a hierarchical state machine might be a -* superstate of the current state. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] cs pointer to the current state -* @param[in] ts pointer to the transition source state -* @param[in] qs_id QS-id of this state machine (for QS local filter) -*/ -#ifdef Q_SPY -static void QMsm_exitToTranSource_(QHsm * const me, QMState const *cs, - QMState const *ts, - uint_fast8_t const qs_id) -#else -static void QMsm_exitToTranSource_(QHsm * const me, QMState const *cs, - QMState const *ts) -#endif +/*${QEP::QMsm::exitToTranSource_} ..........................................*/ +void QMsm_exitToTranSource_( + QHsm * const me, + QMState const * cs, + QMState const * ts, + uint_fast8_t const qs_id) { + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + QMState const *s = cs; /* exit states from the current state to the tran. source state */ @@ -535,28 +480,14 @@ static void QMsm_exitToTranSource_(QHsm * const me, QMState const *cs, } } -/*==========================================================================*/ -/*! -* @private @memberof QMsm -* @description -* Static helper function to execute the segment of transition to history -* after entering the composite state and -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] hist pointer to the history substate -* @param[in] qs_id QS-id of this state machine (for QS local filter) -* -* @returns -* #Q_RET_TRAN_INIT, if an initial transition has been executed in the last -* entered state or #Q_RET_NULL if no such transition was taken. -*/ -#ifdef Q_SPY -static QState QMsm_enterHistory_(QHsm * const me, QMState const *const hist, - uint_fast8_t const qs_id) -#else -static QState QMsm_enterHistory_(QHsm * const me, QMState const *const hist) -#endif +/*${QEP::QMsm::enterHistory_} ..............................................*/ +QState QMsm_enterHistory_( + QHsm * const me, + QMState const *const hist, + uint_fast8_t const qs_id) { + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + QMState const *s = hist; QMState const *ts = me->state.obj; /* transition source */ QMState const *epath[QMSM_MAX_ENTRY_DEPTH_]; @@ -600,85 +531,8 @@ static QState QMsm_enterHistory_(QHsm * const me, QMState const *const hist) r = (*hist->initAction)(me); /* execute the transition action */ } else { - r = (QState)Q_RET_NULL; + r = Q_RET_NULL; } return r; } - -/*==========================================================================*/ -/*! -* @public @memberof QMsm -* @description -* Tests if a state machine derived from QMsm is-in a given state. -* -* @note -* For a MSM, to "be-in" a state means also to "be-in" a superstate of -* of the state. -* -* @param[in] me pointer (see @ref oop) -* @param[in] state pointer to the QMState object that corresponds to the -* tested state. -* @returns -* 'true' if the MSM "is in" the @p state and 'false' otherwise -*/ -bool QMsm_isInState(QMsm const * const me, QMState const * const state) { - bool inState = false; /* assume that this MSM is not in 'state' */ - - for (QMState const *s = me->super.state.obj; - s != (QMState *)0; - s = s->superstate) - { - if (s == state) { - inState = true; /* match found, return 'true' */ - break; - } - } - return inState; -} - -/*==========================================================================*/ -/*! -* @private @memberof QMsm -* @description -* Finds the child state of the given @c parent, such that this child state -* is an ancestor of the currently active state. The main purpose of this -* function is to support **shallow history** transitions in state machines -* derived from QMsm. -* -* @param[in] me pointer (see @ref oop) -* @param[in] parent pointer to the state-handler object -* -* @returns -* the child of a given @c parent state, which is an ancestor of -* the currently active state. For the corner case when the currently active -* state is the given @c parent state, function returns the @c parent state. -* -* @sa QMsm_childStateObj() -*/ -QMState const *QMsm_childStateObj(QHsm const * const me, - QMState const * const parent) -{ - QMState const *child = me->state.obj; - bool isFound = false; /* start with the child not found */ - - for (QMState const *s = me->state.obj; - s != (QMState *)0; - s = s->superstate) - { - if (s == parent) { - isFound = true; /* child is found */ - break; - } - else { - child = s; - } - } - - /*! @post the child must be found */ - Q_ENSURE_ID(810, isFound); -#ifdef Q_NASSERT - (void)isFound; /* avoid compiler warning about unused variable */ -#endif - - return child; /* return the child */ -} +/*$enddef${QEP::QMsm} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qf_act.c b/src/qf/qf_act.c index bddc872f..22b6231f 100644 --- a/src/qf/qf_act.c +++ b/src/qf/qf_act.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_act.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_act.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,155 +32,18 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_act.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-30 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief ::QActive services and @ref qf support code -* @ingroup qf +* @deprecated +* Empty file kept only for backwards compatibility. +* @sa qf_qact.c */ -#define QP_IMPL /* this is QP implementation */ -#include "qf_port.h" /* QF port */ -#include "qf_pkg.h" /* QF package-scope interface */ -#include "qassert.h" /* QP embedded systems-friendly assertions */ -#ifdef Q_SPY /* QS software tracing enabled? */ - #include "qs_port.h" /* QS port */ - #include "qs_pkg.h" /* QS facilities for pre-defined trace records */ -#else - #include "qs_dummy.h" /* disable the QS software tracing */ -#endif /* Q_SPY */ - -Q_DEFINE_THIS_MODULE("qf_act") - -/*==========================================================================*/ -/* global objects */ -/*! @static @private @memberof QF */ -QActive *QF_active_[QF_MAX_ACTIVE + 1U]; /* to be used by QF ports only */ - -/*==========================================================================*/ -/*! -* @static @private @memberof QF -* @description -* This function adds a given active object to the active objects -* managed by the QF framework. It should not be called by the application -* directly, only by the QP ports. -* -* @param[in] a pointer to the active object to add to the framework. -* -* @note The priority of the active object @p a should be set before calling -* this function. -* -* @sa QF_remove_() -*/ -void QF_add_(QActive * const a) { - uint_fast8_t const p = (uint_fast8_t)a->prio; - - /*! @pre the priority of the active object must not be zero and cannot - * exceed the maximum #QF_MAX_ACTIVE. Also, the priority of the active - * object must not be already in use. QF requires each active object to - * have a __unique__ priority. - */ - Q_REQUIRE_ID(100, (0U < p) - && (p <= QF_MAX_ACTIVE) - && (QF_active_[p] == (QActive *)0)); - QF_CRIT_STAT_ - QF_CRIT_E_(); - QF_active_[p] = a; /* register the active object at this priority */ - QF_CRIT_X_(); -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QF -* @description -* This function removes a given active object from the active objects managed -* by the QF framework. It should not be called by the application -* directly, only by the QP ports. -* -* @param[in] a pointer to the active object to remove from the framework. -* -* @note -* The active object that is removed from the framework can no longer -* participate in the publish-subscribe event exchange. -* -* @sa QF_add_() -*/ -void QF_remove_(QActive * const a) { - uint_fast8_t const p = (uint_fast8_t)a->prio; - - /*! @pre the priority of the active object must not be zero and cannot - * exceed the maximum #QF_MAX_ACTIVE. Also, the priority of the active - * object must be already registered with the framework. - */ - Q_REQUIRE_ID(200, (0U < p) && (p <= QF_MAX_ACTIVE) - && (QF_active_[p] == a)); - QF_CRIT_STAT_ - QF_CRIT_E_(); - QF_active_[p] = (QActive *)0; /* free-up the priority level */ - a->super.state.fun = Q_STATE_CAST(0); /* invalidate the state */ - QF_CRIT_X_(); -} - -/*==========================================================================*/ -/*! -* @static @public @memberof QF -* @description -* Clears a memory buffer by writing zeros byte-by-byte. -* -* @param[in] start pointer to the beginning of a memory buffer. -* @param[in] len length of the memory buffer to clear (in bytes) -* -* @note The main application of this function is clearing the internal QF -* variables upon startup. This is done to avoid problems with non-standard -* startup code provided with some compilers and toolsets (e.g., TI DSPs or -* Microchip MPLAB), which does not zero the uninitialized variables, as -* required by the ANSI C standard. -*/ -void QF_bzero(void * const start, uint_fast16_t len) { - uint8_t *ptr = (uint8_t *)start; - for (uint_fast16_t n = len; n > 0U; --n) { - *ptr = 0U; - ++ptr; - } -} - -/*==========================================================================*/ -/* log-base-2 implementation */ -#ifndef QF_LOG2 - - /*! @static @public @memberof QF */ - uint_fast8_t QF_LOG2(QPSetBits x) { - static uint8_t const log2LUT[16] = { - 0U, 1U, 2U, 2U, 3U, 3U, 3U, 3U, - 4U, 4U, 4U, 4U, 4U, 4U, 4U, 4U - }; - uint_fast8_t n = 0U; - QPSetBits t; - -#if (QF_MAX_ACTIVE > 16U) - t = (QPSetBits)(x >> 16U); - if (0U != t) { - n += 16U; - x = t; - } -#endif -#if (QF_MAX_ACTIVE > 8U) - t = (x >> 8U); - if (0U != t) { - n += 8U; - x = t; - } -#endif - t = (x >> 4U); - if (0U != t) { - n += 4U; - x = t; - } - return n + log2LUT[x]; - } - -#endif /* QF_LOG2 */ +extern char const dummy; /* declaration */ +char const dummy = '\0'; /* definition */ diff --git a/src/qf/qf_actq.c b/src/qf/qf_actq.c index cbf9684e..a1a48fd7 100644 --- a/src/qf/qf_actq.c +++ b/src/qf/qf_actq.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_actq.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_actq.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,12 +32,13 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_actq.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief ::QActive native queue operations (based on ::QEQueue) @@ -32,8 +46,6 @@ * @note * this source file is only included in the application build when the native * QF active object queue is used (instead of a message queue of an RTOS). -* -* @ingroup qf */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -49,46 +61,23 @@ Q_DEFINE_THIS_MODULE("qf_actq") /*==========================================================================*/ -#ifdef Q_SPY -/*! -* @private @memberof QActive -* @description -* Direct event posting is the simplest asynchronous communication method -* available in QF. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] e pointer to the event to be posted -* @param[in] margin number of required free slots in the queue after -* posting the event. The special value #QF_NO_MARGIN -* means that this function will assert if posting fails. -* @param[in] sender pointer to a sender object (used only for QS tracing) -* -* @returns -* 'true' (success) if the posting succeeded (with the provided margin) and -* 'false' (failure) when the posting fails. -* -* @note -* The #QF_NO_MARGIN value of the @p margin parameter is special and denotes -* situation when the post() operation is assumed to succeed (event delivery -* guarantee). An assertion fires, when the event cannot be delivered in this -* case. -* -* @attention -* This function should be called only via the macro QACTIVE_POST() -* or QACTIVE_POST_X(). -* -* @usage -* @include qf_post.c -* -* @sa QActive_post_(), QActive_postLIFO() -*/ -bool QActive_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, void const * const sender) -#else -bool QActive_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin) +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QF::QActive::post_} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QActive::post_} ....................................................*/ +bool QActive_post_(QActive * const me, + QEvt const * const e, + uint_fast16_t const margin, + void const * const sender) { + Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ + /*! @pre event pointer must be valid */ Q_REQUIRE_ID(100, e != (QEvt *)0); @@ -142,7 +131,7 @@ bool QActive_post_(QActive * const me, QEvt const * const e, QS_EQC_PRE_(me->eQueue.nMin); /* min number of free entries */ QS_END_NOCRIT_PRE_() -#ifdef Q_UTEST + #ifdef Q_UTEST /* callback to examine the posted event under the same conditions * as producing the #QS_QF_ACTIVE_POST trace record, which are: * the local filter for this AO ('me->prio') is set @@ -151,7 +140,7 @@ bool QActive_post_(QActive * const me, QEvt const * const e, /* callback to examine the posted event */ QS_onTestPost(sender, me, e, status); } -#endif + #endif /* empty queue? */ if (me->eQueue.frontEvt == (QEvt *)0) { @@ -161,7 +150,7 @@ bool QActive_post_(QActive * const me, QEvt const * const e, /* queue is not empty, insert event into the ring-buffer */ else { /* insert event into the ring buffer (FIFO) */ - QF_PTR_AT_(me->eQueue.ring, me->eQueue.head) = e; + me->eQueue.ring[me->eQueue.head] = e; if (me->eQueue.head == 0U) { /* need to wrap head? */ me->eQueue.head = me->eQueue.end; /* wrap around */ @@ -183,7 +172,7 @@ bool QActive_post_(QActive * const me, QEvt const * const e, QS_EQC_PRE_(margin); /* margin requested */ QS_END_NOCRIT_PRE_() -#ifdef Q_UTEST + #ifdef Q_UTEST /* callback to examine the posted event under the same conditions * as producing the #QS_QF_ACTIVE_POST trace record, which are: * the local filter for this AO ('me->prio') is set @@ -191,7 +180,7 @@ bool QActive_post_(QActive * const me, QEvt const * const e, if (QS_LOC_CHECK_(me->prio)) { QS_onTestPost(sender, me, e, status); } -#endif + #endif QF_CRIT_X_(); @@ -200,28 +189,13 @@ bool QActive_post_(QActive * const me, QEvt const * const e, return status; } +/*$enddef${QF::QActive::post_} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::postLIFO_} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @private @memberof QActive -* @description -* posts an event to the event queue of the active object @p me using the -* Last-In-First-Out (LIFO) policy. -* -* @note -* The LIFO policy should be used only for self-posting and with caution, -* because it alters order of events in the queue. -* -* @param[in] me pointer (see @ref oop) -* @param[in] e pointer to the event to post to the queue -* -* @attention -* This function should be called only via the macro QACTIVE_POST_LIFO(). -* -* @sa QActive_post_(), QACTIVE_POST(), QACTIVE_POST_X() -*/ -void QActive_postLIFO_(QActive * const me, QEvt const * const e) { - +/*${QF::QActive::postLIFO_} ................................................*/ +void QActive_postLIFO_(QActive * const me, + QEvt const * const e) +{ QF_CRIT_STAT_ QF_CRIT_E_(); QEQueueCtr nFree = me->eQueue.nFree; /* get volatile into the temporary */ @@ -255,7 +229,7 @@ void QActive_postLIFO_(QActive * const me, QEvt const * const e) { QS_EQC_PRE_(me->eQueue.nMin); /* min number of free entries */ QS_END_NOCRIT_PRE_() -#ifdef Q_UTEST + #ifdef Q_UTEST /* callback to examine the posted event under the same conditions * as producing the #QS_QF_ACTIVE_POST trace record, which are: * the local filter for this AO ('me->prio') is set @@ -263,7 +237,7 @@ void QActive_postLIFO_(QActive * const me, QEvt const * const e) { if (QS_LOC_CHECK_(me->prio)) { QS_onTestPost((QActive *)0, me, e, true); } -#endif + #endif /* temporary to avoid UB for volatile access */ QEvt const * const frontEvt = me->eQueue.frontEvt; @@ -281,36 +255,15 @@ void QActive_postLIFO_(QActive * const me, QEvt const * const e) { me->eQueue.tail = 0U; /* wrap around */ } - QF_PTR_AT_(me->eQueue.ring, me->eQueue.tail) = frontEvt; + me->eQueue.ring[me->eQueue.tail] = frontEvt; } QF_CRIT_X_(); } +/*$enddef${QF::QActive::postLIFO_} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::get_} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @private @memberof QActive -* @description -* The behavior of this function depends on the kernel/OS used in the QF port. -* For built-in kernels (QV or QK) the function can be called only when -* the queue is not empty, so it doesn't block. For a blocking kernel/OS -* the function can block and wait for delivery of an event. -* -* @param[in,out] me pointer (see @ref oop) -* -* @returns -* a pointer to the received event. The returned pointer is guaranteed to be -* valid (can't be NULL). -* -* @note -* This function is used internally by a QF port to extract events from -* the event queue of an active object. This function depends on the event -* queue implementation and is sometimes customized in the QF port -* (file qf_port.h). Depending on the definition of the macro -* QACTIVE_EQUEUE_WAIT_(), the function might block the calling thread when -* no events are available. -*/ -QEvt const *QActive_get_(QActive * const me) { - +/*${QF::QActive::get_} .....................................................*/ +QEvt const * QActive_get_(QActive * const me) { QF_CRIT_STAT_ QF_CRIT_E_(); QACTIVE_EQUEUE_WAIT_(me); /* wait for event to arrive directly */ @@ -324,7 +277,7 @@ QEvt const *QActive_get_(QActive * const me) { if (nFree <= me->eQueue.end) { /* remove event from the tail */ - me->eQueue.frontEvt = QF_PTR_AT_(me->eQueue.ring, me->eQueue.tail); + me->eQueue.frontEvt = me->eQueue.ring[me->eQueue.tail]; if (me->eQueue.tail == 0U) { /* need to wrap the tail? */ me->eQueue.tail = me->eQueue.end; /* wrap around */ } @@ -354,61 +307,28 @@ QEvt const *QActive_get_(QActive * const me) { QF_CRIT_X_(); return e; } +/*$enddef${QF::QActive::get_} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*==========================================================================*/ -/*! -* @static @private @memberof QF -* @description -* Queries the minimum of free ever present in the given event queue of -* an active object with priority @p prio, since the active object -* was started. -* -* @note -* This function is available only when the native QF event queue -* implementation is used. Requesting the queue minimum of an unused -* priority level raises an assertion in the QF. (A priority level becomes -* used in QF after the call to the QF_add_() function.) -* -* @param[in] prio Priority of the active object, whose queue is queried -* -* @returns -* the minimum of free ever present in the given event queue of an active -* object with priority @p prio, since the active object was started. -*/ +/*$define${QF::QF-base::getQueueMin} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QF-base::getQueueMin} ..............................................*/ uint_fast16_t QF_getQueueMin(uint_fast8_t const prio) { - Q_REQUIRE_ID(400, (prio <= QF_MAX_ACTIVE) - && (QF_active_[prio] != (QActive *)0)); - + && (QActive_registry_[prio] != (QActive *)0)); QF_CRIT_STAT_ QF_CRIT_E_(); - uint_fast16_t const min = (uint_fast16_t)QF_active_[prio]->eQueue.nMin; + uint_fast16_t const min = + (uint_fast16_t)QActive_registry_[prio]->eQueue.nMin; QF_CRIT_X_(); return min; } +/*$enddef${QF::QF-base::getQueueMin} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*==========================================================================*/ -#ifdef Q_SPY - static void QTicker_init_(QHsm * const me, void const *par, - uint_fast8_t const qs_id); - static void QTicker_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id); - /*! virtual function to asynchronously post (FIFO) an event to an AO */ - static bool QTicker_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, void const * const sender); -#else - static void QTicker_init_(QHsm * const me, void const *par); - static void QTicker_dispatch_(QHsm * const me, QEvt const * const e); - static bool QTicker_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin); -#endif - -static void QTicker_postLIFO_(QActive * const me, QEvt const * const e); - -/*! Perform downcast to QTicker pointer. */ -/*! -* @description +/*! Perform downcast to QTicker pointer. +* +* @details * This macro encapsulates the downcast to (QTicker *), which is used in * QTicker_init_() and QTicker_dispatch_(). Such casts violate MISRA-C 2012 * Rule 11.3(req) "cast from pointer to object type to pointer to different @@ -416,15 +336,20 @@ static void QTicker_postLIFO_(QActive * const me, QEvt const * const e); */ #define QTICKER_CAST_(me_) ((QActive *)(me_)) -/*..........................................................................*/ -/*! "constructor" of QTicker */ -void QTicker_ctor(QTicker * const me, uint_fast8_t tickRate) { +/*$define${QF::QTicker} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QTicker} ...........................................................*/ + +/*${QF::QTicker::ctor} .....................................................*/ +void QTicker_ctor(QTicker * const me, + uint_fast8_t const tickRate) +{ static QActiveVtable const vtable = { /* QActive virtual table */ { &QTicker_init_, &QTicker_dispatch_ -#ifdef Q_SPY + #ifdef Q_SPY ,&QHsm_getStateHandler_ -#endif + #endif }, &QActive_start_, &QTicker_post_, @@ -436,38 +361,31 @@ void QTicker_ctor(QTicker * const me, uint_fast8_t tickRate) { /* reuse eQueue.head for tick-rate */ me->super.eQueue.head = (QEQueueCtr)tickRate; } -/*..........................................................................*/ -#ifdef Q_SPY -/*! @private @memberof QTicker */ -static void QTicker_init_(QHsm * const me, void const *par, - uint_fast8_t const qs_id) -#else -static void QTicker_init_(QHsm * const me, void const *par) -#endif + +/*${QF::QTicker::init_} ....................................................*/ +void QTicker_init_( + QHsm * const me, + void const * const par, + uint_fast8_t const qs_id) { - (void)me; - (void)par; -#ifdef Q_SPY - (void)qs_id; /* unused parameter */ -#endif + Q_UNUSED_PAR(me); + Q_UNUSED_PAR(par); + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + QTICKER_CAST_(me)->eQueue.tail = 0U; } -/*..........................................................................*/ -#ifdef Q_SPY -/*! @private @memberof QTicker */ -static void QTicker_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id) -#else -static void QTicker_dispatch_(QHsm * const me, QEvt const * const e) -#endif + +/*${QF::QTicker::dispatch_} ................................................*/ +void QTicker_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id) { QEQueueCtr nTicks; /* # ticks since the last call */ QF_CRIT_STAT_ - (void)e; /* unused parameter */ -#ifdef Q_SPY - (void)qs_id; /* unused parameter */ -#endif + Q_UNUSED_PAR(e); + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ QF_CRIT_E_(); nTicks = QTICKER_CAST_(me)->eQueue.tail; /* save the # of ticks */ @@ -475,22 +393,20 @@ static void QTicker_dispatch_(QHsm * const me, QEvt const * const e) QF_CRIT_X_(); for (; nTicks > 0U; --nTicks) { - QF_TICK_X((uint_fast8_t)QTICKER_CAST_(me)->eQueue.head, me); + QTimeEvt_tick_((uint_fast8_t)QTICKER_CAST_(me)->eQueue.head, me); } } -/*..........................................................................*/ -#ifndef Q_SPY -/*! @private @memberof QTicker */ -static bool QTicker_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin) -#else -static bool QTicker_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, - void const * const sender) -#endif + +/*${QF::QTicker::post_} ....................................................*/ +bool QTicker_post_( + QActive * const me, + QEvt const * const e, + uint_fast16_t const margin, + void const * const sender) { - (void)e; /* unused parameter */ - (void)margin; /* unused parameter */ + Q_UNUSED_PAR(e); + Q_UNUSED_PAR(margin); + Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ QF_CRIT_STAT_ QF_CRIT_E_(); @@ -519,10 +435,15 @@ static bool QTicker_post_(QActive * const me, QEvt const * const e, return true; /* the event is always posted correctly */ } -/*..........................................................................*/ -/*! @private @memberof QTicker */ -static void QTicker_postLIFO_(QActive * const me, QEvt const * const e) { - (void)me; /* unused parameter */ - (void)e; /* unused parameter */ + +/*${QF::QTicker::postLIFO_} ................................................*/ +void QTicker_postLIFO_( + QActive * const me, + QEvt const * const e) +{ + Q_UNUSED_PAR(me); + Q_UNUSED_PAR(e); + Q_ERROR_ID(900); } +/*$enddef${QF::QTicker} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qf_defer.c b/src/qf/qf_defer.c index 9a02ce0c..55bbc64e 100644 --- a/src/qf/qf_defer.c +++ b/src/qf/qf_defer.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_defer.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_defer.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_defer.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QActive_defer() and QActive_recall() implementation. -* @ingroup qf */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -43,34 +56,19 @@ Q_DEFINE_THIS_MODULE("qf_defer") -/*==========================================================================*/ -/*! -* @protected @memberof QActive -* @description -* This function is part of the event deferral support. An active object -* uses this function to defer an event @p e to the QF-supported native -* event queue @p eq. QF correctly accounts for another outstanding -* reference to the event and will not recycle the event at the end of -* the RTC step. Later, the active object might recall one event at a -* time from the event queue. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] eq pointer to a "raw" thread-safe queue to recall -* an event from. -* @param[in] e pointer to the event to be deferred -* -* @returns -* 'true' (success) when the event could be deferred and 'false' (failure) -* if event deferral failed due to overflowing the queue. -* -* An active object can use multiple event queues to defer events of -* different kinds. -* -* @sa -* QActive_recall(), QEQueue, QActive_flushDeferred() -*/ -bool QActive_defer(QActive const * const me, QEQueue * const eq, - QEvt const * const e) +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QF::QActive::defer} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QActive::defer} ....................................................*/ +bool QActive_defer(QActive const * const me, + QEQueue * const eq, + QEvt const * const e) { bool const status = QEQueue_post(eq, e, 0U, me->prio); QS_CRIT_STAT_ @@ -85,31 +83,13 @@ bool QActive_defer(QActive const * const me, QEQueue * const eq, return status; } +/*$enddef${QF::QActive::defer} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::recall} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @protected @memberof QActive -* @description -* This function is part of the event deferral support. An active object -* uses this function to recall a deferred event from a given QF -* event queue. Recalling an event means that it is removed from the -* deferred event queue @p eq and posted (LIFO) to the event queue of -* the active object. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] eq pointer to a "raw" thread-safe queue to recall -* an event from. -* @returns -* 'true' if an event has been recalled and 'false' if not. -* -* @note -* An active object can use multiple event queues to defer events of -* different kinds. -* -* @sa -* QActive_recall(), ::QEQueue, QACTIVE_POST_LIFO() -*/ -bool QActive_recall(QActive * const me, QEQueue * const eq) { +/*${QF::QActive::recall} ...................................................*/ +bool QActive_recall(QActive * const me, + QEQueue * const eq) +{ QEvt const * const e = QEQueue_get(eq, me->prio); bool recalled; @@ -161,26 +141,12 @@ bool QActive_recall(QActive * const me, QEQueue * const eq) { } return recalled; } +/*$enddef${QF::QActive::recall} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::flushDeferred} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @protected @memberof QActive -* @description -* This function is part of the event deferral support. An active object -* can use this function to flush a given QF event queue. The function makes -* sure that the events are not leaked. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] eq pointer to a "raw" thread-safe queue to flush. -* -* @returns -* the number of events actually flushed from the queue. -* -* @sa -* QActive_defer(), QActive_recall(), QEQueue -*/ +/*${QF::QActive::flushDeferred} ............................................*/ uint_fast16_t QActive_flushDeferred(QActive const * const me, - QEQueue * const eq) + QEQueue * const eq) { uint_fast16_t n = 0U; for (QEvt const *e = QEQueue_get(eq, me->prio); @@ -192,3 +158,4 @@ uint_fast16_t QActive_flushDeferred(QActive const * const me, } return n; } +/*$enddef${QF::QActive::flushDeferred} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qf_dyn.c b/src/qf/qf_dyn.c index c72bc535..20a06d0d 100644 --- a/src/qf/qf_dyn.c +++ b/src/qf/qf_dyn.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_dyn.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_dyn.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_dyn.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QF/C dynamic event management -* @ingroup qf */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -43,129 +56,80 @@ Q_DEFINE_THIS_MODULE("qf_dyn") +//============================================================================ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/* Package-scope objects ****************************************************/ -QF_EPOOL_TYPE_ QF_pool_[QF_MAX_EPOOL]; /* allocate the event pools */ -uint_fast8_t QF_maxPool_; /* number of initialized event pools */ +/*$define${QEP::QEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -#ifdef Q_EVT_CTOR /* Provide the constructor for the ::QEvt class? */ +/*${QEP::QEvt} .............................................................*/ +/*$enddef${QEP::QEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*! -* @public @memberof QEvt -* @description -* Constructor for the ::QEvt class provided when the switch #Q_EVT_CTOR -* is defined. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] sig signal to be assigned to the event -*/ -QEvt *QEvt_ctor(QEvt * const me, enum_t const sig) { - /*! @pre the me pointer must be valid */ - Q_REQUIRE_ID(100, me != (QEvt *)0); - me->sig = (QSignal)sig; - return me; -} +//============================================================================ +/*$define${QF::QF-dyn} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -#endif /* Q_EVT_CTOR */ - - -/*==========================================================================*/ -/*! -* @static @public @memberof QF -* @description -* This function initializes one event pool at a time and must be called -* exactly once for each event pool before the pool can be used. -* -* @param[in] poolSto pointer to the storage for the event pool -* @param[in] poolSize size of the storage for the pool in bytes -* @param[in] evtSize the block-size of the pool in bytes, which determines -* the maximum size of events that can be allocated from the pool. -* -* @attention -* You might initialize many event pools by making many consecutive calls -* to the QF_poolInit() function. However, for the simplicity of the internal -* implementation, you must initialize event pools in the **ascending order** -* of the event size. -* -* Many RTOSes provide fixed block-size heaps, a.k.a. memory pools that can -* be adapted for QF event pools. In case such support is missing, QF provides -* a native QF event pool implementation. The macro #QF_EPOOL_TYPE_ determines -* the type of event pool used by a particular QF port. See structure ::QMPool -* for more information. -* -* @note The actual number of events available in the pool might be actually -* less than (@p poolSize / @p evtSize) due to the internal alignment -* of the blocks that the pool might perform. You can always check the -* capacity of the pool by calling QF_getPoolMin(). -* -* @note The dynamic allocation of events is optional, meaning that you -* might choose not to use dynamic events. In that case calling QF_poolInit() -* and using up memory for the memory blocks is unnecessary. -* -* @sa QF initialization example for QF_init() -*/ -void QF_poolInit(void * const poolSto, uint_fast32_t const poolSize, - uint_fast16_t const evtSize) +/*${QF::QF-dyn::poolInit} ..................................................*/ +void QF_poolInit( + void * const poolSto, + uint_fast32_t const poolSize, + uint_fast16_t const evtSize) { /*! @pre cannot exceed the number of available memory pools */ Q_REQUIRE_ID(200, QF_maxPool_ < QF_MAX_EPOOL); /*! @pre please initialize event pools in ascending order of evtSize: */ Q_REQUIRE_ID(201, (QF_maxPool_ == 0U) - || (QF_EPOOL_EVENT_SIZE_(QF_pool_[QF_maxPool_ - 1U]) + || (QF_EPOOL_EVENT_SIZE_(QF_ePool_[QF_maxPool_ - 1U]) < evtSize)); /* perform the platform-dependent initialization of the pool */ - QF_EPOOL_INIT_(QF_pool_[QF_maxPool_], poolSto, poolSize, evtSize); + QF_EPOOL_INIT_(QF_ePool_[QF_maxPool_], poolSto, poolSize, evtSize); ++QF_maxPool_; /* one more pool */ -#ifdef Q_SPY + #ifdef Q_SPY /* generate the object-dictionary entry for the initialized pool */ { uint8_t obj_name[9] = "EvtPool?"; obj_name[7] = (uint8_t)(((uint8_t)'0' + QF_maxPool_) & 0x7FU); - QS_obj_dict_pre_(&QF_pool_[QF_maxPool_ - 1U], (char const *)obj_name); + QS_obj_dict_pre_(&QF_ePool_[QF_maxPool_ - 1U], (char const *)obj_name); } -#endif /* Q_SPY*/ + #endif /* Q_SPY*/ } -/*==========================================================================*/ -/*! -* @static @private @memberof QF -* @description -* Allocates an event dynamically from one of the QF event pools. -* -* @param[in] evtSize the size (in bytes) of the event to allocate -* @param[in] margin the number of un-allocated events still available -* in a given event pool after the allocation completes. -* The special value #QF_NO_MARGIN means that this function -* will assert if allocation fails. -* @param[in] sig the signal to be assigned to the allocated event -* -* @returns -* pointer to the newly allocated event. This pointer can be NULL only if -* margin != #QF_NO_MARGIN and the event cannot be allocated with the -* specified margin still available in the given pool. -* -* @note -* The internal QF function QF_newX_() raises an assertion when the -* @p margin parameter is #QF_NO_MARGIN and allocation of the event turns -* out to be impossible due to event pool depletion, or incorrect (too big) -* size of the requested event. -* -* @note -* The application code should not call this function directly. -* The only allowed use is thorough the macros Q_NEW() or Q_NEW_X(). -*/ -QEvt *QF_newX_(uint_fast16_t const evtSize, - uint_fast16_t const margin, enum_t const sig) +/*${QF::QF-dyn::poolGetMaxBlockSize} .......................................*/ +uint_fast16_t QF_poolGetMaxBlockSize(void) { + return QF_EPOOL_EVENT_SIZE_(QF_ePool_[QF_maxPool_ - 1U]); +} + +/*${QF::QF-dyn::getPoolMin} ................................................*/ +uint_fast16_t QF_getPoolMin(uint_fast8_t const poolId) { + /*! @pre the poolId must be in range */ + Q_REQUIRE_ID(400, (poolId <= QF_MAX_EPOOL) + && (0U < poolId) && (poolId <= QF_maxPool_)); + + QF_CRIT_STAT_ + QF_CRIT_E_(); + uint_fast16_t const min = (uint_fast16_t)QF_ePool_[poolId - 1U].nMin; + QF_CRIT_X_(); + + return min; +} + +/*${QF::QF-dyn::newX_} .....................................................*/ +QEvt * QF_newX_( + uint_fast16_t const evtSize, + uint_fast16_t const margin, + enum_t const sig) { uint_fast8_t idx; /* find the pool index that fits the requested event size ... */ for (idx = 0U; idx < QF_maxPool_; ++idx) { - if (evtSize <= QF_EPOOL_EVENT_SIZE_(QF_pool_[idx])) { + if (evtSize <= QF_EPOOL_EVENT_SIZE_(QF_ePool_[idx])) { break; } } @@ -175,14 +139,14 @@ QEvt *QF_newX_(uint_fast16_t const evtSize, /* get e -- platform-dependent */ QEvt *e; -#ifdef Q_SPY - QF_EPOOL_GET_(QF_pool_[idx], e, + #ifdef Q_SPY + QF_EPOOL_GET_(QF_ePool_[idx], e, ((margin != QF_NO_MARGIN) ? margin : 0U), (uint_fast8_t)QS_EP_ID + idx + 1U); -#else - QF_EPOOL_GET_(QF_pool_[idx], e, + #else + QF_EPOOL_GET_(QF_ePool_[idx], e, ((margin != QF_NO_MARGIN) ? margin : 0U), 0U); -#endif + #endif /* was e allocated correctly? */ QS_CRIT_STAT_ @@ -214,33 +178,8 @@ QEvt *QF_newX_(uint_fast16_t const evtSize, return e; /* can't be NULL if we can't tolerate failed allocation */ } -/*==========================================================================*/ -/*! -* @static @public @memberof QF -* @description -* This function implements a simple garbage collector for the dynamic events. -* Only dynamic events are candidates for recycling. (A dynamic event is one -* that is allocated from an event pool, which is determined as non-zero -* e->poolId_ attribute.) Next, the function decrements the reference counter -* of the event (e->refCtr_), and recycles the event only if the counter drops -* to zero (meaning that no more references are outstanding for this event). -* The dynamic event is recycled by returning it to the pool from which -* it was originally allocated. -* -* @param[in] e pointer to the event to recycle -* -* @note -* QF invokes the garbage collector at all appropriate contexts, when -* an event can become garbage (automatic garbage collection), so the -* application code should have no need to call QF_gc() directly. The QF_gc() -* function is exposed only for special cases when your application sends -* dynamic events to the "raw" thread-safe queues (see ::QEQueue). Such -* queues are processed outside of QF and the automatic garbage collection -* is **NOT** performed for these events. In this case you need to call -* QF_gc() explicitly. -*/ +/*${QF::QF-dyn::gc} ........................................................*/ void QF_gc(QEvt const * const e) { - /* is it a dynamic event? */ if (e->poolId_ != 0U) { QF_CRIT_STAT_ @@ -277,34 +216,21 @@ void QF_gc(QEvt const * const e) { Q_ASSERT_ID(410, idx < QF_maxPool_); /* cast 'const' away, which is OK, because it's a pool event */ -#ifdef Q_SPY - QF_EPOOL_PUT_(QF_pool_[idx], QF_EVT_CONST_CAST_(e), + #ifdef Q_SPY + QF_EPOOL_PUT_(QF_ePool_[idx], QF_EVT_CONST_CAST_(e), (uint_fast8_t)QS_EP_ID + e->poolId_); -#else - QF_EPOOL_PUT_(QF_pool_[idx], QF_EVT_CONST_CAST_(e), 0U); -#endif + #else + QF_EPOOL_PUT_(QF_ePool_[idx], QF_EVT_CONST_CAST_(e), 0U); + #endif } } } -/*==========================================================================*/ -/*! -* @static @private @memberof QF -* @description -* Creates and returns a new reference to the current event e -* -* @param[in] e pointer to the current event -* @param[in] evtRef the event reference -* -* @returns -* the newly created reference to the event `e` -* -* @note -* The application code should not call this function directly. -* The only allowed use is thorough the macro Q_NEW_REF(). -*/ -QEvt const *QF_newRef_(QEvt const * const e, void const * const evtRef) { - +/*${QF::QF-dyn::newRef_} ...................................................*/ +QEvt const * QF_newRef_( + QEvt const * const e, + void const * const evtRef) +{ /*! @pre the event must be dynamic and the provided event reference * must not be already in use */ Q_REQUIRE_ID(500, @@ -328,18 +254,7 @@ QEvt const *QF_newRef_(QEvt const * const e, void const * const evtRef) { return e; } -/*==========================================================================*/ -/*! -* @static @private @memberof QF -* @description -* Deletes an existing reference to the event e -* -* @param[in] evtRef the event reference -* -* @note -* The application code should not call this function directly. -* The only allowed use is thorough the macro Q_DELETE_REF(). -*/ +/*${QF::QF-dyn::deleteRef_} ................................................*/ void QF_deleteRef_(void const * const evtRef) { QS_CRIT_STAT_ QEvt const * const e = (QEvt const *)evtRef; @@ -353,13 +268,4 @@ void QF_deleteRef_(void const * const evtRef) { QF_gc(e); } - -/*==========================================================================*/ -/*! -* @static @public @memberof QF -* @description -* Obtain the block size of any registered event pools -*/ -uint_fast16_t QF_poolGetMaxBlockSize(void) { - return QF_EPOOL_EVENT_SIZE_(QF_pool_[QF_maxPool_ - 1U]); -} +/*$enddef${QF::QF-dyn} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qf_mem.c b/src/qf/qf_mem.c index 905ffbed..4bb89b11 100644 --- a/src/qf/qf_mem.c +++ b/src/qf/qf_mem.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_mem.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_mem.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,15 +32,15 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_mem.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @ingroup qf * @brief ::QMPool implementatin (Memory Pool) */ #define QP_IMPL /* this is QP implementation */ @@ -43,45 +56,22 @@ Q_DEFINE_THIS_MODULE("qf_mem") -/*==========================================================================*/ -/*! -* @public @memberof QMPool -* @description -* Initialize a fixed block-size memory pool by providing it with the pool -* memory to manage, size of this memory, and the block size. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] poolSto pointer to the memory buffer for pool storage -* @param[in] poolSize size of the storage buffer in bytes -* @param[in] blockSize fixed-size of the memory blocks in bytes -* -* @attention -* The caller of QMPool::init() must make sure that the @p poolSto -* pointer is properly **aligned**. In particular, it must be possible to -* efficiently store a pointer at the location pointed to by @p poolSto. -* Internally, the QMPool_init() function rounds up the block size -* @p blockSize so that it can fit an integer number of pointers. -* This is done to achieve proper alignment of the blocks within the pool. -* -* @note -* Due to the rounding of block size the actual capacity of the pool might -* be less than (@p poolSize / @p blockSize). You can check the capacity -* of the pool by calling the QF_getPoolMin() function. -* -* @note -* This function is **not** protected by a critical section, because -* it is intended to be called only during the initialization of the system, -* when interrupts are not allowed yet. -* -* @note -* Many QF ports use memory pools to implement the event pools. -* -* @usage -* The following example illustrates how to invoke QMPool_init(): -* @include qmp_init.c -*/ -void QMPool_init(QMPool * const me, void * const poolSto, - uint_fast32_t poolSize, uint_fast16_t blockSize) +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QF::QMPool} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QMPool} ............................................................*/ + +/*${QF::QMPool::init} ......................................................*/ +void QMPool_init(QMPool * const me, + void * const poolSto, + uint_fast32_t poolSize, + uint_fast16_t blockSize) { /*! @pre The memory block must be valid * and the poolSize must fit at least one free block @@ -116,7 +106,7 @@ void QMPool_init(QMPool * const me, void * const poolSto, /* chain all blocks together in a free-list... */ while (poolSize >= (uint_fast32_t)blockSize) { - fb->next = &QF_PTR_AT_(fb, nblocks);/*point next link to next block */ + fb->next = &fb[nblocks]; /* point next link to next block */ fb = fb->next; /* advance to the next block */ poolSize -= (uint_fast32_t)blockSize; /* reduce available pool size */ ++me->nTot; /* increment the number of blocks so far */ @@ -129,91 +119,12 @@ void QMPool_init(QMPool * const me, void * const poolSto, me->end = fb; /* the last block in this pool */ } -/*==========================================================================*/ -/*! -* @public @memberof QMPool -* @description -* Recycle a memory block to the fixed block-size memory pool. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] b pointer to the memory block that is being recycled -* -* @attention -* The recycled block must be allocated from the **same** memory pool -* to which it is returned. -* -* @note -* This function can be called from any task level or ISR level. -* -* @sa -* QMPool_get() -* -* @usage -* The following example illustrates how to use QMPool_put(): -* @include qmp_use.c -*/ -void QMPool_put(QMPool * const me, void *b, uint_fast8_t const qs_id) { - (void)qs_id; /* unused parameter (outside Q_SPY build configuration) */ - - /*! @pre # free blocks cannot exceed the total # blocks and - * the block pointer must be from this pool. - */ - Q_REQUIRE_ID(200, (me->nFree < me->nTot) - && QF_PTR_RANGE_(b, me->start, me->end)); - - QF_CRIT_STAT_ - QF_CRIT_E_(); - ((QFreeBlock *)b)->next = (QFreeBlock *)me->free_head;/* link into list */ - me->free_head = b; /* set as new head of the free list */ - ++me->nFree; /* one more free block in this pool */ - - QS_BEGIN_NOCRIT_PRE_(QS_QF_MPOOL_PUT, qs_id) - QS_TIME_PRE_(); /* timestamp */ - QS_OBJ_PRE_(me); /* this memory pool */ - QS_MPC_PRE_(me->nFree); /* the number of free blocks in the pool */ - QS_END_NOCRIT_PRE_() - - QF_CRIT_X_(); -} - -/*==========================================================================*/ -/*! -* @public @memberof QMPool -* @description -* The function allocates a memory block from the pool and returns a pointer -* to the block back to the caller. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] margin the minimum number of unused blocks still available -* in the pool after the allocation. -* -* @returns -* A pointer to a memory block or NULL if no more blocks are available in -* the memory pool. -* -* @note -* This function can be called from any task level or ISR level. -* -* @note -* The memory pool @p me must be initialized before any events can -* be requested from it. Also, the QMPool_get() function uses internally a -* QF critical section, so you should be careful not to call it from within -* a critical section when nesting of critical section is not supported. -* -* @attention -* An allocated block must be later returned back to the **same** pool -* from which it has been allocated. -* -* @sa QMPool_put() -* -* @usage -* The following example illustrates how to use QMPool_get(): -* @include qmp_use.c -*/ -void *QMPool_get(QMPool * const me, uint_fast16_t const margin, - uint_fast8_t const qs_id) +/*${QF::QMPool::get} .......................................................*/ +void * QMPool_get(QMPool * const me, + uint_fast16_t const margin, + uint_fast8_t const qs_id) { - (void)qs_id; /* unused parameter, if Q_SPY not defined */ + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ QF_CRIT_STAT_ QF_CRIT_E_(); @@ -277,30 +188,31 @@ void *QMPool_get(QMPool * const me, uint_fast16_t const margin, return fb; /* return the block or NULL pointer to the caller */ } -/*==========================================================================*/ -/*! -* @public @memberof QMPool -* @description -* This function obtains the minimum number of free blocks in the given -* event pool since this pool has been initialized by a call to QF_poolInit(). -* -* @param[in] poolId event pool ID in the range 1..QF_maxPool_, where -* QF_maxPool_ is the number of event pools initialized -* with the function QF_poolInit(). -* -* @returns -* the minimum number of unused blocks in the given event pool. -*/ -uint_fast16_t QF_getPoolMin(uint_fast8_t const poolId) { +/*${QF::QMPool::put} .......................................................*/ +void QMPool_put(QMPool * const me, + void * const b, + uint_fast8_t const qs_id) +{ + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ - /*! @pre the poolId must be in range */ - Q_REQUIRE_ID(400, (poolId <= QF_MAX_EPOOL) - && (0U < poolId) && (poolId <= QF_maxPool_)); + /*! @pre # free blocks cannot exceed the total # blocks and + * the block pointer must be from this pool. + */ + Q_REQUIRE_ID(200, (me->nFree < me->nTot) + && QF_PTR_RANGE_(b, me->start, me->end)); QF_CRIT_STAT_ QF_CRIT_E_(); - uint_fast16_t const min = (uint_fast16_t)QF_pool_[poolId - 1U].nMin; - QF_CRIT_X_(); + ((QFreeBlock *)b)->next = (QFreeBlock *)me->free_head;/* link into list */ + me->free_head = b; /* set as new head of the free list */ + ++me->nFree; /* one more free block in this pool */ - return min; + QS_BEGIN_NOCRIT_PRE_(QS_QF_MPOOL_PUT, qs_id) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(me); /* this memory pool */ + QS_MPC_PRE_(me->nFree); /* the number of free blocks in the pool */ + QS_END_NOCRIT_PRE_() + + QF_CRIT_X_(); } +/*$enddef${QF::QMPool} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qf_ps.c b/src/qf/qf_ps.c index 3bdbde29..7898e8a8 100644 --- a/src/qf/qf_ps.c +++ b/src/qf/qf_ps.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_ps.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_ps.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_ps.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief Publish-Subscribe services -* @ingroup qf */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -43,48 +56,30 @@ Q_DEFINE_THIS_MODULE("qf_ps") - /*==========================================================================*/ -/* Package-scope objects */ -/*! @static @private @memberof QF */ -QSubscrList *QF_subscrList_; +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*! @static @private @memberof QF */ -enum_t QF_maxPubSignal_; +/*$define${QF::QActive::subscrList_} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +QSubscrList * QActive_subscrList_; +/*$enddef${QF::QActive::subscrList_} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::maxPubSignal_} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +enum_t QActive_maxPubSignal_; +/*$enddef${QF::QActive::maxPubSignal_} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*==========================================================================*/ -/*! -* @static @public @memberof QF -* @description -* This function initializes the publish-subscribe facilities of QF and must -* be called exactly once before any subscriptions/publications occur in -* the application. -* -* @param[in] subscrSto pointer to the array of subscriber lists -* @param[in] maxSignal the dimension of the subscriber array and at -* the same time the maximum signal that can be published -* or subscribed. -* -* The array of subscriber-lists is indexed by signals and provides a mapping -* between the signals and subscriber-lists. The subscriber-lists are bitmasks -* of type ::QSubscrList, each bit in the bit mask corresponding to the unique -* priority of an active object. The size of the ::QSubscrList bit mask -* depends on the value of the #QF_MAX_ACTIVE macro. -* -* @note -* The publish-subscribe facilities are optional, meaning that you might -* choose not to use publish-subscribe. In that case calling QF_psInit() -* and using up memory for the subscriber-lists is unnecessary. -* -* @sa ::QSubscrList -* -* @usage -* The following example shows the typical initialization sequence of QF: -* @include qf_main.c -*/ -void QF_psInit(QSubscrList * const subscrSto, enum_t const maxSignal) { - QF_subscrList_ = subscrSto; - QF_maxPubSignal_ = maxSignal; +/*$define${QF::QActive::psInit} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QActive::psInit} ...................................................*/ +void QActive_psInit( + QSubscrList * const subscrSto, + enum_t const maxSignal) +{ + QActive_subscrList_ = subscrSto; + QActive_maxPubSignal_ = maxSignal; /* zero the subscriber list, so that the framework can start correctly * even if the startup code fails to clear the uninitialized data @@ -92,37 +87,20 @@ void QF_psInit(QSubscrList * const subscrSto, enum_t const maxSignal) { */ QF_bzero(subscrSto, (uint_fast16_t)maxSignal * sizeof(QSubscrList)); } +/*$enddef${QF::QActive::psInit} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::publish_} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @static @private @memberof QF -* @description -* This function posts (using the FIFO policy) the event @a e to **all** -* active objects that have subscribed to the signal @a e->sig, which is -* called _multicasting_. The multicasting performed in this function is -* very efficient based on reference-counting inside the published event -* ("zero-copy" event multicasting). This function is designed to be -* callable from any part of the system, including ISRs, device drivers, -* and active objects. -* -* @note -* To avoid any unexpected re-ordering of events posted into AO queues, -* the event multicasting is performed with scheduler __locked__. However, -* the scheduler is locked only up to the priority level of the highest- -* priority subscriber, so any AOs of even higher priority, which did not -* subscribe to this event are _not_ affected. -* -* @attention this function should be called only via the macro QF_PUBLISH() -*/ -#ifndef Q_SPY -void QF_publish_(QEvt const * const e) -#else -void QF_publish_(QEvt const * const e, - void const * const sender, uint_fast8_t const qs_id) -#endif +/*${QF::QActive::publish_} .................................................*/ +void QActive_publish_( + QEvt const * const e, + void const * const sender, + uint_fast8_t const qs_id) { + Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + /*! @pre the published signal must be within the configured range */ - Q_REQUIRE_ID(200, e->sig < (QSignal)QF_maxPubSignal_); + Q_REQUIRE_ID(200, e->sig < (QSignal)QActive_maxPubSignal_); QF_CRIT_STAT_ QF_CRIT_E_(); @@ -147,7 +125,7 @@ void QF_publish_(QEvt const * const e, } /* make a local, modifiable copy of the subscriber list */ - QPSet subscrList = QF_PTR_AT_(QF_subscrList_, e->sig); + QPSet subscrList = QActive_subscrList_[e->sig]; QF_CRIT_X_(); if (QPSet_notEmpty(&subscrList)) { /* any subscribers? */ @@ -158,10 +136,10 @@ void QF_publish_(QEvt const * const e, QF_SCHED_LOCK_(p); /* lock the scheduler up to prio 'p' */ do { /* loop over all subscribers */ /* the prio of the AO must be registered with the framework */ - Q_ASSERT_ID(210, QF_active_[p] != (QActive *)0); + Q_ASSERT_ID(210, QActive_registry_[p] != (QActive *)0); /* QACTIVE_POST() asserts internally if the queue overflows */ - QACTIVE_POST(QF_active_[p], e, sender); + QACTIVE_POST(QActive_registry_[p], e, sender); QPSet_remove(&subscrList, p); /* remove the handled subscriber */ if (QPSet_notEmpty(&subscrList)) { /* still more subscribers? */ @@ -181,34 +159,19 @@ void QF_publish_(QEvt const * const e, */ QF_gc(e); } +/*$enddef${QF::QActive::publish_} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::subscribe} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @public @memberof QActive -* @description -* This function is part of the Publish-Subscribe event delivery mechanism -* available in QF. Subscribing to an event means that the framework will -* start posting all published events with a given signal @p sig to the -* event queue of the active object @p me. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] sig event signal to subscribe -* -* @usage -* The following example shows how the Table active object subscribes -* to three signals in the initial transition: -* @include qf_subscribe.c -* -* @sa -* QF_publish_(), QActive_unsubscribe(), and QActive_unsubscribeAll() -*/ -void QActive_subscribe(QActive const * const me, enum_t const sig) { +/*${QF::QActive::subscribe} ................................................*/ +void QActive_subscribe(QActive const * const me, + enum_t const sig) +{ uint_fast8_t const p = (uint_fast8_t)me->prio; Q_REQUIRE_ID(300, ((enum_t)Q_USER_SIG <= sig) - && (sig < QF_maxPubSignal_) + && (sig < QActive_maxPubSignal_) && (0U < p) && (p <= QF_MAX_ACTIVE) - && (QF_active_[p] == me)); + && (QActive_registry_[p] == me)); QF_CRIT_STAT_ QF_CRIT_E_(); @@ -220,47 +183,26 @@ void QActive_subscribe(QActive const * const me, enum_t const sig) { QS_END_NOCRIT_PRE_() /* set the priority bit */ - QPSet_insert(&QF_PTR_AT_(QF_subscrList_, sig), p); + QPSet_insert(&QActive_subscrList_[sig], p); QF_CRIT_X_(); } +/*$enddef${QF::QActive::subscribe} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::unsubscribe} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @public @memberof QActive -* @description -* This function is part of the Publish-Subscribe event delivery mechanism -* available in QF. Un-subscribing from an event means that the framework -* will stop posting published events with a given signal @p sig to the -* event queue of the active object @p me. -* -* @param[in] me pointer (see @ref oop) -* @param[in] sig event signal to unsubscribe -* -* @note -* Due to the latency of event queues, an active object should NOT -* assume that a given signal @p sig will never be dispatched to the -* state machine of the active object after un-subscribing from that signal. -* The event might be already in the queue, or just about to be posted -* and the un-subscribe operation will not flush such events. -* -* @note -* Un-subscribing from a signal that has never been subscribed in the -* first place is considered an error and QF will raise an assertion. -* -* @sa -* QF_publish_(), QActive_subscribe(), and QActive_unsubscribeAll() -*/ -void QActive_unsubscribe(QActive const * const me, enum_t const sig) { +/*${QF::QActive::unsubscribe} ..............................................*/ +void QActive_unsubscribe(QActive const * const me, + enum_t const sig) +{ uint_fast8_t const p = (uint_fast8_t)me->prio; /*! @pre the singal and the prioriy must be in ragne, the AO must also * be registered with the framework */ Q_REQUIRE_ID(400, ((enum_t)Q_USER_SIG <= sig) - && (sig < QF_maxPubSignal_) + && (sig < QActive_maxPubSignal_) && (0U < p) && (p <= QF_MAX_ACTIVE) - && (QF_active_[p] == me)); + && (QActive_registry_[p] == me)); QF_CRIT_STAT_ QF_CRIT_E_(); @@ -272,46 +214,25 @@ void QActive_unsubscribe(QActive const * const me, enum_t const sig) { QS_END_NOCRIT_PRE_() /* clear priority bit */ - QPSet_remove(&QF_PTR_AT_(QF_subscrList_, sig), p); + QPSet_remove(&QActive_subscrList_[sig], p); QF_CRIT_X_(); } +/*$enddef${QF::QActive::unsubscribe} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::unsubscribeAll} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @public @memberof QActive -* @description -* This function is part of the Publish-Subscribe event delivery mechanism -* available in QF. Un-subscribing from all events means that the framework -* will stop posting any published events to the event queue of the active -* object @p me. -* -* @param[in] me pointer (see @ref oop) -* -* @note -* Due to the latency of event queues, an active object should NOT -* assume that no events will ever be dispatched to the state machine of -* the active object after un-subscribing from all events. -* The events might be already in the queue, or just about to be posted -* and the un-subscribe operation will not flush such events. Also, the -* alternative event-delivery mechanisms, such as direct event posting or -* time events, can be still delivered to the event queue of the active -* object. -* -* @sa -* QF_publish_(), QActive_subscribe(), and QActive_unsubscribe() -*/ +/*${QF::QActive::unsubscribeAll} ...........................................*/ void QActive_unsubscribeAll(QActive const * const me) { uint_fast8_t const p = (uint_fast8_t)me->prio; Q_REQUIRE_ID(500, (0U < p) && (p <= QF_MAX_ACTIVE) - && (QF_active_[p] == me)); + && (QActive_registry_[p] == me)); - for (enum_t sig = (enum_t)Q_USER_SIG; sig < QF_maxPubSignal_; ++sig) { + for (enum_t sig = (enum_t)Q_USER_SIG; sig < QActive_maxPubSignal_; ++sig) { QF_CRIT_STAT_ QF_CRIT_E_(); - if (QPSet_hasElement(&QF_PTR_AT_(QF_subscrList_, sig), p)) { - QPSet_remove(&QF_PTR_AT_(QF_subscrList_, sig), p); + if (QPSet_hasElement(&QActive_subscrList_[sig], p)) { + QPSet_remove(&QActive_subscrList_[sig], p); QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_UNSUBSCRIBE, me->prio) QS_TIME_PRE_(); /* timestamp */ @@ -325,3 +246,4 @@ void QActive_unsubscribeAll(QActive const * const me) { QF_CRIT_EXIT_NOP(); } } +/*$enddef${QF::QActive::unsubscribeAll} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qf_qact.c b/src/qf/qf_qact.c index 9f1aa70f..af69e028 100644 --- a/src/qf/qf_qact.c +++ b/src/qf/qf_qact.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_qact.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_qact.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,51 +32,84 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_qact.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QActive_ctor() definition * -* @description +* @details * This file must remain separate from the rest to avoid pulling in the * "virtual" functions QHsm_init_() and QHsm_dispatch_() in case they * are not used by the application. * * @sa qf_qmact.c -* -* @ingroup qf */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ #include "qf_pkg.h" /* QF package-scope interface */ +#include "qassert.h" /* QP embedded systems-friendly assertions */ -/*Q_DEFINE_THIS_MODULE("qf_qact")*/ +Q_DEFINE_THIS_MODULE("qf_qact") -/*==========================================================================*/ -/*! -* @protected @memberof QActive -* @description -* Performs the first step of active object initialization by assigning -* the virtual pointer and calling the superclass constructor. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] initial pointer to the event to be dispatched to the MSM -* -* @note Must be called only __once__ before QMSM_INIT(). -* @sa QMsm_ctor() and QHsm_ctor() -*/ -void QActive_ctor(QActive * const me, QStateHandler initial) { - static QActiveVtable const vtable = { /* QActive virtual table */ +//============================================================================ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QF::QActive::registry_[QF_MAX_ACTIVE + 1U]} vvvvvvvvvvvvvvvvvvvvv*/ +QActive * QActive_registry_[QF_MAX_ACTIVE + 1U]; +/*$enddef${QF::QActive::registry_[QF_MAX_ACTIVE + 1U]} ^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QF-base::intNest_} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QF-base::intNest_} .................................................*/ +uint_fast8_t QF_intNest_; +/*$enddef${QF::QF-base::intNest_} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QF-pkg} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QF-pkg::readySet_} .................................................*/ +QPSet QF_readySet_; + +/*${QF::QF-pkg::ePool_[QF_MAX_EPOOL]} ......................................*/ +QF_EPOOL_TYPE_ QF_ePool_[QF_MAX_EPOOL]; + +/*${QF::QF-pkg::maxPool_} ..................................................*/ +uint_fast8_t QF_maxPool_; + +/*${QF::QF-pkg::bzero} .....................................................*/ +void QF_bzero( + void * const start, + uint_fast16_t const len) +{ + uint8_t *ptr = (uint8_t *)start; + for (uint_fast16_t n = len; n > 0U; --n) { + *ptr = 0U; + ++ptr; + } +} +/*$enddef${QF::QF-pkg} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +//============================================================================ +/*$define${QF::QActive::ctor} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QActive::ctor} .....................................................*/ +void QActive_ctor(QActive * const me, + QStateHandler const initial) +{ + static QActiveVtable const vtable = { /* QActive virtual table */ { &QHsm_init_, &QHsm_dispatch_ -#ifdef Q_SPY + #ifdef Q_SPY ,&QHsm_getStateHandler_ -#endif + #endif }, &QActive_start_, &QActive_post_, @@ -78,3 +124,80 @@ void QActive_ctor(QActive * const me, QStateHandler initial) { QHsm_ctor(&me->super, initial); /* explicitly call superclass' ctor */ me->super.vptr = &vtable.super; /* hook the vptr to QActive vtable */ } +/*$enddef${QF::QActive::ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::register_} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QActive::register_} ................................................*/ +void QActive_register_(QActive * const me) { + uint_fast8_t const p = (uint_fast8_t)me->prio; + + /*! @pre the priority of the active object must not be zero and cannot + * exceed the maximum #QF_MAX_ACTIVE. Also, the priority of the active + * object must not be already in use. QF requires each active object to + * have a **unique** priority. + */ + Q_REQUIRE_ID(100, (0U < p) + && (p <= QF_MAX_ACTIVE) + && (QActive_registry_[p] == (QActive *)0)); + QF_CRIT_STAT_ + QF_CRIT_E_(); + QActive_registry_[p] = me; /* register the active object at this priority */ + QF_CRIT_X_(); +} +/*$enddef${QF::QActive::register_} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QF::QActive::unregister_} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QActive::unregister_} ..............................................*/ +void QActive_unregister_(QActive * const me) { + uint_fast8_t const p = (uint_fast8_t)me->prio; + + /*! @pre the priority of the active object must not be zero and cannot + * exceed the maximum #QF_MAX_ACTIVE. Also, the priority of the active + * object must be already registered with the framework. + */ + Q_REQUIRE_ID(200, (0U < p) && (p <= QF_MAX_ACTIVE) + && (QActive_registry_[p] == me)); + QF_CRIT_STAT_ + QF_CRIT_E_(); + QActive_registry_[p] = (QActive *)0; /* free-up the priority level */ + me->super.state.fun = Q_STATE_CAST(0); /* invalidate the state */ + QF_CRIT_X_(); +} +/*$enddef${QF::QActive::unregister_} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +//============================================================================ +/*$define${QF-types::QF_LOG2} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF-types::QF_LOG2} .....................................................*/ +#ifndef QF_LOG2 +uint_fast8_t QF_LOG2(QPSetBits x) { + static uint8_t const log2LUT[16] = { + 0U, 1U, 2U, 2U, 3U, 3U, 3U, 3U, + 4U, 4U, 4U, 4U, 4U, 4U, 4U, 4U + }; + uint_fast8_t n = 0U; + QPSetBits t; + + #if (QF_MAX_ACTIVE > 16U) + t = (QPSetBits)(x >> 16U); + if (t != 0U) { + n += 16U; + x = t; + } + #endif + #if (QF_MAX_ACTIVE > 8U) + t = (x >> 8U); + if (t != 0U) { + n += 8U; + x = t; + } + #endif + t = (x >> 4U); + if (t != 0U) { + n += 4U; + x = t; + } + return n + log2LUT[x]; +} +#endif /* ndef QF_LOG2 */ +/*$enddef${QF-types::QF_LOG2} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qf_qeq.c b/src/qf/qf_qeq.c index 9d88a0f0..4cedaac2 100644 --- a/src/qf/qf_qeq.c +++ b/src/qf/qf_qeq.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_qeq.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_qeq.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_qeq.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief ::QEQueue implementation (QP native thread-safe queue) -* @ingroup qf */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -43,27 +56,21 @@ Q_DEFINE_THIS_MODULE("qf_qeq") -/*==========================================================================*/ -/*! -* @public @memberof QEQueue -* @description -* Initialize the event queue by giving it the storage for the ring buffer. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] qSto an array of pointers to ::QEvt to sereve as the -* ring buffer for the event queue -* @param[in] qLen the length of the @p qSto buffer (in ::QEvt pointers) -* -* @note The actual capacity of the queue is qLen + 1, because of the extra -* location forntEvt. -* -* @note -* This function is also used to initialize the event queues of active -* objects in the built-int QV and QK kernels, as well as other -* QP ports to OSes/RTOSes that do provide a suitable message queue. -*/ -void QEQueue_init(QEQueue * const me, QEvt const * * const qSto, - uint_fast16_t const qLen) +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QF::QEQueue} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QEQueue} ...........................................................*/ + +/*${QF::QEQueue::init} .....................................................*/ +void QEQueue_init(QEQueue * const me, + QEvt const * qSto[], + uint_fast16_t const qLen) { me->frontEvt = (QEvt *)0; /* no events in the queue */ me->ring = qSto; /* the beginning of the ring buffer */ @@ -76,33 +83,11 @@ void QEQueue_init(QEQueue * const me, QEvt const * * const qSto, me->nMin = me->nFree; } -/*==========================================================================*/ -/*! -* @public @memberof QEQueue -* @description -* Post an event to the "raw" thread-safe event queue using the -* First-In-First-Out (FIFO) order. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] e pointer to the event to be posted to the queue -* @param[in] margin number of required free slots in the queue after -* posting the event. The special value #QF_NO_MARGIN -* means that this function will assert if posting -* @note -* The #QF_NO_MARGIN value of the @p margin parameter is special and -* denotes situation when the post() operation is assumed to succeed (event -* delivery guarantee). An assertion fires, when the event cannot be -* delivered in this case. -* -* @returns 'true' (success) when the posting succeeded with the provided -* margin and 'false' (failure) when the posting fails. -* -* @note This function can be called from any task context or ISR context. -* -* @sa QEQueue_postLIFO(), QEQueue_get() -*/ -bool QEQueue_post(QEQueue * const me, QEvt const * const e, - uint_fast16_t const margin, uint_fast8_t const qs_id) +/*${QF::QEQueue::post} .....................................................*/ +bool QEQueue_post(QEQueue * const me, + QEvt const * const e, + uint_fast16_t const margin, + uint_fast8_t const qs_id) { /* @pre event must be valid */ Q_REQUIRE_ID(200, e != (QEvt *)0); @@ -145,7 +130,7 @@ bool QEQueue_post(QEQueue * const me, QEvt const * const e, /* queue was not empty, insert event into the ring-buffer */ else { /* insert event into the ring buffer (FIFO)... */ - QF_PTR_AT_(me->ring, me->head) = e; /* insert e into buffer */ + me->ring[me->head] = e; /* insert e into buffer */ /* need to wrap the head? */ if (me->head == 0U) { me->head = me->end; /* wrap around */ @@ -176,32 +161,10 @@ bool QEQueue_post(QEQueue * const me, QEvt const * const e, return status; } -/*==========================================================================*/ -/*! -* @public @memberof QEQueue -* @description -* Post an event to the "raw" thread-safe event queue using the -* Last-In-First-Out (LIFO) order. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] e pointer to the event to be posted to the queue -* -* @attention -* The LIFO policy should be used only with great __caution__, because -* it alters the order of events in the queue. -* -* @note -* This function can be called from any task context or ISR context. -* -* @note -* this function is used for the "raw" thread-safe queues and __not__ -* for the queues of active objects. -* -* @sa -* QEQueue_post(), QEQueue_get(), QActive_defer() -*/ -void QEQueue_postLIFO(QEQueue * const me, QEvt const * const e, - uint_fast8_t const qs_id) +/*${QF::QEQueue::postLIFO} .................................................*/ +void QEQueue_postLIFO(QEQueue * const me, + QEvt const * const e, + uint_fast8_t const qs_id) { (void)qs_id; /* unused parameter, if Q_SPY not defined */ @@ -241,32 +204,15 @@ void QEQueue_postLIFO(QEQueue * const me, QEvt const * const e, if (me->tail == me->end) { /* need to wrap the tail? */ me->tail = 0U; /* wrap around */ } - QF_PTR_AT_(me->ring, me->tail) = frontEvt; /* save old front evt */ + me->ring[me->tail] = frontEvt; /* save old front evt */ } QF_CRIT_X_(); } -/*==========================================================================*/ -/*! -* @public @memberof QEQueue -* @description -* Retrieves an event from the front of the "raw" thread-safe queue and -* returns a pointer to this event to the caller. -* -* @param[in,out] me pointer (see @ref oop) -* -* @returns -* pointer to event at the front of the queue, if the queue is -* not empty and NULL if the queue is empty. -* -* @note -* this function is used for the "raw" thread-safe queues and __not__ -* for the queues of active objects. -* -* @sa -* QEQueue_post(), QEQueue_postLIFO(), QActive_recall() -*/ -QEvt const *QEQueue_get(QEQueue * const me, uint_fast8_t const qs_id) { +/*${QF::QEQueue::get} ......................................................*/ +QEvt const * QEQueue_get(QEQueue * const me, + uint_fast8_t const qs_id) +{ (void)qs_id; /* unused parameter (outside Q_SPY build configuration) */ QF_CRIT_STAT_ @@ -281,7 +227,7 @@ QEvt const *QEQueue_get(QEQueue * const me, uint_fast8_t const qs_id) { /* any events in the ring buffer? */ if (nFree <= me->end) { - me->frontEvt = QF_PTR_AT_(me->ring, me->tail); /* get from tail */ + me->frontEvt = me->ring[me->tail]; /* get from tail */ if (me->tail == 0U) { /* need to wrap the tail? */ me->tail = me->end; /* wrap around */ } @@ -312,3 +258,4 @@ QEvt const *QEQueue_get(QEQueue * const me, uint_fast8_t const qs_id) { QF_CRIT_X_(); return e; } +/*$enddef${QF::QEQueue} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qf_qmact.c b/src/qf/qf_qmact.c index d7e7a800..aa48efc1 100644 --- a/src/qf/qf_qmact.c +++ b/src/qf/qf_qmact.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_qmact.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_qmact.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,24 +32,23 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_qmact.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QMActive_ctor() definition * -* @description +* @details * This file must remain separate from the rest to avoid pulling in the * "virtual" functions QHsm_init_() and QHsm_dispatch_() in case they * are not used by the application. * * @sa qf_qact.c -* -* @ingroup qf */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -51,27 +63,27 @@ */ #define QMSM_CAST_(ptr_) ((QMsm *)(ptr_)) -/*==========================================================================*/ -/*! -* @protected @memberof QMActive -* @description -* Performs the first step of active object initialization by assigning -* the virtual pointer and calling the superclass constructor. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] initial pointer to the event to be dispatched to the MSM -* -* @note Must be called only ONCE before QMSM_INIT(). -* -* @sa QHsm_ctor() -*/ -void QMActive_ctor(QMActive * const me, QStateHandler initial) { +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QF::QMActive} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QF::QMActive} ..........................................................*/ + +/*${QF::QMActive::ctor} ....................................................*/ +void QMActive_ctor(QMActive * const me, + QStateHandler const initial) +{ static QMActiveVtable const vtable = { /* QMActive virtual table */ { &QMsm_init_, &QMsm_dispatch_ -#ifdef Q_SPY + #ifdef Q_SPY ,&QMsm_getStateHandler_ -#endif + #endif }, &QActive_start_, &QActive_post_, @@ -97,3 +109,4 @@ void QMActive_ctor(QMActive * const me, QStateHandler initial) { me->super.super.vptr = &vtable.super; /* hook vptr to QMActive vtable */ } +/*$enddef${QF::QMActive} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qf/qf_time.c b/src/qf/qf_time.c index 46c3500b..f8350310 100644 --- a/src/qf/qf_time.c +++ b/src/qf/qf_time.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qf::qf_time.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qf::qf_time.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qf::qf_time.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QF/C time events and time management services -* @ingroup qf */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -43,202 +56,33 @@ Q_DEFINE_THIS_MODULE("qf_time") -/* Package-scope objects ****************************************************/ -/*! @static @private @memberof QF */ -QTimeEvt QF_timeEvtHead_[QF_MAX_TICK_RATE]; /* heads of time event lists */ - #ifdef Q_SPY - /*! intertnal macro to encapsulate a MISRA deviation - * @description - * This internal macro encapsulates the violation of MISRA-C 2012 - * Rule 11.5(A) "A conversion should not be performed from pointer to void - * into pointer to object". - */ - #define QACTIVE_CAST_(ptr_) ((QActive *)(ptr_)) +/*! intertnal macro to encapsulate a MISRA deviation +* @details +* This internal macro encapsulates the violation of MISRA-C 2012 +* Rule 11.5(A) "A conversion should not be performed from pointer to void +* into pointer to object". +*/ +#define QACTIVE_CAST_(ptr_) ((QActive *)(ptr_)) #endif -/*==========================================================================*/ -#ifdef Q_SPY -/*! -* @static @private @memberof QF -* @description -* This internal helper function processes all armed ::QTimeEvt objects -* associated wit the tick rate @p tickRate . -* -* This function must be called periodically from a time-tick ISR or from -* a task so that QF can manage the timeout events assigned to the given -* system clock tick rate. -* -* @param[in] tickRate system clock tick rate serviced in this call [1..15]. -* @param[in] sender pointer to a sender object (used only for QS tracing) -* -* @note -* this function should be called only via the macro QF_TICK_X() -* -* @note -* the calls to QF_tickX_() with different @p tickRate parameter can preempt -* each other. For example, higher clock tick rates might be serviced from -* interrupts while others from tasks (active objects). -* -* @sa ::QTimeEvt. -* @sa QF_tickX_() -* @sa QF_TICK() -*/ -void QF_tickX_(uint_fast8_t const tickRate, void const * const sender) -#else -void QF_tickX_(uint_fast8_t const tickRate) +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -{ - QTimeEvt *prev = &QF_timeEvtHead_[tickRate]; +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ - QF_CRIT_STAT_ - QF_CRIT_E_(); +/*$define${QF::QTimeEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ - QS_BEGIN_NOCRIT_PRE_(QS_QF_TICK, 0U) - ++prev->ctr; - QS_TEC_PRE_(prev->ctr); /* tick ctr */ - QS_U8_PRE_(tickRate); /* tick rate */ - QS_END_NOCRIT_PRE_() +/*${QF::QTimeEvt} ..........................................................*/ +QTimeEvt QTimeEvt_timeEvtHead_[QF_MAX_TICK_RATE]; - /* scan the linked-list of time events at this rate... */ - for (;;) { - QTimeEvt *t = prev->next; /* advance down the time evt. list */ - - /* end of the list? */ - if (t == (QTimeEvt *)0) { - - /* any new time events armed since the last run of QF_tickX_()? */ - if (QF_timeEvtHead_[tickRate].act != (void *)0) { - - /* sanity check */ - Q_ASSERT_CRIT_(110, prev != (QTimeEvt *)0); - prev->next = (QTimeEvt *)QF_timeEvtHead_[tickRate].act; - QF_timeEvtHead_[tickRate].act = (void *)0; - t = prev->next; /* switch to the new list */ - } - else { - break; /* all currently armed time evts. processed */ - } - } - - /* time event scheduled for removal? */ - if (t->ctr == 0U) { - prev->next = t->next; - /* mark time event 't' as NOT linked */ - t->super.refCtr_ &= (uint8_t)(~TE_IS_LINKED & 0xFFU); - /* do NOT advance the prev pointer */ - QF_CRIT_X_(); /* exit crit. section to reduce latency */ - - /* prevent merging critical sections, see NOTE1 below */ - QF_CRIT_EXIT_NOP(); - } - else { - --t->ctr; - - /* is time event about to expire? */ - if (t->ctr == 0U) { - /* temporary for volatile */ - QActive * const act = (QActive *)t->act; - - /* periodic time evt? */ - if (t->interval != 0U) { - t->ctr = t->interval; /* rearm the time event */ - prev = t; /* advance to this time event */ - } - /* one-shot time event: automatically disarm */ - else { - prev->next = t->next; - /* mark time event 't' as NOT linked */ - t->super.refCtr_ &= (uint8_t)(~TE_IS_LINKED & 0xFFU); - /* do NOT advance the prev pointer */ - - QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_AUTO_DISARM, act->prio) - QS_OBJ_PRE_(t); /* this time event object */ - QS_OBJ_PRE_(act); /* the target AO */ - QS_U8_PRE_(tickRate); /* tick rate */ - QS_END_NOCRIT_PRE_() - } - - QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_POST, act->prio) - QS_TIME_PRE_(); /* timestamp */ - QS_OBJ_PRE_(t); /* the time event object */ - QS_SIG_PRE_(t->super.sig); /* signal of this time event */ - QS_OBJ_PRE_(act); /* the target AO */ - QS_U8_PRE_(tickRate); /* tick rate */ - QS_END_NOCRIT_PRE_() - - QF_CRIT_X_(); /* exit critical section before posting */ - - /* QACTIVE_POST() asserts internally if the queue overflows */ - QACTIVE_POST(act, &t->super, sender); - } - else { - prev = t; /* advance to this time event */ - QF_CRIT_X_(); /* exit crit. section to reduce latency */ - - /* prevent merging critical sections, see NOTE1 below */ - QF_CRIT_EXIT_NOP(); - } - } - QF_CRIT_E_(); /* re-enter crit. section to continue */ - } - QF_CRIT_X_(); -} - -/*==========================================================================*/ -/*! -* @static @public @memberof QF -* @description -* Find out if any time events are armed at the given clock tick rate. -* -* @param[in] tickRate system clock tick rate to find out about. -* -* @returns -* 'true' if no time events are armed at the given tick rate and -* 'false' otherwise. -* -* @note -* This function should be called in critical section. -*/ -bool QF_noTimeEvtsActiveX(uint_fast8_t const tickRate) { - - /*! @pre the tick rate must be in range */ - Q_REQUIRE_ID(200, tickRate < QF_MAX_TICK_RATE); - - bool inactive; - if (QF_timeEvtHead_[tickRate].next != (QTimeEvt *)0) { - inactive = false; - } - else if ((QF_timeEvtHead_[tickRate].act != (void *)0)) { - inactive = false; - } - else { - inactive = true; - } - return inactive; -} - -/*==========================================================================*/ -/*! -* @public @memberof QTimeEvt -* @description -* When creating a time event, you must commit it to a specific active object -* @p act, tick rate @p tickRate and event signal @p sig. You cannot change -* these attributes later. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] act pointer to the active object associated with this -* time event. The time event will post itself to this AO. -* @param[in] sig signal to associate with this time event. -* @param[in] tickRate systemclock tick rate to associate with this -* time event in the range [0..15]. -* -* @note You should call the constructor exactly once for every Time Event -* object **before** arming the Time Event. The ideal place for initializing -* the time event(s) associated with a given AO is the AO's constructor. -*/ -void QTimeEvt_ctorX(QTimeEvt * const me, QActive * const act, - enum_t const sig, uint_fast8_t tickRate) +/*${QF::QTimeEvt::ctorX} ...................................................*/ +void QTimeEvt_ctorX(QTimeEvt * const me, + QActive * const act, + enum_t const sig, + uint_fast8_t const tickRate) { /*! @pre The signal must be valid and the tick rate in range */ Q_REQUIRE_ID(300, (sig >= (enum_t)Q_USER_SIG) @@ -268,46 +112,17 @@ void QTimeEvt_ctorX(QTimeEvt * const me, QActive * const act, me->super.refCtr_ = (uint8_t)tickRate; } -/*==========================================================================*/ -/*! -* @public @memberof QTimeEvt -* @description -* Arms a time event to fire in a specified number of clock ticks and with -* a specified interval. If the interval is zero, the time event is armed for -* one shot ('one-shot' time event). When the timeout expires, the time event -* gets directly posted (using the FIFO policy) into the event queue of the -* host active object. After posting, a one-shot time event gets automatically -* disarmed while a periodic time event (interval != 0) is automatically -* re-armed. -* -* A time event can be disarmed at any time by calling QTimeEvt_disarm(). -* Also, a time event can be re-armed to fire in a different number of clock -* ticks by calling the QTimeEvt_rearm(). -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] nTicks number of clock ticks (at the associated rate) -* to rearm the time event with. -* @param[in] interval interval (in clock ticks) for periodic time event. -* -* @attention -* Arming an already armed time event is __not__ allowed and is considered -* a programming error. The QP/C framework will assert if it detects an -* attempt to arm an already armed time event. -* -* @usage -* The following example shows how to arm a one-shot time event from a state -* machine of an active object: -* @include qf_state.c -*/ +/*${QF::QTimeEvt::armX} ....................................................*/ void QTimeEvt_armX(QTimeEvt * const me, - QTimeEvtCtr const nTicks, QTimeEvtCtr const interval) + QTimeEvtCtr const nTicks, + QTimeEvtCtr const interval) { uint_fast8_t const tickRate - = ((uint_fast8_t)me->super.refCtr_ & TE_TICK_RATE); + = ((uint_fast8_t)me->super.refCtr_ & QTE_TICK_RATE); QTimeEvtCtr const ctr = me->ctr; -#ifdef Q_SPY + #ifdef Q_SPY uint_fast8_t const qs_id = ((QActive *)(me->act))->prio; -#endif + #endif /*! @pre the host AO must be valid, time evnet must be disarmed, * number of clock ticks cannot be zero, and the signal must be valid. @@ -317,9 +132,9 @@ void QTimeEvt_armX(QTimeEvt * const me, && (nTicks != 0U) && (tickRate < (uint_fast8_t)QF_MAX_TICK_RATE) && (me->super.sig >= (QSignal)Q_USER_SIG)); -#ifdef Q_NASSERT + #ifdef Q_NASSERT (void)ctr; /* avoid compiler warning about unused variable */ -#endif + #endif QF_CRIT_STAT_ QF_CRIT_E_(); @@ -329,21 +144,21 @@ void QTimeEvt_armX(QTimeEvt * const me, /* is the time event unlinked? * NOTE: For the duration of a single clock tick of the specified tick * rate a time event can be disarmed and yet still linked into the list, - * because un-linking is performed exclusively in the QF_tickX() function. + * because un-linking is performed exclusively in QTimeEvt_tick_(). */ - if ((me->super.refCtr_ & TE_IS_LINKED) == 0U) { - me->super.refCtr_ |= TE_IS_LINKED; /* mark as linked */ + if ((me->super.refCtr_ & QTE_IS_LINKED) == 0U) { + me->super.refCtr_ |= QTE_IS_LINKED; /* mark as linked */ /* The time event is initially inserted into the separate - * "freshly armed" link list based on QF_timeEvtHead_[tickRate].act. - * Only later, inside the QF_tickX() function, the "freshly armed" + * "freshly armed" link list based on QTimeEvt_timeEvtHead_[tickRate].act. + * Only later, inside the QTimeEvt_tick_() function, the "freshly armed" * list is appended to the main list of armed time events based on - * QF_timeEvtHead_[tickRate].next. Again, this is to keep any - * changes to the main list exclusively inside the QF_tickX() + * QTimeEvt_timeEvtHead_[tickRate].next. Again, this is to keep any + * changes to the main list exclusively inside the QTimeEvt_tick_() * function. */ - me->next = (QTimeEvt *)QF_timeEvtHead_[tickRate].act; - QF_timeEvtHead_[tickRate].act = me; + me->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act; + QTimeEvt_timeEvtHead_[tickRate].act = me; } QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_ARM, qs_id) @@ -358,30 +173,11 @@ void QTimeEvt_armX(QTimeEvt * const me, QF_CRIT_X_(); } -/*==========================================================================*/ -/*! -* @public @memberof QTimeEvt -* @description -* Disarm the time event so it can be safely reused. -* -* @param[in,out] me pointer (see @ref oop) -* -* @returns -* 'true' if the time event was truly disarmed, that is, it was running. -* The return of 'false' means that the time event was not truly disarmed, -* because it was not running. The 'false' return is only possible for one- -* shot time events that have been automatically disarmed upon expiration. -* In this case the 'false' return means that the time event has already -* been posted or published and should be expected in the active object's -* state machine. -* -* @note -* there is no harm in disarming an already disarmed time event -*/ +/*${QF::QTimeEvt::disarm} ..................................................*/ bool QTimeEvt_disarm(QTimeEvt * const me) { -#ifdef Q_SPY + #ifdef Q_SPY uint_fast8_t const qs_id = QACTIVE_CAST_(me->act)->prio; -#endif + #endif QF_CRIT_STAT_ QF_CRIT_E_(); @@ -390,7 +186,7 @@ bool QTimeEvt_disarm(QTimeEvt * const me) { bool wasArmed; if (me->ctr != 0U) { wasArmed = true; - me->super.refCtr_ |= TE_WAS_DISARMED; + me->super.refCtr_ |= QTE_WAS_DISARMED; QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_DISARM, qs_id) QS_TIME_PRE_(); /* timestamp */ @@ -398,20 +194,20 @@ bool QTimeEvt_disarm(QTimeEvt * const me) { QS_OBJ_PRE_(me->act); /* the target AO */ QS_TEC_PRE_(me->ctr); /* the number of ticks */ QS_TEC_PRE_(me->interval); /* the interval */ - QS_U8_PRE_(me->super.refCtr_ & TE_TICK_RATE); + QS_U8_PRE_(me->super.refCtr_ & QTE_TICK_RATE); QS_END_NOCRIT_PRE_() me->ctr = 0U; /* schedule removal from the list */ } else { /* the time event was already disarmed automatically */ wasArmed = false; - me->super.refCtr_ &= (uint8_t)(~TE_WAS_DISARMED & 0xFFU); + me->super.refCtr_ &= (uint8_t)(~QTE_WAS_DISARMED & 0xFFU); QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_DISARM_ATTEMPT, qs_id) QS_TIME_PRE_(); /* timestamp */ QS_OBJ_PRE_(me); /* this time event object */ QS_OBJ_PRE_(me->act); /* the target AO */ - QS_U8_PRE_(me->super.refCtr_ & TE_TICK_RATE); + QS_U8_PRE_(me->super.refCtr_ & QTE_TICK_RATE); QS_END_NOCRIT_PRE_() } @@ -420,34 +216,15 @@ bool QTimeEvt_disarm(QTimeEvt * const me) { return wasArmed; } -/*==========================================================================*/ -/*! -* @public @memberof QTimeEvt -* @description -* Rearms a time event with a new number of clock ticks. This function can -* be used to adjust the current period of a periodic time event or to -* prevent a one-shot time event from expiring (e.g., a watchdog time event). -* Rearming a periodic timer leaves the interval unchanged and is a convenient -* method to adjust the phasing of a periodic time event. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] nTicks number of clock ticks (at the associated rate) -* to rearm the time event with. -* -* @returns -* 'true' if the time event was running as it was re-armed. The 'false' -* return means that the time event was not truly rearmed because it was -* not running. The 'false' return is only possible for one-shot time events -* that have been automatically disarmed upon expiration. In this case the -* 'false' return means that the time event has already been posted or -* published and should be expected in the active object's state machine. -*/ -bool QTimeEvt_rearm(QTimeEvt * const me, QTimeEvtCtr const nTicks) { +/*${QF::QTimeEvt::rearm} ...................................................*/ +bool QTimeEvt_rearm(QTimeEvt * const me, + QTimeEvtCtr const nTicks) +{ uint_fast8_t const tickRate - = (uint_fast8_t)me->super.refCtr_ & TE_TICK_RATE; -#ifdef Q_SPY + = (uint_fast8_t)me->super.refCtr_ & QTE_TICK_RATE; + #ifdef Q_SPY uint_fast8_t const qs_id = ((QActive *)(me->act))->prio; -#endif + #endif /*! @pre AO must be valid, tick rate must be in range, nTicks must not * be zero, and the signal of this time event must be valid @@ -468,22 +245,22 @@ bool QTimeEvt_rearm(QTimeEvt * const me, QTimeEvtCtr const nTicks) { /* NOTE: For the duration of a single clock tick of the specified * tick rate a time event can be disarmed and yet still linked into * the list, because unlinking is performed exclusively in the - * QF_tickX() function. + * QTimeEvt_tick_() function. */ /* is the time event linked yet? */ - if ((me->super.refCtr_ & TE_IS_LINKED) == 0U) { - me->super.refCtr_ |= TE_IS_LINKED; /* mark as linked */ + if ((me->super.refCtr_ & QTE_IS_LINKED) == 0U) { + me->super.refCtr_ |= QTE_IS_LINKED; /* mark as linked */ /* The time event is initially inserted into the separate - * "freshly armed" list based on QF_timeEvtHead_[tickRate].act. - * Only later, inside the QF_tickX() function, the "freshly armed" - * list is appended to the main list of armed time events based on - * QF_timeEvtHead_[tickRate].next. Again, this is to keep any - * changes to the main list exclusively inside the QF_tickX() - * function. + * "freshly armed" list based on QTimeEvt_timeEvtHead_[tickRate].act. + * Only later, inside the QTimeEvt_tick_() function, the "freshly + * armed" list is appended to the main list of armed time events + * based on QTimeEvt_timeEvtHead_[tickRate].next. Again, this is + * to keep any changes to the main list exclusively inside the + * QTimeEvt_tick_() function. */ - me->next = (QTimeEvt *)QF_timeEvtHead_[tickRate].act; - QF_timeEvtHead_[tickRate].act = me; + me->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act; + QTimeEvt_timeEvtHead_[tickRate].act = me; } } else { /* the time event was armed */ @@ -505,52 +282,14 @@ bool QTimeEvt_rearm(QTimeEvt * const me, QTimeEvtCtr const nTicks) { return wasArmed; } -/*==========================================================================*/ -/*! -* @public @memberof QTimeEvt -* @description -* Useful for checking whether a one-shot time event was disarmed in the -* QTimeEvt_disarm() operation. -* -* @param[in,out] me pointer (see @ref oop) -* -* @returns -* 'true' if the time event was truly disarmed in the last QTimeEvt_disarm() -* operation. The 'false' return means that the time event was not truly -* disarmed, because it was not running at that time. The 'false' return is -* only possible for one-shot time events that have been automatically disarmed -* upon expiration. In this case the 'false' return means that the time event -* has already been posted or published and should be expected in the active -* object's event queue. -* -* @note -* This function has a **side effect** of setting the "was disarmed" status, -* which means that the second and subsequent times this function is called -* the function will return 'true'. -*/ +/*${QF::QTimeEvt::wasDisarmed} .............................................*/ bool QTimeEvt_wasDisarmed(QTimeEvt * const me) { - uint8_t const wasDisarmed = (me->super.refCtr_ & TE_WAS_DISARMED); - me->super.refCtr_ |= TE_WAS_DISARMED; /* set the flag */ + uint8_t const wasDisarmed = (me->super.refCtr_ & QTE_WAS_DISARMED); + me->super.refCtr_ |= QTE_WAS_DISARMED; /* mark as disarmed */ return wasDisarmed != 0U; } -/*==========================================================================*/ -/*! -* @public @memberof QTimeEvt -* @description -* Useful for checking how many clock ticks (at the tick rate associated -* with the time event) remain until the time event expires. -* -* @param[in,out] me pointer (see @ref oop) -* -* @returns -* For an armed time event, the function returns the current value of the -* down-counter of the given time event. If the time event is not armed, -* the function returns 0. -* -* @note -* The function is thread-safe. -*/ +/*${QF::QTimeEvt::currCtr} .................................................*/ QTimeEvtCtr QTimeEvt_currCtr(QTimeEvt const * const me) { QF_CRIT_STAT_ QF_CRIT_E_(); @@ -560,14 +299,133 @@ QTimeEvtCtr QTimeEvt_currCtr(QTimeEvt const * const me) { return ret; } -/*============================================================================ -* NOTE1: -* In some QF ports the critical section exit takes effect only on the next -* machine instruction. If this case, the next instruction is another entry -* to a critical section, the critical section won't be really exited, but -* rather the two adjacent critical sections would be merged. -* -* The QF_CRIT_EXIT_NOP() macro contains minimal code required -* to prevent such merging of critical sections in QF ports, -* in which it can occur. -*/ +/*${QF::QTimeEvt::tick_} ...................................................*/ +void QTimeEvt_tick_( + uint_fast8_t const tickRate, + void const * const sender) +{ + Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ + + QTimeEvt *prev = &QTimeEvt_timeEvtHead_[tickRate]; + + QF_CRIT_STAT_ + QF_CRIT_E_(); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_TICK, 0U) + ++prev->ctr; + QS_TEC_PRE_(prev->ctr); /* tick ctr */ + QS_U8_PRE_(tickRate); /* tick rate */ + QS_END_NOCRIT_PRE_() + + /* scan the linked-list of time events at this rate... */ + for (;;) { + QTimeEvt *t = prev->next; /* advance down the time evt. list */ + + /* end of the list? */ + if (t == (QTimeEvt *)0) { + + /* any new time events armed since the last QTimeEvt_tick_()? */ + if (QTimeEvt_timeEvtHead_[tickRate].act != (void *)0) { + + /* sanity check */ + Q_ASSERT_CRIT_(110, prev != (QTimeEvt *)0); + prev->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act; + QTimeEvt_timeEvtHead_[tickRate].act = (void *)0; + t = prev->next; /* switch to the new list */ + } + else { + break; /* all currently armed time evts. processed */ + } + } + + /* time event scheduled for removal? */ + if (t->ctr == 0U) { + prev->next = t->next; + /* mark time event 't' as NOT linked */ + t->super.refCtr_ &= (uint8_t)(~QTE_IS_LINKED & 0xFFU); + /* do NOT advance the prev pointer */ + QF_CRIT_X_(); /* exit crit. section to reduce latency */ + + /* prevent merging critical sections, see NOTE1 below */ + QF_CRIT_EXIT_NOP(); + } + else { + --t->ctr; + + /* is time event about to expire? */ + if (t->ctr == 0U) { + /* temporary for volatile */ + QActive * const act = (QActive *)t->act; + + /* periodic time evt? */ + if (t->interval != 0U) { + t->ctr = t->interval; /* rearm the time event */ + prev = t; /* advance to this time event */ + } + /* one-shot time event: automatically disarm */ + else { + prev->next = t->next; + /* mark time event 't' as NOT linked */ + t->super.refCtr_ &= (uint8_t)(~QTE_IS_LINKED & 0xFFU); + /* do NOT advance the prev pointer */ + + QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_AUTO_DISARM, act->prio) + QS_OBJ_PRE_(t); /* this time event object */ + QS_OBJ_PRE_(act); /* the target AO */ + QS_U8_PRE_(tickRate); /* tick rate */ + QS_END_NOCRIT_PRE_() + } + + QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_POST, act->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(t); /* the time event object */ + QS_SIG_PRE_(t->super.sig); /* signal of this time event */ + QS_OBJ_PRE_(act); /* the target AO */ + QS_U8_PRE_(tickRate); /* tick rate */ + QS_END_NOCRIT_PRE_() + + QF_CRIT_X_(); /* exit critical section before posting */ + + /* QACTIVE_POST() asserts internally if the queue overflows */ + QACTIVE_POST(act, &t->super, sender); + } + else { + prev = t; /* advance to this time event */ + QF_CRIT_X_(); /* exit crit. section to reduce latency */ + + /* prevent merging critical sections + * In some QF ports the critical section exit takes effect only + * on the next machine instruction. If this case, the next + * instruction is another entry to a critical section, the + * critical section won't be really exited, but rather the + * two adjacent critical sections would be merged. The + * QF_CRIT_EXIT_NOP() macro contains minimal code required + * to prevent such merging of critical sections in QF ports, + * in which it can occur. + */ + QF_CRIT_EXIT_NOP(); + } + } + QF_CRIT_E_(); /* re-enter crit. section to continue */ + } + QF_CRIT_X_(); +} + +/*${QF::QTimeEvt::noActive} ................................................*/ +bool QTimeEvt_noActive(uint_fast8_t const tickRate) { + /*! @pre the tick rate must be in range */ + Q_REQUIRE_ID(200, tickRate < QF_MAX_TICK_RATE); + + bool inactive; + if (QTimeEvt_timeEvtHead_[tickRate].next != (QTimeEvt *)0) { + inactive = false; + } + else if ((QTimeEvt_timeEvtHead_[tickRate].act != (void *)0)) { + inactive = false; + } + else { + inactive = true; + } + return inactive; +} +/*$enddef${QF::QTimeEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qk/qk.c b/src/qk/qk.c index 97b41c15..96414c52 100644 --- a/src/qk/qk.c +++ b/src/qk/qk.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qk::qk.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qk::qk.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qk::qk.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-14 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QK preemptive kernel implementation -* @ingroup qk */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -48,177 +61,148 @@ Q_DEFINE_THIS_MODULE("qk") -/* Global-scope objects *****************************************************/ -QK_PrivAttr QK_attr_; /* private attributes of the QK kernel */ - /*==========================================================================*/ -/*! -* @description -* Initializes QF and must be called exactly once before any other QF -* function. Typically, QF_init() is called from main() even before -* initializing the Board Support Package (BSP). -* -* @note QF_init() clears the internal QF variables, so that the framework -* can start correctly even if the startup code fails to clear the -* uninitialized data (as is required by the C Standard). -*/ -void QF_init(void) { - QF_maxPool_ = 0U; - QF_subscrList_ = (QSubscrList *)0; - QF_maxPubSignal_ = 0; - - QF_bzero(&QF_timeEvtHead_[0], sizeof(QF_timeEvtHead_)); - QF_bzero(&QF_active_[0], sizeof(QF_active_)); - QF_bzero(&QK_attr_, sizeof(QK_attr_)); - - QK_attr_.actPrio = 0U; /* priority of the QK idle loop */ - QK_attr_.lockPrio = QF_MAX_ACTIVE; /* scheduler locked */ - -#ifdef QK_INIT - QK_INIT(); /* port-specific initialization of the QK kernel */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -} +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*==========================================================================*/ -/*! -* @description -* This function stops the QF application. After calling this function, -* QF attempts to gracefully stop the application. This graceful shutdown -* might take some time to complete. The typical use of this function is -* for terminating the QF application to return back to the operating -* system or for handling fatal errors that require shutting down -* (and possibly re-setting) the system. -* -* @attention -* After calling QF_stop() the application must terminate and cannot -* continue. In particular, QF_stop() is **not** intended to be followed -* by a call to QF_init() to "resurrect" the application. -* -* @sa QF_onCleanup() -*/ -void QF_stop(void) { - QF_onCleanup(); /* application-specific cleanup callback */ - /* nothing else to do for the preemptive QK kernel */ -} +/*$define${QK::QK-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! process all events posted during initialization */ -static void initial_events(void); /* prototype */ -static void initial_events(void) { - QK_attr_.lockPrio = 0U; /* scheduler unlocked */ +/*${QK::QK-base::attr_} ....................................................*/ +QK QK_attr_; - /* any active objects need to be scheduled before starting event loop? */ - if (QK_sched_() != 0U) { - QK_activate_(); /* activate AOs to process all events posted so far */ +/*${QK::QK-base::activate_} ................................................*/ +void QK_activate_(void) { + uint_fast8_t const pin = (uint_fast8_t)QK_attr_.actPrio; /* save */ + uint_fast8_t p = (uint_fast8_t)QK_attr_.nextPrio; /* next prio to run */ + #if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) + uint_fast8_t pprev; + #endif /* QK_ON_CONTEXT_SW || Q_SPY */ + + /* QK_attr_.actPrio and QK_attr_.nextPrio must be in range */ + Q_REQUIRE_ID(500, (pin < QF_MAX_ACTIVE) + && (0U < p) && (p < QF_MAX_ACTIVE)); + + #if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) + pprev = pin; + #endif /* QK_ON_CONTEXT_SW || Q_SPY */ + + QK_attr_.nextPrio = 0U; /* clear for the next time */ + + /* loop until no more ready-to-run AOs of higher prio than the initial */ + QActive *a; + do { + QEvt const *e; + a = QActive_registry_[p]; /* obtain the pointer to the AO */ + QK_attr_.actPrio = (uint8_t)p; /* this becomes the active prio */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(p, /* priority of the scheduled AO */ + pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() + + #if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) + if (p != pprev) { /* changing threads? */ + + #ifdef QK_ON_CONTEXT_SW + /* context-switch callback*/ + QK_onContextSw(((pprev != 0U) + ? QActive_registry_[pprev] + : (QActive *)0), a); + #endif /* QK_ON_CONTEXT_SW */ + + pprev = p; /* update previous priority */ + } + #endif /* QK_ON_CONTEXT_SW || Q_SPY */ + + QF_INT_ENABLE(); /* unconditionally enable interrupts */ + + /* perform the run-to-completion (RTC) step... + * 1. retrieve the event from the AO's event queue, which by this + * time must be non-empty and QActive_get_() asserts it. + * 2. dispatch the event to the AO's state machine. + * 3. determine if event is garbage and collect it if so + */ + e = QActive_get_(a); + QHSM_DISPATCH(&a->super, e, a->prio); + QF_gc(e); + + /* determine the next highest-priority AO ready to run... */ + QF_INT_DISABLE(); /* unconditionally disable interrupts */ + + if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ + QPSet_remove(&QF_readySet_, p); + } + + /* find new highest-prio AO ready to run... */ + p = QPSet_findMax(&QF_readySet_); + + /* is the new priority below the initial preemption threshold? */ + if (p <= pin) { + p = 0U; + } + else if (p <= (uint_fast8_t)QK_attr_.lockPrio) {/* below lock prio? */ + p = 0U; /* active object not eligible */ + } + else { + Q_ASSERT_ID(510, p <= QF_MAX_ACTIVE); + } + } while (p != 0U); + + QK_attr_.actPrio = (uint8_t)pin; /* restore the active priority */ + + #if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) + if (pin != 0U) { /* resuming an active object? */ + a = QActive_registry_[pin]; /* the pointer to the preempted AO */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_RESUME, a->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(pin, /* priority of the resumed AO */ + pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() } -} + else { /* resuming priority==0 --> idle */ + a = (QActive *)0; /* QK idle loop */ -/*==========================================================================*/ -/*! -* @description -* QF_run() is typically called from your startup code after you initialize -* the QF and start at least one active object with QACTIVE_START(). -* -* @returns -* In QK, the QF_run() does not return. -*/ -int_t QF_run(void) { - QF_INT_DISABLE(); - initial_events(); /* process all events posted during initialization */ - QF_onStartup(); /* application-specific startup callback */ - - /* produce the QS_QF_RUN trace record */ - QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, 0U) - QS_END_NOCRIT_PRE_() - - QF_INT_ENABLE(); - - /* the QK idle loop... */ - for (;;) { - QK_onIdle(); /* application-specific QK on-idle callback */ + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_IDLE, 0U) + QS_TIME_PRE_(); /* timestamp */ + QS_U8_PRE_(pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() } -#ifdef __GNUC__ - return 0; -#endif + + #ifdef QK_ON_CONTEXT_SW + QK_onContextSw(QActive_registry_[pprev], a); /* context-switch callback */ + #endif /* QK_ON_CONTEXT_SW */ + + #endif /* QK_ON_CONTEXT_SW || Q_SPY */ + } -/*==========================================================================*/ -/*! -* @description -* Starts execution of the AO and registers the AO with the framework. -* Also takes the top-most initial transition in the AO's state machine. -* This initial transition is taken in the callee's thread of execution. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] prio priority at which to start the active object -* @param[in] qSto pointer to the storage for the ring buffer of the -* event queue (used only with the built-in ::QEQueue) -* @param[in] qLen length of the event queue [events] -* @param[in] stkSto pointer to the stack storage (must be NULL in QK) -* @param[in] stkSize stack size [bytes] -* @param[in] par pointer to an extra parameter (might be NULL). -* -* @note This function should be called via the macro QACTIVE_START(). -* -* @usage -* The following example shows starting an AO when a per-task stack is needed: -* @include qf_start.c -*/ -void QActive_start_(QActive * const me, uint_fast8_t prio, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) -{ - (void)stkSize; /* unused paramteter in the QK port */ +/*${QK::QK-base::sched_} ...................................................*/ +uint_fast8_t QK_sched_(void) { + /* find the highest-prio AO with non-empty event queue */ + uint_fast8_t p = QPSet_findMax(&QF_readySet_); - /*! @pre AO cannot be started from an ISR, the priority must be in range - * and the stack storage must not be provided, because the QK kernel does - * not need per-AO stacks. - */ - Q_REQUIRE_ID(300, (!QK_ISR_CONTEXT_()) - && (0U < prio) && (prio <= QF_MAX_ACTIVE) - && (stkSto == (void *)0)); - - QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ - - me->prio = (uint8_t)prio; /* set the QF priority of the AO */ - QF_add_(me); /* make QF aware of this active object */ - - QHSM_INIT(&me->super, par, me->prio); /* top-most initial tran. */ - QS_FLUSH(); /* flush the trace buffer to the host */ - - /* See if this AO needs to be scheduled in case QK is already running */ - QF_CRIT_STAT_ - QF_CRIT_E_(); - if (QK_sched_() != 0U) { /* activation needed? */ - QK_activate_(); + /* is the highest-prio below the active priority? */ + if (p <= (uint_fast8_t)QK_attr_.actPrio) { + p = 0U; /* no activation needed */ } - QF_CRIT_X_(); + else if (p <= (uint_fast8_t)QK_attr_.lockPrio) { /* below the lock prio?*/ + p = 0U; /* no activation needed */ + } + else { + Q_ASSERT_ID(410, p <= QF_MAX_ACTIVE); + QK_attr_.nextPrio = (uint8_t)p; /* next AO to run */ + } + return p; } -/*==========================================================================*/ -/*! -* @description -* This function locks the QK scheduler to the specified ceiling. -* -* @param[in] ceiling priority ceiling to which the QK scheduler -* needs to be locked -* -* @returns -* The previous QK Scheduler lock status, which is to be used to unlock -* the scheduler by restoring its previous lock status in QK_schedUnlock(). -* -* @note -* QK_schedLock() must be always followed by the corresponding -* QK_schedUnlock(). -* -* @sa QK_schedUnlock() -* -* @usage -* The following example shows how to lock and unlock the QK scheduler: -* @include qk_lock.c -*/ -QSchedStatus QK_schedLock(uint_fast8_t ceiling) { +/*${QK::QK-base::schedLock} ................................................*/ +QSchedStatus QK_schedLock(uint_fast8_t const ceiling) { QF_CRIT_STAT_ QF_CRIT_E_(); @@ -252,23 +236,8 @@ QSchedStatus QK_schedLock(uint_fast8_t ceiling) { return stat; /* return the status to be saved in a stack variable */ } -/*==========================================================================*/ -/*! -* @description -* This function unlocks the QK scheduler to the previous status. -* -* @param[in] stat previous QK Scheduler lock status returned from -* QK_schedLock() -* @note -* QK_schedUnlock() must always follow the corresponding QK_schedLock(). -* -* @sa QK_schedLock() -* -* @usage -* The following example shows how to lock and unlock the QK scheduler: -* @include qk_lock.c -*/ -void QK_schedUnlock(QSchedStatus stat) { +/*${QK::QK-base::schedUnlock} ..............................................*/ +void QK_schedUnlock(QSchedStatus const stat) { /* has the scheduler been actually locked by the last QK_schedLock()? */ if (stat != 0xFFU) { uint_fast8_t const lockPrio = (uint_fast8_t)QK_attr_.lockPrio; @@ -301,152 +270,97 @@ void QK_schedUnlock(QSchedStatus stat) { QF_CRIT_X_(); } } +/*$enddef${QK::QK-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QK::QF-cust} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @description -* The QK scheduler finds out the priority of the highest-priority AO -* that (1) has events to process and (2) has priority that is above the -* current priority. -* -* @returns -* the 1-based priority of the the active object, or zero if no eligible -* active object is ready to run. -* -* @attention -* QK_sched_() must be always called with interrupts **disabled** and -* returns with interrupts **disabled**. -*/ -uint_fast8_t QK_sched_(void) { - /* find the highest-prio AO with non-empty event queue */ - uint_fast8_t p = QPSet_findMax(&QK_attr_.readySet); +/*${QK::QF-cust::init} .....................................................*/ +void QF_init(void) { + QF_maxPool_ = 0U; + QActive_subscrList_ = (QSubscrList *)0; + QActive_maxPubSignal_ = 0; - /* is the highest-prio below the active priority? */ - if (p <= (uint_fast8_t)QK_attr_.actPrio) { - p = 0U; /* no activation needed */ - } - else if (p <= (uint_fast8_t)QK_attr_.lockPrio) { /* below the lock prio?*/ - p = 0U; /* no activation needed */ - } - else { - Q_ASSERT_ID(410, p <= QF_MAX_ACTIVE); - QK_attr_.nextPrio = (uint8_t)p; /* next AO to run */ - } - return p; + QF_bzero(&QTimeEvt_timeEvtHead_[0], sizeof(QTimeEvt_timeEvtHead_)); + QF_bzero(&QActive_registry_[0], sizeof(QActive_registry_)); + QF_bzero(&QK_attr_, sizeof(QK_attr_)); + + QK_attr_.actPrio = 0U; /* priority of the QK idle loop */ + QK_attr_.lockPrio = QF_MAX_ACTIVE; /* scheduler locked */ + + #ifdef QK_INIT + QK_INIT(); /* port-specific initialization of the QK kernel */ + #endif } -/*==========================================================================*/ -/*! -* @description -* QK_activate_() activates ready-to run AOs that are above the initial -* active priority (QK_attr_.actPrio). -* -* @note -* The activator might enable interrupts internally, but always returns with -* interrupts **disabled**. -*/ -void QK_activate_(void) { - uint_fast8_t const pin = (uint_fast8_t)QK_attr_.actPrio; /* save */ - uint_fast8_t p = (uint_fast8_t)QK_attr_.nextPrio; /* next prio to run */ -#if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) - uint_fast8_t pprev; -#endif /* QK_ON_CONTEXT_SW || Q_SPY */ - - /* QK_attr_.actPrio and QK_attr_.nextPrio must be in range */ - Q_REQUIRE_ID(500, (pin < QF_MAX_ACTIVE) - && (0U < p) && (p < QF_MAX_ACTIVE)); - -#if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) - pprev = pin; -#endif /* QK_ON_CONTEXT_SW || Q_SPY */ - - QK_attr_.nextPrio = 0U; /* clear for the next time */ - - /* loop until no more ready-to-run AOs of higher prio than the initial */ - QActive *a; - do { - QEvt const *e; - a = QF_active_[p]; /* obtain the pointer to the AO */ - QK_attr_.actPrio = (uint8_t)p; /* this becomes the active prio */ - - QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) - QS_TIME_PRE_(); /* timestamp */ - QS_2U8_PRE_(p, /* priority of the scheduled AO */ - pprev); /* previous priority */ - QS_END_NOCRIT_PRE_() - -#if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) - if (p != pprev) { /* changing threads? */ - -#ifdef QK_ON_CONTEXT_SW - /* context-switch callback*/ - QK_onContextSw(((pprev != 0U) - ? QF_active_[pprev] - : (QActive *)0), a); -#endif /* QK_ON_CONTEXT_SW */ - - pprev = p; /* update previous priority */ - } -#endif /* QK_ON_CONTEXT_SW || Q_SPY */ - - QF_INT_ENABLE(); /* unconditionally enable interrupts */ - - /* perform the run-to-completion (RTC) step... - * 1. retrieve the event from the AO's event queue, which by this - * time must be non-empty and QActive_get_() asserts it. - * 2. dispatch the event to the AO's state machine. - * 3. determine if event is garbage and collect it if so - */ - e = QActive_get_(a); - QHSM_DISPATCH(&a->super, e, a->prio); - QF_gc(e); - - /* determine the next highest-priority AO ready to run... */ - QF_INT_DISABLE(); /* unconditionally disable interrupts */ - - if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ - QPSet_remove(&QK_attr_.readySet, p); - } - - /* find new highest-prio AO ready to run... */ - p = QPSet_findMax(&QK_attr_.readySet); - - /* is the new priority below the initial preemption threshold? */ - if (p <= pin) { - p = 0U; - } - else if (p <= (uint_fast8_t)QK_attr_.lockPrio) {/* below lock prio? */ - p = 0U; /* active object not eligible */ - } - else { - Q_ASSERT_ID(510, p <= QF_MAX_ACTIVE); - } - } while (p != 0U); - - QK_attr_.actPrio = (uint8_t)pin; /* restore the active priority */ - -#if (defined QK_ON_CONTEXT_SW) || (defined Q_SPY) - if (pin != 0U) { /* resuming an active object? */ - a = QF_active_[pin]; /* the pointer to the preempted AO */ - - QS_BEGIN_NOCRIT_PRE_(QS_SCHED_RESUME, a->prio) - QS_TIME_PRE_(); /* timestamp */ - QS_2U8_PRE_(pin, /* priority of the resumed AO */ - pprev); /* previous priority */ - QS_END_NOCRIT_PRE_() - } - else { /* resuming priority==0 --> idle */ - a = (QActive *)0; /* QK idle loop */ - - QS_BEGIN_NOCRIT_PRE_(QS_SCHED_IDLE, 0U) - QS_TIME_PRE_(); /* timestamp */ - QS_U8_PRE_(pprev); /* previous priority */ - QS_END_NOCRIT_PRE_() - } - -#ifdef QK_ON_CONTEXT_SW - QK_onContextSw(QF_active_[pprev], a); /* context-switch callback */ -#endif /* QK_ON_CONTEXT_SW */ - -#endif /* QK_ON_CONTEXT_SW || Q_SPY */ +/*${QK::QF-cust::stop} .....................................................*/ +void QF_stop(void) { + QF_onCleanup(); /* application-specific cleanup callback */ + /* nothing else to do for the cooperative QK kernel */ } + +/*${QK::QF-cust::run} ......................................................*/ +int_t QF_run(void) { + QF_INT_DISABLE(); + QK_attr_.lockPrio = 0U; /* scheduler unlocked */ + + /* any active objects need to be scheduled before starting event loop? */ + if (QK_sched_() != 0U) { + QK_activate_(); /* activate AOs to process all events posted so far */ + } + + QF_onStartup(); /* application-specific startup callback */ + + /* produce the QS_QF_RUN trace record */ + QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, 0U) + QS_END_NOCRIT_PRE_() + + QF_INT_ENABLE(); + + /* the QK idle loop... */ + for (;;) { + QK_onIdle(); /* application-specific QK on-idle callback */ + } + #ifdef __GNUC__ + return 0; + #endif +} +/*$enddef${QK::QF-cust} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QK::QActive} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QK::QActive} ...........................................................*/ + +/*${QK::QActive::start_} ...................................................*/ +void QActive_start_(QActive * const me, + uint_fast8_t const prio, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par) +{ + Q_UNUSED_PAR(stkSize); /* unused in QK */ + + /*! @pre AO cannot be started from an ISR, the priority must be in range + * and the stack storage must not be provided, because the QK kernel does + * not need per-AO stacks. + */ + Q_REQUIRE_ID(300, (!QK_ISR_CONTEXT_()) + && (0U < prio) && (prio <= QF_MAX_ACTIVE) + && (stkSto == (void *)0)); + + QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ + + me->prio = (uint8_t)prio; /* set the QF priority of the AO */ + QActive_register_(me); /* make QF aware of this active object */ + + QHSM_INIT(&me->super, par, me->prio); /* top-most initial tran. */ + QS_FLUSH(); /* flush the trace buffer to the host */ + + /* See if this AO needs to be scheduled in case QK is already running */ + QF_CRIT_STAT_ + QF_CRIT_E_(); + if (QK_sched_() != 0U) { /* activation needed? */ + QK_activate_(); + } + QF_CRIT_X_(); +} +/*$enddef${QK::QActive} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qs/qs.c b/src/qs/qs.c index 2b55e14f..633590e2 100644 --- a/src/qs/qs.c +++ b/src/qs/qs.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qs::qs.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qs::qs.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qs::qs.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QS software tracing services -* @ingroup qs */ #define QP_IMPL /* this is QP implementation */ #include "qs_port.h" /* QS port */ @@ -39,34 +52,23 @@ Q_DEFINE_THIS_MODULE("qs") /*==========================================================================*/ -QSPrivAttr QS_priv_; /* QS private attributes */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*==========================================================================*/ -/*! -* @description -* This function should be called from QS_onStartup() to provide QS with -* the data buffer. The first parameter @p sto[] is the address of the memory -* block, and the second parameter @p stoSize is the size of this block -* in bytes. Currently the size of the QS buffer cannot exceed 64KB. -* -* @note QS can work with quite small data buffers, but you will start losing -* data if the buffer is too small for the bursts of tracing activity. -* The right size of the buffer depends on the data production rate and -* the data output rate. QS offers flexible filtering to reduce the data -* production rate. -* -* @note If the data output rate cannot keep up with the production rate, -* QS will start overwriting the older data with newer data. This is -* consistent with the "last-is-best" QS policy. The record sequence counters -* and check sums on each record allow the QSPY host uitiliy to easily detect -* any data loss. -* -* @note -* This function initializes all the internal QS variables, so that the -* tracing can start correctly even if the startup code fails to clear -* any uninitialized data (as is required by the C Standard). -*/ -void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize) { +/*$define${QS::QS-tx} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QS::QS-tx::priv_} ......................................................*/ +QS_tx QS_priv_; + +/*${QS::QS-tx::initBuf} ....................................................*/ +void QS_initBuf( + uint8_t * const sto, + uint_fast16_t const stoSize) +{ /* the provided buffer must be at least 8 bytes long */ Q_REQUIRE_ID(100, stoSize > 8U); @@ -93,23 +95,61 @@ void QS_initBuf(uint8_t sto[], uint_fast16_t stoSize) { /* hold off flushing after successfull initialization (see QS_INIT()) */ } -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @description -* This function sets up the global QS filter to enable or disable the -* given QS record or a group of records @p rec. -* -* @param[in] filter the QS record number or group to enable in the filter, -* if positive or disable, if negative. The record numbers -* must be from the enumeration ::QSpyRecords. The record -* groups from enumeration ::QSpyRecordGroups. -* @note -* Filtering based on the record-type (global filter) is only the first layer -* of filtering. The second layer is based on the object-id (local filter). -* Both filter layers must be enabled for the QS record to be inserted into -* the QS buffer. -*/ +/*${QS::QS-tx::getByte} ....................................................*/ +uint16_t QS_getByte(void) { + uint16_t ret; + if (QS_priv_.used == 0U) { + ret = QS_EOD; /* set End-Of-Data */ + } + else { + uint8_t const * const buf = QS_priv_.buf; /* put in a temporary */ + QSCtr tail = QS_priv_.tail; /* put in a temporary (register) */ + ret = (uint16_t)buf[tail]; /* set the byte to return */ + ++tail; /* advance the tail */ + if (tail == QS_priv_.end) { /* tail wrap around? */ + tail = 0U; + } + QS_priv_.tail = tail; /* update the tail */ + --QS_priv_.used; /* one less byte used */ + } + return ret; /* return the byte or EOD */ +} + +/*${QS::QS-tx::getBlock} ...................................................*/ +uint8_t const * QS_getBlock(uint16_t * const pNbytes) { + QSCtr const used = QS_priv_.used; /* put in a temporary (register) */ + uint8_t const *buf; + + /* any bytes used in the ring buffer? */ + if (used != 0U) { + QSCtr tail = QS_priv_.tail; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + QSCtr n = (QSCtr)(end - tail); + if (n > used) { + n = used; + } + if (n > (QSCtr)(*pNbytes)) { + n = (QSCtr)(*pNbytes); + } + *pNbytes = (uint16_t)n; /* n-bytes available */ + buf = &QS_priv_.buf[tail]; /* the bytes are at the tail */ + + QS_priv_.used = (QSCtr)(used - n); + tail += n; + if (tail == end) { + tail = 0U; + } + QS_priv_.tail = tail; + } + + else { /* no bytes available */ + *pNbytes = 0U; /* no bytes available right now */ + buf = (uint8_t *)0; /* no bytes available right now */ + } + return buf; +} + +/*${QS::QS-tx::glbFilter_} .................................................*/ void QS_glbFilter_(int_fast16_t const filter) { bool const isRemove = (filter < 0); uint8_t const rec = isRemove ? (uint8_t)(-filter) : (uint8_t)filter; @@ -290,22 +330,7 @@ void QS_glbFilter_(int_fast16_t const filter) { } } -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @description -* This function sets up the local QS filter to enable or disable the -* given QS object-id or a group of object-ids @p qs_id. -* -* @param[in] qs_id the QS object-id or group to enable in the filter, -* if positive or disable, if negative. The qs_id numbers -* must be in the range 1..127. -* @note -* Filtering based on the object-id (local filter) is the second layer of -* filtering. The first layer is based on the QS record-type (gloabl filter). -* Both filter layers must be enabled for the QS record to be inserted into -* the QS buffer. -*/ +/*${QS::QS-tx::locFilter_} .................................................*/ void QS_locFilter_(int_fast16_t const filter) { bool const isRemove = (filter < 0); uint8_t const qs_id = isRemove ? (uint8_t)(-filter) : (uint8_t)filter; @@ -360,16 +385,8 @@ void QS_locFilter_(int_fast16_t const filter) { QS_priv_.locFilter[0] |= 0x01U; /* leave QS_ID == 0 always on */ } -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @description -* This function must be called at the beginning of each QS record. -* This function should be called indirectly through the macro QS_BEGIN_ID(), -* or QS_BEGIN_NOCRIT(), depending if it's called in a normal code or from -* a critical section. -*/ -void QS_beginRec_(uint_fast8_t rec) { +/*${QS::QS-tx::beginRec_} ..................................................*/ +void QS_beginRec_(uint_fast8_t const rec) { uint8_t const b = (uint8_t)(QS_priv_.seq + 1U); uint8_t chksum = 0U; /* reset the checksum */ uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ @@ -388,15 +405,7 @@ void QS_beginRec_(uint_fast8_t rec) { QS_priv_.chksum = chksum; /* save the checksum */ } -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @description -* This function must be called at the end of each QS record. -* This function should be called indirectly through the macro QS_END(), -* or QS_END_NOCRIT(), depending if it's called in a normal code or from -* a critical section. -*/ +/*${QS::QS-tx::endRec_} ....................................................*/ void QS_endRec_(void) { uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ QSCtr head = QS_priv_.head; @@ -426,9 +435,373 @@ void QS_endRec_(void) { } } -/*==========================================================================*/ -/*! @static @private @memberof QS */ -void QS_target_info_pre_(uint8_t isReset) { +/*${QS::QS-tx::u8_raw_} ....................................................*/ +void QS_u8_raw_(uint8_t const d) { + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + + QS_priv_.used += 1U; /* 1 byte about to be added */ + QS_INSERT_ESC_BYTE_(d) + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ +} + +/*${QS::QS-tx::2u8_raw_} ...................................................*/ +void QS_2u8_raw_( + uint8_t const d1, + uint8_t const d2) +{ + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + + QS_priv_.used += 2U; /* 2 bytes are about to be added */ + QS_INSERT_ESC_BYTE_(d1) + QS_INSERT_ESC_BYTE_(d2) + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ +} + +/*${QS::QS-tx::u16_raw_} ...................................................*/ +void QS_u16_raw_(uint16_t d) { + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + uint16_t x = d; + + QS_priv_.used += 2U; /* 2 bytes are about to be added */ + + QS_INSERT_ESC_BYTE_((uint8_t)x) + x >>= 8U; + QS_INSERT_ESC_BYTE_((uint8_t)x) + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ +} + +/*${QS::QS-tx::u32_raw_} ...................................................*/ +void QS_u32_raw_(uint32_t d) { + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + uint32_t x = d; + + QS_priv_.used += 4U; /* 4 bytes are about to be added */ + for (uint_fast8_t i = 4U; i != 0U; --i) { + QS_INSERT_ESC_BYTE_((uint8_t)x) + x >>= 8U; + } + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ +} + +/*${QS::QS-tx::obj_raw_} ...................................................*/ +void QS_obj_raw_(void const * const obj) { + #if (QS_OBJ_PTR_SIZE == 1U) + QS_u8_raw_((uint8_t)obj); + #elif (QS_OBJ_PTR_SIZE == 2U) + QS_u16_raw_((uint16_t)obj); + #elif (QS_OBJ_PTR_SIZE == 4U) + QS_u32_raw_((uint32_t)obj); + #elif (QS_OBJ_PTR_SIZE == 8U) + QS_u64_raw_((uint64_t)obj); + #else + QS_u32_raw_((uint32_t)obj); + #endif +} + +/*${QS::QS-tx::str_raw_} ...................................................*/ +void QS_str_raw_(char const * str) { + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + QSCtr used = QS_priv_.used; /* put in a temporary (register) */ + + for (char const *s = str; *s != '\0'; ++s) { + chksum += (uint8_t)*s; /* update checksum */ + QS_INSERT_BYTE_((uint8_t)*s) /* ASCII char doesn't need escaping */ + ++used; + } + QS_INSERT_BYTE_((uint8_t)'\0') /* zero-terminate the string */ + ++used; + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ + QS_priv_.used = used; /* save # of used buffer space */ +} + +/*${QS::QS-tx::u8_fmt_} ....................................................*/ +void QS_u8_fmt_( + uint8_t const format, + uint8_t const d) +{ + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + + QS_priv_.used += 2U; /* 2 bytes about to be added */ + + QS_INSERT_ESC_BYTE_(format) + QS_INSERT_ESC_BYTE_(d) + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ +} + +/*${QS::QS-tx::u16_fmt_} ...................................................*/ +void QS_u16_fmt_( + uint8_t format, + uint16_t d) +{ + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + uint8_t b = (uint8_t)d; + + QS_priv_.used += 3U; /* 3 bytes about to be added */ + + QS_INSERT_ESC_BYTE_(format) + QS_INSERT_ESC_BYTE_(b) + b = (uint8_t)(d >> 8U); + QS_INSERT_ESC_BYTE_(b) + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ +} + +/*${QS::QS-tx::u32_fmt_} ...................................................*/ +void QS_u32_fmt_( + uint8_t format, + uint32_t d) +{ + uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + uint32_t x = d; + + QS_priv_.used += 5U; /* 5 bytes about to be added */ + QS_INSERT_ESC_BYTE_(format) /* insert the format byte */ + + /* insert 4 bytes... */ + for (uint_fast8_t i = 4U; i != 0U; --i) { + QS_INSERT_ESC_BYTE_((uint8_t)x) + x >>= 8U; + } + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ +} + +/*${QS::QS-tx::str_fmt_} ...................................................*/ +void QS_str_fmt_(char const * str) { + uint8_t chksum = QS_priv_.chksum; + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + QSCtr used = QS_priv_.used; /* put in a temporary (register) */ + + used += 2U; /* account for the format byte and the terminating-0 */ + QS_INSERT_BYTE_((uint8_t)QS_STR_T) + chksum += (uint8_t)QS_STR_T; + + for (char const *s = str; *s != '\0'; ++s) { + QS_INSERT_BYTE_((uint8_t)*s) /* ASCII char doesn't need escaping */ + chksum += (uint8_t)*s; /* update checksum */ + ++used; + } + QS_INSERT_BYTE_(0U) /* zero-terminate the string */ + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ + QS_priv_.used = used; /* save # of used buffer space */ +} + +/*${QS::QS-tx::mem_fmt_} ...................................................*/ +void QS_mem_fmt_( + uint8_t const * blk, + uint8_t size) +{ + uint8_t chksum = QS_priv_.chksum; + uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ + QSCtr head = QS_priv_.head; /* put in a temporary (register) */ + QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ + uint8_t const *pb = blk; + + QS_priv_.used += ((QSCtr)size + 2U); /* size+2 bytes to be added */ + + QS_INSERT_BYTE_((uint8_t)QS_MEM_T) + chksum += (uint8_t)QS_MEM_T; + + QS_INSERT_ESC_BYTE_(size) + /* output the 'size' number of bytes */ + for (uint8_t len = size; len > 0U; --len) { + QS_INSERT_ESC_BYTE_(*pb) + ++pb; + } + + QS_priv_.head = head; /* save the head */ + QS_priv_.chksum = chksum; /* save the checksum */ +} + +/*${QS::QS-tx::sig_dict_pre_} ..............................................*/ +void QS_sig_dict_pre_( + enum_t const sig, + void const * const obj, + char const * const name) +{ + QS_CRIT_STAT_ + + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_SIG_DICT); + QS_SIG_PRE_(sig); + QS_OBJ_PRE_(obj); + QS_str_raw_((*name == '&') ? &name[1] : name); + QS_endRec_(); + QS_CRIT_X_(); + QS_onFlush(); +} + +/*${QS::QS-tx::obj_dict_pre_} ..............................................*/ +void QS_obj_dict_pre_( + void const * const obj, + char const * const name) +{ + QS_CRIT_STAT_ + + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_OBJ_DICT); + QS_OBJ_PRE_(obj); + QS_str_raw_((*name == '&') ? &name[1] : name); + QS_endRec_(); + QS_CRIT_X_(); + QS_onFlush(); +} + +/*${QS::QS-tx::obj_arr_dict_pre_} ..........................................*/ +void QS_obj_arr_dict_pre_( + void const * const obj, + uint_fast16_t const idx, + char const * const name) +{ + Q_REQUIRE_ID(400, idx < 1000U); + + /* format idx into a char buffer as "xxx\0" */ + uint8_t idx_str[4]; + uint_fast16_t tmp = idx; + uint8_t i; + idx_str[3] = 0U; /* zero-terminate */ + idx_str[2] = (uint8_t)((uint8_t)'0' + (tmp % 10U)); + tmp /= 10U; + idx_str[1] = (uint8_t)((uint8_t)'0' + (tmp % 10U)); + if (idx_str[1] == (uint8_t)'0') { + i = 2U; + } + else { + tmp /= 10U; + idx_str[0] = (uint8_t)((uint8_t)'0' + (tmp % 10U)); + if (idx_str[0] == (uint8_t)'0') { + i = 1U; + } + else { + i = 0U; + } + } + + QS_CRIT_STAT_ + uint8_t j = ((*name == '&') ? 1U : 0U); + + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_OBJ_DICT); + QS_OBJ_PRE_(obj); + for (; name[j] != '\0'; ++j) { + QS_U8_PRE_(name[j]); + if (name[j] == '[') { + ++j; + break; + } + } + for (; idx_str[i] != 0U; ++i) { + QS_U8_PRE_(idx_str[i]); + } + /* skip chars until ']' */ + for (; name[j] != '\0'; ++j) { + if (name[j] == ']') { + break; + } + } + for (; name[j] != '\0'; ++j) { + QS_U8_PRE_(name[j]); + } + QS_U8_PRE_(0U); /* zero-terminate */ + QS_endRec_(); + QS_CRIT_X_(); + QS_onFlush(); +} + +/*${QS::QS-tx::fun_dict_pre_} ..............................................*/ +void QS_fun_dict_pre_( + QSpyFunPtr fun, + char const * const name) +{ + QS_CRIT_STAT_ + + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_FUN_DICT); + QS_FUN_PRE_(fun); + QS_str_raw_((*name == '&') ? &name[1] : name); + QS_endRec_(); + QS_CRIT_X_(); + QS_onFlush(); +} + +/*${QS::QS-tx::usr_dict_pre_} ..............................................*/ +void QS_usr_dict_pre_( + enum_t const rec, + char const * const name) +{ + QS_CRIT_STAT_ + + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_USR_DICT); + QS_u8_raw_((uint8_t)rec); + QS_str_raw_(name); + QS_endRec_(); + QS_CRIT_X_(); + QS_onFlush(); +} + +/*${QS::QS-tx::ASSERTION} ..................................................*/ +void QS_ASSERTION( + char const * const module, + int_t const loc, + uint32_t const delay) +{ + QS_BEGIN_NOCRIT_PRE_(QS_ASSERT_FAIL, 0U) + QS_TIME_PRE_(); + QS_U16_PRE_(loc); + QS_STR_PRE_((module != (char *)0) ? module : "?"); + QS_END_NOCRIT_PRE_() + QS_onFlush(); + + for (uint32_t volatile delay_ctr = delay; delay_ctr > 0U; --delay_ctr) { + } + QS_onCleanup(); +} + +/*${QS::QS-tx::target_info_pre_} ...........................................*/ +void QS_target_info_pre_(uint8_t const isReset) { static uint8_t const ZERO = (uint8_t)'0'; static uint8_t const * const TIME = (uint8_t const *)&Q_BUILD_TIME[0]; static uint8_t const * const DATE = (uint8_t const *)&Q_BUILD_DATE[0]; @@ -447,17 +820,17 @@ void QS_target_info_pre_(uint8_t isReset) { /* send the object sizes... */ QS_U8_PRE_(Q_SIGNAL_SIZE | (QF_EVENT_SIZ_SIZE << 4U)); -#ifdef QF_EQUEUE_CTR_SIZE + #ifdef QF_EQUEUE_CTR_SIZE QS_U8_PRE_(QF_EQUEUE_CTR_SIZE | (QF_TIMEEVT_CTR_SIZE << 4U)); -#else + #else QS_U8_PRE_(QF_TIMEEVT_CTR_SIZE << 4U); -#endif /* QF_EQUEUE_CTR_SIZE */ + #endif /* QF_EQUEUE_CTR_SIZE */ -#ifdef QF_MPOOL_CTR_SIZE + #ifdef QF_MPOOL_CTR_SIZE QS_U8_PRE_(QF_MPOOL_SIZ_SIZE | (QF_MPOOL_CTR_SIZE << 4U)); -#else + #else QS_U8_PRE_(0U); -#endif /* QF_MPOOL_CTR_SIZE */ + #endif /* QF_MPOOL_CTR_SIZE */ QS_U8_PRE_(QS_OBJ_PTR_SIZE | (QS_FUN_PTR_SIZE << 4U)); QS_U8_PRE_(QS_TIME_SIZE); @@ -535,554 +908,4 @@ void QS_target_info_pre_(uint8_t isReset) { + (uint8_t)(DATE[10] - ZERO)); QS_endRec_(); } - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @description -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_u8_fmt_(uint8_t format, uint8_t d) { - uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - - QS_priv_.used += 2U; /* 2 bytes about to be added */ - - QS_INSERT_ESC_BYTE_(format) - QS_INSERT_ESC_BYTE_(d) - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @description -* This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_u16_fmt_(uint8_t format, uint16_t d) { - uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - uint8_t b = (uint8_t)d; - - QS_priv_.used += 3U; /* 3 bytes about to be added */ - - QS_INSERT_ESC_BYTE_(format) - QS_INSERT_ESC_BYTE_(b) - b = (uint8_t)(d >> 8U); - QS_INSERT_ESC_BYTE_(b) - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_u32_fmt_(uint8_t format, uint32_t d) { - uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - uint32_t x = d; - - QS_priv_.used += 5U; /* 5 bytes about to be added */ - QS_INSERT_ESC_BYTE_(format) /* insert the format byte */ - - /* insert 4 bytes... */ - for (uint_fast8_t i = 4U; i != 0U; --i) { - QS_INSERT_ESC_BYTE_((uint8_t)x) - x >>= 8U; - } - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ -} - -/*==========================================================================*/ -/*! output uint8_t data element without format information */ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_u8_raw_(uint8_t d) { - uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - - QS_priv_.used += 1U; /* 1 byte about to be added */ - QS_INSERT_ESC_BYTE_(d) - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_2u8_raw_(uint8_t d1, uint8_t d2) { - uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - - QS_priv_.used += 2U; /* 2 bytes are about to be added */ - QS_INSERT_ESC_BYTE_(d1) - QS_INSERT_ESC_BYTE_(d2) - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_u16_raw_(uint16_t d) { - uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - uint16_t x = d; - - QS_priv_.used += 2U; /* 2 bytes are about to be added */ - - QS_INSERT_ESC_BYTE_((uint8_t)x) - x >>= 8U; - QS_INSERT_ESC_BYTE_((uint8_t)x) - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_u32_raw_(uint32_t d) { - uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - uint32_t x = d; - - QS_priv_.used += 4U; /* 4 bytes are about to be added */ - for (uint_fast8_t i = 4U; i != 0U; --i) { - QS_INSERT_ESC_BYTE_((uint8_t)x) - x >>= 8U; - } - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_obj_raw_(void const * const obj) { -#if (QS_OBJ_PTR_SIZE == 1U) - QS_u8_raw_((uint8_t)obj); -#elif (QS_OBJ_PTR_SIZE == 2U) - QS_u16_raw_((uint16_t)obj); -#elif (QS_OBJ_PTR_SIZE == 4U) - QS_u32_raw_((uint32_t)obj); -#elif (QS_OBJ_PTR_SIZE == 8U) - QS_u64_raw_((uint64_t)obj); -#else - QS_u32_raw_((uint32_t)obj); -#endif -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_str_raw_(char const *str) { - uint8_t chksum = QS_priv_.chksum; /* put in a temporary (register) */ - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - QSCtr used = QS_priv_.used; /* put in a temporary (register) */ - - for (char const *s = str; *s != '\0'; ++s) { - chksum += (uint8_t)*s; /* update checksum */ - QS_INSERT_BYTE_((uint8_t)*s) /* ASCII char doesn't need escaping */ - ++used; - } - QS_INSERT_BYTE_((uint8_t)'\0') /* zero-terminate the string */ - ++used; - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ - QS_priv_.used = used; /* save # of used buffer space */ -} - -/*==========================================================================*/ -/*! -* @static @public @memberof QS -* @description -* This function delivers one byte at a time from the QS data buffer. -* -* @returns the byte in the least-significant 8-bits of the 16-bit return -* value if the byte is available. If no more data is available at the time, -* the function returns ::QS_EOD (End-Of-Data). -* -* @note QS_getByte() is __not__ protected with a critical section. -*/ -uint16_t QS_getByte(void) { - uint16_t ret; - if (QS_priv_.used == 0U) { - ret = QS_EOD; /* set End-Of-Data */ - } - else { - uint8_t const * const buf = QS_priv_.buf; /* put in a temporary */ - QSCtr tail = QS_priv_.tail; /* put in a temporary (register) */ - ret = (uint16_t)buf[tail]; /* set the byte to return */ - ++tail; /* advance the tail */ - if (tail == QS_priv_.end) { /* tail wrap around? */ - tail = 0U; - } - QS_priv_.tail = tail; /* update the tail */ - --QS_priv_.used; /* one less byte used */ - } - return ret; /* return the byte or EOD */ -} - -/*==========================================================================*/ -/*! -* @static @public @memberof QS -* @description -* This function delivers a contiguous block of data from the QS data buffer. -* The function returns the pointer to the beginning of the block, and writes -* the number of bytes in the block to the location pointed to by @p pNbytes. -* The parameter @p pNbytes is also used as input to provide the maximum size -* of the data block that the caller can accept. -* -* @returns if data is available, the function returns pointer to the -* contiguous block of data and sets the value pointed to by @p pNbytes -* to the # available bytes. If data is available at the time the function is -* called, the function returns NULL pointer and sets the value pointed to by -* @p pNbytes to zero. -* -* @note Only the NULL return from QS_getBlock() indicates that the QS buffer -* is empty at the time of the call. The non-NULL return often means that -* the block is at the end of the buffer and you need to call QS_getBlock() -* again to obtain the rest of the data that "wrapped around" to the -* beginning of the QS data buffer. -* -* @note QS_getBlock() is NOT protected with a critical section. -*/ -uint8_t const *QS_getBlock(uint16_t *pNbytes) { - QSCtr const used = QS_priv_.used; /* put in a temporary (register) */ - uint8_t const *buf; - - /* any bytes used in the ring buffer? */ - if (used != 0U) { - QSCtr tail = QS_priv_.tail; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - QSCtr n = (QSCtr)(end - tail); - if (n > used) { - n = used; - } - if (n > (QSCtr)(*pNbytes)) { - n = (QSCtr)(*pNbytes); - } - *pNbytes = (uint16_t)n; /* n-bytes available */ - buf = &QS_priv_.buf[tail]; /* the bytes are at the tail */ - - QS_priv_.used = (QSCtr)(used - n); - tail += n; - if (tail == end) { - tail = 0U; - } - QS_priv_.tail = tail; - } - - else { /* no bytes available */ - *pNbytes = 0U; /* no bytes available right now */ - buf = (uint8_t *)0; /* no bytes available right now */ - } - return buf; -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macro QS_SIG_DICTIONARY() -*/ -void QS_sig_dict_pre_(enum_t const sig, void const * const obj, - char const *name) -{ - QS_CRIT_STAT_ - - QS_CRIT_E_(); - QS_beginRec_((uint_fast8_t)QS_SIG_DICT); - QS_SIG_PRE_(sig); - QS_OBJ_PRE_(obj); - QS_str_raw_((*name == '&') ? &name[1] : name); - QS_endRec_(); - QS_CRIT_X_(); - QS_onFlush(); -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macro QS_OBJ_DICTIONARY() -*/ -void QS_obj_dict_pre_(void const * const obj, - char const *name) -{ - QS_CRIT_STAT_ - - QS_CRIT_E_(); - QS_beginRec_((uint_fast8_t)QS_OBJ_DICT); - QS_OBJ_PRE_(obj); - QS_str_raw_((*name == '&') ? &name[1] : name); - QS_endRec_(); - QS_CRIT_X_(); - QS_onFlush(); -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macro QS_OBJ_ARR_DICTIONARY() -*/ -void QS_obj_arr_dict_pre_(void const * const obj, - uint_fast16_t idx, - char const *name) -{ - Q_REQUIRE_ID(400, idx < 1000U); - - /* format idx into a char buffer as "xxx\0" */ - uint8_t idx_str[4]; - uint_fast16_t tmp = idx; - uint8_t i; - idx_str[3] = 0U; /* zero-terminate */ - idx_str[2] = (uint8_t)((uint8_t)'0' + (tmp % 10U)); - tmp /= 10U; - idx_str[1] = (uint8_t)((uint8_t)'0' + (tmp % 10U)); - if (idx_str[1] == (uint8_t)'0') { - i = 2U; - } - else { - tmp /= 10U; - idx_str[0] = (uint8_t)((uint8_t)'0' + (tmp % 10U)); - if (idx_str[0] == (uint8_t)'0') { - i = 1U; - } - else { - i = 0U; - } - } - - QS_CRIT_STAT_ - uint8_t j = ((*name == '&') ? 1U : 0U); - - QS_CRIT_E_(); - QS_beginRec_((uint_fast8_t)QS_OBJ_DICT); - QS_OBJ_PRE_(obj); - for (; name[j] != '\0'; ++j) { - QS_U8_PRE_(name[j]); - if (name[j] == '[') { - ++j; - break; - } - } - for (; idx_str[i] != 0U; ++i) { - QS_U8_PRE_(idx_str[i]); - } - /* skip chars until ']' */ - for (; name[j] != '\0'; ++j) { - if (name[j] == ']') { - break; - } - } - for (; name[j] != '\0'; ++j) { - QS_U8_PRE_(name[j]); - } - QS_U8_PRE_(0U); /* zero-terminate */ - QS_endRec_(); - QS_CRIT_X_(); - QS_onFlush(); -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macro QS_FUN_DICTIONARY() -*/ -void QS_fun_dict_pre_(void (* const fun)(void), char const *name) { - QS_CRIT_STAT_ - - QS_CRIT_E_(); - QS_beginRec_((uint_fast8_t)QS_FUN_DICT); - QS_FUN_PRE_(fun); - QS_str_raw_((*name == '&') ? &name[1] : name); - QS_endRec_(); - QS_CRIT_X_(); - QS_onFlush(); -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macro QS_USR_DICTIONARY() -*/ -void QS_usr_dict_pre_(enum_t const rec, - char const * const name) -{ - QS_CRIT_STAT_ - - QS_CRIT_E_(); - QS_beginRec_((uint_fast8_t)QS_USR_DICT); - QS_u8_raw_((uint8_t)rec); - QS_str_raw_(name); - QS_endRec_(); - QS_CRIT_X_(); - QS_onFlush(); -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_mem_fmt_(uint8_t const *blk, uint8_t size) { - uint8_t chksum = QS_priv_.chksum; - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - uint8_t const *pb = blk; - - QS_priv_.used += ((QSCtr)size + 2U); /* size+2 bytes to be added */ - - QS_INSERT_BYTE_((uint8_t)QS_MEM_T) - chksum += (uint8_t)QS_MEM_T; - - QS_INSERT_ESC_BYTE_(size) - /* output the 'size' number of bytes */ - for (uint8_t len = size; len > 0U; --len) { - QS_INSERT_ESC_BYTE_(*pb) - ++pb; - } - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ -} - -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_str_fmt_(char const *str) { - uint8_t chksum = QS_priv_.chksum; - uint8_t * const buf = QS_priv_.buf; /* put in a temporary (register) */ - QSCtr head = QS_priv_.head; /* put in a temporary (register) */ - QSCtr const end = QS_priv_.end; /* put in a temporary (register) */ - QSCtr used = QS_priv_.used; /* put in a temporary (register) */ - - used += 2U; /* account for the format byte and the terminating-0 */ - QS_INSERT_BYTE_((uint8_t)QS_STR_T) - chksum += (uint8_t)QS_STR_T; - - for (char const *s = str; *s != '\0'; ++s) { - QS_INSERT_BYTE_((uint8_t)*s) /* ASCII char doesn't need escaping */ - chksum += (uint8_t)*s; /* update checksum */ - ++used; - } - QS_INSERT_BYTE_(0U) /* zero-terminate the string */ - - QS_priv_.head = head; /* save the head */ - QS_priv_.chksum = chksum; /* save the checksum */ - QS_priv_.used = used; /* save # of used buffer space */ -} - -/*==========================================================================*/ -/*! Output the assertion failure trace record -* @static @public @memberof QS -*/ -void QS_ASSERTION(char const * const module, - int_t const loc, - uint32_t delay) -{ - QS_BEGIN_NOCRIT_PRE_(QS_ASSERT_FAIL, 0U) - QS_TIME_PRE_(); - QS_U16_PRE_(loc); - QS_STR_PRE_((module != (char *)0) ? module : "?"); - QS_END_NOCRIT_PRE_() - QS_onFlush(); - - for (uint32_t volatile delay_ctr = delay; delay_ctr > 0U; --delay_ctr) { - } - QS_onCleanup(); -} - -/*==========================================================================*/ -/*! Output the critical section entry/exit -* @static @public @memberof QS -*/ -void QF_QS_CRIT_ENTRY(void) { - QS_BEGIN_NOCRIT_PRE_(QS_QF_CRIT_ENTRY, 0U) - QS_TIME_PRE_(); - ++QS_priv_.critNest; - QS_u8_raw_(QS_priv_.critNest); - QS_END_NOCRIT_PRE_() -} - -void QF_QS_CRIT_EXIT(void) { - QS_BEGIN_NOCRIT_PRE_(QS_QF_CRIT_EXIT, 0U) - QS_TIME_PRE_(); - QS_u8_raw_(QS_priv_.critNest); - --QS_priv_.critNest; - QS_END_NOCRIT_PRE_() -} - -/*==========================================================================*/ -/*! Output the ISR entry -* @static @public @memberof QS -*/ -void QF_QS_ISR_ENTRY(uint8_t const isrnest, uint8_t const prio) { - QS_BEGIN_NOCRIT_PRE_(QS_QF_ISR_ENTRY, 0U) - QS_TIME_PRE_(); - QS_2u8_raw_(isrnest, prio); - QS_END_NOCRIT_PRE_() -} - -/*! Output the ISR exit -* @static @public @memberof QS -*/ -void QF_QS_ISR_EXIT(uint8_t const isrnest, uint8_t const prio) { - QS_BEGIN_NOCRIT_PRE_(QS_QF_ISR_EXIT, 0U) - QS_TIME_PRE_(); - QS_2u8_raw_(isrnest, prio); - QS_END_NOCRIT_PRE_() -} +/*$enddef${QS::QS-tx} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qs/qs_64bit.c b/src/qs/qs_64bit.c index f080b5b3..85ffb1c9 100644 --- a/src/qs/qs_64bit.c +++ b/src/qs/qs_64bit.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qs::qs_64bit.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qs::qs_64bit.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,28 +32,31 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qs::qs_64bit.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-29 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QS long-long (64-bit) output -* @ingroup qs */ #define QP_IMPL /* this is QP implementation */ #include "qs_port.h" /* QS port */ +#include "qs_pkg.h" /* QS package-scope internal interface */ -#include "qs_pkg.h" +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ +/*$define${QS::QS-tx-64bit} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QS::QS-tx-64bit::u64_raw_} .............................................*/ void QS_u64_raw_(uint64_t d) { uint8_t chksum = QS_priv_.chksum; uint8_t * const buf = QS_priv_.buf; @@ -59,13 +75,11 @@ void QS_u64_raw_(uint64_t d) { QS_priv_.chksum = chksum; /* save the checksum */ } -/*==========================================================================*/ -/*! -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_u64_fmt_(uint8_t format, uint64_t d) { +/*${QS::QS-tx-64bit::u64_fmt_} .............................................*/ +void QS_u64_fmt_( + uint8_t format, + uint64_t d) +{ uint8_t chksum = QS_priv_.chksum; uint8_t * const buf = QS_priv_.buf; QSCtr head = QS_priv_.head; @@ -85,3 +99,4 @@ void QS_u64_fmt_(uint8_t format, uint64_t d) { QS_priv_.head = head; /* save the head */ QS_priv_.chksum = chksum; /* save the checksum */ } +/*$enddef${QS::QS-tx-64bit} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qs/qs_fp.c b/src/qs/qs_fp.c index 366b605d..e6ec7a9a 100644 --- a/src/qs/qs_fp.c +++ b/src/qs/qs_fp.c @@ -1,51 +1,66 @@ -/*============================================================================ +/*$file${src::qs::qs_fp.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qs::qs_fp.c} * -* Q u a n t u m L e a P s -* ------------------------ -* Modern Embedded Software +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. * -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * -* This software is dual-licensed under the terms of open-source GPL 3.0 -* (or any later version), or alternatively, under the terms of one of the -* closed-source Quantum Leaps commercial licenses. +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. * -* The terms of the open source GPL 3.0 license can be found at: -* +* The terms of the open source GNU General Public License version 3 +* can be found at: * -* The terms of the closed-source Quantum Leaps commercial licenses -* can be found at: -* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: * -* NOTE: Please do NOT plagiarize this software to sidestep the license -* obligations. This is both unfair and illegal. +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qs::qs_fp.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /** * @date Last updated on: 2021-12-23 * @version Last updated for: @ref qpc_7_0_0 * * @file * @brief QS floating point output implementation -* @ingroup qs */ #define QP_IMPL /* this is QP implementation */ #include "qs_port.h" /* QS port */ #include "qs_pkg.h" /* QS package-scope internal interface */ -/*==========================================================================*/ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/** -* @static @private @memberof QS -* @note This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_f32_fmt_(uint8_t format, float32_t f) { +/*$define${QS::QS-tx-fp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QS::QS-tx-fp::f32_fmt_} ................................................*/ +void QS_f32_fmt_( + uint8_t format, + float32_t d) +{ union F32Rep { float32_t f; uint32_t u; @@ -56,7 +71,7 @@ void QS_f32_fmt_(uint8_t format, float32_t f) { QSCtr const end = QS_priv_.end; uint_fast8_t i; - fu32.f = f; /* assign the binary representation */ + fu32.f = d; /* assign the binary representation */ QS_priv_.used += 5U; /* 5 bytes about to be added */ QS_INSERT_ESC_BYTE_(format) /* insert the format byte */ @@ -71,15 +86,11 @@ void QS_f32_fmt_(uint8_t format, float32_t f) { QS_priv_.chksum = chksum; /* save the checksum */ } -/*==========================================================================*/ - -/** -* @static @private @memberof QS -* @description -* This function is only to be used through macros, never in the -* client code directly. -*/ -void QS_f64_fmt_(uint8_t format, float64_t d) { +/*${QS::QS-tx-fp::f64_fmt_} ................................................*/ +void QS_f64_fmt_( + uint8_t format, + float64_t d) +{ union F64Rep { float64_t d; uint32_t u[2]; @@ -124,3 +135,4 @@ void QS_f64_fmt_(uint8_t format, float64_t d) { QS_priv_.head = head; /* save the head */ QS_priv_.chksum = chksum; /* save the checksum */ } +/*$enddef${QS::QS-tx-fp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qs/qs_rx.c b/src/qs/qs_rx.c index ba9bfed3..d4833e6f 100644 --- a/src/qs/qs_rx.c +++ b/src/qs/qs_rx.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qs::qs_rx.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qs::qs_rx.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qs::qs_rx.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-06-15 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QS/C receive channel services -* @ingroup qs */ #define QP_IMPL /* this is QP implementation */ #include "qs_port.h" /* QS port */ @@ -37,9 +50,6 @@ Q_DEFINE_THIS_MODULE("qs_rx") -/*==========================================================================*/ -QSrxPrivAttr QS_rxPriv_; /* QS-RX private attributes */ - /*==========================================================================*/ #if (QS_OBJ_PTR_SIZE == 1U) typedef uint8_t QSObj; @@ -52,7 +62,7 @@ QSrxPrivAttr QS_rxPriv_; /* QS-RX private attributes */ #endif /*! @cond -* Exlcude the following internals from the Doxygen documentation +* Exclude the following internals from the Doxygen documentation * Extended-state variables used for parsing various QS-RX Records */ typedef struct { @@ -105,32 +115,6 @@ typedef struct { uint8_t idx; } EvtVar; -#ifdef Q_UTEST - - #if (QS_FUN_PTR_SIZE == 1U) - typedef uint8_t QSFun; - #elif (QS_FUN_PTR_SIZE == 2U) - typedef uint16_t QSFun; - #elif (QS_FUN_PTR_SIZE == 4U) - typedef uint32_t QSFun; - #elif (QS_FUN_PTR_SIZE == 8U) - typedef uint64_t QSFun; - #endif - - typedef struct { - QSFun addr; - uint32_t data; - uint8_t idx; - } TPVar; /* Test-Probe */ - - static struct { - TPVar tpBuf[16]; /* buffer of Test-Probes received so far */ - uint8_t tpNum; /* current number of Test-Probes */ - QSTimeCtr testTime; /* test time (tick counter) */ - } l_testData; - -#endif /* Q_UTEST */ - /* extended-state variables for the current state */ static struct { union Variant { @@ -142,7 +126,7 @@ static struct { ObjVar obj; EvtVar evt; #ifdef Q_UTEST - TPVar tp; + struct QS_TProbe tp; #endif /* Q_UTEST */ } var; uint8_t state; @@ -201,7 +185,7 @@ enum { /* static helper functions... */ static void QS_rxParseData_(uint8_t b); -static void QS_rxHandleGoodFrame_(uint8_t state); +//static void QS_rxHandleGoodFrame_(uint8_t state); static void QS_rxHandleBadFrame_(uint8_t state); static void QS_rxReportAck_(int8_t recId); static void QS_rxReportError_(int8_t code); @@ -214,27 +198,23 @@ static void QS_rxPoke_(void); /*! @endcond */ /*==========================================================================*/ -/*! -* @description -* This function should be called from QS_onStartup() to provide QS-RX with -* the receive data buffer. -* -* @param[in] sto[] the address of the memory block -* @param[in] stoSize the size of this block [bytes]. The size of the -* QS RX buffer cannot exceed 64KB. -* -* @note QS-RX can work with quite small data buffers, but you will start -* losing data if the buffer is not drained fast enough in the idle task. -* -* @note If the data input rate exceeds the QS-RX processing rate, the data -* will be lost, but the QS protocol will notice that: -* (1) that the checksum in the incomplete QS records will fail; and -* (2) the sequence counter in QS records will show discontinuities. -* -* The QS-RX channel will report any data errors by sending the -* QS_RX_DATA_ERROR trace record. -*/ -void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize) { +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QS::QS-rx} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QS::QS-rx::rxPriv_} ....................................................*/ +QS_rx QS_rxPriv_; + +/*${QS::QS-rx::rxInitBuf} ..................................................*/ +void QS_rxInitBuf( + uint8_t * const sto, + uint16_t const stoSize) +{ QS_rxPriv_.buf = &sto[0]; QS_rxPriv_.end = (QSCtr)stoSize; QS_rxPriv_.head = 0U; @@ -258,38 +238,13 @@ void QS_rxInitBuf(uint8_t sto[], uint16_t stoSize) { QS_endRec_(); /* no QS_REC_DONE(), because QS is not running yet */ -#ifdef Q_UTEST - l_testData.tpNum = 0U; - l_testData.testTime = 0U; -#endif /* Q_UTEST */ + #ifdef Q_UTEST + QS_testData.tpNum = 0U; + QS_testData.testTime = 0U; + #endif /* Q_UTEST */ } -/*==========================================================================*/ -/*! put one byte into the QS RX lock-free buffer */ -bool QS_RX_PUT(uint8_t const b) { - QSCtr head = QS_rxPriv_.head + 1U; - if (head == QS_rxPriv_.end) { - head = 0U; - } - if (head != QS_rxPriv_.tail) { /* buffer NOT full? */ - QS_rxPriv_.buf[QS_rxPriv_.head] = b; - QS_rxPriv_.head = head; /* update the head to a *valid* index */ - return true; /* byte placed in the buffer */ - } - else { - return false; /* byte NOT placed in the buffer */ - } -} - -/*==========================================================================*/ -/*! -* @description -* This function is intended to be called from the ISR that reads the QS-RX -* bytes from the QSPY host application. The function returns the conservative -* number of free bytes currently available in the buffer, assuming that -* the head pointer is not being moved concurrently. The tail pointer might -* be moving, meaning that bytes can be concurrently removed from the buffer. -*/ +/*${QS::QS-rx::rxGetNfree} .................................................*/ uint16_t QS_rxGetNfree(void) { QSCtr const head = QS_rxPriv_.head; if (head == QS_rxPriv_.tail) { /* buffer empty? */ @@ -303,22 +258,16 @@ uint16_t QS_rxGetNfree(void) { } } -/*==========================================================================*/ -/*! -* @description -* This function programmatically sets the "current object" in the Target. -*/ -void QS_setCurrObj(uint8_t obj_kind, void *obj_ptr) { +/*${QS::QS-rx::setCurrObj} .................................................*/ +void QS_setCurrObj( + uint8_t obj_kind, + void * obj_ptr) +{ Q_REQUIRE_ID(100, obj_kind < Q_DIM(QS_rxPriv_.currObj)); QS_rxPriv_.currObj[obj_kind] = obj_ptr; } -/*==========================================================================*/ -/*! -* @description -* This function programmatically generates the response to the query for -* a "current object". -*/ +/*${QS::QS-rx::queryCurrObj} ...............................................*/ void QS_queryCurrObj(uint8_t obj_kind) { if (QS_rxPriv_.currObj[obj_kind] != (void *)0) { QS_CRIT_STAT_ @@ -372,7 +321,7 @@ void QS_queryCurrObj(uint8_t obj_kind) { } } -/*==========================================================================*/ +/*${QS::QS-rx::rxParse} ....................................................*/ void QS_rxParse(void) { QSCtr tail = QS_rxPriv_.tail; while (QS_rxPriv_.head != tail) { /* QS-RX buffer NOT empty? */ @@ -417,6 +366,340 @@ void QS_rxParse(void) { } } +/*${QS::QS-rx::rxHandleGoodFrame_} .........................................*/ +void QS_rxHandleGoodFrame_(uint8_t const state) { + uint8_t i; + uint8_t *ptr; + QS_CRIT_STAT_ + + switch (state) { + case WAIT4_INFO_FRAME: { + /* no need to report Ack or Done */ + QS_CRIT_E_(); + QS_target_info_pre_(0U); /* send only Target info */ + QS_CRIT_X_(); + break; + } + case WAIT4_RESET_FRAME: { + /* no need to report Ack or Done, because Target resets */ + QS_onReset(); /* reset the Target */ + break; + } + case WAIT4_CMD_PARAM1: /* intentionally fall-through */ + case WAIT4_CMD_PARAM2: /* intentionally fall-through */ + case WAIT4_CMD_PARAM3: /* intentionally fall-through */ + case WAIT4_CMD_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_COMMAND); + QS_onCommand(l_rx.var.cmd.cmdId, l_rx.var.cmd.param1, + l_rx.var.cmd.param2, l_rx.var.cmd.param3); + #ifdef Q_UTEST + QS_processTestEvts_(); /* process all events produced */ + #endif + QS_rxReportDone_((int8_t)QS_RX_COMMAND); + break; + } + case WAIT4_TICK_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TICK); + #ifdef Q_UTEST + QTimeEvt_tick1_((uint_fast8_t)l_rx.var.tick.rate, &QS_rxPriv_); + QS_processTestEvts_(); /* process all events produced */ + #else + QTimeEvt_tick_((uint_fast8_t)l_rx.var.tick.rate, &QS_rxPriv_); + #endif + QS_rxReportDone_((int8_t)QS_RX_TICK); + break; + } + case WAIT4_PEEK_FRAME: { + + /* no need to report Ack or Done */ + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_PEEK_DATA); + ptr = (uint8_t *)QS_rxPriv_.currObj[AP_OBJ]; + ptr = &ptr[l_rx.var.peek.offs]; + QS_TIME_PRE_(); /* timestamp */ + QS_U16_PRE_(l_rx.var.peek.offs); /* data offset */ + QS_U8_PRE_(l_rx.var.peek.size); /* data size */ + QS_U8_PRE_(l_rx.var.peek.num); /* number of data items */ + for (i = 0U; i < l_rx.var.peek.num; ++i) { + switch (l_rx.var.peek.size) { + case 1: + QS_U8_PRE_(ptr[i]); + break; + case 2: + QS_U16_PRE_(((uint16_t *)ptr)[i]); + break; + case 4: + QS_U32_PRE_(((uint32_t *)ptr)[i]); + break; + default: + /* intentionally empty */ + break; + } + } + QS_endRec_(); + QS_CRIT_X_(); + + QS_REC_DONE(); /* user callback (if defined) */ + break; + } + case WAIT4_POKE_DATA: { + /* received less than expected poke data items */ + QS_rxReportError_((int8_t)QS_RX_POKE); + break; + } + case WAIT4_POKE_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_POKE); + /* no need to report done */ + break; + } + case WAIT4_FILL_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_FILL); + ptr = (uint8_t *)QS_rxPriv_.currObj[AP_OBJ]; + ptr = &ptr[l_rx.var.poke.offs]; + for (i = 0U; i < l_rx.var.poke.num; ++i) { + switch (l_rx.var.poke.size) { + case 1: + ptr[i] = (uint8_t)l_rx.var.poke.data; + break; + case 2: + ((uint16_t *)ptr)[i] + = (uint16_t)l_rx.var.poke.data; + break; + case 4: + ((uint32_t *)ptr)[i] = l_rx.var.poke.data; + break; + default: + /* intentionally empty */ + break; + } + } + break; + } + case WAIT4_FILTER_FRAME: { + QS_rxReportAck_(l_rx.var.flt.recId); + + /* apply the received filters */ + if (l_rx.var.flt.recId == (int8_t)QS_RX_GLB_FILTER) { + for (i = 0U; i < Q_DIM(QS_priv_.glbFilter); ++i) { + QS_priv_.glbFilter[i] = l_rx.var.flt.data[i]; + } + /* leave the "not maskable" filters enabled, + * see qs.h, Miscellaneous QS records (not maskable) + */ + QS_priv_.glbFilter[0] |= 0x01U; + QS_priv_.glbFilter[7] |= 0xFCU; + QS_priv_.glbFilter[8] |= 0x7FU; + + /* never enable the last 3 records (0x7D, 0x7E, 0x7F) */ + QS_priv_.glbFilter[15] &= 0x1FU; + } + else if (l_rx.var.flt.recId == (int8_t)QS_RX_LOC_FILTER) { + for (i = 0U; i < Q_DIM(QS_priv_.locFilter); ++i) { + QS_priv_.locFilter[i] = l_rx.var.flt.data[i]; + } + /* leave QS_ID == 0 always on */ + QS_priv_.locFilter[0] |= 0x01U; + } + else { + QS_rxReportError_(l_rx.var.flt.recId); + } + /* no need to report Done */ + break; + } + case WAIT4_OBJ_FRAME: { + i = l_rx.var.obj.kind; + if (i < (uint8_t)MAX_OBJ) { + if (l_rx.var.obj.recId == (int8_t)QS_RX_CURR_OBJ) { + QS_rxPriv_.currObj[i] = (void *)l_rx.var.obj.addr; + QS_rxReportAck_((int8_t)QS_RX_CURR_OBJ); + } + else if (l_rx.var.obj.recId == (int8_t)QS_RX_AO_FILTER) { + if (l_rx.var.obj.addr != 0U) { + int_fast16_t const filter = + (int_fast16_t)((QActive *)l_rx.var.obj.addr)->prio; + QS_locFilter_((i == 0U) + ? filter + :-filter); + QS_rxReportAck_((int8_t)QS_RX_AO_FILTER); + } + else { + QS_rxReportError_((int8_t)QS_RX_AO_FILTER); + } + } + else { + QS_rxReportError_(l_rx.var.obj.recId); + } + } + /* both SM and AO */ + else if (i == (uint8_t)SM_AO_OBJ) { + if (l_rx.var.obj.recId == (int8_t)QS_RX_CURR_OBJ) { + QS_rxPriv_.currObj[SM_OBJ] = (void *)l_rx.var.obj.addr; + QS_rxPriv_.currObj[AO_OBJ] = (void *)l_rx.var.obj.addr; + } + QS_rxReportAck_(l_rx.var.obj.recId); + } + else { + QS_rxReportError_(l_rx.var.obj.recId); + } + break; + } + case WAIT4_QUERY_FRAME: { + QS_queryCurrObj(l_rx.var.obj.kind); + break; + } + case WAIT4_EVT_FRAME: { + /* NOTE: Ack was already reported in the WAIT4_EVT_LEN state */ + #ifdef Q_UTEST + QS_onTestEvt(l_rx.var.evt.e); /* adjust the event, if needed */ + #endif /* Q_UTEST */ + i = 0U; /* use 'i' as status, 0 == success,no-recycle */ + + if (l_rx.var.evt.prio == 0U) { /* publish */ + QActive_publish_(l_rx.var.evt.e, &QS_rxPriv_, 0U); + } + else if (l_rx.var.evt.prio < QF_MAX_ACTIVE) { + if (!QACTIVE_POST_X(QActive_registry_[l_rx.var.evt.prio], + l_rx.var.evt.e, + 0U, /* margin */ + &QS_rxPriv_)) + { + /* failed QACTIVE_POST() recycles the event */ + i = 0x80U; /* failure status, no recycle */ + } + } + else if (l_rx.var.evt.prio == 255U) { /* special prio */ + /* dispatch to the current SM object */ + if (QS_rxPriv_.currObj[SM_OBJ] != (void *)0) { + /* increment the ref-ctr to simulate the situation + * when the event is just retreived from a queue. + * This is expected for the following QF_gc() call. + */ + ++l_rx.var.evt.e->refCtr_; + + QHSM_DISPATCH((QHsm *)QS_rxPriv_.currObj[SM_OBJ], + l_rx.var.evt.e, 0U); + i = 0x01U; /* success status, recycle needed */ + } + else { + i = 0x81U; /* failure status, recycle needed */ + } + } + else if (l_rx.var.evt.prio == 254U) { /* special prio */ + /* init the current SM object" */ + if (QS_rxPriv_.currObj[SM_OBJ] != (void *)0) { + /* increment the ref-ctr to simulate the situation + * when the event is just retreived from a queue. + * This is expected for the following QF_gc() call. + */ + ++l_rx.var.evt.e->refCtr_; + + QHSM_INIT((QHsm *)QS_rxPriv_.currObj[SM_OBJ], + l_rx.var.evt.e, 0U); + i = 0x01U; /* success status, recycle needed */ + } + else { + i = 0x81U; /* failure status, recycle needed */ + } + } + else if (l_rx.var.evt.prio == 253U) { /* special prio */ + /* post to the current AO */ + if (QS_rxPriv_.currObj[AO_OBJ] != (void *)0) { + if (!QACTIVE_POST_X( + (QActive *)QS_rxPriv_.currObj[AO_OBJ], + l_rx.var.evt.e, + 0U, /* margin */ + &QS_rxPriv_)) + { + /* failed QACTIVE_POST() recycles the event */ + i = 0x80U; /* failure status, no recycle */ + } + } + else { + i = 0x81U; /* failure status, recycle needed */ + } + } + else { + i = 0x81U; /* failure status, recycle needed */ + } + + if ((i & 0x01U) != 0U) { /* recycle needed? */ + QF_gc(l_rx.var.evt.e); + } + + if ((i & 0x80U) != 0U) { /* failure? */ + QS_rxReportError_((int8_t)QS_RX_EVENT); + } + else { + #ifdef Q_UTEST + QS_processTestEvts_(); /* process all events produced */ + #endif + QS_rxReportDone_((int8_t)QS_RX_EVENT); + } + break; + } + + #ifdef Q_UTEST + case WAIT4_TEST_SETUP_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TEST_SETUP); + QS_testData.tpNum = 0U; /* clear the Test-Probes */ + QS_testData.testTime = 0U; /* clear the time tick */ + /* don't clear current objects */ + QS_onTestSetup(); /* application-specific test setup */ + /* no need to report Done */ + break; + } + case WAIT4_TEST_TEARDOWN_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TEST_TEARDOWN); + QS_onTestTeardown(); /* application-specific test teardown */ + /* no need to report Done */ + break; + } + case WAIT4_TEST_CONTINUE_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TEST_CONTINUE); + QS_rxPriv_.inTestLoop = false; /* exit the QUTest loop */ + /* no need to report Done */ + break; + } + case WAIT4_TEST_PROBE_FRAME: { + QS_rxReportAck_((int8_t)QS_RX_TEST_PROBE); + Q_ASSERT_ID(815, QS_testData.tpNum + < (sizeof(QS_testData.tpBuf) / sizeof(QS_testData.tpBuf[0]))); + QS_testData.tpBuf[QS_testData.tpNum] = l_rx.var.tp; + ++QS_testData.tpNum; + /* no need to report Done */ + break; + } + #endif /* Q_UTEST */ + + case ERROR_STATE: { + /* keep ignoring all bytes until new frame */ + break; + } + default: { + QS_rxReportError_(0x47); + break; + } + } + +} + +/*${QS::QS-rx::RX_PUT} .....................................................*/ +bool QS_RX_PUT(uint8_t const b) { + QSCtr head = QS_rxPriv_.head + 1U; + if (head == QS_rxPriv_.end) { + head = 0U; + } + if (head != QS_rxPriv_.tail) { /* buffer NOT full? */ + QS_rxPriv_.buf[QS_rxPriv_.head] = b; + QS_rxPriv_.head = head; /* update the head to a *valid* index */ + return true; /* byte placed in the buffer */ + } + else { + return false; /* byte NOT placed in the buffer */ + } +} +/*$enddef${QS::QS-rx} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + /*==========================================================================*/ static void QS_rxParseData_(uint8_t b) { switch (l_rx.state) { @@ -499,9 +782,9 @@ static void QS_rxParseData_(uint8_t b) { QS_RX_TRAN_(WAIT4_TEST_CONTINUE_FRAME); break; case QS_RX_TEST_PROBE: - if (l_testData.tpNum - < (uint8_t)(sizeof(l_testData.tpBuf) - / sizeof(l_testData.tpBuf[0]))) + if (QS_testData.tpNum + < (uint8_t)(sizeof(QS_testData.tpBuf) + / sizeof(QS_testData.tpBuf[0]))) { l_rx.var.tp.data = 0U; l_rx.var.tp.idx = 0U; @@ -857,323 +1140,7 @@ static void QS_rxParseData_(uint8_t b) { } } -/*==========================================================================*/ -static void QS_rxHandleGoodFrame_(uint8_t state) { - uint8_t i; - uint8_t *ptr; - QS_CRIT_STAT_ - - switch (state) { - case WAIT4_INFO_FRAME: { - /* no need to report Ack or Done */ - QS_CRIT_E_(); - QS_target_info_pre_(0U); /* send only Target info */ - QS_CRIT_X_(); - break; - } - case WAIT4_RESET_FRAME: { - /* no need to report Ack or Done, because Target resets */ - QS_onReset(); /* reset the Target */ - break; - } - case WAIT4_CMD_PARAM1: /* intentionally fall-through */ - case WAIT4_CMD_PARAM2: /* intentionally fall-through */ - case WAIT4_CMD_PARAM3: /* intentionally fall-through */ - case WAIT4_CMD_FRAME: { - QS_rxReportAck_((int8_t)QS_RX_COMMAND); - QS_onCommand(l_rx.var.cmd.cmdId, l_rx.var.cmd.param1, - l_rx.var.cmd.param2, l_rx.var.cmd.param3); -#ifdef Q_UTEST - QS_processTestEvts_(); /* process all events produced */ -#endif - QS_rxReportDone_((int8_t)QS_RX_COMMAND); - break; - } - case WAIT4_TICK_FRAME: { - QS_rxReportAck_((int8_t)QS_RX_TICK); -#ifdef Q_UTEST - QS_tickX_((uint_fast8_t)l_rx.var.tick.rate, &QS_rxPriv_); - QS_processTestEvts_(); /* process all events produced */ -#else - QF_tickX_((uint_fast8_t)l_rx.var.tick.rate, &QS_rxPriv_); -#endif - QS_rxReportDone_((int8_t)QS_RX_TICK); - break; - } - case WAIT4_PEEK_FRAME: { - - /* no need to report Ack or Done */ - QS_CRIT_E_(); - QS_beginRec_((uint_fast8_t)QS_PEEK_DATA); - ptr = (uint8_t *)QS_rxPriv_.currObj[AP_OBJ]; - ptr = &ptr[l_rx.var.peek.offs]; - QS_TIME_PRE_(); /* timestamp */ - QS_U16_PRE_(l_rx.var.peek.offs); /* data offset */ - QS_U8_PRE_(l_rx.var.peek.size); /* data size */ - QS_U8_PRE_(l_rx.var.peek.num); /* number of data items */ - for (i = 0U; i < l_rx.var.peek.num; ++i) { - switch (l_rx.var.peek.size) { - case 1: - QS_U8_PRE_(ptr[i]); - break; - case 2: - QS_U16_PRE_(((uint16_t *)ptr)[i]); - break; - case 4: - QS_U32_PRE_(((uint32_t *)ptr)[i]); - break; - default: - /* intentionally empty */ - break; - } - } - QS_endRec_(); - QS_CRIT_X_(); - - QS_REC_DONE(); /* user callback (if defined) */ - break; - } - case WAIT4_POKE_DATA: { - /* received less than expected poke data items */ - QS_rxReportError_((int8_t)QS_RX_POKE); - break; - } - case WAIT4_POKE_FRAME: { - QS_rxReportAck_((int8_t)QS_RX_POKE); - /* no need to report done */ - break; - } - case WAIT4_FILL_FRAME: { - QS_rxReportAck_((int8_t)QS_RX_FILL); - ptr = (uint8_t *)QS_rxPriv_.currObj[AP_OBJ]; - ptr = &ptr[l_rx.var.poke.offs]; - for (i = 0U; i < l_rx.var.poke.num; ++i) { - switch (l_rx.var.poke.size) { - case 1: - ptr[i] = (uint8_t)l_rx.var.poke.data; - break; - case 2: - ((uint16_t *)ptr)[i] - = (uint16_t)l_rx.var.poke.data; - break; - case 4: - ((uint32_t *)ptr)[i] = l_rx.var.poke.data; - break; - default: - /* intentionally empty */ - break; - } - } - break; - } - case WAIT4_FILTER_FRAME: { - QS_rxReportAck_(l_rx.var.flt.recId); - - /* apply the received filters */ - if (l_rx.var.flt.recId == (int8_t)QS_RX_GLB_FILTER) { - for (i = 0U; i < Q_DIM(QS_priv_.glbFilter); ++i) { - QS_priv_.glbFilter[i] = l_rx.var.flt.data[i]; - } - /* leave the "not maskable" filters enabled, - * see qs.h, Miscellaneous QS records (not maskable) - */ - QS_priv_.glbFilter[0] |= 0x01U; - QS_priv_.glbFilter[7] |= 0xFCU; - QS_priv_.glbFilter[8] |= 0x7FU; - - /* never enable the last 3 records (0x7D, 0x7E, 0x7F) */ - QS_priv_.glbFilter[15] &= 0x1FU; - } - else if (l_rx.var.flt.recId == (int8_t)QS_RX_LOC_FILTER) { - for (i = 0U; i < Q_DIM(QS_priv_.locFilter); ++i) { - QS_priv_.locFilter[i] = l_rx.var.flt.data[i]; - } - /* leave QS_ID == 0 always on */ - QS_priv_.locFilter[0] |= 0x01U; - } - else { - QS_rxReportError_(l_rx.var.flt.recId); - } - /* no need to report Done */ - break; - } - case WAIT4_OBJ_FRAME: { - i = l_rx.var.obj.kind; - if (i < (uint8_t)MAX_OBJ) { - if (l_rx.var.obj.recId == (int8_t)QS_RX_CURR_OBJ) { - QS_rxPriv_.currObj[i] = (void *)l_rx.var.obj.addr; - QS_rxReportAck_((int8_t)QS_RX_CURR_OBJ); - } - else if (l_rx.var.obj.recId == (int8_t)QS_RX_AO_FILTER) { - if (l_rx.var.obj.addr != 0U) { - int_fast16_t const filter = - (int_fast16_t)((QActive *)l_rx.var.obj.addr)->prio; - QS_locFilter_((i == 0U) - ? filter - :-filter); - QS_rxReportAck_((int8_t)QS_RX_AO_FILTER); - } - else { - QS_rxReportError_((int8_t)QS_RX_AO_FILTER); - } - } - else { - QS_rxReportError_(l_rx.var.obj.recId); - } - } - /* both SM and AO */ - else if (i == (uint8_t)SM_AO_OBJ) { - if (l_rx.var.obj.recId == (int8_t)QS_RX_CURR_OBJ) { - QS_rxPriv_.currObj[SM_OBJ] = (void *)l_rx.var.obj.addr; - QS_rxPriv_.currObj[AO_OBJ] = (void *)l_rx.var.obj.addr; - } - QS_rxReportAck_(l_rx.var.obj.recId); - } - else { - QS_rxReportError_(l_rx.var.obj.recId); - } - break; - } - case WAIT4_QUERY_FRAME: { - QS_queryCurrObj(l_rx.var.obj.kind); - break; - } - case WAIT4_EVT_FRAME: { - /* NOTE: Ack was already reported in the WAIT4_EVT_LEN state */ -#ifdef Q_UTEST - QS_onTestEvt(l_rx.var.evt.e); /* adjust the event, if needed */ -#endif /* Q_UTEST */ - i = 0U; /* use 'i' as status, 0 == success,no-recycle */ - - if (l_rx.var.evt.prio == 0U) { /* publish */ - QF_publish_(l_rx.var.evt.e, &QS_rxPriv_, 0U); - } - else if (l_rx.var.evt.prio < QF_MAX_ACTIVE) { - if (!QACTIVE_POST_X(QF_active_[l_rx.var.evt.prio], - l_rx.var.evt.e, - 0U, /* margin */ - &QS_rxPriv_)) - { - /* failed QACTIVE_POST() recycles the event */ - i = 0x80U; /* failure status, no recycle */ - } - } - else if (l_rx.var.evt.prio == 255U) { /* special prio */ - /* dispatch to the current SM object */ - if (QS_rxPriv_.currObj[SM_OBJ] != (void *)0) { - /* increment the ref-ctr to simulate the situation - * when the event is just retreived from a queue. - * This is expected for the following QF_gc() call. - */ - ++l_rx.var.evt.e->refCtr_; - - QHSM_DISPATCH((QHsm *)QS_rxPriv_.currObj[SM_OBJ], - l_rx.var.evt.e, 0U); - i = 0x01U; /* success status, recycle needed */ - } - else { - i = 0x81U; /* failure status, recycle needed */ - } - } - else if (l_rx.var.evt.prio == 254U) { /* special prio */ - /* init the current SM object" */ - if (QS_rxPriv_.currObj[SM_OBJ] != (void *)0) { - /* increment the ref-ctr to simulate the situation - * when the event is just retreived from a queue. - * This is expected for the following QF_gc() call. - */ - ++l_rx.var.evt.e->refCtr_; - - QHSM_INIT((QHsm *)QS_rxPriv_.currObj[SM_OBJ], - l_rx.var.evt.e, 0U); - i = 0x01U; /* success status, recycle needed */ - } - else { - i = 0x81U; /* failure status, recycle needed */ - } - } - else if (l_rx.var.evt.prio == 253U) { /* special prio */ - /* post to the current AO */ - if (QS_rxPriv_.currObj[AO_OBJ] != (void *)0) { - if (!QACTIVE_POST_X( - (QActive *)QS_rxPriv_.currObj[AO_OBJ], - l_rx.var.evt.e, - 0U, /* margin */ - &QS_rxPriv_)) - { - /* failed QACTIVE_POST() recycles the event */ - i = 0x80U; /* failure status, no recycle */ - } - } - else { - i = 0x81U; /* failure status, recycle needed */ - } - } - else { - i = 0x81U; /* failure status, recycle needed */ - } - - if ((i & 0x01U) != 0U) { /* recycle needed? */ - QF_gc(l_rx.var.evt.e); - } - - if ((i & 0x80U) != 0U) { /* failure? */ - QS_rxReportError_((int8_t)QS_RX_EVENT); - } - else { -#ifdef Q_UTEST - QS_processTestEvts_(); /* process all events produced */ -#endif - QS_rxReportDone_((int8_t)QS_RX_EVENT); - } - break; - } - -#ifdef Q_UTEST - case WAIT4_TEST_SETUP_FRAME: { - QS_rxReportAck_((int8_t)QS_RX_TEST_SETUP); - l_testData.tpNum = 0U; /* clear the Test-Probes */ - l_testData.testTime = 0U; /* clear the time tick */ - /* don't clear current objects */ - QS_onTestSetup(); /* application-specific test setup */ - /* no need to report Done */ - break; - } - case WAIT4_TEST_TEARDOWN_FRAME: { - QS_rxReportAck_((int8_t)QS_RX_TEST_TEARDOWN); - QS_onTestTeardown(); /* application-specific test teardown */ - /* no need to report Done */ - break; - } - case WAIT4_TEST_CONTINUE_FRAME: { - QS_rxReportAck_((int8_t)QS_RX_TEST_CONTINUE); - QS_rxPriv_.inTestLoop = false; /* exit the QUTest loop */ - /* no need to report Done */ - break; - } - case WAIT4_TEST_PROBE_FRAME: { - QS_rxReportAck_((int8_t)QS_RX_TEST_PROBE); - Q_ASSERT_ID(815, l_testData.tpNum - < (sizeof(l_testData.tpBuf) / sizeof(l_testData.tpBuf[0]))); - l_testData.tpBuf[l_testData.tpNum] = l_rx.var.tp; - ++l_testData.tpNum; - /* no need to report Done */ - break; - } -#endif /* Q_UTEST */ - - case ERROR_STATE: { - /* keep ignoring all bytes until new frame */ - break; - } - default: { - QS_rxReportError_(0x47); - break; - } - } -} - -/*==========================================================================*/ +/*..........................................................................*/ static void QS_rxHandleBadFrame_(uint8_t state) { QS_rxReportError_(0x50); /* report error for all bad frames */ switch (state) { @@ -1189,7 +1156,7 @@ static void QS_rxHandleBadFrame_(uint8_t state) { } } -/*==========================================================================*/ +/*..........................................................................*/ static void QS_rxReportAck_(int8_t recId) { QS_CRIT_STAT_ QS_CRIT_E_(); @@ -1201,7 +1168,7 @@ static void QS_rxReportAck_(int8_t recId) { QS_REC_DONE(); /* user callback (if defined) */ } -/*==========================================================================*/ +/*..........................................................................*/ static void QS_rxReportError_(int8_t code) { QS_CRIT_STAT_ QS_CRIT_E_(); @@ -1213,7 +1180,7 @@ static void QS_rxReportError_(int8_t code) { QS_REC_DONE(); /* user callback (if defined) */ } -/*==========================================================================*/ +/*..........................................................................*/ static void QS_rxReportDone_(int8_t recId) { QS_CRIT_STAT_ QS_CRIT_E_(); @@ -1226,7 +1193,7 @@ static void QS_rxReportDone_(int8_t recId) { QS_REC_DONE(); /* user callback (if defined) */ } -/*==========================================================================*/ +/*..........................................................................*/ static void QS_rxPoke_(void) { uint8_t *ptr = (uint8_t *)QS_rxPriv_.currObj[AP_OBJ]; ptr = &ptr[l_rx.var.poke.offs]; @@ -1249,58 +1216,3 @@ static void QS_rxPoke_(void) { l_rx.var.poke.idx = 0U; l_rx.var.poke.offs += (uint16_t)l_rx.var.poke.size; } - -/*==========================================================================*/ -#ifdef Q_UTEST - -/*==========================================================================*/ -/*! -* @description -* This function obtains the Test-Probe for a given API. -* -* @param[in] api pointer to the API function that requests its Test-Probe -* -* @returns Test-Probe data that has been received for the given API -* from the Host (running qutest). For any ginve API, the function returns -* the Test-Probe data in the same order as it was received from the Host. -* If there is no Test-Probe for a ginve API, or no more Test-Probes for -* a given API, the function returns zero. -*/ -uint32_t QS_getTestProbe_(void (* const api)(void)) { - uint32_t data = 0U; - uint_fast8_t i; - for (i = 0U; i < l_testData.tpNum; ++i) { - uint_fast8_t j; - - if (l_testData.tpBuf[i].addr == (QSFun)api) { - QS_CRIT_STAT_ - - data = l_testData.tpBuf[i].data; - - QS_CRIT_E_(); - QS_beginRec_((uint_fast8_t)QS_TEST_PROBE_GET); - QS_TIME_PRE_(); /* timestamp */ - QS_FUN_PRE_(api); /* the calling API */ - QS_U32_PRE_(data); /* the Test-Probe data */ - QS_endRec_(); - QS_CRIT_X_(); - - QS_REC_DONE(); /* user callback (if defined) */ - - --l_testData.tpNum; /* one less Test-Probe */ - /* move all remaining entries in the buffer up by one */ - for (j = i; j < l_testData.tpNum; ++j) { - l_testData.tpBuf[j] = l_testData.tpBuf[j + 1U]; - } - break; /* we are done (Test-Probe retreived) */ - } - } - return data; -} - -/*==========================================================================*/ -QSTimeCtr QS_onGetTime(void) { - return (++l_testData.testTime); -} - -#endif /* Q_UTEST */ diff --git a/src/qs/qutest.c b/src/qs/qutest.c index 186d4eb3..7b77bb0d 100644 --- a/src/qs/qutest.c +++ b/src/qs/qutest.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qs::qutest.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qs::qutest.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,16 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qs::qutest.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QF/C stub for QUTEST unit testing -* @ingroup qs */ /* only build when Q_UTEST is defined */ #ifdef Q_UTEST @@ -42,96 +55,110 @@ Q_DEFINE_THIS_MODULE("qutest") -/* Global objects ==========================================================*/ -uint8_t volatile QF_intNest; - -/* QF functions ============================================================*/ -/*! @static @public @memberof QF */ -void QF_init(void) { - /* Clear the internal QF variables, so that the framework can start - * correctly even if the startup code fails to clear the uninitialized - * data (as is required by the C Standard). - */ - QF_maxPool_ = 0U; - QF_subscrList_ = (QSubscrList *)0; - QF_maxPubSignal_ = 0; - QF_intNest = 0U; - - QF_bzero(&QF_active_[0], sizeof(QF_active_)); - QF_bzero(&QS_rxPriv_.readySet, sizeof(QS_rxPriv_.readySet)); -} -/*..........................................................................*/ -/*! @static @public @memberof QF */ -void QF_stop(void) { - QS_onReset(); -} -/*..........................................................................*/ -/*! @static @public @memberof QF */ -int_t QF_run(void) { - /* function dictionaries for the standard API */ - QS_FUN_DICTIONARY(&QActive_post_); - QS_FUN_DICTIONARY(&QActive_postLIFO_); - QS_FUN_DICTIONARY(&QS_processTestEvts_); - - /* produce the QS_QF_RUN trace record */ - QS_CRIT_STAT_ - QS_BEGIN_PRE_(QS_QF_RUN, 0U) - QS_END_PRE_() - - QS_onTestLoop(); /* run the test loop */ - QS_onCleanup(); /* application cleanup */ - return 0; /* return no error */ -} - -/*..........................................................................*/ -/*! @private @memberof QActive */ -void QActive_start_(QActive * const me, uint_fast8_t prio, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) -{ - (void)stkSto; /* unused parameter */ - (void)stkSize; /* unused parameter */ - - /* priority must be in range */ - Q_REQUIRE_ID(200, (0U < prio) && (prio <= QF_MAX_ACTIVE)); - - QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ - me->prio = (uint8_t)prio; /* set the current priority of the AO */ - - QF_add_(me); /* make QF aware of this active object */ - - QHSM_INIT(&me->super, par, me->prio); /* the top-most initial tran. */ -} - /*==========================================================================*/ -static void QHsmDummy_init_(QHsm * const me, void const * const par, - uint_fast8_t const qs_id); -static void QHsmDummy_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id); +/* QUTest unit testing harness */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*..........................................................................*/ -/*! "constructor" of QHsmDummy -* @public @memberof QHsmDummy -*/ +/*$define${QUTest} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QUTest::QS::testData} ..................................................*/ +struct QS_TestData QS_testData; + +/*${QUTest::QS::processTestEvts_} ..........................................*/ +void QS_processTestEvts_(void) { + QS_TEST_PROBE_DEF(&QS_processTestEvts_) + + /* return immediately (do nothing) for Test Probe != 0 */ + QS_TEST_PROBE(return;) + + while (QPSet_notEmpty(&QF_readySet_)) { + uint_fast8_t const p = QPSet_findMax(&QF_readySet_); + QActive * const a = QActive_registry_[p]; + + /* perform the run-to-completion (RTC) step... + * 1. retrieve the event from the AO's event queue, which by this + * time must be non-empty and The "Vanialla" kernel asserts it. + * 2. dispatch the event to the AO's state machine. + * 3. determine if event is garbage and collect it if so + */ + QEvt const * const e = QActive_get_(a); + QHSM_DISPATCH(&a->super, e, a->prio); + QF_gc(e); + + if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ + QPSet_remove(&QF_readySet_, p); + } + } +} + +/*${QUTest::QS::test_pause_} ...............................................*/ +void QS_test_pause_(void) { + QS_beginRec_((uint_fast8_t)QS_TEST_PAUSED); + QS_endRec_(); + QS_onTestLoop(); +} + +/*${QUTest::QS::getTestProbe_} .............................................*/ +uint32_t QS_getTestProbe_(QSpyFunPtr api) { + uint32_t data = 0U; + uint_fast8_t i; + for (i = 0U; i < QS_testData.tpNum; ++i) { + uint_fast8_t j; + + if (QS_testData.tpBuf[i].addr == (QSFun)api) { + QS_CRIT_STAT_ + + data = QS_testData.tpBuf[i].data; + + QS_CRIT_E_(); + QS_beginRec_((uint_fast8_t)QS_TEST_PROBE_GET); + QS_TIME_PRE_(); /* timestamp */ + QS_FUN_PRE_(api); /* the calling API */ + QS_U32_PRE_(data); /* the Test-Probe data */ + QS_endRec_(); + QS_CRIT_X_(); + + QS_REC_DONE(); /* user callback (if defined) */ + + --QS_testData.tpNum; /* one less Test-Probe */ + /* move all remaining entries in the buffer up by one */ + for (j = i; j < QS_testData.tpNum; ++j) { + QS_testData.tpBuf[j] = QS_testData.tpBuf[j + 1U]; + } + break; /* we are done (Test-Probe retreived) */ + } + } + return data; +} + +/*${QUTest::QHsmDummy} .....................................................*/ + +/*${QUTest::QHsmDummy::ctor} ...............................................*/ void QHsmDummy_ctor(QHsmDummy * const me) { static struct QHsmVtable const vtable = { /* QHsm virtual table */ &QHsmDummy_init_, &QHsmDummy_dispatch_ -#ifdef Q_SPY + #ifdef Q_SPY ,&QHsm_getStateHandler_ -#endif + #endif }; /* superclass' ctor */ QHsm_ctor(&me->super, Q_STATE_CAST(0)); me->super.vptr = &vtable; /* hook the vptr */ } -/*..........................................................................*/ -/*! @private @memberof QActiveDummy */ -static void QHsmDummy_init_(QHsm * const me, void const * const par, - uint_fast8_t const qs_id) + +/*${QUTest::QHsmDummy::init_} ..............................................*/ +void QHsmDummy_init_( + QHsm * const me, + void const * const par, + uint_fast8_t const qs_id) { - (void)par; /* unused parameter */ + Q_UNUSED_PAR(par); QS_CRIT_STAT_ QS_BEGIN_PRE_(QS_QEP_STATE_INIT, qs_id) @@ -140,10 +167,12 @@ static void QHsmDummy_init_(QHsm * const me, void const * const par, QS_FUN_PRE_(me->temp.fun); /* the target of the initial transition */ QS_END_PRE_() } -/*..........................................................................*/ -/*! @private @memberof QActiveDummy */ -static void QHsmDummy_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id) + +/*${QUTest::QHsmDummy::dispatch_} ..........................................*/ +void QHsmDummy_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id) { QS_CRIT_STAT_ QS_BEGIN_PRE_(QS_QEP_DISPATCH, qs_id) @@ -154,30 +183,16 @@ static void QHsmDummy_dispatch_(QHsm * const me, QEvt const * const e, QS_END_PRE_() } -/*==========================================================================*/ -static void QActiveDummy_init_(QHsm * const me, void const * const par, - uint_fast8_t const qs_id); -static void QActiveDummy_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id); -static bool QActiveDummy_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, void const * const sender); -static void QActiveDummy_postLIFO_(QActive * const me, QEvt const * const e); -static void QActiveDummy_start_(QActive * const me, uint_fast8_t prio, - QEvt const * * const qSto, uint_fast16_t qLen, - void *stkSto, uint_fast16_t stkSize, - void const * const par); +/*${QUTest::QActiveDummy} ..................................................*/ -/*..........................................................................*/ -/*! "constructor" of QActiveDummy -* @public @memberof QActiveDummy -*/ +/*${QUTest::QActiveDummy::ctor} ............................................*/ void QActiveDummy_ctor(QActiveDummy * const me) { static QActiveVtable const vtable = { /* QActive virtual table */ { &QActiveDummy_init_, &QActiveDummy_dispatch_ -#ifdef Q_SPY + #ifdef Q_SPY ,&QHsm_getStateHandler_ -#endif + #endif }, &QActiveDummy_start_, &QActiveDummy_post_, @@ -187,12 +202,38 @@ void QActiveDummy_ctor(QActiveDummy * const me) { QActive_ctor(&me->super, Q_STATE_CAST(0)); me->super.super.vptr = &vtable.super; /* hook the vptr */ } -/*..........................................................................*/ -/*! @private @memberof QActiveDummy */ -static void QActiveDummy_start_(QActive * const me, uint_fast8_t prio, - QEvt const * * const qSto, uint_fast16_t qLen, - void *stkSto, uint_fast16_t stkSize, - void const * const par) + +/*${QUTest::QActiveDummy::init_} ...........................................*/ +void QActiveDummy_init_( + QHsm * const me, + void const * const par, + uint_fast8_t const qs_id) +{ + (void)qs_id; /* unused parameter */ + + QHsmDummy_init_(me, par, ((QActive const *)me)->prio); +} + +/*${QUTest::QActiveDummy::dispatch_} .......................................*/ +void QActiveDummy_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id) +{ + (void)qs_id; /* unused parameter */ + + QHsmDummy_dispatch_(me, e, ((QActive const *)me)->prio); +} + +/*${QUTest::QActiveDummy::start_} ..........................................*/ +void QActiveDummy_start_( + QActive * const me, + uint_fast8_t const prio, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par) { /* No special preconditions for checking parameters to allow starting * dummy AOs the exact same way as the real counterparts. @@ -204,44 +245,19 @@ static void QActiveDummy_start_(QActive * const me, uint_fast8_t prio, me->prio = (uint8_t)prio; /* set the current priority of the AO */ - QF_add_(me); /* make QF aware of this active object */ + QActive_register_(me); /* make QF aware of this active object */ /* the top-most initial tran. (virtual) */ QHSM_INIT(&me->super, par, me->prio); //QS_FLUSH(); } -//............................................................................ -#ifdef QF_ACTIVE_STOP -/*! @public @memberof QActive */ -void QActive_stop(QActive * const me) { - QActive_unsubscribeAll(me); /* unsubscribe from all events */ - QF_remove_(me); /* remove this object from QF */ -} -#endif -/*..........................................................................*/ -/*! @private @memberof QActiveDummy */ -static void QActiveDummy_init_(QHsm * const me, void const * const par, - uint_fast8_t const qs_id) -{ - (void)qs_id; /* unused parameter */ - - QHsmDummy_init_(me, par, ((QActive const *)me)->prio); -} -/*..........................................................................*/ -/*! @private @memberof QActiveDummy */ -static void QActiveDummy_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id) -{ - (void)qs_id; /* unused parameter */ - - QHsmDummy_dispatch_(me, e, ((QActive const *)me)->prio); -} -/*..........................................................................*/ -/*! @private @memberof QActiveDummy */ -static bool QActiveDummy_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, - void const * const sender) +/*${QUTest::QActiveDummy::post_} ...........................................*/ +bool QActiveDummy_post_( + QActive * const me, + QEvt const * const e, + uint_fast16_t const margin, + void const * const sender) { QS_TEST_PROBE_DEF(&QActive_post_) @@ -291,9 +307,12 @@ static bool QActiveDummy_post_(QActive * const me, QEvt const * const e, return status; /* the event is "posted" correctly */ } -/*..........................................................................*/ -/*! @private @memberof QActiveDummy */ -static void QActiveDummy_postLIFO_(QActive * const me, QEvt const * const e) { + +/*${QUTest::QActiveDummy::postLIFO_} .......................................*/ +void QActiveDummy_postLIFO_( + QActive * const me, + QEvt const * const e) +{ QS_TEST_PROBE_DEF(&QActive_postLIFO_) /* test-probe#1 for faking queue overflow */ @@ -334,46 +353,98 @@ static void QActiveDummy_postLIFO_(QActive * const me, QEvt const * const e) { /* recycle the event immediately, because it was not really posted */ QF_gc(e); } +/*$enddef${QUTest} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*==========================================================================*/ -/*! @static @private @memberof QS */ -void QS_processTestEvts_(void) { - QS_TEST_PROBE_DEF(&QS_processTestEvts_) +/* QF/C stub for QUTest */ +/*$define${QUTest-stub} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ - /* return immediately (do nothing) for Test Probe != 0 */ - QS_TEST_PROBE(return;) +/*${QUTest-stub::QF::init} .................................................*/ +void QF_init(void) { + /* Clear the internal QF variables, so that the framework can start + * correctly even if the startup code fails to clear the uninitialized + * data (as is required by the C Standard). + */ + QF_maxPool_ = 0U; + QF_intNest_ = 0U; + QActive_subscrList_ = (QSubscrList *)0; + QActive_maxPubSignal_ = 0; - while (QPSet_notEmpty(&QS_rxPriv_.readySet)) { - uint_fast8_t const p = QPSet_findMax(&QS_rxPriv_.readySet); - QActive * const a = QF_active_[p]; - - /* perform the run-to-completion (RTC) step... - * 1. retrieve the event from the AO's event queue, which by this - * time must be non-empty and The "Vanialla" kernel asserts it. - * 2. dispatch the event to the AO's state machine. - * 3. determine if event is garbage and collect it if so - */ - QEvt const * const e = QActive_get_(a); - QHSM_DISPATCH(&a->super, e, a->prio); - QF_gc(e); - - if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ - QPSet_remove(&QS_rxPriv_.readySet, p); - } - } + QF_bzero(&QActive_registry_[0], sizeof(QActive_registry_)); + QF_bzero(&QF_readySet_, sizeof(QF_readySet_)); } -/*..........................................................................*/ -/* The testing version of system tick processing performs as follows: -* 1. If the Current Time Event (TE) Object is defined and the TE is armed, -* the TE is disarmed (if one-shot) and then posted to the recipient AO. -* 2. The linked-list of all armed Time Events is updated. -*/ -/*! @static @private @memberof QS */ -void QS_tickX_(uint_fast8_t const tickRate, void const * const sender) { + +/*${QUTest-stub::QF::stop} .................................................*/ +void QF_stop(void) { + QS_onReset(); +} + +/*${QUTest-stub::QF::run} ..................................................*/ +int_t QF_run(void) { + /* function dictionaries for the standard API */ + QS_FUN_DICTIONARY(&QActive_post_); + QS_FUN_DICTIONARY(&QActive_postLIFO_); + QS_FUN_DICTIONARY(&QS_processTestEvts_); + + /* produce the QS_QF_RUN trace record */ + QS_CRIT_STAT_ + QS_BEGIN_PRE_(QS_QF_RUN, 0U) + QS_END_PRE_() + + QS_onTestLoop(); /* run the test loop */ + QS_onCleanup(); /* application cleanup */ + return 0; /* return no error */ +} + +/*${QUTest-stub::QS::onGetTime} ............................................*/ +QSTimeCtr QS_onGetTime(void) { + return (++QS_testData.testTime); +} + +/*${QUTest-stub::QActive} ..................................................*/ + +/*${QUTest-stub::QActive::start_} ..........................................*/ +void QActive_start_(QActive * const me, + uint_fast8_t const prio, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par) +{ + (void)stkSto; /* unused parameter */ + (void)stkSize; /* unused parameter */ + + /* priority must be in range */ + Q_REQUIRE_ID(200, (0U < prio) && (prio <= QF_MAX_ACTIVE)); + + QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ + me->prio = (uint8_t)prio; /* set the current priority of the AO */ + + QActive_register_(me); /* make QF aware of this active object */ + + QHSM_INIT(&me->super, par, me->prio); /* the top-most initial tran. */ +} + +/*${QUTest-stub::QActive::stop} ............................................*/ +#ifdef QF_ACTIVE_STOP +void QActive_stop(QActive * const me) { + QActive_unsubscribeAll(me); /* unsubscribe from all events */ + QActive_unregister_(me); /* un-register this active object */ +} +#endif /* def QF_ACTIVE_STOP */ + +/*${QUTest-stub::QTimeEvt} .................................................*/ + +/*${QUTest-stub::QTimeEvt::tick1_} .........................................*/ +void QTimeEvt_tick1_( + uint_fast8_t const tickRate, + void const * const sender) +{ QF_CRIT_STAT_ QF_CRIT_E_(); - QTimeEvt *prev = &QF_timeEvtHead_[tickRate]; + QTimeEvt *prev = &QTimeEvt_timeEvtHead_[tickRate]; QS_BEGIN_NOCRIT_PRE_(QS_QF_TICK, 0U) ++prev->ctr; @@ -401,7 +472,7 @@ void QS_tickX_(uint_fast8_t const tickRate, void const * const sender) { else { /* one-shot time event: automatically disarm */ t->ctr = 0U; /* auto-disarm */ /* mark time event 't' as NOT linked */ - t->super.refCtr_ &= (uint8_t)(~(uint8_t)TE_IS_LINKED); + t->super.refCtr_ &= (uint8_t)(~(uint8_t)QTE_IS_LINKED); QS_BEGIN_NOCRIT_PRE_(QS_QF_TIMEEVT_AUTO_DISARM, act->prio) QS_OBJ_PRE_(t); /* this time event object */ @@ -432,13 +503,13 @@ void QS_tickX_(uint_fast8_t const tickRate, void const * const sender) { /* end of the list? */ if (t == (QTimeEvt *)0) { - /* any new time events armed since the last run of QF_tickX_()? */ - if (QF_timeEvtHead_[tickRate].act != (void *)0) { + /* any new time events armed since the last QTimeEvt_tick_()? */ + if (QTimeEvt_timeEvtHead_[tickRate].act != (void *)0) { /* sanity check */ Q_ASSERT_CRIT_(830, prev != (QTimeEvt *)0); - prev->next = (QTimeEvt *)QF_timeEvtHead_[tickRate].act; - QF_timeEvtHead_[tickRate].act = (void *)0; + prev->next = (QTimeEvt *)QTimeEvt_timeEvtHead_[tickRate].act; + QTimeEvt_timeEvtHead_[tickRate].act = (void *)0; t = prev->next; /* switch to the new list */ } else { @@ -450,7 +521,7 @@ void QS_tickX_(uint_fast8_t const tickRate, void const * const sender) { if (t->ctr == 0U) { prev->next = t->next; /* mark time event 't' as NOT linked */ - t->super.refCtr_ &= (uint8_t)(~(uint8_t)TE_IS_LINKED); + t->super.refCtr_ &= (uint8_t)(~(uint8_t)QTE_IS_LINKED); /* do NOT advance the prev pointer */ QF_CRIT_X_(); /* exit crit. section to reduce latency */ @@ -468,17 +539,14 @@ void QS_tickX_(uint_fast8_t const tickRate, void const * const sender) { } QF_CRIT_X_(); -} -/*..........................................................................*/ -/*! @static @private @memberof QS */ -void QS_test_pause_(void) { - QS_beginRec_((uint_fast8_t)QS_TEST_PAUSED); - QS_endRec_(); - QS_onTestLoop(); + } -/*==========================================================================*/ -Q_NORETURN Q_onAssert(char const * const module, int_t const location) { +/*${QUTest-stub::Q_onAssert} ...............................................*/ +Q_NORETURN Q_onAssert( + char const * module, + int_t location) +{ QS_BEGIN_NOCRIT_PRE_(QS_ASSERT_FAIL, 0U) QS_TIME_PRE_(); QS_U16_PRE_(location); @@ -491,5 +559,6 @@ Q_NORETURN Q_onAssert(char const * const module, int_t const location) { for (;;) { /* QS_onReset() should not return, but to ensure no-return */ } } +/*$enddef${QUTest-stub} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ #endif /* Q_UTEST */ diff --git a/src/qv/qv.c b/src/qv/qv.c index 6ab13e5b..c4d85456 100644 --- a/src/qv/qv.c +++ b/src/qv/qv.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qv::qv.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qv::qv.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,17 +32,16 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qv::qv.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @brief Cooperative QV kernel, definition of QP::QV_readySet_ and -* implementation of kernel-specific functions. -* @ingroup qv +* @brief Cooperative QV kernel, implementation of kernel-specific functions. */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ @@ -49,68 +61,44 @@ Q_DEFINE_THIS_MODULE("qv") -/* Package-scope objects ****************************************************/ -QPSet QV_readySet_; /* QV ready-set of active objects */ - /*==========================================================================*/ -/*! -* @description -* Initializes QF and must be called exactly once before any other QF -* function. Typically, QF_init() is called from main() even before -* initializing the Board Support Package (BSP). -* -* @note QF_init() clears the internal QF variables, so that the framework -* can start correctly even if the startup code fails to clear the -* uninitialized data (as is required by the C Standard). -*/ -void QF_init(void) { - QF_maxPool_ = 0U; - QF_subscrList_ = (QSubscrList *)0; - QF_maxPubSignal_ = 0; - - QF_bzero(&QF_timeEvtHead_[0], sizeof(QF_timeEvtHead_)); - QF_bzero(&QF_active_[0], sizeof(QF_active_)); - QF_bzero(&QV_readySet_, sizeof(QV_readySet_)); - -#ifdef QV_INIT - QV_INIT(); /* port-specific initialization of the QV kernel */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QV::QV-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/*$enddef${QV::QV-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QV::QF-cust} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QV::QF-cust::init} .....................................................*/ +void QF_init(void) { + QF_maxPool_ = 0U; + QActive_subscrList_ = (QSubscrList *)0; + QActive_maxPubSignal_ = 0; + + QF_bzero(&QTimeEvt_timeEvtHead_[0], sizeof(QTimeEvt_timeEvtHead_)); + QF_bzero(&QActive_registry_[0], sizeof(QActive_registry_)); + QF_bzero(&QF_readySet_, sizeof(QF_readySet_)); + + #ifdef QV_INIT + QV_INIT(); /* port-specific initialization of the QV kernel */ + #endif } -/*==========================================================================*/ -/*! -* @description -* This function stops the QF application. After calling this function, -* QF attempts to gracefully stop the application. This graceful shutdown -* might take some time to complete. The typical use of this function is -* for terminating the QF application to return back to the operating -* system or for handling fatal errors that require shutting down -* (and possibly re-setting) the system. -* -* @attention -* After calling QF_stop() the application must terminate and cannot -* continue. In particular, QF_stop() is **not** intended to be followed -* by a call to QF_init() to "resurrect" the application. -* -* @sa QF_onCleanup() -*/ +/*${QV::QF-cust::stop} .....................................................*/ void QF_stop(void) { QF_onCleanup(); /* application-specific cleanup callback */ /* nothing else to do for the cooperative QV kernel */ } -/*==========================================================================*/ -/*! -* @description -* QF_run() is typically called from main() after you initialize -* the QF and start at least one active object with QACTIVE_START(). -* -* @returns In QV, the QF_run() function does not return. -*/ +/*${QV::QF-cust::run} ......................................................*/ int_t QF_run(void) { -#ifdef Q_SPY + #ifdef Q_SPY uint_fast8_t pprev = 0U; /* previously used priority */ -#endif + #endif QF_onStartup(); /* application-specific startup callback */ @@ -123,11 +111,11 @@ int_t QF_run(void) { for (;;) { /* find the maximum priority AO ready to run */ - if (QPSet_notEmpty(&QV_readySet_)) { - uint_fast8_t const p = QPSet_findMax(&QV_readySet_); - QActive * const a = QF_active_[p]; + if (QPSet_notEmpty(&QF_readySet_)) { + uint_fast8_t const p = QPSet_findMax(&QF_readySet_); + QActive * const a = QActive_registry_[p]; -#ifdef Q_SPY + #ifdef Q_SPY QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) QS_TIME_PRE_(); /* timestamp */ QS_2U8_PRE_(p, /* priority of the scheduled AO */ @@ -135,7 +123,7 @@ int_t QF_run(void) { QS_END_NOCRIT_PRE_() pprev = p; /* update previous priority */ -#endif /* Q_SPY */ + #endif /* Q_SPY */ QF_INT_ENABLE(); @@ -152,11 +140,11 @@ int_t QF_run(void) { QF_INT_DISABLE(); if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ - QPSet_remove(&QV_readySet_, p); + QPSet_remove(&QF_readySet_, p); } } else { /* no AO ready to run --> idle */ -#ifdef Q_SPY + #ifdef Q_SPY if (pprev != 0U) { QS_BEGIN_NOCRIT_PRE_(QS_SCHED_IDLE, 0U) QS_TIME_PRE_(); /* timestamp */ @@ -165,7 +153,7 @@ int_t QF_run(void) { pprev = 0U; /* update previous priority */ } -#endif /* Q_SPY */ + #endif /* Q_SPY */ /* QV_onIdle() must be called with interrupts DISABLED because * the determination of the idle condition (no events in the @@ -179,39 +167,25 @@ int_t QF_run(void) { QF_INT_DISABLE(); } } -#ifdef __GNUC__ /* GNU compiler? */ + #ifdef __GNUC__ /* GNU compiler? */ return 0; -#endif + #endif } +/*$enddef${QV::QF-cust} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QV::QActive} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! -* @description -* Starts execution of the AO and registers the AO with the framework. -* Also takes the top-most initial transition in the AO's state machine. -* This initial transition is taken in the callee's thread of execution. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] prio priority at which to start the active object -* @param[in] qSto pointer to the storage for the ring buffer of the -* event queue (used only with the built-in ::QEQueue) -* @param[in] qLen length of the event queue [events] -* @param[in] stkSto pointer to the stack storage (must be NULL in QV) -* @param[in] stkSize stack size [bytes] -* @param[in] par pointer to an extra parameter (might be NULL). -* -* @note This function should be called via the macro QACTIVE_START(). -* -* @usage -* The following example shows starting an AO when a per-task stack is needed: -* @include qf_start.c -*/ -void QActive_start_(QActive * const me, uint_fast8_t prio, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +/*${QV::QActive} ...........................................................*/ + +/*${QV::QActive::start_} ...................................................*/ +void QActive_start_(QActive * const me, + uint_fast8_t const prio, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par) { - (void)stkSize; /* unused parameter */ + Q_UNUSED_PAR(stkSize); /*! @pre The priority must be in range and the stack storage must not * be provided, because the QV kernel does not need per-AO stacks. @@ -221,8 +195,9 @@ void QActive_start_(QActive * const me, uint_fast8_t prio, QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ me->prio = (uint8_t)prio; /* set the current priority of the AO */ - QF_add_(me); /* make QF aware of this active object */ + QActive_register_(me); /* register this active object */ QHSM_INIT(&me->super, par, me->prio); /* top-most initial tran. */ QS_FLUSH(); /* flush the trace buffer to the host */ } +/*$enddef${QV::QActive} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qxk/qxk.c b/src/qxk/qxk.c index 055c7ced..d2c1e304 100644 --- a/src/qxk/qxk.c +++ b/src/qxk/qxk.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qxk::qxk.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qxk::qxk.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,20 +32,20 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qxk::qxk.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-27 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QXK preemptive dual-mode kernel core functions -* @ingroup qxk */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ -#include "qxk_pkg.h" /* QXK package-scope internal interface */ +#include "qf_pkg.h" /* QF package-scope internal interface */ #include "qassert.h" /* QP embedded systems-friendly assertions */ #ifdef Q_SPY /* QS software tracing enabled? */ #include "qs_port.h" /* QS port */ @@ -48,313 +61,164 @@ Q_DEFINE_THIS_MODULE("qxk") -/* Global-scope objects *****************************************************/ -QXK_PrivAttr QXK_attr_; /* global private attributes of the QXK kernel */ - -/* Local-scope objects ******************************************************/ -static QActive l_idleThread; - /*==========================================================================*/ -/*! -* @description -* Initializes QF and must be called exactly once before any other QF -* function. Typically, QF_init() is called from main() even before -* initializing the Board Support Package (BSP). -* -* @note QF_init() clears the internal QF variables, so that the framework -* can start correctly even if the startup code fails to clear the -* uninitialized data (as is required by the C Standard). -*/ -void QF_init(void) { - QF_maxPool_ = 0U; - QF_subscrList_ = (QSubscrList *)0; - QF_maxPubSignal_ = 0; - - QF_bzero(&QF_timeEvtHead_[0], sizeof(QF_timeEvtHead_)); - QF_bzero(&QF_active_[0], sizeof(QF_active_)); - QF_bzero(&QXK_attr_, sizeof(QXK_attr_)); - QF_bzero(&l_idleThread, sizeof(l_idleThread)); - - /* setup the QXK scheduler as initially locked and not running */ - QXK_attr_.lockPrio = (QF_MAX_ACTIVE + 1U); - - /* setup the QXK idle loop... */ - QF_active_[0] = &l_idleThread; /* register idle thread with QF */ - QXK_attr_.idleThread = &l_idleThread; /* save the idle thread ptr */ - QXK_attr_.actPrio = l_idleThread.prio; /* set the base priority */ - -#ifdef QXK_INIT - QXK_INIT(); /* port-specific initialization of the QXK kernel */ +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -} +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*==========================================================================*/ -/*! -* @description -* This function stops the QF application. After calling this function, -* QF attempts to gracefully stop the application. This graceful shutdown -* might take some time to complete. The typical use of this function is -* for terminating the QF application to return back to the operating -* system or for handling fatal errors that require shutting down -* (and possibly re-setting) the system. -* -* @attention -* After calling QF_stop() the application must terminate and cannot -* continue. In particular, QF_stop() is **not** intended to be followed -* by a call to QF_init() to "resurrect" the application. -* -* @sa QF_onCleanup() -*/ -void QF_stop(void) { - QF_onCleanup(); /* application-specific cleanup callback */ - /* nothing else to do for the preemptive QXK kernel */ -} +/*$define${QXK::QXK-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ -/*==========================================================================*/ -/*! process all events posted during initialization */ -static void initial_events(void); /* prototype */ -static void initial_events(void) { - QXK_attr_.lockPrio = 0U; /* unlock the scheduler */ +/*${QXK::QXK-base::attr_} ..................................................*/ +QXK QXK_attr_; - /* any active objects need to be scheduled before starting event loop? */ - if (QXK_sched_() != 0U) { - QXK_activate_(); /* activate AOs to process all events posted so far*/ - } -} +/*${QXK::QXK-base::activate_} ..............................................*/ +void QXK_activate_(void) { + uint_fast8_t const pin = (uint_fast8_t)QXK_attr_.actPrio; + QActive *a = QXK_attr_.next; /* the next AO (basic-thread) to run */ -/*==========================================================================*/ -/*! -* @description -* QF_run() is typically called from main() after you initialize -* the QF and start at least one active object with QACTIVE_START(). -* -* @returns In QXK, the QF_run() function does not return. -*/ -int_t QF_run(void) { - QF_INT_DISABLE(); - initial_events(); /* process all events posted during initialization */ - QF_onStartup(); /* application-specific startup callback */ + /* QXK Context switch callback defined or QS tracing enabled? */ + #if (defined QXK_ON_CONTEXT_SW) || (defined Q_SPY) + uint_fast8_t pprev = pin; + #endif /* QXK_ON_CONTEXT_SW || Q_SPY */ - /* produce the QS_QF_RUN trace record */ - QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, 0U) - QS_END_NOCRIT_PRE_() + /*! @pre QXK_attr_.next must be valid */ + Q_REQUIRE_ID(700, (a != (QActive *)0) && (pin < QF_MAX_ACTIVE)); - QF_INT_ENABLE(); + /* dynamic priority of the next AO */ + uint_fast8_t p = (uint_fast8_t)a->dynPrio; - /* the QXK idle loop... */ - for (;;) { - QXK_onIdle(); /* application-specific QXK idle callback */ - } + /* loop until no more ready-to-run AOs of higher prio than the initial */ + do { + a = QActive_registry_[p]; /* obtain the pointer to the AO */ + QXK_attr_.actPrio = (uint8_t)p; /* this becomes the base prio */ + QXK_attr_.next = (QActive *)0; /* clear the next AO */ -#ifdef __GNUC__ - return 0; -#endif -} - -/*==========================================================================*/ -/*! -* @description -* Starts execution of the AO and registers the AO with the framework. -* Also takes the top-most initial transition in the AO's state machine. -* This initial transition is taken in the callee's thread of execution. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] prio priority at which to start the active object -* @param[in] qSto pointer to the storage for the ring buffer of the -* event queue (used only with the built-in ::QEQueue) -* @param[in] qLen length of the event queue [events] -* @param[in] stkSto pointer to the stack storage (used only when -* per-AO stack is needed) -* @param[in] stkSize stack size [bytes] -* @param[in] par pointer to an extra parameter (might be NULL). -* -* @note This function should be called via the macro QACTIVE_START(). -* -* @usage -* The following example shows starting an AO when a per-task stack is needed: -* @include qf_start.c -*/ -void QActive_start_(QActive * const me, uint_fast8_t prio, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) -{ - /*! @pre AO cannot be started: - * - from an ISR; - * - the priority must be in range; - * - the stack storage must NOT be provided (because the QK kernel does - * not need per-AO stacks). - */ - Q_REQUIRE_ID(200, (!QXK_ISR_CONTEXT_()) - && (0U < prio) && (prio <= QF_MAX_ACTIVE) - && (stkSto == (void *)0) - && (stkSize == 0U)); - - QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ - me->osObject = (void *)0; /* no private stack for AO */ - me->prio = (uint8_t)prio; /* set the current priority of the AO */ - me->dynPrio = (uint8_t)prio; /* set the dynamic priority of the AO */ - QF_add_(me); /* make QF aware of this active object */ - - QHSM_INIT(&me->super, par, me->prio); /* top-most initial tran. */ - QS_FLUSH(); /* flush the trace buffer to the host */ - - /* see if this AO needs to be scheduled in case QXK is already running */ - QF_CRIT_STAT_ - QF_CRIT_E_(); - if (QXK_sched_() != 0U) { /* activation needed? */ - QXK_activate_(); - } - QF_CRIT_X_(); -} - -/*==========================================================================*/ -/*! -* @description -* This function locks the QXK scheduler to the specified ceiling. -* -* @param[in] ceiling priority ceiling to which the QXK scheduler -* needs to be locked -* -* @returns -* The previous QXK Scheduler lock status, which is to be used to unlock -* the scheduler by restoring its previous lock status in QXK_schedUnlock(). -* -* @note -* A QXK scheduler can be locked from both basic threads (AOs) and -* extended threads and the scheduler locks can nest. -* -* @note -* QXK_schedLock() must be always followed by the corresponding -* QXK_schedUnlock(). -* -* @attention -* QXK will fire an assertion if a thread holding the lock attempts -* to block. -* -* @sa QXK_schedUnlock() -* -* @usage -* The following example shows how to lock and unlock the QXK scheduler: -* @include qxk_lock.c -*/ -QSchedStatus QXK_schedLock(uint_fast8_t ceiling) { - QF_CRIT_STAT_ - QF_CRIT_E_(); - - /*! @pre The QXK scheduler lock: - * - cannot be called from an ISR; - */ - Q_REQUIRE_ID(400, !QXK_ISR_CONTEXT_()); - - /* first store the previous lock prio if below the ceiling */ - QSchedStatus stat; - if ((uint_fast8_t)QXK_attr_.lockPrio < ceiling) { - stat = ((QSchedStatus)QXK_attr_.lockPrio << 8U); - QXK_attr_.lockPrio = (uint8_t)ceiling; - - QS_BEGIN_NOCRIT_PRE_(QS_SCHED_LOCK, 0U) - QS_TIME_PRE_(); /* timestamp */ - /* the previous lock prio & new lock prio */ - QS_2U8_PRE_(stat, QXK_attr_.lockPrio); + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) + QS_TIME_PRE_(); /* timestamp */ + /* next prio & prev prio */ + QS_2U8_PRE_(p, pprev); QS_END_NOCRIT_PRE_() - /* add the previous lock holder priority */ - stat |= (QSchedStatus)QXK_attr_.lockHolder; - QXK_attr_.lockHolder = (QXK_attr_.curr != (QActive *)0) - ? QXK_attr_.curr->prio - : 0U; - } - else { - stat = 0xFFU; - } - QF_CRIT_X_(); + #if (defined QXK_ON_CONTEXT_SW) || (defined Q_SPY) + if (p != pprev) { /* changing threads? */ - return stat; /* return the status to be saved in a stack variable */ -} + #ifdef QXK_ON_CONTEXT_SW + Q_ASSERT_ID(710, pprev < QF_MAX_ACTIVE); -/*==========================================================================*/ -/*! -* @description -* This function unlocks the QXK scheduler to the previous status. -* -* @param[in] stat previous QXK Scheduler lock status returned from -* QXK_schedLock() -* -* @note -* A QXK scheduler can be locked from both basic threads (AOs) and -* extended threads and the scheduler locks can nest. -* -* @note -* QXK_schedUnlock() must always follow the corresponding QXK_schedLock(). -* -* @sa QXK_schedLock() -* -* @usage -* The following example shows how to lock and unlock the QXK scheduler: -* @include qxk_lock.c -*/ -void QXK_schedUnlock(QSchedStatus stat) { - /* has the scheduler been actually locked by the last QXK_schedLock()? */ - if (stat != 0xFFU) { - uint_fast8_t const lockPrio = (uint_fast8_t)QXK_attr_.lockPrio; - uint_fast8_t const prevPrio = (uint_fast8_t)(stat >> 8U); - QF_CRIT_STAT_ - QF_CRIT_E_(); + /* context-switch callback */ + QXK_onContextSw(((pprev != 0U) ? QActive_registry_[pprev] + : (QActive*)0), + a); + #endif /* QXK_ON_CONTEXT_SW */ - /*! @pre The scheduler cannot be unlocked: - * - from the ISR context; and - * - the current lock priority must be greater than the previous + pprev = p; /* update previous priority */ + } + #endif /* QXK_ON_CONTEXT_SW || Q_SPY */ + + QF_INT_ENABLE(); /* unconditionally enable interrupts */ + + /* perform the run-to-completion (RTC) step... + * 1. retrieve the event from the AO's event queue, which by this + * time must be non-empty and QActive_get_() asserts it. + * 2. dispatch the event to the AO's state machine. + * 3. determine if event is garbage and collect it if so */ - Q_REQUIRE_ID(500, (!QXK_ISR_CONTEXT_()) - && (lockPrio > prevPrio)); + QEvt const * const e = QActive_get_(a); + QHSM_DISPATCH(&a->super, e, a->prio); + QF_gc(e); - QS_BEGIN_NOCRIT_PRE_(QS_SCHED_UNLOCK, 0U) - QS_TIME_PRE_(); /* timestamp */ - /* prio before unlocking & prio after unlocking */ - QS_2U8_PRE_(lockPrio, prevPrio); - QS_END_NOCRIT_PRE_() + QF_INT_DISABLE(); /* unconditionally disable interrupts */ - /* restore the previous lock priority and lock holder */ - QXK_attr_.lockPrio = (uint8_t)prevPrio; - QXK_attr_.lockHolder = (uint8_t)(stat & 0xFFU); - - /* find the highest-prio thread ready to run */ - if (QXK_sched_() != 0U) { /* priority found? */ - QXK_activate_(); /* activate any unlocked basic threads */ + if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ + QPSet_remove(&QF_readySet_, p); } - QF_CRIT_X_(); + /* find new highest-prio AO ready to run... + * NOTE: this part must match the QXK_sched_(), + * current is a basic-thread path. + */ + p = QPSet_findMax(&QF_readySet_); + + if (p <= (uint_fast8_t)QXK_attr_.lockPrio) { /* below lock prio? */ + p = (uint_fast8_t)QXK_attr_.lockHolder; /* thread holding lock */ + if (p != 0U) { + Q_ASSERT_ID(710, QPSet_hasElement(&QF_readySet_, p)); + } + } + a = QActive_registry_[p]; + + /* the AO must be registered in QF */ + Q_ASSERT_ID(720, a != (QActive *)0); + + /* is the next a basic thread? */ + if (a->osObject == (void *)0) { + if (p > pin) { + QXK_attr_.next = a; + } + else { + QXK_attr_.next = (QActive *)0; + p = 0U; /* no activation needed */ + } + } + else { /* next is the extened thread */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) + QS_TIME_PRE_(); /* timestamp */ + /* next prio & curr prio */ + QS_2U8_PRE_(p, QXK_attr_.actPrio); + QS_END_NOCRIT_PRE_() + + QXK_attr_.next = a; + p = 0U; /* no activation needed */ + QXK_CONTEXT_SWITCH_(); + } + } while (p != 0U); /* while activation needed */ + + QXK_attr_.actPrio = (uint8_t)pin; /* restore the base prio */ + + #if (defined QXK_ON_CONTEXT_SW) || (defined Q_SPY) + if (pin != 0U) { /* resuming an active object? */ + a = QActive_registry_[pin]; /* the pointer to the preempted AO */ + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_RESUME, a->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_2U8_PRE_(pin, pprev); /* resumed prio & previous prio */ + QS_END_NOCRIT_PRE_() } + else { /* resuming priority==0 --> idle */ + a = (QActive *)0; + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_IDLE, 0U) + QS_TIME_PRE_(); /* timestamp */ + QS_U8_PRE_(pprev); /* previous priority */ + QS_END_NOCRIT_PRE_() + } + + #ifdef QXK_ON_CONTEXT_SW + /* context-switch callback */ + QXK_onContextSw(QActive_registry_[pprev], a); + #endif /* QXK_ON_CONTEXT_SW */ + + #endif /* QXK_ON_CONTEXT_SW || Q_SPY */ } -/*==========================================================================*/ -/*! -* @description -* The QXK scheduler finds the priority of the highest-priority thread -* that is ready to run. -* -* @returns -* the 1-based priority of the the thread (basic or extended) run next, -* or zero if no eligible thread is found. -* -* @attention -* QXK_sched_() must be always called with interrupts **disabled** and -* returns with interrupts **disabled**. -*/ +/*${QXK::QXK-base::sched_} .................................................*/ uint_fast8_t QXK_sched_(void) { /* find the highest-prio thread ready to run */ - uint_fast8_t p = QPSet_findMax(&QXK_attr_.readySet); + uint_fast8_t p = QPSet_findMax(&QF_readySet_); if (p <= (uint_fast8_t)QXK_attr_.lockPrio) { /* below the lock prio? */ /* dynamic priority of the thread holding the lock */ - p = (uint_fast8_t)QF_active_[QXK_attr_.lockHolder]->dynPrio; + p = (uint_fast8_t)QActive_registry_[QXK_attr_.lockHolder]->dynPrio; if (p != 0U) { - Q_ASSERT_ID(610, QPSet_hasElement(&QXK_attr_.readySet, p)); + Q_ASSERT_ID(610, QPSet_hasElement(&QF_readySet_, p)); } } - QActive * const next = QF_active_[p]; + QActive * const next = QActive_registry_[p]; /* the next thread found must be registered in QF */ Q_ASSERT_ID(620, next != (QActive *)0); @@ -408,147 +272,79 @@ uint_fast8_t QXK_sched_(void) { return p; } -/*==========================================================================*/ -/*! -* @attention -* QXK_activate_() must be always called with interrupts **disabled** and -* returns with interrupts **disabled**. -* -* @note -* The activate function might enable interrupts internally, but it always -* returns with interrupts **disabled**. -*/ -void QXK_activate_(void) { - uint_fast8_t const pin = (uint_fast8_t)QXK_attr_.actPrio; - QActive *a = QXK_attr_.next; /* the next AO (basic-thread) to run */ +/*${QXK::QXK-base::schedLock} ..............................................*/ +QSchedStatus QXK_schedLock(uint_fast8_t const ceiling) { + QF_CRIT_STAT_ + QF_CRIT_E_(); - /* QXK Context switch callback defined or QS tracing enabled? */ -#if (defined QXK_ON_CONTEXT_SW) || (defined Q_SPY) - uint_fast8_t pprev = pin; -#endif /* QXK_ON_CONTEXT_SW || Q_SPY */ + /*! @pre The QXK scheduler lock: + * - cannot be called from an ISR; + */ + Q_REQUIRE_ID(400, !QXK_ISR_CONTEXT_()); - /*! @pre QXK_attr_.next must be valid */ - Q_REQUIRE_ID(700, (a != (QActive *)0) && (pin < QF_MAX_ACTIVE)); + /* first store the previous lock prio if below the ceiling */ + QSchedStatus stat; + if ((uint_fast8_t)QXK_attr_.lockPrio < ceiling) { + stat = ((QSchedStatus)QXK_attr_.lockPrio << 8U); + QXK_attr_.lockPrio = (uint8_t)ceiling; - /* dynamic priority of the next AO */ - uint_fast8_t p = (uint_fast8_t)a->dynPrio; - - /* loop until no more ready-to-run AOs of higher prio than the initial */ - do { - a = QF_active_[p]; /* obtain the pointer to the AO */ - QXK_attr_.actPrio = (uint8_t)p; /* this becomes the base prio */ - QXK_attr_.next = (QActive *)0; /* clear the next AO */ - - QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) - QS_TIME_PRE_(); /* timestamp */ - /* next prio & prev prio */ - QS_2U8_PRE_(p, pprev); + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_LOCK, 0U) + QS_TIME_PRE_(); /* timestamp */ + /* the previous lock prio & new lock prio */ + QS_2U8_PRE_(stat, QXK_attr_.lockPrio); QS_END_NOCRIT_PRE_() -#if (defined QXK_ON_CONTEXT_SW) || (defined Q_SPY) - if (p != pprev) { /* changing threads? */ - -#ifdef QXK_ON_CONTEXT_SW - Q_ASSERT_ID(710, pprev < QF_MAX_ACTIVE); - - /* context-switch callback */ - QXK_onContextSw(((pprev != 0U) ? QF_active_[pprev] : (QActive*)0), - a); -#endif /* QXK_ON_CONTEXT_SW */ - - pprev = p; /* update previous priority */ - } -#endif /* QXK_ON_CONTEXT_SW || Q_SPY */ - - QF_INT_ENABLE(); /* unconditionally enable interrupts */ - - /* perform the run-to-completion (RTC) step... - * 1. retrieve the event from the AO's event queue, which by this - * time must be non-empty and QActive_get_() asserts it. - * 2. dispatch the event to the AO's state machine. - * 3. determine if event is garbage and collect it if so - */ - QEvt const * const e = QActive_get_(a); - QHSM_DISPATCH(&a->super, e, a->prio); - QF_gc(e); - - QF_INT_DISABLE(); /* unconditionally disable interrupts */ - - if (a->eQueue.frontEvt == (QEvt *)0) { /* empty queue? */ - QPSet_remove(&QXK_attr_.readySet, p); - } - - /* find new highest-prio AO ready to run... - * NOTE: this part must match the QXK_sched_(), - * current is a basic-thread path. - */ - p = QPSet_findMax(&QXK_attr_.readySet); - - if (p <= (uint_fast8_t)QXK_attr_.lockPrio) { /* below lock prio? */ - p = (uint_fast8_t)QXK_attr_.lockHolder; /* thread holding lock */ - if (p != 0U) { - Q_ASSERT_ID(710, QPSet_hasElement(&QXK_attr_.readySet, p)); - } - } - a = QF_active_[p]; - - /* the AO must be registered in QF */ - Q_ASSERT_ID(720, a != (QActive *)0); - - /* is the next a basic thread? */ - if (a->osObject == (void *)0) { - if (p > pin) { - QXK_attr_.next = a; - } - else { - QXK_attr_.next = (QActive *)0; - p = 0U; /* no activation needed */ - } - } - else { /* next is the extened thread */ - - QS_BEGIN_NOCRIT_PRE_(QS_SCHED_NEXT, a->prio) - QS_TIME_PRE_(); /* timestamp */ - /* next prio & curr prio */ - QS_2U8_PRE_(p, QXK_attr_.actPrio); - QS_END_NOCRIT_PRE_() - - QXK_attr_.next = a; - p = 0U; /* no activation needed */ - QXK_CONTEXT_SWITCH_(); - } - } while (p != 0U); /* while activation needed */ - - QXK_attr_.actPrio = (uint8_t)pin; /* restore the base prio */ - -#if (defined QXK_ON_CONTEXT_SW) || (defined Q_SPY) - if (pin != 0U) { /* resuming an active object? */ - a = QF_active_[pin]; /* the pointer to the preempted AO */ - - QS_BEGIN_NOCRIT_PRE_(QS_SCHED_RESUME, a->prio) - QS_TIME_PRE_(); /* timestamp */ - QS_2U8_PRE_(pin, pprev); /* resumed prio & previous prio */ - QS_END_NOCRIT_PRE_() + /* add the previous lock holder priority */ + stat |= (QSchedStatus)QXK_attr_.lockHolder; + QXK_attr_.lockHolder = (QXK_attr_.curr != (QActive *)0) + ? QXK_attr_.curr->prio + : 0U; } - else { /* resuming priority==0 --> idle */ - a = (QActive *)0; - - QS_BEGIN_NOCRIT_PRE_(QS_SCHED_IDLE, 0U) - QS_TIME_PRE_(); /* timestamp */ - QS_U8_PRE_(pprev); /* previous priority */ - QS_END_NOCRIT_PRE_() + else { + stat = 0xFFU; } + QF_CRIT_X_(); -#ifdef QXK_ON_CONTEXT_SW - /* context-switch callback */ - QXK_onContextSw(QF_active_[pprev], a); -#endif /* QXK_ON_CONTEXT_SW */ - -#endif /* QXK_ON_CONTEXT_SW || Q_SPY */ + return stat; /* return the status to be saved in a stack variable */ } -/*==========================================================================*/ -struct QActive *QXK_current(void) { +/*${QXK::QXK-base::schedUnlock} ............................................*/ +void QXK_schedUnlock(QSchedStatus const stat) { + /* has the scheduler been actually locked by the last QXK_schedLock()? */ + if (stat != 0xFFU) { + uint_fast8_t const lockPrio = (uint_fast8_t)QXK_attr_.lockPrio; + uint_fast8_t const prevPrio = (uint_fast8_t)(stat >> 8U); + QF_CRIT_STAT_ + QF_CRIT_E_(); + + /*! @pre The scheduler cannot be unlocked: + * - from the ISR context; and + * - the current lock priority must be greater than the previous + */ + Q_REQUIRE_ID(500, (!QXK_ISR_CONTEXT_()) + && (lockPrio > prevPrio)); + + QS_BEGIN_NOCRIT_PRE_(QS_SCHED_UNLOCK, 0U) + QS_TIME_PRE_(); /* timestamp */ + /* prio before unlocking & prio after unlocking */ + QS_2U8_PRE_(lockPrio, prevPrio); + QS_END_NOCRIT_PRE_() + + /* restore the previous lock priority and lock holder */ + QXK_attr_.lockPrio = (uint8_t)prevPrio; + QXK_attr_.lockHolder = (uint8_t)(stat & 0xFFU); + + /* find the highest-prio thread ready to run */ + if (QXK_sched_() != 0U) { /* priority found? */ + QXK_activate_(); /* activate any unlocked basic threads */ + } + + QF_CRIT_X_(); + } +} + +/*${QXK::QXK-base::current} ................................................*/ +QActive * QXK_current(void) { /*! @pre the QXK kernel must be running */ Q_REQUIRE_ID(800, QXK_attr_.lockPrio <= QF_MAX_ACTIVE); @@ -557,7 +353,7 @@ struct QActive *QXK_current(void) { struct QActive *curr = QXK_attr_.curr; if (curr == (QActive *)0) { /* basic thread? */ - curr = QF_active_[QXK_attr_.actPrio]; + curr = QActive_registry_[QXK_attr_.actPrio]; } QF_CRIT_X_(); @@ -566,3 +362,132 @@ struct QActive *QXK_current(void) { return curr; } +/*$enddef${QXK::QXK-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QXK::QF-cust} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK::QF-cust::init} ....................................................*/ +void QF_init(void) { + QF_maxPool_ = 0U; + QActive_subscrList_ = (QSubscrList *)0; + QActive_maxPubSignal_ = 0; + + QF_bzero(&QTimeEvt_timeEvtHead_[0], sizeof(QTimeEvt_timeEvtHead_)); + QF_bzero(&QActive_registry_[0], sizeof(QActive_registry_)); + QF_bzero(&QXK_attr_, sizeof(QXK_attr_)); + QF_bzero(&QXThread_idle, sizeof(QXThread_idle)); + + /* setup the QXK scheduler as initially locked and not running */ + QXK_attr_.lockPrio = (QF_MAX_ACTIVE + 1U); + + /* setup the QXK idle thread... */ + QActive_registry_[0] = &QXThread_idle.super; /* register idle thread */ + QXK_attr_.actPrio = QXThread_idle.super.prio; /* set the base priority */ + + #ifdef QXK_INIT + QXK_INIT(); /* port-specific initialization of the QXK kernel */ + #endif +} + +/*${QXK::QF-cust::stop} ....................................................*/ +void QF_stop(void) { + QF_onCleanup(); /* application-specific cleanup callback */ + /* nothing else to do for the cooperative QXK kernel */ +} + +/*${QXK::QF-cust::run} .....................................................*/ +int_t QF_run(void) { + QF_INT_DISABLE(); + QXK_attr_.lockPrio = 0U; /* unlock the scheduler */ + + /* any active objects need to be scheduled before starting event loop? */ + if (QXK_sched_() != 0U) { + QXK_activate_(); /* activate AOs to process all events posted so far*/ + } + QF_onStartup(); /* application-specific startup callback */ + + /* produce the QS_QF_RUN trace record */ + QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, 0U) + QS_END_NOCRIT_PRE_() + + QF_INT_ENABLE(); + + /* the QXK idle loop... */ + for (;;) { + QXK_onIdle(); /* application-specific QXK idle callback */ + } + + #ifdef __GNUC__ + return 0; + #endif +} +/*$enddef${QXK::QF-cust} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*$define${QXK::QActive} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK::QActive} ..........................................................*/ + +/*${QXK::QActive::start_} ..................................................*/ +void QActive_start_(QActive * const me, + uint_fast8_t const prio, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par) +{ + /*! @pre AO cannot be started: + * - from an ISR; + * - the priority must be in range; + * - the stack storage must NOT be provided (because the QK kernel does + * not need per-AO stacks). + */ + Q_REQUIRE_ID(200, (!QXK_ISR_CONTEXT_()) + && (0U < prio) && (prio <= QF_MAX_ACTIVE) + && (stkSto == (void *)0) + && (stkSize == 0U)); + + QEQueue_init(&me->eQueue, qSto, qLen); /* initialize the built-in queue */ + me->osObject = (void *)0; /* no private stack for AO */ + me->prio = (uint8_t)prio; /* set the current priority of the AO */ + me->dynPrio = (uint8_t)prio; /* set the dynamic priority of the AO */ + QActive_register_(me); /* make QF aware of this active object */ + + QHSM_INIT(&me->super, par, me->prio); /* top-most initial tran. */ + QS_FLUSH(); /* flush the trace buffer to the host */ + + /* see if this AO needs to be scheduled in case QXK is already running */ + QF_CRIT_STAT_ + QF_CRIT_E_(); + if (QXK_sched_() != 0U) { /* activation needed? */ + QXK_activate_(); + } + QF_CRIT_X_(); +} +/*$enddef${QXK::QActive} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ +/*==========================================================================*/ +/*$define${QXK-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK-impl::QXK_threadExit_} .............................................*/ +void QXK_threadExit_(void) { + QF_CRIT_STAT_ + QF_CRIT_E_(); + + QXThread const * const thr = QXTHREAD_CAST_(QXK_attr_.curr); + + /*! @pre this function must: + * - NOT be called from an ISR; + * - be called from an extended thread; + */ + Q_REQUIRE_ID(900, (!QXK_ISR_CONTEXT_()) /* can't be in the ISR context */ + && (thr != (QXThread *)0)); /* current thread must be extended */ + /*! @pre also: the thread must NOT be holding a scheduler lock. */ + Q_REQUIRE_ID(901, QXK_attr_.lockHolder != thr->super.prio); + + uint_fast8_t const p = (uint_fast8_t)thr->super.prio; + + /* remove this thread from the QF */ + QActive_registry_[p] = (QActive *)0; + QPSet_remove(&QF_readySet_, p); + (void)QXK_sched_(); + QF_CRIT_X_(); +} +/*$enddef${QXK-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qxk/qxk_mutex.c b/src/qxk/qxk_mutex.c index ec810f69..e6336455 100644 --- a/src/qxk/qxk_mutex.c +++ b/src/qxk/qxk_mutex.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qxk::qxk_mutex.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qxk::qxk_mutex.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,22 +32,21 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qxk::qxk_mutex.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 * * @file -* @ingroup qxk * @brief QXMutex_init(), QXMutex_lock(), QXMutex_tryLock() and * QXMutex_unlock() definitions. -* @ingroup qxk */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ -#include "qxk_pkg.h" /* QXK package-scope interface */ +#include "qf_pkg.h" /* QF package-scope interface */ #include "qassert.h" /* QP embedded systems-friendly assertions */ #ifdef Q_SPY /* QS software tracing enabled? */ #include "qs_port.h" /* QS port */ @@ -51,37 +63,25 @@ Q_DEFINE_THIS_MODULE("qxk_mutex") /*==========================================================================*/ -/*! -* @description -* Initialize the QXK priority ceiling mutex. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] ceiling the ceiling-priotity of this mutex or zero -* -* @note -* `ceiling == 0` means that the priority-ceiling protocol shall __not__ -* be used by this mutex. Such mutex will __not__ change (boost) the -* priority of the holding thread. -* -* @note -* `ceiling > 0` means that the priority-ceiling protocol shall be used -* by this mutex. Such mutex __will__ boost the priority of the holding -* thread to the `ceiling` level for as long as the thread holds this mutex. -* -* @attention -* When the priority-ceiling protocol is used (`ceiling > 0`), the -* `ceiling` priority must be unused by any other thread or mutex. -* Also, the `ceiling` priority must be higher than priority of any thread -* that uses this mutex. -* -* @usage -* @include qxk_mutex.c -*/ -void QXMutex_init(QXMutex * const me, uint_fast8_t ceiling) { +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QXK::QXMutex} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK::QXMutex} ..........................................................*/ + +/*${QXK::QXMutex::init} ....................................................*/ +void QXMutex_init(QXMutex * const me, + uint_fast8_t const ceiling) +{ QF_CRIT_STAT_ QF_CRIT_E_(); - /*! @pre the celiling priority of the mutex must: + /*! @pre the ceiling priority of the mutex must: * - cannot exceed the maximum #QF_MAX_ACTIVE; * - the ceiling priority of the mutex must not be already in use; * (QF requires priority to be **unique**). @@ -89,7 +89,7 @@ void QXMutex_init(QXMutex * const me, uint_fast8_t ceiling) { Q_REQUIRE_ID(100, (ceiling <= QF_MAX_ACTIVE) && ((ceiling == 0U) - || (QF_active_[ceiling] == (QActive *)0))); + || (QActive_registry_[ceiling] == (QActive *)0))); me->ceiling = (uint8_t)ceiling; me->lockNest = 0U; @@ -98,34 +98,14 @@ void QXMutex_init(QXMutex * const me, uint_fast8_t ceiling) { if (ceiling != 0U) { /* reserve the ceiling priority level for this mutex */ - QF_active_[ceiling] = QXK_PTR_CAST_(QActive*, me); + QActive_registry_[ceiling] = QXK_PTR_CAST_(QActive*, me); } QF_CRIT_X_(); } -/*==========================================================================*/ -/*! -* @description -* Lock the QXK priority ceiling mutex ::QXMutex. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] nTicks number of clock ticks (at the associated rate) -* to wait for the semaphore. The value of -* QXTHREAD_NO_TIMEOUT indicates that no timeout will -* occur and the semaphore will wait indefinitely. -* @returns -* 'true' if the mutex has been acquired and 'false' if a timeout occured. -* -* @note -* The mutex locks are allowed to nest, meaning that the same extended thread -* can lock the same mutex multiple times (< 255). However, each call to -* QXMutex_lock() must be ballanced by the matching call to QXMutex_unlock(). -* -* @usage -* @include qxk_mutex.c -*/ +/*${QXK::QXMutex::lock} ....................................................*/ bool QXMutex_lock(QXMutex * const me, - uint_fast16_t const nTicks) + uint_fast16_t const nTicks) { QF_CRIT_STAT_ QF_CRIT_E_(); @@ -156,16 +136,14 @@ bool QXMutex_lock(QXMutex * const me, if (me->ceiling != 0U) { /* the priority slot must be occupied by this mutex */ - Q_ASSERT_ID(210, QF_active_[me->ceiling] + Q_ASSERT_ID(210, QActive_registry_[me->ceiling] == QXK_PTR_CAST_(QActive*, me)); /* boost the dynamic priority of this thread to the ceiling */ - QPSet_remove(&QXK_attr_.readySet, - (uint_fast8_t)curr->super.dynPrio); + QPSet_remove(&QF_readySet_, (uint_fast8_t)curr->super.dynPrio); curr->super.dynPrio = me->ceiling; - QPSet_insert(&QXK_attr_.readySet, - (uint_fast8_t)curr->super.dynPrio); - QF_active_[me->ceiling] = &curr->super; + QPSet_insert(&QF_readySet_, (uint_fast8_t)curr->super.dynPrio); + QActive_registry_[me->ceiling] = &curr->super; } /* make the curr thread the new mutex holder */ @@ -183,29 +161,29 @@ bool QXMutex_lock(QXMutex * const me, /* the nesting level must not exceed the dynamic range of uint8_t */ Q_ASSERT_ID(220, me->lockNest < 0xFFU); - ++me->lockNest; + ++me->lockNest; /* lock one level */ } - else { /* the mutex is alredy locked by a different thread */ + else { /* the mutex is already locked by a different thread */ /* the ceiling holder priority must be valid */ Q_ASSERT_ID(230, 0U < me->holderPrio); Q_ASSERT_ID(231, me->holderPrio <= QF_MAX_ACTIVE); if (me->ceiling != 0U) { /* the prio slot must be occupied by the thr. holding the mutex */ - Q_ASSERT_ID(240, QF_active_[me->ceiling] - == QF_active_[me->holderPrio]); + Q_ASSERT_ID(240, QActive_registry_[me->ceiling] + == QActive_registry_[me->holderPrio]); } /* remove the curr dynamic prio from the ready set (block) * and insert it to the waiting set on this mutex */ uint_fast8_t const p = (uint_fast8_t)curr->super.dynPrio; - QPSet_remove(&QXK_attr_.readySet, p); + QPSet_remove(&QF_readySet_, p); QPSet_insert(&me->waitSet, p); /* store the blocking object (this mutex) */ curr->super.super.temp.obj = QXK_PTR_CAST_(QMState*, me); - QXThread_teArm_(curr, (QSignal)QXK_SEMA_SIG, nTicks); + QXThread_teArm_(curr, (enum_t)QXK_SEMA_SIG, nTicks); /* schedule the next thread if multitasking started */ (void)QXK_sched_(); @@ -235,34 +213,14 @@ bool QXMutex_lock(QXMutex * const me, return locked; } -/*==========================================================================*/ -/*! -* @description -* Try to lock the QXK priority ceiling mutex ::QXMutex. -* -* @param[in,out] me pointer (see @ref oop) -* -* @returns -* 'true' if the mutex was successfully locked and 'false' if the mutex was -* unavailable and was NOT locked. -* -* @note -* This function **can** be called from both basic threads (active objects) -* and extended threads. -* -* @note -* The mutex locks are allowed to nest, meaning that the same extended thread -* can lock the same mutex multiple times (<= 225). However, each successful -* call to QXMutex_tryLock() must be ballanced by the matching call to -* QXMutex_unlock(). -*/ +/*${QXK::QXMutex::tryLock} .................................................*/ bool QXMutex_tryLock(QXMutex * const me) { QF_CRIT_STAT_ QF_CRIT_E_(); QActive *curr = QXK_attr_.curr; if (curr == (QActive *)0) { /* called from a basic thread? */ - curr = QF_active_[QXK_attr_.actPrio]; + curr = QActive_registry_[QXK_attr_.actPrio]; } /*! @pre this function must: @@ -286,14 +244,14 @@ bool QXMutex_tryLock(QXMutex * const me) { if (me->ceiling != 0U) { /* the priority slot must be set to this mutex */ - Q_ASSERT_ID(310, QF_active_[me->ceiling] + Q_ASSERT_ID(310, QActive_registry_[me->ceiling] == QXK_PTR_CAST_(QActive*, me)); /* boost the dynamic priority of this thread to the ceiling */ - QPSet_remove(&QXK_attr_.readySet, (uint_fast8_t)curr->dynPrio); + QPSet_remove(&QF_readySet_, (uint_fast8_t)curr->dynPrio); curr->dynPrio = me->ceiling; - QPSet_insert(&QXK_attr_.readySet, (uint_fast8_t)curr->dynPrio); - QF_active_[me->ceiling] = curr; + QPSet_insert(&QF_readySet_, (uint_fast8_t)curr->dynPrio); + QActive_registry_[me->ceiling] = curr; } /* make curr thread the new mutex holder */ @@ -309,13 +267,13 @@ bool QXMutex_tryLock(QXMutex * const me) { /* the nesting level must not exceed the dynamic range of uint8_t */ Q_ASSERT_ID(320, me->lockNest < 0xFFU); - ++me->lockNest; + ++me->lockNest; /* lock one level */ } else { /* the mutex is alredy locked by a different thread */ if (me->ceiling != 0U) { /* the prio slot must be claimed by the mutex holder */ - Q_ASSERT_ID(330, QF_active_[me->ceiling] - == QF_active_[me->holderPrio]); + Q_ASSERT_ID(330, QActive_registry_[me->ceiling] + == QActive_registry_[me->holderPrio]); } curr = (QActive *)0; /* means that mutex is NOT available */ } @@ -324,33 +282,14 @@ bool QXMutex_tryLock(QXMutex * const me) { return curr != (QActive *)0; } -/*==========================================================================*/ -/*! -* @description -* Unlock the QXK priority ceiling mutex. -* -* @param[in,out] me pointer (see @ref oop) -* -* @note -* This function **can** be called from both basic threads (active objects) -* and extended threads. -* -* @note -* The mutex locks are allowed to nest, meaning that the same extended thread -* can lock the same mutex multiple times (<= 225). However, each call to -* QXMutex_lock() or a _successfull_ call to QXMutex_tryLock() must be -* ballanced by the matching call to QXMutex_unlock(). -* -* @usage -* @include qxk_mutex.c -*/ +/*${QXK::QXMutex::unlock} ..................................................*/ void QXMutex_unlock(QXMutex * const me) { QF_CRIT_STAT_ QF_CRIT_E_(); QActive *curr = QXK_attr_.curr; if (curr == (QActive *)0) { /* called from a basic thread? */ - curr = QF_active_[QXK_attr_.actPrio]; + curr = QActive_registry_[QXK_attr_.actPrio]; } /*! @pre this function must: @@ -374,13 +313,13 @@ void QXMutex_unlock(QXMutex * const me) { if (me->lockNest == 1U) { if (me->ceiling != 0U) { - /* restore the holding thread's dynamic priority to the original */ - QPSet_remove(&QXK_attr_.readySet, (uint_fast8_t)curr->dynPrio); + /* restore the holding thread's dynamic prio to the original */ + QPSet_remove(&QF_readySet_, (uint_fast8_t)curr->dynPrio); curr->dynPrio = curr->prio; - QPSet_insert(&QXK_attr_.readySet, (uint_fast8_t)curr->dynPrio); + QPSet_insert(&QF_readySet_, (uint_fast8_t)curr->dynPrio); /* put the mutex at the priority ceiling slot */ - QF_active_[me->ceiling] = QXK_PTR_CAST_(QActive*, me); + QActive_registry_[me->ceiling] = QXK_PTR_CAST_(QActive*, me); } /* the mutex no longer held by a thread */ @@ -396,7 +335,7 @@ void QXMutex_unlock(QXMutex * const me) { if (QPSet_notEmpty(&me->waitSet)) { /* find the highest-priority thread waiting on this mutex */ uint_fast8_t const p = QPSet_findMax(&me->waitSet); - QXThread * const thr = QXK_PTR_CAST_(QXThread*, QF_active_[p]); + QXThread * const thr = QXK_PTR_CAST_(QXThread*, QActive_registry_[p]); /* the waiting thread must: * - the ceiling must not be used; or if used @@ -418,7 +357,7 @@ void QXMutex_unlock(QXMutex * const me) { if (me->ceiling != 0U) { /* boost the dynamic priority of this thread to the ceiling */ thr->super.dynPrio = me->ceiling; - QF_active_[me->ceiling] = &thr->super; + QActive_registry_[me->ceiling] = &thr->super; } /* make the thread the new mutex holder */ @@ -426,8 +365,7 @@ void QXMutex_unlock(QXMutex * const me) { /* make the thread ready to run (at the ceiling prio) * and remove from the waiting list */ - QPSet_insert(&QXK_attr_.readySet, - (uint_fast8_t)thr->super.dynPrio); + QPSet_insert(&QF_readySet_, (uint_fast8_t)thr->super.dynPrio); QPSet_remove(&me->waitSet, p); QS_BEGIN_NOCRIT_PRE_(QS_MUTEX_LOCK, thr->super.prio) @@ -441,7 +379,7 @@ void QXMutex_unlock(QXMutex * const me) { if (me->ceiling != 0U) { /* put the mutex at the priority ceiling slot */ - QF_active_[me->ceiling] = QXK_PTR_CAST_(QActive*, me); + QActive_registry_[me->ceiling] = QXK_PTR_CAST_(QActive*, me); } } @@ -451,7 +389,8 @@ void QXMutex_unlock(QXMutex * const me) { } } else { /* releasing the mutex */ - --me->lockNest; /* release one level */ + --me->lockNest; /* unlock one level */ } QF_CRIT_X_(); } +/*$enddef${QXK::QXMutex} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qxk/qxk_sema.c b/src/qxk/qxk_sema.c index 6c3194b8..9398dfc3 100644 --- a/src/qxk/qxk_sema.c +++ b/src/qxk/qxk_sema.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qxk::qxk_sema.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qxk::qxk_sema.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,20 +32,20 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qxk::qxk_sema.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QXK preemptive kernel semaphore functions -* @ingroup qxk */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ -#include "qxk_pkg.h" /* QXK package-scope internal interface */ +#include "qf_pkg.h" /* QF package-scope internal interface */ #include "qassert.h" /* QP embedded systems-friendly assertions */ #ifdef Q_SPY /* QS software tracing enabled? */ #include "qs_port.h" /* QS port */ @@ -49,28 +62,21 @@ Q_DEFINE_THIS_MODULE("qxk_sema") /*==========================================================================*/ -/*! -* @description -* Initializes a semaphore with the specified count and maximum count. -* If the semaphore is used for resource sharing, both the initial count -* and maximum count should be set to the number of identical resources -* guarded by the semaphore. If the semaphore is used as a signaling -* mechanism, the initial count should set to 0 and maximum count to 1 -* (binary semaphore). -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] count initial value of the semaphore counter -* @param[in] max_count maximum value of the semaphore counter. -* The purpose of the max_count is to limit the counter -* so that the semaphore cannot unblock more times than -* the maximum. -* -* @note -* QXSemaphore_init() must be called **before** the semaphore can be used -* (signaled or waited on). -*/ -void QXSemaphore_init(QXSemaphore * const me, uint_fast16_t count, - uint_fast16_t max_count) +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required +#endif +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ + +/*$define${QXK::QXSemaphore} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK::QXSemaphore} ......................................................*/ + +/*${QXK::QXSemaphore::init} ................................................*/ +void QXSemaphore_init(QXSemaphore * const me, + uint_fast16_t const count, + uint_fast16_t const max_count) { /*! @pre max_count must be greater than zero */ Q_REQUIRE_ID(100, max_count > 0U); @@ -80,31 +86,10 @@ void QXSemaphore_init(QXSemaphore * const me, uint_fast16_t count, QPSet_setEmpty(&me->waitSet); } -/*==========================================================================*/ -/*! -* @description -* When an extended thread calls QXSemaphore_wait() and the value of the -* semaphore counter is greater than 0, QXSemaphore_wait() decrements the -* semaphore counter and returns (true) to its caller. However, if the value -* of the semaphore counter is 0, the function places the calling thread in -* the waiting list for the semaphore. The thread waits until the semaphore -* is signaled by calling QXSemaphore_signal(), or the specified timeout -* expires. If the semaphore is signaled before the timeout expires, QXK -* resumes the highest-priority extended thread waiting for the semaphore. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] nTicks number of clock ticks (at the associated rate) -* to wait for the semaphore. The value of -* QXTHREAD_NO_TIMEOUT indicates that no timeout will -* occur and the semaphore will wait indefinitely. -* -* @returns -* 'true' if the semaphore has been signaled and 'false' if a timeout occured. -* -* @note -* Multiple extended threads can wait for a given semahpre. -*/ -bool QXSemaphore_wait(QXSemaphore * const me, uint_fast16_t const nTicks) { +/*${QXK::QXSemaphore::wait} ................................................*/ +bool QXSemaphore_wait(QXSemaphore * const me, + uint_fast16_t const nTicks) +{ QF_CRIT_STAT_ QF_CRIT_E_(); @@ -133,12 +118,12 @@ bool QXSemaphore_wait(QXSemaphore * const me, uint_fast16_t const nTicks) { /* remember the blocking object (this semaphore) */ curr->super.super.temp.obj = QXK_PTR_CAST_(QMState*, me); - QXThread_teArm_(curr, (QSignal)QXK_SEMA_SIG, nTicks); + QXThread_teArm_(curr, (enum_t)QXK_SEMA_SIG, nTicks); /* remove this curr prio from the ready set (will block) * and insert to the waiting set on this semaphore */ QPSet_insert(&me->waitSet, p); /* add to waiting-set */ - QPSet_remove(&QXK_attr_.readySet, p); /* remove from ready-set */ + QPSet_remove(&QF_readySet_, p); /* remove from ready-set */ /* schedule the next thread if multitasking started */ (void)QXK_sched_(); @@ -174,21 +159,7 @@ bool QXSemaphore_wait(QXSemaphore * const me, uint_fast16_t const nTicks) { return signaled; } -/*==========================================================================*/ -/*! -* @description -* This function checks if the semaphore counter is greater than 0, -* in which case the counter is decremented. -* -* @param[in,out] me pointer (see @ref oop) -* -* @returns -* 'true' if the semaphore has count available and 'false' NOT available. -* -* @note -* This function can be called from any context, including ISRs and basic -* threds (active objects). -*/ +/*${QXK::QXSemaphore::tryWait} .............................................*/ bool QXSemaphore_tryWait(QXSemaphore * const me) { /*! @pre the semaphore must be initialized */ Q_REQUIRE_ID(300, me->max_count > 0U); @@ -210,26 +181,7 @@ bool QXSemaphore_tryWait(QXSemaphore * const me) { return isAvailable; } -/*==========================================================================*/ -/*! -* @description -* If the semaphore counter value is 0 or more, it is incremented, and -* this function returns to its caller. If the extended threads are waiting -* for the semaphore to be signaled, QXSemaphore_signal() removes the highest- -* priority thread waiting for the semaphore from the waiting list and makes -* this thread ready-to-run. The QXK scheduler is then called to determine if -* the awakened thread is now the highest-priority thread that is ready-to-run. -* -* @param[in,out] me pointer (see @ref oop) -* -* @returns -* 'true' when the semaphore signaled and 'false' when the semaphore count -* exceeded the maximum. -* -* @note -* A semaphore can be signaled from many places, including from ISRs, basic -* threads (AOs), and extended threads. -*/ +/*${QXK::QXSemaphore::signal} ..............................................*/ bool QXSemaphore_signal(QXSemaphore * const me) { /*! @pre the semaphore must be initialized */ Q_REQUIRE_ID(400, me->max_count > 0U); @@ -245,7 +197,8 @@ bool QXSemaphore_signal(QXSemaphore * const me) { if (QPSet_notEmpty(&me->waitSet)) { /* find the highest-priority thread waiting on this semaphore */ uint_fast8_t const p = QPSet_findMax(&me->waitSet); - QXThread * const thr = QXK_PTR_CAST_(QXThread*, QF_active_[p]); + QXThread * const thr = + QXK_PTR_CAST_(QXThread*, QActive_registry_[p]); /* assert that the tread: * - must be registered in QF; @@ -261,7 +214,7 @@ bool QXSemaphore_signal(QXSemaphore * const me) { (void)QXThread_teDisarm_(thr); /* make the thread ready to run and remove from the wait-list */ - QPSet_insert(&QXK_attr_.readySet, p); + QPSet_insert(&QF_readySet_, p); QPSet_remove(&me->waitSet, p); if (!QXK_ISR_CONTEXT_()) { /* not inside ISR? */ @@ -276,3 +229,4 @@ bool QXSemaphore_signal(QXSemaphore * const me) { return signaled; } +/*$enddef${QXK::QXSemaphore} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/src/qxk/qxk_xthr.c b/src/qxk/qxk_xthr.c index b3d5f62c..5ff9e419 100644 --- a/src/qxk/qxk_xthr.c +++ b/src/qxk/qxk_xthr.c @@ -1,6 +1,19 @@ -/*============================================================================ -* QP/C Real-Time Embedded Framework (RTEF) -* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +/*$file${src::qxk::qxk_xthr.c} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* +* Model: qpc.qm +* File: ${src::qxk::qxk_xthr.c} +* +* This code has been generated by QM 5.2.1 . +* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost. +* +* This code is covered by the following QP license: +* License # : LicenseRef-QL-dual +* Issued to : Any user of the QP/C real-time embedded framework +* Framework(s) : qpc +* Support ends : 2023-12-31 +* License scope: +* +* Copyright (C) 2005 Quantum Leaps, LLC . * * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial * @@ -19,20 +32,20 @@ * Plagiarizing this software to sidestep the license obligations is illegal. * * Contact information: -* +* * -============================================================================*/ +*/ +/*$endhead${src::qxk::qxk_xthr.c} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ /*! -* @date Last updated on: 2021-12-23 -* @version Last updated for: @ref qpc_7_0_0 +* @date Last updated on: 2022-07-24 +* @version Last updated for: @ref qpc_7_0_1 * * @file * @brief QXK preemptive kernel extended (blocking) thread functions -* @ingroup qxk */ #define QP_IMPL /* this is QP implementation */ #include "qf_port.h" /* QF port */ -#include "qxk_pkg.h" /* QXK package-scope internal interface */ +#include "qf_pkg.h" /* QF package-scope internal interface */ #include "qassert.h" /* QP embedded systems-friendly assertions */ #ifdef Q_SPY /* QS software tracing enabled? */ #include "qs_port.h" /* QS port */ @@ -48,69 +61,30 @@ Q_DEFINE_THIS_MODULE("qxk_xthr") -/*! intertnal macro to encapsulate casting of pointers for MISRA deviations */ -/*! -* @description -* This macro is specifically and exclusively used for downcasting pointers -* to QActive to pointers to QXThread in situations when it is known -* that such downcasting is correct.However, such pointer casting is not -* compliant with MISRA-2012-Rule 11.3(req) as well as other messages (e.g., -* PC-Lint-Plus warning 826). Defining this specific macro for this purpose -* allows to selectively disable the warnings for this particular case. -*/ -#define QXTHREAD_CAST_(ptr_) ((QXThread *)(ptr_)) - /*==========================================================================*/ -#ifndef Q_SPY - static void QXThread_init_(QHsm * const me, void const * const par); - static void QXThread_dispatch_(QHsm * const me, QEvt const * const e); - static bool QXThread_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin); -#else - static void QXThread_init_(QHsm * const me, void const * const par, - uint_fast8_t const qs_id); - static void QXThread_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id); - static bool QXThread_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, void const * const sender); +/*$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ +/* Check for the minimum required QP version */ +#if (QP_VERSION < 690U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U)) +#error qpc version 6.9.0 or higher required #endif -static void QXThread_postLIFO_(QActive * const me, QEvt const * const e); -static void QXThread_start_(QActive * const me, uint_fast8_t prio, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par); +/*$endskip${QP_VERSION} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ -/*==========================================================================*/ -/*! -* @description -* Performs the first step of QXThread initialization by assigning the -* thread-handler function and the tick rate at which it will handle -* the timeouts. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] handler the thread-handler function -* @param[in] tickRate the ticking rate for timeouts in this thread -* (see QXThread_delay() and QF_TICK_X()) -* -* @note -* Must be called only ONCE before QXTHREAD_START(). -* -* @usage -* The following example illustrates how to invoke QXThread_ctor() in the -* main() function -* -* @include -* qxk_thread_ctor.c -*/ +/*$define${QXK::QXThread} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ + +/*${QXK::QXThread} .........................................................*/ +QXThread QXThread_idle; + +/*${QXK::QXThread::ctor} ...................................................*/ void QXThread_ctor(QXThread * const me, - QXThreadHandler handler, uint_fast8_t tickRate) + QXThreadHandler const handler, + uint_fast8_t const tickRate) { static QXThreadVtable const vtable = { /* QXThread virtual table */ { &QXThread_init_, /* not used in QXThread */ &QXThread_dispatch_ /* not used in QXThread */ -#ifdef Q_SPY + #ifdef Q_SPY ,&QHsm_getStateHandler_ /* not used in QXThread */ -#endif + #endif }, &QXThread_start_, &QXThread_post_, @@ -128,70 +102,188 @@ void QXThread_ctor(QXThread * const me, (enum_t)QXK_DELAY_SIG, tickRate); } -/*==========================================================================*/ -/* QXThread virtual function implementations... */ -#ifndef Q_SPY -static void QXThread_init_(QHsm * const me, void const * const par) -#else -static void QXThread_init_(QHsm * const me, void const * const par, - uint_fast8_t const qs_id) -#endif +/*${QXK::QXThread::delay} ..................................................*/ +bool QXThread_delay(uint_fast16_t const nTicks) { + QF_CRIT_STAT_ + QF_CRIT_E_(); + + QXThread * const thr = QXTHREAD_CAST_(QXK_attr_.curr); + + /*! @pre this function must: + * - NOT be called from an ISR; + * - number of ticks cannot be zero + * - be called from an extended thread; + * - the thread must NOT be already blocked on any object. + */ + Q_REQUIRE_ID(800, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ + && (nTicks != 0U) /* number of ticks cannot be zero */ + && (thr != (QXThread *)0) /* current thread must be extended */ + && (thr->super.super.temp.obj == (QMState *)0)); /* !blocked */ + /*! @pre also: the thread must NOT be holding a scheduler lock. */ + Q_REQUIRE_ID(801, QXK_attr_.lockHolder != thr->super.prio); + + /* remember the blocking object */ + thr->super.super.temp.obj = QXK_PTR_CAST_(QMState const*, &thr->timeEvt); + QXThread_teArm_(thr, (enum_t)QXK_DELAY_SIG, nTicks); + QXThread_block_(thr); + QF_CRIT_X_(); + QF_CRIT_EXIT_NOP(); /* BLOCK here */ + + QF_CRIT_E_(); + /* the blocking object must be the time event */ + Q_ENSURE_ID(890, thr->super.super.temp.obj + == QXK_PTR_CAST_(QMState const*, &thr->timeEvt)); + thr->super.super.temp.obj = (QMState *)0; /* clear */ + QF_CRIT_X_(); + + /* signal of zero means that the time event was posted without + * being canceled. + */ + return thr->timeEvt.super.sig == 0U; +} + +/*${QXK::QXThread::delayCancel} ............................................*/ +bool QXThread_delayCancel(QXThread * const me) { + QF_CRIT_STAT_ + QF_CRIT_E_(); + + bool wasArmed; + if (me->super.super.temp.obj == QXK_PTR_CAST_(QMState*, &me->timeEvt)) { + wasArmed = QXThread_teDisarm_(me); + QXThread_unblock_(me); + } + else { + wasArmed = false; + } + QF_CRIT_X_(); + + return wasArmed; +} + +/*${QXK::QXThread::queueGet} ...............................................*/ +QEvt const * QXThread_queueGet(uint_fast16_t const nTicks) { + QF_CRIT_STAT_ + QF_CRIT_E_(); + + QXThread * const thr = QXTHREAD_CAST_(QXK_attr_.curr); + + /*! @pre this function must: + * - NOT be called from an ISR; + * - be called from an extended thread; + * - the thread must NOT be already blocked on any object. + */ + Q_REQUIRE_ID(500, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ + && (thr != (QXThread *)0) /* current thread must be extended */ + && (thr->super.super.temp.obj == (QMState *)0)); /* !blocked */ + /*! @pre also: the thread must NOT be holding a scheduler lock. */ + Q_REQUIRE_ID(501, QXK_attr_.lockHolder != thr->super.prio); + + /* is the queue empty? */ + if (thr->super.eQueue.frontEvt == (QEvt *)0) { + + /* remember the blocking object (the thread's queue) */ + thr->super.super.temp.obj + = QXK_PTR_CAST_(QMState const*, &thr->super.eQueue); + + QXThread_teArm_(thr, (enum_t)QXK_QUEUE_SIG, nTicks); + QPSet_remove(&QF_readySet_, (uint_fast8_t)thr->super.dynPrio); + (void)QXK_sched_(); + QF_CRIT_X_(); + QF_CRIT_EXIT_NOP(); /* BLOCK here */ + + QF_CRIT_E_(); + /* the blocking object must be this queue */ + Q_ASSERT_ID(510, thr->super.super.temp.obj + == QXK_PTR_CAST_(QMState const*, &thr->super.eQueue)); + thr->super.super.temp.obj = (QMState *)0; /* clear */ + } + + /* is the queue not empty? */ + QEvt const *e; + if (thr->super.eQueue.frontEvt != (QEvt *)0) { + e = thr->super.eQueue.frontEvt; /* remove from the front */ + QEQueueCtr const nFree= thr->super.eQueue.nFree + 1U; + thr->super.eQueue.nFree = nFree; /* update the number of free */ + + /* any events in the ring buffer? */ + if (nFree <= thr->super.eQueue.end) { + + /* remove event from the tail */ + thr->super.eQueue.frontEvt = + thr->super.eQueue.ring[thr->super.eQueue.tail]; + if (thr->super.eQueue.tail == 0U) { /* need to wrap? */ + thr->super.eQueue.tail = thr->super.eQueue.end; /* wrap */ + } + --thr->super.eQueue.tail; + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_GET, thr->super.prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(&thr->super); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* number of free entries */ + QS_END_NOCRIT_PRE_() + } + else { + thr->super.eQueue.frontEvt = (QEvt *)0; /* empty queue */ + + /* all entries in the queue must be free (+1 for fronEvt) */ + Q_ASSERT_ID(520, nFree == (thr->super.eQueue.end + 1U)); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_GET_LAST, thr->super.prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(&thr->super); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_END_NOCRIT_PRE_() + } + } + else { /* the queue is still empty -- the timeout must have fired */ + e = (QEvt *)0; + } + QF_CRIT_X_(); + + return e; + +} + +/*${QXK::QXThread::init_} ..................................................*/ +void QXThread_init_( + QHsm * const me, + void const * const par, + uint_fast8_t const qs_id) { - (void)me; /* unused parameter */ - (void)par; /* unused parameter */ -#ifdef Q_SPY - (void)qs_id; /* unused parameter */ -#endif + Q_UNUSED_PAR(me); + Q_UNUSED_PAR(par); + Q_UNUSED_PAR(qs_id); /* when Q_SPY undefined */ + Q_ERROR_ID(110); } -/*==========================================================================*/ -#ifndef Q_SPY -static void QXThread_dispatch_(QHsm * const me, QEvt const * const e) -#else -static void QXThread_dispatch_(QHsm * const me, QEvt const * const e, - uint_fast8_t const qs_id) -#endif +/*${QXK::QXThread::dispatch_} ..............................................*/ +void QXThread_dispatch_( + QHsm * const me, + QEvt const * const e, + uint_fast8_t const qs_id) { - (void)me; /* unused parameter */ - (void)e; /* unused parameter */ -#ifdef Q_SPY - (void)qs_id; /* unused parameter */ -#endif + Q_UNUSED_PAR(me); + Q_UNUSED_PAR(e); + Q_UNUSED_PAR(qs_id); + Q_ERROR_ID(120); } -/*==========================================================================*/ -/*! -* @description -* Starts execution of an extended thread and registers it with the framework. -* The extended thread becomes ready-to-run immediately and is scheduled -* if the QXK is already running. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] prio priority at which to start the extended thread -* @param[in] qSto pointer to the storage for the ring buffer of the -* event queue. This cold be NULL, if this extended -* thread does not use the built-in event queue. -* @param[in] qLen length of the event queue [in events], -* or zero if queue not used -* @param[in] stkSto pointer to the stack storage (must be provided) -* @param[in] stkSize stack size [in bytes] (must not be zero) -* @param[in] par pointer to an extra parameter (might be NULL). -* -* @note -* Should be called via the macro QXTHREAD_START(). -* -* @usage -* The following example shows starting an extended thread: -* @include qxk_start.c -*/ -static void QXThread_start_(QActive * const me, uint_fast8_t prio, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +/*${QXK::QXThread::start_} .................................................*/ +void QXThread_start_( + QActive * const me, + uint_fast8_t const prio, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par) { - QF_CRIT_STAT_ + Q_UNUSED_PAR(par); /*! @pre this function must: * - NOT be called from an ISR; @@ -205,8 +297,6 @@ static void QXThread_start_(QActive * const me, uint_fast8_t prio, && (stkSize != 0U) && (me->super.state.act == (QActionHandler)0)); - (void)par; /* unused parameter */ - /* is storage for the queue buffer provided? */ if (qSto != (QEvt const **)0) { QEQueue_init(&me->eQueue, qSto, qLen); @@ -223,64 +313,27 @@ static void QXThread_start_(QActive * const me, uint_fast8_t prio, /* the new thread is not blocked on any object */ me->super.temp.obj = (QMState *)0; - QF_add_(me); /* make QF aware of this extended thread */ + QActive_register_(me); /* make QF aware of this extended thread */ + QF_CRIT_STAT_ QF_CRIT_E_(); /* extended-thread becomes ready immediately */ - QPSet_insert(&QXK_attr_.readySet, (uint_fast8_t)me->dynPrio); + QPSet_insert(&QF_readySet_, (uint_fast8_t)me->dynPrio); /* see if this thread needs to be scheduled in case QXK is running */ (void)QXK_sched_(); QF_CRIT_X_(); } -/*==========================================================================*/ -#ifdef Q_SPY -/*! -* @description -* Direct event posting is the simplest asynchronous communication method -* available in QF. The following example illustrates how the Philo active -* object posts directly the HUNGRY event to the Table active object.@n -* @n -* The parameter @p margin specifies the minimum number of free slots in -* the queue that must be available for posting to succeed. The function -* returns 1 (success) if the posting succeeded (with the provided margin) -* and 0 (failure) when the posting fails. -* -* @param[in,out] me pointer (see @ref oop) -* @param[in] e pointer to the event to be posted -* @param[in] margin number of required free slots in the queue after -* posting the event. The special value #QF_NO_MARGIN -* means that this function will assert if posting fails. -* @param[in] sender pointer to a sender object (used only for QS tracing). -* -* @returns -* 'true' (success) if the posting succeeded (with the provided margin) and -* 'false' (failure) when the posting fails. -* -* @note -* Should be called only via the macro QXTHREAD_POST_X(). -* -* @note -* The #QF_NO_MARGIN value of the @p margin parameter is special and -* denotes situation when the post() operation is assumed to succeed -* (event delivery guarantee). An assertion fires, when the event cannot -* be delivered in this case. -* -* @note -* For compatibility with the V-table from the superclass ::QActive, the -* me-pointer is typed as pointing to QActive. However, the @p me pointer -* here actually points to the QXThread subclass. Therefore the downcast -* (QXThread *)me is always correct. -*/ -static bool QXThread_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin, - void const * const sender) -#else -static bool QXThread_post_(QActive * const me, QEvt const * const e, - uint_fast16_t const margin) -#endif +/*${QXK::QXThread::post_} ..................................................*/ +bool QXThread_post_( + QActive * const me, + QEvt const * const e, + uint_fast16_t const margin, + void const * const sender) { + Q_UNUSED_PAR(sender); /* when Q_SPY undefined */ + QF_CRIT_STAT_ QS_TEST_PROBE_DEF(&QXThread_post_) @@ -362,7 +415,7 @@ static bool QXThread_post_(QActive * const me, QEvt const * const e, == QXK_PTR_CAST_(QMState*, &me->eQueue)) { (void)QXThread_teDisarm_(QXTHREAD_CAST_(me)); - QPSet_insert(&QXK_attr_.readySet, + QPSet_insert(&QF_readySet_, (uint_fast8_t)me->dynPrio); if (!QXK_ISR_CONTEXT_()) { (void)QXK_sched_(); @@ -372,7 +425,7 @@ static bool QXThread_post_(QActive * const me, QEvt const * const e, /* queue is not empty, insert event into the ring-buffer */ else { /* insert event into the ring buffer (FIFO) */ - QF_PTR_AT_(me->eQueue.ring, me->eQueue.head) = e; + me->eQueue.ring[me->eQueue.head] = e; /* need to wrap the head counter? */ if (me->eQueue.head == 0U) { @@ -407,179 +460,48 @@ static bool QXThread_post_(QActive * const me, QEvt const * const e, } return status; + } -/*==========================================================================*/ -/*! -* @description -* Last-In-First-Out (LIFO) policy is not supported for extened threads. -* -* @param[in] me pointer (see @ref oop) -* @param[in] e pointer to the event to post to the queue -* -* @sa -* QActive_postLIFO_() -*/ -static void QXThread_postLIFO_(QActive * const me, QEvt const * const e) { - (void)me; - (void)e; +/*${QXK::QXThread::postLIFO_} ..............................................*/ +void QXThread_postLIFO_( + QActive * const me, + QEvt const * const e) +{ + Q_UNUSED_PAR(me); + Q_UNUSED_PAR(e); + Q_ERROR_ID(410); } -/*==========================================================================*/ -/*! -* @description -* The QXThread_queueGet() operation allows the calling extended thread to -* receive QP events directly into its own built-in event queue from an ISR, -* basic thread (AO), or another extended thread. -* -* If QXThread_queueGet() is called when no events are present in the -* thread's private event queue, the operation blocks the current extended -* thread until either an event is received, or a user-specified timeout -* expires. -* -* @param[in] nTicks number of clock ticks (at the associated rate) -* to wait for the event to arrive. The value of -* QXTHREAD_NO_TIMEOUT indicates that no timeout will -* occur and the queue will block indefinitely. -* @returns -* A pointer to the event. If the pointer is not NULL, the event was delivered. -* Otherwise the event pointer of NULL indicates that the queue has timed out. -*/ -QEvt const *QXThread_queueGet(uint_fast16_t const nTicks) { - QF_CRIT_STAT_ - QF_CRIT_E_(); - - QXThread * const thr = QXTHREAD_CAST_(QXK_attr_.curr); - - /*! @pre this function must: - * - NOT be called from an ISR; - * - be called from an extended thread; - * - the thread must NOT be already blocked on any object. - */ - Q_REQUIRE_ID(500, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ - && (thr != (QXThread *)0) /* current thread must be extended */ - && (thr->super.super.temp.obj == (QMState *)0)); /* !blocked */ - /*! @pre also: the thread must NOT be holding a scheduler lock. */ - Q_REQUIRE_ID(501, QXK_attr_.lockHolder != thr->super.prio); - - /* is the queue empty? */ - if (thr->super.eQueue.frontEvt == (QEvt *)0) { - - /* remember the blocking object (the thread's queue) */ - thr->super.super.temp.obj - = QXK_PTR_CAST_(QMState const*, &thr->super.eQueue); - - QXThread_teArm_(thr, (QSignal)QXK_QUEUE_SIG, nTicks); - QPSet_remove(&QXK_attr_.readySet, (uint_fast8_t)thr->super.dynPrio); - (void)QXK_sched_(); - QF_CRIT_X_(); - QF_CRIT_EXIT_NOP(); /* BLOCK here */ - - QF_CRIT_E_(); - /* the blocking object must be this queue */ - Q_ASSERT_ID(510, thr->super.super.temp.obj - == QXK_PTR_CAST_(QMState const*, &thr->super.eQueue)); - thr->super.super.temp.obj = (QMState *)0; /* clear */ - } - - /* is the queue not empty? */ - QEvt const *e; - if (thr->super.eQueue.frontEvt != (QEvt *)0) { - e = thr->super.eQueue.frontEvt; /* remove from the front */ - QEQueueCtr const nFree= thr->super.eQueue.nFree + 1U; - thr->super.eQueue.nFree = nFree; /* update the number of free */ - - /* any events in the ring buffer? */ - if (nFree <= thr->super.eQueue.end) { - - /* remove event from the tail */ - thr->super.eQueue.frontEvt = - QF_PTR_AT_(thr->super.eQueue.ring, thr->super.eQueue.tail); - if (thr->super.eQueue.tail == 0U) { /* need to wrap? */ - thr->super.eQueue.tail = thr->super.eQueue.end; /* wrap */ - } - --thr->super.eQueue.tail; - - QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_GET, thr->super.prio) - QS_TIME_PRE_(); /* timestamp */ - QS_SIG_PRE_(e->sig); /* the signal of this event */ - QS_OBJ_PRE_(&thr->super); /* this active object */ - QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ - QS_EQC_PRE_(nFree); /* number of free entries */ - QS_END_NOCRIT_PRE_() - } - else { - thr->super.eQueue.frontEvt = (QEvt *)0; /* empty queue */ - - /* all entries in the queue must be free (+1 for fronEvt) */ - Q_ASSERT_ID(520, nFree == (thr->super.eQueue.end + 1U)); - - QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_GET_LAST, thr->super.prio) - QS_TIME_PRE_(); /* timestamp */ - QS_SIG_PRE_(e->sig); /* the signal of this event */ - QS_OBJ_PRE_(&thr->super); /* this active object */ - QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ - QS_END_NOCRIT_PRE_() - } - } - else { /* the queue is still empty -- the timeout must have fired */ - e = (QEvt *)0; - } - QF_CRIT_X_(); - - return e; -} - -/*==========================================================================*/ -/*! -* @description -* Intenral implementation of blocking the given extended thread. -* -* @note -* Must be called from within a critical section -*/ +/*${QXK::QXThread::block_} .................................................*/ void QXThread_block_(QXThread const * const me) { /*! @pre the thread holding the lock cannot block! */ Q_REQUIRE_ID(600, (QXK_attr_.lockHolder != me->super.prio)); - QPSet_remove(&QXK_attr_.readySet, (uint_fast8_t)me->super.dynPrio); + QPSet_remove(&QF_readySet_, (uint_fast8_t)me->super.dynPrio); (void)QXK_sched_(); } -/*==========================================================================*/ -/*! -* @description -* Intenral implementation of un-blocking the given extended thread. -* -* @note -* must be called from within a critical section -*/ +/*${QXK::QXThread::unblock_} ...............................................*/ void QXThread_unblock_(QXThread const * const me) { - QPSet_insert(&QXK_attr_.readySet, (uint_fast8_t)me->super.dynPrio); + QPSet_insert(&QF_readySet_, (uint_fast8_t)me->super.dynPrio); if ((!QXK_ISR_CONTEXT_()) /* not inside ISR? */ - && (QF_active_[0] != (QActive *)0)) /* kernel started? */ + && (QActive_registry_[0] != (QActive *)0)) /* kernel started? */ { (void)QXK_sched_(); } } -/*==========================================================================*/ -/*! -* @description -* Intenral implementation of arming the private time event for a given -* timeout at a given system tick rate. -* -* @note -* Must be called from within a critical section -*/ -void QXThread_teArm_(QXThread * const me, QSignal sig, - uint_fast16_t const nTicks) +/*${QXK::QXThread::teArm_} .................................................*/ +void QXThread_teArm_(QXThread * const me, + enum_t const sig, + uint_fast16_t const nTicks) { /*! @pre the time event must be unused */ Q_REQUIRE_ID(700, me->timeEvt.ctr == 0U); - me->timeEvt.super.sig = sig; + me->timeEvt.super.sig = (QSignal)sig; if (nTicks != QXTHREAD_NO_TIMEOUT) { me->timeEvt.ctr = (QTimeEvtCtr)nTicks; @@ -588,37 +510,31 @@ void QXThread_teArm_(QXThread * const me, QSignal sig, /* is the time event unlinked? * NOTE: For the duration of a single clock tick of the specified tick * rate a time event can be disarmed and yet still linked in the list, - * because un-linking is performed exclusively in QF_tickX(). + * because un-linking is performed exclusively in QTimeEvt_tick_(). */ - if ((me->timeEvt.super.refCtr_ & TE_IS_LINKED) == 0U) { + if ((me->timeEvt.super.refCtr_ & QTE_IS_LINKED) == 0U) { uint_fast8_t const tickRate - = ((uint_fast8_t)me->timeEvt.super.refCtr_ & TE_TICK_RATE); + = ((uint_fast8_t)me->timeEvt.super.refCtr_ & QTE_TICK_RATE); Q_ASSERT_ID(710, tickRate < QF_MAX_TICK_RATE); - me->timeEvt.super.refCtr_ |= TE_IS_LINKED; + me->timeEvt.super.refCtr_ |= QTE_IS_LINKED; /* The time event is initially inserted into the separate - * "freshly armed" list based on QF_timeEvtHead_[tickRate].act. - * Only later, inside the QF_tickX() function, the "freshly armed" - * list is appended to the main list of armed time events based on - * QF_timeEvtHead_[tickRate].next. Again, this is to keep any - * changes to the main list exclusively inside QF_tickX(). + * "freshly armed" list based on QTimeEvt_timeEvtHead_[tickRate].act. + * Only later, inside the QTimeEvt_tick_() function, the "freshly + * armed" list is appended to the main list of armed time events + * based on QTimeEvt_timeEvtHead_[tickRate].next. Again, this is + * to keep any changes to the main list exclusively inside + * QTimeEvt_tick_(). */ me->timeEvt.next - = QXK_PTR_CAST_(QTimeEvt*, QF_timeEvtHead_[tickRate].act); - QF_timeEvtHead_[tickRate].act = &me->timeEvt; + = QXK_PTR_CAST_(QTimeEvt*, QTimeEvt_timeEvtHead_[tickRate].act); + QTimeEvt_timeEvtHead_[tickRate].act = &me->timeEvt; } } } -/*==========================================================================*/ -/*! -* @description -* Intenral implementation of disarming the private time event. -* -* @note -* Must be called from within a critical section -*/ +/*${QXK::QXThread::teDisarm_} ..............................................*/ bool QXThread_teDisarm_(QXThread * const me) { bool wasArmed; /* is the time evt running? */ @@ -632,118 +548,4 @@ bool QXThread_teDisarm_(QXThread * const me) { } return wasArmed; } - -/*==========================================================================*/ -/*! delay (timed blocking of) the current thread (static, no me-ptr) -* @description -* Blocking delay for the number of clock tick at the associated tick rate. -* -* @param[in] nTicks number of clock ticks (at the associated rate) -* to wait for the event to arrive. -* @note -* For the delay to work, the QF_TICK_X() macro needs to be called -* periodicially at the associated clock tick rate. -* -* @sa QXThread_ctor() -* @sa QF_TICK_X() -*/ -bool QXThread_delay(uint_fast16_t const nTicks) { - QF_CRIT_STAT_ - QF_CRIT_E_(); - - QXThread * const thr = QXTHREAD_CAST_(QXK_attr_.curr); - - /*! @pre this function must: - * - NOT be called from an ISR; - * - number of ticks cannot be zero - * - be called from an extended thread; - * - the thread must NOT be already blocked on any object. - */ - Q_REQUIRE_ID(800, (!QXK_ISR_CONTEXT_()) /* can't block inside an ISR */ - && (nTicks != 0U) /* number of ticks cannot be zero */ - && (thr != (QXThread *)0) /* current thread must be extended */ - && (thr->super.super.temp.obj == (QMState *)0)); /* !blocked */ - /*! @pre also: the thread must NOT be holding a scheduler lock. */ - Q_REQUIRE_ID(801, QXK_attr_.lockHolder != thr->super.prio); - - /* remember the blocking object */ - thr->super.super.temp.obj = QXK_PTR_CAST_(QMState const*, &thr->timeEvt); - QXThread_teArm_(thr, (QSignal)QXK_DELAY_SIG, nTicks); - QXThread_block_(thr); - QF_CRIT_X_(); - QF_CRIT_EXIT_NOP(); /* BLOCK here */ - - QF_CRIT_E_(); - /* the blocking object must be the time event */ - Q_ENSURE_ID(890, thr->super.super.temp.obj - == QXK_PTR_CAST_(QMState const*, &thr->timeEvt)); - thr->super.super.temp.obj = (QMState *)0; /* clear */ - QF_CRIT_X_(); - - /* signal of zero means that the time event was posted without - * being canceled. - */ - return thr->timeEvt.super.sig == 0U; -} - -/*==========================================================================*/ -/*! cancel the delay -* @description -* Cancel the blocking delay and cause return from the QXThread_delay() -* function. -* -* @returns -* "true" if the thread was actually blocked on QXThread_delay() and -* "false" otherwise. -*/ -bool QXThread_delayCancel(QXThread * const me) { - QF_CRIT_STAT_ - QF_CRIT_E_(); - - bool wasArmed; - if (me->super.super.temp.obj == QXK_PTR_CAST_(QMState*, &me->timeEvt)) { - wasArmed = QXThread_teDisarm_(me); - QXThread_unblock_(me); - } - else { - wasArmed = false; - } - QF_CRIT_X_(); - - return wasArmed; -} - -/*==========================================================================*/ -/*! -* @description -* Called when the extended-thread handler function returns. -* -* @note -* Most thread handler functions are structured as endless loops that never -* return. But it is also possible to structure threads as one-shot functions -* that perform their job and return. In that case this function peforms -* cleanup after the thread. -*/ -void QXK_threadRet_(void) { - QF_CRIT_STAT_ - QF_CRIT_E_(); - - QXThread const * const thr = QXTHREAD_CAST_(QXK_attr_.curr); - - /*! @pre this function must: - * - NOT be called from an ISR; - * - be called from an extended thread; - */ - Q_REQUIRE_ID(900, (!QXK_ISR_CONTEXT_()) /* can't be in the ISR context */ - && (thr != (QXThread *)0)); /* current thread must be extended */ - /*! @pre also: the thread must NOT be holding a scheduler lock. */ - Q_REQUIRE_ID(901, QXK_attr_.lockHolder != thr->super.prio); - - uint_fast8_t const p = (uint_fast8_t)thr->super.prio; - - /* remove this thread from the QF */ - QF_active_[p] = (QActive *)0; - QPSet_remove(&QXK_attr_.readySet, p); - (void)QXK_sched_(); - QF_CRIT_X_(); -} +/*$enddef${QXK::QXThread} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/ diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt new file mode 100644 index 00000000..71e99d3c --- /dev/null +++ b/zephyr/CMakeLists.txt @@ -0,0 +1,52 @@ +# QPC Zephyr module +# SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial + +zephyr_library() + +if(CONFIG_QPC) + +set(QPC_DIR ..) + +zephyr_include_directories( + ${QPC_DIR}/include + ${QPC_DIR}/zephyr +) + +target_include_directories(app PUBLIC + ${QPC_DIR}/include + ${QPC_DIR}/zephyr +) + +zephyr_library_sources( + ${QPC_DIR}/src/qf/qep_hsm.c + ${QPC_DIR}/src/qf/qep_msm.c + ${QPC_DIR}/src/qf/qf_act.c + ${QPC_DIR}/src/qf/qf_qact.c + ${QPC_DIR}/src/qf/qf_defer.c + ${QPC_DIR}/src/qf/qf_dyn.c + ${QPC_DIR}/src/qf/qf_mem.c + ${QPC_DIR}/src/qf/qf_ps.c + ${QPC_DIR}/src/qf/qf_qact.c + ${QPC_DIR}/src/qf/qf_qeq.c + ${QPC_DIR}/src/qf/qf_qmact.c + ${QPC_DIR}/src/qf/qf_time.c + ${QPC_DIR}/zephyr/qf_port.c +) + +if(CONFIG_QSPY) + +target_compile_definitions(app PUBLIC Q_SPY) +zephyr_library_compile_definitions(Q_SPY) + +zephyr_library_sources( + ${QPC_DIR}/src/qs/qs.c + ${QPC_DIR}/src/qs/qs_rx.c + ${QPC_DIR}/src/qs/qs_fp.c + ${QPC_DIR}/src/qs/qutest.c + ${QPC_DIR}/src/qs/qs_64bit.c + ${QPC_DIR}/include/qstamp.c +) + +endif() # CONFIG_QSPY + +endif() # CONFIG_QPCPP diff --git a/zephyr/Kconfig b/zephyr/Kconfig new file mode 100644 index 00000000..4d780c42 --- /dev/null +++ b/zephyr/Kconfig @@ -0,0 +1,21 @@ +# QPC Zephyr module +# SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial + +menuconfig QPC + bool "QPC" + default n + help + Enables the QPC Module + +if QPC + +config QSPY + bool "QSPY Tracing" + default n + help + Enables the QSPY Tracing for QP + +module = QPC +module-str = QPC + +endif diff --git a/zephyr/README.md b/zephyr/README.md new file mode 100644 index 00000000..272eaac1 --- /dev/null +++ b/zephyr/README.md @@ -0,0 +1,26 @@ +# qpc Zephyr Module +This directory defines the +[QP/C Real-Time Embedded Framework](https://github.com/QuantumLeaps/qpc) +as a [Zephyr module](https://docs.zephyrproject.org/latest/develop/modules.html). + +# How to use +Example of use is provided in the related repository +[qpc-zephyr-app](https://github.com/QuantumLeaps/qpc-zephyr-app) + + +## Configuring the QPC Zephyr Module +The `Kconfig` file provides configuration `QPC` to activate the QPC module +in Zephyr. To do so, you need to add the following line to your `prj.conf`: + +```ini +CONFIG_QPC=y +``` + +## Configuring the QSPY Software Tracing +If you wish to enable +[QSPY Software Tracing](https://www.state-machine.com/qtools/qpspy.html), +you need to add also the following line to your `prj.conf`: + +```ini +CONFIG_QSPY=y +``` diff --git a/zephyr/module.yml b/zephyr/module.yml new file mode 100644 index 00000000..cbff6a1a --- /dev/null +++ b/zephyr/module.yml @@ -0,0 +1,3 @@ +build: + cmake: zephyr + kconfig: zephyr/Kconfig diff --git a/zephyr/qep_port.h b/zephyr/qep_port.h new file mode 100644 index 00000000..be4fa2d4 --- /dev/null +++ b/zephyr/qep_port.h @@ -0,0 +1,40 @@ +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-03 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QEP/C port, generic C99 compiler +*/ +#ifndef QEP_PORT_H +#define QEP_PORT_H + +#include /* Exact-width types. WG14/N843 C99 Standard */ +#include /* Boolean type. WG14/N843 C99 Standard */ + +#include "qep.h" /* QEP platform-independent public interface */ + +#endif /* QEP_PORT_H */ diff --git a/zephyr/qf_port.c b/zephyr/qf_port.c new file mode 100644 index 00000000..aaefb9e9 --- /dev/null +++ b/zephyr/qf_port.c @@ -0,0 +1,236 @@ +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-07 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to Zephyr RTOS +*/ +#define QP_IMPL /* this is QP implementation */ +#include "qf_port.h" /* QF port */ +#include "qf_pkg.h" +#include "qassert.h" +#ifdef Q_SPY /* QS software tracing enabled? */ + #include "qs_port.h" /* QS port */ + #include "qs_pkg.h" /* QS package-scope internal interface */ +#else + #include "qs_dummy.h" /* disable the QS software tracing */ +#endif /* Q_SPY */ + +Q_DEFINE_THIS_MODULE("qf_port") + +/* QF_MAX_ACTIVE cannot exceed the limit in QF */ +Q_ASSERT_STATIC(QF_MAX_ACTIVE <= 64); + +/*..........................................................................*/ +struct k_spinlock QF_spinlock; + +/*..........................................................................*/ +void QF_init(void) { + QF_spinlock = (struct k_spinlock){}; +} +/*..........................................................................*/ +int_t QF_run(void) { + QF_onStartup(); + return 0; /* return from the main Zephyr thread */ +} +/*..........................................................................*/ +void QF_stop(void) { + QF_onCleanup(); /* cleanup callback */ +} + +/*..........................................................................*/ +static void thread_entry(void *p1, void *p2, void *p3) { + QActive *act = (QActive *)p1; + (void)p2; /* unused parameter */ + (void)p3; /* unused parameter */ + + /* event-loop */ + for (;;) { /* for-ever */ + QEvt const *e = QActive_get_(act); + QHSM_DISPATCH(&act->super, e, act->prio); + QF_gc(e); /* check if the event is garbage, and collect it if so */ + } +} +/*..........................................................................*/ +/* +* In the Zephyr port the generic function QActive_setAttr() is used to +* set the options for the Zephyr thread (attr1) and thread name (attr2). +* QActive_setAttr() needs to be called *before* QACTIVE_START() for the +* given active object. +*/ +void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) { + me->thread.base.order_key = attr1; /* temporarily save attr1 */ + me->thread.init_data = (void *)attr2; /* temporarily save attr2 */ +} +/*..........................................................................*/ +void QActive_start_(QActive * const me, uint_fast8_t prio, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par) +{ + /* initialize the Zephyr message queue */ + k_msgq_init(&me->eQueue, (char *)qSto, sizeof(QEvt *), (uint32_t)qLen); + + me->prio = prio; /* save the QF priority */ + QActive_register_(me); /* make QF aware of this active object */ + + QHSM_INIT(&me->super, par, me->prio); /* the top-most initial tran. */ + QS_FLUSH(); /* flush the trace buffer to the host */ + + /* Zephyr uses the reverse priority numbering than QP */ + int zprio = (int)QF_MAX_ACTIVE - (int)prio; + + /* create an Zephyr thread for the AO... */ + uint32_t opt = me->thread.base.order_key; +#ifdef CONFIG_THREAD_NAME + char const *name = (char const *)me->thread.init_data; +#endif + me->thread = (struct k_thread){}; /* clear the thread storage */ +#ifdef CONFIG_THREAD_NAME + k_thread_name_set(&me->thread, name); +#endif + k_thread_create(&me->thread, + (k_thread_stack_t *)stkSto, stkSize, + &thread_entry, + (void *)me, /* p1 */ + (void *)0, /* p2 */ + (void *)0, /* p3 */ + zprio, /* Zephyr priority */ + opt, /* thread options */ + K_NO_WAIT); /* start immediately */ +} +/*..........................................................................*/ +bool QActive_post_(QActive * const me, QEvt const * const e, + uint_fast16_t const margin, void const * const sender) +{ + bool status; + QF_CRIT_STAT_ + + QF_CRIT_E_(); + uint_fast16_t nFree = (uint_fast16_t)k_msgq_num_free_get(&me->eQueue); + + if (margin == QF_NO_MARGIN) { + if (nFree > 0U) { + status = true; /* can post */ + } + else { + status = false; /* cannot post */ + Q_ERROR_ID(510); /* must be able to post the event */ + } + } + else if (nFree > (QEQueueCtr)margin) { + status = true; /* can post */ + } + else { + status = false; /* cannot post */ + } + + if (status) { /* can post the event? */ + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object (recipient) */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* # free entries available */ + QS_EQC_PRE_(0U); /* min # free entries (unknown) */ + QS_END_NOCRIT_PRE_() + + if (e->poolId_ != 0U) { /* is it a pool event? */ + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ + } + + QF_CRIT_X_(); + + /* posting to the Zephyr message queue must succeed, see NOTE1 */ + Q_ALLEGE_ID(520, k_msgq_put(&me->eQueue, (void *)&e, K_NO_WAIT) == 0); + } + else { + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_ATTEMPT, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_OBJ_PRE_(sender); /* the sender object */ + QS_SIG_PRE_(e->sig); /* the signal of the event */ + QS_OBJ_PRE_(me); /* this active object (recipient) */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(nFree); /* # free entries available */ + QS_EQC_PRE_(0U); /* min # free entries (unknown) */ + QS_END_NOCRIT_PRE_() + + QF_CRIT_X_(); + } + + return status; +} +/*..........................................................................*/ +void QActive_postLIFO_(QActive * const me, QEvt const * const e) { + QF_CRIT_STAT_ + QF_CRIT_E_(); + + QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(k_msgq_num_free_get(&me->eQueue)); /* # free */ + QS_EQC_PRE_(0U); /* min # free entries (unknown) */ + QS_END_NOCRIT_PRE_() + + if (e->poolId_ != 0U) { /* is it a pool event? */ + QF_EVT_REF_CTR_INC_(e); /* increment the reference counter */ + } + + QF_CRIT_X_(); + + /* NOTE: Zephyr message queue does not currently support LIFO posting + * so normal FIFO posting is used instead. + */ + Q_ALLEGE_ID(610, k_msgq_put(&me->eQueue, (void *)&e, K_NO_WAIT) == 0); +} +/*..........................................................................*/ +QEvt const *QActive_get_(QActive * const me) { + QEvt const *e; + QS_CRIT_STAT_ + + /* wait for an event (forever), which must succeed */ + Q_ALLEGE_ID(710, k_msgq_get(&me->eQueue, (void *)&e, K_FOREVER) == 0); + + QS_BEGIN_PRE_(QS_QF_ACTIVE_GET, me->prio) + QS_TIME_PRE_(); /* timestamp */ + QS_SIG_PRE_(e->sig); /* the signal of this event */ + QS_OBJ_PRE_(me); /* this active object */ + QS_2U8_PRE_(e->poolId_, e->refCtr_); /* pool Id & ref Count */ + QS_EQC_PRE_(k_msgq_num_free_get(&me->eQueue));/* # free */ + QS_END_PRE_() + + return e; +} + + +/*============================================================================ +*/ diff --git a/zephyr/qf_port.h b/zephyr/qf_port.h new file mode 100644 index 00000000..10e43d25 --- /dev/null +++ b/zephyr/qf_port.h @@ -0,0 +1,94 @@ +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-07 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QF/C port to Zephyr RTOS +*/ +#ifndef QF_PORT_H +#define QF_PORT_H + +/* event queue and thread types */ +#define QF_EQUEUE_TYPE struct k_msgq +#define QF_THREAD_TYPE struct k_thread + +/* The maximum number of active objects in the application, NOTE1 */ +#define QF_MAX_ACTIVE (CONFIG_NUM_PREEMPT_PRIORITIES - 1U) + +/* The number of system clock tick rates */ +#define QF_MAX_TICK_RATE 2U + +/* QF critical section entry/exit for Zephyr, see NOTE1 */ +#define QF_CRIT_STAT_TYPE k_spinlock_key_t +#define QF_CRIT_ENTRY(key_) ((key_) = k_spin_lock(&QF_spinlock)) +#define QF_CRIT_EXIT(key_) (k_spin_unlock(&QF_spinlock, (key_))) + +#include /* Zephyr API */ +#include "qep_port.h" /* QEP port */ +#include "qequeue.h" /* native QP event-queue for event deferral */ +#include "qmpool.h" /* Zephyr port uses native QP memory-pool */ +#include "qf.h" /* QF platform-independent public interface */ + +/* Zephyr spinlock for QF critical section */ +extern struct k_spinlock QF_spinlock; + +/*==========================================================================*/ +/* interface used only inside QF implementation, but not in applications */ +#ifdef QP_IMPL + + /* QF-specific scheduler locking (global lock in Zephyr, NOTE2) */ + #define QF_SCHED_STAT_ + #define QF_SCHED_LOCK_(dummy) (k_sched_lock()) + #define QF_SCHED_UNLOCK_() (k_sched_unlock()) + + /* native QF event-pool customization... */ + #define QF_EPOOL_TYPE_ QMPool + #define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \ + (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) + #define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize) + #define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \ + ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) + #define QF_EPOOL_PUT_(p_, e_, qs_id_) \ + (QMPool_put(&(p_), (e_), (qs_id_))) + +#endif /* QP_IMPL */ + +/*============================================================================ +* NOTE1: +* This QP port to Zephyr assumes that Active Objects will use only the +* preemptive Zephyr priorities [0..(CONFIG_NUM_PREEMPT_PRIORITIES - 1U)]. +* In this priority numbering, the QP AO priority QF_MAX_ACTIVE (highest) +* maps to Zephyr priority 0 (highest). The QP AO priority 1 (lowest) maps +* to Zephyr priority (CONFIG_NUM_PREEMPT_PRIORITIES - 2U). +* +* NOTE2: +* Zephyr does not support selective scheduler locking up to a given +* priority ceiling. Therefore, this port uses global Zephyr scheduler lock. +*/ + +#endif /* QF_PORT_H */ + diff --git a/zephyr/qs_port.h b/zephyr/qs_port.h new file mode 100644 index 00000000..e8b00882 --- /dev/null +++ b/zephyr/qs_port.h @@ -0,0 +1,60 @@ +/*============================================================================ +* QP/C Real-Time Embedded Framework (RTEF) +* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +* +* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial +* +* This software is dual-licensed under the terms of the open source GNU +* General Public License version 3 (or any later version), or alternatively, +* under the terms of one of the closed source Quantum Leaps commercial +* licenses. +* +* The terms of the open source GNU General Public License version 3 +* can be found at: +* +* The terms of the closed source Quantum Leaps commercial licenses +* can be found at: +* +* Redistributions in source code must retain this top-level comment block. +* Plagiarizing this software to sidestep the license obligations is illegal. +* +* Contact information: +* +* +============================================================================*/ +/*! +* @date Last updated on: 2022-06-12 +* @version Last updated for: @ref qpc_7_0_1 +* +* @file +* @brief QS/C port to a 32-bit CPU and a generic C99 compiler. +* @description +* This is an example of a QP/C port with the documentation for the +* configuration macros and includes. +*/ +#ifndef QS_PORT_H +#define QS_PORT_H + +/* QS time-stamp size in bytes */ +#define QS_TIME_SIZE 4 + +/* object pointer size in bytes */ +#define QS_OBJ_PTR_SIZE 4 + +/* function pointer size in bytes */ +#define QS_FUN_PTR_SIZE 4 + +/*==========================================================================*/ +/* NOTE: QS might be used with or without other QP components, in which +* case the separate definitions of the macros QF_CRIT_STAT_TYPE, +* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured +* to be used with the other QP component, by simply including "qf_port.h" +* *before* "qs.h". +*/ +#ifndef QF_PORT_H +#include "qf_port.h" /* use QS with QF */ +#endif + +#include "qs.h" /* QS platform-independent public interface */ + +#endif /* QS_PORT_H */