Quantum Leaps пре 10 година
родитељ
комит
7ee7caecd6
100 измењених фајлова са 3359 додато и 718 уклоњено
  1. 1 1
      doxygen/Doxyfile
  2. 1 1
      doxygen/Doxyfile-CHM
  3. 22 23
      doxygen/exa_native.dox
  4. 30 1
      doxygen/history.dox
  5. BIN
      doxygen/images/blinky_win32.png
  6. BIN
      doxygen/images/dpp_win32.png
  7. BIN
      doxygen/images/game_win32.jpg
  8. BIN
      doxygen/images/game_win32.png
  9. 7 0
      doxygen/macros.h
  10. 3 3
      doxygen/make.bat
  11. 28 28
      doxygen/metrics.dox
  12. 15 1
      examples/arm-cm/blinky_ek-tm4c123gxl/README.txt
  13. 263 0
      examples/arm-cm/blinky_ek-tm4c123gxl/win32-qv/Makefile
  14. 89 0
      examples/arm-cm/blinky_ek-tm4c123gxl/win32-qv/bsp.c
  15. 263 0
      examples/arm-cm/blinky_ek-tm4c123gxl/win32/Makefile
  16. 0 0
      examples/arm-cm/blinky_ek-tm4c123gxl/win32/bsp.c
  17. 14 0
      examples/arm-cm/dpp_ek-tm4c123gxl/README.txt
  18. 133 17
      examples/arm-cm/dpp_ek-tm4c123gxl/lint/lint_out.txt
  19. 2 2
      examples/arm-cm/dpp_ek-tm4c123gxl/main.c
  20. 265 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Makefile
  21. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/BTN_DWN.bmp
  22. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/BTN_UP.bmp
  23. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/eating.bmp
  24. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/hungry.bmp
  25. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/qp.ico
  26. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/thinking.bmp
  27. 4 4
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/bsp.c
  28. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/dpp-gui.rc
  29. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/dpp-gui.sln
  30. 17 52
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/dpp-gui.vcxproj
  31. 53 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/dpp-gui.vcxproj.filters
  32. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/resource.h
  33. 93 58
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/Makefile
  34. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/BTN_DWN.bmp
  35. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/BTN_UP.bmp
  36. BIN
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/eating.bmp
  37. BIN
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/hungry.bmp
  38. 0 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/qp.ico
  39. BIN
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/thinking.bmp
  40. 475 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/bsp.c
  41. 79 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/dpp-gui.rc
  42. 23 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/dpp-gui.sln
  43. 267 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/dpp-gui.vcxproj
  44. 53 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/dpp-gui.vcxproj.filters
  45. 22 0
      examples/arm-cm/dpp_ek-tm4c123gxl/win32/resource.h
  46. 14 1
      examples/arm-cm/game_ek-lm3s811/README.txt
  47. 1 1
      examples/arm-cm/game_ek-lm3s811/bsp.h
  48. 268 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Makefile
  49. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/BTN_DWN.bmp
  50. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/BTN_UP.bmp
  51. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/EK-LM3S811.bmp
  52. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/LCD.bmp
  53. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/led_off.bmp
  54. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/led_on.bmp
  55. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/qp.ico
  56. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg.bmp
  57. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg0.bmp
  58. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg1.bmp
  59. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg2.bmp
  60. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg3.bmp
  61. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg4.bmp
  62. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg5.bmp
  63. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg6.bmp
  64. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg7.bmp
  65. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg8.bmp
  66. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg9.bmp
  67. 198 195
      examples/arm-cm/game_ek-lm3s811/win32-qv/bsp.c
  68. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/game-gui.rc
  69. 1 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/game-gui.sln
  70. 31 65
      examples/arm-cm/game_ek-lm3s811/win32-qv/game-gui.vcxproj
  71. 55 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/game-gui.vcxproj.filters
  72. 0 0
      examples/arm-cm/game_ek-lm3s811/win32-qv/resource.h
  73. 268 0
      examples/arm-cm/game_ek-lm3s811/win32/Makefile
  74. BIN
      examples/arm-cm/game_ek-lm3s811/win32/Res/BTN_DWN.bmp
  75. BIN
      examples/arm-cm/game_ek-lm3s811/win32/Res/BTN_UP.bmp
  76. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/EK-LM3S811.bmp
  77. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/LCD.bmp
  78. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/led_off.bmp
  79. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/led_on.bmp
  80. BIN
      examples/arm-cm/game_ek-lm3s811/win32/Res/qp.ico
  81. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg.bmp
  82. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg0.bmp
  83. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg1.bmp
  84. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg2.bmp
  85. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg3.bmp
  86. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg4.bmp
  87. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg5.bmp
  88. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg6.bmp
  89. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg7.bmp
  90. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg8.bmp
  91. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/Res/seg9.bmp
  92. 198 195
      examples/arm-cm/game_ek-lm3s811/win32/bsp.c
  93. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/game-gui.rc
  94. 1 0
      examples/arm-cm/game_ek-lm3s811/win32/game-gui.sln
  95. 31 70
      examples/arm-cm/game_ek-lm3s811/win32/game-gui.vcxproj
  96. 55 0
      examples/arm-cm/game_ek-lm3s811/win32/game-gui.vcxproj.filters
  97. 0 0
      examples/arm-cm/game_ek-lm3s811/win32/resource.h
  98. 7 0
      examples/win32-qv/blinky/README.txt
  99. 8 0
      examples/win32-qv/dpp-gui/README.txt
  100. 1 0
      examples/win32-qv/dpp/bsp.c

+ 1 - 1
doxygen/Doxyfile

@@ -38,7 +38,7 @@ PROJECT_NAME           = "QP/C"
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = "5.4.1"
+PROJECT_NUMBER         = "5.4.2"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a

+ 1 - 1
doxygen/Doxyfile-CHM

@@ -38,7 +38,7 @@ PROJECT_NAME           = "QP/C"
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = "5.4.1"
+PROJECT_NUMBER         = "5.4.2"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a

+ 22 - 23
doxygen/exa_native.dox

@@ -32,7 +32,6 @@ You can hover the mouse cursor over the <span class="board"></span>&nbsp;&nbsp;
     - @ref msp430_blinky_msp-exp430g2 <a class="preview board" href="bd_MSP-EXP430G2.jpg" title="MSP-EXP430G2"></a>
     - @ref msp430_blinky_msp-exp430f5529lp <a class="preview board" href="bd_MSP-EXP430F5529LP.jpg" title="MSP-EXP430F5529LP"></a>
     - @ref msp430_dpp_msp-exp430g2 <a class="preview board" href="bd_MSP-EXP430G2.jpg" title="MSP-EXP430G2"></a>
-
 */
 /*##########################################################################*/
 /*! @page exa_arm-cm ARM Cortex-M
@@ -49,17 +48,21 @@ The native (bare-metal) QP/C examples for ARM Cortex-M are as follows:
 - @subpage arm-cm_dpp_nucleo-l053r8  <a class="preview board" href="bd_nucleo-l053r8.jpg" title="NUCLEO-L053R8"></a>
 - @subpage arm-cm_dpp_nucleo-l152re  <a class="preview board" href="bd_nucleo-l152re.jpg" title="NUCLEO-L152RE"></a>
 - @subpage arm-cm_game_ek-lm3s811  <a class="preview board" href="bd_EK-LM3S811.jpg" title="EK-LM3S811"></a>
-
 */
 /*##########################################################################*/
 /*! @page arm-cm_blinky_ek-tm4c123gxl Blinky on EK-TM4C123GXL
 
 @image html bd_EK-TM4C123GXL.jpg EK-TM4C123GXL board
-
+@n
+@n
+@image html blinky_ek-tm4c123gxl.gif Blinky on EK-TM4C123GLX (TivaC LaunchPad)
+@n
 Simple "Blinky" example for Texas Instruments TivaC123GXL MCU (Cortex-M4F), ARM (MDK-ARM), GNU-ARM, IAR EWARM toolsets.
-
+@n
+@image html blinky_win32.png Blinky emulation running in a Windows console 
+@n
+@n
 @image html under_construction.jpg
-
 */
 /*##########################################################################*/
 /*! @page arm-cm_dpp_ek-tm4c123gxl DPP on EK-TM4C123GXL
@@ -68,8 +71,10 @@ Simple "Blinky" example for Texas Instruments TivaC123GXL MCU (Cortex-M4F), ARM
 
 Dining Philosophers Problem (DPP) example for Texas Instruments TivaC123GXL MCU (Cortex-M4F), ARM (MDK-ARM), GNU-ARM, IAR EWARM toolsets.
 
+@image html dpp_win32.png DPP emulation running in Windows GUI 
+@n
+@n
 @image html under_construction.jpg
-
 */
 /*##########################################################################*/
 /*! @page arm-cm_dpp_mbed-lpc1768 DPP on mbed-LPC1768
@@ -79,9 +84,9 @@ Dining Philosophers Problem (DPP) example for Texas Instruments TivaC123GXL MCU
 Dining Philosophers Problem (DPP) example for  NXP LPC1768 MCU (Cortex-M3) with GNU-ARM toolset.
 
 @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
@@ -91,7 +96,6 @@ Dining Philosophers Problem (DPP) example for  NXP LPC1768 MCU (Cortex-M3) with
 Dining Philosophers Problem (DPP) example for STM32-L053R8T6 MCU (Cortex-M0+) with ARM-Keil, GNU-ARM, and IAR-ARM toolsets.
 
 @image html under_construction.jpg
-
 */
 /*##########################################################################*/
 /*! @page arm-cm_dpp_nucleo-l152re DPP on NUCLEO-L152RE
@@ -101,7 +105,6 @@ Dining Philosophers Problem (DPP) example for STM32-L053R8T6 MCU (Cortex-M0+) wi
 Dining Philosophers Problem (DPP) example for STM32-L152RET6 MCU (Cortex-M3) with ARM-Keil, GNU-ARM, and IAR-ARM toolsets.
 
 @image html under_construction.jpg
-
 */
 /*##########################################################################*/
 /*! @page arm-cm_game_ek-lm3s811 "Fly 'n' Shoot" Game on EK-LM3S811
@@ -111,9 +114,12 @@ Dining Philosophers Problem (DPP) example for STM32-L152RET6 MCU (Cortex-M3) wit
 "Fly 'n' Shoot" game example for Texas Instruments LM3S811 MCU (Cortex-M3), ARM (MDK-ARM), GNU-ARM, IAR EWARM toolsets.
 
 @image html bd_EK-LM3S811_game.jpg Game playing on EK-LM3S811 board
-
+@n
+@n
+@image html game_win32.png Game emulation running in Windows GUI 
+@n
+@n
 @image html under_construction.jpg
-
 */
 
 /*##########################################################################*/
@@ -126,7 +132,6 @@ Dining Philosophers Problem (DPP) example for STM32-L152RET6 MCU (Cortex-M3) wit
 The native (bare-metal) QP/C examples for the "classic" ARM7/ARM9 are as follows:
 
 - @subpage arm7-9_dpp_at91sam7s-ek <a class="preview board" href="bd_AT91SAM7S-EK.jpg" title="AT91SAM7S-EK"></a>
-
 */
 /*##########################################################################*/
 /*! @page arm7-9_dpp_at91sam7s-ek DPP on AT91SAM7S-EK
@@ -136,7 +141,6 @@ The native (bare-metal) QP/C examples for the "classic" ARM7/ARM9 are as follows
 Dining Philosophers Problem (DPP) example for Atmel AT91SAM7S MCU (ARM7) with GNU-ARM toolset.
 
 @image html under_construction.jpg
-
 */
 
 /*##########################################################################*/
@@ -150,7 +154,6 @@ The native (bare-metal) QP/C examples for the 8-bit AVRmega are as follows:
 
 - @subpage avr_blinky_arduino-uno <a class="preview board" href="bd_Arduino-UNO.jpg" title="Arduino-UNO"></a>
 - @subpage avr_dpp_arduino-uno <a class="preview board" href="bd_Arduino-UNO.jpg" title="Arduino-UNO"></a>
-
 */
 /*##########################################################################*/
 /*! @page avr_blinky_arduino-uno Blinky on Arduino-UNO
@@ -160,7 +163,6 @@ The native (bare-metal) QP/C examples for the 8-bit AVRmega are as follows:
 Simple Blinky example for Arduino-UNO with GNU-AVR and IAR-AVR toolsets.
 
 @image html under_construction.jpg
-
 */
 /*##########################################################################*/
 /*! @page avr_dpp_arduino-uno DPP on Arduino-UNO
@@ -170,11 +172,12 @@ Simple Blinky example for Arduino-UNO with GNU-AVR and IAR-AVR toolsets.
 Dining Philosophers Problem (DPP) example for Arduino-UNO with GNU-AVR and IAR-AVR toolsets.
 
 @image html Arduino-UNO_button.jpg Adding External Button to Arduino-UNO
-
+@n
+@n
 @image html Arduino-UNO_button_schem.jpg External Button Schematics
-
+@n
+@n
 @image html under_construction.jpg
-
 */
 
 /*##########################################################################*/
@@ -189,7 +192,6 @@ The native (bare-metal) QP/C examples for MSP430 are as follows:
 - @subpage msp430_blinky_msp-exp430g2 <a class="preview board" href="bd_MSP-EXP430G2.jpg" title="MSP-EXP430G2"></a>
 - @subpage msp430_blinky_msp-exp430f5529lp <a class="preview board" href="bd_MSP-EXP430F5529LP.jpg" title="MSP-EXP430F5529LP"></a>
 - @subpage msp430_dpp_msp-exp430g2 <a class="preview board" href="bd_MSP-EXP430G2.jpg" title="MSP-EXP430G2"></a>
-
 */
 /*##########################################################################*/
 /*! @page msp430_blinky_msp-exp430g2 Blinky on MSP-EXP430G2
@@ -199,7 +201,6 @@ The native (bare-metal) QP/C examples for MSP430 are as follows:
 Simple Blinky example for MSP-EXP430G2 with CCS-430 and IAR-430 toolsets.
 
 @image html under_construction.jpg
-
 */
 /*##########################################################################*/
 /*! @page msp430_blinky_msp-exp430f5529lp Blinky on MSP-EXP430F5529LP
@@ -209,7 +210,6 @@ Simple Blinky example for MSP-EXP430G2 with CCS-430 and IAR-430 toolsets.
 Simple Blinky example for MSP-EXP430F5529LP with CCS-430 and IAR-430 toolsets.
 
 @image html under_construction.jpg
-
 */
 /*##########################################################################*/
 /*! @page msp430_dpp_msp-exp430g2 DPP on MSP-EXP430G2
@@ -235,5 +235,4 @@ where `COM_PORT` denotes the Virtual COM port, which you can find out in the Dev
 To receive the QS data over the Virtual COM Port, you need to make sure that the jumper J3 on the MSP-EXP430G2 board is configured for the "Hardware UART" (the first two jumpers should be in the horizontal setting, as shown in the picture of the MSP-EXP430G2 board on top of this page. 
 
 @image html under_construction.jpg
-
 */

+ 30 - 1
doxygen/history.dox

@@ -1,7 +1,36 @@
 /**
 @page history Revision History
-
 
+@section qpc_5_4_2 Version 5.4.2, 2015-06-04
+
+The main focus of this release is to improve the support for "dual targeting" of QP/C applications, which is developing of deeply embedded code as much as possible on the desktop OS, such as Windows. Experience shows that "dual targeting" dramatically improves productivity of embedded systems developers, perhaps more than any other technique.
+
+This release makes it possible to use exactly the **same** application code, main function, and the Board Support Package interface (bsp.h) on both deeply embedded target and on Windows. The only differences between these targets can be completely encapsulated in the Board Support Package implementation (bsp.c).
+
+The support for "dual targeting" in this QP/C release works both for Win32 console and Win32 GUI applications. The Win32-GUI support enables developers to easily emulate the front-panels of the embedded devices, with LCD-screens (graphical and segmented), LEDs, buttons, switches, sliders, etc.
+
+Changes in detal:
+
+1. Modified the QP/C ports to Windows (both @ref win32 and @ref win32-qv) so that they support both Win32 console and Win32-GUI applications. The newly introduced pre-processor #WIN32_GUI macro is now requierd to use the Win32-GUI facilities.
+
+2. Added portable "safe" macros from `<stdio.h>` and `<string.h>` to the QP/C ports to Windows. These macros encapsulate the differences between Microsoft Visual C++ and other compilers (such as MinGW).
+
+3. Simplified the structure of the QP/C Windows ports by eliminating one level of directories for the compilers used. Both VC++ and MinGW builds can now be run in the same port directory.
+
+4. Modified the QF_stop() function in the QP/C port to @ref win32-qv, so that it unblocks the QV event-loop and thus lets the application terminate. 
+
+5. Modified all examples for Windows to use the new port structure.
+
+6. Improved all Makefiles (for the MinGW toolset) in all Windows examples, to make them easier to adapt to custom applications, both Win32 console and Win32 GUI.
+
+7. Moved several examples from the `examples/win32/` and examples/win32-qv directories to `examples/arm-cm/` directory with native embedded examples for ARM Cortex-M. This co-location of the Win32 emulation with the embedded code running on the actual board demonstrates better the "dual targeting" development approach.
+
+8. Updated all Windows examples to the latest QP API by compiling the code with the macro #QP_API_VERSION set to 9999 (latest API without backwards compatibility)
+
+9. Improved the PC-Lint support for checking the application-level code located in in `examples\arm-cm\dpp_ek-tm4c123gxl\lint`
+
+
+------------------------------------------------------------------------------
 @section qpc_5_4_1 Version 5.4.1, 2015-05-14
 
 This release changes the active object class hierarchy so that ::QMActive is now more fundamental and is the base class for ::QActive. (Previously ::QMActive was a subclass of ::QActive). The newly added documentation section about @ref classes "QP/C Design" shows the current class hierarchy.

BIN
doxygen/images/blinky_win32.png


BIN
doxygen/images/dpp_win32.png


BIN
doxygen/images/game_win32.jpg


BIN
doxygen/images/game_win32.png


+ 7 - 0
doxygen/macros.h

@@ -165,3 +165,10 @@
 * be not defined for the application-level code
 */
 #define QP_IMPL
+
+/*! Macro that should be defined (typically on the compiler's command line)
+in the Win32-GUI applications that use the @ref win32 or @ref win32-qv ports.
+*/
+#define WIN32_GUI
+
+

+ 3 - 3
doxygen/make.bat

@@ -1,8 +1,8 @@
 @echo off
 :: ==========================================================================
 :: Product: QP/C script for generating Doxygen documentation
-:: Last Updated for Version: 5.4.1
-:: Date of the Last Update:  2015-05-18
+:: Last Updated for Version: 5.4.2
+:: Date of the Last Update:  2015-06-03
 ::
 ::                    Q u a n t u m     L e a P s
 ::                    ---------------------------
@@ -38,7 +38,7 @@ echo usage:
 echo make
 echo make -CHM
 
-set VERSION=5.4.1
+set VERSION=5.4.2
 
 :: Generate Resource Standard Metrics for QP/C ............................... 
 set DOXHOME="C:\tools\doxygen\bin"

+ 28 - 28
doxygen/metrics.dox

@@ -1,7 +1,7 @@
 /** @page metrics Code Metrics 
 
 @code 
-                   Standard Code Metrics for QP/C 5.4.1 
+                   Standard Code Metrics for QP/C 5.4.2 
 
            Resource Standard Metrics (TM) for C, C++, C# and Java
                    Version 7.75 - mSquaredTechnologies.com
@@ -9,7 +9,7 @@
   License Type: Windows Single User License
   Licensed To : Quantum Leaps, LLC
   License No. : WS2975                          License Date: Dec 15, 2013
-  Build Date  : Sep  2 2009                         Run Date: May 22, 2015
+  Build Date  : Sep  2 2009                         Run Date: Jun 04, 2015
   (C)1996-2009 M Squared Technologies LLC
   ________________________________________________________________________
 
@@ -406,8 +406,8 @@
   ________________________________________________________________________
 
   Function: QActive_post_
-  Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con
-              st margin)
+  Parameters: (QMActive * const me, QEvt const * const e, uint_fast16_t co
+              nst margin)
     Cyclomatic Complexity Vg Detail
       Function Base           : 1
       Conditional if / else if: 5     
@@ -415,7 +415,7 @@
   LOC 55       eLOC 46       lLOC 34       Comment 79       Lines       74
 
   Function: QActive_postLIFO_
-  Parameters: (QActive * const me, QEvt const * const e)
+  Parameters: (QMActive * const me, QEvt const * const e)
     Cyclomatic Complexity Vg Detail
       Function Base           : 1
       Conditional if / else if: 4     
@@ -423,7 +423,7 @@
   LOC 37       eLOC 31       lLOC 22       Comment 36       Lines       50
 
   Function: QActive_get_
-  Parameters: (QActive * const me)
+  Parameters: (QMActive * const me)
     Cyclomatic Complexity Vg Detail
       Function Base           : 1
       Conditional if / else if: 2     
@@ -471,13 +471,13 @@
   ________________________________________________________________________
 
   Function: QActive_defer
-  Parameters: (QActive * const me, QEQueue * const eq, QEvt const * const 
-              e)
+  Parameters: (QMActive * const me, QEQueue * const eq, QEvt const * const
+               e)
   Complexity   Param 3       Return 1      Cyclo Vg 1       Total        5
   LOC 4        eLOC 2        lLOC 2        Comment 24       Lines        4
 
   Function: QActive_recall
-  Parameters: (QActive * const me, QEQueue * const eq)
+  Parameters: (QMActive * const me, QEQueue * const eq)
     Cyclomatic Complexity Vg Detail
       Function Base           : 1
       Conditional if / else if: 2     
@@ -873,8 +873,8 @@
   LOC 14       eLOC 10       lLOC 6        Comment 13       Lines       17
 
   Function: QTimeEvt_ctorX
-  Parameters: (QTimeEvt * const me, QActive * const act, enum_t const sig,
-               uint_fast8_t tickRate)
+  Parameters: (QTimeEvt * const me, QMActive * const act, enum_t const sig
+              , uint_fast8_t tickRate)
     Cyclomatic Complexity Vg Detail
       Function Base           : 1
       Logical and ( && )      : 1     
@@ -972,9 +972,9 @@
   LOC 12       eLOC 10       lLOC 7        Comment 21       Lines       15
 
   Function: QActive_start_
-  Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], 
-              uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv
-              t const *ie)
+  Parameters: (QMActive * const me, uint_fast8_t prio, QEvt const *qSto[],
+               uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QE
+              vt const *ie)
     Cyclomatic Complexity Vg Detail
       Function Base           : 1
       Logical and ( && )      : 2     
@@ -982,7 +982,7 @@
   LOC 15       eLOC 13       lLOC 9        Comment 29       Lines       19
 
   Function: QActive_stop
-  Parameters: (QActive *me)
+  Parameters: (QMActive *me)
   Complexity   Param 1       Return 1      Cyclo Vg 1       Total        3
   LOC 3        eLOC 2        lLOC 1        Comment 13       Lines        3
 
@@ -1516,18 +1516,18 @@
   LOC 8        eLOC 6        lLOC 4        Comment 14       Lines        8
 
   Function: QActive_post_
-  Parameters: (QActive * const me, QEvt const * const e, uint_fast16_t con
-              st margin)
+  Parameters: (QMActive * const me, QEvt const * const e, uint_fast16_t co
+              nst margin)
   Complexity   Param 3       Return 1      Cyclo Vg 6       Total       10
   LOC 55       eLOC 46       lLOC 34       Comment 79       Lines       74
 
   Function: QActive_postLIFO_
-  Parameters: (QActive * const me, QEvt const * const e)
+  Parameters: (QMActive * const me, QEvt const * const e)
   Complexity   Param 2       Return 1      Cyclo Vg 5       Total        8
   LOC 37       eLOC 31       lLOC 22       Comment 36       Lines       50
 
   Function: QActive_get_
-  Parameters: (QActive * const me)
+  Parameters: (QMActive * const me)
   Complexity   Param 1       Return 1      Cyclo Vg 3       Total        5
   LOC 37       eLOC 33       lLOC 24       Comment 32       Lines       48
 
@@ -1537,13 +1537,13 @@
   LOC 10       eLOC 9        lLOC 6        Comment 18       Lines       13
 
   Function: QActive_defer
-  Parameters: (QActive * const me, QEQueue * const eq, QEvt const * const 
-              e)
+  Parameters: (QMActive * const me, QEQueue * const eq, QEvt const * const
+               e)
   Complexity   Param 3       Return 1      Cyclo Vg 1       Total        5
   LOC 4        eLOC 2        lLOC 2        Comment 24       Lines        4
 
   Function: QActive_recall
-  Parameters: (QActive * const me, QEQueue * const eq)
+  Parameters: (QMActive * const me, QEQueue * const eq)
   Complexity   Param 2       Return 1      Cyclo Vg 3       Total        6
   LOC 19       eLOC 15       lLOC 10       Comment 33       Lines       36
 
@@ -1658,8 +1658,8 @@
   LOC 14       eLOC 10       lLOC 6        Comment 13       Lines       17
 
   Function: QTimeEvt_ctorX
-  Parameters: (QTimeEvt * const me, QActive * const act, enum_t const sig,
-               uint_fast8_t tickRate)
+  Parameters: (QTimeEvt * const me, QMActive * const act, enum_t const sig
+              , uint_fast8_t tickRate)
   Complexity   Param 4       Return 1      Cyclo Vg 2       Total        7
   LOC 11       eLOC 9        lLOC 8        Comment 32       Lines       31
 
@@ -1705,14 +1705,14 @@
   LOC 12       eLOC 10       lLOC 7        Comment 21       Lines       15
 
   Function: QActive_start_
-  Parameters: (QActive * const me, uint_fast8_t prio, QEvt const *qSto[], 
-              uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QEv
-              t const *ie)
+  Parameters: (QMActive * const me, uint_fast8_t prio, QEvt const *qSto[],
+               uint_fast16_t qLen, void *stkSto, uint_fast16_t stkSize, QE
+              vt const *ie)
   Complexity   Param 7       Return 1      Cyclo Vg 3       Total       11
   LOC 15       eLOC 13       lLOC 9        Comment 29       Lines       19
 
   Function: QActive_stop
-  Parameters: (QActive *me)
+  Parameters: (QMActive *me)
   Complexity   Param 1       Return 1      Cyclo Vg 1       Total        3
   LOC 3        eLOC 2        lLOC 1        Comment 13       Lines        3
 

+ 15 - 1
examples/arm-cm/blinky_ek-tm4c123gxl/README.txt

@@ -20,7 +20,7 @@ this folder for more details.
 
 
 QS Software Tracing Instrumentation
-===================================
+-----------------------------------
 This example provides the "Spy" build configuration, which outputs the QS
 (Quantum Spy) software tracing data through UART0, which is connected to
 the virtual COM port of the TI Stellaris debugger.
@@ -34,3 +34,17 @@ qspy -cCOM1
 
 The actual COM port number might be different on your Windows machine.
 Please check the Device Manager to find the COM port number.
+
+
+Win32 Emulations
+================
+The sub-directorie win32 and win32-qv provide the emulations of the example
+on Windows GUI (with regular Win32 threads and with cooperative QV scheduler,
+respectively. These sub-directories contain the Makefiles for the MinGW
+toolset and Visual Studio solution files (game-gui.sln) for Visual C++.
+
+The Win32 emulations use exactly the same code as the embedded board and
+differ only in the Board Support Package (bsp.c). This example demonstrates
+the "dual targeting" development approach, where most of the embedded code
+is developed on the desktop machine (Windows), but is intended for a deeply
+embedded target (EK-TM4C123GXL here).

+ 263 - 0
examples/arm-cm/blinky_ek-tm4c123gxl/win32-qv/Makefile

@@ -0,0 +1,263 @@
+##############################################################################
+# Product: Makefile for QP/C, Blinky example, Win32-QV console, MinGW
+# Last updated for version 5.4.2
+# Last updated on  2015-06-03
+#
+#                    Q u a n t u m     L e a P s
+#                    ---------------------------
+#                    innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Contact information:
+# Web:   www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT     := blinky
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP-nano framework (if not provided in an environemnt var.)
+ifeq ($(QPC),)
+QPC := ../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPC)/ports/win32-qv
+
+# list of all source directories used by this project
+VPATH = \
+	. \
+	..
+
+# list of all include directories needed by this project
+INCLUDES  = \
+	-I. \
+	-I.. \
+	-I$(QPC)/include
+
+# list of resource include directories needed by this project
+RCINCLUDES = \
+	-IRes
+
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# C source files
+C_SRCS := \
+	bsp.c \
+	main.c \
+	blinky.c
+
+# C++ source files
+CPP_SRCS :=	
+
+# Resource files
+RC_SRCS :=
+
+LIB_DIRS  :=
+LIBS      :=
+
+# defines...
+# QP_API_VERSION controls the QP API compatibility; 9999 means the latest API
+DEFINES   := -DQP_API_VERSION=9999
+
+#-----------------------------------------------------------------------------
+# MinGW toolset (NOTE: assumed to be on your PATH)
+#
+# NOTE:
+# MinGW toolset is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+# NOTE:
+# This Makefile assumes that the windres utility is available on the
+# PATH (NOTE: windres is available in the Qtools collection for Windows)
+#
+CC    := gcc
+CPP   := g++
+LINK  := gcc    # for C programs
+#LINK  := g++   # for C++ programs
+RC    := windres
+
+# basic utilities (included in Qtools for Windows), see:
+#    http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM    := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations
+#
+
+ifeq (rel, $(CONF)) # Release configuration ..................................
+
+BIN_DIR := rel
+
+CFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+else ifeq (spy, $(CONF))  # Spy configuration ................................
+
+# make sure that QTOOLS exists...
+ifeq ("$(wildcard $(QTOOLS))","")
+$(error QTOOLS not found. Please install Qtools and define QTOOLS env. variable)
+endif
+
+INCLUDES +=	-I$(QTOOLS)/qspy/include
+VPATH    += $(QTOOLS)/qspy/source
+C_SRCS   += qspy.c
+
+BIN_DIR := spy
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+else  # default Debug configuration ..........................................
+
+BIN_DIR := dbg
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+endif  # .....................................................................
+
+LINKFLAGS := -Wl,-Map,$(BIN_DIR)/$(PROJECT).map,--cref,--gc-sections
+
+# is it a GUI application (any GUI resources provided?) ...
+ifneq (,$(RC_SRCS))
+LINKFLAGS += -mwindows
+DEFINES += -DWIN32_GUI
+endif
+
+#-----------------------------------------------------------------------------
+
+# combine all the soruces...
+INCLUDES  += -I$(QP_PORT_DIR)
+LIB_DIRS  += -L$(QP_PORT_DIR)/$(BIN_DIR)
+LIBS      += -lqp
+
+C_OBJS       := $(patsubst %.c,   %.o, $(C_SRCS))
+CPP_OBJS     := $(patsubst %.cpp, %.o, $(CPP_SRCS))
+RC_OBJS      := $(patsubst %.rc,  %.o, $(RC_SRCS))
+
+TARGET_BIN   := $(BIN_DIR)/$(PROJECT).bin
+TARGET_EXE   := $(BIN_DIR)/$(PROJECT).exe
+C_OBJS_EXT   := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT   := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+RC_OBJS_EXT  := $(addprefix $(BIN_DIR)/, $(RC_OBJS))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_EXE)
+#all: $(TARGET_BIN)
+
+$(TARGET_BIN): $(TARGET_EXE)
+	$(BIN) -O binary $< $@
+
+$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(RC_OBJS_EXT)
+	$(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+	$(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+	$(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+	$(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+	$(CPP) $(CPPFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.rc
+	$(RC) $(RCINCLUDES) -i $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+  ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+  endif
+endif
+
+.PHONY : clean
+clean:
+	-$(RM) $(BIN_DIR)/*.o \
+	$(BIN_DIR)/*.d \
+	$(BIN_DIR)/*.exe \
+	$(BIN_DIR)/*.map
+	
+show:
+	@echo PROJECT  = $(PROJECT)
+	@echo CONF     = $(CONF)
+	@echo VPATH    = $(VPATH)
+	@echo C_SRCS   = $(C_SRCS)
+	@echo CPP_SRCS = $(CPP_SRCS)
+	@echo C_OBJS_EXT   = $(C_OBJS_EXT)
+	@echo C_DEPS_EXT   = $(C_DEPS_EXT)
+	@echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+	@echo RC_OBJS_EXT  = $(RC_OBJS_EXT)
+	@echo LIB_DIRS = $(LIB_DIRS)
+	@echo LIBS     = $(LIBS)

+ 89 - 0
examples/arm-cm/blinky_ek-tm4c123gxl/win32-qv/bsp.c

@@ -0,0 +1,89 @@
+/*****************************************************************************
+* Product: "Blinky" example, Win32 API
+* Last Updated for Version: 5.4.0
+* Date of the Last Update:  2015-04-07
+*
+*                    Q u a n t u m     L e a P s
+*                    ---------------------------
+*                    innovating embedded systems
+*
+* Copyright (C) Quantum Leaps, LLC. state-machine.com.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* Contact information:
+* Web  : http://www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+#include "qpc.h"
+#include "bsp.h"
+
+#include <conio.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+
+Q_DEFINE_THIS_FILE
+
+#ifdef Q_SPY
+    #error Simple Blinky Application does not provide Spy build configuration
+#endif
+
+/*..........................................................................*/
+void BSP_init() {
+    printf("Simple Blinky example\nQP version: %s\n"
+           "Press ESC to quit...\n",
+           QP_VERSION_STR);
+}
+/*..........................................................................*/
+void BSP_ledOff(uint_fast8_t n) {
+    printf("LED[%d] OFF\n", (int)n);
+}
+/*..........................................................................*/
+void BSP_ledOn(uint_fast8_t n) {
+    printf("LED[%d] ON\n", (int)n);
+}
+
+/*--------------------------------------------------------------------------*/
+void QF_onStartup(void) {
+    QF_setTickRate(BSP_TICKS_PER_SEC); /* set the desired tick rate */
+}
+/*..........................................................................*/
+void QF_onCleanup(void) {
+    printf("\nBye! Bye!\n");
+}
+/*..........................................................................*/
+void QF_onClockTick(void) {
+    QF_TICK_X(0U, (void *)0);  /* perform the QF clock tick processing */
+    if (_kbhit()) {            /* any key pressed? */
+        switch (_getch()) {
+            case '\33': {      /* ESC pressed? */
+                QF_stop();
+                break;
+            }
+        }
+    }
+}
+
+/*--------------------------------------------------------------------------*/
+void Q_onAssert(char const Q_ROM * const file, int line) {
+    fprintf(stderr, "Assertion failed in %s, line %d", file, line);
+    exit(-1);
+}
+

+ 263 - 0
examples/arm-cm/blinky_ek-tm4c123gxl/win32/Makefile

@@ -0,0 +1,263 @@
+##############################################################################
+# Product: Makefile for QP/C, Blinky example, Win32 console, MinGW
+# Last updated for version 5.4.0
+# Last updated on  2015-06-02
+#
+#                    Q u a n t u m     L e a P s
+#                    ---------------------------
+#                    innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Contact information:
+# Web:   www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT     := blinky
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP-nano framework (if not provided in an environemnt var.)
+ifeq ($(QPC),)
+QPC := ../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPC)/ports/win32
+
+# list of all source directories used by this project
+VPATH = \
+	. \
+	..
+
+# list of all include directories needed by this project
+INCLUDES  = \
+	-I. \
+	-I.. \
+	-I$(QPC)/include
+
+# list of resource include directories needed by this project
+RCINCLUDES = \
+	-IRes
+
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# C source files...
+C_SRCS := \
+	bsp.c \
+	main.c \
+	blinky.c
+
+# C++ source files...
+CPP_SRCS :=	
+
+# Resource files...
+RC_SRCS :=
+
+LIB_DIRS  :=
+LIBS      :=
+
+# defines...
+# QP_API_VERSION controls the QP API compatibility; 9999 means the latest API
+DEFINES   := -DQP_API_VERSION=9999
+
+#-----------------------------------------------------------------------------
+# MinGW toolset (NOTE: assumed to be on your PATH)
+#
+# NOTE:
+# MinGW toolset is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+# NOTE:
+# This Makefile assumes that the windres utility is available on the
+# PATH (NOTE: windres is available in the Qtools collection for Windows)
+#
+CC    := gcc
+CPP   := g++
+LINK  := gcc    # for C programs
+#LINK  := g++   # for C++ programs
+RC    := windres
+
+# basic utilities (included in Qtools for Windows), see:
+#    http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM    := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations
+#
+
+ifeq (rel, $(CONF)) # Release configuration ..................................
+
+BIN_DIR := rel
+
+CFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+else ifeq (spy, $(CONF))  # Spy configuration ................................
+
+# make sure that QTOOLS exists...
+ifeq ("$(wildcard $(QTOOLS))","")
+$(error QTOOLS not found. Please install Qtools and define QTOOLS env. variable)
+endif
+
+INCLUDES +=	-I$(QTOOLS)/qspy/include
+VPATH    += $(QTOOLS)/qspy/source
+C_SRCS   += qspy.c
+
+BIN_DIR := spy
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+else  # default Debug configuration ..........................................
+
+BIN_DIR := dbg
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+endif  # .....................................................................
+
+LINKFLAGS := -Wl,-Map,$(BIN_DIR)/$(PROJECT).map,--cref,--gc-sections
+
+# is it a GUI application (any GUI resources provided?) ...
+ifneq (,$(RC_SRCS))
+LINKFLAGS += -mwindows
+DEFINES += -DWIN32_GUI
+endif
+
+#-----------------------------------------------------------------------------
+
+# combine all the soruces...
+INCLUDES  += -I$(QP_PORT_DIR)
+LIB_DIRS  += -L$(QP_PORT_DIR)/$(BIN_DIR)
+LIBS      += -lqp
+
+C_OBJS       := $(patsubst %.c,   %.o, $(C_SRCS))
+CPP_OBJS     := $(patsubst %.cpp, %.o, $(CPP_SRCS))
+RC_OBJS      := $(patsubst %.rc,  %.o, $(RC_SRCS))
+
+TARGET_BIN   := $(BIN_DIR)/$(PROJECT).bin
+TARGET_EXE   := $(BIN_DIR)/$(PROJECT).exe
+C_OBJS_EXT   := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT   := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+RC_OBJS_EXT  := $(addprefix $(BIN_DIR)/, $(RC_OBJS))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_EXE)
+#all: $(TARGET_BIN)
+
+$(TARGET_BIN): $(TARGET_EXE)
+	$(BIN) -O binary $< $@
+
+$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(RC_OBJS_EXT)
+	$(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+	$(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+	$(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+	$(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+	$(CPP) $(CPPFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.rc
+	$(RC) $(RCINCLUDES) -i $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+  ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+  endif
+endif
+
+.PHONY : clean
+clean:
+	-$(RM) $(BIN_DIR)/*.o \
+	$(BIN_DIR)/*.d \
+	$(BIN_DIR)/*.exe \
+	$(BIN_DIR)/*.map
+	
+show:
+	@echo PROJECT  = $(PROJECT)
+	@echo CONF     = $(CONF)
+	@echo VPATH    = $(VPATH)
+	@echo C_SRCS   = $(C_SRCS)
+	@echo CPP_SRCS = $(CPP_SRCS)
+	@echo C_OBJS_EXT   = $(C_OBJS_EXT)
+	@echo C_DEPS_EXT   = $(C_DEPS_EXT)
+	@echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+	@echo RC_OBJS_EXT  = $(RC_OBJS_EXT)
+	@echo LIB_DIRS = $(LIB_DIRS)
+	@echo LIBS     = $(LIBS)

+ 0 - 0
examples/win32/blinky/bsp.c → examples/arm-cm/blinky_ek-tm4c123gxl/win32/bsp.c


+ 14 - 0
examples/arm-cm/dpp_ek-tm4c123gxl/README.txt

@@ -35,3 +35,17 @@ qspy -cCOM1
 
 The actual COM port number might be different on your Windows machine.
 Please check the Device Manager to find the COM port number.
+
+
+Win32 Emulations
+================
+The sub-directorie win32 and win32-qv provide the emulations of the example
+on Windows GUI (with regular Win32 threads and with cooperative QV scheduler,
+respectively. These sub-directories contain the Makefiles for the MinGW
+toolset and Visual Studio solution files (game-gui.sln) for Visual C++.
+
+The Win32 emulations use exactly the same code as the embedded board and
+differ only in the Board Support Package (bsp.c). This example demonstrates
+the "dual targeting" development approach, where most of the embedded code
+is developed on the desktop machine (Windows), but is intended for a deeply
+embedded target (EK-TM4C123GXL here).

+ 133 - 17
examples/arm-cm/dpp_ek-tm4c123gxl/lint/lint_out.txt

@@ -1,6 +1,6 @@
 
 --- Module:   D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c (C)
-"D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 1 Note 950: Non-ANSI reserved word or construct: 'inline' [MISRA 2004 Rule 1.1, required], [MISRA 2004 Rule 2.2, required]
+"D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 8 Note 950: Non-ANSI reserved word or construct: 'inline' [MISRA 2004 Rule 1.1, required], [MISRA 2004 Rule 2.2, required]
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 15 Warning 618: Storage class specified after a type
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 15 Note 963: Qualifier const or volatile precedes a type; use +fqb to reverse the test
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 42 Note 960: Violates MISRA 2004 Required Rule 8.5, object/function definition in header file: 'QK_get_IPSR' 
@@ -8,13 +8,10 @@
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 48 52 Note 960: Violates MISRA 2004 Required Rule 14.3, null statement not in line by itself
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 49 19 Warning 530: Symbol 'regIPSR' (line 47) not initialized [MISRA 2004 Rule 9.1, required]
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 47 1 Info 830: Location cited in prior message
-"D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c" 185 1 Info 818: Pointer parameter 'me' (line 180) could be declared as pointing to const [MISRA 2004 Rule 16.7, advisory]
-"D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c" 180 1 Info 830: Location cited in prior message
-"D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c" 237 1 Info 818: Pointer parameter 'me' (line 232) could be declared as pointing to const [MISRA 2004 Rule 16.7, advisory]
-"D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c" 232 1 Info 830: Location cited in prior message
+"D:\qp\qpc\ports\arm-cm\qk\gnu\qs_port.h" 59 10 Warning 537: Repeated include file 'D:\qp\qpc\ports\arm-cm\qk\gnu\qf_port.h'
 
 --- Module:   D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\table.c (C)
-"D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 1 Note 950: Non-ANSI reserved word or construct: 'inline' [MISRA 2004 Rule 1.1, required], [MISRA 2004 Rule 2.2, required]
+"D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 8 Note 950: Non-ANSI reserved word or construct: 'inline' [MISRA 2004 Rule 1.1, required], [MISRA 2004 Rule 2.2, required]
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 15 Warning 618: Storage class specified after a type
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 15 Note 963: Qualifier const or volatile precedes a type; use +fqb to reverse the test
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 46 42 Note 960: Violates MISRA 2004 Required Rule 8.5, object/function definition in header file: 'QK_get_IPSR' 
@@ -22,12 +19,10 @@
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 48 52 Note 960: Violates MISRA 2004 Required Rule 14.3, null statement not in line by itself
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 49 19 Warning 530: Symbol 'regIPSR' (line 47) not initialized [MISRA 2004 Rule 9.1, required]
 "D:\qp\qpc\ports\arm-cm\qk\gnu\qk_port.h" 47 1 Info 830: Location cited in prior message
+"D:\qp\qpc\ports\arm-cm\qk\gnu\qs_port.h" 59 10 Warning 537: Repeated include file 'D:\qp\qpc\ports\arm-cm\qk\gnu\qf_port.h'
 "D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\table.c" 148 21 Warning 527: Unreachable code at token 'status_' [MISRA 2004 Rule 14.1, required]
 "D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\table.c" 257 21 Warning 527: Unreachable code at token 'status_' [MISRA 2004 Rule 14.1, required]
-"D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c" 57 1 Note 960: Violates MISRA 2004 Required Rule 8.7, could define variable at block scope: 'Philo_eating_s' at location line 57, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c
 "D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\dpp.h" 56 1 Note 960: Violates MISRA 2004 Required Rule 8.7, could define variable at block scope: 'AO_Table' at location line 56, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\dpp.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c
-"D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c" 47 1 Note 960: Violates MISRA 2004 Required Rule 8.7, could define variable at block scope: 'Philo_hungry_s' at location line 47, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c
-"D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\table.c" 57 1 Note 960: Violates MISRA 2004 Required Rule 8.7, could define variable at block scope: 'Table_paused_s' at location line 57, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\table.c
 
 /// Start of Pass 2 ///
 
@@ -37,8 +32,17 @@
 
 --- Global Wrap-up
 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_mem' 
 "D:\qp\qpc\include\qf.h" 162 1 Warning 526: Symbol 'QMActive_ctor(QMActive *, QStateHandler)' (line 162, file D:\qp\qpc\include\qf.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QMActive_ctor' 
+"D:\qp\qpc\include\qs.h" 262 1 Warning 526: Symbol 'QS_obj_dict(const void *, const char_t *)' (line 262, file D:\qp\qpc\include\qs.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_obj_dict' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_onStartup' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_onCleanup' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_onFlush' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_onGetTime' 
+"D:\qp\qpc\include\qs.h" 1068 1 Warning 526: Symbol 'QS_priv_' (line 1068, file D:\qp\qpc\include\qs.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_priv_' 
 "D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\table.c" 79 1 Info 759: header declaration for symbol 'Table_ctor(void)' defined at (line 79, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\table.c) could be moved from header to module
 "D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\table.c" 79 1 Info 765: external 'Table_ctor(void)' (line 79, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\table.c) could be made static [MISRA 2004 Rule 8.10, required]
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QK_init' 
@@ -57,12 +61,19 @@
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'BSP_random' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_onStartup' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_onCleanup' 
- Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QP_versionStr' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_beginRec' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_poolInit' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_psInit' 
-"D:\qp\qpc\include\qf.h" 591 1 Warning 526: Symbol 'QF_publish_(const QEvt *)' (line 591, file D:\qp\qpc\include\qf.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
+"D:\qp\qpc\include\qf.h" 563 1 Warning 526: Symbol 'QF_publish_(const QEvt *, const void *)' (line 563, file D:\qp\qpc\include\qf.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_publish_' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_pwr2Lkup' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QP_versionStr' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_str' 
+"D:\qp\qpc\include\qs.h" 258 1 Warning 526: Symbol 'QS_sig_dict(enum_t, const void *, const char_t *)' (line 258, file D:\qp\qpc\include\qs.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_sig_dict' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_str_' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_str_ROM_' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_str_ROM' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_active_' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_add_' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_run' 
@@ -70,6 +81,15 @@
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_bzero' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QK_mutexLock' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QK_mutexUnlock' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_endRec' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_u16' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_u16_' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_u32' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_u32_' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_u8' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_u8_' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_u8u8_' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_usr_dict' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QActive_ctor' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QActive_postLIFO_' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QActive_defer' 
@@ -87,13 +107,22 @@
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QHsm_dispatch_' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QHsm_init_' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QHsm_isIn' 
+"D:\qp\qpc\include\qep.h" 445 1 Warning 526: Symbol 'QHsm_top(const void *, const QEvt *)' (line 445, file D:\qp\qpc\include\qep.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QHsm_top' 
- Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QK_onIdle' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_filterOff' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_f32' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_f64' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_filterOn' 
+"D:\qp\qpc\include\qs.h" 266 1 Warning 526: Symbol 'QS_fun_dict(void (*)(void), const char_t *)' (line 266, file D:\qp\qpc\include\qs.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_fun_dict' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_tickX_' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_div8Lkup' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QK_onIdle' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_getByte' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_getBlock' 
 "D:\qp\qpc\include\qf.h" 476 1 Warning 526: Symbol 'QTimeEvt_armX(struct QTimeEvt *, QTimeEvtCtr, QTimeEvtCtr)' (line 476, file D:\qp\qpc\include\qf.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QTimeEvt_armX' 
-"D:\qp\qpc\include\qf.h" 472 1 Warning 526: Symbol 'QTimeEvt_ctorX(struct QTimeEvt *, QActive *, enum_t, uint_fast8_t)' (line 472, file D:\qp\qpc\include\qf.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
+"D:\qp\qpc\include\qf.h" 472 1 Warning 526: Symbol 'QTimeEvt_ctorX(struct QTimeEvt *, QMActive *, enum_t, uint_fast8_t)' (line 472, file D:\qp\qpc\include\qf.h, module D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) not defined
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QTimeEvt_ctorX' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QTimeEvt_rearm' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QTimeEvt_disarm' 
@@ -102,6 +131,7 @@
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QEQueue_init' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QEQueue_post' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QEQueue_postLIFO' 
+ Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QS_initBuf' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QK_readySet_' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_gc' 
 "D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c" 88 1 Info 759: header declaration for symbol 'Philo_ctor(void)' defined at (line 88, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) could be moved from header to module
@@ -125,6 +155,7 @@
 "D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c" 78 1 Info 765: external 'AO_Philo' (line 78, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\philo.c) could be made static [MISRA 2004 Rule 8.10, required]
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_init' 
  Note 960: Violates MISRA 2004 Required Rule 8.9, undefined symbol: 'QF_invPwr2Lkup' 
+"D:\qp\qpc\include\qs.h" 750 1 Info 758: global enum '(untagged)' (line 750, file D:\qp\qpc\include\qs.h) not referenced
 "D:\qp\qpc\include\qep.h" 463 1 Info 769: global enumeration constant 'Q_RET_SUPER_SUB' (line 463, file D:\qp\qpc\include\qep.h) not referenced
 "D:\qp\qpc\include\qep.h" 468 1 Info 769: global enumeration constant 'Q_RET_IGNORED' (line 468, file D:\qp\qpc\include\qep.h) not referenced
 "D:\qp\qpc\include\qep.h" 475 1 Info 769: global enumeration constant 'Q_RET_NULL' (line 475, file D:\qp\qpc\include\qep.h) not referenced
@@ -134,19 +165,104 @@
 "D:\qp\qpc\include\qep.h" 604 1 Info 769: global enumeration constant 'Q_ENTRY_SIG' (line 604, file D:\qp\qpc\include\qep.h) not referenced
 "D:\qp\qpc\include\qep.h" 605 1 Info 769: global enumeration constant 'Q_EXIT_SIG' (line 605, file D:\qp\qpc\include\qep.h) not referenced
 "D:\qp\qpc\include\qep.h" 606 1 Info 769: global enumeration constant 'Q_INIT_SIG' (line 606, file D:\qp\qpc\include\qep.h) not referenced
+"D:\qp\qpc\include\qs.h" 57 1 Info 769: global enumeration constant 'QSpyRecords::QS_QP_RESET' (line 57, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 60 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_STATE_ENTRY' (line 60, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 61 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_STATE_EXIT' (line 61, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 62 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_STATE_INIT' (line 62, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 63 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_INIT_TRAN' (line 63, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 64 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_INTERN_TRAN' (line 64, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 65 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_TRAN' (line 65, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 66 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_IGNORED' (line 66, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 67 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_DISPATCH' (line 67, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 68 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_UNHANDLED' (line 68, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 71 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ACTIVE_ADD' (line 71, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 72 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ACTIVE_REMOVE' (line 72, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 73 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ACTIVE_SUBSCRIBE' (line 73, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 74 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ACTIVE_UNSUBSCRIBE' (line 74, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 75 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ACTIVE_POST_FIFO' (line 75, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 76 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ACTIVE_POST_LIFO' (line 76, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 77 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ACTIVE_GET' (line 77, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 78 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ACTIVE_GET_LAST' (line 78, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 79 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_EQUEUE_INIT' (line 79, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 80 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_EQUEUE_POST_FIFO' (line 80, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 81 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_EQUEUE_POST_LIFO' (line 81, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 82 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_EQUEUE_GET' (line 82, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 83 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_EQUEUE_GET_LAST' (line 83, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 84 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_MPOOL_INIT' (line 84, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 85 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_MPOOL_GET' (line 85, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 86 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_MPOOL_PUT' (line 86, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 87 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_PUBLISH' (line 87, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 88 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_RESERVED8' (line 88, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 89 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_NEW' (line 89, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 90 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_GC_ATTEMPT' (line 90, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 91 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_GC' (line 91, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 92 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_TICK' (line 92, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 93 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_TIMEEVT_ARM' (line 93, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 94 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_TIMEEVT_AUTO_DISARM' (line 94, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 95 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_TIMEEVT_DISARM_ATTEMPT' (line 95, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 96 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_TIMEEVT_DISARM' (line 96, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 97 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_TIMEEVT_REARM' (line 97, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 98 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_TIMEEVT_POST' (line 98, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 99 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_TIMEEVT_CTR' (line 99, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 100 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_CRIT_ENTRY' (line 100, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 101 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_CRIT_EXIT' (line 101, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 102 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ISR_ENTRY' (line 102, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 103 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ISR_EXIT' (line 103, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 104 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_INT_DISABLE' (line 104, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 105 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_INT_ENABLE' (line 105, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 106 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_ACTIVE_POST_ATTEMPT' (line 106, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 107 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_EQUEUE_POST_ATTEMPT' (line 107, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 108 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_MPOOL_GET_ATTEMPT' (line 108, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 109 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_RESERVED1' (line 109, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 110 1 Info 769: global enumeration constant 'QSpyRecords::QS_QF_RESERVED0' (line 110, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 113 1 Info 769: global enumeration constant 'QSpyRecords::QS_QK_MUTEX_LOCK' (line 113, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 114 1 Info 769: global enumeration constant 'QSpyRecords::QS_QK_MUTEX_UNLOCK' (line 114, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 115 1 Info 769: global enumeration constant 'QSpyRecords::QS_QK_SCHEDULE' (line 115, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 116 1 Info 769: global enumeration constant 'QSpyRecords::QS_QK_RESERVED1' (line 116, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 117 1 Info 769: global enumeration constant 'QSpyRecords::QS_QK_RESERVED0' (line 117, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 120 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_TRAN_HIST' (line 120, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 121 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_TRAN_EP' (line 121, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 122 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_TRAN_XP' (line 122, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 123 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_RESERVED1' (line 123, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 124 1 Info 769: global enumeration constant 'QSpyRecords::QS_QEP_RESERVED0' (line 124, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 130 1 Info 769: global enumeration constant 'QSpyRecords::QS_USR_DICT' (line 130, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 131 1 Info 769: global enumeration constant 'QSpyRecords::QS_EMPTY' (line 131, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 132 1 Info 769: global enumeration constant 'QSpyRecords::QS_RESERVED3' (line 132, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 133 1 Info 769: global enumeration constant 'QSpyRecords::QS_RESERVED2' (line 133, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 134 1 Info 769: global enumeration constant 'QSpyRecords::QS_TEST_RUN' (line 134, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 135 1 Info 769: global enumeration constant 'QSpyRecords::QS_TEST_FAIL' (line 135, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 136 1 Info 769: global enumeration constant 'QSpyRecords::QS_ASSERT_FAIL' (line 136, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 139 1 Info 769: global enumeration constant 'QSpyRecords::QS_USER' (line 139, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 751 1 Info 769: global enumeration constant 'QS_I8_T' (line 751, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 752 1 Info 769: global enumeration constant 'QS_U8_T' (line 752, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 753 1 Info 769: global enumeration constant 'QS_I16_T' (line 753, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 754 1 Info 769: global enumeration constant 'QS_U16_T' (line 754, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 755 1 Info 769: global enumeration constant 'QS_I32_T' (line 755, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 756 1 Info 769: global enumeration constant 'QS_U32_T' (line 756, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 757 1 Info 769: global enumeration constant 'QS_F32_T' (line 757, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 758 1 Info 769: global enumeration constant 'QS_F64_T' (line 758, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 759 1 Info 769: global enumeration constant 'QS_STR_T' (line 759, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 760 1 Info 769: global enumeration constant 'QS_MEM_T' (line 760, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 761 1 Info 769: global enumeration constant 'QS_SIG_T' (line 761, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 762 1 Info 769: global enumeration constant 'QS_OBJ_T' (line 762, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 763 1 Info 769: global enumeration constant 'QS_FUN_T' (line 763, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 764 1 Info 769: global enumeration constant 'QS_I64_T' (line 764, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 765 1 Info 769: global enumeration constant 'QS_U64_T' (line 765, file D:\qp\qpc\include\qs.h) not referenced
+"D:\qp\qpc\include\qs.h" 766 1 Info 769: global enumeration constant 'QS_U32_HEX_T' (line 766, file D:\qp\qpc\include\qs.h) not referenced
 "D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\dpp.h" 27 1 Info 769: global enumeration constant 'DPPSignals::MAX_PUB_SIG' (line 27, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\dpp.h) not referenced
 "D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\dpp.h" 31 1 Info 769: global enumeration constant 'DPPSignals::MAX_SIG' (line 31, file D:\qp\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\dpp.h) not referenced
 
 Count   Type    Number  Text
 
-11      Warning 526     Symbol '___' (___) not defined
+16      Warning 526     Symbol '___' (___) not defined
 2       Warning 527     Unreachable code at token '___'
 2       Warning 530     Symbol '___' (___) not initialized
+2       Warning 537     Repeated include file '___'
 2       Warning 618     Storage class specified after a type
+1       Info    758     global ___ '___' (___) not referenced
 3       Info    759     header declaration for symbol '___' defined at (___) could be moved from header to module
 3       Info    765     external '___' (___) could be made static
-11      Info    769     global enumeration constant '___' (___) not referenced
-2       Info    818     Pointer parameter '___' (___) could be declared as pointing to const
+95      Info    769     global enumeration constant '___' (___) not referenced
 2       Note    950     Non-ANSI reserved word or construct: '___'
-81      Note    960     Violates MISRA 2004 Required Rule ___, ___
+108     Note    960     Violates MISRA 2004 Required Rule ___, ___
 2       Note    963     Qualifier const or volatile ___ a type; use ___ to reverse the test

+ 2 - 2
examples/arm-cm/dpp_ek-tm4c123gxl/main.c

@@ -1,7 +1,7 @@
 /*****************************************************************************
 * Product: DPP example
-* Last Updated for Version: 5.4.0
-* Date of the Last Update:  2015-04-07
+* Last Updated for Version: 5.4.2
+* Date of the Last Update:  2015-06-02
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------

+ 265 - 0
examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Makefile

@@ -0,0 +1,265 @@
+##############################################################################
+# Product: Makefile for QP/C, DPP, Win32-QV GUI, MinGW
+# Last updated for version 5.4.2
+# Last updated on  2015-06-03
+#
+#                    Q u a n t u m     L e a P s
+#                    ---------------------------
+#                    innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Contact information:
+# Web:   www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT     := dpp-gui
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP-nano framework (if not provided in an environemnt var.)
+ifeq ($(QPC),)
+QPC := ../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPC)/ports/win32-qv
+
+# list of all source directories used by this project
+VPATH = \
+	. \
+	..
+
+# list of all include directories needed by this project
+INCLUDES  = \
+	-I. \
+	-I.. \
+	-I$(QPC)/include
+
+# list of resource include directories needed by this project
+RCINCLUDES = \
+	-IRes
+
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# C source files
+C_SRCS := \
+	bsp.c \
+	main.c \
+	philo.c \
+	table.c
+
+# C++ source files
+CPP_SRCS :=	
+
+# Resource files
+RC_SRCS := \
+	dpp-gui.rc
+
+LIB_DIRS  :=
+LIBS      :=
+
+# defines...
+# QP_API_VERSION controls the QP API compatibility; 9999 means the latest API
+DEFINES   := -DQP_API_VERSION=9999
+
+#-----------------------------------------------------------------------------
+# MinGW toolset (NOTE: assumed to be on your PATH)
+#
+# NOTE:
+# MinGW toolset is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+# NOTE:
+# This Makefile assumes that the windres utility is available on the
+# PATH (NOTE: windres is available in the Qtools collection for Windows)
+#
+CC    := gcc
+CPP   := g++
+LINK  := gcc    # for C programs
+#LINK  := g++   # for C++ programs
+RC    := windres
+
+# basic utilities (included in Qtools for Windows), see:
+#    http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM    := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations
+#
+
+ifeq (rel, $(CONF)) # Release configuration ..................................
+
+BIN_DIR := rel
+
+CFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+else ifeq (spy, $(CONF))  # Spy configuration ................................
+
+# make sure that QTOOLS exists...
+ifeq ("$(wildcard $(QTOOLS))","")
+$(error QTOOLS not found. Please install Qtools and define QTOOLS env. variable)
+endif
+
+INCLUDES +=	-I$(QTOOLS)/qspy/include
+VPATH    += $(QTOOLS)/qspy/source
+C_SRCS   += qspy.c
+
+BIN_DIR := spy
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+else  # default Debug configuration ..........................................
+
+BIN_DIR := dbg
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+endif  # .....................................................................
+
+LINKFLAGS := -Wl,-Map,$(BIN_DIR)/$(PROJECT).map,--cref,--gc-sections
+
+# is it a GUI application (any GUI resources provided?) ...
+ifneq (,$(RC_SRCS))
+LINKFLAGS += -mwindows
+DEFINES += -DWIN32_GUI
+endif
+
+#-----------------------------------------------------------------------------
+
+# combine all the soruces...
+INCLUDES  += -I$(QP_PORT_DIR)
+LIB_DIRS  += -L$(QP_PORT_DIR)/$(BIN_DIR)
+LIBS      += -lqp
+
+C_OBJS       := $(patsubst %.c,   %.o, $(C_SRCS))
+CPP_OBJS     := $(patsubst %.cpp, %.o, $(CPP_SRCS))
+RC_OBJS      := $(patsubst %.rc,  %.o, $(RC_SRCS))
+
+TARGET_BIN   := $(BIN_DIR)/$(PROJECT).bin
+TARGET_EXE   := $(BIN_DIR)/$(PROJECT).exe
+C_OBJS_EXT   := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT   := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+RC_OBJS_EXT  := $(addprefix $(BIN_DIR)/, $(RC_OBJS))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_EXE)
+#all: $(TARGET_BIN)
+
+$(TARGET_BIN): $(TARGET_EXE)
+	$(BIN) -O binary $< $@
+
+$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(RC_OBJS_EXT)
+	$(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+	$(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+	$(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+	$(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+	$(CPP) $(CPPFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.rc
+	$(RC) $(RCINCLUDES) -i $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+  ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+  endif
+endif
+
+.PHONY : clean
+clean:
+	-$(RM) $(BIN_DIR)/*.o \
+	$(BIN_DIR)/*.d \
+	$(BIN_DIR)/*.exe \
+	$(BIN_DIR)/*.map
+	
+show:
+	@echo PROJECT  = $(PROJECT)
+	@echo CONF     = $(CONF)
+	@echo VPATH    = $(VPATH)
+	@echo C_SRCS   = $(C_SRCS)
+	@echo CPP_SRCS = $(CPP_SRCS)
+	@echo C_OBJS_EXT   = $(C_OBJS_EXT)
+	@echo C_DEPS_EXT   = $(C_DEPS_EXT)
+	@echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+	@echo RC_OBJS_EXT  = $(RC_OBJS_EXT)
+	@echo LIB_DIRS = $(LIB_DIRS)
+	@echo LIBS     = $(LIBS)

+ 0 - 0
examples/win32-qv/game-gui/Res/BTN_DWN.bmp → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/BTN_DWN.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/BTN_UP.bmp → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/BTN_UP.bmp


+ 0 - 0
examples/win32/dpp-gui/Res/eating.bmp → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/eating.bmp


+ 0 - 0
examples/win32/dpp-gui/Res/hungry.bmp → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/hungry.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/qp.ico → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/qp.ico


+ 0 - 0
examples/win32/dpp-gui/Res/thinking.bmp → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/Res/thinking.bmp


+ 4 - 4
examples/win32/dpp-gui/bsp.c → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/bsp.c

@@ -1,7 +1,7 @@
 /*****************************************************************************
 * Product: DPP example, Win32-GUI
-* Last updated for version 5.4.0
-* Last updated on  2015-04-07
+* Last updated for version 5.4.2
+* Last updated on  2015-06-03
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
@@ -220,8 +220,8 @@ void QF_onClockTick(void) {
 void Q_onAssert(char const Q_ROM * const file, int line) {
     char message[80];
     QF_stop(); /* stop ticking */
-    snprintf(message, Q_DIM(message) - 1,
-             "Assertion failed in module %s line %d", file, line);
+    SNPRINTF_S(message, Q_DIM(message) - 1,
+               "Assertion failed in module %s line %d", file, line);
     MessageBox(l_hWnd, message, "!!! ASSERTION !!!",
                MB_OK | MB_ICONEXCLAMATION | MB_APPLMODAL);
     PostQuitMessage(-1);

+ 0 - 0
examples/win32/dpp-gui/dpp-gui.rc → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/dpp-gui.rc


+ 0 - 0
examples/win32/dpp-gui/dpp-gui.sln → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/dpp-gui.sln


+ 17 - 52
examples/win32/dpp-gui/dpp-gui.vcxproj → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/dpp-gui.vcxproj

@@ -81,8 +81,8 @@
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>.;../../../include;../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>NDEBUG;snprintf=_snprintf;WIN32;_CRT_SECURE_NO_WARNINGS;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>NDEBUG;WIN32_GUI;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>false</StringPooling>
       <ExceptionHandling>
       </ExceptionHandling>
@@ -102,10 +102,10 @@
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>../../../../ports/win32/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <SubSystem>Windows</SubSystem>
       <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
@@ -129,8 +129,8 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../../include;../../../ports/win32;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>Q_SPY;snprintf=_snprintf;WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>Q_SPY;WIN32_GUI;snprintf=_snprintf;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>false</StringPooling>
       <ExceptionHandling>
       </ExceptionHandling>
@@ -152,10 +152,10 @@
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>../../../../ports/win32/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <GenerateMapFile>false</GenerateMapFile>
       <MapFileName>
@@ -183,8 +183,8 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../../include;../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>snprintf=_snprintf;WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32_GUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>false</StringPooling>
       <ExceptionHandling>
       </ExceptionHandling>
@@ -208,10 +208,10 @@
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>../../../../ports/win32/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <GenerateMapFile>false</GenerateMapFile>
       <MapFileName>
@@ -232,6 +232,9 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\main.c" />
+    <ClCompile Include="..\philo.c" />
+    <ClCompile Include="..\table.c" />
     <ClCompile Include="bsp.c">
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -240,34 +243,10 @@
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="main.c">
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="philo.c">
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="table.c">
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="bsp.h" />
-    <ClInclude Include="dpp.h" />
+    <ClInclude Include="..\bsp.h" />
+    <ClInclude Include="..\dpp.h" />
     <ClInclude Include="resource.h" />
   </ItemGroup>
   <ItemGroup>
@@ -282,20 +261,6 @@
   <ItemGroup>
     <ResourceCompile Include="dpp-gui.rc" />
   </ItemGroup>
-  <ItemGroup>
-    <Library Include="..\..\..\ports\win32\vc\Debug\qp.lib">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">true</ExcludedFromBuild>
-    </Library>
-    <Library Include="..\..\..\ports\win32\vc\QSpy\qp.lib">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-    </Library>
-    <Library Include="..\..\..\ports\win32\vc\Release\qp.lib">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">true</ExcludedFromBuild>
-    </Library>
-  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>

+ 53 - 0
examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/dpp-gui.vcxproj.filters

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="bsp.c" />
+    <ClCompile Include="$(QTOOLS)\qspy\source\qspy.c">
+      <Filter>Q_SPY</Filter>
+    </ClCompile>
+    <ClCompile Include="..\main.c" />
+    <ClCompile Include="..\philo.c" />
+    <ClCompile Include="..\table.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="resource.h" />
+    <ClInclude Include="..\bsp.h" />
+    <ClInclude Include="..\dpp.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Res\BTN_DWN.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\BTN_UP.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\eating.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\hungry.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="RES\ql.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\qp.ico">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\thinking.bmp">
+      <Filter>Res</Filter>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Filter Include="Q_SPY">
+      <UniqueIdentifier>{9329cf7b-e791-415b-8458-a26ea9bf414f}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Res">
+      <UniqueIdentifier>{c8d4d732-dcf8-4466-ad8e-3f15ab6fe204}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="dpp-gui.rc">
+      <Filter>Res</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+</Project>

+ 0 - 0
examples/win32/dpp-gui/resource.h → examples/arm-cm/dpp_ek-tm4c123gxl/win32-qv/resource.h


+ 93 - 58
examples/win32/blinky/Makefile → examples/arm-cm/dpp_ek-tm4c123gxl/win32/Makefile

@@ -1,7 +1,7 @@
 ##############################################################################
-# Product: Generic Makefile for QP/C application, Win32 API, MinGW compiler
-# Last updated for version 5.4.0
-# Last updated on  2015-04-07
+# Product: Makefile for QP/C, DPP, Win32 GUI, MinGW
+# Last updated for version 5.4.2
+# Last updated on  2015-06-03
 #
 #                    Q u a n t u m     L e a P s
 #                    ---------------------------
@@ -48,68 +48,86 @@
 #    http://sourceforge.net/projects/qpc/files/Qtools/
 #
 
-##############################################################################
-#
-# NOTE: Typically, you should have no need to change anything in this Makefile
+#-----------------------------------------------------------------------------
+# project name
 #
-##############################################################################
-
+PROJECT     := dpp-gui
 
 #-----------------------------------------------------------------------------
-# location of the QP/C framework (if not provided in an environemnt var.)
+# project directories
+#
+
+# location of the QP-nano framework (if not provided in an environemnt var.)
 ifeq ($(QPC),)
-QPC := ../../..
+QPC := ../../../..
 endif
 
-#-----------------------------------------------------------------------------
-# MinGW toolset (NOTE: assumed to be on your PATH)
-#
-# NOTE:
-# MinGW toolset is included in the Qtools collection for Windows, see:
-#    http://sourceforge.net/projects/qpc/files/Qtools/
+# QP port used in this project
+QP_PORT_DIR := $(QPC)/ports/win32
 
-CC    := gcc
-CPP   := g++
-LINK  := gcc    # for C programs
-#LINK  := g++   # for C++ programs
+# list of all source directories used by this project
+VPATH = \
+	. \
+	..
 
-# basic utilities (included in Qtools for Windows), see:
-#    http://sourceforge.net/projects/qpc/files/Qtools
+# list of all include directories needed by this project
+INCLUDES  = \
+	-I. \
+	-I.. \
+	-I$(QPC)/include
 
-MKDIR := mkdir
-RM    := rm
+# list of resource include directories needed by this project
+RCINCLUDES = \
+	-IRes
 
 
 #-----------------------------------------------------------------------------
-# directories
+# files
 #
-# Project name is derived from the directory name
-PROJECT := $(notdir $(CURDIR))
 
-QP_PORT_DIR := $(QPC)/ports/win32
-APP_DIR     := .
+# C source files
+C_SRCS := \
+	bsp.c \
+	main.c \
+	philo.c \
+	table.c
+
+# C++ source files
+CPP_SRCS :=	
 
-VPATH = $(APP_DIR)
+# Resource files
+RC_SRCS := \
+	dpp-gui.rc
 
-# include directories
-INCLUDES  = -I. \
-	-I$(QPC)/include \
-	-I$(QP_PORT_DIR)
+LIB_DIRS  :=
+LIBS      :=
 
-# defines
-DEFINES =
+# defines...
+# QP_API_VERSION controls the QP API compatibility; 9999 means the latest API
+DEFINES   := -DQP_API_VERSION=9999
 
 #-----------------------------------------------------------------------------
-# files
+# MinGW toolset (NOTE: assumed to be on your PATH)
 #
+# NOTE:
+# MinGW toolset is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+# NOTE:
+# This Makefile assumes that the windres utility is available on the
+# PATH (NOTE: windres is available in the Qtools collection for Windows)
+#
+CC    := gcc
+CPP   := g++
+LINK  := gcc    # for C programs
+#LINK  := g++   # for C++ programs
+RC    := windres
 
-# C source files
-C_SRCS := $(wildcard *.c)
-
-# C++ source files
-CPP_SRCS := $(wildcard *.cpp)
+# basic utilities (included in Qtools for Windows), see:
+#    http://sourceforge.net/projects/qpc/files/Qtools
 
-LD_SCRIPT :=
+MKDIR := mkdir
+RM    := rm
 
 #-----------------------------------------------------------------------------
 # build options for various configurations
@@ -119,16 +137,14 @@ ifeq (rel, $(CONF)) # Release configuration ..................................
 
 BIN_DIR := rel
 
-CFLAGS = -c -Wall -W -O2 -ffunction-sections -fdata-sections \
-	$(INCLUDES) $(DEFINES) -DNDEBUG
+CFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
 
-CPPFLAGS = -c -Wall -W -O2 -ffunction-sections -fdata-sections \
-	$(INCLUDES) $(DEFINES) -DNDEBUG
+CPPFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
 
 else ifeq (spy, $(CONF))  # Spy configuration ................................
 
-BIN_DIR := spy
-
 # make sure that QTOOLS exists...
 ifeq ("$(wildcard $(QTOOLS))","")
 $(error QTOOLS not found. Please install Qtools and define QTOOLS env. variable)
@@ -138,32 +154,44 @@ INCLUDES +=	-I$(QTOOLS)/qspy/include
 VPATH    += $(QTOOLS)/qspy/source
 C_SRCS   += qspy.c
 
+BIN_DIR := spy
+
 CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
-	$(INCLUDES) $(DEFINES) -DQ_SPY
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
 
 CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
-	$(INCLUDES) $(DEFINES) -DQ_SPY
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
 
 else  # default Debug configuration ..........................................
 
 BIN_DIR := dbg
 
 CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
-	$(INCLUDES) $(DEFINES)
+	-O $(INCLUDES) $(DEFINES)
 
 CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
-	$(INCLUDES) $(DEFINES)
+	-O $(INCLUDES) $(DEFINES)
 
-endif
+endif  # .....................................................................
 
+LINKFLAGS := -Wl,-Map,$(BIN_DIR)/$(PROJECT).map,--cref,--gc-sections
 
-LINKFLAGS = -L$(QP_PORT_DIR)/mingw/$(BIN_DIR) \
-	-Wl,-Map,$(BIN_DIR)/$(PROJECT).map,--cref,--gc-sections
+# is it a GUI application (any GUI resources provided?) ...
+ifneq (,$(RC_SRCS))
+LINKFLAGS += -mwindows
+DEFINES += -DWIN32_GUI
+endif
 
 #-----------------------------------------------------------------------------
 
+# combine all the soruces...
+INCLUDES  += -I$(QP_PORT_DIR)
+LIB_DIRS  += -L$(QP_PORT_DIR)/$(BIN_DIR)
+LIBS      += -lqp
+
 C_OBJS       := $(patsubst %.c,   %.o, $(C_SRCS))
 CPP_OBJS     := $(patsubst %.cpp, %.o, $(CPP_SRCS))
+RC_OBJS      := $(patsubst %.rc,  %.o, $(RC_SRCS))
 
 TARGET_BIN   := $(BIN_DIR)/$(PROJECT).bin
 TARGET_EXE   := $(BIN_DIR)/$(PROJECT).exe
@@ -171,6 +199,7 @@ C_OBJS_EXT   := $(addprefix $(BIN_DIR)/, $(C_OBJS))
 C_DEPS_EXT   := $(patsubst %.o, %.d, $(C_OBJS_EXT))
 CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
 CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+RC_OBJS_EXT  := $(addprefix $(BIN_DIR)/, $(RC_OBJS))
 
 # create $(BIN_DIR) if it does not exist
 ifeq ("$(wildcard $(BIN_DIR))","")
@@ -187,8 +216,8 @@ all: $(TARGET_EXE)
 $(TARGET_BIN): $(TARGET_EXE)
 	$(BIN) -O binary $< $@
 
-$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT)
-	$(LINK) $(LINKFLAGS) -o $@ $^ -lqp
+$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(RC_OBJS_EXT)
+	$(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(LIBS)
 
 $(BIN_DIR)/%.d : %.c
 	$(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
@@ -205,6 +234,9 @@ $(BIN_DIR)/%.o : %.c
 $(BIN_DIR)/%.o : %.cpp
 	$(CPP) $(CPPFLAGS) -c $< -o $@
 
+$(BIN_DIR)/%.o : %.rc
+	$(RC) $(RCINCLUDES) -i $< -o $@
+
 # include dependency files only if our goal depends on their existence
 ifneq ($(MAKECMDGOALS),clean)
   ifneq ($(MAKECMDGOALS),show)
@@ -228,3 +260,6 @@ show:
 	@echo C_OBJS_EXT   = $(C_OBJS_EXT)
 	@echo C_DEPS_EXT   = $(C_DEPS_EXT)
 	@echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+	@echo RC_OBJS_EXT  = $(RC_OBJS_EXT)
+	@echo LIB_DIRS = $(LIB_DIRS)
+	@echo LIBS     = $(LIBS)

+ 0 - 0
examples/win32/dpp-gui/Res/BTN_DWN.bmp → examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/BTN_DWN.bmp


+ 0 - 0
examples/win32/dpp-gui/Res/BTN_UP.bmp → examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/BTN_UP.bmp


BIN
examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/eating.bmp


BIN
examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/hungry.bmp


+ 0 - 0
examples/win32/dpp-gui/Res/qp.ico → examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/qp.ico


BIN
examples/arm-cm/dpp_ek-tm4c123gxl/win32/Res/thinking.bmp


+ 475 - 0
examples/arm-cm/dpp_ek-tm4c123gxl/win32/bsp.c

@@ -0,0 +1,475 @@
+/*****************************************************************************
+* Product: DPP example, Win32-GUI
+* Last updated for version 5.4.2
+* Last updated on  2015-06-03
+*
+*                    Q u a n t u m     L e a P s
+*                    ---------------------------
+*                    innovating embedded systems
+*
+* Copyright (C) Quantum Leaps, www.state-machine.com.
+*
+* This program is open source software: you can redistribute it and/or
+* modify it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Alternatively, this program may be distributed and modified under the
+* terms of Quantum Leaps commercial licenses, which expressly supersede
+* the GNU General Public License and are specifically designed for
+* licensees interested in retaining the proprietary status of their code.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+* Contact information:
+* Web:   www.state-machine.com
+* Email: info@state-machine.com
+*****************************************************************************/
+#include "qpc.h"
+#include "dpp.h"
+#include "bsp.h"
+
+#include "win32_gui.h" /* Win32 GUI elements for embedded front panels */
+#include "resource.h"  /* GUI resource IDs generated by the resource editior */
+
+#include <stdio.h>     /* for _snprintf_s() */
+
+Q_DEFINE_THIS_FILE
+
+/* local variables ---------------------------------------------------------*/
+static HINSTANCE l_hInst;   /* this application instance */
+static HWND      l_hWnd;    /* main window handle */
+static LPSTR     l_cmdLine; /* the command line string */
+
+static SegmentDisplay   l_philos;   /* SegmentDisplay to show Philo status */
+static OwnerDrawnButton l_pauseBtn; /* owner-drawn button */
+
+static unsigned  l_rnd;  /* random seed */
+
+#ifdef Q_SPY
+    enum {
+        PHILO_STAT = QS_USER
+    };
+    static uint8_t const l_clock_tick = 0U;
+#endif
+
+/* Local functions ---------------------------------------------------------*/
+static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
+                                WPARAM wParam, LPARAM lParam);
+
+/*..........................................................................*/
+int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
+                   LPSTR cmdLine, int iCmdShow)
+{
+    HWND hWnd;
+    MSG  msg;
+
+    (void)hPrevInst;  /* avoid compiler warning about unused parameter */
+
+    l_hInst   = hInst;   /* save the application instance */
+    l_cmdLine = cmdLine; /* save the command line string */
+
+    /* create the main custom dialog window */
+    hWnd = CreateCustDialog(hInst, IDD_APPLICATION, NULL,
+                            &WndProc, "QP_APP");
+    ShowWindow(hWnd, iCmdShow);  /* show the main window */
+
+    /* enter the message loop... */
+    while (GetMessage(&msg, NULL, 0, 0)) {
+        TranslateMessage(&msg);
+        DispatchMessage(&msg);
+    }
+    return msg.wParam;
+}
+/*..........................................................................*/
+extern int main_gui(void); /* prototype for appThread() */
+
+/* thread function for running the application main() */
+static DWORD WINAPI appThread(LPVOID par) {
+    (void)par;            /* unused parameter */
+    return main_gui();    /* run the QF application */
+}
+/*..........................................................................*/
+static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
+                                WPARAM wParam, LPARAM lParam)
+{
+    switch (iMsg) {
+
+        /* Perform initialization upon cration of the main dialog window
+        * NOTE: Any child-windows are NOT created yet at this time, so
+        * the GetDlgItem() function can't be used (it will return NULL).
+        */
+        case WM_CREATE: {
+            l_hWnd = hWnd; /* save the window handle */
+
+            /* initialize the owner-drawn buttons
+            * NOTE: must be done *before* the first drawing of the buttons,
+            * so WM_INITDIALOG is too late.
+            */
+            OwnerDrawnButton_init(&l_pauseBtn,
+                       LoadBitmap(l_hInst, MAKEINTRESOURCE(IDB_BTN_UP)),
+                       LoadBitmap(l_hInst, MAKEINTRESOURCE(IDB_BTN_DWN)),
+                       LoadCursor(NULL, IDC_HAND));
+            return 0;
+        }
+
+        /* Perform initialization after all child windows have been created */
+        case WM_INITDIALOG: {
+
+            SegmentDisplay_init(&l_philos,
+                     N_PHILO,          /* N_PHILO "segments" for the Philos */
+                     3U);         /* 3 bitmaps (for thinking/hungry/eating) */
+            SegmentDisplay_initSegment(&l_philos,
+                 0U, GetDlgItem(hWnd, IDC_PHILO_0));
+            SegmentDisplay_initSegment(&l_philos,
+                 1U, GetDlgItem(hWnd, IDC_PHILO_1));
+            SegmentDisplay_initSegment(&l_philos,
+                 2U, GetDlgItem(hWnd, IDC_PHILO_2));
+            SegmentDisplay_initSegment(&l_philos,
+                 3U, GetDlgItem(hWnd, IDC_PHILO_3));
+            SegmentDisplay_initSegment(&l_philos,
+                 4U, GetDlgItem(hWnd, IDC_PHILO_4));
+            SegmentDisplay_initBitmap(&l_philos,
+                 0U, LoadBitmap(l_hInst, MAKEINTRESOURCE(IDB_THINKING)));
+            SegmentDisplay_initBitmap(&l_philos,
+                 1U, LoadBitmap(l_hInst, MAKEINTRESOURCE(IDB_HUNGRY)));
+            SegmentDisplay_initBitmap(&l_philos,
+                 2U, LoadBitmap(l_hInst, MAKEINTRESOURCE(IDB_EATING)));
+
+            /* --> QP: spawn the application thread to run main() */
+            Q_ALLEGE(CreateThread(NULL, 0, &appThread, NULL, 0, NULL)
+                     != (HANDLE)0);
+            return 0;
+        }
+
+        case WM_DESTROY: {
+            BSP_terminate(0);
+            return 0;
+        }
+
+        /* commands from regular buttons and menus... */
+        case WM_COMMAND: {
+            SetFocus(hWnd);
+            switch (wParam) {
+                case IDOK:
+                case IDCANCEL: {
+                    //QF_PUBLISH(Q_NEW(QEvt, TERMINATE_SIG), (void *)0);
+                    BSP_terminate(0);
+                    break;
+                }
+            }
+            return 0;
+        }
+
+        /* owner-drawn buttons... */
+        case WM_DRAWITEM: {
+            LPDRAWITEMSTRUCT pdis = (LPDRAWITEMSTRUCT)lParam;
+            switch (pdis->CtlID) {
+                case IDC_PAUSE: { /* PAUSE owner-drawn button */
+                    switch (OwnerDrawnButton_draw(&l_pauseBtn,pdis)) {
+                        case BTN_DEPRESSED: {
+                            static QEvt pe = { PAUSE_SIG, 0U, 0U };
+                            QACTIVE_POST(AO_Table, &pe, (void *)0);
+                            break;
+                        }
+                        case BTN_RELEASED: {
+                            static QEvt se = { SERVE_SIG, 0U, 0U };
+                            QACTIVE_POST(AO_Table, &se, (void *)0);
+                            break;
+                        }
+                        default: {
+                            break;
+                        }
+                    }
+                    break;
+                }
+            }
+            return 0;
+        }
+
+        /* mouse input... */
+        case WM_MOUSEWHEEL: {
+            return 0;
+        }
+
+        /* keyboard input... */
+        case WM_KEYDOWN: {
+            return 0;
+        }
+    }
+    return DefWindowProc(hWnd, iMsg, wParam, lParam) ;
+}
+/*..........................................................................*/
+void QF_onStartup(void) {
+    QF_setTickRate(BSP_TICKS_PER_SEC); /* set the desired tick rate */
+}
+/*..........................................................................*/
+void QF_onCleanup(void) {
+}
+/*..........................................................................*/
+void QF_onClockTick(void) {
+    QF_TICK(&l_clock_tick); /* perform the QF clock tick processing */
+}
+/*..........................................................................*/
+void Q_onAssert(char const Q_ROM * const file, int line) {
+    char message[80];
+    QF_stop(); /* stop ticking */
+    SNPRINTF_S(message, Q_DIM(message) - 1,
+               "Assertion failed in module %s line %d", file, line);
+    MessageBox(l_hWnd, message, "!!! ASSERTION !!!",
+               MB_OK | MB_ICONEXCLAMATION | MB_APPLMODAL);
+    PostQuitMessage(-1);
+}
+
+/*..........................................................................*/
+void BSP_init(void) {
+    Q_ALLEGE(QS_INIT(l_cmdLine));
+    QS_OBJ_DICTIONARY(&l_clock_tick); /* must be called *after* QF_init() */
+    QS_USR_DICTIONARY(PHILO_STAT);
+}
+/*..........................................................................*/
+void BSP_terminate(int16_t result) {
+    QF_stop();
+    PostQuitMessage(result);
+
+    OwnerDrawnButton_xtor(&l_pauseBtn); /* cleanup the l_pauseBtn resources */
+    SegmentDisplay_xtor(&l_philos);     /* cleanup the l_philos resources */
+}
+/*..........................................................................*/
+void BSP_displayPhilStat(uint8_t n, char const *stat) {
+    UINT bitmapNum = 0;
+
+    Q_REQUIRE(n < N_PHILO);
+
+    switch (stat[0]) {
+        case 't': bitmapNum = 0U; break;
+        case 'h': bitmapNum = 1U; break;
+        case 'e': bitmapNum = 2U; break;
+        default: Q_ERROR();  break;
+    }
+    /* set the "segment" # n to the bitmap # 'bitmapNum' */
+    SegmentDisplay_setSegment(&l_philos, (UINT)n, bitmapNum);
+
+    QS_BEGIN(PHILO_STAT, AO_Philo[n]) /* application-specific record begin */
+        QS_U8(1, n);  /* Philosopher number */
+        QS_STR(stat); /* Philosopher status */
+    QS_END()
+}
+/*..........................................................................*/
+void BSP_displayPaused(uint8_t paused) {
+    char buf[16];
+    LoadString(l_hInst,
+        (paused != 0U) ? IDS_PAUSED : IDS_RUNNING, buf, Q_DIM(buf));
+    SetDlgItemText(l_hWnd, IDC_PAUSED, buf);
+}
+/*..........................................................................*/
+uint32_t BSP_random(void) {  /* a very cheap pseudo-random-number generator */
+    /* "Super-Duper" Linear Congruential Generator (LCG)
+    * LCG(2^32, 3*7*11*13*23, 0, seed)
+    */
+    l_rnd = l_rnd * (3U*7U*11U*13U*23U);
+    return l_rnd >> 8;
+}
+/*..........................................................................*/
+void BSP_randomSeed(uint32_t seed) {
+    l_rnd = seed;
+}
+
+/*--------------------------------------------------------------------------*/
+#ifdef Q_SPY /* define QS callbacks */
+
+#include "qspy.h"
+#include <time.h>
+
+static uint8_t l_running;
+
+/*..........................................................................*/
+static DWORD WINAPI idleThread(LPVOID par) {/* signature for CreateThread() */
+    (void)par;
+
+    SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_IDLE);
+    l_running = (uint8_t)1;
+    while (l_running) {
+        uint16_t nBytes = 256;
+        uint8_t const *block;
+        QF_CRIT_ENTRY(dummy);
+        block = QS_getBlock(&nBytes);
+        QF_CRIT_EXIT(dummy);
+        if (block != (uint8_t *)0) {
+            QSPY_parse(block, nBytes);
+        }
+        Sleep(10U);  /* wait for a clock tick */
+    }
+    return 0; /* return success */
+}
+/*..........................................................................*/
+static int custParserFun(QSpyRecord * const qrec) {
+    static uint32_t mpool0;
+    int ret = 1;  /* assume standard QSPY parsing */
+    switch (qrec->rec) {
+        case QS_QF_MPOOL_INIT: { /* example record to parse */
+            if (mpool0 == 0U) {  /* MPool[0]? */
+                mpool0 = (uint32_t)QSpyRecord_getUint64(qrec,QS_OBJ_PTR_SIZE);
+            }
+            break;
+        }
+        case QS_QF_MPOOL_GET: {  /* example record to parse */
+            int nFree;
+            uint32_t mpool;
+            (void)QSpyRecord_getUint32(qrec, QS_TIME_SIZE);
+            mpool = (uint32_t)QSpyRecord_getUint64(qrec, QS_OBJ_PTR_SIZE);
+            nFree = (int)QSpyRecord_getUint32(qrec, QF_MPOOL_CTR_SIZE);
+            (void)QSpyRecord_getUint32(qrec, QF_MPOOL_CTR_SIZE);    /* nMin */
+            if (QSpyRecord_OK(qrec) && (mpool == mpool0)) {    /* MPool[0]? */
+                SetDlgItemInt(l_hWnd, IDC_MPOOL0, nFree, FALSE);
+                ret = 0;  /* don't perform standard QSPY parsing */
+            }
+            break;
+        }
+    }
+    return ret;
+}
+/*..........................................................................*/
+uint8_t QS_onStartup(void const *arg) {
+    static uint8_t qsBuf[4*1024];  /* 4K buffer for Quantum Spy */
+    QS_initBuf(qsBuf, sizeof(qsBuf));
+
+    /* here 'arg' is ignored, but this command-line parameter can be used
+    * to setup the QSP_config(), to set up the QS filters, or for any
+    * other purpose.
+    */
+    (void)arg;
+
+    QSPY_config(QP_VERSION,         // version
+                QS_OBJ_PTR_SIZE,    // objPtrSize
+                QS_FUN_PTR_SIZE,    // funPtrSize
+                QS_TIME_SIZE,       // tstampSize
+                Q_SIGNAL_SIZE,      // sigSize,
+                QF_EVENT_SIZ_SIZE,  // evtSize
+                QF_EQUEUE_CTR_SIZE, // queueCtrSize
+                QF_MPOOL_CTR_SIZE,  // poolCtrSize
+                QF_MPOOL_SIZ_SIZE,  // poolBlkSize
+                QF_TIMEEVT_CTR_SIZE,// tevtCtrSize
+                (void *)0,          // matFile,
+                (void *)0,          // mscFile
+                &custParserFun);    // customized parser function
+
+    /* setup the QS filters... */
+//    QS_FILTER_ON(QS_QEP_STATE_ENTRY);
+//    QS_FILTER_ON(QS_QEP_STATE_EXIT);
+//    QS_FILTER_ON(QS_QEP_STATE_INIT);
+//    QS_FILTER_ON(QS_QEP_INIT_TRAN);
+//    QS_FILTER_ON(QS_QEP_INTERN_TRAN);
+//    QS_FILTER_ON(QS_QEP_TRAN);
+//    QS_FILTER_ON(QS_QEP_IGNORED);
+//    QS_FILTER_ON(QS_QEP_DISPATCH);
+//    QS_FILTER_ON(QS_QEP_UNHANDLED);
+
+//    QS_FILTER_ON(QS_QF_ACTIVE_ADD);
+//    QS_FILTER_ON(QS_QF_ACTIVE_REMOVE);
+//    QS_FILTER_ON(QS_QF_ACTIVE_SUBSCRIBE);
+//    QS_FILTER_ON(QS_QF_ACTIVE_UNSUBSCRIBE);
+//    QS_FILTER_ON(QS_QF_ACTIVE_POST_FIFO);
+//    QS_FILTER_ON(QS_QF_ACTIVE_POST_LIFO);
+//    QS_FILTER_ON(QS_QF_ACTIVE_GET);
+//    QS_FILTER_ON(QS_QF_ACTIVE_GET_LAST);
+//    QS_FILTER_ON(QS_QF_EQUEUE_INIT);
+//    QS_FILTER_ON(QS_QF_EQUEUE_POST_FIFO);
+//    QS_FILTER_ON(QS_QF_EQUEUE_POST_LIFO);
+//    QS_FILTER_ON(QS_QF_EQUEUE_GET);
+//    QS_FILTER_ON(QS_QF_EQUEUE_GET_LAST);
+    QS_FILTER_ON(QS_QF_MPOOL_INIT);
+    QS_FILTER_ON(QS_QF_MPOOL_GET);
+//    QS_FILTER_ON(QS_QF_MPOOL_PUT);
+//    QS_FILTER_ON(QS_QF_PUBLISH);
+//    QS_FILTER_ON(QS_QF_RESERVED8);
+//    QS_FILTER_ON(QS_QF_NEW);
+//    QS_FILTER_ON(QS_QF_GC_ATTEMPT);
+//    QS_FILTER_ON(QS_QF_GC);
+//    QS_FILTER_ON(QS_QF_TICK);
+//    QS_FILTER_ON(QS_QF_TIMEEVT_ARM);
+//    QS_FILTER_ON(QS_QF_TIMEEVT_AUTO_DISARM);
+//    QS_FILTER_ON(QS_QF_TIMEEVT_DISARM_ATTEMPT);
+//    QS_FILTER_ON(QS_QF_TIMEEVT_DISARM);
+//    QS_FILTER_ON(QS_QF_TIMEEVT_REARM);
+//    QS_FILTER_ON(QS_QF_TIMEEVT_POST);
+//    QS_FILTER_ON(QS_QF_TIMEEVT_CTR);
+//    QS_FILTER_ON(QS_QF_CRIT_ENTRY);
+//    QS_FILTER_ON(QS_QF_CRIT_EXIT);
+//    QS_FILTER_ON(QS_QF_ISR_ENTRY);
+//    QS_FILTER_ON(QS_QF_ISR_EXIT);
+//    QS_FILTER_ON(QS_QF_INT_DISABLE);
+//    QS_FILTER_ON(QS_QF_INT_ENABLE);
+//    QS_FILTER_ON(QS_QF_ACTIVE_POST_ATTEMPT);
+//    QS_FILTER_ON(QS_QF_EQUEUE_POST_ATTEMPT);
+//    QS_FILTER_ON(QS_QF_MPOOL_GET_ATTEMPT);
+//    QS_FILTER_ON(QS_QF_RESERVED1);
+//    QS_FILTER_ON(QS_QF_RESERVED0);
+
+//    QS_FILTER_ON(QS_QK_MUTEX_LOCK);
+//    QS_FILTER_ON(QS_QK_MUTEX_UNLOCK);
+//    QS_FILTER_ON(QS_QK_SCHEDULE);
+//    QS_FILTER_ON(QS_QK_RESERVED1);
+//    QS_FILTER_ON(QS_QK_RESERVED0);
+
+//    QS_FILTER_ON(QS_QEP_TRAN_HIST);
+//    QS_FILTER_ON(QS_QEP_TRAN_EP);
+//    QS_FILTER_ON(QS_QEP_TRAN_XP);
+//    QS_FILTER_ON(QS_QEP_RESERVED1);
+//    QS_FILTER_ON(QS_QEP_RESERVED0);
+
+    QS_FILTER_ON(QS_SIG_DICT);
+    QS_FILTER_ON(QS_OBJ_DICT);
+    QS_FILTER_ON(QS_FUN_DICT);
+    QS_FILTER_ON(QS_USR_DICT);
+    QS_FILTER_ON(QS_EMPTY);
+    QS_FILTER_ON(QS_RESERVED3);
+    QS_FILTER_ON(QS_RESERVED2);
+    QS_FILTER_ON(QS_TEST_RUN);
+    QS_FILTER_ON(QS_TEST_FAIL);
+    QS_FILTER_ON(QS_ASSERT_FAIL);
+
+    return CreateThread(NULL, 1024, &idleThread, (void *)0, 0, NULL)
+             != (HANDLE)0; /* return the status of creating the idle thread */
+}
+/*..........................................................................*/
+void QS_onCleanup(void) {
+    l_running = (uint8_t)0;
+    QSPY_stop();
+}
+/*..........................................................................*/
+void QS_onFlush(void) {
+    for (;;) {
+        uint16_t nBytes = 1024;
+        uint8_t const *block;
+
+        QF_CRIT_ENTRY(dummy);
+        block = QS_getBlock(&nBytes);
+        QF_CRIT_EXIT(dummy);
+
+        if (block != (uint8_t const *)0) {
+            QSPY_parse(block, nBytes);
+            nBytes = 1024;
+        }
+        else {
+            break;
+        }
+    }
+}
+/*..........................................................................*/
+QSTimeCtr QS_onGetTime(void) {
+    return (QSTimeCtr)clock();
+}
+/*..........................................................................*/
+void QSPY_onPrintLn(void) {
+    OutputDebugString(QSPY_line);
+    OutputDebugString("\n");
+}
+#endif /* Q_SPY */
+/*--------------------------------------------------------------------------*/

+ 79 - 0
examples/arm-cm/dpp_ek-tm4c123gxl/win32/dpp-gui.rc

@@ -0,0 +1,79 @@
+// Generated by ResEdit 1.5.11
+// Copyright (C) 2006-2012
+// http://www.resedit.net
+
+#include <windows.h>
+#include <commctrl.h>
+#include <richedit.h>
+#include "resource.h"
+
+
+
+
+//
+// Bitmap resources
+//
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+IDB_BTN_DWN        BITMAP         "Res\\BTN_DWN.bmp"
+
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+IDB_BTN_UP         BITMAP         "Res\\BTN_UP.bmp"
+
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+IDB_EATING         BITMAP         "Res\\eating.bmp"
+
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+IDB_HUNGRY         BITMAP         "Res\\hungry.bmp"
+
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+IDB_THINKING       BITMAP         "Res\\thinking.bmp"
+
+
+
+//
+// Dialog resources
+//
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+IDD_APPLICATION DIALOGEX 0, 0, 230, 205
+STYLE DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU
+CAPTION "DPP Example"
+CLASS "QP_APP"
+FONT 8, "MS Shell Dlg", 0, 0, 1
+{
+    CTEXT           "www.state-machine.com", IDC_STATIC, 64, 190, 103, 8, SS_CENTER, WS_EX_TRANSPARENT
+    CONTROL         IDB_THINKING, IDC_PHILO_0, WC_STATIC, SS_BITMAP, 90, 7, 53, 46
+    CONTROL         IDB_THINKING, IDC_PHILO_1, WC_STATIC, SS_BITMAP, 170, 58, 53, 46, WS_EX_TRANSPARENT
+    CONTROL         IDB_THINKING, IDC_PHILO_4, WC_STATIC, SS_BITMAP, 7, 55, 53, 46
+    DEFPUSHBUTTON   "Quit", IDOK, 173, 7, 50, 14, WS_GROUP
+    CONTROL         IDB_THINKING, IDC_PHILO_2, WC_STATIC, SS_BITMAP, 137, 135, 53, 46
+    CONTROL         IDB_THINKING, IDC_PHILO_3, WC_STATIC, SS_BITMAP, 46, 134, 53, 46
+    CONTROL         "", IDC_PAUSE, WC_BUTTON, WS_TABSTOP | WS_TABSTOP | BS_OWNERDRAW | BS_BITMAP, 103, 73, 31, 27
+    LTEXT           "RUNNING...", IDC_PAUSED, 103, 102, 41, 8, SS_LEFT
+    LTEXT           "?", IDC_MPOOL0, 122, 114, 34, 8, SS_LEFT
+    RTEXT           "MPool[0]:", IDC_STATIC, 87, 113, 31, 8, SS_RIGHT
+}
+
+
+
+//
+// String Table resources
+//
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+STRINGTABLE
+{
+    IDS_APP_TITLE                 "DPP"
+    IDS_PAUSED                    "PAUSED"
+    IDS_RUNNING                   "RUNNING..."
+}
+
+
+
+//
+// Icon resources
+//
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+IDI_QP             ICON           "Res\\qp.ico"

+ 23 - 0
examples/arm-cm/dpp_ek-tm4c123gxl/win32/dpp-gui.sln

@@ -0,0 +1,23 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dpp-gui", "dpp-gui.vcxproj", "{79027B25-0949-4F66-9765-4EFBCBBEFB94}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+		QSpy|Win32 = QSpy|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.ActiveCfg = Debug|Win32
+		{79027B25-0949-4F66-9765-4EFBCBBEFB94}.Debug|Win32.Build.0 = Debug|Win32
+		{79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.ActiveCfg = Release|Win32
+		{79027B25-0949-4F66-9765-4EFBCBBEFB94}.Release|Win32.Build.0 = Release|Win32
+		{79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.ActiveCfg = QSpy|Win32
+		{79027B25-0949-4F66-9765-4EFBCBBEFB94}.QSpy|Win32.Build.0 = QSpy|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 267 - 0
examples/arm-cm/dpp_ek-tm4c123gxl/win32/dpp-gui.vcxproj

@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="QSpy|Win32">
+      <Configuration>QSpy</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{79027B25-0949-4F66-9765-4EFBCBBEFB94}</ProjectGuid>
+    <RootNamespace>dpp-gui</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>NotSet</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>NotSet</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>NotSet</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</EnableManagedIncrementalBuild>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">$(Configuration)\</IntDir>
+    <EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">false</EnableManagedIncrementalBuild>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EnableManagedIncrementalBuild>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TypeLibraryName>.\Release/dpp-gui.tlb</TypeLibraryName>
+      <HeaderFileName>
+      </HeaderFileName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>NDEBUG;WIN32_GUI;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>
+      </PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>../../../../ports/win32/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <Bscmake>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <OutputFile>.\Release/dpp-gui.bsc</OutputFile>
+    </Bscmake>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TypeLibraryName>.\QSpy/dpp-gui.tlb</TypeLibraryName>
+      <HeaderFileName>
+      </HeaderFileName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>Q_SPY;WIN32_GUI;snprintf=_snprintf;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeaderOutputFile>
+      </PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+      <BrowseInformation>true</BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>../../../../ports/win32/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateMapFile>false</GenerateMapFile>
+      <MapFileName>
+      </MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <Bscmake>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <OutputFile>.\QSpy/dpp-gui.bsc</OutputFile>
+    </Bscmake>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TypeLibraryName>.\Debug/dpp-gui.tlb</TypeLibraryName>
+      <HeaderFileName>
+      </HeaderFileName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32_GUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeaderOutputFile>
+      </PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+      <BrowseInformation>true</BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>../../../../ports/win32/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <GenerateMapFile>false</GenerateMapFile>
+      <MapFileName>
+      </MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <Bscmake>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <OutputFile>.\Debug/dpp-gui.bsc</OutputFile>
+    </Bscmake>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="$(QTOOLS)\qspy\source\qspy.c">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+    </ClCompile>
+    <ClCompile Include="..\main.c" />
+    <ClCompile Include="..\philo.c" />
+    <ClCompile Include="..\table.c" />
+    <ClCompile Include="bsp.c">
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\bsp.h" />
+    <ClInclude Include="..\dpp.h" />
+    <ClInclude Include="resource.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Res\BTN_DWN.bmp" />
+    <None Include="Res\BTN_UP.bmp" />
+    <None Include="Res\eating.bmp" />
+    <None Include="Res\hungry.bmp" />
+    <None Include="RES\ql.bmp" />
+    <None Include="Res\qp.ico" />
+    <None Include="Res\thinking.bmp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="dpp-gui.rc" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 53 - 0
examples/arm-cm/dpp_ek-tm4c123gxl/win32/dpp-gui.vcxproj.filters

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="bsp.c" />
+    <ClCompile Include="$(QTOOLS)\qspy\source\qspy.c">
+      <Filter>Q_SPY</Filter>
+    </ClCompile>
+    <ClCompile Include="..\main.c" />
+    <ClCompile Include="..\philo.c" />
+    <ClCompile Include="..\table.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="resource.h" />
+    <ClInclude Include="..\bsp.h" />
+    <ClInclude Include="..\dpp.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Res\BTN_DWN.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\BTN_UP.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\eating.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\hungry.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="RES\ql.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\qp.ico">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\thinking.bmp">
+      <Filter>Res</Filter>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Filter Include="Q_SPY">
+      <UniqueIdentifier>{9329cf7b-e791-415b-8458-a26ea9bf414f}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Res">
+      <UniqueIdentifier>{c8d4d732-dcf8-4466-ad8e-3f15ab6fe204}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="dpp-gui.rc">
+      <Filter>Res</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+</Project>

+ 22 - 0
examples/arm-cm/dpp_ek-tm4c123gxl/win32/resource.h

@@ -0,0 +1,22 @@
+#ifndef IDC_STATIC
+#define IDC_STATIC (-1)
+#endif
+
+#define IDI_QP                                  2
+#define IDD_APPLICATION                         101
+#define IDB_THINKING                            134
+#define IDB_EATING                              135
+#define IDB_HUNGRY                              136
+#define IDB_BTN_UP                              137
+#define IDB_BTN_DWN                             138
+#define IDC_PHILO_0                             1000
+#define IDC_PHILO_1                             1001
+#define IDC_PHILO_2                             1002
+#define IDC_PHILO_3                             1003
+#define IDC_PHILO_4                             1004
+#define IDC_MPOOL0                              1005
+#define IDC_PAUSE                               1006
+#define IDC_PAUSED                              1009
+#define IDS_APP_TITLE                           40000
+#define IDS_PAUSED                              40001
+#define IDS_RUNNING                             40002

+ 14 - 1
examples/arm-cm/game_ek-lm3s811/README.txt

@@ -12,7 +12,7 @@ instructions how to use and customize the example to your needs.
 
 
 Support Code for EK-LM3S811 Board 
-----------------------------------
+=================================
 The directory qpc\3rd_party\ek-lm3s811 contains the CMSIS-compliant
 device code for the LM3S811 MCU. Please see the README file in this
 folder for more details.
@@ -34,3 +34,16 @@ qspy -cCOM1
 The actual COM port number might be different on your Windows machine.
 Please check the Device Manager to find the COM port number.
 
+
+Win32 Emulations
+================
+The sub-directorie win32 and win32-qv provide the emulations of the example
+on Windows GUI (with regular Win32 threads and with cooperative QV scheduler,
+respectively. These sub-directories contain the Makefiles for the MinGW
+toolset and Visual Studio solution files (game-gui.sln) for Visual C++.
+
+The Win32 emulations use exactly the same code as the embedded board and
+differ only in the Board Support Package (bsp.c). This example demonstrates
+the "dual targeting" development approach, where most of the embedded code
+is developed on the desktop machine (Windows), but is intended for a deeply
+embedded target (EK-LM3S811 here).

+ 1 - 1
examples/arm-cm/game_ek-lm3s811/bsp.h

@@ -34,7 +34,7 @@
 #ifndef bsp_h
 #define bsp_h
 
-#define BSP_TICKS_PER_SEC    30U
+#define BSP_TICKS_PER_SEC    33U
 #define BSP_SCREEN_WIDTH     96U
 #define BSP_SCREEN_HEIGHT    16U
 

+ 268 - 0
examples/arm-cm/game_ek-lm3s811/win32-qv/Makefile

@@ -0,0 +1,268 @@
+##############################################################################
+# Product: Makefile for QP/C, "Fly 'n' Shoot" game, Win32-QV GUI, MinGW
+# Last updated for version 5.4.2
+# Last updated on  2015-06-03
+#
+#                    Q u a n t u m     L e a P s
+#                    ---------------------------
+#                    innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Contact information:
+# Web:   www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT     := game-gui
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP-nano framework (if not provided in an environemnt var.)
+ifeq ($(QPC),)
+QPC := ../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPC)/ports/win32-qv
+
+# list of all source directories used by this project
+VPATH = \
+	. \
+	..
+
+# list of all include directories needed by this project
+INCLUDES  = \
+	-I. \
+	-I.. \
+	-I$(QPC)/include
+
+# list of resource include directories needed by this project
+RCINCLUDES = \
+	-IRes
+
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# C source files
+C_SRCS := \
+	bsp.c \
+	main.c \
+	mine1.c \
+	mine2.c \
+	missile.c \
+	ship.c \
+	tunnel.c
+
+# C++ source files
+CPP_SRCS :=	
+
+# Resource files
+RC_SRCS := \
+	game-gui.rc
+
+LIB_DIRS  :=
+LIBS      :=
+
+# defines...
+# QP_API_VERSION controls the QP API compatibility; 9999 means the latest API
+DEFINES   := -DQP_API_VERSION=9999
+
+#-----------------------------------------------------------------------------
+# MinGW toolset (NOTE: assumed to be on your PATH)
+#
+# NOTE:
+# MinGW toolset is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+# NOTE:
+# This Makefile assumes that the windres utility is available on the
+# PATH (NOTE: windres is available in the Qtools collection for Windows)
+#
+CC    := gcc
+CPP   := g++
+LINK  := gcc    # for C programs
+#LINK  := g++   # for C++ programs
+RC    := windres
+
+# basic utilities (included in Qtools for Windows), see:
+#    http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM    := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations
+#
+
+ifeq (rel, $(CONF)) # Release configuration ..................................
+
+BIN_DIR := rel
+
+CFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+else ifeq (spy, $(CONF))  # Spy configuration ................................
+
+# make sure that QTOOLS exists...
+ifeq ("$(wildcard $(QTOOLS))","")
+$(error QTOOLS not found. Please install Qtools and define QTOOLS env. variable)
+endif
+
+INCLUDES +=	-I$(QTOOLS)/qspy/include
+VPATH    += $(QTOOLS)/qspy/source
+C_SRCS   += qspy.c
+
+BIN_DIR := spy
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+else  # default Debug configuration ..........................................
+
+BIN_DIR := dbg
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+endif  # .....................................................................
+
+LINKFLAGS := -Wl,-Map,$(BIN_DIR)/$(PROJECT).map,--cref,--gc-sections
+
+# is it a GUI application (any GUI resources provided?) ...
+ifneq (,$(RC_SRCS))
+LINKFLAGS += -mwindows
+DEFINES += -DWIN32_GUI
+endif
+
+#-----------------------------------------------------------------------------
+
+# combine all the soruces...
+INCLUDES  += -I$(QP_PORT_DIR)
+LIB_DIRS  += -L$(QP_PORT_DIR)/$(BIN_DIR)
+LIBS      += -lqp
+
+C_OBJS       := $(patsubst %.c,   %.o, $(C_SRCS))
+CPP_OBJS     := $(patsubst %.cpp, %.o, $(CPP_SRCS))
+RC_OBJS      := $(patsubst %.rc,  %.o, $(RC_SRCS))
+
+TARGET_BIN   := $(BIN_DIR)/$(PROJECT).bin
+TARGET_EXE   := $(BIN_DIR)/$(PROJECT).exe
+C_OBJS_EXT   := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT   := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+RC_OBJS_EXT  := $(addprefix $(BIN_DIR)/, $(RC_OBJS))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_EXE)
+#all: $(TARGET_BIN)
+
+$(TARGET_BIN): $(TARGET_EXE)
+	$(BIN) -O binary $< $@
+
+$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(RC_OBJS_EXT)
+	$(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+	$(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+	$(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+	$(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+	$(CPP) $(CPPFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.rc
+	$(RC) $(RCINCLUDES) -i $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+  ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+  endif
+endif
+
+.PHONY : clean
+clean:
+	-$(RM) $(BIN_DIR)/*.o \
+	$(BIN_DIR)/*.d \
+	$(BIN_DIR)/*.exe \
+	$(BIN_DIR)/*.map
+	
+show:
+	@echo PROJECT  = $(PROJECT)
+	@echo CONF     = $(CONF)
+	@echo VPATH    = $(VPATH)
+	@echo C_SRCS   = $(C_SRCS)
+	@echo CPP_SRCS = $(CPP_SRCS)
+	@echo C_OBJS_EXT   = $(C_OBJS_EXT)
+	@echo C_DEPS_EXT   = $(C_DEPS_EXT)
+	@echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+	@echo RC_OBJS_EXT  = $(RC_OBJS_EXT)
+	@echo LIB_DIRS = $(LIB_DIRS)
+	@echo LIBS     = $(LIBS)

+ 0 - 0
examples/win32/game-gui/Res/BTN_DWN.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/BTN_DWN.bmp


+ 0 - 0
examples/win32/game-gui/Res/BTN_UP.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/BTN_UP.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/EK-LM3S811.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/EK-LM3S811.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/LCD.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/LCD.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/led_off.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/led_off.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/led_on.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/led_on.bmp


+ 0 - 0
examples/win32/game-gui/Res/qp.ico → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/qp.ico


+ 0 - 0
examples/win32-qv/game-gui/Res/seg.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg0.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg0.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg1.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg1.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg2.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg2.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg3.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg3.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg4.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg4.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg5.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg5.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg6.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg6.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg7.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg7.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg8.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg8.bmp


+ 0 - 0
examples/win32-qv/game-gui/Res/seg9.bmp → examples/arm-cm/game_ek-lm3s811/win32-qv/Res/seg9.bmp


+ 198 - 195
examples/win32/game-gui/bsp.c → examples/arm-cm/game_ek-lm3s811/win32-qv/bsp.c

@@ -1,13 +1,13 @@
 /*****************************************************************************
 * Product: "Fly 'n' Shoot" game example, Win32-GUI
-* Last Updated for Version: 5.4.0
-* Date of the Last Update:  2015-03-07
+* Last Updated for Version: 5.4.2
+* Date of the Last Update:  2015-06-03
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
 *                    innovating embedded systems
 *
-* Copyright (C) Quantum Leaps, LLC. state-machine.com.
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
 *
 * This program is open source software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as published
@@ -28,34 +28,34 @@
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact information:
-* Web  : http://www.state-machine.com
+* Web:   www.state-machine.com
 * Email: info@state-machine.com
 *****************************************************************************/
 #include "qpc.h"
 #include "game.h"
 #include "bsp.h"
 
-#include "win32_gui.h"      /* Win32 GUI elements for embedded front panels */
+#include "win32_gui.h" /* Win32 GUI elements for embedded front panels */
 #include "resource.h" /* GUI resource IDs generated by the resource editior */
-#include <stdio.h>                                       /* for _snprintf() */
+#include <stdio.h>    /* for _snprintf() */
 
 Q_DEFINE_THIS_FILE
 
 /* local variables ---------------------------------------------------------*/
-static HINSTANCE l_hInst;                      /* this application instance */
-static HWND      l_hWnd;                              /* main window handle */
-static LPSTR     l_cmdLine;                      /* the command line string */
+static HINSTANCE l_hInst;   /* this application instance */
+static HWND      l_hWnd;    /* main window handle */
+static LPSTR     l_cmdLine; /* the command line string */
 
 static GraphicDisplay   l_oled; /* the OLED display of the EK-LM3S811 board */
-static SegmentDisplay   l_userLED;      /* USER LED of the EK-LM3S811 board */
-static SegmentDisplay   l_scoreBoard;      /* segment display for the score */
-static OwnerDrawnButton l_userBtn;   /* USER button of the EK-LM3S811 board */
+static SegmentDisplay   l_userLED;  /* USER LED of the EK-LM3S811 board */
+static SegmentDisplay   l_scoreBoard; /* segment display for the score */
+static OwnerDrawnButton l_userBtn; /* USER button of the EK-LM3S811 board */
 
 /* (R,G,B) colors for the OLED display */
-static BYTE const c_onColor [3] = { 255U, 255U, 255U };   /* white */
-static BYTE const c_offColor[3] = {  15U,  15U,  15U };   /* very dark grey */
+static BYTE const c_onColor [3] = { 255U, 255U, 255U }; /* white */
+static BYTE const c_offColor[3] = {  15U,  15U,  15U }; /* very dark grey */
 
-static BYTE l_ship_pos = GAME_SHIP_Y;        /* the current ship Y-position */
+static BYTE l_ship_pos = GAME_SHIP_Y; /* the current ship Y-position */
 
 #ifdef Q_SPY
     enum QSUserRecords {
@@ -70,21 +70,65 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
                                 WPARAM wParam, LPARAM lParam);
 
 /*..........................................................................*/
+static void playerTrigger(void) {
+    static QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0U, 0U };
+    QF_PUBLISH(&fireEvt, (void*)0);
+}
+/*..........................................................................*/
+static void moveShipUp(void) {
+    ObjectPosEvt *ope;
+    if (l_ship_pos > 0U) {
+        --l_ship_pos;
+    }
+    ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
+    ope->x = (uint8_t)GAME_SHIP_X;
+    ope->y = (uint8_t)l_ship_pos;
+    QACTIVE_POST(AO_Ship, (QEvt *)ope, &l_mouse);
+}
+//............................................................................
+static void moveShipDown(void) {
+    ObjectPosEvt *ope;
+    if (l_ship_pos < (GAME_SCREEN_HEIGHT - 3U)) {
+        ++l_ship_pos;
+    }
+    ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
+    ope->x = (uint8_t)GAME_SHIP_X;
+    ope->y = (uint8_t)l_ship_pos;
+    QACTIVE_POST(AO_Ship, (QEvt *)ope, &l_mouse);
+}
+/*..........................................................................*/
+void terminate(int16_t result) {
+    QF_stop(); /* stop the main QF application and the ticker thread */
+    PostQuitMessage(result); /* post the Quit message to the GUI */
+
+    GraphicDisplay_xtor(&l_oled);       /* cleanup the l_oled    resources */
+    OwnerDrawnButton_xtor(&l_userBtn);  /* cleanup the l_userBtn resources */
+    SegmentDisplay_xtor(&l_userLED);    /* cleanup the l_userLED resources */
+    SegmentDisplay_xtor(&l_scoreBoard); /* cleanup the scoreBoard resources */
+}
+/*..........................................................................*/
+/* thread function for running the application main_gui() */
+static DWORD WINAPI appThread(LPVOID par) {
+    (void)par; /* unused parameter */
+    return (DWORD)main_gui(); /* run the QF-nano application */
+}
+
+/*--------------------------------------------------------------------------*/
 int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
                    LPSTR cmdLine, int iCmdShow)
 {
     HWND hWnd;
     MSG  msg;
 
-    (void)hPrevInst;       /* avoid compiler warning about unused parameter */
+    (void)hPrevInst; /* unused parameter */
 
-    l_hInst   = hInst;                     /* save the application instance */
-    l_cmdLine = cmdLine;                    /* save the command line string */
+    l_hInst   = hInst;   /* save the application instance */
+    l_cmdLine = cmdLine; /* save the command line string */
 
     /* create the main custom dialog window */
     hWnd = CreateCustDialog(hInst, IDD_APPLICATION, NULL,
                             &WndProc, "QP_APP");
-    ShowWindow(hWnd, iCmdShow);                     /* show the main window */
+    ShowWindow(hWnd, iCmdShow); /* show the main window */
 
     /* enter the message loop... */
     while (GetMessage(&msg, NULL, 0, 0)) {
@@ -94,14 +138,6 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
     return msg.wParam;
 }
 /*..........................................................................*/
-extern int main_gui(void);                     /* prototype for appThread() */
-
-/* thread function for running the application main() */
-static DWORD WINAPI appThread(LPVOID par) {
-    (void)par;                                          /* unused parameter */
-    return main_gui();                            /* run the QF application */
-}
-/*..........................................................................*/
 static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
                                 WPARAM wParam, LPARAM lParam)
 {
@@ -112,7 +148,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         * the GetDlgItem() function can't be used (it will return NULL).
         */
         case WM_CREATE: {
-            l_hWnd = hWnd;                        /* save the window handle */
+            l_hWnd = hWnd; /* save the window handle */
 
             /* initialize the owner-drawn buttons...
             * NOTE: must be done *before* the first drawing of the buttons,
@@ -128,13 +164,13 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         /* Perform initialization after all child windows have been created */
         case WM_INITDIALOG: {
             GraphicDisplay_init(&l_oled,
-                       BSP_SCREEN_WIDTH,  2U,    /* scale horizontally by 2 */
-                       BSP_SCREEN_HEIGHT, 2U,      /* scale vertically by 2 */
+                       BSP_SCREEN_WIDTH,  2U, /* scale horizontally by 2 */
+                       BSP_SCREEN_HEIGHT, 2U, /* scale vertically by 2 */
                        GetDlgItem(hWnd, IDC_LCD), c_offColor);
 
             SegmentDisplay_init(&l_userLED,
-                                1U,         /* 1 "segment" (the LED itself) */
-                                2U);   /* 2 bitmaps (for LED OFF/ON states) */
+                                1U,  /* 1 "segment" (the LED itself) */
+                                2U); /* 2 bitmaps (for LED OFF/ON states) */
             SegmentDisplay_initSegment(&l_userLED,
                  0U, GetDlgItem(hWnd, IDC_LED));
             SegmentDisplay_initBitmap(&l_userLED,
@@ -143,8 +179,8 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
                  1U, LoadBitmap(l_hInst, MAKEINTRESOURCE(IDB_LED_ON)));
 
             SegmentDisplay_init(&l_scoreBoard,
-                                4U,            /* 4 "segments" (digits 0-3) */
-                                10U);        /* 10 bitmaps (for 0-9 states) */
+                                4U,   /* 4 "segments" (digits 0-3) */
+                                10U); /* 10 bitmaps (for 0-9 states) */
             SegmentDisplay_initSegment(&l_scoreBoard,
                  0U, GetDlgItem(hWnd, IDC_SEG0));
             SegmentDisplay_initSegment(&l_scoreBoard,
@@ -183,7 +219,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         }
 
         case WM_DESTROY: {
-            BSP_terminate(0);
+            terminate(0);
             return 0;
         }
 
@@ -193,7 +229,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
             switch (wParam) {
                 case IDOK:
                 case IDCANCEL: {
-                    BSP_terminate(0);
+                    terminate(0);
                     break;
                 }
             }
@@ -204,10 +240,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         case WM_DRAWITEM: {
             LPDRAWITEMSTRUCT pdis = (LPDRAWITEMSTRUCT)lParam;
             switch (pdis->CtlID) {
-                case IDC_USER: {                 /* USER owner-drawn button */
+                case IDC_USER: {  /* USER owner-drawn button */
                     switch (OwnerDrawnButton_draw(&l_userBtn, pdis)) {
                         case BTN_DEPRESSED: {
-                            BSP_playerTrigger();
+                            playerTrigger();
                             SegmentDisplay_setSegment(&l_userLED, 0U, 1U);
                             break;
                         }
@@ -228,10 +264,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         /* mouse input... */
         case WM_MOUSEWHEEL: {
             if ((HIWORD(wParam) & 0x8000U) == 0U) {/* wheel turned forward? */
-                BSP_moveShipUp();
+                moveShipUp();
             }
-            else {                        /* the wheel was turned backwards */
-                BSP_moveShipDown();
+            else { /* the wheel was turned backwards */
+                moveShipDown();
             }
             return 0;
         }
@@ -240,13 +276,13 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         case WM_KEYDOWN: {
             switch (wParam) {
                 case VK_UP:
-                    BSP_moveShipUp();
+                    moveShipUp();
                     break;
                 case VK_DOWN:
-                    BSP_moveShipDown();
+                    moveShipDown();
                     break;
                 case VK_SPACE:
-                    BSP_playerTrigger();
+                    playerTrigger();
                     break;
             }
             return 0;
@@ -255,9 +291,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
     }
     return DefWindowProc(hWnd, iMsg, wParam, lParam) ;
 }
-/*..........................................................................*/
+
+/*--------------------------------------------------------------------------*/
 void QF_onStartup(void) {
-    QF_setTickRate(BSP_TICKS_PER_SEC);         /* set the desired tick rate */
+    QF_setTickRate(BSP_TICKS_PER_SEC); /* set the desired tick rate */
 }
 /*..........................................................................*/
 void QF_onCleanup(void) {
@@ -265,19 +302,21 @@ void QF_onCleanup(void) {
 /*..........................................................................*/
 void QF_onClockTick(void) {
     static QEvt const tickEvt = { TIME_TICK_SIG, 0U, 0U };
-    QF_TICK_X(0U, &l_clock_tick);         /* process time events for rate 0 */
-    QF_PUBLISH(&tickEvt, &l_clock_tick);          /* publish the tick event */
+    QF_TICK_X(0U, &l_clock_tick);  /* process time events for rate 0 */
+    QF_PUBLISH(&tickEvt, &l_clock_tick); /* publish the tick event */
 }
+
 /*..........................................................................*/
 void Q_onAssert(char const Q_ROM * const file, int line) {
     char message[80];
-    QF_stop();                                              /* stop ticking */
-    snprintf(message, Q_DIM(message) - 1,
-             "Assertion failed in module %s line %d", file, line);
+    QF_stop(); /* stop the main QF application and the ticker thread */
+    SNPRINTF_S(message, Q_DIM(message) - 1,
+               "Assertion failed in module %s line %d", file, line);
     MessageBox(l_hWnd, message, "!!! ASSERTION !!!",
                MB_OK | MB_ICONEXCLAMATION | MB_APPLMODAL);
     PostQuitMessage(-1);
 }
+
 /*..........................................................................*/
 void BSP_init(void) {
     Q_ALLEGE(QS_INIT(l_cmdLine));
@@ -285,16 +324,6 @@ void BSP_init(void) {
     QS_USR_DICTIONARY(PLAYER_TRIGGER);
 }
 /*..........................................................................*/
-void BSP_terminate(int result) {
-    QF_stop();                        /* stop the main QF applicatin thread */
-    PostQuitMessage(result);            /* post the Quit message to the GUI */
-
-    GraphicDisplay_xtor(&l_oled);        /* cleanup the l_oled    resources */
-    OwnerDrawnButton_xtor(&l_userBtn);   /* cleanup the l_userBtn resources */
-    SegmentDisplay_xtor(&l_userLED);     /* cleanup the l_userLED resources */
-    SegmentDisplay_xtor(&l_scoreBoard); /* cleanup the scoreBoard resources */
-}
-/*..........................................................................*/
 void BSP_drawBitmap(uint8_t const *bitmap) {
     UINT x, y;
     /* map the EK-LM3S811 OLED pixels to the GraphicDisplay pixels... */
@@ -309,106 +338,106 @@ void BSP_drawBitmap(uint8_t const *bitmap) {
             }
         }
     }
-    GraphicDisplay_redraw(&l_oled);           /* redraw the updated display */
+    GraphicDisplay_redraw(&l_oled); /* redraw the updated display */
 }
 /*..........................................................................*/
 void BSP_drawNString(uint8_t x, uint8_t y, char const *str) {
     static uint8_t const font5x7[95][5] = {
-        { 0x00, 0x00, 0x00, 0x00, 0x00 },                            /* ' ' */
-        { 0x00, 0x00, 0x4F, 0x00, 0x00 },                              /* ! */
-        { 0x00, 0x07, 0x00, 0x07, 0x00 },                              /* " */
-        { 0x14, 0x7F, 0x14, 0x7F, 0x14 },                              /* # */
-        { 0x24, 0x2A, 0x7F, 0x2A, 0x12 },                              /* $ */
-        { 0x23, 0x13, 0x08, 0x64, 0x62 },                              /* % */
-        { 0x36, 0x49, 0x55, 0x22, 0x50 },                              /* & */
-        { 0x00, 0x05, 0x03, 0x00, 0x00 },                              /* ' */
-        { 0x00, 0x1C, 0x22, 0x41, 0x00 },                              /* ( */
-        { 0x00, 0x41, 0x22, 0x1C, 0x00 },                              /* ) */
-        { 0x14, 0x08, 0x3E, 0x08, 0x14 },                              /* * */
-        { 0x08, 0x08, 0x3E, 0x08, 0x08 },                              /* + */
-        { 0x00, 0x50, 0x30, 0x00, 0x00 },                              /* , */
-        { 0x08, 0x08, 0x08, 0x08, 0x08 },                              /* - */
-        { 0x00, 0x60, 0x60, 0x00, 0x00 },                              /* . */
-        { 0x20, 0x10, 0x08, 0x04, 0x02 },                              /* / */
-        { 0x3E, 0x51, 0x49, 0x45, 0x3E },                              /* 0 */
-        { 0x00, 0x42, 0x7F, 0x40, 0x00 },                              /* 1 */
-        { 0x42, 0x61, 0x51, 0x49, 0x46 },                              /* 2 */
-        { 0x21, 0x41, 0x45, 0x4B, 0x31 },                              /* 3 */
-        { 0x18, 0x14, 0x12, 0x7F, 0x10 },                              /* 4 */
-        { 0x27, 0x45, 0x45, 0x45, 0x39 },                              /* 5 */
-        { 0x3C, 0x4A, 0x49, 0x49, 0x30 },                              /* 6 */
-        { 0x01, 0x71, 0x09, 0x05, 0x03 },                              /* 7 */
-        { 0x36, 0x49, 0x49, 0x49, 0x36 },                              /* 8 */
-        { 0x06, 0x49, 0x49, 0x29, 0x1E },                              /* 9 */
-        { 0x00, 0x36, 0x36, 0x00, 0x00 },                              /* : */
-        { 0x00, 0x56, 0x36, 0x00, 0x00 },                              /* ; */
-        { 0x08, 0x14, 0x22, 0x41, 0x00 },                              /* < */
-        { 0x14, 0x14, 0x14, 0x14, 0x14 },                              /* = */
-        { 0x00, 0x41, 0x22, 0x14, 0x08 },                              /* > */
-        { 0x02, 0x01, 0x51, 0x09, 0x06 },                              /* ? */
-        { 0x32, 0x49, 0x79, 0x41, 0x3E },                              /* @ */
-        { 0x7E, 0x11, 0x11, 0x11, 0x7E },                              /* A */
-        { 0x7F, 0x49, 0x49, 0x49, 0x36 },                              /* B */
-        { 0x3E, 0x41, 0x41, 0x41, 0x22 },                              /* C */
-        { 0x7F, 0x41, 0x41, 0x22, 0x1C },                              /* D */
-        { 0x7F, 0x49, 0x49, 0x49, 0x41 },                              /* E */
-        { 0x7F, 0x09, 0x09, 0x09, 0x01 },                              /* F */
-        { 0x3E, 0x41, 0x49, 0x49, 0x7A },                              /* G */
-        { 0x7F, 0x08, 0x08, 0x08, 0x7F },                              /* H */
-        { 0x00, 0x41, 0x7F, 0x41, 0x00 },                              /* I */
-        { 0x20, 0x40, 0x41, 0x3F, 0x01 },                              /* J */
-        { 0x7F, 0x08, 0x14, 0x22, 0x41 },                              /* K */
-        { 0x7F, 0x40, 0x40, 0x40, 0x40 },                              /* L */
-        { 0x7F, 0x02, 0x0C, 0x02, 0x7F },                              /* M */
-        { 0x7F, 0x04, 0x08, 0x10, 0x7F },                              /* N */
-        { 0x3E, 0x41, 0x41, 0x41, 0x3E },                              /* O */
-        { 0x7F, 0x09, 0x09, 0x09, 0x06 },                              /* P */
-        { 0x3E, 0x41, 0x51, 0x21, 0x5E },                              /* Q */
-        { 0x7F, 0x09, 0x19, 0x29, 0x46 },                              /* R */
-        { 0x46, 0x49, 0x49, 0x49, 0x31 },                              /* S */
-        { 0x01, 0x01, 0x7F, 0x01, 0x01 },                              /* T */
-        { 0x3F, 0x40, 0x40, 0x40, 0x3F },                              /* U */
-        { 0x1F, 0x20, 0x40, 0x20, 0x1F },                              /* V */
-        { 0x3F, 0x40, 0x38, 0x40, 0x3F },                              /* W */
-        { 0x63, 0x14, 0x08, 0x14, 0x63 },                              /* X */
-        { 0x07, 0x08, 0x70, 0x08, 0x07 },                              /* Y */
-        { 0x61, 0x51, 0x49, 0x45, 0x43 },                              /* Z */
-        { 0x00, 0x7F, 0x41, 0x41, 0x00 },                              /* [ */
-        { 0x02, 0x04, 0x08, 0x10, 0x20 },                              /* \ */
-        { 0x00, 0x41, 0x41, 0x7F, 0x00 },                              /* ] */
-        { 0x04, 0x02, 0x01, 0x02, 0x04 },                              /* ^ */
-        { 0x40, 0x40, 0x40, 0x40, 0x40 },                              /* _ */
-        { 0x00, 0x01, 0x02, 0x04, 0x00 },                              /* ` */
-        { 0x20, 0x54, 0x54, 0x54, 0x78 },                              /* a */
-        { 0x7F, 0x48, 0x44, 0x44, 0x38 },                              /* b */
-        { 0x38, 0x44, 0x44, 0x44, 0x20 },                              /* c */
-        { 0x38, 0x44, 0x44, 0x48, 0x7F },                              /* d */
-        { 0x38, 0x54, 0x54, 0x54, 0x18 },                              /* e */
-        { 0x08, 0x7E, 0x09, 0x01, 0x02 },                              /* f */
-        { 0x0C, 0x52, 0x52, 0x52, 0x3E },                              /* g */
-        { 0x7F, 0x08, 0x04, 0x04, 0x78 },                              /* h */
-        { 0x00, 0x44, 0x7D, 0x40, 0x00 },                              /* i */
-        { 0x20, 0x40, 0x44, 0x3D, 0x00 },                              /* j */
-        { 0x7F, 0x10, 0x28, 0x44, 0x00 },                              /* k */
-        { 0x00, 0x41, 0x7F, 0x40, 0x00 },                              /* l */
-        { 0x7C, 0x04, 0x18, 0x04, 0x78 },                              /* m */
-        { 0x7C, 0x08, 0x04, 0x04, 0x78 },                              /* n */
-        { 0x38, 0x44, 0x44, 0x44, 0x38 },                              /* o */
-        { 0x7C, 0x14, 0x14, 0x14, 0x08 },                              /* p */
-        { 0x08, 0x14, 0x14, 0x18, 0x7C },                              /* q */
-        { 0x7C, 0x08, 0x04, 0x04, 0x08 },                              /* r */
-        { 0x48, 0x54, 0x54, 0x54, 0x20 },                              /* s */
-        { 0x04, 0x3F, 0x44, 0x40, 0x20 },                              /* t */
-        { 0x3C, 0x40, 0x40, 0x20, 0x7C },                              /* u */
-        { 0x1C, 0x20, 0x40, 0x20, 0x1C },                              /* v */
-        { 0x3C, 0x40, 0x30, 0x40, 0x3C },                              /* w */
-        { 0x44, 0x28, 0x10, 0x28, 0x44 },                              /* x */
-        { 0x0C, 0x50, 0x50, 0x50, 0x3C },                              /* y */
-        { 0x44, 0x64, 0x54, 0x4C, 0x44 },                              /* z */
-        { 0x00, 0x08, 0x36, 0x41, 0x00 },                              /* { */
-        { 0x00, 0x00, 0x7F, 0x00, 0x00 },                              /* | */
-        { 0x00, 0x41, 0x36, 0x08, 0x00 },                              /* } */
-        { 0x02, 0x01, 0x02, 0x04, 0x02 },                              /* ~ */
+        { 0x00U, 0x00U, 0x00U, 0x00U, 0x00U }, /* ' ' */
+        { 0x00U, 0x00U, 0x4FU, 0x00U, 0x00U }, /* ! */
+        { 0x00U, 0x07U, 0x00U, 0x07U, 0x00U }, /* " */
+        { 0x14U, 0x7FU, 0x14U, 0x7FU, 0x14U }, /* # */
+        { 0x24U, 0x2AU, 0x7FU, 0x2AU, 0x12U }, /* $ */
+        { 0x23U, 0x13U, 0x08U, 0x64U, 0x62U }, /* % */
+        { 0x36U, 0x49U, 0x55U, 0x22U, 0x50U }, /* & */
+        { 0x00U, 0x05U, 0x03U, 0x00U, 0x00U }, /* ' */
+        { 0x00U, 0x1CU, 0x22U, 0x41U, 0x00U }, /* ( */
+        { 0x00U, 0x41U, 0x22U, 0x1CU, 0x00U }, /* ) */
+        { 0x14U, 0x08U, 0x3EU, 0x08U, 0x14U }, /* * */
+        { 0x08U, 0x08U, 0x3EU, 0x08U, 0x08U }, /* + */
+        { 0x00U, 0x50U, 0x30U, 0x00U, 0x00U }, /* , */
+        { 0x08U, 0x08U, 0x08U, 0x08U, 0x08U }, /* - */
+        { 0x00U, 0x60U, 0x60U, 0x00U, 0x00U }, /* . */
+        { 0x20U, 0x10U, 0x08U, 0x04U, 0x02U }, /* / */
+        { 0x3EU, 0x51U, 0x49U, 0x45U, 0x3EU }, /* 0 */
+        { 0x00U, 0x42U, 0x7FU, 0x40U, 0x00U }, /* 1 */
+        { 0x42U, 0x61U, 0x51U, 0x49U, 0x46U }, /* 2 */
+        { 0x21U, 0x41U, 0x45U, 0x4BU, 0x31U }, /* 3 */
+        { 0x18U, 0x14U, 0x12U, 0x7FU, 0x10U }, /* 4 */
+        { 0x27U, 0x45U, 0x45U, 0x45U, 0x39U }, /* 5 */
+        { 0x3CU, 0x4AU, 0x49U, 0x49U, 0x30U }, /* 6 */
+        { 0x01U, 0x71U, 0x09U, 0x05U, 0x03U }, /* 7 */
+        { 0x36U, 0x49U, 0x49U, 0x49U, 0x36U }, /* 8 */
+        { 0x06U, 0x49U, 0x49U, 0x29U, 0x1EU }, /* 9 */
+        { 0x00U, 0x36U, 0x36U, 0x00U, 0x00U }, /* : */
+        { 0x00U, 0x56U, 0x36U, 0x00U, 0x00U }, /* ; */
+        { 0x08U, 0x14U, 0x22U, 0x41U, 0x00U }, /* < */
+        { 0x14U, 0x14U, 0x14U, 0x14U, 0x14U }, /* = */
+        { 0x00U, 0x41U, 0x22U, 0x14U, 0x08U }, /* > */
+        { 0x02U, 0x01U, 0x51U, 0x09U, 0x06U }, /* ? */
+        { 0x32U, 0x49U, 0x79U, 0x41U, 0x3EU }, /* @ */
+        { 0x7EU, 0x11U, 0x11U, 0x11U, 0x7EU }, /* A */
+        { 0x7FU, 0x49U, 0x49U, 0x49U, 0x36U }, /* B */
+        { 0x3EU, 0x41U, 0x41U, 0x41U, 0x22U }, /* C */
+        { 0x7FU, 0x41U, 0x41U, 0x22U, 0x1CU }, /* D */
+        { 0x7FU, 0x49U, 0x49U, 0x49U, 0x41U }, /* E */
+        { 0x7FU, 0x09U, 0x09U, 0x09U, 0x01U }, /* F */
+        { 0x3EU, 0x41U, 0x49U, 0x49U, 0x7AU }, /* G */
+        { 0x7FU, 0x08U, 0x08U, 0x08U, 0x7FU }, /* H */
+        { 0x00U, 0x41U, 0x7FU, 0x41U, 0x00U }, /* I */
+        { 0x20U, 0x40U, 0x41U, 0x3FU, 0x01U }, /* J */
+        { 0x7FU, 0x08U, 0x14U, 0x22U, 0x41U }, /* K */
+        { 0x7FU, 0x40U, 0x40U, 0x40U, 0x40U }, /* L */
+        { 0x7FU, 0x02U, 0x0CU, 0x02U, 0x7FU }, /* M */
+        { 0x7FU, 0x04U, 0x08U, 0x10U, 0x7FU }, /* N */
+        { 0x3EU, 0x41U, 0x41U, 0x41U, 0x3EU }, /* O */
+        { 0x7FU, 0x09U, 0x09U, 0x09U, 0x06U }, /* P */
+        { 0x3EU, 0x41U, 0x51U, 0x21U, 0x5EU }, /* Q */
+        { 0x7FU, 0x09U, 0x19U, 0x29U, 0x46U }, /* R */
+        { 0x46U, 0x49U, 0x49U, 0x49U, 0x31U }, /* S */
+        { 0x01U, 0x01U, 0x7FU, 0x01U, 0x01U }, /* T */
+        { 0x3FU, 0x40U, 0x40U, 0x40U, 0x3FU }, /* U */
+        { 0x1FU, 0x20U, 0x40U, 0x20U, 0x1FU }, /* V */
+        { 0x3FU, 0x40U, 0x38U, 0x40U, 0x3FU }, /* W */
+        { 0x63U, 0x14U, 0x08U, 0x14U, 0x63U }, /* X */
+        { 0x07U, 0x08U, 0x70U, 0x08U, 0x07U }, /* Y */
+        { 0x61U, 0x51U, 0x49U, 0x45U, 0x43U }, /* Z */
+        { 0x00U, 0x7FU, 0x41U, 0x41U, 0x00U }, /* [ */
+        { 0x02U, 0x04U, 0x08U, 0x10U, 0x20U }, /* \ */
+        { 0x00U, 0x41U, 0x41U, 0x7FU, 0x00U }, /* ] */
+        { 0x04U, 0x02U, 0x01U, 0x02U, 0x04U }, /* ^ */
+        { 0x40U, 0x40U, 0x40U, 0x40U, 0x40U }, /* _ */
+        { 0x00U, 0x01U, 0x02U, 0x04U, 0x00U }, /* ` */
+        { 0x20U, 0x54U, 0x54U, 0x54U, 0x78U }, /* a */
+        { 0x7FU, 0x48U, 0x44U, 0x44U, 0x38U }, /* b */
+        { 0x38U, 0x44U, 0x44U, 0x44U, 0x20U }, /* c */
+        { 0x38U, 0x44U, 0x44U, 0x48U, 0x7FU }, /* d */
+        { 0x38U, 0x54U, 0x54U, 0x54U, 0x18U }, /* e */
+        { 0x08U, 0x7EU, 0x09U, 0x01U, 0x02U }, /* f */
+        { 0x0CU, 0x52U, 0x52U, 0x52U, 0x3EU }, /* g */
+        { 0x7FU, 0x08U, 0x04U, 0x04U, 0x78U }, /* h */
+        { 0x00U, 0x44U, 0x7DU, 0x40U, 0x00U }, /* i */
+        { 0x20U, 0x40U, 0x44U, 0x3DU, 0x00U }, /* j */
+        { 0x7FU, 0x10U, 0x28U, 0x44U, 0x00U }, /* k */
+        { 0x00U, 0x41U, 0x7FU, 0x40U, 0x00U }, /* l */
+        { 0x7CU, 0x04U, 0x18U, 0x04U, 0x78U }, /* m */
+        { 0x7CU, 0x08U, 0x04U, 0x04U, 0x78U }, /* n */
+        { 0x38U, 0x44U, 0x44U, 0x44U, 0x38U }, /* o */
+        { 0x7CU, 0x14U, 0x14U, 0x14U, 0x08U }, /* p */
+        { 0x08U, 0x14U, 0x14U, 0x18U, 0x7CU }, /* q */
+        { 0x7CU, 0x08U, 0x04U, 0x04U, 0x08U }, /* r */
+        { 0x48U, 0x54U, 0x54U, 0x54U, 0x20U }, /* s */
+        { 0x04U, 0x3FU, 0x44U, 0x40U, 0x20U }, /* t */
+        { 0x3CU, 0x40U, 0x40U, 0x20U, 0x7CU }, /* u */
+        { 0x1CU, 0x20U, 0x40U, 0x20U, 0x1CU }, /* v */
+        { 0x3CU, 0x40U, 0x30U, 0x40U, 0x3CU }, /* w */
+        { 0x44U, 0x28U, 0x10U, 0x28U, 0x44U }, /* x */
+        { 0x0CU, 0x50U, 0x50U, 0x50U, 0x3CU }, /* y */
+        { 0x44U, 0x64U, 0x54U, 0x4CU, 0x44U }, /* z */
+        { 0x00U, 0x08U, 0x36U, 0x41U, 0x00U }, /* { */
+        { 0x00U, 0x00U, 0x7FU, 0x00U, 0x00U }, /* | */
+        { 0x00U, 0x41U, 0x36U, 0x08U, 0x00U }, /* } */
+        { 0x02U, 0x01U, 0x02U, 0x04U, 0x02U }, /* ~ */
     };
     UINT dx, dy;
 
@@ -429,7 +458,7 @@ void BSP_drawNString(uint8_t x, uint8_t y, char const *str) {
         ++str;
         x += 6;
     }
-    GraphicDisplay_redraw(&l_oled);           /* redraw the updated display */
+    GraphicDisplay_redraw(&l_oled); /* redraw the updated display */
 }
 /*..........................................................................*/
 void BSP_updateScore(uint16_t score) {
@@ -452,36 +481,10 @@ void BSP_displayOff(void) {
     GraphicDisplay_clear(&l_oled);
     GraphicDisplay_redraw(&l_oled);
 }
-/*..........................................................................*/
-void BSP_playerTrigger(void) {
-    static QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0U, 0U };
-    QF_PUBLISH(&fireEvt, (void*)0);
-}
-/*..........................................................................*/
-void BSP_moveShipUp(void) {
-    ObjectPosEvt *ope;
-    if (l_ship_pos > 0U) {
-        --l_ship_pos;
-    }
-    ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
-    ope->x = (uint8_t)GAME_SHIP_X;
-    ope->y = (uint8_t)l_ship_pos;
-    QACTIVE_POST(AO_Ship, (QEvt *)ope, &l_mouse);
-}
-//............................................................................
-void BSP_moveShipDown(void) {
-    ObjectPosEvt *ope;
-    if (l_ship_pos < (GAME_SCREEN_HEIGHT - 3U)) {
-        ++l_ship_pos;
-    }
-    ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
-    ope->x = (uint8_t)GAME_SHIP_X;
-    ope->y = (uint8_t)l_ship_pos;
-    QACTIVE_POST(AO_Ship, (QEvt *)ope, &l_mouse);
-}
+
 
 /*--------------------------------------------------------------------------*/
-#ifdef Q_SPY                                         /* define QS callbacks */
+#ifdef Q_SPY /* define QS callbacks */
 
 #include "qspy.h"
 #include <time.h>
@@ -503,17 +506,17 @@ static DWORD WINAPI idleThread(LPVOID par) {/* signature for CreateThread() */
         if (block != (uint8_t *)0) {
             QSPY_parse(block, nBytes);
         }
-        Sleep(10U);                                     /* wait for a while */
+        Sleep(10U); /* wait for a clock tick of 10ms */
     }
-    return 0;                                             /* return success */
+    return 0U; /* return success */
 }
 /*..........................................................................*/
 static int custParserFun(QSpyRecord * const qrec) {
     static uint32_t mpool1;
-    int ret = 1;                           /* perform standard QSPY parsing */
+    int ret = 1; /* perform standard QSPY parsing */
     switch (qrec->rec) {
-        case QS_QF_MPOOL_INIT: {                 /* example record to parse */
-            if (mpool1 == 1U) {                                /* MPool[1]? */
+        case QS_QF_MPOOL_INIT: { /* example record to parse */
+            if (mpool1 == 1U) {  /* MPool[1]? */
                 mpool1 = (uint32_t)QSpyRecord_getUint64(qrec,QS_OBJ_PTR_SIZE);
             }
             else {
@@ -521,7 +524,7 @@ static int custParserFun(QSpyRecord * const qrec) {
             }
             break;
         }
-        case QS_QF_MPOOL_GET: {                  /* example record to parse */
+        case QS_QF_MPOOL_GET: {  /* example record to parse */
             int nFree;
             uint32_t mpool;
             (void)QSpyRecord_getUint32(qrec, QS_TIME_SIZE);
@@ -530,7 +533,7 @@ static int custParserFun(QSpyRecord * const qrec) {
             (void)QSpyRecord_getUint32(qrec, QF_MPOOL_CTR_SIZE);    /* nMin */
             if (QSpyRecord_OK(qrec) && (mpool == mpool1)) {    /* MPool[1]? */
                 SetDlgItemInt(l_hWnd, IDC_MPOOL0, nFree, FALSE);
-                ret = 0;             /* don't perform standard QSPY parsing */
+                ret = 0; /* don't perform standard QSPY parsing */
             }
             break;
         }
@@ -539,7 +542,7 @@ static int custParserFun(QSpyRecord * const qrec) {
 }
 /*..........................................................................*/
 uint8_t QS_onStartup(void const *arg) {
-    static uint8_t qsBuf[4*1024];                 // 4K buffer for Quantum Spy
+    static uint8_t qsBuf[4*1024]; // 4K buffer for Quantum Spy
     QS_initBuf(qsBuf, sizeof(qsBuf));
 
     /* here 'arg' is ignored, but this command-line parameter can be used
@@ -673,5 +676,5 @@ void QSPY_onPrintLn(void) {
     OutputDebugString(QSPY_line);
     OutputDebugString("\n");
 }
-#endif                                                             /* Q_SPY */
+#endif /* Q_SPY */
 /*--------------------------------------------------------------------------*/

+ 0 - 0
examples/win32-qv/game-gui/game-gui.rc → examples/arm-cm/game_ek-lm3s811/win32-qv/game-gui.rc


+ 1 - 0
examples/win32-qv/game-gui/game-gui.sln → examples/arm-cm/game_ek-lm3s811/win32-qv/game-gui.sln

@@ -1,3 +1,4 @@
+
 Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual C++ Express 2010
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game-gui", "game-gui.vcxproj", "{79027B25-0949-4F66-9765-4EFBCBBEFB94}"

+ 31 - 65
examples/win32/game-gui/game-gui.vcxproj → examples/arm-cm/game_ek-lm3s811/win32-qv/game-gui.vcxproj

@@ -79,10 +79,10 @@
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <Optimization>Full</Optimization>
+      <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>.;../../../include;../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>NDEBUG;snprintf=_snprintf;WIN32;_CRT_SECURE_NO_WARNINGS;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>NDEBUG;WIN32_GUI;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>false</StringPooling>
       <ExceptionHandling>
       </ExceptionHandling>
@@ -93,20 +93,19 @@
       <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
       <ObjectFileName>$(IntDir)</ObjectFileName>
       <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
-      <WarningLevel>Level4</WarningLevel>
+      <WarningLevel>Level3</WarningLevel>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <SubSystem>Windows</SubSystem>
       <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
@@ -130,8 +129,8 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../../include;../../../ports/win32;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>Q_SPY;snprintf=_snprintf;WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>Q_SPY;WIN32_GUI;snprintf=_snprintf;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>false</StringPooling>
       <ExceptionHandling>
       </ExceptionHandling>
@@ -143,21 +142,20 @@
       <ObjectFileName>$(IntDir)</ObjectFileName>
       <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
       <BrowseInformation>true</BrowseInformation>
-      <WarningLevel>Level4</WarningLevel>
+      <WarningLevel>Level3</WarningLevel>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <GenerateMapFile>false</GenerateMapFile>
       <MapFileName>
@@ -185,8 +183,8 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../../include;../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>snprintf=_snprintf;WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32-qv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32_GUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>false</StringPooling>
       <ExceptionHandling>
       </ExceptionHandling>
@@ -198,21 +196,22 @@
       <ObjectFileName>$(IntDir)</ObjectFileName>
       <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
       <BrowseInformation>true</BrowseInformation>
-      <WarningLevel>Level4</WarningLevel>
+      <WarningLevel>Level3</WarningLevel>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>../../../../ports/win32-qv/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <GenerateMapFile>false</GenerateMapFile>
       <MapFileName>
@@ -230,9 +229,15 @@
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="$(QTOOLS)\qspy\source\qspy.c">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\main.c" />
+    <ClCompile Include="..\mine1.c" />
+    <ClCompile Include="..\mine2.c" />
+    <ClCompile Include="..\missile.c" />
+    <ClCompile Include="..\ship.c" />
+    <ClCompile Include="..\tunnel.c" />
     <ClCompile Include="bsp.c">
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -241,61 +246,22 @@
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="main.c">
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="mine1.c" />
-    <ClCompile Include="mine2.c" />
-    <ClCompile Include="missile.c" />
-    <ClCompile Include="ship.c" />
-    <ClCompile Include="tunnel.c" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="bsp.h" />
-    <ClInclude Include="dpp.h" />
-    <ClInclude Include="game.h" />
+    <ClInclude Include="..\bsp.h" />
     <ClInclude Include="resource.h" />
   </ItemGroup>
   <ItemGroup>
     <None Include="Res\BTN_DWN.bmp" />
     <None Include="Res\BTN_UP.bmp" />
-    <None Include="Res\EK-LM3S811.bmp" />
-    <None Include="Res\LCD.bmp" />
-    <None Include="Res\led_off.bmp" />
-    <None Include="Res\led_on.bmp" />
+    <None Include="Res\eating.bmp" />
+    <None Include="Res\hungry.bmp" />
+    <None Include="RES\ql.bmp" />
     <None Include="Res\qp.ico" />
-    <None Include="Res\seg.bmp" />
-    <None Include="Res\seg0.bmp" />
-    <None Include="Res\seg1.bmp" />
-    <None Include="Res\seg2.bmp" />
-    <None Include="Res\seg3.bmp" />
-    <None Include="Res\seg4.bmp" />
-    <None Include="Res\seg5.bmp" />
-    <None Include="Res\seg6.bmp" />
-    <None Include="Res\seg7.bmp" />
-    <None Include="Res\seg8.bmp" />
-    <None Include="Res\seg9.bmp" />
+    <None Include="Res\thinking.bmp" />
   </ItemGroup>
   <ItemGroup>
-    <ResourceCompile Include="game-gui.rc">
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ResourceCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <Library Include="..\..\..\ports\win32\vc\Debug\qp.lib" />
-    <Library Include="..\..\..\ports\win32\vc\QSpy\qp.lib">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-    </Library>
-    <Library Include="..\..\..\ports\win32\vc\Release\qp.lib">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-    </Library>
+    <ResourceCompile Include="game-gui.rc" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 55 - 0
examples/arm-cm/game_ek-lm3s811/win32-qv/game-gui.vcxproj.filters

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="bsp.c" />
+    <ClCompile Include="$(QTOOLS)\qspy\source\qspy.c">
+      <Filter>Q_SPY</Filter>
+    </ClCompile>
+    <ClCompile Include="..\main.c" />
+    <ClCompile Include="..\mine1.c" />
+    <ClCompile Include="..\mine2.c" />
+    <ClCompile Include="..\missile.c" />
+    <ClCompile Include="..\ship.c" />
+    <ClCompile Include="..\tunnel.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="resource.h" />
+    <ClInclude Include="..\bsp.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Res\BTN_DWN.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\BTN_UP.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\eating.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\hungry.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="RES\ql.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\qp.ico">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\thinking.bmp">
+      <Filter>Res</Filter>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Filter Include="Q_SPY">
+      <UniqueIdentifier>{9329cf7b-e791-415b-8458-a26ea9bf414f}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Res">
+      <UniqueIdentifier>{c8d4d732-dcf8-4466-ad8e-3f15ab6fe204}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="game-gui.rc">
+      <Filter>Res</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+</Project>

+ 0 - 0
examples/win32-qv/game-gui/resource.h → examples/arm-cm/game_ek-lm3s811/win32-qv/resource.h


+ 268 - 0
examples/arm-cm/game_ek-lm3s811/win32/Makefile

@@ -0,0 +1,268 @@
+##############################################################################
+# Product: Makefile for QP/C, "Fly 'n' Shoot" game, Win32 GUI, MinGW
+# Last updated for version 5.4.2
+# Last updated on  2015-06-03
+#
+#                    Q u a n t u m     L e a P s
+#                    ---------------------------
+#                    innovating embedded systems
+#
+# Copyright (C) Quantum Leaps, LLC. All rights reserved.
+#
+# This program is open source software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Alternatively, this program may be distributed and modified under the
+# terms of Quantum Leaps commercial licenses, which expressly supersede
+# the GNU General Public License and are specifically designed for
+# licensees interested in retaining the proprietary status of their code.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Contact information:
+# Web:   www.state-machine.com
+# Email: info@state-machine.com
+##############################################################################
+# examples of invoking this Makefile:
+# building configurations: Debug (default), Release, and Spy
+# make
+# make CONF=rel
+# make CONF=spy
+#
+# cleaning configurations: Debug (default), Release, and Spy
+# make clean
+# make CONF=rel clean
+# make CONF=spy clean
+#
+# NOTE:
+# To use this Makefile on Windows, you will need the GNU make utility, which
+# is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+
+#-----------------------------------------------------------------------------
+# project name
+#
+PROJECT     := game-gui
+
+#-----------------------------------------------------------------------------
+# project directories
+#
+
+# location of the QP-nano framework (if not provided in an environemnt var.)
+ifeq ($(QPC),)
+QPC := ../../../..
+endif
+
+# QP port used in this project
+QP_PORT_DIR := $(QPC)/ports/win32
+
+# list of all source directories used by this project
+VPATH = \
+	. \
+	..
+
+# list of all include directories needed by this project
+INCLUDES  = \
+	-I. \
+	-I.. \
+	-I$(QPC)/include
+
+# list of resource include directories needed by this project
+RCINCLUDES = \
+	-IRes
+
+
+#-----------------------------------------------------------------------------
+# files
+#
+
+# C source files
+C_SRCS := \
+	bsp.c \
+	main.c \
+	mine1.c \
+	mine2.c \
+	missile.c \
+	ship.c \
+	tunnel.c
+
+# C++ source files
+CPP_SRCS :=	
+
+# Resource files
+RC_SRCS := \
+	game-gui.rc
+
+LIB_DIRS  :=
+LIBS      :=
+
+# defines...
+# QP_API_VERSION controls the QP API compatibility; 9999 means the latest API
+DEFINES   := -DQP_API_VERSION=9999
+
+#-----------------------------------------------------------------------------
+# MinGW toolset (NOTE: assumed to be on your PATH)
+#
+# NOTE:
+# MinGW toolset is included in the Qtools collection for Windows, see:
+#    http://sourceforge.net/projects/qpc/files/Qtools/
+#
+# NOTE:
+# This Makefile assumes that the windres utility is available on the
+# PATH (NOTE: windres is available in the Qtools collection for Windows)
+#
+CC    := gcc
+CPP   := g++
+LINK  := gcc    # for C programs
+#LINK  := g++   # for C++ programs
+RC    := windres
+
+# basic utilities (included in Qtools for Windows), see:
+#    http://sourceforge.net/projects/qpc/files/Qtools
+
+MKDIR := mkdir
+RM    := rm
+
+#-----------------------------------------------------------------------------
+# build options for various configurations
+#
+
+ifeq (rel, $(CONF)) # Release configuration ..................................
+
+BIN_DIR := rel
+
+CFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+CPPFLAGS = -c -Wall -W -ffunction-sections -fdata-sections \
+	-Os -fno-strict-aliasing $(INCLUDES) $(DEFINES) -DNDEBUG
+
+else ifeq (spy, $(CONF))  # Spy configuration ................................
+
+# make sure that QTOOLS exists...
+ifeq ("$(wildcard $(QTOOLS))","")
+$(error QTOOLS not found. Please install Qtools and define QTOOLS env. variable)
+endif
+
+INCLUDES +=	-I$(QTOOLS)/qspy/include
+VPATH    += $(QTOOLS)/qspy/source
+C_SRCS   += qspy.c
+
+BIN_DIR := spy
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES) -DQ_SPY
+
+else  # default Debug configuration ..........................................
+
+BIN_DIR := dbg
+
+CFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+CPPFLAGS = -c -Wall -W -g -ffunction-sections -fdata-sections \
+	-O $(INCLUDES) $(DEFINES)
+
+endif  # .....................................................................
+
+LINKFLAGS := -Wl,-Map,$(BIN_DIR)/$(PROJECT).map,--cref,--gc-sections
+
+# is it a GUI application (any GUI resources provided?) ...
+ifneq (,$(RC_SRCS))
+LINKFLAGS += -mwindows
+DEFINES += -DWIN32_GUI
+endif
+
+#-----------------------------------------------------------------------------
+
+# combine all the soruces...
+INCLUDES  += -I$(QP_PORT_DIR)
+LIB_DIRS  += -L$(QP_PORT_DIR)/$(BIN_DIR)
+LIBS      += -lqp
+
+C_OBJS       := $(patsubst %.c,   %.o, $(C_SRCS))
+CPP_OBJS     := $(patsubst %.cpp, %.o, $(CPP_SRCS))
+RC_OBJS      := $(patsubst %.rc,  %.o, $(RC_SRCS))
+
+TARGET_BIN   := $(BIN_DIR)/$(PROJECT).bin
+TARGET_EXE   := $(BIN_DIR)/$(PROJECT).exe
+C_OBJS_EXT   := $(addprefix $(BIN_DIR)/, $(C_OBJS))
+C_DEPS_EXT   := $(patsubst %.o, %.d, $(C_OBJS_EXT))
+CPP_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(CPP_OBJS))
+CPP_DEPS_EXT := $(patsubst %.o, %.d, $(CPP_OBJS_EXT))
+RC_OBJS_EXT  := $(addprefix $(BIN_DIR)/, $(RC_OBJS))
+
+# create $(BIN_DIR) if it does not exist
+ifeq ("$(wildcard $(BIN_DIR))","")
+$(shell $(MKDIR) $(BIN_DIR))
+endif
+
+#-----------------------------------------------------------------------------
+# rules
+#
+
+all: $(TARGET_EXE)
+#all: $(TARGET_BIN)
+
+$(TARGET_BIN): $(TARGET_EXE)
+	$(BIN) -O binary $< $@
+
+$(TARGET_EXE) : $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(RC_OBJS_EXT)
+	$(LINK) $(LINKFLAGS) $(LIB_DIRS) -o $@ $^ $(LIBS)
+
+$(BIN_DIR)/%.d : %.c
+	$(CC) -MM -MT $(@:.d=.o) $(CFLAGS) $< > $@
+
+$(BIN_DIR)/%.d : %.cpp
+	$(CPP) -MM -MT $(@:.d=.o) $(CPPFLAGS) $< > $@
+
+$(BIN_DIR)/%.o : %.s
+	$(AS) $(ASFLAGS) $< -o $@
+
+$(BIN_DIR)/%.o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.cpp
+	$(CPP) $(CPPFLAGS) -c $< -o $@
+
+$(BIN_DIR)/%.o : %.rc
+	$(RC) $(RCINCLUDES) -i $< -o $@
+
+# include dependency files only if our goal depends on their existence
+ifneq ($(MAKECMDGOALS),clean)
+  ifneq ($(MAKECMDGOALS),show)
+-include $(C_DEPS_EXT) $(CPP_DEPS_EXT)
+  endif
+endif
+
+.PHONY : clean
+clean:
+	-$(RM) $(BIN_DIR)/*.o \
+	$(BIN_DIR)/*.d \
+	$(BIN_DIR)/*.exe \
+	$(BIN_DIR)/*.map
+	
+show:
+	@echo PROJECT  = $(PROJECT)
+	@echo CONF     = $(CONF)
+	@echo VPATH    = $(VPATH)
+	@echo C_SRCS   = $(C_SRCS)
+	@echo CPP_SRCS = $(CPP_SRCS)
+	@echo C_OBJS_EXT   = $(C_OBJS_EXT)
+	@echo C_DEPS_EXT   = $(C_DEPS_EXT)
+	@echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
+	@echo RC_OBJS_EXT  = $(RC_OBJS_EXT)
+	@echo LIB_DIRS = $(LIB_DIRS)
+	@echo LIBS     = $(LIBS)

BIN
examples/arm-cm/game_ek-lm3s811/win32/Res/BTN_DWN.bmp


BIN
examples/arm-cm/game_ek-lm3s811/win32/Res/BTN_UP.bmp


+ 0 - 0
examples/win32/game-gui/Res/EK-LM3S811.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/EK-LM3S811.bmp


+ 0 - 0
examples/win32/game-gui/Res/LCD.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/LCD.bmp


+ 0 - 0
examples/win32/game-gui/Res/led_off.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/led_off.bmp


+ 0 - 0
examples/win32/game-gui/Res/led_on.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/led_on.bmp


BIN
examples/arm-cm/game_ek-lm3s811/win32/Res/qp.ico


+ 0 - 0
examples/win32/game-gui/Res/seg.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg0.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg0.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg1.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg1.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg2.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg2.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg3.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg3.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg4.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg4.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg5.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg5.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg6.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg6.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg7.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg7.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg8.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg8.bmp


+ 0 - 0
examples/win32/game-gui/Res/seg9.bmp → examples/arm-cm/game_ek-lm3s811/win32/Res/seg9.bmp


+ 198 - 195
examples/win32-qv/game-gui/bsp.c → examples/arm-cm/game_ek-lm3s811/win32/bsp.c

@@ -1,13 +1,13 @@
 /*****************************************************************************
 * Product: "Fly 'n' Shoot" game example, Win32-GUI
-* Last Updated for Version: 5.4.0
-* Date of the Last Update:  2015-03-07
+* Last Updated for Version: 5.4.2
+* Date of the Last Update:  2015-06-03
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
 *                    innovating embedded systems
 *
-* Copyright (C) Quantum Leaps, LLC. state-machine.com.
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
 *
 * This program is open source software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as published
@@ -28,34 +28,34 @@
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact information:
-* Web  : http://www.state-machine.com
+* Web:   www.state-machine.com
 * Email: info@state-machine.com
 *****************************************************************************/
 #include "qpc.h"
 #include "game.h"
 #include "bsp.h"
 
-#include "win32_gui.h"      /* Win32 GUI elements for embedded front panels */
+#include "win32_gui.h" /* Win32 GUI elements for embedded front panels */
 #include "resource.h" /* GUI resource IDs generated by the resource editior */
-#include <stdio.h>                                       /* for _snprintf() */
+#include <stdio.h>    /* for _snprintf() */
 
 Q_DEFINE_THIS_FILE
 
 /* local variables ---------------------------------------------------------*/
-static HINSTANCE l_hInst;                      /* this application instance */
-static HWND      l_hWnd;                              /* main window handle */
-static LPSTR     l_cmdLine;                      /* the command line string */
+static HINSTANCE l_hInst;   /* this application instance */
+static HWND      l_hWnd;    /* main window handle */
+static LPSTR     l_cmdLine; /* the command line string */
 
 static GraphicDisplay   l_oled; /* the OLED display of the EK-LM3S811 board */
-static SegmentDisplay   l_userLED;      /* USER LED of the EK-LM3S811 board */
-static SegmentDisplay   l_scoreBoard;      /* segment display for the score */
-static OwnerDrawnButton l_userBtn;   /* USER button of the EK-LM3S811 board */
+static SegmentDisplay   l_userLED;  /* USER LED of the EK-LM3S811 board */
+static SegmentDisplay   l_scoreBoard; /* segment display for the score */
+static OwnerDrawnButton l_userBtn; /* USER button of the EK-LM3S811 board */
 
 /* (R,G,B) colors for the OLED display */
-static BYTE const c_onColor [3] = { 255U, 255U, 255U };   /* white */
-static BYTE const c_offColor[3] = {  15U,  15U,  15U };   /* very dark grey */
+static BYTE const c_onColor [3] = { 255U, 255U, 255U }; /* white */
+static BYTE const c_offColor[3] = {  15U,  15U,  15U }; /* very dark grey */
 
-static BYTE l_ship_pos = GAME_SHIP_Y;        /* the current ship Y-position */
+static BYTE l_ship_pos = GAME_SHIP_Y; /* the current ship Y-position */
 
 #ifdef Q_SPY
     enum QSUserRecords {
@@ -70,21 +70,65 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
                                 WPARAM wParam, LPARAM lParam);
 
 /*..........................................................................*/
+static void playerTrigger(void) {
+    static QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0U, 0U };
+    QF_PUBLISH(&fireEvt, (void*)0);
+}
+/*..........................................................................*/
+static void moveShipUp(void) {
+    ObjectPosEvt *ope;
+    if (l_ship_pos > 0U) {
+        --l_ship_pos;
+    }
+    ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
+    ope->x = (uint8_t)GAME_SHIP_X;
+    ope->y = (uint8_t)l_ship_pos;
+    QACTIVE_POST(AO_Ship, (QEvt *)ope, &l_mouse);
+}
+//............................................................................
+static void moveShipDown(void) {
+    ObjectPosEvt *ope;
+    if (l_ship_pos < (GAME_SCREEN_HEIGHT - 3U)) {
+        ++l_ship_pos;
+    }
+    ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
+    ope->x = (uint8_t)GAME_SHIP_X;
+    ope->y = (uint8_t)l_ship_pos;
+    QACTIVE_POST(AO_Ship, (QEvt *)ope, &l_mouse);
+}
+/*..........................................................................*/
+void terminate(int16_t result) {
+    QF_stop(); /* stop the main QF application and the ticker thread */
+    PostQuitMessage(result); /* post the Quit message to the GUI */
+
+    GraphicDisplay_xtor(&l_oled);       /* cleanup the l_oled    resources */
+    OwnerDrawnButton_xtor(&l_userBtn);  /* cleanup the l_userBtn resources */
+    SegmentDisplay_xtor(&l_userLED);    /* cleanup the l_userLED resources */
+    SegmentDisplay_xtor(&l_scoreBoard); /* cleanup the scoreBoard resources */
+}
+/*..........................................................................*/
+/* thread function for running the application main_gui() */
+static DWORD WINAPI appThread(LPVOID par) {
+    (void)par; /* unused parameter */
+    return (DWORD)main_gui(); /* run the QF-nano application */
+}
+
+/*--------------------------------------------------------------------------*/
 int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
                    LPSTR cmdLine, int iCmdShow)
 {
     HWND hWnd;
     MSG  msg;
 
-    (void)hPrevInst;       /* avoid compiler warning about unused parameter */
+    (void)hPrevInst; /* unused parameter */
 
-    l_hInst   = hInst;                     /* save the application instance */
-    l_cmdLine = cmdLine;                    /* save the command line string */
+    l_hInst   = hInst;   /* save the application instance */
+    l_cmdLine = cmdLine; /* save the command line string */
 
     /* create the main custom dialog window */
     hWnd = CreateCustDialog(hInst, IDD_APPLICATION, NULL,
                             &WndProc, "QP_APP");
-    ShowWindow(hWnd, iCmdShow);                     /* show the main window */
+    ShowWindow(hWnd, iCmdShow); /* show the main window */
 
     /* enter the message loop... */
     while (GetMessage(&msg, NULL, 0, 0)) {
@@ -94,14 +138,6 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
     return msg.wParam;
 }
 /*..........................................................................*/
-extern int main_gui(void);                     /* prototype for appThread() */
-
-/* thread function for running the application main() */
-static DWORD WINAPI appThread(LPVOID par) {
-    (void)par;                                          /* unused parameter */
-    return main_gui();                            /* run the QF application */
-}
-/*..........................................................................*/
 static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
                                 WPARAM wParam, LPARAM lParam)
 {
@@ -112,7 +148,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         * the GetDlgItem() function can't be used (it will return NULL).
         */
         case WM_CREATE: {
-            l_hWnd = hWnd;                        /* save the window handle */
+            l_hWnd = hWnd; /* save the window handle */
 
             /* initialize the owner-drawn buttons...
             * NOTE: must be done *before* the first drawing of the buttons,
@@ -128,13 +164,13 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         /* Perform initialization after all child windows have been created */
         case WM_INITDIALOG: {
             GraphicDisplay_init(&l_oled,
-                       BSP_SCREEN_WIDTH,  2U,    /* scale horizontally by 2 */
-                       BSP_SCREEN_HEIGHT, 2U,      /* scale vertically by 2 */
+                       BSP_SCREEN_WIDTH,  2U, /* scale horizontally by 2 */
+                       BSP_SCREEN_HEIGHT, 2U, /* scale vertically by 2 */
                        GetDlgItem(hWnd, IDC_LCD), c_offColor);
 
             SegmentDisplay_init(&l_userLED,
-                                1U,         /* 1 "segment" (the LED itself) */
-                                2U);   /* 2 bitmaps (for LED OFF/ON states) */
+                                1U,  /* 1 "segment" (the LED itself) */
+                                2U); /* 2 bitmaps (for LED OFF/ON states) */
             SegmentDisplay_initSegment(&l_userLED,
                  0U, GetDlgItem(hWnd, IDC_LED));
             SegmentDisplay_initBitmap(&l_userLED,
@@ -143,8 +179,8 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
                  1U, LoadBitmap(l_hInst, MAKEINTRESOURCE(IDB_LED_ON)));
 
             SegmentDisplay_init(&l_scoreBoard,
-                                4U,            /* 4 "segments" (digits 0-3) */
-                                10U);        /* 10 bitmaps (for 0-9 states) */
+                                4U,   /* 4 "segments" (digits 0-3) */
+                                10U); /* 10 bitmaps (for 0-9 states) */
             SegmentDisplay_initSegment(&l_scoreBoard,
                  0U, GetDlgItem(hWnd, IDC_SEG0));
             SegmentDisplay_initSegment(&l_scoreBoard,
@@ -183,7 +219,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         }
 
         case WM_DESTROY: {
-            BSP_terminate(0);
+            terminate(0);
             return 0;
         }
 
@@ -193,7 +229,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
             switch (wParam) {
                 case IDOK:
                 case IDCANCEL: {
-                    BSP_terminate(0);
+                    terminate(0);
                     break;
                 }
             }
@@ -204,10 +240,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         case WM_DRAWITEM: {
             LPDRAWITEMSTRUCT pdis = (LPDRAWITEMSTRUCT)lParam;
             switch (pdis->CtlID) {
-                case IDC_USER: {                 /* USER owner-drawn button */
+                case IDC_USER: {  /* USER owner-drawn button */
                     switch (OwnerDrawnButton_draw(&l_userBtn, pdis)) {
                         case BTN_DEPRESSED: {
-                            BSP_playerTrigger();
+                            playerTrigger();
                             SegmentDisplay_setSegment(&l_userLED, 0U, 1U);
                             break;
                         }
@@ -228,10 +264,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         /* mouse input... */
         case WM_MOUSEWHEEL: {
             if ((HIWORD(wParam) & 0x8000U) == 0U) {/* wheel turned forward? */
-                BSP_moveShipUp();
+                moveShipUp();
             }
-            else {                        /* the wheel was turned backwards */
-                BSP_moveShipDown();
+            else { /* the wheel was turned backwards */
+                moveShipDown();
             }
             return 0;
         }
@@ -240,13 +276,13 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
         case WM_KEYDOWN: {
             switch (wParam) {
                 case VK_UP:
-                    BSP_moveShipUp();
+                    moveShipUp();
                     break;
                 case VK_DOWN:
-                    BSP_moveShipDown();
+                    moveShipDown();
                     break;
                 case VK_SPACE:
-                    BSP_playerTrigger();
+                    playerTrigger();
                     break;
             }
             return 0;
@@ -255,9 +291,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg,
     }
     return DefWindowProc(hWnd, iMsg, wParam, lParam) ;
 }
-/*..........................................................................*/
+
+/*--------------------------------------------------------------------------*/
 void QF_onStartup(void) {
-    QF_setTickRate(BSP_TICKS_PER_SEC);         /* set the desired tick rate */
+    QF_setTickRate(BSP_TICKS_PER_SEC); /* set the desired tick rate */
 }
 /*..........................................................................*/
 void QF_onCleanup(void) {
@@ -265,19 +302,21 @@ void QF_onCleanup(void) {
 /*..........................................................................*/
 void QF_onClockTick(void) {
     static QEvt const tickEvt = { TIME_TICK_SIG, 0U, 0U };
-    QF_TICK_X(0U, &l_clock_tick);         /* process time events for rate 0 */
-    QF_PUBLISH(&tickEvt, &l_clock_tick);          /* publish the tick event */
+    QF_TICK_X(0U, &l_clock_tick);  /* process time events for rate 0 */
+    QF_PUBLISH(&tickEvt, &l_clock_tick); /* publish the tick event */
 }
+
 /*..........................................................................*/
 void Q_onAssert(char const Q_ROM * const file, int line) {
     char message[80];
-    QF_stop();                                              /* stop ticking */
-    snprintf(message, Q_DIM(message) - 1,
-             "Assertion failed in module %s line %d", file, line);
+    QF_stop(); /* stop the main QF application and the ticker thread */
+    SNPRINTF_S(message, Q_DIM(message) - 1,
+               "Assertion failed in module %s line %d", file, line);
     MessageBox(l_hWnd, message, "!!! ASSERTION !!!",
                MB_OK | MB_ICONEXCLAMATION | MB_APPLMODAL);
     PostQuitMessage(-1);
 }
+
 /*..........................................................................*/
 void BSP_init(void) {
     Q_ALLEGE(QS_INIT(l_cmdLine));
@@ -285,16 +324,6 @@ void BSP_init(void) {
     QS_USR_DICTIONARY(PLAYER_TRIGGER);
 }
 /*..........................................................................*/
-void BSP_terminate(int result) {
-    QF_stop();                        /* stop the main QF applicatin thread */
-    PostQuitMessage(result);            /* post the Quit message to the GUI */
-
-    GraphicDisplay_xtor(&l_oled);        /* cleanup the l_oled    resources */
-    OwnerDrawnButton_xtor(&l_userBtn);   /* cleanup the l_userBtn resources */
-    SegmentDisplay_xtor(&l_userLED);     /* cleanup the l_userLED resources */
-    SegmentDisplay_xtor(&l_scoreBoard); /* cleanup the scoreBoard resources */
-}
-/*..........................................................................*/
 void BSP_drawBitmap(uint8_t const *bitmap) {
     UINT x, y;
     /* map the EK-LM3S811 OLED pixels to the GraphicDisplay pixels... */
@@ -309,106 +338,106 @@ void BSP_drawBitmap(uint8_t const *bitmap) {
             }
         }
     }
-    GraphicDisplay_redraw(&l_oled);           /* redraw the updated display */
+    GraphicDisplay_redraw(&l_oled); /* redraw the updated display */
 }
 /*..........................................................................*/
 void BSP_drawNString(uint8_t x, uint8_t y, char const *str) {
     static uint8_t const font5x7[95][5] = {
-        { 0x00, 0x00, 0x00, 0x00, 0x00 },                            /* ' ' */
-        { 0x00, 0x00, 0x4F, 0x00, 0x00 },                              /* ! */
-        { 0x00, 0x07, 0x00, 0x07, 0x00 },                              /* " */
-        { 0x14, 0x7F, 0x14, 0x7F, 0x14 },                              /* # */
-        { 0x24, 0x2A, 0x7F, 0x2A, 0x12 },                              /* $ */
-        { 0x23, 0x13, 0x08, 0x64, 0x62 },                              /* % */
-        { 0x36, 0x49, 0x55, 0x22, 0x50 },                              /* & */
-        { 0x00, 0x05, 0x03, 0x00, 0x00 },                              /* ' */
-        { 0x00, 0x1C, 0x22, 0x41, 0x00 },                              /* ( */
-        { 0x00, 0x41, 0x22, 0x1C, 0x00 },                              /* ) */
-        { 0x14, 0x08, 0x3E, 0x08, 0x14 },                              /* * */
-        { 0x08, 0x08, 0x3E, 0x08, 0x08 },                              /* + */
-        { 0x00, 0x50, 0x30, 0x00, 0x00 },                              /* , */
-        { 0x08, 0x08, 0x08, 0x08, 0x08 },                              /* - */
-        { 0x00, 0x60, 0x60, 0x00, 0x00 },                              /* . */
-        { 0x20, 0x10, 0x08, 0x04, 0x02 },                              /* / */
-        { 0x3E, 0x51, 0x49, 0x45, 0x3E },                              /* 0 */
-        { 0x00, 0x42, 0x7F, 0x40, 0x00 },                              /* 1 */
-        { 0x42, 0x61, 0x51, 0x49, 0x46 },                              /* 2 */
-        { 0x21, 0x41, 0x45, 0x4B, 0x31 },                              /* 3 */
-        { 0x18, 0x14, 0x12, 0x7F, 0x10 },                              /* 4 */
-        { 0x27, 0x45, 0x45, 0x45, 0x39 },                              /* 5 */
-        { 0x3C, 0x4A, 0x49, 0x49, 0x30 },                              /* 6 */
-        { 0x01, 0x71, 0x09, 0x05, 0x03 },                              /* 7 */
-        { 0x36, 0x49, 0x49, 0x49, 0x36 },                              /* 8 */
-        { 0x06, 0x49, 0x49, 0x29, 0x1E },                              /* 9 */
-        { 0x00, 0x36, 0x36, 0x00, 0x00 },                              /* : */
-        { 0x00, 0x56, 0x36, 0x00, 0x00 },                              /* ; */
-        { 0x08, 0x14, 0x22, 0x41, 0x00 },                              /* < */
-        { 0x14, 0x14, 0x14, 0x14, 0x14 },                              /* = */
-        { 0x00, 0x41, 0x22, 0x14, 0x08 },                              /* > */
-        { 0x02, 0x01, 0x51, 0x09, 0x06 },                              /* ? */
-        { 0x32, 0x49, 0x79, 0x41, 0x3E },                              /* @ */
-        { 0x7E, 0x11, 0x11, 0x11, 0x7E },                              /* A */
-        { 0x7F, 0x49, 0x49, 0x49, 0x36 },                              /* B */
-        { 0x3E, 0x41, 0x41, 0x41, 0x22 },                              /* C */
-        { 0x7F, 0x41, 0x41, 0x22, 0x1C },                              /* D */
-        { 0x7F, 0x49, 0x49, 0x49, 0x41 },                              /* E */
-        { 0x7F, 0x09, 0x09, 0x09, 0x01 },                              /* F */
-        { 0x3E, 0x41, 0x49, 0x49, 0x7A },                              /* G */
-        { 0x7F, 0x08, 0x08, 0x08, 0x7F },                              /* H */
-        { 0x00, 0x41, 0x7F, 0x41, 0x00 },                              /* I */
-        { 0x20, 0x40, 0x41, 0x3F, 0x01 },                              /* J */
-        { 0x7F, 0x08, 0x14, 0x22, 0x41 },                              /* K */
-        { 0x7F, 0x40, 0x40, 0x40, 0x40 },                              /* L */
-        { 0x7F, 0x02, 0x0C, 0x02, 0x7F },                              /* M */
-        { 0x7F, 0x04, 0x08, 0x10, 0x7F },                              /* N */
-        { 0x3E, 0x41, 0x41, 0x41, 0x3E },                              /* O */
-        { 0x7F, 0x09, 0x09, 0x09, 0x06 },                              /* P */
-        { 0x3E, 0x41, 0x51, 0x21, 0x5E },                              /* Q */
-        { 0x7F, 0x09, 0x19, 0x29, 0x46 },                              /* R */
-        { 0x46, 0x49, 0x49, 0x49, 0x31 },                              /* S */
-        { 0x01, 0x01, 0x7F, 0x01, 0x01 },                              /* T */
-        { 0x3F, 0x40, 0x40, 0x40, 0x3F },                              /* U */
-        { 0x1F, 0x20, 0x40, 0x20, 0x1F },                              /* V */
-        { 0x3F, 0x40, 0x38, 0x40, 0x3F },                              /* W */
-        { 0x63, 0x14, 0x08, 0x14, 0x63 },                              /* X */
-        { 0x07, 0x08, 0x70, 0x08, 0x07 },                              /* Y */
-        { 0x61, 0x51, 0x49, 0x45, 0x43 },                              /* Z */
-        { 0x00, 0x7F, 0x41, 0x41, 0x00 },                              /* [ */
-        { 0x02, 0x04, 0x08, 0x10, 0x20 },                              /* \ */
-        { 0x00, 0x41, 0x41, 0x7F, 0x00 },                              /* ] */
-        { 0x04, 0x02, 0x01, 0x02, 0x04 },                              /* ^ */
-        { 0x40, 0x40, 0x40, 0x40, 0x40 },                              /* _ */
-        { 0x00, 0x01, 0x02, 0x04, 0x00 },                              /* ` */
-        { 0x20, 0x54, 0x54, 0x54, 0x78 },                              /* a */
-        { 0x7F, 0x48, 0x44, 0x44, 0x38 },                              /* b */
-        { 0x38, 0x44, 0x44, 0x44, 0x20 },                              /* c */
-        { 0x38, 0x44, 0x44, 0x48, 0x7F },                              /* d */
-        { 0x38, 0x54, 0x54, 0x54, 0x18 },                              /* e */
-        { 0x08, 0x7E, 0x09, 0x01, 0x02 },                              /* f */
-        { 0x0C, 0x52, 0x52, 0x52, 0x3E },                              /* g */
-        { 0x7F, 0x08, 0x04, 0x04, 0x78 },                              /* h */
-        { 0x00, 0x44, 0x7D, 0x40, 0x00 },                              /* i */
-        { 0x20, 0x40, 0x44, 0x3D, 0x00 },                              /* j */
-        { 0x7F, 0x10, 0x28, 0x44, 0x00 },                              /* k */
-        { 0x00, 0x41, 0x7F, 0x40, 0x00 },                              /* l */
-        { 0x7C, 0x04, 0x18, 0x04, 0x78 },                              /* m */
-        { 0x7C, 0x08, 0x04, 0x04, 0x78 },                              /* n */
-        { 0x38, 0x44, 0x44, 0x44, 0x38 },                              /* o */
-        { 0x7C, 0x14, 0x14, 0x14, 0x08 },                              /* p */
-        { 0x08, 0x14, 0x14, 0x18, 0x7C },                              /* q */
-        { 0x7C, 0x08, 0x04, 0x04, 0x08 },                              /* r */
-        { 0x48, 0x54, 0x54, 0x54, 0x20 },                              /* s */
-        { 0x04, 0x3F, 0x44, 0x40, 0x20 },                              /* t */
-        { 0x3C, 0x40, 0x40, 0x20, 0x7C },                              /* u */
-        { 0x1C, 0x20, 0x40, 0x20, 0x1C },                              /* v */
-        { 0x3C, 0x40, 0x30, 0x40, 0x3C },                              /* w */
-        { 0x44, 0x28, 0x10, 0x28, 0x44 },                              /* x */
-        { 0x0C, 0x50, 0x50, 0x50, 0x3C },                              /* y */
-        { 0x44, 0x64, 0x54, 0x4C, 0x44 },                              /* z */
-        { 0x00, 0x08, 0x36, 0x41, 0x00 },                              /* { */
-        { 0x00, 0x00, 0x7F, 0x00, 0x00 },                              /* | */
-        { 0x00, 0x41, 0x36, 0x08, 0x00 },                              /* } */
-        { 0x02, 0x01, 0x02, 0x04, 0x02 },                              /* ~ */
+        { 0x00U, 0x00U, 0x00U, 0x00U, 0x00U }, /* ' ' */
+        { 0x00U, 0x00U, 0x4FU, 0x00U, 0x00U }, /* ! */
+        { 0x00U, 0x07U, 0x00U, 0x07U, 0x00U }, /* " */
+        { 0x14U, 0x7FU, 0x14U, 0x7FU, 0x14U }, /* # */
+        { 0x24U, 0x2AU, 0x7FU, 0x2AU, 0x12U }, /* $ */
+        { 0x23U, 0x13U, 0x08U, 0x64U, 0x62U }, /* % */
+        { 0x36U, 0x49U, 0x55U, 0x22U, 0x50U }, /* & */
+        { 0x00U, 0x05U, 0x03U, 0x00U, 0x00U }, /* ' */
+        { 0x00U, 0x1CU, 0x22U, 0x41U, 0x00U }, /* ( */
+        { 0x00U, 0x41U, 0x22U, 0x1CU, 0x00U }, /* ) */
+        { 0x14U, 0x08U, 0x3EU, 0x08U, 0x14U }, /* * */
+        { 0x08U, 0x08U, 0x3EU, 0x08U, 0x08U }, /* + */
+        { 0x00U, 0x50U, 0x30U, 0x00U, 0x00U }, /* , */
+        { 0x08U, 0x08U, 0x08U, 0x08U, 0x08U }, /* - */
+        { 0x00U, 0x60U, 0x60U, 0x00U, 0x00U }, /* . */
+        { 0x20U, 0x10U, 0x08U, 0x04U, 0x02U }, /* / */
+        { 0x3EU, 0x51U, 0x49U, 0x45U, 0x3EU }, /* 0 */
+        { 0x00U, 0x42U, 0x7FU, 0x40U, 0x00U }, /* 1 */
+        { 0x42U, 0x61U, 0x51U, 0x49U, 0x46U }, /* 2 */
+        { 0x21U, 0x41U, 0x45U, 0x4BU, 0x31U }, /* 3 */
+        { 0x18U, 0x14U, 0x12U, 0x7FU, 0x10U }, /* 4 */
+        { 0x27U, 0x45U, 0x45U, 0x45U, 0x39U }, /* 5 */
+        { 0x3CU, 0x4AU, 0x49U, 0x49U, 0x30U }, /* 6 */
+        { 0x01U, 0x71U, 0x09U, 0x05U, 0x03U }, /* 7 */
+        { 0x36U, 0x49U, 0x49U, 0x49U, 0x36U }, /* 8 */
+        { 0x06U, 0x49U, 0x49U, 0x29U, 0x1EU }, /* 9 */
+        { 0x00U, 0x36U, 0x36U, 0x00U, 0x00U }, /* : */
+        { 0x00U, 0x56U, 0x36U, 0x00U, 0x00U }, /* ; */
+        { 0x08U, 0x14U, 0x22U, 0x41U, 0x00U }, /* < */
+        { 0x14U, 0x14U, 0x14U, 0x14U, 0x14U }, /* = */
+        { 0x00U, 0x41U, 0x22U, 0x14U, 0x08U }, /* > */
+        { 0x02U, 0x01U, 0x51U, 0x09U, 0x06U }, /* ? */
+        { 0x32U, 0x49U, 0x79U, 0x41U, 0x3EU }, /* @ */
+        { 0x7EU, 0x11U, 0x11U, 0x11U, 0x7EU }, /* A */
+        { 0x7FU, 0x49U, 0x49U, 0x49U, 0x36U }, /* B */
+        { 0x3EU, 0x41U, 0x41U, 0x41U, 0x22U }, /* C */
+        { 0x7FU, 0x41U, 0x41U, 0x22U, 0x1CU }, /* D */
+        { 0x7FU, 0x49U, 0x49U, 0x49U, 0x41U }, /* E */
+        { 0x7FU, 0x09U, 0x09U, 0x09U, 0x01U }, /* F */
+        { 0x3EU, 0x41U, 0x49U, 0x49U, 0x7AU }, /* G */
+        { 0x7FU, 0x08U, 0x08U, 0x08U, 0x7FU }, /* H */
+        { 0x00U, 0x41U, 0x7FU, 0x41U, 0x00U }, /* I */
+        { 0x20U, 0x40U, 0x41U, 0x3FU, 0x01U }, /* J */
+        { 0x7FU, 0x08U, 0x14U, 0x22U, 0x41U }, /* K */
+        { 0x7FU, 0x40U, 0x40U, 0x40U, 0x40U }, /* L */
+        { 0x7FU, 0x02U, 0x0CU, 0x02U, 0x7FU }, /* M */
+        { 0x7FU, 0x04U, 0x08U, 0x10U, 0x7FU }, /* N */
+        { 0x3EU, 0x41U, 0x41U, 0x41U, 0x3EU }, /* O */
+        { 0x7FU, 0x09U, 0x09U, 0x09U, 0x06U }, /* P */
+        { 0x3EU, 0x41U, 0x51U, 0x21U, 0x5EU }, /* Q */
+        { 0x7FU, 0x09U, 0x19U, 0x29U, 0x46U }, /* R */
+        { 0x46U, 0x49U, 0x49U, 0x49U, 0x31U }, /* S */
+        { 0x01U, 0x01U, 0x7FU, 0x01U, 0x01U }, /* T */
+        { 0x3FU, 0x40U, 0x40U, 0x40U, 0x3FU }, /* U */
+        { 0x1FU, 0x20U, 0x40U, 0x20U, 0x1FU }, /* V */
+        { 0x3FU, 0x40U, 0x38U, 0x40U, 0x3FU }, /* W */
+        { 0x63U, 0x14U, 0x08U, 0x14U, 0x63U }, /* X */
+        { 0x07U, 0x08U, 0x70U, 0x08U, 0x07U }, /* Y */
+        { 0x61U, 0x51U, 0x49U, 0x45U, 0x43U }, /* Z */
+        { 0x00U, 0x7FU, 0x41U, 0x41U, 0x00U }, /* [ */
+        { 0x02U, 0x04U, 0x08U, 0x10U, 0x20U }, /* \ */
+        { 0x00U, 0x41U, 0x41U, 0x7FU, 0x00U }, /* ] */
+        { 0x04U, 0x02U, 0x01U, 0x02U, 0x04U }, /* ^ */
+        { 0x40U, 0x40U, 0x40U, 0x40U, 0x40U }, /* _ */
+        { 0x00U, 0x01U, 0x02U, 0x04U, 0x00U }, /* ` */
+        { 0x20U, 0x54U, 0x54U, 0x54U, 0x78U }, /* a */
+        { 0x7FU, 0x48U, 0x44U, 0x44U, 0x38U }, /* b */
+        { 0x38U, 0x44U, 0x44U, 0x44U, 0x20U }, /* c */
+        { 0x38U, 0x44U, 0x44U, 0x48U, 0x7FU }, /* d */
+        { 0x38U, 0x54U, 0x54U, 0x54U, 0x18U }, /* e */
+        { 0x08U, 0x7EU, 0x09U, 0x01U, 0x02U }, /* f */
+        { 0x0CU, 0x52U, 0x52U, 0x52U, 0x3EU }, /* g */
+        { 0x7FU, 0x08U, 0x04U, 0x04U, 0x78U }, /* h */
+        { 0x00U, 0x44U, 0x7DU, 0x40U, 0x00U }, /* i */
+        { 0x20U, 0x40U, 0x44U, 0x3DU, 0x00U }, /* j */
+        { 0x7FU, 0x10U, 0x28U, 0x44U, 0x00U }, /* k */
+        { 0x00U, 0x41U, 0x7FU, 0x40U, 0x00U }, /* l */
+        { 0x7CU, 0x04U, 0x18U, 0x04U, 0x78U }, /* m */
+        { 0x7CU, 0x08U, 0x04U, 0x04U, 0x78U }, /* n */
+        { 0x38U, 0x44U, 0x44U, 0x44U, 0x38U }, /* o */
+        { 0x7CU, 0x14U, 0x14U, 0x14U, 0x08U }, /* p */
+        { 0x08U, 0x14U, 0x14U, 0x18U, 0x7CU }, /* q */
+        { 0x7CU, 0x08U, 0x04U, 0x04U, 0x08U }, /* r */
+        { 0x48U, 0x54U, 0x54U, 0x54U, 0x20U }, /* s */
+        { 0x04U, 0x3FU, 0x44U, 0x40U, 0x20U }, /* t */
+        { 0x3CU, 0x40U, 0x40U, 0x20U, 0x7CU }, /* u */
+        { 0x1CU, 0x20U, 0x40U, 0x20U, 0x1CU }, /* v */
+        { 0x3CU, 0x40U, 0x30U, 0x40U, 0x3CU }, /* w */
+        { 0x44U, 0x28U, 0x10U, 0x28U, 0x44U }, /* x */
+        { 0x0CU, 0x50U, 0x50U, 0x50U, 0x3CU }, /* y */
+        { 0x44U, 0x64U, 0x54U, 0x4CU, 0x44U }, /* z */
+        { 0x00U, 0x08U, 0x36U, 0x41U, 0x00U }, /* { */
+        { 0x00U, 0x00U, 0x7FU, 0x00U, 0x00U }, /* | */
+        { 0x00U, 0x41U, 0x36U, 0x08U, 0x00U }, /* } */
+        { 0x02U, 0x01U, 0x02U, 0x04U, 0x02U }, /* ~ */
     };
     UINT dx, dy;
 
@@ -429,7 +458,7 @@ void BSP_drawNString(uint8_t x, uint8_t y, char const *str) {
         ++str;
         x += 6;
     }
-    GraphicDisplay_redraw(&l_oled);           /* redraw the updated display */
+    GraphicDisplay_redraw(&l_oled); /* redraw the updated display */
 }
 /*..........................................................................*/
 void BSP_updateScore(uint16_t score) {
@@ -452,36 +481,10 @@ void BSP_displayOff(void) {
     GraphicDisplay_clear(&l_oled);
     GraphicDisplay_redraw(&l_oled);
 }
-/*..........................................................................*/
-void BSP_playerTrigger(void) {
-    static QEvt const fireEvt = { PLAYER_TRIGGER_SIG, 0U, 0U };
-    QF_PUBLISH(&fireEvt, (void*)0);
-}
-/*..........................................................................*/
-void BSP_moveShipUp(void) {
-    ObjectPosEvt *ope;
-    if (l_ship_pos > 0U) {
-        --l_ship_pos;
-    }
-    ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
-    ope->x = (uint8_t)GAME_SHIP_X;
-    ope->y = (uint8_t)l_ship_pos;
-    QACTIVE_POST(AO_Ship, (QEvt *)ope, &l_mouse);
-}
-//............................................................................
-void BSP_moveShipDown(void) {
-    ObjectPosEvt *ope;
-    if (l_ship_pos < (GAME_SCREEN_HEIGHT - 3U)) {
-        ++l_ship_pos;
-    }
-    ope = Q_NEW(ObjectPosEvt, PLAYER_SHIP_MOVE_SIG);
-    ope->x = (uint8_t)GAME_SHIP_X;
-    ope->y = (uint8_t)l_ship_pos;
-    QACTIVE_POST(AO_Ship, (QEvt *)ope, &l_mouse);
-}
+
 
 /*--------------------------------------------------------------------------*/
-#ifdef Q_SPY                                         /* define QS callbacks */
+#ifdef Q_SPY /* define QS callbacks */
 
 #include "qspy.h"
 #include <time.h>
@@ -503,17 +506,17 @@ static DWORD WINAPI idleThread(LPVOID par) {/* signature for CreateThread() */
         if (block != (uint8_t *)0) {
             QSPY_parse(block, nBytes);
         }
-        Sleep(10U);                                     /* wait for a while */
+        Sleep(10U); /* wait for a clock tick of 10ms */
     }
-    return 0;                                             /* return success */
+    return 0U; /* return success */
 }
 /*..........................................................................*/
 static int custParserFun(QSpyRecord * const qrec) {
     static uint32_t mpool1;
-    int ret = 1;                           /* perform standard QSPY parsing */
+    int ret = 1; /* perform standard QSPY parsing */
     switch (qrec->rec) {
-        case QS_QF_MPOOL_INIT: {                 /* example record to parse */
-            if (mpool1 == 1U) {                                /* MPool[1]? */
+        case QS_QF_MPOOL_INIT: { /* example record to parse */
+            if (mpool1 == 1U) {  /* MPool[1]? */
                 mpool1 = (uint32_t)QSpyRecord_getUint64(qrec,QS_OBJ_PTR_SIZE);
             }
             else {
@@ -521,7 +524,7 @@ static int custParserFun(QSpyRecord * const qrec) {
             }
             break;
         }
-        case QS_QF_MPOOL_GET: {                  /* example record to parse */
+        case QS_QF_MPOOL_GET: {  /* example record to parse */
             int nFree;
             uint32_t mpool;
             (void)QSpyRecord_getUint32(qrec, QS_TIME_SIZE);
@@ -530,7 +533,7 @@ static int custParserFun(QSpyRecord * const qrec) {
             (void)QSpyRecord_getUint32(qrec, QF_MPOOL_CTR_SIZE);    /* nMin */
             if (QSpyRecord_OK(qrec) && (mpool == mpool1)) {    /* MPool[1]? */
                 SetDlgItemInt(l_hWnd, IDC_MPOOL0, nFree, FALSE);
-                ret = 0;             /* don't perform standard QSPY parsing */
+                ret = 0; /* don't perform standard QSPY parsing */
             }
             break;
         }
@@ -539,7 +542,7 @@ static int custParserFun(QSpyRecord * const qrec) {
 }
 /*..........................................................................*/
 uint8_t QS_onStartup(void const *arg) {
-    static uint8_t qsBuf[4*1024];                 // 4K buffer for Quantum Spy
+    static uint8_t qsBuf[4*1024]; // 4K buffer for Quantum Spy
     QS_initBuf(qsBuf, sizeof(qsBuf));
 
     /* here 'arg' is ignored, but this command-line parameter can be used
@@ -673,5 +676,5 @@ void QSPY_onPrintLn(void) {
     OutputDebugString(QSPY_line);
     OutputDebugString("\n");
 }
-#endif                                                             /* Q_SPY */
+#endif /* Q_SPY */
 /*--------------------------------------------------------------------------*/

+ 0 - 0
examples/win32/game-gui/game-gui.rc → examples/arm-cm/game_ek-lm3s811/win32/game-gui.rc


+ 1 - 0
examples/win32/game-gui/game-gui.sln → examples/arm-cm/game_ek-lm3s811/win32/game-gui.sln

@@ -1,3 +1,4 @@
+
 Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual C++ Express 2010
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game-gui", "game-gui.vcxproj", "{79027B25-0949-4F66-9765-4EFBCBBEFB94}"

+ 31 - 70
examples/win32-qv/game-gui/game-gui.vcxproj → examples/arm-cm/game_ek-lm3s811/win32/game-gui.vcxproj

@@ -79,10 +79,10 @@
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <Optimization>Full</Optimization>
+      <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>.;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>NDEBUG;snprintf=_snprintf;WIN32;_CRT_SECURE_NO_WARNINGS;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>NDEBUG;WIN32_GUI;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>false</StringPooling>
       <ExceptionHandling>
       </ExceptionHandling>
@@ -93,20 +93,19 @@
       <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
       <ObjectFileName>$(IntDir)</ObjectFileName>
       <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
-      <WarningLevel>Level4</WarningLevel>
+      <WarningLevel>Level3</WarningLevel>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>../../../../ports/win32/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <SubSystem>Windows</SubSystem>
       <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
@@ -130,8 +129,8 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../../include;../../../ports/win32-qv;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;Q_SPY;snprintf=_snprintf;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32;$(QTOOLS)/qspy/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>Q_SPY;WIN32_GUI;snprintf=_snprintf;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>false</StringPooling>
       <ExceptionHandling>
       </ExceptionHandling>
@@ -143,21 +142,20 @@
       <ObjectFileName>$(IntDir)</ObjectFileName>
       <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
       <BrowseInformation>true</BrowseInformation>
-      <WarningLevel>Level4</WarningLevel>
+      <WarningLevel>Level3</WarningLevel>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>../../../../ports/win32/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <GenerateMapFile>false</GenerateMapFile>
       <MapFileName>
@@ -185,8 +183,8 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../../include;../../../ports/win32-qv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>snprintf=_snprintf;WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>.;..;../../../../include;../../../../ports/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32_GUI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>false</StringPooling>
       <ExceptionHandling>
       </ExceptionHandling>
@@ -198,21 +196,22 @@
       <ObjectFileName>$(IntDir)</ObjectFileName>
       <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
       <BrowseInformation>true</BrowseInformation>
-      <WarningLevel>Level4</WarningLevel>
+      <WarningLevel>Level3</WarningLevel>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>qp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>../../../../ports/win32/$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <GenerateMapFile>false</GenerateMapFile>
       <MapFileName>
@@ -230,9 +229,15 @@
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="$(QTOOLS)\qspy\source\qspy.c">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\main.c" />
+    <ClCompile Include="..\mine1.c" />
+    <ClCompile Include="..\mine2.c" />
+    <ClCompile Include="..\missile.c" />
+    <ClCompile Include="..\ship.c" />
+    <ClCompile Include="..\tunnel.c" />
     <ClCompile Include="bsp.c">
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -241,66 +246,22 @@
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="main.c">
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="mine1.c" />
-    <ClCompile Include="mine2.c" />
-    <ClCompile Include="missile.c" />
-    <ClCompile Include="ship.c" />
-    <ClCompile Include="tunnel.c" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="bsp.h" />
-    <ClInclude Include="dpp.h" />
-    <ClInclude Include="game.h" />
+    <ClInclude Include="..\bsp.h" />
     <ClInclude Include="resource.h" />
   </ItemGroup>
   <ItemGroup>
     <None Include="Res\BTN_DWN.bmp" />
     <None Include="Res\BTN_UP.bmp" />
-    <None Include="Res\EK-LM3S811.bmp" />
-    <None Include="Res\LCD.bmp" />
-    <None Include="Res\led_off.bmp" />
-    <None Include="Res\led_on.bmp" />
+    <None Include="Res\eating.bmp" />
+    <None Include="Res\hungry.bmp" />
+    <None Include="RES\ql.bmp" />
     <None Include="Res\qp.ico" />
-    <None Include="Res\seg.bmp" />
-    <None Include="Res\seg0.bmp" />
-    <None Include="Res\seg1.bmp" />
-    <None Include="Res\seg2.bmp" />
-    <None Include="Res\seg3.bmp" />
-    <None Include="Res\seg4.bmp" />
-    <None Include="Res\seg5.bmp" />
-    <None Include="Res\seg6.bmp" />
-    <None Include="Res\seg7.bmp" />
-    <None Include="Res\seg8.bmp" />
-    <None Include="Res\seg9.bmp" />
+    <None Include="Res\thinking.bmp" />
   </ItemGroup>
   <ItemGroup>
-    <ResourceCompile Include="game-gui.rc">
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ResourceCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <Library Include="..\..\..\ports\win32-qv\vc\Debug\qp.lib">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">true</ExcludedFromBuild>
-    </Library>
-    <Library Include="..\..\..\ports\win32-qv\vc\QSpy\qp.lib">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-    </Library>
-    <Library Include="..\..\..\ports\win32-qv\vc\Release\qp.lib">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='QSpy|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-    </Library>
+    <ResourceCompile Include="game-gui.rc" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 55 - 0
examples/arm-cm/game_ek-lm3s811/win32/game-gui.vcxproj.filters

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClCompile Include="bsp.c" />
+    <ClCompile Include="$(QTOOLS)\qspy\source\qspy.c">
+      <Filter>Q_SPY</Filter>
+    </ClCompile>
+    <ClCompile Include="..\main.c" />
+    <ClCompile Include="..\mine1.c" />
+    <ClCompile Include="..\mine2.c" />
+    <ClCompile Include="..\missile.c" />
+    <ClCompile Include="..\ship.c" />
+    <ClCompile Include="..\tunnel.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="resource.h" />
+    <ClInclude Include="..\bsp.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Res\BTN_DWN.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\BTN_UP.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\eating.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\hungry.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="RES\ql.bmp">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\qp.ico">
+      <Filter>Res</Filter>
+    </None>
+    <None Include="Res\thinking.bmp">
+      <Filter>Res</Filter>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Filter Include="Q_SPY">
+      <UniqueIdentifier>{9329cf7b-e791-415b-8458-a26ea9bf414f}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Res">
+      <UniqueIdentifier>{c8d4d732-dcf8-4466-ad8e-3f15ab6fe204}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="game-gui.rc">
+      <Filter>Res</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+</Project>

+ 0 - 0
examples/win32/game-gui/resource.h → examples/arm-cm/game_ek-lm3s811/win32/resource.h


+ 7 - 0
examples/win32-qv/blinky/README.txt

@@ -0,0 +1,7 @@
+The Win32 version of the "Blinky" example is now located in the directory:
+
+examples\arm-cm\blinky_ek-tm4c123gxl\win32-qv\
+
+This co-location of the Win32 emulation with the embedded code running
+on the actual board demonstrates better the "dual targeting" development
+approach.

+ 8 - 0
examples/win32-qv/dpp-gui/README.txt

@@ -0,0 +1,8 @@
+The Win32 GUI emulation of the Dining Philosopher Problem (DPP) example
+is now located in the directory:
+
+examples\arm-cm\dpp_ek-tm4c123gxl\win32-qv\
+
+This co-location of the Win32 emulation with the embedded code running
+on the actual embedded board demonstrates better the "dual targeting"
+development approach.

+ 1 - 0
examples/win32-qv/dpp/bsp.c

@@ -58,6 +58,7 @@ void QF_onStartup(void) {
 }
 /*..........................................................................*/
 void QF_onCleanup(void) {
+    printf("\nBye! Bye!\n");
 }
 /*..........................................................................*/
 void QF_onClockTick(void) {

Неке датотеке нису приказане због велике количине промена