This document lists the QP/C releases and summarizes the changes made at each release.
The main highlights of this milestone QP/C release are:
QP/C source code:
QEVT_DYN_CTOR
) is defined, the dynamic allocation automatically calls the member function QEvt_init() (previously QEvt_ctor()
) that must be provided in the event class (subclass of QEvt).QP/C ports:
qp_config.h
header file in all QP/C applications. This avoids a whole class of potential defects caused by inconsistent compile-time options in different software builds. (NOTE: Compile-time configuration file qp_config.h
has been introduced in the earlier QP/C release, but it was optional and controlled by the QP_CONFIG macro. Now qp_config.h
is obligatory. qp_config.h
file. The default qp_config.h
header file can be copied from the qpc/ports/config
directory.QP/C examples:
qp_config.h
files to all examples.qpc/examples/qutest/integration_tests
.qpc/examples/qutest/auto_run
.Bug Fixes:
Bug Fixes:
QP/C source code:
QP/C ports:
The main highlights of this release are:
qpc/examples
sub-directory as a Git submodule qpc-examples to allow external contributions to examplesQP/C source code:
QP/C ports:
QF_CONSOLE
is defined)QP/C examples:
bsp.c
files (Board Support Packages) to call QS_rxParse() outside critical sections.QF_CONSOLE
when they actually use the console services.examples/arm-cm/dpp_ek-tm4c123gxl_mpu
and examples/arm-cm/dpp_nucleo-c031c6_mpu
) to configure the MPU for the Idle thread, so that the QS-RX access is allowed.examples/posix-win32-cmake/dpp
Bug Fixes:
This maintenance release adds a minor design change to the QAsm base class and corrects a few issues discovered in QP/C 7.3.1.
QP/C source code:
isIn()
operation in the subclasses of QAsmPorts:
qs_port.c
).Examples:
QS_onFlush()
implementations in all BSP files (bsp.c
).qep_port.h
, qf_port.h
, qk_port.h
, qv_port.h
, and qxk_port.h
). These files (consolidated and renamed to qp_port.h) were not actually used to build the projects, but their presence was confusing.The focus of this release continues to be improving the support for functional safety standards. This release adds several mechanisms to the QP Functional Safety (FuSa) Subsystem to mitigate various potential hazards.
QP Functional Safety (FuSa) Subsystem:
QV kernel:
Ports:
qp_config.h
) to the ARM Cortex-M ports (in the qpc/ports/arm-cm/<qv|qk|qxk>/config
directories.Examples:
qpc/examples/arm-cm/real-time_nucleo-l053r8
that demonstrates various scheduling policies of periodic and sporadic tasks. This includes multi-stage tasks and time-triggered scheduling under the QV kernel.The main focus of this QP/C release is improving the support for functional safety standards, such as IEC 61508 for electrical systems, and related IEC 62304/FDA510(k) for medical devices, IEC 60335 for household appliances, DO-178B/C for airborne systems.
QP Functional Safety (FuSa) Subsystem: This release adds QP Functional Safety Subsystem (QP FuSa), which is an expansion of the assertion-based programming extensively used in the QP Frameworks from the beginning. The QP FuSa Subsystem consists of the following parts:
Source Code:
Ports:
qp_config.h
, which can be used for compile-time configuration of the QP/C framework for specific application without changing the official port. (Requires command-line option QP_CONFIG).qpc/ports/arm-cm
) to support Memory Isolation by means of the MPU (configurable by the macros QF_MEM_ISOLATE, QF_MEM_SYS(), and QF_MEM_APP()).Examples:
assert_failed()
, which is now consistently called by fault handlers in the startup code.qpcpp/examples/arm-cm/dpp_nucleo-c031c6
qpc/examples/arm-cm/dpp_nucleo-c031c6_mpu
- use of MPU in ARM Cortex-M0+qpc/examples/arm-cm/dpp_ek-tm4c123gxl_mpu
- use of MPU in ARM Cortex-M4Fassert_failed()
. This is for consistency and interoperability with existing libraries (e.g., STM32Cube) and for adding flexibility in defining error handling for hardware exceptions.assert_failed()
in the applications (typically in the Board Support Package). The typical definition of assert_failed()
is to call Q_onError().Documentation:
qpc/doc
. This separation of concerns significantly reduces the need to change (and re-certify!) the QP/C source code just to update the documentation. This is part of the new Configuration Management Plan.Bug Fixes:
QP/C Source Code:
Ports:
Bug Fixes:
QP/C Source Code:
QF_onContextSw()
used in all built-in kernels (QV, QK, QXK). This callback is enabled by the macro QF_ON_CONTEXT_SW.QK_onContextSW()
and macro QK_ON_CONTEXT_SW and replaced with QF_onContextSw()
/QF_ON_CONTEXT_SW.QXK_onContextSW()
and macro QXK_ON_CONTEXT_SW and replaced with QF_onContextSw()
/QF_ON_CONTEXT_SW.QF_onContextSW()
and macro QF_ON_CONTEXT_SW to the QV kernel.QFsm
, QFsm_ctor()
, Q_IGNORED()
.Ports:
ports/arm-cm
added setup of the FPU (if configured) to all built-in kernels (QV, QK, QXK) and toolchains (ARMCLANG, GNU-ARM, IAR).ports/arm-cm
all ports now clear the FPCA bit in the CONTROL register (if FPU configured) right before starting the interrupts. That potentially saves the stack space (MSP) for the automatically reserved FPU context.ports/posix
added configuration macro QS_CTR_SIZE 4U, to allow QS trace buffers > 64KB (see also feature#195)ports/win32
added configuration macro QS_CTR_SIZE 4U, to allow QS trace buffers > 64KB (see also feature#195)ports/esp-idf
fixed compilation error caused by obsolete macro QF_PTR_RANGE_()
ports/sample
added a sample QP/C port for reference and documentation of all available configuration options.zephyr
updated qf_port.h
to include <zephyr/kernel.h>
rather than <zephyr/zephyr.h>
(see also bug#321)Examples:
QF_onContextSw()
QK_onContextSw()/QXK_onContextSw()
with QF_onContextSw()
examples/arm-cm
removed setting up the FPU from the BSPs (the FPU is now setup in the ports).examples/arm-cm
added setting up the MPU (Memory Protection Unit) to catch NULL-pointer dereferencing and other incorrect memory access.Testing:
examples/qutest
and test
directories): adjusted makefiels to invoke the qutest.py
utility with the new command-line parameters.examples/qutest/start_seq
that demonstrates testing of start sequences.Bug Fixes:
Feature Requests:
Bug Fixes:
Source
qstamp.c
has been copied from the include/
folder to src/qs/
. This makes it easier to build SPY configuration. (The file qstamp.c
has been left in the include/
folder for backwards compatibility).Ports
CMakeLists.txt
file in the zephyr port has been modified to use zephyr_library_named(qpc)
instead of zephyr_library()
Examples
Documentation
doxygen/
folder for generation of QM Manual in LaTeX (enables generation of PDF)Licensing
QM-EVAL-QPC.qlc
file from the LICENSES
folder. This "QM License Certificate" is no longer needed for QM 5.2.3, where "QM License Certificates" are no longer needed for generating QMsm-style state machines.This release improves preemption-threshold scheduling (PTS) in QK kernel, especially the generation of the software tracing information about the scheduler activity. Also, PTS has been removed from the QXK kernel because of the inherent complexity of that kernel.
Additionally, the default for QF_TIMEEVT_CTR_SIZE has been increased from 2 to 4 bytes. This increases the default dynamic range for QTimeEvt counters to 32-bits.
Source
QF_H
-> QP_INC_QF_H_
) for compliance with the updated Quantum Leaps coding standard and to make the names more unique.Ports
Testing
qpc/test/
for system-level testing of QP/C itself.qpc/test/qk
qpc/test/qutest/qxk
qpc/test/
directory is planned to contain a growing number of system-level tests, which are based on QUTest, but without the QP-stub. The tests take advantage of the new QUTest configuration, where the QP-stub is NOT included (because the actual QP Framework is linked). This configuration is activated by defining macro Q_UTEST=0
.qpc/test/
directory run only on embedded targets and cannot run on the host machine.This QP/C release introduces preemption-threshold scheduling (PTS) for the preemptive QK and QXK kernels. Specifically, it is now possible to limit preemption of a given QActive/QXThread by giving it both the QF-priority and preemption-threshold.
The following diagram shows the relationship between the "QF-priority" and "preemption-threshold" (see also QPrioSpec):
Source
Ports
Examples
Testing
Bug Fixes:
Ports Modified QK and QXK ports to ARM Cortex-M
qpc/ports/arm-cm/qk
qpc/ports/arm-cm/qxk
Modified Zephyr port
qpc/ports/zephyr
up a level to qpc/zephyr
. This was done to make QPC into an external Zephyr module, which has to comply with the Zephyr specification.Examples (ARM Cortex-M):
qpc/examples/arm-cm/dpp_efm32-slstk3401a/qk
provided examples of configuring either NMI or IRQ for Cortex-M4 (ARMv7m)qpc/examples/arm-cm/dpp_efm32-slstk3401a/qxk
provided examples of configuring either NMI or IRQ for Cortex-M4 (ARMv7m)qpc/examples/arm-cm/dpp_nucleo-l053r8/qk
provided examples of configuring either NMI or IRQ for Cortex-M0+ (ARMv6m)qpc/examples/arm-cm/dpp_nucleo-l053r8/qk
provided examples of configuring either NMI or IRQ for Cortex-M0+ (ARMv6m)Examples (Zephyr):
qpc/examples/zephyr/blinky
- modified to use the new Zephyr portqpc/examples/zephyr/dpp
- modified to use the new Zephyr port and to demonstrate QSPY software tracing.This release is the first one that contains the complete QM model of the QP/C framework (in the file qpc/qpc.qm
). This model is then used to generate all QP/C source code:
The QM model of QP/C explicitly captures the logical design of the framework, which is then mapped to the preexisting physical design. The logical design, which consists of packages (some associated with namespaces), classes, types, and macros traces explicitly to the Software Architecture Specification (SAS) and is easier to manipulate and refactor.
Source Code Changes:
qpc.qm
model.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.qpc/src
include directory from the various project files.Ports/Examples:
qpc/ports/freertos
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.
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 Kit)
Modified QP/C source code:
Modified QP/C ports:
ARM_ARCH
symbol from Makefiles for GNU-ARMRemoved QP/C ports:
Modified GitHub repository:
3rd_party
directory from the qpc GitHub repository 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:
qutest
examples for Unity (comparison between Unity and QUTest)Modified QP/C documentation:
Feature Requests:
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()
.
prio
directly. For example, AOs would need to call QF_PUBLISH(e, &me->super)
instead of QF_PUBLISH(e, me)
.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:
Source code changes:
qpc/include/qf.h
- feature#191qpc/include/qs.h
- feature#191qpc/src/qf/qf_ps.c
- feature#191qpc/src/qs/qs_rx.c
- feature#191 and bug#292Modified QP/C ports:
qpc/ports/arm-cm/
- fixed bug#298qpc/ports/embos/
- implemented feature#185qpc/ports/threadx/
- implemented feature#185qpc/ports/ucos2/
- implemented feature#185qpc/ports/win32/
- added QSpy64 (64-bit) build configuration to the Visual Studio projectqpc/ports/win32-qv/
- added QSpy64 (64-bit) build configuration to the Visual Studio projectqpc/ports/win32-quit/
- added "port" used for "QP Unit Internal Testing" (QUIT)Updated examples:
QF_PUBLISH()
- adjusted the sender
parameter of the macro to have the prio
memberqpc/examples/arm-cm/
- fixed bug#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.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
Updated 3rd-Party Components:
qpc/3rd_party/threadx
to version 6.1.6 (latest open source version from GitHub )The main purpose of this release is a redesign of the QS-RX (software tracing input) to implement the feature request #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)
Additionally, this release introduces a new "virtual" function getStateHandler()
in the QHsm
base class. This is part of the fix for bug #290 ("QView query object state reports wrong state with QMsm strategy", see the "Bug Fixes" section)
Source code changes:
The introduction of the getStateHandler()
virtual function involves the following code changes:
qpc/include/qep.h
qpc/src/qf/qep_hsm.c
qpc/src/qf/qep_msm.c
qpc/src/qf/qf_actq.c
qpc/src/qf/qf_qact.c
qpc/src/qf/qf_qmact.c
qpc/src/qs/qs_rx.c
qpc/src/qs/qutest.c
qpc/src/qxk/qxk_xthr.c
qpc/include/qs.h
file – added new API QS_queryCurrObj()The redesign of QS-RX implementation involves the following code changes:
qpc/include/qs.h
– macro QS_RX_PUT()
now returns bool
(true if the byte was inserted into the QS-RX buffer and false otherwise)qpc/src/qs/qs_rx.c
- changed several functionsqpc/src/qs/qs_fp.c
- improved implementationModified QP/C ports:
qpc/ports/posix/
- modified to take advantage of the QS-RX direct byte orderingqpc/ports/posix-qutest/
- modified to take advantage of the QS-RX direct byte orderingqpc/ports/posix-qv/
- modified to take advantage of the QS-RX direct byte orderingqpc/ports/win32/
- modified to take advantage of the QS-RX direct byte orderingqpc/ports/win32-qutest/
- modified to take advantage of the QS-RX direct byte orderingqpc/ports/win32-qv/
- modified to take advantage of the QS-RX direct byte orderingAdded QP/C ports:
qpc/ports/freertos-esp32/
- added new experimental port to FreeRTOS-ESP32Updated examples:
qpc/examples/workstation/calc
fixed minor bug in the calculatorBug Fixes:
Updated 3rd-Party Components:
qpc/3rd_party/CMSIS
to version 5.7.0qpc/3rd_party/FreeRTOS
to version 10.4.3 (202012LTS released December 2020)The main purpose of this release is a redesign of the QS Local Filter (see also feature request #127). This new design supports filtering on multiple active objects (as well as other objects in the Target memory), as opposed to filtering just one such object at a time. The main use case for this redesign of QS Local Filter is an application, where some active objects are very "noisy", and would overwhelm your trace. The new QS Local Filter allows you to selectively silence the "noisy" active objects and let all the others through.
The new QS Local Filter is based on "QS-IDs" associated with various objects in the Target memory. The QS-IDs are small integer numbers, such as the unique priorities assigned to QP Active Objects, but there are more such QS-IDs, which you can assign to various other objects through the macro QS_BEGIN_ID(). Then, you can setup the QS Local Filter to trace only a specific QS-IDs or whole groups of QS-IDs by means of the macro QS_LOC_FILTER() or remotely via the QS-RX channel.
Source code changes:
The redesign of the QS Local Filter impacts the QS trace instrumentation in QP/C : both the pre-defined QS trace records and the application-specific trace records. The changes to the pre-defined records are confided to the QP/C source code and are transparent to the application developers. However, the changes to the application-specific trace records require adjusting existing applications as follows:
The following macros are deprecated:
The following APIs have been changed:
qsId
parameterqsId
parameterqsId
parameterqsId
parameterqsId
parameterqsId
parameterqsId
parameterAdditionally, this release introduces the new pre-defined QS record #QS_QF_NEW_ATTEMPT, which is generated when Q_NEW_X() fails to allocate a dynamic event. Also, this release reverses the order of the pre-defined QS records #QS_QF_NEW and #QS_QF_MPOOL_GET. This was necessary if the dynamic allocation is allowed to fail, because only after attempting to allocate a memory block, the QF_newX_() function can generate either #QS_QF_NEW or #QS_QF_NEW_ATTEMPT.
Additionally, this release modifies the 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 QXK extended thread acquires a mutex.
Updated Ports:
Feature Requests:
Bug Fixes:
The main purpose of this release is to adjust the QP/C RTEF to the changes and improvements introduced in QTools 6.9.0. Specifically, QP/C now includes examples for the new QView Visualization & Monitoring as well as adjustments for the new version of QUTest Unit Testing.
Source code changes:
Added new #QS_QF_RUN trace record to QS software tracing, which is now generated in all QP/C ports upon the entry to QF_run(). This trace record marks the end of the application startup, at which time all the QS dictionaries are typically produced.
Also, added the information about the target endianness to the #QS_TARGET_INFO QS trace record.
Updated Ports:
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED)
(see also bug#276)Updated Examples:
qpc\examples\qutest
directory) have been modified to use the new location of the qutest.py
Python module. Also, all QUTest examples that use the on_reset()
callback have been modified to call expect_run()
.qpc\examples\arm-cm\dpp_nucleo-l053r8
) and NUCLEO-L152RE (qpc\examples\arm-cm\dpp_nucleo-l152re
) have been modified to support bi-directional QSPY communication. These examples now include the QView demos.ccs-ti
and ccs-gnu
directories, for the TI-MSP430 and GNU-MSP430 toolchains, respectively.Bug Fixes:
Source code changes:
QHsm *
(and not QMsm *
). Similarly, any "opaque" pointers to the active object base class should be of type QActive *
(and not QMActive *
)Updated Ports:
Updated Examples:
Makefile
s for the GNU-ARM projects to use gcc
as the linker instead of g++
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.workstation/defer/defer.qm
and workstation/reminder2/reminder2.qm
Updated QUTest examples to generate code-coverage information:
Makefile
s in QUTest examples (directory examples\qutest
) to generate code-coverage information. Specifically, when the GCOV
environment variable is defined, the Makefile
s generate code-coverage information for GCOV.Updated 3rd-Party Components:
Bug Fixes:
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:
Also, this release updates the QP/C ports and examples for workstations (Windows and POSIX) by consistently applying the "safe" versions of services from <stdio.h>
and <string.h>
. The "portable" versions of these services are defined as macros in the safe_std.h
header file and include the following services:
MEMMOVE_S()
-> memmove_s()
STRCPY_S()
-> strcpy_s()
STRCPY_S()
-> strcpy_s()
STRCAT_S()
-> strcat_s()
SNPRINTF_S()
-> _snprintf_s()
PRINTF_S()
-> printf_s()
FPRINTF_S()
->fprintf_s()
FREAD_S()
-> fread_s()
FOPEN_S()
-> fopen_s()
LOCALTIME_S()
-> localtime_s()
These "safe" functions are mapped to the best approximation of these services available on a given platform. For example, STRCPY_S()
is mapped to strcpy_s()
on Windows and strcpy()
on POSIX (Linux/MacOS/etc.).
Source code changes:
.h
files and definitions in the .c
files, such as different parameter names in declarations and definitions (MISRA-C:2012).(uint8_t)0
, which is now coded simply as 0U
Updated 3rd-Party Components:
Updated Examples:
Converted most of the examples for ARM-MDK from the no-longer maintained compiler-5 (RVDS) to the new ARM Compiler-6 (ARM-clang). The examples for ARM Compiler-6 are located in the armclang
sub-directories.
arm
sub-directories.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 static analysis tool (see also feature request #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/.
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.
Also, this release updates the Windows-GUI examples with the QWIN Prototyping Toolkit to work with the latest Visual Studio 2019 and specifically with the Resource Editor now available. Specifically here, the Game-GUI example (qpc\examples\arm-cm\game_efm32-slstk3401a\win32-gui
) and the DPP-GUI example (qpc\examples\arm-cm\dpp_efm32-slstk3401a\win32-gui
) have been updated to build with the Visual Studio 2019.
Bug Fixes:
The main purpose of this release is the change in distribution of the QP/C framework, which is now bundled together with the other QP Frameworks (QP/C ++ and QP-nano) as well as QM, and the QTools collection into "QP-bundle". This "QP-bundle" provides a single, streamlined and simplified download and installation of all QP Frameworks and all the accompanying tools.
This release brings also the following changes:
Bug Fixes:
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.
This QP/C release matches the QM release 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.
For commonality with the new QP/C ++ implementation, this release adds macros Q_ACTION_NULL and QM_STATE_NULL, which are used in the code generated from QM 4.5.0. Also, this release comes with several models for QM 4.5.0.
Additionally, this release changes the API QTimeEvt_ctr() to QTimeEvt_currCtr(). This is to avoid name shadowing with the ctr
variables, which is not compliant with MISRA.
Additionally, the examples for calc1
and calc1_sub
(with QM 4.5.0 models) have been extended to properly handle the operator precedence (multiplication and division have higher precedence than addition and subtraction).
This release brings the following changes:
The main purpose of this release is the update the Makefiles
that use the GNU-ARM Embedded Toolchain to match the recent update in QTools for Windows 6.3.8. 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-.
Makefiles
that use the GNU-ARM included in this release require QTools for Windows version 6.3.8 or newer and will NOT work with the older QTools collection.The main goal of this release is to provide Python test scripts that match the newly re-designed Python support for the QUTest unit testing harness (see QTools 6.3.7). Specifically, the Python tests scripts (*.py files) in the qpc/examples/qutest
directory) have been all upgraded to the new syntax and format. Also, all the makefiles in that directory have been modified to execute Python test scripts by default, and Tcl test scripts only when the argument SCRIPTS=tcl
is specified.
The second change in this release is updating the QP ports to Win32 and POSIX to eliminate the obsolete function gethostbyname()
and replacing it with getaddrinfo()
. This change has ripple effects on Windows, because it requires linking with "ws2_32" library, instead of "wsock2". All affected Makefiles
in the qpc\examples\
directory have been updated to link the newer "ws2_32" library.
Also, in this release, the prototypes of the internal functions QActive_start_()
, QActive_get_()
, QActive_post_()
and QActive_postLIFO_()
have been removed from the public QF interface (in qf.h) and moved to the QF-implementation. This is to prevent calling these internal functions directly in the application-level code. The only allowed use of these functions is through the macros QACTIVE_START(), QACTIVE_POST(), QACTIVE_POST_X() and QACTIVE_POST_LIFO().
Finally, this release updates the internal implementation of QXK function QXThread_post_()
for software tracing and testing with QUTest.
This release brings important changes and improvements to the unit-testing support for QUTest. 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).
As a consequence of the changes in the QUTest support, the 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 have been replaced with fully functional tests based on the Unity testing framework. 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.
Also this release adds QS dictionary generation for all registered event pools. The generated object dictionaries are EvtPool1
for pool-1, EvtPool2
for pool-2, etc.
smlPoolSto[]
, etc.Another big change in this release is re-designing of the examples for workstations (previously win32
, win32-qv
, posix
and posix-qv
). All these types of examples have been consolidated in the exampes/workstation folder, where the provided Makefiles
have been extended to be cross-platform so that they work on Windows, Linux, and MacOS without changes.
To facilitate the creation of truly portable, cross-platform examples, the existing QP ports to Windows/POSIX have been augmented with abstractions for portable console access. Also, the QS software tracing support via TCP/IP has been now added to the ports themselves. This means that applications no longer need to repeat the code for QS callbacks in the BSP implementation.
Finally, this release fixes a bug in the POSIX-QV port, where the internal condition variable QV_condVar_
has not been initialized.
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, 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.
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
).
This release fixes the following bugs:
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.
This release fixes the following bugs:
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.
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()
.
This release migrates the QUTest examples to 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".
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:
Additionally, the release contains some re-factoring of the QS-RX input channel.
The main purpose of this release is extednding the functionality of the QUTest unit testing 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 and Deferred Event design patterns. To implement this new feature, the QS-RX (QS receive channel) has been extended 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.
Additionally, the release adds standard QS trace records (the qs.h
header file) for event deferring and recalling (QS_QF_ACTIVE_DEFER and QS_QF_ACTIVE_RECALL) as well as recall-attempt (QS_QF_ACTIVE_RECALL_ATTEMPT). Also standard QS trace records have been added for creating/deleting new event references (QS_QF_NEW_REF and QS_QF_DELETE_REF, respectively). To make room for these new records, the following rarely-used records have been removed: QS_QF_ACTIVE_ADD, QS_QF_ACTIVE_REMOVE, QS_QF_EQUEUE_INIT, and QS_QF_MPOOL_INIT. The global filter settings in the QS_filterOn() and QS_filterOff() functions have been updated to the re-organized QS trace records.
Additionally, this release improves support for tracing and unit-testing embedded POSIX targets, such as embedded Linux, or OSes/RTOSes with the POSIX compatibility layer. Specifically, the POSIX ports (qpc/ports/posix/
and qpc/ports/posix-qutest/
) no longer produce libraries. Instead all examples for POSIX (qpc/examples/posix/
and qpc/examples/qutest
) build the QP/C framework directly from the sources, which promotes consisentcy in the toolchain and options used. For unit testing, the makefiles posix.mak
have been added for projects qpc/examples/qutest/dpp/
and qpc/examples/qutest/self_test/
. These makefiles support remote unit testing of embedded POSIX targets over TCP/IP, where the POSIX target runs only the test fixture, but the host (e.g., Windows host) executes both the QSPY host application and runs the QUTest scripts. The previous makefiles for POSIX have been renamed to posix_host.mak
, because they are intended to use POSIX as a host, as opposed to a target.
Also, this release adds new QUTest exampes, which illustrate:
qpc/examples/qutest/defer/
)qpc/examples/qutest/evt_par/
).Additionally, this release updates the QP/C ports to win32-qv and posix-qv to allow a "tickless" mode, where the "tickerThread" is not created. This mode is set by configuring the system clock tick rate to 0 (QF_setTickRate(0)).
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 header file.
The main purpose of this release is adding the context-switch callbacks to the preemptive QK and 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 NUCLEO-L053R8 (Cortex-M0+) and the 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.
Also, this release adds new project files for the Atollic TRUEstudio for STM32. The TRUEstudio projects (Eclipse) have been added for the NUCLEO-L053R8 (Cortex-M0+) and the NUCLEO-H743ZI (Cortex-M7).
Finally, this release updates the CMSIS to version 5.3.0 (see qpc/3rd_party/CMSIS
)
The main purpose of this release is adding the support for the ARM Compiler 6 (ARM-Clang), which is a C/C++ toolchain for ARM processors based on the modern Clang frontend and the LLVM framework. 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 (Cortex-M7 with FPv5-DP-D16-M). The 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.
Also, this release changes the ARM Cortex-M ports for the GNU-ARM toolchain in that it replaces the assembly modules with the equivalent C implementation. This change enables using wider range of GNU-ARM toolchain distributions, such as GNU-ARM Linaro, which had trouble with the assembly modules, but compiles correctly the C modules. All related GNU-ARM example projects have been modified to use the new C-ports.
Also, this release updates the existing projects for the Code Composer Studio (CCS) to CCSv7. All existing CCS projects for the EK-TM4C123GXL (TivaC LauchPad) and LaunchXL2-TMS57012 (Hercules) boards have been upgraded and tested.
Also, all examples for MSP430 with CCS have been updated to CCSv7 and re-tested on the supported boards.
The main purpose of this release is the provision of the official 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):
This release also replaces assembly with C implementation in the ARM-KEIL ports or the QK and QXK kernels to Cortex-M to take advantage of the __asm
functions. (NOTE: this change has impact on the existing QP/C applications that use the ARM-KEIL toolchain and the QK or QXK kernels.)
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 embOS port and the uC/OS-II port.
Finally, this release fixes the following bug in the ThreadX port:
Changes since version 6.0.1:
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).qpc/examples/win32/dpp-comp
. This example demonstrates also a partitioned QM model into external packages for the Container (Table active object) and the Components (Philo active objects).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:
Additionally, this release fixes the following bug in transitions to "shallow history":
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.
Additionally, this release changes the QXK implementation related to the bug#186 "QXK: Extended thread context switch causes assertion in PendSV_Handler". 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.
This release fixes two bugs found in the QXK kernel:
Additionally, this release includes a fix for the bug found in ARM Cortex-M0 port with the GNU-ARM compiler:
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. The bug affected the GNU-ARM ports to all built-in kernels QV, QK, and QXK.
qpc/source
, which was scheduled to be phased out in QP5. In QP6 the source code is found only in the qpc/src
directory.This release implements the feature request #132 "Extend the QXK mutex to support also simple operation without the priority-ceiling protocol".
Specifically, the QXMutex class has been extended as follows:
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.This release fixes the QXK kernel bug#182 " Inconsistent QXThread_post_() behavior with respect to the 'margin' parameter".
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)
.
Improved comments in the source code.
Modified ARM Cortex-M examples with the GNU-ARM toolset to be consistent with QP/C ++ (support for RTTI and C++ Exception handling), as follows:
_init()
and _fini()
from the GNU-ARM startup code for all supported boards in the 3rd_party
directory__libc_init_array()
in the GNU-ARM startup code for all supported boards in the 3rd_party
directory (because it requires _init()
)__exidx_start = .; .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >RAM __exidx_end = .;
The main focus of this release are new requested features for the dual-mode QXK kernel:
Additionally, this release adds also the non-blocking QXSemaphore_tryWait() operation.
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 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:
tickRate
parameter. This also breaks backward-compatiblity with the existing code that uses these operations.This release also updates CMSIS to version 5.1.0 (3rd_party/CMSIS).
This release also adds the API Reference section to the QP/C documentation.
Finally, this release fixes the following bug:
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).
This release also fixes a bug inside the assertions in QXSemaphore_signal(), where the check for the extended-thread is performed.
Also, this release adds assertions to the QXK code, which ensure that any available blocking calls can only be made from extended-threads and not from basic-threads (active objects) or ISRs.
Also, this release adds protection in the IRQ priorities initialization in QK/QV/QXK for ARM Cortex-M3/M4/M7, so that the number of IRQs is extracted from bits 0-2 of the ICTR register (INTLINESNUM).
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.
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.
QXTHREAD_START(&XT_Test1->super ~~~)
need to be changed to QXTHREAD_START(XT_Test1 ~~~)
, where XT_Test1 is a pointer to QXThread *
.This release fixes the following bugs:
3rd_party
directory. Specifically, the proper alignment directives have been added to the inline assembly in the exception handlers.This release fixes the naming problem of the startup code for the STM32F7-Discovery board (in the 3rd_party/stm32f7-discovery/gnu/ and arm/
directories), where the startup code was renamed from startup_stm32f4xx.c/s
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).
This release adds Thread-Local Storage (TLS) feature for the dual-mode QXK kernel (see srs-qp_qxk_tls).
This release implements the feature request #126 "Allow non-asserting event allocation for zero-margin allocations". Specifically, calling Q_NEW_X() or QACTIVE_POST_X() with the margin argument of zero will no longer assert if the allocation/posting fails.
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) for Windows.
Also, this release improves the flash loading scripts for the JLink hardware debugger (for GNU-ARM projects for the EFM32-SLSTK3401A board). Specifically, the JLink configuration file for flash download is generated by the flash batch script based on the command-line parameter (the binary file to load into the flash). This eliminates the need to manually maintain JLink configuration files.
Also, this release adds bi-directional QP/Spy to the embOS example project for the STM32F4-Discovery board.
Also, this release adds GNU-ARM port to uC/OS-II and adds GNU-ARM example project for the EK-TM4C123GXL board.
Finally, this release implements the feature request #125 "Include QPC Demo application for STM32F4 processor without RTOS" (see https://sourceforge.net/p/qpc/feature-requests/125/ ). The DPP demo for the STM32F4-Discovery board has been added in the directory: qpc/examples/arm-cm/dpp_stm32f4-discovery . This demo includes QV, QK and QXK kernels and ARM-Keil, GNU-ARM, and IAR-ARM toolsets. The demos support bi-directional QP/Spy.
This release fixes the following bug:
Also, this release changes the organization of the QP/C source code to make it more friendly for the Eclipse CDT, as proposed in the feature request #123 "Eclipse-friendly source directory structure for QP/C /C++". Specifically, the QP/C source code is now provided in the qpc/src/
directory with the following structure:
qpc/ +-source/ - existing source directory with "flat" structure | (for backwards-compatibility) +-src/ - new source directory grouped by functionality +-qf/ - core framework (QEP + QF) +-qk/ - QK kernel +-qv/ - QV kernel (only one file qv.c) +-qxk/ - QXK kernel +-qs/ - QS software tracing +-qf_pkg.h +-qs_pkg.h +-qxk_pkg.h
qpc/source
directory is still provided for backwards compatibility with the existing QP/C projects. This directory will be phased out in the future QP/C releases. Please use the new source code structure provided in the qpc/src
directory.The main purpose of this milestone QP/C release is to provide support for the powerful Unit Testing Framework called QUTest™ (pronounced cutest). QUTest™ is the fundamental tooling for Test-Driven Development (TDD) of QP/C applications, which is a highly recommended best-practice. This release introduces changes in the QS-RX (receive) channel and adds several new callbacks.
This release also changes the critical section for QP/C ports to ARM Cortex-M in that the policy of "save and restore interrupt status" is used. This policy permits nesting of critical sections, which was requested by customers.
Additionally, this release changes the selective interrupt disabling for ARM Cortex-M3/4/7 (with the BASEPRI register) to address the hardware problem on ARM Cortex-M7 core r0p1 (SDEN-1068427, erratum 837070). The QP ports to ARM Cortex-M3/4/7 now implement the workaround recommended by ARM, which is to surround MSR BASEPRI with the "CPSID i"/"CPSIE i" pair. This workaround works also for Cortex-M3/M4 cores.
New ports:
New examples:
Updates of 3rd_party software:
Finally, this release fixes the following bugs:
This release adds examples for the ARM Cortex-M7 CPU. Specifically, the release contains the standard Dining Philosophers Problem (DPP) examples for the STM32F746G-Discovery board, all built-in kernels (QV, QK, and QXK), and ARM-KEIL, IAR EWARM, GNU-ARM toolsets.
To provide examples for STM32F746G-Discovery board, the release now provides the folder 3rd_party/stm32f7-discovery
with the support code for the STM32F7xx MCUs, which contains parts of STM32CubeF7 library.
Also, the 3rd_party/CMSIS
folder now provides the new CMSIS V5.0.1.
Finally, this release fixes the following bugs:
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, as described in the AppNote "Setting ARM Cortex-M Interrupt Priorities in QP 5.x".
Specifically, this release improves safety of QP ports to ARM Cortex-M3/M4, by initializing the interrupt priorities to a safe default in a generic, portable way. This QP port includes such a fix for QV/QK/QXK ports to ARM Cortex-M3/M4.
Additionally, this release introduces the new QTicker class, which is an efficient active object specialized to process QF system clock tick at a specified tick frequency [0..(QF_MAX_TICK_RATE - 1)]. 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.
Changes in detail:
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.
This release changes the class hierarchy so that QHsm becomes the base class of QMsm and QActive. Also, QActive becomes the base class of QMActive, which reverses the changes introduced in version 4.1.
The modified class hierarchy better reflects the fact that QHsm state machine implementation strategy is simpler and supports less functionality than the more advanced QMsm strategy. For example, only the QMsm class fully supports sub-machines and sub-machine states that are the main feature of QM 4.x. This clean progression of supported functionality from subclasses to superclasses allows QM to easier check and enforce that advanced features are not generated for subclasses that don't have the required capabilities. (With previous class hierarchy with QMsm as the base class all subclasses, including QHsm, would technically inherit the advanced functionality, which is not the case).
Also, this release changes the implementation of the QV, QK, and QXK kernels in that the ready-set representing active threads is cleared only after completion of the RTC-step, not when the last event is removed from the corresponding event queue. In case of the QXK kernel this change fixes the high-priority bug#147. But even in case of the QV and QK kernels, where this behavior didn't lead to any bugs, the policy better reflects the semantics of the ready-set.
This release also updates the CMSIS interface included in the 3rd_party/CMSIS folder to the latest CMSIS-5.
All examples and QM models have been updated to the new upcoming QM 4.0.0. All these models require QM 4.x.
Finally, the complete list of bugs fixed in this release is as follows:
This release fixes the following bugs:
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 (TivaC LaunchPad) in the directory:
qpc/examples/ti-rtos/arm-cm/dpp_ek-tm4c123gxl
NOTE: The examples require a separate installation of the TI-RTOS (file tirtos_tivac_setupwin32_2_16_01_14.exe)
Also, this release fixes the following bugs:
This is the first production release of the "dual-mode" QXK kernel. "Dual-mode" QXK means that QXK supports both basic-threads (BC1 class from the OSEK/VDX RTOS specification) as well as extended-threads (EC1 class from the OSEK/VDX RTOS specification. In other words, QXK executes active objects (basic threads) like the QK kernel using the single stack (Main Stack on ARM Cortex-M), but can also execute traditional blocking threads (extended threads).
Only the extended threads (QXThread class) need their private stack spaces and the overhead of the full context switch. The basic threads (QMActive and QActive classes) run efficiently using the main stack with much lower context switch overhead.
The QXK examples have been updated for more thorough demonstration of the QXK features. The QXK examples are available in the following directories: dpp_efm32-slstk3401a, dpp_ek-tm4c123gxl, and dpp_nucleo-l053r8.
This release fixes several issues in QXK 5.7.1-beta with handling timeouts while blocking in extended-threads, such as timed blocking on event queues and semaphores.
This release also changes the internal QK implementation to match the terminology applied in the QXK kernel (e.g., QK_sched_() has been renamed to QK_activate_() and QK_schedPrio_() to QK_sched_()). These changes fall into the category of refactoring and have no impact on the API or performance.
Finally, this release improves the implementation of scheduler locking in publish-subscribe event delivery.
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.
Also, this release adds support for the ARM Cortex-R processor. Specifically, the release contains a generic port to ARM Cortex-R with the IAR and TI-CCS toolsets and examples for the TI Hercules TMS570LS12x safety MCU (LAUNCHPADXL2-TMS57012).
Also, this release changes once more the QK port to ARM Cortex-M, to reduce the interrupt latecy. This has been achieved by shortening the critical section in the PendSV exception.
Also, this release changes slightly the QXK port to ARM Cortex-M, where again the critical section in PendSV has been slightly shortened.
Finally, this release replaces all absolute paths with relative paths in all CCS-Eclipse project files (for TivaC, Hercules, and MSP430).
Changes in detail:
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).
This release also introduces a new version of the QWIN GUI Toolkit in the Windows prototypes for the "Fly 'n' Shoot" game and the DPP-GUI version (see https://www.state-machine.com/products/qtools/#QWin).
Additionally, this release also includes the QP/C integration with the emWin emgedded GUI from SEGGER, which is also the same product as uC/GUI distributed by Micrium (exa_emwin).
Finally, this release comes with updated project files for TI Code Composer Studio (both for ARM Cortex-M and for MSP430).
This release fixes the following bugs:
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
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.
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).
The atomic event multicasting is implemented by means of selective scheduler locking–very much like a priory-ceiling mutex. During event multicasting the scheduler gets locked, but only up to the highest-priority subscriber to a given event. The whole point here is that active objects with priorities above such "priority ceiling" are not affected. Please see the discussion thread:
https://sourceforge.net/p/qpc/discussion/668726/thread/c186bf45
This release also changes the implementation of the priority-ceiling mutex in the preemptive built-in kernels: QK and QXK. Specifically, the implementation now re-uses the selective scheduler locking mechanism. In this new implementation, the QXMutex of the QXK kernel is much more efficient and lightweight, but it cannot block while holding a mutex.
Finally, this release changes the QP ports to 3rd-party RTOSes by performing any RTOS operations (like posting events to message queues) outside critical sections. Also the ports have been augmented to support scheduler locking (this feature depends on what's available in the specific RTOSes).
Changes in detail:
This release is the first official (production) release of the new blocking QXK kernel.
Changes in detail:
The main purpose of this beta release is to introduce a new component of the QP/C framework called 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.
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.
Additionally, this release re-designs the priority-ceiling mutex in the QK kernel, which now works the same as the mutex of the new QXK kernel. Also, the QK ports to ARM Cortex-M no longer need or use the SVC_Handler (Supervisor Call). This is done to make the QK ports compatible with various "hypervisors" (such as mbed uVisor or Nordic SoftDevice), which use the SVC exception.
Finally, this release modifies the GNU-ARM ports of QK for ARM Cortex-M, to use the __ARM_ARCH macro to distinguish among different architectures (ARCHv6 vs ARCHv7).
Changes in detail:
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 handler in assembly did not always maintain the 8-byte stack alignment, which is required by AAPCS. This version corrects the stack misalignment in the qk_port.s files for all supported ARM compilers (ARM-Keil, GNU, IAR, and TI CCS). All these ports should also be ready for ARM Cortex-M7.
Also, this release adds support for the TI CCS ARM compiler. Specifically, a new ARM Cortex-M ports have been added (in directories qpc/ports/arm-cm/qk/ti/
and qpc/ports/arm-cm/qk/ti/
) and TI CCS example projects have been provided (in directories qpc/examples/arm-cm/dpp_ek-tm4c123gxl/qk/ti/
and qpc/examples/arm-cm/dpp_ek-tm4c123gxl/qv/ti/
).
Finally, this release corrects a bug in the DPP example for EK-TM4C123GXL with the QV non-preemptive kernel. Specifically, the file qpc/examples/arm-cm/dpp_ek-tm4c123gxl/qv/bsp.c
did not re-enable interrupts in the QV_onIdle() callback.
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:
This QP/C version complements the recent release of Qtools 5.5.0, where the QSPY host application has been extended with a UDP socket, which is open for communication with various Front-Ends (GUI-based or headless). An example Front-End written in Tcl/Tk called "QspyView" has been developed to demonstrate all the features. The example application located in the directory qpc/examples/arm-cm/dpp_ek-tm4c123gxl/qspy contains customization of the "qspyview" script for the DPP application. Please refer to the documentation of this example (arm-cm_dpp_ek-tm4c123gxl) for more information.
Finally, this release adds a state machine operation for implementing the shallow history mechanism. The operation is called "childState", because it computes a child state of a given parent, such that the child belongs to the same state hierarchy as the current state.
Changes in detail:
qpc/examples/arm-cm/dpp_ek-tm4c123gxl/
) to demonstrate QS-RX (QS receive channel).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).
The support for "dual targeting" in this QP/C release works both for Win32 console and Win32 GUI applications. The Win32-GUI support enables developers to easily emulate the front-panels of the embedded devices, with LCD-screens (graphical and segmented), LEDs, buttons, switches, sliders, etc.
Changes in detail:
<stdio.h>
and <string.h>
to the QP/C ports to Windows. These macros encapsulate the differences between Microsoft Visual C++ and other compilers (such as MinGW).examples/win32/
and examples/win32-qv directories to examples/arm-cm/
directory with native embedded examples for ARM Cortex-M. This co-location of the Win32 emulation with the embedded code running on the actual board demonstrates better the "dual targeting" development approach.examples/arm-cm/dpp_ek-tm4c123gxl/lint
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 QP/C Design shows the current class hierarchy.
Also, this release brings several cosmetic improvements:
qpc/ports/arm-cm/qk/gnu/qk_port.s
ARM Cortex-M port to QK with GNU has been modified to use the CMSIS-compliant symbol __FPU_PRESENT instead of the FPU_VFP_V4_SP_D16 symbol./
(back-slash) characters in the paths have been repalced with /
(forward-slash) characters. Also all these Makefiles have been updated to provide the __FPU_PRESENT to C and assembler when the hardware FPU is used.qpc/3rd_party/ek-lm3s811/display96x16x1.c
has been modified to fix the problem with incorrect hardware delay with the GNU compiler at higher levels of optimization. The in-line assembly for the GNU compiler has been updated such that the delay loop cannot be "optimized away".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 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.)
The move to building QP/C from sources ensures the consistent toolset version and compiler options applied to the application code as well as the QP/C framework code. (NOTE: The QP/C examples for "big operating systems", like Windows/POSIX, still use QP/C as a pre-compiled library that is statically linked with the application code.)
The two changes in basic approach to distributing and building the framework have also the following ripple effects:
source/
folder. Additionally, the source code files have now the read-only protection to prevent inadvertent changes to the QP/C source code that is part of your projects.ports/
folder has been reorganized to contain all currently available QP/C ports. The ports are organized into three categories: native QP/C ports ("bare-metal"), ports to 3rd-party RTOSes, and ports to big operating systems (Windows and Linux).(NOTE: the ports are now documented in the this QP/C Reference Manual. Each port sub-directory contains a README
link to the corresponding page in the online documentation)exa/
folder has been reorganized to reduce the repetitions and contains all currently available QP/C examples. The folder includes four categories of examples: native QP/C examples ("bare-metal"), examples for 3rd-party RTOSes, examples for big operating systems (Windows and Linux), and examples for 3rd-party Middleware. As mentioned before, all example projects for embedded systems use QP/C as source code and not as a library. The examples/
folder has been expanded to contain all currently available QP/C examples, many of them are new in this release. (NOTE: the currently available examples are now documented in the QP/C Reference Manual. Each example sub-directory contains a README
link to the corresponding page in the online documentation)3rd_party/
folder created to contain the Third-Party code used in the QP/C ports and examples, such as MCU register files, low-level startup code, device drivers, etc. The 3rd_party/
folder avoids the need to repeat such code in every project. Also, the separation of the Third-Party components helps to clearly indicate code that comes from various sources, and to which Quantum Leaps, LLC expressly makes no claims of ownership. The Third-Party software components included in this "3rd_party" folder are licensed under a variety of different licensing terms that are defined by the respective owners of this software and are spelled out in the README.txt or LICENSE.txt files included in the respective sub-folders.Changes in detail:
QF_intNest_
up-down counter.This release fixes the following bugs:
Additionally, this release improves the uC/OS-II port in that it is now generic and applicable for any CPU, for which uC/OS-II port exists. Specifically, all references to DOS or x86 have been removed from the QP port and any CPU-specific dependencies have been placed in the separate part of the port.
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
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 supports the "transition to history" connector and the corresponding code generation for transitions to history.
This release adds new QS (Quantum Spy) instrumentation for tracing transitions to history as well as entry and exit points in submachines. All these features require the matching QSPY host application included in Qtools 5.3.0.
Additionally, the QMsm state machine has been extended to add implementation of the reusable submachine states and submachines with entry points and exit points. The reusable submachines in QP/C 5.3.0 lay the groundwork for providing reusable submachine states and submachine diagrams in the next upcoming QM version.
This release also goes several steps towards compliance with the new MISRA-C:2012 rules. For example, unused tag declarations have been removed (MISRA-C:2012 Rule 2.4), the C99 standard Boolean data type in <stdbool.h> has been added instead of uint8_t for stricter type analysis, and the C99 data types uint_fast8_t and uint_fast16_t are used instead of the non-standard uint_t.
Finally, this QP/C release brings deep changes in the source code comments and the doxygen documentation generated from the source code. All comments have now more consistent structure, and every function is now documented in the implementation file (.c file), whereas the interface (.h files) contain only the brief descriptions of the functions. This re-structuring of documentation is performed as part of the validation and verification effort that has begun to provide a certification package for QP/C for safety standards, such as IEC 61508 and ISO 62304 (FDA 510(k)).
Changes in detail:
This release fixes two bugs.
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 specifically designed to do.
This release also provides consistent API for late-binding ("virtual" functions) introduced in QP 5.0.0, as opposed to using regular linking (early-binding) for direct function calls, such as QHsm_dispatch(). A clearly separated API compatibility layer is provided, whereas you can configure a level of backwards compatibility by means of the QP_API_VERSION macro. This facilitates migrating existing QP applications to the newer API.
An cyclomatic complexity (McCabe V(G)) analysis of this version has been performed and the maximum V(G) complexity per function has been reduced to 15 by breaking up the QHsm_dispatch_() function. The code metrics report, including cyclomatic complexity by function as well as other standard code metrics (e.g., lines of code), is now included in the "QP/C Reference Manual", see https://www.state-machine.com/qpc/metrics.html
Also, in this release all internal QP data that were previously uninitialized are now explicitly initialized to zero. In other words, this release no longer assumes that all uninitialized data (global and static inside functions) is implicitly initialized to zero before the control is transferred to main(). This is a requirement of the C Standard, but some embedded startup code fails to do this.
Finally, this release demonstrates safer stack allocation and safer exception handlers in all ARM Cortex-M examples. The techniques are described in the Embedded.com article "Are We Shooting Ourselves in the Foot with Stack Overflow?".
Changes in detail:
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 non-preemptive QV kernel. Also, the native QP event queue implementation has been changed to count the extra "front-event" location into the number of free entries, which fixes the problem of defer queues of depth 1. Finally, the release restores the support for linting (with PC-Lint) of the QP/C applications for ARM Cortex-M (with IAR and GNU compilers).
Changes in detail:
This release brings significant improvements to the QS software tracing implementation and also brings important changes the ARM Cortex-M port.
Changes to the QS software tracing component in detail:
Overall, lab tests for ARM Cortex-M4 with the IAR compiler show that the processing time of the QS_u32_() function (the one frequently used to store pointers and timestamps) dropped from 233 CPU cycles for QP 5.0 with low-level optimization to just 76 cycles for QP 5.1 with high-level of optimization. At the same time, the code size of this function dropped from 876 bytes to 274 bytes.
Changes to the QP ports to ARM Cortex-M in detail:
QP 5.1.0 never completely disables interrupts in the ARM Cortex-M3/M4 cores, even inside the critical sections. On Cortex-M3/M4 (ARMv7-M architectures), the QP port disables interrupts selectively using the BASEPRI register. (NOTE: The BASEPRI register is not implemented in the ARMv6-M architecture (Cortex-M0/M0+), so Cortex-M0/M0+ need to use the PRIMASK register to disable interrupts globally).
This new policy of disabling interrupts divides interrupts into "kernel-unaware" interrupts, which are never disabled, and "kernel-aware" interrupts, which are disabled in the QP critical sections. Only "kernel-aware" interrupts are allowed to call QP services. "Kernel-unaware" interrupts are NOT allowed to call any QP services and they can communicate with QP only by triggering a "kernel-aware" interrupt (which can post or publish events).
As mentioned above, all QP ports to ARM Cortex-M included in the QP 5.1.0 Baseline Code provide the constant QF_AWARE_ISR_CMSIS_PRI, which must be used to offset the "kernel-aware" interrupt priorities.
All example projects for ARM Cortex-M included in the QP 5.1.0 Baseline Code demonstrate the recommended way of assigning interrupt priorities in your applications. The initialization consist of two steps:
For more information, please read the short Application Note "Setting ARM Cortex-M Interrupt Priorities in QP 5.1" available at: https://www.state-machine.com/doc/AN_ARM-Cortex-M_Interrupt-Priorities.pdf
The main purpose of this milestone QP/C release is to enable the QM modeling tool to generate a new type of state machine code (requires QM version 3.0.0, which is still in development as of this writing).
This new type of state machine implementation in QP/C 5 is based on the new QMsm class, which takes advantage of the QM tool as an advanced "state machine compiler". QM can perform optimizations that were not possible with the C pre-processor alone. Specifically, the QM can easily determine the LCA (Least-Common-Ancestor) state for every transition and it can generate the complete transition-sequences (sequences of exit/entry/initial actions) at code-generation time. The resulting code can be still highly human-readable, but it will no longer be human-maintainable. The lab tests indicate that the new "housekeeping" code for executing hierarchical state machines can be about twice as fast as the previous code based on the QHsm class. Additionally, the new code requires less run-time support (smaller event processor) and uses 70% less of stack space in the call to the QMsm_dispatch() operation than QHsm_dispatch().
The next big feature introduced in QP/C 5 is polymorphism ("virtual" functions) for basic operations, such as state machine init() and dispatch() and active object start(), post(), and postLIFO() perations. Making these functions "virtual" means that all these operations can be re-defined in sub-classes of state machines and active objects. This, in turn, allows a single application to use a mix of state machine classes derived from the new QMsm base class with state machines derived from the QHsm base class, each one using a different state machine implementation strategy. Additionally, the virtual post() operation could be very useful for implementing various Proxy active objects (e.g., for active object event posting across networks).
Another big feature introduced in QP/C 5 are the multiple, independent system clock tick rates for time events. The number of system tick rates can be now configured in the QP/C ports. For example, a digital watch can use a "fast" clock tick rate of 100Hz and a "slow" clock tick rate of only 1Hz. These clock tick rates can be managed independently, so for example, the fast clock tick rate can be shut down in the absence of time events assigned to this rate. This feature allows the applications to implement sophisticated power-saving policies.
As yet another important feature, QP/C adds a new "extended" API for non-asserting event allocation and posting. This feature is intended for situations, where an application is hammered with external events that at times arrive too fast for processing, but that can be ignored under the overload conditions. In those cases firing an assertion inside the framework is undesirable. The non-asserting API allows a designer to request a safety-margin when allocating or posting an event. The event is not allocated/posted if the safety margin cannot be satisfied at the time of the call. On the other hand, the safety margin allows the application to still use the regular (asserting) event allocation and posting, because the event pools and event queues are guaranteed to maintain a minimal margin for safe operation.
Finally, QP/C adds a number of smaller features and improvements, summarized in the following detailed list of changes:
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 FPU registers, and by doing so offer the most efficient preemptive multitasking on this processor.
Changes in detail:
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 level up to ports/. Also, the OS examples are moved from the examples/80x86/ directory one level up to examples/.
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 release adds a complete toolkit for creating realistic embedded front panels with pure Win32-GUI API and free Visual C++ Express and ResEdit. An extensive Application Note "QP and Win32" is included in this release.
This release simplifies the QP ports to desktop OSs, such as Windows (Win32), Linux, BSD, Mac OSX (POSIX) and combines 32-bit and 64-bit ports in one with conditional compilation.
This release also adds an option for using initialization for dynamically allocated events. When the configuration macro Q_EVT_CTOR is defined, the Q_NEW() macro becomes variadic and takes the arguments for the event initialization. This generally allows creating dynamic events "on-the-fly" without a temporary pointer to the event. This QP configuration is demonstrated only in the QP port to Qt, but can be used in any other port.
This release also adds a new macro QF_MPOOL_EL, which is intended for allocating properly aligned storage for memory pools and event pools.
All QP ports included in this release use only a single QP library, rather than separate libraries for QEP, QF, QK, and QS.
Finally, this release adds QM models, created with the new QM 2.2.00 to most of the examples. The code generated by this new QM version complies with MISRA-C:2004 rules.
Changes in detail:
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 condition evaluates to FALSE, but the state model does not prescribe the explicit [else] case for this guard. In this case, the state handler can return Q_UNHANDLED(), which will cause the QEP event processor to propagate the event to the superstate, which is what UML semantics prescribes.
Changes in detail:
The main purpose of this release 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 Qt GUI framework, which allows developers to easily build host-based simulations of the embedded systems with the realistic user interfaces.
This realase also simplifies implementing transitions to history, which is a preparation to providing this feature in the QM modeling tool.
Changes in detail:
The release 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.
The main purpose of this release is MISRA-C:2004 compliance, strong-type checking compliance, update of PC-Lint option files and tests, and general cleanup.
The main purpose of this release 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 the PendSV exception. In this case the PENDSVSET bit in the NVIC-ICSR register is not cleared when finally PendSV is entered, so the PendSV exception is entered in a different state when it is entered via the late-arrival mechanism versus the normal activation of the exception through tail-chaining. The consequence of this undocumented and inconsistent hardware behavior, PendSV could be re-entered again before the SVCall exception cleans up the stack. The bug fix is implemented in the qk_port.s file and consists of clearing the PENDSVSET bit programmatically inside PendSV_Handler.
qpc/
in the archive. That way, unziping the archive will produce only one directory (qpc/
), which can be then changed by the user.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 improvements to the QS/QSPY software tracing, such as adding sender information to event posting so that sequence diagrams could be easily and automatically reconstructed from tracing data. Also, the tracing now supports 64-bit targets, such as embedded Linux 64-bit. Finally, this milestone release migrates the examples to use the environment variable QPC instead of relying on the relative path to the QP/C framework. This allows easier adaptation of the examples for real projects, which don't really belong to the examples directory.
The changes in detail are:
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: Microsoft Visual Studio and MinGW (GNU). The support for Linux has been improved by including pre-built QP/C libraries and improving makefiles for Eclipse compatibility.
The changes in detail are:
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.
Specifically, the directory <qpc>/examples/80x86/dos/watcom/l/game-qm/
contains the "Fly 'n' Shoot" game model file "game.qm". This model, when opened in the QM tool contains all state machine diagrams and generates code into the subdirectory qm_code/. This code can then be built and executed on any 80x86 machine (newer versions of Windows or Linux require the DOSbox application, see http://www.dosbox.com).
The directory <qpc>/examples/arm-cortex/vanilla/iar/game-ev-lm3s811-qm/
contains the version of the game for the EV-LM3S811 ARM Cortex-M3 board. This directory contains the model file "game.qm", which is actually identical as the model in the DOS version. The LM3S811 version needs to be compiled with the IAR compiler and executed on the EV-LM3S811 board.
Additionally, the QP/C baseline code has been slightly modified for better conformance to the MISRA C 2004 rules and the latest PC-Lint 9.x.
This release is adds compatibility of all examples for DOS with the DOSBox 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.
Also, this release includes QP ports and examples for EV-LM3S811 board with the GNU-based Code Sourcery G++ toolset. Support for Sourcery G++ provides a very cost-effective option for developing QP Applications for ARM Cortex MCUs.
Finally, this release improves the Cortex Microcontroller Software Interface Standard (CMSIS) for the whole family of the Stellaris LM3Sxxx MCUs. The improvement extends the CMSIS from Sandstorm to Fury, DustDevil, and Tempest Stellaris families.
This release is concerned with the ARM Cortex ports and examples. Specifically, this release contains the following improvements:
In the process of making the examples CMSIS-compliant, the dependency on the Luminary Micro driver library (driverlib.a) has been completely removed.
Additionally, the screen saver of the "Fly 'n' Shoot" game has been improved to periodically switch off the power of the OLED display, which better protects the display from burn-in. The affected file is tunnel.c.
Finally, this release introduces the QP_VERSION macro, which identifies the QP version. Otherwise, this maintenance release does not change the QP/C API in any way, so the release has NO IMPACT on the QP/C applications except for the ARM Cortex ports and applications.
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 it actually applies to wider range of ARM Cortex cores. Consequently, all ARM Cortex ports and examples are hosted in the directory tree called "arm-cortex".
This maintenance release does not change the QP/C API in any way, so the release has NO IMPACT on the QP/C applications except for the ARM Cortex ports and applications.
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 an OSI-certified open source license, which permits free commercial and non-commercial use. Open Watcom can be downloaded from www.openwatcom.org.
All 80x86/DOS, 80x86/qk, and 80x86/ucos2 ports and examples for Turbo C++ 1.01 have been replaced with ports and examples for Open Watcom. The make.bat scripts are provided to build the QP/C libraries and examples.
In the process of converting the examples to Open Watcom two new examples have been added to the standard QP/C distribution. The Calc2 example located in <qpc>/examples/80x86/dos/watcom/l/calc2 shows how to derive state machine classes with QP 4.x. The SLS example located in <qpc>/examples/80x86/dos/watcom/l/sls shows the implementation of the new State-Local Storage state design pattern.
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.
This maintenance release does not change the QP/C API in any way, so the release has NO IMPACT on the QP/C applications.
The main changes in QP v4.1.00 with respect to earlier versions are as follows:
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.
This maintenance release does not change the QP/C API in any way, so the release has NO IMPACT on the QP/C applications.
The main changes in QP v4.0.04 with respect to earlier version are as follows:
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 QK extended context switch. When the QK mutex is in use, the TLS or the extended context for this task could get saved to an incorrect priority level.
The release 4.0.03 fixes the bug by strictly preserving the semantics of QK_currPrio_ variable. The mutex locking now uses a different variable QK_ceilingPrio_, which represents the ceiling-priority locked by the mutex. The QK scheduler and extended scheduler now perform an additional check to make sure that only tasks with priorities above the ceiling can run. To avoid that additional overhead, the user can define the macro QK_NO_MUTEX, which eliminates the QK mutex API and eliminates the additional tests in the QK schedulers.
This maintenance release does not change the QP/C API in any way, so the release has NO IMPACT on the QP/C applications.
The main changes in QP v4.0.03 with respect to earlier version are as follows:
This maintenance release does not change the QP/C API in any way, so the release has NO IMPACT on the QP/C applications.
The main changes in QP v4.0.02 with respect to earlier version are as follows:
This maintenance 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.
This maintenance release does not change the QP/C API in any way, so the release has NO IMPACT on the QP/C applications.
The main changes in QP v4.0.01 with respect to earlier version are as follows:
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 /ref main_page "QP/C Reference Manual", which provides very detailed, easily searchable reference to the software. The book /ref PSiCC2 provides in-depth discussion of the relevant concepts as well as the design study of QP v4.0.
The main changes in QP v4.0 with respect to earlier versions are as follows: