diff --git a/3rd_party b/3rd_party index b2df302a..2b7bb752 160000 --- a/3rd_party +++ b/3rd_party @@ -1 +1 @@ -Subproject commit b2df302a9ba285da0aea71e3def72f006ebf36c4 +Subproject commit 2b7bb752b7f137dc12138e8461c65994c899e831 diff --git a/LICENSES/LicenseRef-QL-commercial.txt b/LICENSES/LicenseRef-QL-commercial.txt index b08f3ad0..259ff1db 100644 --- a/LICENSES/LicenseRef-QL-commercial.txt +++ b/LICENSES/LicenseRef-QL-commercial.txt @@ -2,7 +2,7 @@ Quantum Leaps Commercial Licenses Copyright (C) 2005 Quantum Leaps, LLC -Quantum Leaps commercial licenses are traditinal closed-source, paid-for +Quantum Leaps commercial licenses are traditional closed-source, paid-for licenses designed for licensees interested in retaining the proprietary status of their code. @@ -17,17 +17,17 @@ Quantum Leaps commercial licensing options are described below: Single Product License ---------------------- -Single Product License allows a given company (“Licensee”) to embed the +Single Product License allows a given company ("Licensee") to embed the specified type(s) of the QP Real-Time Embedded Framework(s) into one end- product of the Licensee (Single Product). Licensee can distribute/sell an unlimited number of units of the Single Product (royalty-free licensing), for the life of the Single Product. A different Single Product license is required for each different end product (i.e. model) even if the end-product is in the same family as a previously licensed end product. This license -is specific to the Licensee and the name and model of the Signle Product, +is specific to the Licensee and the name and model of the Single Product, which needs to be defined in the license. The general rule we apply is: -If you consider it a separate product…so do we! +If you consider it a separate product... so do we! Volume discounts are offered if several Single Products are licensed at once with one license agreement. @@ -35,7 +35,7 @@ with one license agreement. Product Line License -------------------- -Product Line License allows a given company (“Licensee”) to embed the +Product Line License allows a given company ("Licensee") to embed the specified type(s) of the QP Real-Time Embedded Framework(s) into any number of end-products within a family of related products (Product Line). Licensee can distribute/sell an unlimited number of units of each of those products @@ -46,7 +46,7 @@ similar functions within the same Product Line. Any-Product License ------------------- -Any-Product License allows a given company (“Licensee”) to embed the +Any-Product License allows a given company ("Licensee") to embed the specified type(s) of the QP Real-Time Embedded Framework(s) into any end- product of that company. The Licensee can distribute/sell an unlimited number of the products containing the licensed QP framework type(s) (royalty-free @@ -55,7 +55,7 @@ licensing). Site License ------------ -Site-License allows a given company (“Licensee”) to embed the specified +Site-License allows a given company ("Licensee") to embed the specified type(s) of the QP Real-Time Embedded Framework(s) into any end-customer product, as long as the products are designed at a given physical location (Site), which must be defined in the license. This license gives the @@ -66,7 +66,7 @@ software for other companies. OEM License ----------- -OEM License allows a given company (“Licensee”) to embed the specified +OEM License allows a given company ("Licensee") to embed the specified type(s) of the QP Real-Time Embedded Framework(s) in any product of that company (Original Equipment Manufacturer) and gives limited sublicensing rights to system integrators, subsystem vendors, subcontractors, and other @@ -77,7 +77,7 @@ licensing needs of a given Licensee. Education License ----------------- Education License allows a given accredited educational institution -(“Licensee”) to use and embed the specified type(s) of the QP Real-Time +("Licensee") to use and embed the specified type(s) of the QP Real-Time Embedded Framework(s) in any project completed at that educational institution. To be eligible for this license, the institution must be focused mainly on teaching students. The Education Licenses are free diff --git a/LICENSES/QP-RasPi_GPL_Exception.txt b/LICENSES/QP-RasPi_GPL_Exception.txt index 2b54e5d4..998744ea 100644 --- a/LICENSES/QP-RasPi_GPL_Exception.txt +++ b/LICENSES/QP-RasPi_GPL_Exception.txt @@ -39,7 +39,7 @@ executable form suitable for execution by Raspberry Pi. As a special Exception, the copyright holder of QP Frameworks gives you permission to propagate a work of Target Code formed by combining the QP Frameworks with your own source code without the requirement to expose -your propriatory source code, provided that all Target Code will execute +your proprietary source code, provided that all Target Code will execute on a genuine Raspberry Pi computer(s). 2. No Weakening of GPL diff --git a/README.md b/README.md index e22ce252..2dcdda41 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ View QP/C++ Revision History at: https://www.state-machine.com/qpcpp/history.html > **NOTE:** If you're interested in the latest QP/C++ version from GitHub, -it is highly recommened that you clone this repo like that: +it is highly recommended that you clone this repo like that: ``` git clone https://github.com/QuantumLeaps/qpcpp --recurse-submodules --depth 1 @@ -105,7 +105,7 @@ you don't use any open source license and you do not violate your policy. # QP/C++ Documentation -The online HTML documention for the **latest** version of QP/C++ is located +The online HTML documentation for the **latest** version of QP/C++ is located at: https://www.state-machine.com/qpcpp The offline HTML documentation for **this** particular version of QP/C++ diff --git a/examples/arm-cm/README.md b/examples/arm-cm/README.md index c5f3f478..cfb91ccd 100644 --- a/examples/arm-cm/README.md +++ b/examples/arm-cm/README.md @@ -41,11 +41,11 @@ This is how you might go about an MCU that is not directly supported in the `qpc - choose the compiler you'd like to use. For example, assuming that you like GNU-ARM, you are interested in the gnu subdirectory -- build the chosen example project. Again, it **doesn't matter** at this stage that it is not exacly your final hardware. Your objective is testing your QP installation and the compiler installation. You are also getting familiar with QP. These goals are worth but a few minutes of your time. +- build the chosen example project. Again, it **doesn't matter** at this stage that it is not exactly your final hardware. Your objective is testing your QP installation and the compiler installation. You are also getting familiar with QP. These goals are worth but a few minutes of your time. - at this point, it is highly recommend that you just buy one of the supported ARM Cortex-M boards, which are carefully chosen to be very inexpensive. With your own board, you'd be able to run and debug the QP application at your desk, which is priceless because as you surely remember: *In embedded systems NOTING works until EVERYTHING works*. -- only *after* you get started with a working example, you can try to modify it for your own board. This typically requiers only changes to the BSP (Board Support Package), which is provided in the `bsp.c` file. +- only *after* you get started with a working example, you can try to modify it for your own board. This typically requires only changes to the BSP (Board Support Package), which is provided in the `bsp.c` file. # Code Organization diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/README.md b/examples/arm-cm/blinky_ek-tm4c123gxl/README.md index 91e8b362..b8dd279b 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/README.md +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/README.md @@ -1,5 +1,81 @@ -![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_EK-TM4C123GXL.jpg) +> **NOTE** +This file is best viewed in a **markdown viewer**, such as the one built into GitHub. Markdown viewers are also available as plug-ins to popular Internet browsers. -Documentation for this example is available in the QP/C Manual at: +# Blinky on EK-TM4C123GXL +This example implements the simple [Blinky application](https://www.state-machine.com/qpcpp/tut_blinky.html) on the EK-TM4C123GLX board (ARM Cortex-M4F). The example blinks the LED +on the EK-TM4C123GXL board at 1Hz (0.5 seconds on, 0.5 seconds off). + +

