extends
and memberof
to indicate inheritance and to explicitly specify base classes for all derived classes (e.g., QActive extends QHsm).Fixedhe following bugs:
This release updates the QP-nano 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.).
Finally, this release consistently applies the Q_NORETURN macro to the Q_onAssert() implementations in the QP-nano examples.
Source code changes:
(uint8_t)0
, which is now coded simply as 0U
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-nano 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 qpn/ports/lint-plus/.
This release also includes the offline documentation for this particular version of QP-nano (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-nano remains located at: https://www.state-machine.com/qpc/ )
Also, this release drops (no longer supports) the following depricated facilities from the qpn.h header file:
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 (qpn\examples\arm-cm\game_efm32-slstk3401a\win32-gui) and the DPP-GUI example (qpn\examples\arm-cm\dpp_efm32-slstk3401a\win32-gui) have been updated to build with the Visual Studio 2019.
Finally, this release fixes the following bugs:
The main purpose of this release is the change in distribution of the QP-nano framework, which is now bundled together with the other QP frameworks (QP/C and QP/C++) 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:
This release adds ports and examples for PIC24/dsPIC 16-bit MCUs with MPLAB-X and XC16 compiler toolchain.
This QP-nano release matches the QM release 4.5.0, which introduced new implementation for QP/C++. Even though this has no impact on the QP-nano state machine implementation with QM, this release is needed for compatibility checking between QP and QM. This release comes with several models for QM 4.5.0.
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 purpose of this release is re-designing of the examples for workstations (previously win32-qv
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.
This release fixes the following bugs:
Also, this release demonstrates the new features of QM 4.3.0 in several example models (qpn/examples/ directory).
Finally, this release updates 3rd_party/CMSIS/Include
to the latest version from GitHub.
This release improves the command-line scripts for flash programming of the supported MCUs. Specifically, the flash.bat batch files for EFM32-SLSTK3401A, EK-TM4C123GXL, and for Arudino UNO have been updated.
This release updates the QP-nano 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)).
Additionally, this revision updates the posix-qv port implementation to wait for the condition variable in a customary wile() loop.
The main purpose of this release is adding the context-switch callback to the preemptive QK-nano kernel. The QK_onContextSw() callback function provides a mechanism to perform additional custom operations when QK 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 callback is enabled only when the macro QK_ON_CONTEXT_SW is defined. The macro can be defined either directly in command-line for the compiler, or in the QK-nano port file (qpn_port.h). Examples for the context-switch callbacks have been provided for the NUCLEO-L053R8 (Cortex-M0+) and the EK-TM4C123GXL (Cortex-M4F).
Another 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-nano and QK-nano) for the ARM Cortex-M CPU cores.
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. All existing example projects for IAR-ARM have been updated to use the qkn_port.c
files instead of qkn_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-L152RE (Cortex-M3).
Finally, this relese updates the CMSIS to version 5.3.0 (see qpn/3rd_party/CMSIS
This release replaces assembly with C implementation in the ARM-KEIL ports or the QK-nano kernel to Cortex-M to take advantage of the __asm
functions. (NOTE: this change has impact on the existing QP-nano applications that use the ARM-KEIL toolchain and the QK kernel.)
Also, this release adds an example of the Dining Philosophers Problem (DPP) re-designed with the "Orthogonal Component" state pattern. The application uses only one active object (Table), while the Philos are stateful components of Table. The example is located in qpn\examples\win32-qv\dpp_comp
.
This release replaces attributes of QActive class and QTimeEvtCtr type from type uint_fast8_t to uint8_t. For the ARM Cortex-M port, these changes reduce the memory footprint of each QActive instance from 40 to 26 bytes (35% improvement).
Also, the ARM Cortex-M port and examples for the TI-ARM compiler have been removed. (Projects for the TI CCS can use the GNU-ARM toolchain and the existing GNU-ARM ports).
This release includes a workaround for the GNU-ARM compiler bug for the ARMv6-M architecture (Cortex-M0/M0+/M1), which can lead to generation of incorrect code for the QP-nano 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 both built-in kernels QV-nano and QK-nano.
qpn/source
, which was scheduled to be phased out in QP5. In QP6 the source code is found only in the qpn/src
directory.This release implements the feature request #126 "Allow non-asserting
event posting for zero-margin allocations". Specifically, calling ACTIVE_POST_X() and ACTIVE_POST_X_ISR() with the margin argument of zero will no longer assert if the allocation/posting fails. The asserting version is these macros uses the special value of the margin
argument of QF_NO_MARGIN.
Improved comments in the soruce code.
Modifed 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 = .;
This release phases out the QK-nano mutex and replaces it with an equivalent selective QK-nano scheduler locking up to the specified ceiling priority. Specifically, this feature has been implemented with two new operations QK_schedLock() and QK_schedUnlock(). This is done with consistency with the QK and QXK kernels in QP/C/C++. The advantage of the new implementation is also the ability of the scheduler locks to nest, which was not the case with the QK-nano mutex.
All related QK-nano 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:
This release also updates CMSIS to version 5.1.0 (3rd_party/CMSIS).
This release also adds the API Reference section to the QP-nano documentation.
This release changes the organization of the QP-nano 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". Specifically, the QP-nano source code is now provided in the qpn/src/
directory with the following structure:
qpn\ +-source\ - exitsting source directory with "flat" structure | (for backwards-compatibility) +-src\ - new source directory grouped by functionality +-qfn\ - core framework (QEP-nano + QF-nano) +-qkn\ - QK-nano kernel +-qvn\ - QV-nano kernel
This release consistently changes all example projects (for all toolchains) to use the src/ directory for QP-nano source code, instead of the source/ directory.
qpn/source
directory is still provided for backwards compatibility with the existing QP-nano projects. This directory will be phased out in the future QP-nano releases. Please use the new source code structure provided in the qpn/src
directory.Finally, this release adds protection in the IRQ priorities initialization in QK-nano/QV-nano for ARM Cortex-M3/M4/M7, so that the number of IRQs is extracted from bits 0-2 of the ICTR register (INTLINESNUM).
This release fixes the following bug:
3rd_party
directory. Specifically, the proper alignment directives have been added to the inline assembly in the exception handlers.This release fixes the following bugs:
Additionally, 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.
This release also upgrades CMSIS to version 5.0.2.
This release improves compatibility of assertion numbering between QP-nano and QP/C/C++. Specifically, qepn.c file now uses the same assertion-IDs as qep_hsm.c (QP/C) and qep_hsm.cpp (QP/C++).
This release upgrades CMSIS to version 5.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-nano/QK-nano ports to ARM Cortex-M3/M4.
Changes in detail:
This release simplifies the QP-nano framework by removing the QMsm-style state machine implementation strategy introduced in version 5.0.0. Moving forward, the only supported state machine implementation strategy in QP-nano will be the QHsm-strategy and the upcoming QM 4.x will provide only the QHsm-strategy for QP-nano applications.
Specifically, the QMsm base class, and QMActive base class have been removed, along with the accompanying macros. The QP-nano compatibility layer (file qpn.h) provides some of these macros for backwards- compatibility, but the underlying implementation must be, in fact, based on QHsm.
All examples and QM models have been updated to use only the QHsm-style implementation strategy. The models also require the new upcoming QM 4.0.0.
Additionally, this release fixes the following bugs:
-bug#144 Obsolete Win32 API in qwin_gui.c
Finally, this release includes the latest CMSIS-5, which now replaces the older CMSIS-4.5.
This release fixes the following bugs:
This release changes the internal QK-nano implementation to match the QK kernel implementation used in QP/C and QP/C++. (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.
This release release changes once more the QK-nano 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 QK port to Cortex-M no longer uses the NMI exception.
Finally, this release replaces all absolute paths with relative paths in all CCS-Eclipse project files (for TivaC, Hercules, and MSP430).
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/index#QWIN).
Additionally, this release also includes the QP-nano integration with the emWin emgedded GUI from SEGGER, which is also the same product as uC/GUI distributed by Micrium (exa_emwin).
Finally, this relase 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 two serious bugs:
The main purpose of this release is to eliminate the need to define the QF_MAX_ACTIVE macro (the number of active objects) in qpn_conf.h header file and match it with the dimension of the QF_active[] global array.
Instead, starting with this QP-nano version, the dimension of the QF_active[] array can be passed as the argument to the QF_init() function, as follows: QF_init(Q_DIM(QF_active));
Changes in detail:
This QP-nano release provides a new version of the QK-nano ports to ARM Cortex-M, which do not use the SVC_Handler (Supervisor Call). This is done to make the QK-nano ports compatible with various "hypervisors" (such as mbed uVisor or Nordic SoftDevice), which use the SVC exception. This release contains the updated QK-nano ports to ARM Cortex-M for all supported compilers: ARM-Keil, GNU-ARM, IAR EWARM, and TI-CCS-ARM.
Changes in detail:
This release adds state machine operations for implementing the shallow history mechanism. The operations are called QMsm_childStateObj() and QHsm_childState(), for QMsm and QHsm classes, respectively, because they compute a child state of a given parent, such that the child belongs to the same state hierarchy as the current state.
This release also improves 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 qpn\ports\arm-cm\qk\ti\
and qpn\ports\arm-cm\qk\ti\
) and TI CCS example projects have been provided (in directories qpn\examples\arm-cm\dpp_ek-tm4c123gxl\qk\ti\
and qpn\examples\arm-cm\dpp_ek-tm4c123gxl\qv\ti\
).
Changes in detail:
qpn\ports\arm-cm\qk\ti\
and `qpn\ports\arm-cm\qk\ti\The main focus of this release is to improve the support for "dual targeting" of QP-nano 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-nano 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-nano port 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.This release changes the basic philosophy of packaging and distributing the QP-nano framework by combining the "QP-nano Baseline Code" with all currently available "QP-nano Development Kits" (QDK-nano). This is done to eliminate any potential mistakes in downloading and installing separate pieces of code.
This release also 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-nano Design shows the current class hierarchy.
Additionally, this release alignes the QP-nano framework better with the rest of the QP framework family (QP/C and QP/C++), so that fewer changes are needed to move applications between QP-nano and QP/C.
Finally, this release adds periodic time events (timers) to QP-nano. The feature is demonstrated by many provided examples (e.g., "Blinky", "Fly 'n' Shoot" game, PELICAN crossing).
The aforementioned changes have also the following ripple effects:
qpn_port.h
header file, which is now deprecated. Insted QP-nano application code needs to #include the qpn.h (QP-nano API) header file, which also now contains the QP-nano backwards-compatibility layer.qpn_config.h
configurations are provided in all supplied QP-nano examples.qpn_config.h
header file), the signature of the QActive_armX() function contains one more interval
parameter. The interval
parameter allows you to specify the interval of the periodic timeout. If the interval
is zero, the time event is one-shot.Changes in detail:
This release adds the "transition to history" (deep history) feature to both QHsm and QMsm state machines and their subclasses. This QP-nano 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 comes with new and updated QDKs for MSP430. Specifically, new QDKs have been added for the MSP-EXP430G2 LaunchPad as well as the MSP-EXP420F5529LP LauchPad. Also, the QDKs for MSP430 with the TI Code Composer Studio are now part of the baseline QP-nano distribution.
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-nano 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-nano for safety standards, such as IEC 61508 and ISO 62304 (FDA 510(k)).
Changes in detail:
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-nano 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-nano Reference Manual", see https://www.state-machine.com/qpn/metrics.html
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:
The main purpose of this milestone QP-nano 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-nano 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 preprocessor 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-nano 5 is polymorphism ("virtual" functions) for basic operations, such as state machine init() and dispatch() and active object post(), and postISR() operations. Making theses 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-nano 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-nano 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-nano 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-nano 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.x 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-nano 5.1.x Baseline Code demonstrate the recommended way of assigning interrupt priorities in your applications. The initialization consist of two steps:
NOTE: Leaving the interrupt priority at the default value of zero (the highest priority) is most likely incorrect, because the "kernel-unaware" interrupts cannot call any QP services.
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/arm/AN_ARM-Cortex-M_Interrupt-Priorities.pdf.
The following list details the 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-nano 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:
lib-qpn.lnt
, au-misra2.lnt
) to the latest PC-Lint 9.00j.This release changes the directory structure of QP-nano examples for various operating systems, such as POSIX (Linux, BSD, etc.), Win32 (Windows), Qt, etc. The OS examples are moved from the exampels/80x86/ directory one level up to examples/.
The main purpose of this release is providing QM models in most examples and 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 QP relase adds QM models, created with the new QM 2.2.01, to most of the examples. The code generated by this new QM version complies with MISRA-C:2004 rules.
This release adds the variable QF_timerSet_ and bookkeeping around it, so that the state of all timeouts in the system can be determined quickly and efficiently. This feature is for power- sensitive applications, where the system clock tick interrupt needs to be turned off. One of the criteria to entering such a sleep mode is that all timeout events are disarmed, that is, when (QF_timerSet_ == (uint8_t)0).
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.
NOTE: These change to the QEP-nano event processor is completely backwards-compatible. All state hander functions coded the old way will continue to handle the guard conditions correctly and in accordance with the UML specification. The new Q_UNHANDLED() macro is necessary only for MISRA-compliant state handler coding, which will be applied in the upcoming release of the QM modeling and code generation tool.
Changes in detail:
The main pupose of this relase is to improve host-based development of QP-nano applications, which is critical for Test-Driven Development (TDD). Among others, this release provides integration between QP-nano 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:
NOTE: To minimize impact of this change on the existing QP-nano ports and applications, the name QEvent is provided as well, but this can be suppressed by defining the configuration macro Q_NQEVENT in qep_port.h.
NOTE: This modification haves impact on most QP-nano ports, because the QF_run() function must now return a int16_t value.
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.
NOTE: This modifications have impact on most QP-nano ports. However, the qfn.h header file contains definitions of the new macros in terms of the old ones. This provies backwards comatibility of the existing QP-nano ports.
NOTE: This modification has impact on some QP-nano ports.
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 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 (in QP-nano this file is replicated in every example for QK-nano) and consists of clearing the PENDSVSET bit programmatically inside PendSV_Handler.
The main pupose of this relase is to repackage the default QP-nano distribution to contain the single root directory qpn/ in the archive. That way, unziping the archive will produce only one directory (qpn/), which can be then changed by the user.
The goal of this release is to improve the ease of experimenting with QP-nano on the desktop. This release adds support for Windows (Win32) and Linux to the QP-nano baseline code. Two most popular compilers for Windows are supported: Microsoft Visual Studio and MinGW (GNU). The support for Linux includes pre-built examples and makefiles compatible with Eclipse.
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-nano Tutorial and in Chapter 1 of the PSiCC2 book.
Specifically, the directory qpn/examples/80x86/watcom/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 qpn/examples/arm-cortex/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-nano baseline code has been slighlty 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-nano API in any way, so the release has NO IMPACT on the QP-nano 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 examples (vanilla and QK-nano) for Turbo C++ 1.01 have been replaced with examples for Open Watcom. The make.bat scripts are provided to build the examples.
In the process of converting the examples to Open Watcom a new SLS example have been added to the standard QP-nano distribution. The SLS example located in <qpn>/examples/80x86/watcom/sls/ shows the QP-nano implemenation of the new State-Local Storage state design pattern.
The main purpose of this release is to fix a bug in event posting, which could cause corruption of the event signal. Such corruption could occur when an event was posted to an empty event queue, in which case it was written directly to the internal event stored in the state machine, bypassing the ring-buffer. However, the signal of the internal event could also be changed by the QEP-nano event processor during execution of transitions.
The bug fix is to always pass events through the ring buffer and never overwrite the internal event during event posting (both from the task level and from the ISR level). The update of the ring buffer always occurs within a critical section and is safe from interruptions.
This bug fix also allows posting of events from the top-most initial transitions of active objects during the initialization phase. Previously, the execution of the top-most initial transition corrupted the signal of the internal event.
The bug fix enables also self-posting of events from entry/exit actions and internal initial transitions. Again, the QEP event processor corrupted the internal signal.
This release also replaces the static variables 'p' (priority) and 'a' (active object pointer) with automatic variables. This change results in more efficient code, because the frequently used variables can be kept in registers and do not need to be read/written from/to memory by each use.
Additionally, this release updates the QP-nano ARM Cortex-M3 examples for the EK-LM3S811 board to the latest IAR EWARM 5.40. Due to the acquisition of Liminary Micro by Texas Instruments the directory IAR structure for the examples and drivers has changed and the QP-nano examples had to be changed accordingly.
Finally, this release fixes a bug in the "Fly 'n' Shoot" game example for QP-nano, which caused an assertion if the Ship was moved to the very top of the Tunnel. This was due to the y-coordinate of the ship explosion becomoming negative.
NOTE: This release does not change the QP-nano API, but all event queues are effectively shortened by one event. Also it is no longer possible to declare an active object without a ring buffer (zero-sized queue), because the internal event no longer counts towards the queue depth.
The main changes in QP v4.1.00 with respect to the 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-nano API in any way, so the release has NO IMPACT on the QP-nano 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 "future-proof" the QK-nano preemptive kernel. The release 4.0.03 strictly preserves the semantics of QK_currPrio_ variable, which was violated by the previous QK mutex implementation. The mutex locking now uses a different variable QK_ceilingPrio_, which represents the ceiling-priority locked by the mutex. When the mutex is configured (the macro #QK_MUTEX is defined), the QK-nano scheduler performs an additional check to make sure that only tasks with priorities above the ceiling can run. This additional overhead is not present when #QK_MUTEX is not defined.
This maintenance release does not change the QP-nano API in any way, so the release has NO IMPACT on the QP-nano applications.
The main changes in QP v4.0.03 with respect to earlier Version are as follows:
This maintenace release is made to allow posting events from any active object to any active object from the top-most initial transtions.
This maintenance release does not change the QP-nano API in any way, so the release has NO IMPACT on the QP-nano applications.
The main changes in QP v4.0.02 with respect to earlier Version are as follows:
This maintenace release is made to allow compiling QP-nano with the GNU compiler for AVR (WinAVR). Specifically, some changes were necessary to accomodate the non-standard way of hanlding constant data objects allocated in ROM (PROGMEM) in the GNU compiler for AVR.
This maintenance release does not change the QP-nano API in any way, so the release has NO IMPACT on the QP-nano 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-nano Programmer's Manual" is now phased out and is replaced with this hyper-lirenked /ref main_page "QP-nano Reference Manual", which provides very detailed, easily searchable reference to the software. The book /ref PSiCC2 provies in-depth discussion of the relevant concepts as well as the design study of QP v4.0, including QP-nano v4.0 in Chapter 12.
The main changes in QP v4.0 with respect to earlier versions are as follows: