QP/C  6.0.0
DPP on EK-TM4C123GXL

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

bd_EK-TM4C123GXL.jpg
EK-TM4C123GXL board

The DPP example is located in the directory qpc/examples/arm-cm/dpp_ek-tm4c123gxl, which is organized as follows:

qpc/ - QP/C installation directory
+-examples/ - QP/C examples directory (applications)
| +-arm-cm/ - QP/C examples for ARM Cortex-M
| | +-dpp_ek-tm4c123gxl/ - 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 toolset
| | | | | +-dpp-qk.uvprojx - uVision project
| | | | +-gnu/ - GNU-ARM toolset
| | | | | +-Makefile - Makefile for building the project
| | | | +-iar/ - IAR-ARM toolset
| | | | | +-dpp-qk.eww - IAR EW-ARM workspace
| | | | +-ti/ - TI-ARM toolset (CCS)
| | | | | +-.ccsproject - CCS project
| | | | | +-.cproject - C Eclipse project
| | | | | +-.project - Eclipse project
| | | | +-bsp.c - BSP for the QK kernel
| | | | +-main.c - main() for the QK kernel
| | | +-qv/ - QV version
| | | | +-arm/ - ARM-KEIL toolset
| | | | | +-dpp-qk.uvprojx - uVision project
| | | | +-gnu/ - GNU-ARM toolset
| | | | | +-Makefile - Makefile for building the project with GNU-ARM
| | | | +-iar/ - IAR-ARM toolset
| | | | | +-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 toolset
| | | | | +-dpp-qk.uvprojx - uVision project
| | | | +-gnu/ - GNU-ARM toolset
| | | | | +-Makefile - Makefile for building the project
| | | | +-iar/ - IAR-ARM toolset
| | | | | +-dpp-qk.eww - IAR EW-ARM workspace
| | | | +-ti/ - TI-ARM toolset (CCS)
| | | | | +-.ccsproject - CCS project
| | | | | +-.cproject - C Eclipse project
| | | | | +-.project - Eclipse project
| | | | +-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 toolset
    • with GNU-ARM toolset
    • with IAR-ARM toolset
    • with TI-ARM toolset (CCS)
  • preemptive run-to-completion QK kernel
    • with ARM-KEIL toolset
    • with GNU-ARM toolset
    • with IAR-ARM toolset
    • with TI-ARM toolset (CCS)
  • preemptive dual-mode QXK kernel
    • with ARM-KEIL toolset
    • with GNU-ARM toolset
    • with IAR-ARM toolset
    • with TI-ARM toolset (CCS)
  • 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 Blue LED from the idle loop (blue LED glows) and toggles the Red and Green LEDs as the Philosophers change their state. Additionally, you can depress and hold the SW1 button (left) to PAUSE the application (Table transitions into the "paused" state). Releasing the SW1 button causes transition back to the "serving" state.


Unit Testing

The examples demonstrates the QUTest unit tests for the application.


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.