+
+EK-TM4C123GXL (TivaC LaunchPad) +

+ +## Features Demonstrated +- cooperative QV kernel + + with ARM-KEIL toolchain + + with GNU-ARM toolchain + + with IAR-ARM toolchain +- preemptive run-to-completion QK kernel + + with ARM-KEIL toolchain + + with GNU-ARM toolchain + + with IAR-ARM toolchain + +## Build Configurations +- Debug +- Release +- Spy - NOT supported for the simple Blinky example + +# Code Organization +``` +examples\arm-cm\blinky_ek-tm4c123gxl +| ++---qk // preemptive QK kernel +| +---gnu // GNU-ARM toolchain +| | Makefile // Makefile for GNU-ARM +| +---armclang // ARM/KEIL toolchain with Compiler 6 (ARM/CLANG) +| | blinky-qk.uvprojx // uVision project +| \---iar // IAR EWARM +| blinky-qk.eww // IAR EW-ARM workspace +| +\---qv // cooperative QK kernel +| +---gnu // GNU-ARM toolchain +| | Makefile // Makefile for GNU-ARM +| +---armclang // ARM/KEIL toolchain with Compiler 6 (ARM/CLANG) +| | blinky-qv.uvprojx // uVision project +| \---iar // IAR EWARM +| blinky-qv.eww // IAR EW-ARM workspace +``` + +# Building the example + +### GNU/ARM +- open terminal window +- change to the desired directory (either `examples\arm-cm\blinky_ek-tm4c123gxl\qk\gnu` +or `examples\arm-cm\blinky_ek-tm4c123gxl\qv\gnu`) +- to build the default Debug configuration, type: + +``` +make +``` + +> **NOTE** +The `make` utility for Windows is provided in the QTools collection for Windows. + +- to build the Release configuration, type: + +``` +make CONF=rel +``` + + +### ARM/KEIL MDK +- Open the provided KEIL uVision project (either `blinky-qk.uvprojx` or `blinky-qv.uvprojx`) +in Keil uVision IDE. Build/Debug/Download to the board from the IDE. +- Change the build configuration in the "Project Target" drop-down menu. + + +### IAR EWARM +- Open the provided IAR EWARM workspace (either `blinky-qk.eww` or `blinky-qv.eww`) +in IAR EWARM IDE. Build/Debug/Download to the board from the IDE. +- Change the build configuration in the "Project Configuration" drop-down menu. -- https://www.state-machine.com/qpcpp/arm-cm_blinky_ek-tm4c123gxl.html diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/ek-tm4c123gxl.jpg b/examples/arm-cm/blinky_ek-tm4c123gxl/ek-tm4c123gxl.jpg new file mode 100644 index 00000000..5ed6188c Binary files /dev/null and b/examples/arm-cm/blinky_ek-tm4c123gxl/ek-tm4c123gxl.jpg differ diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp index cade19df..d39a74f7 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.cpp @@ -246,7 +246,7 @@ void QK::onIdle() { // // NOTE2: // One of the LEDs is used to visualize the idle loop activity. The brightness -// of the LED is proportional to the frequency of invcations of the idle loop. -// Please note that the LED is toggled with interrupts locked, so no interrupt -// execution time contributes to the brightness of the User LED. +// of the LED is proportional to the frequency of the idle loop. Please note +// that the LED is toggled with interrupts locked, so no interrupt execution +// time contributes to the brightness of the User LED. // diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.ccsproject b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.ccsproject deleted file mode 100644 index 0c19207c..00000000 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.ccsproject +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.cproject b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.cproject deleted file mode 100644 index 310b2b54..00000000 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.cproject +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.project b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.project deleted file mode 100644 index 1a203c20..00000000 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.project +++ /dev/null @@ -1,120 +0,0 @@ - - - blinky-qk - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - GNU_CPP - 2 - PARENT-5-PROJECT_LOC/3rd_party/gnu_cpp - - - QK - 2 - PARENT-5-PROJECT_LOC/src/qk - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/arm-cm/qk/gnu - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - TM4C123GH6PM.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/TM4C123GH6PM.h - - - blinky.cpp - 1 - PARENT-2-PROJECT_LOC/blinky.cpp - - - blinky.h - 1 - PARENT-2-PROJECT_LOC/blinky.h - - - bsp.cpp - 1 - PARENT-1-PROJECT_LOC/bsp.cpp - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - gpio.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gpio.h - - - main.cpp - 1 - PARENT-2-PROJECT_LOC/main.cpp - - - qstamp.cpp - 1 - PARENT-5-PROJECT_LOC/src/qs/qstamp.cpp - - - rom.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/rom.h - - - startup_TM4C123GH6PM.c - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gnu/startup_TM4C123GH6PM.c - - - sysctl.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/sysctl.h - - - system_TM4C123GH6PM.c - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/system_TM4C123GH6PM.c - - - system_TM4C123GH6PM.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/system_TM4C123GH6PM.h - - - diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile index 2922a814..782edff7 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/Makefile @@ -57,7 +57,7 @@ PROJECT := blinky-qk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -176,7 +176,7 @@ RM := rm # build options for various configurations for ARM Cortex-M4F # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/README.txt b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/README.txt index 3ba6f924..18bf7307 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/README.txt +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/README.txt @@ -31,7 +31,7 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M4F projects, due to the support for the hardware FPU (float-abi=hard). *** diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp index 2a472ff1..5851393f 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.cpp @@ -246,7 +246,7 @@ void QV::onIdle() { // CATION: called with interrupts DISABLED, NOTE0 // // NOTE2: // One of the LEDs is used to visualize the idle loop activity. The brightness -// of the LED is proportional to the frequency of invcations of the idle loop. -// Please note that the LED is toggled with interrupts locked, so no interrupt -// execution time contributes to the brightness of the User LED. +// of the LED is proportional to the frequency of the idle loop. Please note +// that the LED is toggled with interrupts locked, so no interrupt execution +// time contributes to the brightness of the User LED. // diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.ccsproject b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.ccsproject deleted file mode 100644 index 0c19207c..00000000 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.ccsproject +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.cproject b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.cproject deleted file mode 100644 index e96d740d..00000000 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.cproject +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.project b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.project deleted file mode 100644 index f27909d1..00000000 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.project +++ /dev/null @@ -1,120 +0,0 @@ - - - blinky-qv - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.ti.ccstudio.core.ccsNature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - GNU_CPP - 2 - PARENT-5-PROJECT_LOC/3rd_party/gnu_cpp - - - QP - 2 - PARENT-5-PROJECT_LOC/src/qf - - - QP_port - 2 - PARENT-5-PROJECT_LOC/ports/arm-cm/qv/gnu - - - QS - 2 - PARENT-5-PROJECT_LOC/src/qs - - - TM4C123GH6PM.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/TM4C123GH6PM.h - - - blinky.cpp - 1 - PARENT-2-PROJECT_LOC/blinky.cpp - - - blinky.h - 1 - PARENT-2-PROJECT_LOC/blinky.h - - - bsp.cpp - 1 - PARENT-1-PROJECT_LOC/bsp.cpp - - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - gpio.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gpio.h - - - main.cpp - 1 - PARENT-2-PROJECT_LOC/main.cpp - - - qstamp.cpp - 1 - PARENT-5-PROJECT_LOC/src/qs/qstamp.cpp - - - qv - 2 - PARENT-5-PROJECT_LOC/src/qv - - - rom.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/rom.h - - - startup_TM4C123GH6PM.c - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gnu/startup_TM4C123GH6PM.c - - - sysctl.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/sysctl.h - - - system_TM4C123GH6PM.c - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/system_TM4C123GH6PM.c - - - system_TM4C123GH6PM.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/system_TM4C123GH6PM.h - - - diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile index b0aa83ab..03ce5132 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/Makefile @@ -57,7 +57,7 @@ PROJECT := blinky-qv # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -176,7 +176,7 @@ RM := rm # build options for various configurations for ARM Cortex-M4F # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/README.txt b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/README.txt index 3ba6f924..18bf7307 100644 --- a/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/README.txt +++ b/examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/README.txt @@ -31,7 +31,7 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M4F projects, due to the support for the hardware FPU (float-abi=hard). *** diff --git a/examples/arm-cm/blinky_nucleo-c031c6/README.md b/examples/arm-cm/blinky_nucleo-c031c6/README.md index 91e8b362..ba383678 100644 --- a/examples/arm-cm/blinky_nucleo-c031c6/README.md +++ b/examples/arm-cm/blinky_nucleo-c031c6/README.md @@ -1,5 +1,80 @@ -![STM32 EFM32-SLSTK3401A](../../../doxygen/images/bd_EK-TM4C123GXL.jpg) +> **NOTE** +This file is best viewed in a **markdown viewer**, such as the one built into GitHub. Markdown viewers are also available as plug-ins to popular Internet browsers. -Documentation for this example is available in the QP/C Manual at: +# Blinky on NUCLEO-C031C6 +This example demonstrates the [Blinky application](https://www.state-machine.com/qpcpp/tut_blinky.html) on the STM32 NUCLEO-C031C6 board (ARM Cortex-M0+). + +

