namespace QP { /*##########################################################################*/ /*! @page exa_native Native Examples (Built-in Kernels)
The QP/C++ framework contains real-time kernels (@ref comp_qv and @ref comp_qk), so it can run natively ("bare-metal") on single-chip microcontrollers, completely replacing a traditional RTOS. Click on the following links to see examples for the specified built-in kernels:
- @subpage exa_qv - @subpage exa_qk - @subpage exa_qxk ------------------------------------------------------------------------------ Click on the following links to see examples for the specified CPU architectures: - @subpage exa_arm-cm - @subpage exa_arm-cr - @subpage exa_arm7-9 - @subpage exa_msp430 */ /*##########################################################################*/ /*! @page exa_qv QV Kernel (Non-Preemptive, Priority-Based, Non-Blocking) @htmlonly @endhtmlonly @note You can hover the mouse cursor over the icon in the list below to see the picture of the board. - @ref arm-cm_blinky_ek-tm4c123gxl - @ref arm-cm_blinky_efm32-slstk3401a - @ref arm-cm_dpp_ek-tm4c123gxl - @ref arm-cm_dpp_efm32-slstk3401a - @ref arm-cm_dpp_mbed-lpc1768 - @ref arm-cm_dpp_nucleo-l053r8 - @ref arm-cm_dpp_nucleo-l152re - @ref arm-cm_dpp_nucleo-h743zi - @ref arm-cm_dpp_stm32f4-discovery - @ref arm-cm_dpp_stm32f746g-disco - @ref arm-cm_game_efm32-slstk3401a - @ref arm-cm_low-power - @ref arm-cr_blinky_launchxl2-tms57012 - @ref arm-cr_dpp_launchxl2-tms57012 - @ref arm7-9_dpp_at91sam7s-ek - @ref msp430_blinky_msp-exp430f5529lp - @ref msp430_dpp_msp-exp430f5529lp */ /*##########################################################################*/ /*! @page exa_qk QK Kernel (Preemptive, Run-To-Completion/Non-Blocking) @htmlonly @endhtmlonly @note You can hover the mouse cursor over the icon in the list below to see the picture of the board. - @ref arm-cm_blinky_ek-tm4c123gxl - @ref arm-cm_blinky_efm32-slstk3401a - @ref arm-cm_dpp_ek-tm4c123gxl - @ref arm-cm_dpp_efm32-slstk3401a - @ref arm-cm_dpp_mbed-lpc1768 - @ref arm-cm_dpp_nucleo-l053r8 - @ref arm-cm_dpp_nucleo-l152re - @ref arm-cm_dpp_nucleo-h743zi - @ref arm-cm_game_efm32-slstk3401a - @ref arm-cm_dpp_stm32f4-discovery - @ref arm-cm_dpp_stm32f746g-disco - @ref arm-cm_low-power - @ref arm-cr_blinky_launchxl2-tms57012 - @ref arm-cr_dpp_launchxl2-tms57012 - @ref arm7-9_dpp_at91sam7s-ek - @ref msp430_blinky_msp-exp430f5529lp - @ref msp430_dpp_msp-exp430f5529lp */ /*##########################################################################*/ /*! @page exa_qxk QXK Kernel (Preemptive, Run-To-Completion/Blocking) @htmlonly @endhtmlonly @note You can hover the mouse cursor over the icon in the list below to see the picture of the board. - @ref arm-cm_dpp_ek-tm4c123gxl - @ref arm-cm_dpp_efm32-slstk3401a - @ref arm-cm_dpp_stm32f4-discovery - @ref arm-cm_dpp_stm32f746g-disco - @ref arm-cm_dpp_nucleo-h743zi - @ref arm-cm_low-power */ /*##########################################################################*/ /*! @page exa_arm-cm ARM Cortex-M (Cortex-M0/M0+/M3/M4/M7) @htmlonly @endhtmlonly @note You can hover the mouse cursor over the icon in the list below to see the picture of the board. - @subpage arm-cm_blinky_ek-tm4c123gxl - @subpage arm-cm_blinky_efm32-slstk3401a - @subpage arm-cm_dpp_ek-tm4c123gxl - @subpage arm-cm_dpp_efm32-slstk3401a - @subpage arm-cm_dpp_mbed-lpc1768 - @subpage arm-cm_dpp_nucleo-l053r8 - @subpage arm-cm_dpp_nucleo-l152re - @subpage arm-cm_dpp_nucleo-h743zi - @subpage arm-cm_dpp_stm32f4-discovery - @subpage arm-cm_dpp_stm32f746g-disco - @subpage arm-cm_game_efm32-slstk3401a - @subpage arm-cm_low-power */ /*##########################################################################*/ /*! @page exa_arm-cr ARM Cortex-R @htmlonly @endhtmlonly @note You can hover the mouse cursor over the icon in the list below to see the picture of the board. - @subpage arm-cr_blinky_launchxl2-tms57012 - @subpage arm-cr_dpp_launchxl2-tms57012 */ /*##########################################################################*/ /*! @page exa_arm7-9 ARM7/ARM9 ("classic" ARM) @htmlonly @endhtmlonly @note You can hover the mouse cursor over the icon in the list below to see the picture of the board. - @subpage arm7-9_dpp_at91sam7s-ek */ /*##########################################################################*/ /*! @page exa_msp430 MSP430 ("classic" MSP430 and "extended" MSP430x) @htmlonly @endhtmlonly @note You can hover the mouse cursor over the icon in the list below to see the picture of the board. - @subpage msp430_blinky_msp-exp430f5529lp - @subpage msp430_dpp_msp-exp430f5529lp */ /*##########################################################################*/ /*! @page arm-cm_blinky_ek-tm4c123gxl Blinky on EK-TM4C123GXL @tableofcontentsThis example implements the @ref blinky "Blinky sample application" on the EK-TM4C123GLX board (ARM Cortex-M4F).
@image html bd_EK-TM4C123GXL.jpg EK-TM4C123GXL board The Blinky example is located in the directory qpcpp/examples/arm-cm/blinky_ek-tm4c123gxl, which is organized as follows: @code{c} qpcpp/ // QP/C++ installation directory +-examples/ // QP/C++ examples directory (application) | +-arm-cm/ // QP/C++ examples for ARM Cortex-M | | +-blinky_ek-tm4c123gxl/ // Blinky example on the EK-TM4C123GLX board | | | +-qk/ // QK version | | | | +-arm/ // ARM-KEIL toolchain | | | | | +-blinky-qk.uvprojx // uVision project | | | | +-gnu/ // GNU-ARM toolchain | | | | | +-Makefile // Makefile for building the project | | | | +-iar/ // IAR-ARM toolchain | | | | | +-blinky-qk.eww // IAR EW-ARM workspace | | | | +-bsp.cpp // BSP for the QK kernel | | | +-qv/ // QV version | | | | +-arm/ // ARM-KEIL toolchain | | | | | +-blinky-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.cpp // BSP for the QV kernel | | | +-win32/ // Windows emulation (multithreaded) | | | | +-Makefile // Makefile for building the project with MinGW | | | | +-bsp.cpp // BSP for the Win32 | | | +-win32-qv/ // Windows emulation (single thread) | | | | +-Makefile // Makefile for building the project with MinGW | | | | +-bsp.cpp // BSP for the Win32-QV @endcode ------------------------------------------------------------------------------ @section arm-cm_blinky_ek-tm4c123gxl_feat 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 - Windows emulation (console multithreaded) - Windows emulation (console, single threaded: win32-qv) ------------------------------------------------------------------------------ @section arm-cm_blinky_ek-tm4c123gxl_run Running the Example Once programmed into the board, the example blinks the on-board LED about once a second. @image html blinky_ek-tm4c123gxl.gif Blinky on EK-TM4C123GLX (TivaC LaunchPad) ------------------------------------------------------------------------------ @section arm-cm_blinky_ek-tm4c123gxl_win Windows Emulation The Windows emulation is a simple console application that produces the following output: @image html blinky_win32.png Blinky emulation running in a Windows console @next{arm-cm_blinky_efm32-slstk3401a} */ /*##########################################################################*/ /*! @page arm-cm_blinky_efm32-slstk3401a Blinky on EFM32-SLSTK3401A @tableofcontentsThis example implements the @ref blinky "Blinky sample application" on the EFM32-SLSTK3401A board (ARM Cortex-M4F).
@image html bd_EFM32-SLSTK3401A.jpg EFM32-SLSTK3401A board The Blinky example is located in the directory qpcpp/examples/arm-cm/blinky_efm32-slstk3401a, which is organized as follows: @code{c} qpcpp/ // QP/C++ installation directory +-examples/ // QP/C++ examples directory (application) | +-arm-cm/ // QP/C++ examples for ARM Cortex-M | | +-blinky_efm32-slstk3401a/ // Blinky example on the EFM32-SLSTK3401A board | | | +-qk/ // QK version | | | | +-arm/ // ARM-KEIL toolchain | | | | | +-blinky-qk.uvprojx // uVision project | | | | +-gnu/ // GNU-ARM toolchain | | | | | +-Makefile // Makefile for building the project | | | | +-iar/ // IAR-ARM toolchain | | | | | +-blinky-qk.eww // IAR EW-ARM workspace | | | | +-bsp.cpp // BSP for the QK kernel | | | +-qv/ // QV version | | | | +-arm/ // ARM-KEIL toolchain | | | | | +-blinky-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.cpp // BSP for the QV kernel | | | +-win32/ // Windows emulation (multithreaded) | | | | +-Makefile // Makefile for building the project with MinGW | | | | +-bsp.cpp // BSP for the Win32 | | | +-win32-qv/ // Windows emulation (single thread) | | | | +-Makefile // Makefile for building the project with MinGW | | | | +-bsp.cpp // BSP for the Win32-QV @endcode ------------------------------------------------------------------------------ @section arm-cm_blinky_efm32-slstk3401a_feat 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 - Windows emulation (console multithreaded) - Windows emulation (console, single threaded: win32-qv) ------------------------------------------------------------------------------ @section arm-cm_blinky_efm32-slstk3401a_run Running the Example Once programmed into the board, the example blinks the on-board LED about once a second. ------------------------------------------------------------------------------ @section arm-cm_blinky_efm32-slstk3401a_win Windows Emulation The Windows emulation is a simple console application that produces the following output: @image html blinky_win32.png Blinky emulation running in a Windows console @next{arm-cm_dpp_ek-tm4c123gxl} */ /*##########################################################################*/ /*! @page arm-cm_dpp_ek-tm4c123gxl DPP on EK-TM4C123GXL @tableofcontentsThis example implements the @ref dpp "Dining Philosophers Problem" sample application on the EK-TM4C123GLX board (ARM Cortex-M4F).
@image html bd_EK-TM4C123GXL.jpg EK-TM4C123GXL board The DPP example is located in the directory qpcpp/examples/arm-cm/dpp_ek-tm4c123gxl, which is organized as follows: @code{c} qpcpp/ // 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 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 | | | | +-ti/ // TI-ARM toolchain (CCS) | | | | | +-.ccsproject // CCS project | | | | | +-.cproject // C Eclipse project | | | | | +-.project // Eclipse project | | | | +-bsp.cpp // BSP for the QK kernel | | | | +-main.cpp // 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.cpp // BSP for the QV kernel | | | | +-main.cpp // 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 | | | | +-ti/ // TI-ARM toolchain (CCS) | | | | | +-.ccsproject // CCS project | | | | | +-.cproject // C Eclipse project | | | | | +-.project // Eclipse project | | | | +-bsp.cpp // BSP for the QXK kernel | | | | +-main.cpp // main() for the QXK kernel | | | | +-test.cpp // 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 @endcode ------------------------------------------------------------------------------ @section arm-cm_dpp_ek-tm4c123gxl_feat Features Demonstrated - cooperative QV kernel + with ARM-KEIL toolchain + with GNU-ARM toolchain + with IAR-ARM toolchain + with TI-ARM toolchain (CCS) - preemptive run-to-completion QK kernel + with ARM-KEIL toolchain + with GNU-ARM toolchain + with IAR-ARM toolchain + with TI-ARM toolchain (CCS) - preemptive dual-mode QXK kernel + with ARM-KEIL toolchain + with GNU-ARM toolchain + with IAR-ARM toolchain + with TI-ARM toolchain (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) ------------------------------------------------------------------------------ @section arm-cm_dpp_ek-tm4c123gxl_run 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. ------------------------------------------------------------------------------ @section arm-cm_dpp_ek-tm4c123gxl_qutest Unit Testing The examples demonstrates the QUTest unit tests for the application. ------------------------------------------------------------------------------ @section arm-cm_dpp_ek-tm4c123gxl_spy 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. */ /*##########################################################################*/ /*! @page arm-cm_dpp_efm32-slstk3401a DPP on EFM32-SLSTK3401A @tableofcontentsThis example implements the @ref dpp "Dining Philosophers Problem" sample application on the EFM32-SLSTK3401A board (ARM Cortex-M4F).
@image html bd_EFM32-SLSTK3401A.jpg EFM32-SLSTK3401A board The DPP example is located in the directory qpcpp/examples/arm-cm/dpp_efm32-slstk3401a and includes versions for @ref qv "cooperative QV kernel", the @ref qk "preemptive QK kernel", and the @ref qxk "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: @code{c} qpcpp/ // 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.cpp // BSP for the QK kernel | | | | +-main.cpp // 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.cpp // BSP for the QV kernel | | | | +-main.cpp // 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.cpp // BSP for the QXK kernel | | | | +-main.cpp // main() for the QXK kernel | | | | +-test.cpp // 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 @endcode ------------------------------------------------------------------------------ @section arm-cm_dpp_efm32-slstk3401a_feat 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) ------------------------------------------------------------------------------ @section arm-cm_dpp_efm32-slstk3401a_run 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. ------------------------------------------------------------------------------ @section arm-cm_dpp_efm32-slstk3401a_spy 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. */ /*##########################################################################*/ /*! @page arm-cm_dpp_mbed-lpc1768 DPP on mbed-LPC1768 @image html bd_mbed-LPC1768.jpg mbed-LPC1768 board Dining Philosophers Problem (DPP) example for NXP LPC1768 MCU (Cortex-M3) with GNU-ARM toolchain. @image html mbed-LPC1768_button.jpg Adding External Button to mbed-LPC1768 @n @n @image html under_construction.jpg */ /*##########################################################################*/ /*! @page arm-cm_dpp_nucleo-l053r8 DPP on NUCLEO-L053R8 @image html bd_nucleo-l053r8.jpg NUCLEO-L053R8 board @ref dpp "Dining Philosophers Problem (DPP)" example for NUCLEO-L053R8 MCU (Cortex-M0+). Demonstrated built-in kernels: - cooperative @ref qv with ARM-Clang, ARM-Keil, GNU-ARM (Makefile and Atollic TRUEstudio), and IAR-ARM toolchains - preemptive, run-to-completion @ref qk with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains - dual-mode (run-to-completion/blocking) @ref qxk with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains Features: - multiple active objects, including 5 instances of the same AO class (Philo) - extended threads (the QXK version) - [QP/Spy software tracing](https://www.state-machine.com/qtools/qpspy.html) using the virtual COM-port */ /*##########################################################################*/ /*! @page arm-cm_dpp_nucleo-l152re DPP on NUCLEO-L152RE @image html bd_nucleo-l152re.jpg NUCLEO-L152RE board @ref dpp "Dining Philosophers Problem (DPP)" example for NUCLEO-L152RE MCU (Cortex-M3). Demonstrated built-in kernels: - cooperative @ref qv with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains - preemptive, run-to-completion @ref qk with ARM-Clang, ARM-Keil, GNU-ARM, and IAR-ARM toolchains Features: - multiple active objects, including 5 instances of the same AO class (Philo) - [QP/Spy software tracing](https://www.state-machine.com/qtools/qpspy.html) using the virtual COM-port */ /*##########################################################################*/ /*! @page arm-cm_dpp_stm32f4-discovery DPP on STM32F4-Discovery The @ref dpp "DPP example" for STM32F4-Discovery board is located directory examples/arm-cm/dpp_stm32f4-discovery. @image html bd_STM32F4-Discovery.jpg STM32F4-Discovery board Demonstrated built-in kernels: - cooperative @ref qv with ARM-Keil, GNU-ARM, and IAR-ARM toolchains - preemptive, run-to-completion @ref qk with ARM-Keil, GNU-ARM, and IAR-ARM toolchains - dual-mode (run-to-completion/blocking) @ref qxk with ARM-Keil, GNU-ARM, and IAR-ARM toolchains Features: - multiple active objects, including 5 instances of the same AO class (Philo) - extended threads (the QXK version) - [QP/Spy software tracing](https://www.state-machine.com/qtools/qpspy.html) using the virtual COM-port - bi-directional [QP/Spy](https://www.state-machine.com/qtools/qs.html#qs_rx) (sending commands to the target) After you load the DPP example into the STM32F4-Discovery board, the application should start blinking the 4 on-board LEDs. You can press the User button (blue) to PAUSE the philosophers for as long as the button is depressed. The philosophers resume dining when you release the User button. (In the PAUSED state the Table active object stops granting permissions to eat, so eventually all philosophers end in the "hungry" state.) ------------------------------------------------------------------------------ @section arm-cm_dpp_stm32f4-discovery_qs QS Software Tracing The DPP example for embOS on STM32F4-Discovery board provides the "Spy" build configuration, which outputs the QS (Quantum Spy) software tracing data through USART2. To get the data out of the board, you need to connect the TTL/RS232 converter as follows: