QP/C  6.3.7
DPP on EFM32-SLSTK3401A

This example implements the Dining Philosophers Problem sample application on the EFM32-SLSTK3401A board (ARM Cortex-M4F).

bd_EFM32-SLSTK3401A.jpg
EFM32-SLSTK3401A board

The DPP example is located in the directory qpc/examples/arm-cm/dpp_efm32-slstk3401a and includes versions for cooperative QV kernel, the preemptive QK kernel, and the preemptive dual mode QXK RTOS kernel each provided for the ARM-KEIL, GNU-ARM, and IAR-ARM. The following annotated directory listing describes the contents of the example folder:

qpc/ - QP/C installation directory
+-examples/ - QP/C examples directory (application)
| +-arm-cm/ - QP/C examples for ARM Cortex-M
| | +-dpp_efm32-slstk3401a/ - DPP example on the EK-TM4C123GLX board
| | | +-lint/ - PC-Lint version (static analysis of the application code)
| | | | +-lin.bat - batch file for running the PC-Lint
| | | | +-options.lnt - PC-Lint options file for the DPP application code
| | | +-qk/ - QK version
| | | | +-arm/ - ARM-KEIL toolchain
| | | | | +-dpp-qk.uvprojx - uVision project
| | | | +-gnu/ - GNU-ARM toolchain
| | | | | +-Makefile - Makefile for building the project
| | | | +-iar/ - IAR-ARM toolchain
| | | | | +-dpp-qk.eww - IAR EW-ARM workspace
| | | | +-bsp.c - BSP for the QK kernel
| | | | +-main.c - main() for the QK kernel
| | | +-qv/ - QV version
| | | | +-arm/ - ARM-KEIL toolchain
| | | | | +-dpp-qk.uvprojx - uVision project
| | | | +-gnu/ - GNU-ARM toolchain
| | | | | +-Makefile - Makefile for building the project with GNU-ARM
| | | | +-iar/ - IAR-ARM toolchain
| | | | | +-blinky-qk.eww - IAR EW-ARM workspace
| | | | +-bsp.c - BSP for the QV kernel
| | | | +-main.c - main() for the QV kernel
| | | +-qxk/ - QXK version
| | | | +-arm/ - ARM-KEIL toolchain
| | | | | +-dpp-qk.uvprojx - uVision project
| | | | +-gnu/ - GNU-ARM toolchain
| | | | | +-Makefile - Makefile for building the project
| | | | +-iar/ - IAR-ARM toolchain
| | | | | +-dpp-qk.eww - IAR EW-ARM workspace
| | | | +-bsp.c - BSP for the QXK kernel
| | | | +-main.c - main() for the QXK kernel
| | | | +-test.c - extended (blocking) test threads
| | | +-qspyview/ - visualization and monitoring for the DPP example
| | | | +-dpp.tcl - QSpyView specialization for the DPP
| | | | +-qspyview.bat - batch file for launching QSpyView for DPP

Features Demonstrated

  • 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
  • QP/Spy software tracing (output)
  • QP/Spy software tracing (input QS-RX)
  • Unit Testing with QUTest
  • Windows emulation with GUI (multithreaded)
  • Windows emulation with GUI (single threaded, win32-qv)

Running the Example

Once programmed into the board, the example rapidly toggles the LED1 from the idle loop (LED1 glows) and toggles LED0 as the Philosophers change their state. Additionally, you can depress and hold the BTN0 button (left) to PAUSE the application (Table transitions into the "paused" state). Releasing the BTN0 button causes transition back to the "serving" state.


QP/Spy Software Tracing

The application also demonstrates QP/Spy software tracing output and input. To exercise this feature, you need to build and upload the Spy build configuration into the board.