+
+STM32 NUCLEO-C031C6 +

+ +## Features Demonstrated +- cooperative QV kernel + + with ARM-KEIL toolchain + + with GNU-ARM toolchain + + with IAR-ARM toolchain +- preemptive run-to-completion QK kernel + + with ARM-KEIL toolchain + + with GNU-ARM toolchain + + with IAR-ARM toolchain + +## Build Configurations +- Debug +- Release +- Spy - NOT supported for the simple Blinky example + +# Code Organization +``` +examples\arm-cm\blinky_nucleo-c031c6 +| ++---qk // preemptive QK kernel +| +---gnu // GNU-ARM toolchain +| | Makefile // Makefile for GNU-ARM +| +---armclang // ARM/KEIL toolchain with Compiler 6 (ARM/CLANG) +| | blinky-qk.uvprojx // uVision project +| \---iar // IAR EWARM +| blinky-qk.eww // IAR EW-ARM workspace +| +\---qv // cooperative QK kernel +| +---gnu // GNU-ARM toolchain +| | Makefile // Makefile for GNU-ARM +| +---armclang // ARM/KEIL toolchain with Compiler 6 (ARM/CLANG) +| | blinky-qv.uvprojx // uVision project +| \---iar // IAR EWARM +| blinky-qv.eww // IAR EW-ARM workspace +``` + +# Building the example + +### GNU/ARM +- open terminal window +- change to the desired directory (either `examples\arm-cm\blinky_nucleo-c031c6\qk\gnu` +or `examples\arm-cm\blinky_nucleo-c031c6\qv\gnu`) +- to build the default Debug configuration, type: + +``` +make +``` + +> **NOTE** +The `make` utility for Windows is provided in the QTools collection for Windows. + +- to build the Release configuration, type: + +``` +make CONF=rel +``` + + +### ARM/KEIL MDK +- Open the provided KEIL uVision project (either `blinky-qk.uvprojx` or `blinky-qv.uvprojx`) +in Keil uVision IDE. Build/Debug/Download to the board from the IDE. +- Change the build configuration in the "Project Target" drop-down menu. + + +### IAR EWARM +- Open the provided IAR EWARM workspace (either `blinky-qk.eww` or `blinky-qv.eww`) +in IAR EWARM IDE. Build/Debug/Download to the board from the IDE. +- Change the build configuration in the "Project Configuration" drop-down menu. -- https://www.state-machine.com/qpcpp/arm-cm_blinky_ek-tm4c123gxl.html diff --git a/examples/arm-cm/blinky_nucleo-c031c6/qk/gnu/Makefile b/examples/arm-cm/blinky_nucleo-c031c6/qk/gnu/Makefile index 6eaadc4f..ae9ea72f 100644 --- a/examples/arm-cm/blinky_nucleo-c031c6/qk/gnu/Makefile +++ b/examples/arm-cm/blinky_nucleo-c031c6/qk/gnu/Makefile @@ -56,7 +56,7 @@ PROJECT := blinky-qk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -178,7 +178,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/blinky_nucleo-c031c6/qv/gnu/Makefile b/examples/arm-cm/blinky_nucleo-c031c6/qv/gnu/Makefile index f873bacb..0e0a3ebe 100644 --- a/examples/arm-cm/blinky_nucleo-c031c6/qv/gnu/Makefile +++ b/examples/arm-cm/blinky_nucleo-c031c6/qv/gnu/Makefile @@ -56,7 +56,7 @@ PROJECT := blinky-qv # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -176,7 +176,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/blinky_nucleo-c031c6/stm32-nucleo-c031c6.jpg b/examples/arm-cm/blinky_nucleo-c031c6/stm32-nucleo-c031c6.jpg new file mode 100644 index 00000000..6647e2d4 Binary files /dev/null and b/examples/arm-cm/blinky_nucleo-c031c6/stm32-nucleo-c031c6.jpg differ diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm index 917b13a7..1de2b108 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm +++ b/examples/arm-cm/dpp_efm32-slstk3401a/dpp.qm @@ -258,7 +258,7 @@ for (std::uint8_t n = 0U; n < N_PHILO; ++n) { - // give permissions to eat... + // give permissions to eat... for (std::uint8_t n = 0U; n < N_PHILO; ++n) { if (m_isHungry[n] && (m_fork[left(n)] == FREE) diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp index 5d2f7841..5c2ad7b3 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.cpp @@ -490,7 +490,7 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0U) { // not set? return QS_tickTime_ - (QSTimeCtr)SysTick->VAL; } - else { // the rollover occured, but the SysTick_ISR did not run yet + else { // the rollover occurred, but the SysTick_ISR did not run yet return QS_tickTime_ + QS_tickPeriod_ - (QSTimeCtr)SysTick->VAL; } } diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/Makefile b/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/Makefile index 1c13ad8f..1af21e40 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/Makefile @@ -57,7 +57,7 @@ PROJECT := dpp-qk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -183,7 +183,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/README.txt b/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/README.txt index a578042c..b4d4451a 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/README.txt +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qk/gnu/README.txt @@ -31,7 +31,7 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M4F projects, due to the support for the hardware FPU (float-abi=hard). *** diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp index eff944da..9212cbe9 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.cpp @@ -481,7 +481,7 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0U) { // not set? return QS_tickTime_ - (QSTimeCtr)SysTick->VAL; } - else { // the rollover occured, but the SysTick_ISR did not run yet + else { // the rollover occurred, but the SysTick_ISR did not run yet return QS_tickTime_ + QS_tickPeriod_ - (QSTimeCtr)SysTick->VAL; } } diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile index aacabf10..ef900dc1 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/Makefile @@ -57,7 +57,7 @@ PROJECT := dpp-qv # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -183,7 +183,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/README.txt b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/README.txt index a578042c..b4d4451a 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/README.txt +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qv/gnu/README.txt @@ -31,7 +31,7 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M4F projects, due to the support for the hardware FPU (float-abi=hard). *** diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp index bb431cc8..b5a00df0 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/bsp.cpp @@ -505,7 +505,7 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0U) { // not set? return QS_tickTime_ - (QSTimeCtr)SysTick->VAL; } - else { // the rollover occured, but the SysTick_ISR did not run yet + else { // the rollover occurred, but the SysTick_ISR did not run yet return QS_tickTime_ + QS_tickPeriod_ - (QSTimeCtr)SysTick->VAL; } } diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile index aa04f7bd..98b1a4bc 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/Makefile @@ -56,7 +56,7 @@ PROJECT := dpp-qxk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -187,7 +187,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/README.txt b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/README.txt index 14fff559..1814d84d 100644 --- a/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/README.txt +++ b/examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu/README.txt @@ -31,7 +31,7 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M4F projects, due to the support for the hardware FPU (float-abi=hard). *** diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm index 917b13a7..1de2b108 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/dpp.qm @@ -258,7 +258,7 @@ for (std::uint8_t n = 0U; n < N_PHILO; ++n) { - // give permissions to eat... + // give permissions to eat... for (std::uint8_t n = 0U; n < N_PHILO; ++n) { if (m_isHungry[n] && (m_fork[left(n)] == FREE) diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/README.txt index 6075a298..f4869b16 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/README.txt +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/README.txt @@ -7,7 +7,7 @@ To "lint" the application, invoke the batch "lin.bat" without parameters. Optionally, you can supply the parameter -dQ_SPY to include the QS instrumentation in the "linting" process. -The output from the "linting" is saved in the fle "lin_out.log". +The output from the "linting" is saved in the file "lin_out.log". *** NOTE: You need to adjust the symbol PCLP_DIR at the top of the lin.bat diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/options.lnt b/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/options.lnt index 9e80bf43..6093417a 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/options.lnt +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/lint-plus/options.lnt @@ -57,7 +57,7 @@ cpu.lnt // for the chosen CPU qpcpp.lnt // QP/C++ options ///////////////////////////////////////////////////////////////////////////// -// addtitional supporession rules for bulding this application +// additional suppression rules for building this application // underlying type for enums is always 'int' +fei diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.ccsproject b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.ccsproject index 0c19207c..e057df00 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.ccsproject +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.ccsproject @@ -1,17 +1,5 @@ - - - - - - - - - - - - diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.cproject b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.cproject index bb51c307..c3caf810 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.cproject +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.cproject @@ -3,9 +3,6 @@ - - - @@ -18,31 +15,41 @@ - - @@ -91,11 +99,8 @@ - - - - - + + @@ -106,125 +111,44 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -273,6 +198,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -288,4 +313,6 @@ - + + + \ No newline at end of file diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.project b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.project index d9eaf715..bdf5667f 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.project +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/.project @@ -7,7 +7,6 @@ org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, @@ -26,11 +25,6 @@ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - GNU_CPP - 2 - PARENT-5-PROJECT_LOC/3rd_party/gnu_cpp - QK 2 @@ -61,25 +55,10 @@ 1 PARENT-1-PROJECT_LOC/bsp.cpp - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - dpp.h - 1 - PARENT-2-PROJECT_LOC/dpp.h - - - gpio.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gpio.h - main.cpp 1 - PARENT-1-PROJECT_LOC/main.cpp + PARENT-2-PROJECT_LOC/main.cpp philo.cpp @@ -87,25 +66,15 @@ PARENT-2-PROJECT_LOC/philo.cpp - qstamp.cpp + qp_config.hpp 1 - PARENT-5-PROJECT_LOC/src/qs/qstamp.cpp - - - rom.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/rom.h + PARENT-2-PROJECT_LOC/qp_config.hpp startup_TM4C123GH6PM.c 1 PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gnu/startup_TM4C123GH6PM.c - - sysctl.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/sysctl.h - system_TM4C123GH6PM.c 1 @@ -122,4 +91,10 @@ PARENT-2-PROJECT_LOC/table.cpp + + + CG_TOOL_GPP + $%7BCG_TOOL_ROOT%7D/bin/arm-none-eabi-g++ + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile index d477c69e..a2761cdd 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ on EK-TM4C123GXL, QK kernel, GNU-ARM -# Last Updated for Version: 7.3.0 -# Date of the Last Update: 2023-05-26 +# Last Updated for Version: 7.3.3 +# Date of the Last Update: 2024-01-29 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. # # 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 @@ -56,7 +56,7 @@ PROJECT := dpp-qk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -132,8 +132,7 @@ LIB_DIRS := LIBS := # defines -DEFINES := \ - -DQF_ON_CONTEXT_SW +DEFINES := -DQP_CONFIG # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] @@ -141,8 +140,8 @@ DEFINES := \ # FLOAT_ABI: [ | soft | softfp | hard] # ARM_CPU := -mcpu=cortex-m4 -ARM_FPU := -mfpu=vfp -FLOAT_ABI := -mfloat-abi=softfp +ARM_FPU := -mfpu=fpv4-sp-d16 +FLOAT_ABI := -mfloat-abi=hard #----------------------------------------------------------------------------- # GNU-ARM toolset (NOTE: You need to adjust to your machine) @@ -177,7 +176,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) @@ -279,6 +278,8 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ +.PHONY : clean show + # include dependency files only if our goal depends on their existence ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) @@ -287,7 +288,6 @@ ifneq ($(MAKECMDGOALS),clean) endif -.PHONY : clean clean: -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/README.txt index 3ba6f924..ab8e99e8 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/README.txt +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qk/gnu/README.txt @@ -11,9 +11,6 @@ The provided Makefile should be easy to adapt for your own projects. It contains three build configurations: Debug (default), Release, and Spy. -Also, the Makefile has been specifically designed to work as an external -Makefile with the Eclipse CDT. - The various build configurations are built as follows: make @@ -31,11 +28,22 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M4F projects, due to the support for the hardware FPU (float-abi=hard). *** +The CCS Project +=============== +This directory contains also the CCS project which can be imported to the +CCS (Code Composer Studio) IDE based on Eclipse. To import the project, +use the section "General -> Existing Project into Workspace" and select this +directory as the "root directory". For example, the "Select root directory" +might be: C:\qp-dev\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\qxk\gnu + +Once you press "Browse", the project (dpp-qk, dpp-qv, or dpp-qxk) should +become visible. Click on "Select All" and then "Finish". + Adjusting Stack and Heap Sizes ============================== diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qp_config.hpp b/examples/arm-cm/dpp_ek-tm4c123gxl/qp_config.hpp index 28e3469b..57e38bd9 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qp_config.hpp +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qp_config.hpp @@ -113,7 +113,7 @@ // Maximum # event pools (QF_MAX_EPOOL) // <0=>0 no event pools -// <1=>1 <2=>2 <3=>3 (deafult) <4=>4 <5=>5 +// <1=>1 <2=>2 <3=>3 (default) <4=>4 <5=>5 // <6=>6 <7=>7 <8=>8 <9=>9 <10=>10 <11=>11 // <12=>12 <13=>13 <14=>14 <15=>15 // Maximum # Event Pools <1..15> @@ -184,7 +184,7 @@ //.......................................................................... // QS Software Tracing // Target-resident component of QP/Spy software tracing system -// (tracing instrumenation and command-input). +// (tracing instrumentation and command-input). // NOTE: Requires command-line macro: Q_SPY // The QS software tracing instrumenation is activated only when diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.ccsproject b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.ccsproject index 0c19207c..e057df00 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.ccsproject +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.ccsproject @@ -1,17 +1,5 @@ - - - - - - - - - - - - diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.cproject b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.cproject index 92fd4669..cee30aba 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.cproject +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.cproject @@ -3,9 +3,6 @@ - - - @@ -18,69 +15,80 @@ - - @@ -91,11 +99,8 @@ - - - - - + + @@ -106,163 +111,83 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -273,10 +198,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -288,4 +313,6 @@ + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.project b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.project index 6aed6739..ad4e29a9 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.project +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/.project @@ -1,13 +1,12 @@ - dpp-qv + dpp-qv org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, @@ -27,9 +26,9 @@ - GNU_CPP + QV 2 - PARENT-5-PROJECT_LOC/3rd_party/gnu_cpp + PARENT-5-PROJECT_LOC/src/qv QP @@ -39,18 +38,13 @@ QP_port 2 - PARENT-5-PROJECT_LOC/ports/arm-cm/qv/gnu + PARENT-5-PROJECT_LOC/ports/arm-cm/qv/gnu QS 2 PARENT-5-PROJECT_LOC/src/qs - - QV - 2 - PARENT-5-PROJECT_LOC/src/qv - TM4C123GH6PM.h 1 @@ -61,25 +55,10 @@ 1 PARENT-1-PROJECT_LOC/bsp.cpp - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - dpp.h - 1 - PARENT-2-PROJECT_LOC/dpp.h - - - gpio.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gpio.h - main.cpp 1 - PARENT-1-PROJECT_LOC/main.cpp + PARENT-2-PROJECT_LOC/main.cpp philo.cpp @@ -87,25 +66,15 @@ PARENT-2-PROJECT_LOC/philo.cpp - qstamp.cpp + qp_config.hpp 1 - PARENT-5-PROJECT_LOC/src/qs/qstamp.cpp - - - rom.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/rom.h + PARENT-2-PROJECT_LOC/qp_config.hpp startup_TM4C123GH6PM.c 1 PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gnu/startup_TM4C123GH6PM.c - - sysctl.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/sysctl.h - system_TM4C123GH6PM.c 1 @@ -122,4 +91,10 @@ PARENT-2-PROJECT_LOC/table.cpp + + + CG_TOOL_GPP + $%7BCG_TOOL_ROOT%7D/bin/arm-none-eabi-g++ + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile index 250c7f8c..8b4533de 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ on EK-TM4C123GXL, QV kernel, GNU-ARM -# Last Updated for Version: 7.0.1 -# Date of the Last Update: 2022-05-23 +# Last Updated for Version: 7.3.3 +# Date of the Last Update: 2024-01-29 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. # # 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 @@ -45,8 +45,7 @@ # NOTE: # To use this Makefile on Windows, you will need the GNU make utility, which # is included in the Qtools collection for Windows, see: -# https://sourceforge.net/projects/qpc/files/QTools/ -# +# https://github.com/QuantumLeaps/qtools #----------------------------------------------------------------------------- # project name @@ -57,7 +56,7 @@ PROJECT := dpp-qv # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -133,7 +132,7 @@ LIB_DIRS := LIBS := # defines -DEFINES := +DEFINES := -DQP_CONFIG # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] @@ -141,8 +140,8 @@ DEFINES := # FLOAT_ABI: [ | soft | softfp | hard] # ARM_CPU := -mcpu=cortex-m4 -ARM_FPU := -mfpu=vfp -FLOAT_ABI := -mfloat-abi=softfp +ARM_FPU := -mfpu=fpv4-sp-d16 +FLOAT_ABI := -mfloat-abi=hard #----------------------------------------------------------------------------- # GNU-ARM toolset (NOTE: You need to adjust to your machine) @@ -165,19 +164,19 @@ BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy ############################################################################## -# Typically, you should not need to change anything below this line +# Typically you should not need to change anything below this line -# basic utilities (included in Qtools for Windows), see: -# http://sourceforge.net/projects/qpc/files/Qtools +# basic utilities (included in QTools for Windows), see: +# https://www.state-machine.com/qtools MKDIR := mkdir RM := rm #----------------------------------------------------------------------------- -# build options for various configurations for ARM Cortex-M4F +# build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) @@ -189,11 +188,11 @@ ASFLAGS = $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU) CFLAGS = -c $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ -ffunction-sections -fdata-sections \ - -O1 $(INCLUDES) $(DEFINES) -DNDEBUG + -O2 $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \ - -O1 $(INCLUDES) $(DEFINES) -DNDEBUG + -O2 $(INCLUDES) $(DEFINES) -DNDEBUG else ifeq (spy, $(CONF)) # Spy configuration ................................ @@ -279,6 +278,8 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ +.PHONY : clean show + # include dependency files only if our goal depends on their existence ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) @@ -287,7 +288,6 @@ ifneq ($(MAKECMDGOALS),clean) endif -.PHONY : clean clean: -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/README.txt index 3ba6f924..ab8e99e8 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/README.txt +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qv/gnu/README.txt @@ -11,9 +11,6 @@ The provided Makefile should be easy to adapt for your own projects. It contains three build configurations: Debug (default), Release, and Spy. -Also, the Makefile has been specifically designed to work as an external -Makefile with the Eclipse CDT. - The various build configurations are built as follows: make @@ -31,11 +28,22 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M4F projects, due to the support for the hardware FPU (float-abi=hard). *** +The CCS Project +=============== +This directory contains also the CCS project which can be imported to the +CCS (Code Composer Studio) IDE based on Eclipse. To import the project, +use the section "General -> Existing Project into Workspace" and select this +directory as the "root directory". For example, the "Select root directory" +might be: C:\qp-dev\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\qxk\gnu + +Once you press "Browse", the project (dpp-qk, dpp-qv, or dpp-qxk) should +become visible. Click on "Select All" and then "Finish". + Adjusting Stack and Heap Sizes ============================== diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.ccsproject b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.ccsproject index 0c19207c..e057df00 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.ccsproject +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.ccsproject @@ -1,17 +1,5 @@ - - - - - - - - - - - - diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.cproject b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.cproject index 6c9e2425..8dfdffe6 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.cproject +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.cproject @@ -3,9 +3,6 @@ - - - @@ -18,69 +15,80 @@ - - @@ -91,11 +99,8 @@ - - - - - + + @@ -106,163 +111,83 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -273,10 +198,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -288,4 +313,6 @@ + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.project b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.project index bef9d547..260dc4f8 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.project +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/.project @@ -7,7 +7,6 @@ org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, @@ -26,11 +25,6 @@ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - GNU_CPP - 2 - PARENT-5-PROJECT_LOC/3rd_party/gnu_cpp - QP 2 @@ -61,25 +55,10 @@ 1 PARENT-1-PROJECT_LOC/bsp.cpp - - bsp.h - 1 - PARENT-2-PROJECT_LOC/bsp.h - - - dpp.h - 1 - PARENT-2-PROJECT_LOC/dpp.h - - - gpio.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gpio.h - main.cpp 1 - PARENT-1-PROJECT_LOC/main.cpp + PARENT-2-PROJECT_LOC/main.cpp philo.cpp @@ -87,25 +66,15 @@ PARENT-2-PROJECT_LOC/philo.cpp - qstamp.cpp + qp_config.hpp 1 - PARENT-5-PROJECT_LOC/src/qs/qstamp.cpp - - - rom.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/rom.h + PARENT-2-PROJECT_LOC/qp_config.hpp startup_TM4C123GH6PM.c 1 PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/gnu/startup_TM4C123GH6PM.c - - sysctl.h - 1 - PARENT-5-PROJECT_LOC/3rd_party/ek-tm4c123gxl/sysctl.h - system_TM4C123GH6PM.c 1 @@ -122,9 +91,20 @@ PARENT-2-PROJECT_LOC/table.cpp - test.cpp + xthread1.cpp 1 - PARENT-1-PROJECT_LOC/test.cpp + PARENT-1-PROJECT_LOC/xthread1.cpp + + + xthread2.cpp + 1 + PARENT-1-PROJECT_LOC/xthread2.cpp + + + CG_TOOL_GPP + $%7BCG_TOOL_ROOT%7D/bin/arm-none-eabi-g++ + + diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/Makefile index 74eb3750..ce1c593c 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C++ on EK-TM4C123GXL, QXK kernel, GNU-ARM -# Last Updated for Version: 7.3.0 -# Date of the Last Update: 2023-05-26 +# Last Updated for Version: 7.3.3 +# Date of the Last Update: 2024-01-29 # # Q u a n t u m L e a P s # ------------------------ @@ -56,7 +56,7 @@ PROJECT := dpp-qxk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -137,8 +137,7 @@ LIB_DIRS := LIBS := # defines -DEFINES := \ - -DQF_ON_CONTEXT_SW +DEFINES := -DQP_CONFIG # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] @@ -146,8 +145,8 @@ DEFINES := \ # FLOAT_ABI: [ | soft | softfp | hard] # ARM_CPU := -mcpu=cortex-m4 -ARM_FPU := -mfpu=vfp -FLOAT_ABI := -mfloat-abi=softfp +ARM_FPU := -mfpu=fpv4-sp-d16 +FLOAT_ABI := -mfloat-abi=hard #----------------------------------------------------------------------------- # GNU-ARM toolset (NOTE: You need to adjust to your machine) @@ -182,7 +181,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) @@ -284,6 +283,8 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ +.PHONY : clean show + # include dependency files only if our goal depends on their existence ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) @@ -292,7 +293,6 @@ ifneq ($(MAKECMDGOALS),clean) endif -.PHONY : clean clean: -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/README.txt index 3ba6f924..ab8e99e8 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/README.txt +++ b/examples/arm-cm/dpp_ek-tm4c123gxl/qxk/gnu/README.txt @@ -11,9 +11,6 @@ The provided Makefile should be easy to adapt for your own projects. It contains three build configurations: Debug (default), Release, and Spy. -Also, the Makefile has been specifically designed to work as an external -Makefile with the Eclipse CDT. - The various build configurations are built as follows: make @@ -31,11 +28,22 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M4F projects, due to the support for the hardware FPU (float-abi=hard). *** +The CCS Project +=============== +This directory contains also the CCS project which can be imported to the +CCS (Code Composer Studio) IDE based on Eclipse. To import the project, +use the section "General -> Existing Project into Workspace" and select this +directory as the "root directory". For example, the "Select root directory" +might be: C:\qp-dev\qpc\examples\arm-cm\dpp_ek-tm4c123gxl\qxk\gnu + +Once you press "Browse", the project (dpp-qk, dpp-qv, or dpp-qxk) should +become visible. Click on "Select All" and then "Finish". + Adjusting Stack and Heap Sizes ============================== diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp_mpu.qm b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp_mpu.qm index 1b189921..01304932 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp_mpu.qm +++ b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/dpp_mpu.qm @@ -334,7 +334,7 @@ for (std::uint8_t n = 0U; n < N_PHILO; ++n) { - // give permissions to eat... + // give permissions to eat... for (std::uint8_t n = 0U; n < N_PHILO; ++n) { if (m_isHungry[n] && (m_fork[left(n)] == FREE) diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/lint-plus/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/lint-plus/README.txt index 6075a298..f4869b16 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/lint-plus/README.txt +++ b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/lint-plus/README.txt @@ -7,7 +7,7 @@ To "lint" the application, invoke the batch "lin.bat" without parameters. Optionally, you can supply the parameter -dQ_SPY to include the QS instrumentation in the "linting" process. -The output from the "linting" is saved in the fle "lin_out.log". +The output from the "linting" is saved in the file "lin_out.log". *** NOTE: You need to adjust the symbol PCLP_DIR at the top of the lin.bat diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/lint-plus/options.lnt b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/lint-plus/options.lnt index 9e80bf43..6093417a 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/lint-plus/options.lnt +++ b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/lint-plus/options.lnt @@ -57,7 +57,7 @@ cpu.lnt // for the chosen CPU qpcpp.lnt // QP/C++ options ///////////////////////////////////////////////////////////////////////////// -// addtitional supporession rules for bulding this application +// additional suppression rules for building this application // underlying type for enums is always 'int' +fei diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qk/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qk/gnu/Makefile index ec564dd4..a2761cdd 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qk/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ on EK-TM4C123GXL, QK kernel, GNU-ARM -# Last Updated for Version: 7.3.0 -# Date of the Last Update: 2023-09-02 +# Last Updated for Version: 7.3.3 +# Date of the Last Update: 2024-01-29 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. # # 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 @@ -56,7 +56,7 @@ PROJECT := dpp-qk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -77,7 +77,6 @@ VPATH = \ # list of all include directories needed by this project INCLUDES = \ - -I.. \ -I../.. \ -I$(QPCPP)/include \ -I$(QP_PORT_DIR) \ @@ -141,8 +140,8 @@ DEFINES := -DQP_CONFIG # FLOAT_ABI: [ | soft | softfp | hard] # ARM_CPU := -mcpu=cortex-m4 -ARM_FPU := -mfpu=vfp -FLOAT_ABI := -mfloat-abi=softfp +ARM_FPU := -mfpu=fpv4-sp-d16 +FLOAT_ABI := -mfloat-abi=hard #----------------------------------------------------------------------------- # GNU-ARM toolset (NOTE: You need to adjust to your machine) @@ -165,19 +164,19 @@ BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy ############################################################################## -# Typically, you should not need to change anything below this line +# Typically you should not need to change anything below this line -# basic utilities (included in Qtools for Windows), see: -# http://sourceforge.net/projects/qpc/files/Qtools +# basic utilities (included in QTools for Windows), see: +# https://www.state-machine.com/qtools MKDIR := mkdir RM := rm #----------------------------------------------------------------------------- -# build options for various configurations for ARM Cortex-M4F +# build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) @@ -189,11 +188,11 @@ ASFLAGS = $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU) CFLAGS = -c $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ -ffunction-sections -fdata-sections \ - -O1 $(INCLUDES) $(DEFINES) -DNDEBUG + -O2 $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \ - -O1 $(INCLUDES) $(DEFINES) -DNDEBUG + -O2 $(INCLUDES) $(DEFINES) -DNDEBUG else ifeq (spy, $(CONF)) # Spy configuration ................................ @@ -279,6 +278,8 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ +.PHONY : clean show + # include dependency files only if our goal depends on their existence ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) @@ -287,7 +288,6 @@ ifneq ($(MAKECMDGOALS),clean) endif -.PHONY : clean clean: -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qv/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qv/gnu/Makefile index 6553d41f..8b4533de 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qv/gnu/Makefile @@ -1,13 +1,13 @@ ############################################################################## # Product: Makefile for QP/C++ on EK-TM4C123GXL, QV kernel, GNU-ARM -# Last Updated for Version: 7.3.0 -# Date of the Last Update: 2023-09-02 +# Last Updated for Version: 7.3.3 +# Date of the Last Update: 2024-01-29 # # Q u a n t u m L e a P s # ------------------------ # Modern Embedded Software # -# Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved. +# Copyright (C) 2005 Quantum Leaps, LLC. # # 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 @@ -56,7 +56,7 @@ PROJECT := dpp-qv # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -77,7 +77,6 @@ VPATH = \ # list of all include directories needed by this project INCLUDES = \ - -I.. \ -I../.. \ -I$(QPCPP)/include \ -I$(QP_PORT_DIR) \ @@ -141,8 +140,8 @@ DEFINES := -DQP_CONFIG # FLOAT_ABI: [ | soft | softfp | hard] # ARM_CPU := -mcpu=cortex-m4 -ARM_FPU := -mfpu=vfp -FLOAT_ABI := -mfloat-abi=softfp +ARM_FPU := -mfpu=fpv4-sp-d16 +FLOAT_ABI := -mfloat-abi=hard #----------------------------------------------------------------------------- # GNU-ARM toolset (NOTE: You need to adjust to your machine) @@ -165,19 +164,19 @@ BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy ############################################################################## -# Typically, you should not need to change anything below this line +# Typically you should not need to change anything below this line -# basic utilities (included in Qtools for Windows), see: -# http://sourceforge.net/projects/qpc/files/Qtools +# basic utilities (included in QTools for Windows), see: +# https://www.state-machine.com/qtools MKDIR := mkdir RM := rm #----------------------------------------------------------------------------- -# build options for various configurations for ARM Cortex-M4F +# build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) @@ -189,11 +188,11 @@ ASFLAGS = $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU) CFLAGS = -c $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ -ffunction-sections -fdata-sections \ - -O1 $(INCLUDES) $(DEFINES) -DNDEBUG + -O2 $(INCLUDES) $(DEFINES) -DNDEBUG CPPFLAGS = -c $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \ -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \ - -O1 $(INCLUDES) $(DEFINES) -DNDEBUG + -O2 $(INCLUDES) $(DEFINES) -DNDEBUG else ifeq (spy, $(CONF)) # Spy configuration ................................ @@ -279,6 +278,8 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ +.PHONY : clean show + # include dependency files only if our goal depends on their existence ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) @@ -287,7 +288,6 @@ ifneq ($(MAKECMDGOALS),clean) endif -.PHONY : clean clean: -$(RM) $(BIN_DIR)/*.o \ $(BIN_DIR)/*.d \ diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qv/gnu/README.txt b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qv/gnu/README.txt index 3ba6f924..18bf7307 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qv/gnu/README.txt +++ b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qv/gnu/README.txt @@ -31,7 +31,7 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M4F projects, due to the support for the hardware FPU (float-abi=hard). *** diff --git a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qxk/gnu/Makefile b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qxk/gnu/Makefile index c6aafdfa..ce1c593c 100644 --- a/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_ek-tm4c123gxl_mpu/qxk/gnu/Makefile @@ -1,7 +1,7 @@ ############################################################################## # Product: Makefile for QP/C++ on EK-TM4C123GXL, QXK kernel, GNU-ARM -# Last Updated for Version: 7.3.0 -# Date of the Last Update: 2023-09-07 +# Last Updated for Version: 7.3.3 +# Date of the Last Update: 2024-01-29 # # Q u a n t u m L e a P s # ------------------------ @@ -56,7 +56,7 @@ PROJECT := dpp-qxk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -137,9 +137,7 @@ LIB_DIRS := LIBS := # defines -DEFINES := \ - -DQP_CONFIG \ - -DTARGET_IS_TM4C123_RB1 +DEFINES := -DQP_CONFIG # ARM CPU, ARCH, FPU, and Float-ABI types... # ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4] @@ -147,8 +145,8 @@ DEFINES := \ # FLOAT_ABI: [ | soft | softfp | hard] # ARM_CPU := -mcpu=cortex-m4 -ARM_FPU := -mfpu=vfp -FLOAT_ABI := -mfloat-abi=softfp +ARM_FPU := -mfpu=fpv4-sp-d16 +FLOAT_ABI := -mfloat-abi=hard #----------------------------------------------------------------------------- # GNU-ARM toolset (NOTE: You need to adjust to your machine) @@ -169,6 +167,7 @@ AS := $(GNU_ARM)/bin/arm-none-eabi-as LINK := $(GNU_ARM)/bin/arm-none-eabi-g++ BIN := $(GNU_ARM)/bin/arm-none-eabi-objcopy + ############################################################################## # Typically you should not need to change anything below this line @@ -182,7 +181,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) @@ -259,14 +258,8 @@ endif # rules # -.PHONY : run norun flash clean show - -ifeq ($(MAKECMDGOALS),norun) -all : $(TARGET_BIN) -norun : all -else -all : $(TARGET_BIN) run -endif +all: $(TARGET_BIN) +#all: $(TARGET_ELF) $(TARGET_BIN): $(TARGET_ELF) $(BIN) -O binary $< $@ @@ -290,6 +283,8 @@ $(BIN_DIR)/%.o : %.c $(BIN_DIR)/%.o : %.cpp $(CPP) $(CPPFLAGS) $< -o $@ +.PHONY : clean show + # include dependency files only if our goal depends on their existence ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),show) diff --git a/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm b/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm index 917b13a7..1de2b108 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm +++ b/examples/arm-cm/dpp_mbed-lpc1768/dpp.qm @@ -258,7 +258,7 @@ for (std::uint8_t n = 0U; n < N_PHILO; ++n) { - // give permissions to eat... + // give permissions to eat... for (std::uint8_t n = 0U; n < N_PHILO; ++n) { if (m_isHungry[n] && (m_fork[left(n)] == FREE) diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.cpp b/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.cpp index 9ed44a30..be36a0d2 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.cpp +++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/bsp.cpp @@ -487,7 +487,7 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set? return QS_tickTime_ - (QSTimeCtr)SysTick->VAL; } - else { // the rollover occured, but the SysTick_ISR did not run yet + else { // the rollover occurred, but the SysTick_ISR did not run yet return QS_tickTime_ + QS_tickPeriod_ - (QSTimeCtr)SysTick->VAL; } } diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile b/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile index a7425b8d..351df854 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_mbed-lpc1768/qk/gnu/Makefile @@ -57,7 +57,7 @@ PROJECT := dpp-qk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -177,7 +177,7 @@ RM := rm # build options for various configurations for ARM Cortex-M4F # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.cpp b/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.cpp index b402f601..f3839263 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.cpp +++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/bsp.cpp @@ -476,7 +476,7 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set? return QS_tickTime_ - (QSTimeCtr)SysTick->VAL; } - else { // the rollover occured, but the SysTick_ISR did not run yet + else { // the rollover occurred, but the SysTick_ISR did not run yet return QS_tickTime_ + QS_tickPeriod_ - (QSTimeCtr)SysTick->VAL; } } diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile b/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile index 7c911490..25c24d96 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile +++ b/examples/arm-cm/dpp_mbed-lpc1768/qv/gnu/Makefile @@ -57,7 +57,7 @@ PROJECT := dpp-qv # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -177,7 +177,7 @@ RM := rm # build options for various configurations for ARM Cortex-M4F # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qxk/bsp.cpp b/examples/arm-cm/dpp_mbed-lpc1768/qxk/bsp.cpp index eb2b6fea..5a318f17 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qxk/bsp.cpp +++ b/examples/arm-cm/dpp_mbed-lpc1768/qxk/bsp.cpp @@ -501,7 +501,7 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0) { // not set? return QS_tickTime_ - (QSTimeCtr)SysTick->VAL; } - else { // the rollover occured, but the SysTick_ISR did not run yet + else { // the rollover occurred, but the SysTick_ISR did not run yet return QS_tickTime_ + QS_tickPeriod_ - (QSTimeCtr)SysTick->VAL; } } diff --git a/examples/arm-cm/dpp_mbed-lpc1768/qxk/gnu/Makefile b/examples/arm-cm/dpp_mbed-lpc1768/qxk/gnu/Makefile index c42dace1..5792a4d2 100644 --- a/examples/arm-cm/dpp_mbed-lpc1768/qxk/gnu/Makefile +++ b/examples/arm-cm/dpp_mbed-lpc1768/qxk/gnu/Makefile @@ -56,7 +56,7 @@ PROJECT := dpp-qxk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -181,7 +181,7 @@ RM := rm # build options for various configurations for ARM Cortex-M4F # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/dpp_nucleo-c031c6/dpp.qm b/examples/arm-cm/dpp_nucleo-c031c6/dpp.qm index 917b13a7..1de2b108 100644 --- a/examples/arm-cm/dpp_nucleo-c031c6/dpp.qm +++ b/examples/arm-cm/dpp_nucleo-c031c6/dpp.qm @@ -258,7 +258,7 @@ for (std::uint8_t n = 0U; n < N_PHILO; ++n) { - // give permissions to eat... + // give permissions to eat... for (std::uint8_t n = 0U; n < N_PHILO; ++n) { if (m_isHungry[n] && (m_fork[left(n)] == FREE) diff --git a/examples/arm-cm/dpp_nucleo-c031c6/qk/armclang/README.txt b/examples/arm-cm/dpp_nucleo-c031c6/qk/armclang/README.txt index 946a6967..93065fc2 100644 --- a/examples/arm-cm/dpp_nucleo-c031c6/qk/armclang/README.txt +++ b/examples/arm-cm/dpp_nucleo-c031c6/qk/armclang/README.txt @@ -23,7 +23,7 @@ command-line options for the ARM assembler (see the Asm tab in the "Options for Target" dialog box in uVision). Specifically, you should define symbols: Stack_Size=xxx Heap_Size=yyy, where xxx represents a numerical value of stack size and yyy the -numberical value of the heap size. +numerical value of the heap size. Selecting QK Exception diff --git a/examples/arm-cm/dpp_nucleo-c031c6/qk/bsp.cpp b/examples/arm-cm/dpp_nucleo-c031c6/qk/bsp.cpp index 1f9c0caf..602864fa 100644 --- a/examples/arm-cm/dpp_nucleo-c031c6/qk/bsp.cpp +++ b/examples/arm-cm/dpp_nucleo-c031c6/qk/bsp.cpp @@ -470,7 +470,7 @@ QSTimeCtr onGetTime() { // NOTE: invoked with interrupts DISABLED if ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0U) { // not set? return QS_tickTime_ - (QSTimeCtr)SysTick->VAL; } - else { // the rollover occured, but the SysTick_ISR did not run yet + else { // the rollover occurred, but the SysTick_ISR did not run yet return QS_tickTime_ + QS_tickPeriod_ - (QSTimeCtr)SysTick->VAL; } } diff --git a/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/Makefile b/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/Makefile index 7a8f17f6..76706712 100644 --- a/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/Makefile +++ b/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/Makefile @@ -56,7 +56,7 @@ PROJECT := dpp-qk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -178,7 +178,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/Makefile-cpp20 b/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/Makefile-cpp20 index 33d96ba1..6ccec649 100644 --- a/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/Makefile-cpp20 +++ b/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/Makefile-cpp20 @@ -56,7 +56,7 @@ PROJECT := dpp-qk # project directories # -# location of the QP/C++ framework (if not provided in an environemnt var.) +# location of the QP/C++ framework (if not provided in an environment var.) ifeq ($(QPCPP),) QPCPP := ../../../../.. endif @@ -178,7 +178,7 @@ RM := rm # build options for various configurations for ARM Cortex-M # -# combine all the soruces... +# combine all the sources... CPP_SRCS += $(QP_SRCS) ASM_SRCS += $(QP_ASMS) diff --git a/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/README.txt b/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/README.txt index d3fb3164..c3e5015c 100644 --- a/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/README.txt +++ b/examples/arm-cm/dpp_nucleo-c031c6/qk/gnu/README.txt @@ -31,7 +31,7 @@ to be adjusted in the provided Makefile, by editing the symbol: GNU_ARM. As described in the comment for this symbol, the GNU-ARM toolset is taken from: http://gnutoolchains.com/arm-eabi -It is highly recommened to use the same GNU-ARM distribution, especially +It is highly recommended to use the same GNU-ARM distribution, especially for ARM Cortex-M projects, due to the support for the hardware FPU (float-abi=hard). *** diff --git a/examples/arm-cm/dpp_nucleo-c031c6/qk/iar/dpp-qk.ewp b/examples/arm-cm/dpp_nucleo-c031c6/qk/iar/dpp-qk.ewp index d782042f..7bbccf8a 100644 --- a/examples/arm-cm/dpp_nucleo-c031c6/qk/iar/dpp-qk.ewp +++ b/examples/arm-cm/dpp_nucleo-c031c6/qk/iar/dpp-qk.ewp @@ -16,7 +16,7 @@ 1