Skip to content

Commit

Permalink
7.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum-leaps committed Sep 5, 2024
1 parent 9f79417 commit 3ba405a
Show file tree
Hide file tree
Showing 95 changed files with 7,876 additions and 2,485 deletions.
53 changes: 38 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,55 @@
# QM sessions
*.qms

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
72 changes: 38 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
[![Quantum Leaps](https://www.state-machine.com/attachments/logo_ql_400.png)](https://www.state-machine.com)
<hr>

# About qpcpp-examples
This repository contains the application examples for the QP/C++
Real-Time Embedded Framework (see https://github.com/QuantumLeaps/qpcpp ).
# About qpc-examples
This repository contains the application examples for the QP/C
Real-Time Embedded Framework (see https://github.com/QuantumLeaps/qpc ).

This repository can be used in several ways:
- [Standalone examples](#standalone-examples-in-the-cmsis-packs-folder)
that don't require the [qpcpp framework repo](https://github.com/QuantumLeaps/qpcpp).
(These examples rely on the qpcpp framework included from the
that don't require the [qpc framework repo](https://github.com/QuantumLeaps/qpc).
(These examples rely on the qpc framework included from the
[CMIS-packs](https://github.com/QuantumLeaps/cmsis-packs))

- [As a sub-module to the qpcpp repo](#as-a-sub-module-to-the-qpcpp-repository)
- [As a sub-module to the qpc repo](#as-a-sub-module-to-the-qpc-repository)

- [Examples for the QView monitoring system](#examples-for-qview-monitoring-system)

Expand All @@ -29,7 +29,7 @@ This repository can be used in several ways:
|
```

## As a sub-module to the qpcpp repository
## As a sub-module to the qpc repository
```
+---arm-cm
| +---blinky_ek-tm4c123gxl
Expand Down Expand Up @@ -106,6 +106,17 @@ This repository can be used in several ways:
| +---reminder
| \---reminder2
|
+---threadx
| \---arm-cm
| +---dpp_ek-tm4c123gxl
| \---dpp_stm32f429-discovery
+---uc-os2
| \---arm-cm
| \---dpp_ek-tm4c123gxl
+---zephyr
| +---blinky
| \---dpp
|
+---qutest <== examples for QUTest testing harness
| +---blinky
| +---dpp
Expand All @@ -124,27 +135,35 @@ This repository can be used in several ways:
| +---src
| \---test
|
+---threadx
| \---arm-cm
| +---dpp_ek-tm4c123gxl
| \---dpp_stm32f429-discovery
+---uc-os2
| \---arm-cm
| \---dpp_ek-tm4c123gxl
+---zephyr
| +---blinky
| \---dpp
|
+---qview-dpp <== examples for the QView monitoring system
+---qview-dpp <== examples for QView monitoring (DPP example)
| +---img
| dpp.py
| dpp1.py
| qview-dpp.lnk
| qview-dpp.lnk
|
+---qwin-gui <== examples for the QWin GUI
| +---dpp-gui
| \---game-gui
|
```

## Examples for QTest Testing System
The "qutest" Python package (included in the
[QTools collection](https://github.com/QuantumLeaps/qtools))
is a powerful [testing system](https://www.state-machine.com/qtools/qutest.html).
It has been specifically designed for deeply embedded systems, but also supports
unit and integration testing of embedded code on host computers ("dual targeting").
QUTest is the fundamental tooling for Test-Driven Development (TDD) and Behavior-
Driven Development (BDD) of QP/C/C++ applications , which is a highly recommended
best-practice.

The following screen shot show a typical QUTest run with the QSPY ouptut
in the background.

![](qutest/img/qutest-dpp.webp)


## Examples for QView Monitoring System
The "qview" Python package (included in the
[QTools collection](https://github.com/QuantumLeaps/qtools))
Expand Down Expand Up @@ -174,18 +193,3 @@ application with the QSPY ouptut in the background.

![](qview-dpp/img/qview-dpp.webp)


## Examples for QTest Testing System
The "qutest" Python package (included in the
[QTools collection](https://github.com/QuantumLeaps/qtools))
is a powerful [testing system](https://www.state-machine.com/qtools/qutest.html).
It has been specifically designed for deeply embedded systems, but also supports
unit and integration testing of embedded code on host computers ("dual targeting").
QUTest is the fundamental tooling for Test-Driven Development (TDD) and Behavior-
Driven Development (BDD) of QP/C/C++ applications , which is a highly recommended
best-practice.

The following screen shot show a typical QUTest run with the QSPY ouptut
in the background.

![](qutest/img/qutest-dpp.webp)
4 changes: 2 additions & 2 deletions arm-cm/blinky_ek-tm4c123gxl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
This file is best viewed in a **markdown viewer**, such as the one built into GitHub. Markdown viewers are also available as plug-ins to popular Internet browsers.

# Blinky on EK-TM4C123GXL
This example implements the simple [Blinky application](https://www.state-machine.com/qpcpp/tut_blinky.html) on the EK-TM4C123GLX board (ARM Cortex-M4F). The example blinks the LED
This example implements the simple [Blinky application](https://www.state-machine.com/qpc/tut_blinky.html) on the EK-TM4C123GLX board (ARM Cortex-M4F). The example blinks the LED
on the EK-TM4C123GXL board at 1Hz (0.5 seconds on, 0.5 seconds off).

<p align="center">
<img src="./ek-tm4c123gxl.jpg"/><br>
<img src="ek-tm4c123gxl.webp"/><br>
<b>EK-TM4C123GXL (TivaC LaunchPad)</b>
</p>

Expand Down
Binary file removed arm-cm/blinky_ek-tm4c123gxl/ek-tm4c123gxl.jpg
Binary file not shown.
Binary file added arm-cm/blinky_ek-tm4c123gxl/ek-tm4c123gxl.webp
Binary file not shown.
4 changes: 2 additions & 2 deletions arm-cm/blinky_nucleo-c031c6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
This file is best viewed in a **markdown viewer**, such as the one built into GitHub. Markdown viewers are also available as plug-ins to popular Internet browsers.

# Blinky on NUCLEO-C031C6
This example demonstrates the [Blinky application](https://www.state-machine.com/qpcpp/tut_blinky.html) on the STM32 NUCLEO-C031C6 board (ARM Cortex-M0+).
This example demonstrates the [Blinky application](https://www.state-machine.com/qpc/tut_blinky.html) on the STM32 NUCLEO-C031C6 board (ARM Cortex-M0+).

<p align="center">
<img src="./stm32-nucleo-c031c6.jpg"/><br>
<img src="stm32-nucleo-c031c6.webp"/><br>
<b>STM32 NUCLEO-C031C6</b>
</p>

Expand Down
Binary file removed arm-cm/blinky_nucleo-c031c6/stm32-nucleo-c031c6.jpg
Binary file not shown.
Binary file not shown.
132 changes: 129 additions & 3 deletions arm-cm/dpp_efm32-slstk3401a/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,131 @@
![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_EFM32-SLSTK3401A.jpg)
> **NOTE**
This file is best viewed in a **markdown viewer**, such as the one built into GitHub. Markdown viewers are also available as plug-ins to popular Internet browsers.

Documentation for this example is available in the QP/C Manual at:
# DPP on EFM32-SLSTK3401A
This example demonstrates the [Dining Philosophers Problem (DPP) application](https://www.state-machine.com/qpc/tut_dpp.html) on the EFM32-SLSTK3401A board (ARM Cortex-M4F).

<p align="center">
<img src="efm32-slstk3401a.webp"/><br>
<b>EFM32-SLSTK3401A (Pearl Gecko)</b>
</p>

## Features Demonstrated
- multiple cooperating active objects
- immutable (const) events
- mutable (dynamic) events
- time events
- direct event posting
- publish-subscribe event delivery
- cooperative QV kernel
+ with ARM-KEIL toolchain
+ with GNU-ARM toolchain
+ with IAR-ARM toolchain
- preemptive run-to-completion QK kernel
+ with ARM-KEIL toolchain
+ with GNU-ARM toolchain
+ with IAR-ARM toolchain
- preemptive dual-mode QXK kernel
+ with ARM-KEIL toolchain
+ with GNU-ARM toolchain
+ with IAR-ARM toolchain

## Build Configurations
- Debug
- Release
- Spy - software tracing with the built-in virtual COM port

# Code Organization
```
examples\arm-cm\dpp_efm32-slstk3401a
|
+---qk // preemptive QK kernel
| +---gnu // GNU-ARM toolchain
| | \---targetConfigs
| | Makefile // Makefile for GNU-ARM
| +---armclang // ARM/KEIL toolchain with Compiler 6 (ARM/CLANG)
| | dpp-qk.uvprojx // uVision project
| \---iar // IAR EWARM
| dpp-qk.eww // IAR EW-ARM workspace
|
\---qv // cooperative QK kernel
| +---gnu // GNU-ARM toolchain
| | \---targetConfigs
| | Makefile // Makefile for GNU-ARM
| +---armclang // ARM/KEIL toolchain with Compiler 6 (ARM/CLANG)
| | dpp-qv.uvprojx // uVision project
| \---iar // IAR EWARM
| dpp-qv.eww // IAR EW-ARM workspace
|
+---qxk // preemptive, dual-mode QXK kernel
| +---gnu // GNU-ARM toolchain
| | \---targetConfigs
| | Makefile // Makefile for GNU-ARM
| +---armclang // ARM/KEIL toolchain with Compiler 6 (ARM/CLANG)
| | dpp-qk.uvprojx // uVision project
| \---iar // IAR EWARM
| dpp-qk.eww // IAR EW-ARM workspace
|
```

# Building the example

### GNU/ARM
- open terminal window
- change to the desired directory (either `examples\arm-cm\dpp_efm32-slstk3401a\qk\gnu`, `examples\arm-cm\dpp_efm32-slstk3401a\qv\gnu`, or `examples\arm-cm\dpp_efm32-slstk3401a\qxk\gnu`)
- to build the default Debug configuration, type:

```
make
```

> **NOTE**
The `make` utility for Windows is provided in the QTools collection for Windows.

- to build the Release configuration, type:

```
make CONF=rel
```

- to build the Spy configuration, type:

```
make CONF=spy
```


### ARM/KEIL MDK
- Open the provided KEIL uVision project (either `dpp-qk.uvprojx`, `dpp-qv.uvprojx`, or `dpp-qxk.uvprojx`)
in Keil uVision IDE. Build/Debug/Download to the board from the IDE.
- Change the build configuration in the "Project Target" drop-down menu.


### IAR EWARM
- Open the provided IAR EWARM workspace (either `dpp-qk.eww`, `dpp-qv.eww`, or `dpp-qxk.eww`)
in IAR EWARM IDE. Build/Debug/Download to the board from the IDE.
- Change the build configuration in the "Project Configuration" drop-down menu.


# Tracing with QP/Spy
When the board is flashed with the Spy build configuration, it produces the QP/Spy software tracing output to the built-in virtual COM port of the TivaC LauchPad board. The trace is binary rather than ASCII, and therefore requires a special host-based application called QSPY.

> **NOTE** QSPY host application is available in the QTools collection.
To launch the QSPY host application:
- open terminal window
- type:

```
qspy -c COM5
```

where "COM5" is an example virtual COM port enumerated by the board. You need to check the specific COM port number on your host computer using the Device Manager application, Ports (COM and LPT) section.


The following screen shot shows a typical output from QSPY:

<p align="center">
<img src="./qspy-output.png"/><br>
<b>Typical QSPY output produced by the Spy build configuration</b>
</p>

- https://www.state-machine.com/qpcpp/arm-cm_dpp_efm32-slstk3401a.html
Binary file added arm-cm/dpp_efm32-slstk3401a/efm32-slstk3401a.webp
Binary file not shown.
Binary file added arm-cm/dpp_efm32-slstk3401a/qspy-output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3ba405a

Please sign in to comment.