QP-nano  6.9.0
Real-Time Embedded Framework
DPP on EFM32-SLSTK3401A

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

EFM32-SLSTK3401A board

The DPP example is located in the directory qpc/examples/arm-cm/dpp_efm32-slstk3401a and includes versions for cooperative QV-nano kernel, the preemptive QK-nano 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:

qpn/ - QP-nano installation directory
+-examples/ - QP-nano examples directory (application)
| +-arm-cm/ - QP-nano 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-nano kernel
| | | | +-main.c - main() for the QK-nano 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-nano kernel
| | | | +-main.c - main() for the QV-nano kernel

Features Demonstrated

  • cooperative QV-nano kernel
    • with ARM-KEIL toolchain
    • with GNU-ARM toolchain
    • with IAR-ARM toolchain
  • preemptive run-to-completion QK-nano kernel
    • with ARM-KEIL toolchain
    • with GNU-ARM toolchain
    • with IAR-ARM toolchain
  • 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.