This commit is contained in:
QL 2018-05-10 14:38:41 -04:00
parent feb55738fe
commit a65454bb49
40 changed files with 3532 additions and 2612 deletions

View File

@ -1,5 +1,5 @@
::============================================================================ ::============================================================================
:: Batch file to load the Game program to the flash of EFM32-SLSTK3401A board :: Batch file to program the flash of EFM32-SLSTK3401A board
:: ::
:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: :: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see:
:: https://www.segger.com/j-link-commander.html :: https://www.segger.com/j-link-commander.html
@ -9,22 +9,23 @@ setlocal
@echo off @echo off
@echo Load a given binary file to the flash of EFM32-SLSTK3401A @echo Load a given binary file to the flash of EFM32-SLSTK3401A
@echo usage: flash bin-file @echo usage: flash bin-file
@echo example: flash dbg\blinky-qk.bin
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: JLink utility on your machine :: JLink utility on your machine
:: ::
if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink
if NOT exist "%JLINK%\JLink.exe" ( if not exist "%JLINK%\JLink.exe" (
@echo The JLink tool not found. Please adjust flash.bat @echo The JLink tool not found. Please adjust flash.bat
@goto end @goto end
) )
if [%1] EQU [] ( if ["%~1"]==[""] (
@echo binary file missing @echo The binary file missing
@goto end @goto end
) )
if NOT exist "%1" ( if not exist %~s1 (
@echo The binary file '%1' does not exist @echo The binary file '%1' does not exist
@goto end @goto end
) )

View File

@ -1,5 +1,5 @@
::============================================================================ ::============================================================================
:: Batch file to load the Game program to the flash of EFM32-SLSTK3401A board :: Batch file to program the flash of EFM32-SLSTK3401A board
:: ::
:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: :: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see:
:: https://www.segger.com/j-link-commander.html :: https://www.segger.com/j-link-commander.html
@ -9,22 +9,23 @@ setlocal
@echo off @echo off
@echo Load a given binary file to the flash of EFM32-SLSTK3401A @echo Load a given binary file to the flash of EFM32-SLSTK3401A
@echo usage: flash bin-file @echo usage: flash bin-file
@echo example: flash dbg\blinky-qk.bin
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: JLink utility on your machine :: JLink utility on your machine
:: ::
if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink
if NOT exist "%JLINK%\JLink.exe" ( if not exist "%JLINK%\JLink.exe" (
@echo The JLink tool not found. Please adjust flash.bat @echo The JLink tool not found. Please adjust flash.bat
@goto end @goto end
) )
if [%1] EQU [] ( if ["%~1"]==[""] (
@echo binary image missing @echo The binary file missing
@goto end @goto end
) )
if NOT exist "%1" ( if not exist %~s1 (
@echo The binary file '%1' does not exist @echo The binary file '%1' does not exist
@goto end @goto end
) )

View File

@ -1,34 +1,33 @@
::============================================================================ ::============================================================================
:: Batch file to load the Blinky program to the flash of EK-TM4C123GXL :: Batch file to program the flash of EK-TM4C123GXL
:: (equivalent to EK-LM4F120XL)
:: ::
:: NOTE: requires the LMFlash programmer from Texas Instruments, see: :: NOTE: requires the LMFlash programmer (included in QTools for Windows)
:: http://www.ti.com/tool/LMFLASHPROGRAMMER
:: ::
@echo off @echo off
setlocal setlocal
@echo Load the program to the flash of EK-TM4C123GXL @echo Load a given binary file to the flash of EK-TM4C123GXL
@echo usage: flash @echo usage: flash binary-file
@echo usage: flash rel @echo example: flash dbg\blinky-qk.bin
@echo usage: flash spy
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
:: LMFlash utility on your machine :: be found on the PATH. You might need to adjust this symbol to the
:: location of the LMFlash utility on your machine
:: ::
set LMFLASH=%QTOOLS%\..\LM_Flash_Programmer\LMFlash.exe set LMFLASH=LMFlash.exe
:: set the build directory depending on the first parameter %1 if ["%~1"]==[""] (
set BUILD_DIR=dbg @echo The binary file missing
if [%1] NEQ [] set BUILD_DIR=%1 @goto end
@echo on )
if not exist %~s1 (
@echo The binary file '%1' does not exist
@goto end
)
%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\blinky-qk.bin %LMFLASH% -q ek-tm4c123gxl -e -v -r %1
@echo. :end
@echo.
@echo Reset the target to start running your program!
@echo off
endlocal endlocal

View File

@ -1,34 +1,33 @@
::============================================================================ ::============================================================================
:: Batch file to load the Blinky program to the flash of EK-TM4C123GXL :: Batch file to program the flash of EK-TM4C123GXL
:: (equivalent to EK-LM4F120XL)
:: ::
:: NOTE: requires the LMFlash programmer from Texas Instruments, see: :: NOTE: requires the LMFlash programmer (included in QTools for Windows)
:: http://www.ti.com/tool/LMFLASHPROGRAMMER
:: ::
@echo off @echo off
setlocal setlocal
@echo Load the program to the flash of EK-TM4C123GXL @echo Load a given binary file to the flash of EK-TM4C123GXL
@echo usage: flash @echo usage: flash binary-file
@echo usage: flash rel @echo example: flash dbg\blinky-qk.bin
@echo usage: flash spy
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
:: LMFlash utility on your machine :: be found on the PATH. You might need to adjust this symbol to the
:: location of the LMFlash utility on your machine
:: ::
set LMFLASH=%QTOOLS%\..\LM_Flash_Programmer\LMFlash.exe set LMFLASH=LMFlash.exe
:: set the build directory depending on the first parameter %1 if ["%~1"]==[""] (
set BUILD_DIR=dbg @echo The binary file missing
if [%1] NEQ [] set BUILD_DIR=%1 @goto end
@echo on )
if not exist %~s1 (
@echo The binary file '%1' does not exist
@goto end
)
%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\blinky-qv.bin %LMFLASH% -q ek-tm4c123gxl -e -v -r %1
@echo. :end
@echo.
@echo Reset the target to start running your program!
@echo off
endlocal endlocal

View File

@ -1,5 +1,5 @@
::============================================================================ ::============================================================================
:: Batch file to load the Game program to the flash of EFM32-SLSTK3401A board :: Batch file to program the flash of EFM32-SLSTK3401A board
:: ::
:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: :: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see:
:: https://www.segger.com/j-link-commander.html :: https://www.segger.com/j-link-commander.html
@ -9,22 +9,23 @@ setlocal
@echo off @echo off
@echo Load a given binary file to the flash of EFM32-SLSTK3401A @echo Load a given binary file to the flash of EFM32-SLSTK3401A
@echo usage: flash bin-file @echo usage: flash bin-file
@echo example: flash dbg\blinky-qk.bin
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: JLink utility on your machine :: JLink utility on your machine
:: ::
if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink
if NOT exist "%JLINK%\JLink.exe" ( if not exist "%JLINK%\JLink.exe" (
@echo The JLink tool not found. Please adjust flash.bat @echo The JLink tool not found. Please adjust flash.bat
@goto end @goto end
) )
if [%1] EQU [] ( if ["%~1"]==[""] (
@echo binary file missing @echo The binary file missing
@goto end @goto end
) )
if NOT exist "%1" ( if not exist %~s1 (
@echo The binary file '%1' does not exist @echo The binary file '%1' does not exist
@goto end @goto end
) )

View File

@ -1,5 +1,5 @@
::============================================================================ ::============================================================================
:: Batch file to load the Game program to the flash of EFM32-SLSTK3401A board :: Batch file to program the flash of EFM32-SLSTK3401A board
:: ::
:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: :: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see:
:: https://www.segger.com/j-link-commander.html :: https://www.segger.com/j-link-commander.html
@ -9,22 +9,23 @@ setlocal
@echo off @echo off
@echo Load a given binary file to the flash of EFM32-SLSTK3401A @echo Load a given binary file to the flash of EFM32-SLSTK3401A
@echo usage: flash bin-file @echo usage: flash bin-file
@echo example: flash dbg\blinky-qk.bin
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: JLink utility on your machine :: JLink utility on your machine
:: ::
if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink
if NOT exist "%JLINK%\JLink.exe" ( if not exist "%JLINK%\JLink.exe" (
@echo The JLink tool not found. Please adjust flash.bat @echo The JLink tool not found. Please adjust flash.bat
@goto end @goto end
) )
if [%1] EQU [] ( if ["%~1"]==[""] (
@echo binary image missing @echo The binary file missing
@goto end @goto end
) )
if NOT exist "%1" ( if not exist %~s1 (
@echo The binary file '%1' does not exist @echo The binary file '%1' does not exist
@goto end @goto end
) )

View File

@ -1,5 +1,5 @@
::============================================================================ ::============================================================================
:: Batch file to load the Game program to the flash of EFM32-SLSTK3401A board :: Batch file to program the flash of EFM32-SLSTK3401A board
:: ::
:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: :: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see:
:: https://www.segger.com/j-link-commander.html :: https://www.segger.com/j-link-commander.html
@ -9,22 +9,23 @@ setlocal
@echo off @echo off
@echo Load a given binary file to the flash of EFM32-SLSTK3401A @echo Load a given binary file to the flash of EFM32-SLSTK3401A
@echo usage: flash bin-file @echo usage: flash bin-file
@echo example: flash dbg\blinky-qk.bin
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: JLink utility on your machine :: JLink utility on your machine
:: ::
if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink
if NOT exist "%JLINK%\JLink.exe" ( if not exist "%JLINK%\JLink.exe" (
@echo The JLink tool not found. Please adjust flash.bat @echo The JLink tool not found. Please adjust flash.bat
@goto end @goto end
) )
if [%1] EQU [] ( if ["%~1"]==[""] (
@echo binary image missing @echo The binary file missing
@goto end @goto end
) )
if NOT exist "%1" ( if not exist %~s1 (
@echo The binary file '%1' does not exist @echo The binary file '%1' does not exist
@goto end @goto end
) )

View File

@ -1,34 +1,33 @@
::============================================================================ ::============================================================================
:: Batch file to load the DPP program to the flash of EK-TM4C123GXL :: Batch file to program the flash of EK-TM4C123GXL
:: (equivalent to EK-LM4F120XL)
:: ::
:: NOTE: requires the LMFlash programmer from Texas Instruments, see: :: NOTE: requires the LMFlash programmer (included in QTools for Windows)
:: http://www.ti.com/tool/LMFLASHPROGRAMMER
:: ::
@echo off @echo off
setlocal setlocal
@echo Load the program to the flash of EK-TM4C123GXL @echo Load a given binary file to the flash of EK-TM4C123GXL
@echo usage: flash @echo usage: flash binary-file
@echo usage: flash rel @echo example: flash dbg\blinky-qk.bin
@echo usage: flash spy
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
:: LMFlash utility on your machine :: be found on the PATH. You might need to adjust this symbol to the
:: location of the LMFlash utility on your machine
:: ::
set LMFLASH=%QTOOLS%\..\LM_Flash_Programmer\LMFlash.exe set LMFLASH=LMFlash.exe
:: set the build directory depending on the first parameter %1 if ["%~1"]==[""] (
set BUILD_DIR=dbg @echo The binary file missing
if [%1] NEQ [] set BUILD_DIR=%1 @goto end
@echo on )
if not exist %~s1 (
@echo The binary file '%1' does not exist
@goto end
)
%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\dpp-qk.bin %LMFLASH% -q ek-tm4c123gxl -e -v -r %1
@echo. :end
@echo.
@echo Reset the target to start running your program!
@echo off
endlocal endlocal

View File

@ -1,34 +1,33 @@
::============================================================================ ::============================================================================
:: Batch file to load the DPP program to the flash of EK-TM4C123GXL :: Batch file to program the flash of EK-TM4C123GXL
:: (equivalent to EK-LM4F120XL)
:: ::
:: NOTE: requires the LMFlash programmer from Texas Instruments, see: :: NOTE: requires the LMFlash programmer (included in QTools for Windows)
:: http://www.ti.com/tool/LMFLASHPROGRAMMER
:: ::
@echo off @echo off
setlocal setlocal
@echo Load the program to the flash of EK-TM4C123GXL @echo Load a given binary file to the flash of EK-TM4C123GXL
@echo usage: flash @echo usage: flash binary-file
@echo usage: flash rel @echo example: flash dbg\blinky-qk.bin
@echo usage: flash spy
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
:: LMFlash utility on your machine :: be found on the PATH. You might need to adjust this symbol to the
:: location of the LMFlash utility on your machine
:: ::
set LMFLASH=%QTOOLS%\..\LM_Flash_Programmer\LMFlash.exe set LMFLASH=LMFlash.exe
:: set the build directory depending on the first parameter %1 if ["%~1"]==[""] (
set BUILD_DIR=dbg @echo The binary file missing
if [%1] NEQ [] set BUILD_DIR=%1 @goto end
@echo on )
if not exist %~s1 (
@echo The binary file '%1' does not exist
@goto end
)
%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\dpp-qv.bin %LMFLASH% -q ek-tm4c123gxl -e -v -r %1
@echo. :end
@echo.
@echo Reset the target to start running your program!
@echo off
endlocal endlocal

View File

@ -1,34 +1,33 @@
::============================================================================ ::============================================================================
:: Batch file to load the DPP program to the flash of EK-TM4C123GXL :: Batch file to program the flash of EK-TM4C123GXL
:: (equivalent to EK-LM4F120XL)
:: ::
:: NOTE: requires the LMFlash programmer from Texas Instruments, see: :: NOTE: requires the LMFlash programmer (included in QTools for Windows)
:: http://www.ti.com/tool/LMFLASHPROGRAMMER
:: ::
@echo off @echo off
setlocal setlocal
@echo Load the program to the flash of EK-TM4C123GXL @echo Load a given binary file to the flash of EK-TM4C123GXL
@echo usage: flash @echo usage: flash binary-file
@echo usage: flash rel @echo example: flash dbg\blinky-qk.bin
@echo usage: flash spy
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
:: LMFlash utility on your machine :: be found on the PATH. You might need to adjust this symbol to the
:: location of the LMFlash utility on your machine
:: ::
set LMFLASH=%QTOOLS%\..\LM_Flash_Programmer\LMFlash.exe set LMFLASH=LMFlash.exe
:: set the build directory depending on the first parameter %1 if ["%~1"]==[""] (
set BUILD_DIR=dbg @echo The binary file missing
if [%1] NEQ [] set BUILD_DIR=%1 @goto end
@echo on )
if not exist %~s1 (
@echo The binary file '%1' does not exist
@goto end
)
%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\dpp-qxk.bin %LMFLASH% -q ek-tm4c123gxl -e -v -r %1
@echo. :end
@echo.
@echo Reset the target to start running your program!
@echo off
endlocal endlocal

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -1,5 +1,5 @@
::============================================================================ ::============================================================================
:: Batch file to load the Game program to the flash of EFM32-SLSTK3401A board :: Batch file to program the flash of EFM32-SLSTK3401A board
:: ::
:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: :: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see:
:: https://www.segger.com/j-link-commander.html :: https://www.segger.com/j-link-commander.html
@ -9,22 +9,23 @@ setlocal
@echo off @echo off
@echo Load a given binary file to the flash of EFM32-SLSTK3401A @echo Load a given binary file to the flash of EFM32-SLSTK3401A
@echo usage: flash bin-file @echo usage: flash bin-file
@echo example: flash dbg\blinky-qk.bin
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: JLink utility on your machine :: JLink utility on your machine
:: ::
if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink
if NOT exist "%JLINK%\JLink.exe" ( if not exist "%JLINK%\JLink.exe" (
@echo The JLink tool not found. Please adjust flash.bat @echo The JLink tool not found. Please adjust flash.bat
@goto end @goto end
) )
if [%1] EQU [] ( if ["%~1"]==[""] (
@echo binary image missing @echo The binary file missing
@goto end @goto end
) )
if NOT exist "%1" ( if not exist %~s1 (
@echo The binary file '%1' does not exist @echo The binary file '%1' does not exist
@goto end @goto end
) )

View File

@ -1,5 +1,5 @@
::============================================================================ ::============================================================================
:: Batch file to load the Game program to the flash of EFM32-SLSTK3401A board :: Batch file to program the flash of EFM32-SLSTK3401A board
:: ::
:: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see: :: NOTE: requires the J-Link commander (JLink.exe) from SEGGER, see:
:: https://www.segger.com/j-link-commander.html :: https://www.segger.com/j-link-commander.html
@ -9,22 +9,23 @@ setlocal
@echo off @echo off
@echo Load a given binary file to the flash of EFM32-SLSTK3401A @echo Load a given binary file to the flash of EFM32-SLSTK3401A
@echo usage: flash bin-file @echo usage: flash bin-file
@echo example: flash dbg\blinky-qk.bin
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: JLink utility on your machine :: JLink utility on your machine
:: ::
if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink if [%JLINK%] EQU [] set JLINK=%QTOOLS%\..\JLink
if NOT exist "%JLINK%\JLink.exe" ( if not exist "%JLINK%\JLink.exe" (
@echo The JLink tool not found. Please adjust flash.bat @echo The JLink tool not found. Please adjust flash.bat
@goto end @goto end
) )
if [%1] EQU [] ( if ["%~1"]==[""] (
@echo binary image missing @echo The binary file missing
@goto end @goto end
) )
if NOT exist "%1" ( if not exist %~s1 (
@echo The binary file '%1' does not exist @echo The binary file '%1' does not exist
@goto end @goto end
) )

View File

@ -1,34 +1,33 @@
::============================================================================ ::============================================================================
:: Batch file to load the DPP program to the flash of EK-TM4C123GXL :: Batch file to program to the flash of EK-TM4C123GXL
:: (equivalent to EK-LM4F120XL)
:: ::
:: NOTE: requires the LMFlash programmer from Texas Instruments, see: :: NOTE: requires the LMFlash programmer (included in QTools for Windows)
:: http://www.ti.com/tool/LMFLASHPROGRAMMER
:: ::
@echo off @echo off
setlocal setlocal
@echo Load the program to the flash of EK-TM4C123GXL @echo Load a given binary file to the flash of EK-TM4C123GXL
@echo usage: flash @echo usage: flash binary-file
@echo usage: flash rel @echo example: flash dbg\blinky-qk.bin
@echo usage: flash spy
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
:: LMFlash utility on your machine :: be found on the PATH. You might need to adjust this symbol to the
:: location of the LMFlash utility on your machine
:: ::
set LMFLASH=C:\tools\TI\LM_Flash_Programmer\LMFlash.exe set LMFLASH=LMFlash.exe
:: set the build directory depending on the first parameter %1 if ["%~1"]==[""] (
set BUILD_DIR=dbg @echo The binary file missing
if [%1] NEQ [] set BUILD_DIR=%1 @goto end
@echo on )
if not exist %~s1 (
@echo The binary file '%1' does not exist
@goto end
)
%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\dpp.bin %LMFLASH% -q ek-tm4c123gxl -e -v -r %1
@echo. :end
@echo.
@echo Reset the target to start running your program!
@echo off
endlocal endlocal

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -14,7 +14,7 @@ setlocal
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: Adjust the following symbol to the location of the
:: LMFlash utility on your machine :: STLINK utility on your machine
:: ::
set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe" set STLINK="C:\tools\ST\ST-LINK\ST-LINK Utility\ST-LINK_CLI.exe"

View File

@ -1,34 +1,32 @@
::============================================================================ ::============================================================================
:: Batch file to load the program to the flash of EK-LM3S6965 :: Batch file to program to the flash of EK-LM3S6965
:: ::
:: NOTE: requires the LMFlash programmer from Texas Instruments, see: :: NOTE: requires the LMFlash programmer (included in QTools for Windows)
:: http://www.ti.com/tool/LMFLASHPROGRAMMER
:: ::
@echo off
setlocal setlocal
@echo off @echo Load a given binary file to the flash of EK-LM3S6965
@echo Load the program to the flash of EK-LM3S6965 @echo usage: flash binary-file
@echo usage: flash @echo example: flash dbg\blinky-qk.bin
@echo usage: flash rel
@echo usage: flash spy
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
:: LMFlash utility on your machine :: be found on the PATH. You might need to adjust this symbol to the
:: location of the LMFlash utility on your machine
:: ::
set LMFLASH=%QTOOLS%\..\LM_Flash_Programmer\LMFlash.exe set LMFLASH=LMFlash.exe
if NOT exist "%LMFLASH%" ( if ["%~1"]==[""] (
@echo The LMFLASH utility not found. Please adjust flash.bat @echo The binary file missing
goto end @goto end
)
if not exist %~s1 (
@echo The binary file '%1' does not exist
@goto end
) )
:: set the build directory depending on the first parameter %1 %LMFLASH% -q ek-lm3s6965 -e -v -r %1
set BUILD_DIR=dbg
if [%1] NEQ [] set BUILD_DIR=%1
@echo on
%LMFLASH% -q ek-lm3s6965 %BUILD_DIR%\lwip-qk.bin
:end :end

View File

@ -1,34 +1,32 @@
::============================================================================ ::============================================================================
:: Batch file to load the program to the flash of EK-LM3S6965 :: Batch file to program to the flash of EK-LM3S6965
:: ::
:: NOTE: requires the LMFlash programmer from Texas Instruments, see: :: NOTE: requires the LMFlash programmer (included in QTools for Windows)
:: http://www.ti.com/tool/LMFLASHPROGRAMMER
:: ::
@echo off
setlocal setlocal
@echo off @echo Load a given binary file to the flash of EK-LM3S6965
@echo Load the program to the flash of EK-LM3S6965 @echo usage: flash binary-file
@echo usage: flash @echo example: flash dbg\blinky-qk.bin
@echo usage: flash rel
@echo usage: flash spy
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
:: LMFlash utility on your machine :: be found on the PATH. You might need to adjust this symbol to the
:: location of the LMFlash utility on your machine
:: ::
set LMFLASH=%QTOOLS%\..\LM_Flash_Programmer\LMFlash.exe set LMFLASH=LMFlash.exe
if NOT exist "%LMFLASH%" ( if ["%~1"]==[""] (
@echo The LMFLASH utility not found. Please adjust flash.bat @echo The binary file missing
goto end @goto end
)
if not exist %~s1 (
@echo The binary file '%1' does not exist
@goto end
) )
:: set the build directory depending on the first parameter %1 %LMFLASH% -q ek-lm3s6965 -e -v -r %1
set BUILD_DIR=dbg
if [%1] NEQ [] set BUILD_DIR=%1
@echo on
%LMFLASH% -q ek-lm3s6965 %BUILD_DIR%\lwip-qv.bin
:end :end

View File

@ -1,7 +1,7 @@
############################################################################## ##############################################################################
# Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM # Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM
# Last Updated for Version: 6.2.0 # Last Updated for Version: 6.3.0
# Date of the Last Update: 2018-04-13 # Date of the Last Update: 2018-05-10
# #
# Q u a n t u m L e a P s # Q u a n t u m L e a P s
# --------------------------- # ---------------------------
@ -42,7 +42,7 @@
# NOTE: # NOTE:
# To use this Makefile on Windows, you will need the GNU make utility, which # To use this Makefile on Windows, you will need the GNU make utility, which
# is included in the Qtools collection for Windows, see: # is included in the Qtools collection for Windows, see:
# http://sourceforge.net/projects/qpc/files/Qtools/ # http://sourceforge.net/projects/qpc/files/QTools/
# #
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -174,16 +174,12 @@ LINK := $(GNU_ARM)/bin/arm-eabi-gcc
BIN := $(GNU_ARM)/bin/arm-eabi-objcopy BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# LMFLASH toolset (NOTE: You need to adjust to your machine) # NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
# see http://www.ti.com/tool/lmflashprogrammer # be found on the PATH. You might need to adjust this symbol to the
# location of the LMFlash utility on your machine
# #
ifeq ($(LMFLASH),) ifeq ($(LMFLASH),)
LMFLASH := $(QTOOLS)/../LM_Flash_Programmer/LMFlash.exe LMFLASH := LMFlash.exe
endif
# make sure that the LMFLASH tool exists...
ifeq ("$(wildcard $(LMFLASH))","")
$(error LMFLASH tool not found. Please adjust the Makefile)
endif endif
@ -261,9 +257,7 @@ endif
$(TARGET_BIN) : $(TARGET_ELF) $(TARGET_BIN) : $(TARGET_ELF)
$(BIN) -O binary $< $@ $(BIN) -O binary $< $@
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN) $(LMFLASH) -q ek-tm4c123gxl $@
echo Press RESET button on the EK-TM4C123GXL board
@pause
$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
$(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o $(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o
@ -271,9 +265,9 @@ $(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
flash : flash :
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN) $(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN)
echo Press RESET button on the EK-TM4C123GXL board
run : $(TARGET_BIN) run : $(TARGET_BIN)
$(LMFLASH) -q ek-tm4c123gxl -c $(TARGET_BIN)
$(TCLSH) $(QUTEST) $(TESTS) "" $(HOST) $(TCLSH) $(QUTEST) $(TESTS) "" $(HOST)
$(BIN_DIR)/%.d : %.c $(BIN_DIR)/%.d : %.c

View File

@ -0,0 +1,315 @@
##############################################################################
# Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM
# Last Updated for Version: 6.3.0
# Date of the Last Update: 2018-05-10
#
# Q u a n t u m L e a P s
# ---------------------------
# innovating embedded systems
#
# Copyright (C) 2005-2018 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:
# https://www.state-machine.com
# mailto:info@state-machine.com
##############################################################################
#
# examples of invoking this Makefile:
# make -fek-tm4c123gxl.mak # make and run the tests in the current directory
# make -fek-tm4c123gxl.mak TESTS=philo*.tcl # make and run the selected tests
# make -fek-tm4c123gxl.mak HOST=localhost:7705 # connect to host:port
# make -fek-tm4c123gxl.mak norun # only make but not run the tests
# make -fek-tm4c123gxl.mak clean # cleanup the build
#
# 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, binary output directory
#
PROJECT := test_defer
TARGET := ek-tm4c123gxl
#-----------------------------------------------------------------------------
# project directories
#
# location of the QP/C framework (if not provided in an environemnt var.)
ifeq ($(QPC),)
QPC := ../../..
endif
# location of the QTOOLS directory (if not provided in an environemnt var.)
ifeq ($(QTOOLS),)
QTOOLS := c:/qp/qtools
endif
# QP port used in this project
QP_PORT_DIR := $(QPC)/ports/arm-cm/qutest
# list of all source directories used by this project
VPATH = \
../$(TARGET) \
$(QPC)/src/qf \
$(QPC)/src/qs \
$(QP_PORT_DIR) \
$(QPC)/3rd_party/ek-tm4c123gxl \
$(QPC)/3rd_party/ek-tm4c123gxl/gnu
# list of all include directories needed by this project
INCLUDES = \
-I. \
-I../$(TARGET) \
-I$(QPC)/include \
-I$(QPC)/src \
-I$(QP_PORT_DIR) \
-I$(QPC)/3rd_party/CMSIS/Include \
-I$(QPC)/3rd_party/ek-tm4c123gxl
#-----------------------------------------------------------------------------
# files
#
# assembler source files
ASM_SRCS :=
# C source files
C_SRCS := \
test_defer.c \
defer.c \
system_TM4C123GH6PM.c \
startup_TM4C123GH6PM.c
# C++ source files
CPP_SRCS :=
OUTPUT := $(PROJECT)
LD_SCRIPT := ../$(TARGET)/test.ld
QP_SRCS := \
qep_hsm.c \
qep_msm.c \
qf_act.c \
qf_actq.c \
qf_defer.c \
qf_dyn.c \
qf_mem.c \
qf_ps.c \
qf_qact.c \
qf_qeq.c \
qf_qmact.c \
qs.c \
qs_64bit.c \
qs_rx.c \
qs_fp.c \
qutest.c \
qutest_port.c
QP_ASMS :=
LIB_DIRS :=
LIBS :=
# defines
DEFINES := -DTARGET_IS_TM4C123_RB1
# ARM CPU, ARCH, FPU, and Float-ABI types...
# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4]
# ARM_ARCH: [6 | 7] (NOTE: must match ARM_CPU!)
# ARM_FPU: [ | vfp]
# FLOAT_ABI: [ | soft | softfp | hard]
#
ARM_CPU := -mcpu=cortex-m4
ARM_ARCH := 7 # NOTE: must match the ARM_CPU!
ARM_FPU := -mfpu=vfp
FLOAT_ABI := -mfloat-abi=softfp
#-----------------------------------------------------------------------------
# GNU-ARM toolset (NOTE: You need to adjust to your machine)
# see http://gnutoolchains.com/arm-eabi/
#
ifeq ($(GNU_ARM),)
GNU_ARM := $(QTOOLS)/gnu_arm-eabi
endif
# make sure that the GNU-ARM toolset exists...
ifeq ("$(wildcard $(GNU_ARM))","")
$(error GNU_ARM toolset not found. Please adjust the Makefile)
endif
CC := $(GNU_ARM)/bin/arm-eabi-gcc
CPP := $(GNU_ARM)/bin/arm-eabi-g++
AS := $(GNU_ARM)/bin/arm-eabi-as
LINK := $(GNU_ARM)/bin/arm-eabi-gcc
BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
#-----------------------------------------------------------------------------
# NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
# be found on the PATH. You might need to adjust this symbol to the
# location of the LMFlash utility on your machine
#
ifeq ($(LMFLASH),)
LMFLASH := LMFlash.exe
endif
##############################################################################
# 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
MKDIR := mkdir
RM := rm
TCLSH := tclsh
QUTEST := $(QTOOLS)/qspy/tcl/qutest.tcl
#-----------------------------------------------------------------------------
# build options
#
# combine all the soruces...
C_SRCS += $(QP_SRCS)
ASM_SRCS += $(QP_ASMS)
BIN_DIR := $(TARGET)
ASFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU)
CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
-ffunction-sections -fdata-sections \
-O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST
CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \
-O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST
LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
-mthumb -nostdlib \
-Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
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))
# create $(BIN_DIR) if it does not exist
ifeq ("$(wildcard $(BIN_DIR))","")
$(shell $(MKDIR) $(BIN_DIR))
endif
#-----------------------------------------------------------------------------
# rules
#
.PHONY : run norun flash
ifeq ($(MAKECMDGOALS),norun)
all : $(TARGET_BIN)
norun : all
else
all : $(TARGET_BIN) run
endif
ifeq (, $(TESTS))
TESTS := *.tcl
endif
$(TARGET_BIN) : $(TARGET_ELF)
$(BIN) -O binary $< $@
$(LMFLASH) -q ek-tm4c123gxl $@
$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
$(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o
$(LINK) $(LINKFLAGS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS)
flash :
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN)
run : $(TARGET_BIN)
$(LMFLASH) -q ek-tm4c123gxl -c $(TARGET_BIN)
$(TCLSH) $(QUTEST) $(TESTS) "" $(HOST)
$(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 $@
.PHONY : clean show
# 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
clean :
-$(RM) $(BIN_DIR)/*.o \
$(BIN_DIR)/*.d \
$(BIN_DIR)/*.bin \
$(BIN_DIR)/*.elf \
$(BIN_DIR)/*.map
show :
@echo PROJECT = $(PROJECT)
@echo TESTS = $(TESTS)
@echo TARGET_ELF = $(TARGET_ELF)
@echo CONF = $(CONF)
@echo VPATH = $(VPATH)
@echo C_SRCS = $(C_SRCS)
@echo CPP_SRCS = $(CPP_SRCS)
@echo ASM_SRCS = $(ASM_SRCS)
@echo C_DEPS_EXT = $(C_DEPS_EXT)
@echo C_OBJS_EXT = $(C_OBJS_EXT)
@echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
@echo CPP_OBJS_EXT = $(CPP_OBJS_EXT)
@echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
@echo LIB_DIRS = $(LIB_DIRS)
@echo LIBS = $(LIBS)
@echo DEFINES = $(DEFINES)
@echo QUTEST = $(QUTEST)
@echo HOST = $(HOST)

View File

@ -1,7 +1,7 @@
############################################################################## ##############################################################################
# Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM # Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM
# Last Updated for Version: 6.2.0 # Last Updated for Version: 6.3.0
# Date of the Last Update: 2018-04-13 # Date of the Last Update: 2018-05-10
# #
# Q u a n t u m L e a P s # Q u a n t u m L e a P s
# --------------------------- # ---------------------------
@ -169,16 +169,12 @@ LINK := $(GNU_ARM)/bin/arm-eabi-gcc
BIN := $(GNU_ARM)/bin/arm-eabi-objcopy BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# LMFLASH toolset (NOTE: You need to adjust to your machine) # NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
# see http://www.ti.com/tool/lmflashprogrammer # be found on the PATH. You might need to adjust this symbol to the
# location of the LMFlash utility on your machine
# #
ifeq ($(LMFLASH),) ifeq ($(LMFLASH),)
LMFLASH := $(QTOOLS)/../LM_Flash_Programmer/LMFlash.exe LMFLASH := LMFlash.exe
endif
# make sure that the LMFLASH tool exists...
ifeq ("$(wildcard $(LMFLASH))","")
$(error LMFLASH tool not found. Please adjust the Makefile)
endif endif
@ -254,9 +250,7 @@ endif
$(TARGET_BIN) : $(TARGET_ELF) $(TARGET_BIN) : $(TARGET_ELF)
$(BIN) -O binary $< $@ $(BIN) -O binary $< $@
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN) $(LMFLASH) -q ek-tm4c123gxl $@
echo Press RESET button on the EK-TM4C123GXL board
@pause
$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
$(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o $(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o
@ -264,9 +258,9 @@ $(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
flash : flash :
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN) $(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN)
echo Press RESET button on the EK-TM4C123GXL board
run : $(TARGET_BIN) run : $(TARGET_BIN)
$(LMFLASH) -q ek-tm4c123gxl -c $(TARGET_BIN)
$(TCLSH) $(QUTEST) $(TESTS) "" $(HOST) $(TCLSH) $(QUTEST) $(TESTS) "" $(HOST)
$(BIN_DIR)/%.d : %.c $(BIN_DIR)/%.d : %.c

View File

@ -1,7 +1,7 @@
############################################################################## ##############################################################################
# Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM # Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM
# Last Updated for Version: 6.2.0 # Last Updated for Version: 6.3.0
# Date of the Last Update: 2018-04-13 # Date of the Last Update: 2018-05-10
# #
# Q u a n t u m L e a P s # Q u a n t u m L e a P s
# --------------------------- # ---------------------------
@ -42,7 +42,7 @@
# NOTE: # NOTE:
# To use this Makefile on Windows, you will need the GNU make utility, which # To use this Makefile on Windows, you will need the GNU make utility, which
# is included in the Qtools collection for Windows, see: # is included in the Qtools collection for Windows, see:
# http://sourceforge.net/projects/qpc/files/Qtools/ # http://sourceforge.net/projects/qpc/files/QTools/
# #
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -166,16 +166,12 @@ LINK := $(GNU_ARM)/bin/arm-eabi-gcc
BIN := $(GNU_ARM)/bin/arm-eabi-objcopy BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# LMFLASH toolset (NOTE: You need to adjust to your machine) # NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
# see http://www.ti.com/tool/lmflashprogrammer # be found on the PATH. You might need to adjust this symbol to the
# location of the LMFlash utility on your machine
# #
ifeq ($(LMFLASH),) ifeq ($(LMFLASH),)
LMFLASH := $(QTOOLS)/../LM_Flash_Programmer/LMFlash.exe LMFLASH := LMFlash.exe
endif
# make sure that the LMFLASH tool exists...
ifeq ("$(wildcard $(LMFLASH))","")
$(error LMFLASH tool not found. Please adjust the Makefile)
endif endif
@ -251,9 +247,7 @@ endif
$(TARGET_BIN) : $(TARGET_ELF) $(TARGET_BIN) : $(TARGET_ELF)
$(BIN) -O binary $< $@ $(BIN) -O binary $< $@
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN) $(LMFLASH) -q ek-tm4c123gxl $@
echo Press RESET button on the EK-TM4C123GXL board
@pause
$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
$(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o $(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o
@ -261,9 +255,9 @@ $(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
flash : flash :
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN) $(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN)
echo Press RESET button on the EK-TM4C123GXL board
run : $(TARGET_BIN) run : $(TARGET_BIN)
$(LMFLASH) -q ek-tm4c123gxl -c $(TARGET_BIN)
$(TCLSH) $(QUTEST) $(TESTS) "" $(HOST) $(TCLSH) $(QUTEST) $(TESTS) "" $(HOST)
$(BIN_DIR)/%.d : %.c $(BIN_DIR)/%.d : %.c

View File

@ -42,7 +42,7 @@
# NOTE: # NOTE:
# To use this Makefile on Windows, you will need the GNU make utility, which # To use this Makefile on Windows, you will need the GNU make utility, which
# is included in the Qtools collection for Windows, see: # is included in the Qtools collection for Windows, see:
# http://sourceforge.net/projects/qpc/files/Qtools/ # http://sourceforge.net/projects/qpc/files/QTools/
# #
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------

View File

@ -0,0 +1,315 @@
##############################################################################
# Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM
# Last Updated for Version: 6.3.0
# Date of the Last Update: 2018-05-10
#
# Q u a n t u m L e a P s
# ---------------------------
# innovating embedded systems
#
# Copyright (C) 2005-2018 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:
# https://www.state-machine.com
# mailto:info@state-machine.com
##############################################################################
#
# examples of invoking this Makefile:
# make -fek-tm4c123gxl.mak # make and run the tests in the current directory
# make -fek-tm4c123gxl.mak TESTS=philo*.tcl # make and run the selected tests
# make -fek-tm4c123gxl.mak HOST=localhost:7705 # connect to host:port
# make -fek-tm4c123gxl.mak norun # only make but not run the tests
# make -fek-tm4c123gxl.mak clean # cleanup the build
#
# 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, binary output directory
#
PROJECT := test_qhsm
TARGET := ek-tm4c123gxl
#-----------------------------------------------------------------------------
# project directories
#
# location of the QP/C framework (if not provided in an environemnt var.)
ifeq ($(QPC),)
QPC := ../../..
endif
# location of the QTOOLS directory (if not provided in an environemnt var.)
ifeq ($(QTOOLS),)
QTOOLS := c:/qp/qtools
endif
# QP port used in this project
QP_PORT_DIR := $(QPC)/ports/arm-cm/qutest
# list of all source directories used by this project
VPATH = \
../$(TARGET) \
$(QPC)/src/qf \
$(QPC)/src/qs \
$(QP_PORT_DIR) \
$(QPC)/3rd_party/ek-tm4c123gxl \
$(QPC)/3rd_party/ek-tm4c123gxl/gnu
# list of all include directories needed by this project
INCLUDES = \
-I. \
-I../$(TARGET) \
-I$(QPC)/include \
-I$(QPC)/src \
-I$(QP_PORT_DIR) \
-I$(QPC)/3rd_party/CMSIS/Include \
-I$(QPC)/3rd_party/ek-tm4c123gxl
#-----------------------------------------------------------------------------
# files
#
# assembler source files
ASM_SRCS :=
# C source files
C_SRCS := \
qhsmtst.c \
test_qhsm.c \
system_TM4C123GH6PM.c \
startup_TM4C123GH6PM.c
# C++ source files
CPP_SRCS :=
OUTPUT := $(PROJECT)
LD_SCRIPT := ../$(TARGET)/test.ld
QP_SRCS := \
qep_hsm.c \
qep_msm.c \
qf_act.c \
qf_actq.c \
qf_defer.c \
qf_dyn.c \
qf_mem.c \
qf_ps.c \
qf_qact.c \
qf_qeq.c \
qf_qmact.c \
qs.c \
qs_64bit.c \
qs_rx.c \
qs_fp.c \
qutest.c \
qutest_port.c
QP_ASMS :=
LIB_DIRS :=
LIBS :=
# defines
DEFINES := -DTARGET_IS_TM4C123_RB1
# ARM CPU, ARCH, FPU, and Float-ABI types...
# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4]
# ARM_ARCH: [6 | 7] (NOTE: must match ARM_CPU!)
# ARM_FPU: [ | vfp]
# FLOAT_ABI: [ | soft | softfp | hard]
#
ARM_CPU := -mcpu=cortex-m4
ARM_ARCH := 7 # NOTE: must match the ARM_CPU!
ARM_FPU := -mfpu=vfp
FLOAT_ABI := -mfloat-abi=softfp
#-----------------------------------------------------------------------------
# GNU-ARM toolset (NOTE: You need to adjust to your machine)
# see http://gnutoolchains.com/arm-eabi/
#
ifeq ($(GNU_ARM),)
GNU_ARM := $(QTOOLS)/gnu_arm-eabi
endif
# make sure that the GNU-ARM toolset exists...
ifeq ("$(wildcard $(GNU_ARM))","")
$(error GNU_ARM toolset not found. Please adjust the Makefile)
endif
CC := $(GNU_ARM)/bin/arm-eabi-gcc
CPP := $(GNU_ARM)/bin/arm-eabi-g++
AS := $(GNU_ARM)/bin/arm-eabi-as
LINK := $(GNU_ARM)/bin/arm-eabi-gcc
BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
#-----------------------------------------------------------------------------
# NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
# be found on the PATH. You might need to adjust this symbol to the
# location of the LMFlash utility on your machine
#
ifeq ($(LMFLASH),)
LMFLASH := LMFlash.exe
endif
##############################################################################
# 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
MKDIR := mkdir
RM := rm
TCLSH := tclsh
QUTEST := $(QTOOLS)/qspy/tcl/qutest.tcl
#-----------------------------------------------------------------------------
# build options
#
# combine all the soruces...
C_SRCS += $(QP_SRCS)
ASM_SRCS += $(QP_ASMS)
BIN_DIR := $(TARGET)
ASFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU)
CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
-ffunction-sections -fdata-sections \
-O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST
CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \
-O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST
LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
-mthumb -nostdlib \
-Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
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))
# create $(BIN_DIR) if it does not exist
ifeq ("$(wildcard $(BIN_DIR))","")
$(shell $(MKDIR) $(BIN_DIR))
endif
#-----------------------------------------------------------------------------
# rules
#
.PHONY : run norun flash
ifeq ($(MAKECMDGOALS),norun)
all : $(TARGET_BIN)
norun : all
else
all : $(TARGET_BIN) run
endif
ifeq (, $(TESTS))
TESTS := *.tcl
endif
$(TARGET_BIN) : $(TARGET_ELF)
$(BIN) -O binary $< $@
$(LMFLASH) -q ek-tm4c123gxl $@
$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
$(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o
$(LINK) $(LINKFLAGS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS)
flash :
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN)
run : $(TARGET_BIN)
$(LMFLASH) -q ek-tm4c123gxl -c $(TARGET_BIN)
$(TCLSH) $(QUTEST) $(TESTS) "" $(HOST)
$(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 $@
.PHONY : clean show
# 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
clean :
-$(RM) $(BIN_DIR)/*.o \
$(BIN_DIR)/*.d \
$(BIN_DIR)/*.bin \
$(BIN_DIR)/*.elf \
$(BIN_DIR)/*.map
show :
@echo PROJECT = $(PROJECT)
@echo TESTS = $(TESTS)
@echo TARGET_ELF = $(TARGET_ELF)
@echo CONF = $(CONF)
@echo VPATH = $(VPATH)
@echo C_SRCS = $(C_SRCS)
@echo CPP_SRCS = $(CPP_SRCS)
@echo ASM_SRCS = $(ASM_SRCS)
@echo C_DEPS_EXT = $(C_DEPS_EXT)
@echo C_OBJS_EXT = $(C_OBJS_EXT)
@echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
@echo CPP_OBJS_EXT = $(CPP_OBJS_EXT)
@echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
@echo LIB_DIRS = $(LIB_DIRS)
@echo LIBS = $(LIBS)
@echo DEFINES = $(DEFINES)
@echo QUTEST = $(QUTEST)
@echo HOST = $(HOST)

View File

@ -0,0 +1,315 @@
##############################################################################
# Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM
# Last Updated for Version: 6.3.0
# Date of the Last Update: 2018-05-10
#
# Q u a n t u m L e a P s
# ---------------------------
# innovating embedded systems
#
# Copyright (C) 2005-2018 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:
# https://www.state-machine.com
# mailto:info@state-machine.com
##############################################################################
#
# examples of invoking this Makefile:
# make -fek-tm4c123gxl.mak # make and run the tests in the current directory
# make -fek-tm4c123gxl.mak TESTS=philo*.tcl # make and run the selected tests
# make -fek-tm4c123gxl.mak HOST=localhost:7705 # connect to host:port
# make -fek-tm4c123gxl.mak norun # only make but not run the tests
# make -fek-tm4c123gxl.mak clean # cleanup the build
#
# 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, binary output directory
#
PROJECT := test_qmsm
TARGET := ek-tm4c123gxl
#-----------------------------------------------------------------------------
# project directories
#
# location of the QP/C framework (if not provided in an environemnt var.)
ifeq ($(QPC),)
QPC := ../../..
endif
# location of the QTOOLS directory (if not provided in an environemnt var.)
ifeq ($(QTOOLS),)
QTOOLS := c:/qp/qtools
endif
# QP port used in this project
QP_PORT_DIR := $(QPC)/ports/arm-cm/qutest
# list of all source directories used by this project
VPATH = \
../$(TARGET) \
$(QPC)/src/qf \
$(QPC)/src/qs \
$(QP_PORT_DIR) \
$(QPC)/3rd_party/ek-tm4c123gxl \
$(QPC)/3rd_party/ek-tm4c123gxl/gnu
# list of all include directories needed by this project
INCLUDES = \
-I. \
-I../$(TARGET) \
-I$(QPC)/include \
-I$(QPC)/src \
-I$(QP_PORT_DIR) \
-I$(QPC)/3rd_party/CMSIS/Include \
-I$(QPC)/3rd_party/ek-tm4c123gxl
#-----------------------------------------------------------------------------
# files
#
# assembler source files
ASM_SRCS :=
# C source files
C_SRCS := \
qmsmtst.c \
test_qmsm.c \
system_TM4C123GH6PM.c \
startup_TM4C123GH6PM.c
# C++ source files
CPP_SRCS :=
OUTPUT := $(PROJECT)
LD_SCRIPT := ../$(TARGET)/test.ld
QP_SRCS := \
qep_hsm.c \
qep_msm.c \
qf_act.c \
qf_actq.c \
qf_defer.c \
qf_dyn.c \
qf_mem.c \
qf_ps.c \
qf_qact.c \
qf_qeq.c \
qf_qmact.c \
qs.c \
qs_64bit.c \
qs_rx.c \
qs_fp.c \
qutest.c \
qutest_port.c
QP_ASMS :=
LIB_DIRS :=
LIBS :=
# defines
DEFINES := -DTARGET_IS_TM4C123_RB1
# ARM CPU, ARCH, FPU, and Float-ABI types...
# ARM_CPU: [cortex-m0 | cortex-m0plus | cortex-m1 | cortex-m3 | cortex-m4]
# ARM_ARCH: [6 | 7] (NOTE: must match ARM_CPU!)
# ARM_FPU: [ | vfp]
# FLOAT_ABI: [ | soft | softfp | hard]
#
ARM_CPU := -mcpu=cortex-m4
ARM_ARCH := 7 # NOTE: must match the ARM_CPU!
ARM_FPU := -mfpu=vfp
FLOAT_ABI := -mfloat-abi=softfp
#-----------------------------------------------------------------------------
# GNU-ARM toolset (NOTE: You need to adjust to your machine)
# see http://gnutoolchains.com/arm-eabi/
#
ifeq ($(GNU_ARM),)
GNU_ARM := $(QTOOLS)/gnu_arm-eabi
endif
# make sure that the GNU-ARM toolset exists...
ifeq ("$(wildcard $(GNU_ARM))","")
$(error GNU_ARM toolset not found. Please adjust the Makefile)
endif
CC := $(GNU_ARM)/bin/arm-eabi-gcc
CPP := $(GNU_ARM)/bin/arm-eabi-g++
AS := $(GNU_ARM)/bin/arm-eabi-as
LINK := $(GNU_ARM)/bin/arm-eabi-gcc
BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
#-----------------------------------------------------------------------------
# NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
# be found on the PATH. You might need to adjust this symbol to the
# location of the LMFlash utility on your machine
#
ifeq ($(LMFLASH),)
LMFLASH := LMFlash.exe
endif
##############################################################################
# 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
MKDIR := mkdir
RM := rm
TCLSH := tclsh
QUTEST := $(QTOOLS)/qspy/tcl/qutest.tcl
#-----------------------------------------------------------------------------
# build options
#
# combine all the soruces...
C_SRCS += $(QP_SRCS)
ASM_SRCS += $(QP_ASMS)
BIN_DIR := $(TARGET)
ASFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(ASM_CPU) $(ASM_FPU)
CFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
-ffunction-sections -fdata-sections \
-O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST
CPPFLAGS = -g $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) -mthumb -Wall \
-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions \
-O $(INCLUDES) $(DEFINES) -DQ_SPY -DQ_UTEST
LINKFLAGS = -T$(LD_SCRIPT) $(ARM_CPU) $(ARM_FPU) $(FLOAT_ABI) \
-mthumb -nostdlib \
-Wl,-Map,$(BIN_DIR)/$(OUTPUT).map,--cref,--gc-sections $(LIB_DIRS)
ASM_OBJS := $(patsubst %.s,%.o, $(notdir $(ASM_SRCS)))
C_OBJS := $(patsubst %.c,%.o, $(notdir $(C_SRCS)))
CPP_OBJS := $(patsubst %.cpp,%.o,$(notdir $(CPP_SRCS)))
TARGET_BIN := $(BIN_DIR)/$(OUTPUT).bin
TARGET_ELF := $(BIN_DIR)/$(OUTPUT).elf
ASM_OBJS_EXT := $(addprefix $(BIN_DIR)/, $(ASM_OBJS))
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))
# create $(BIN_DIR) if it does not exist
ifeq ("$(wildcard $(BIN_DIR))","")
$(shell $(MKDIR) $(BIN_DIR))
endif
#-----------------------------------------------------------------------------
# rules
#
.PHONY : run norun flash
ifeq ($(MAKECMDGOALS),norun)
all : $(TARGET_BIN)
norun : all
else
all : $(TARGET_BIN) run
endif
ifeq (, $(TESTS))
TESTS := *.tcl
endif
$(TARGET_BIN) : $(TARGET_ELF)
$(BIN) -O binary $< $@
$(LMFLASH) -q ek-tm4c123gxl $@
$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
$(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o
$(LINK) $(LINKFLAGS) -o $@ $^ $(BIN_DIR)/qstamp.o $(LIBS)
flash :
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN)
run : $(TARGET_BIN)
$(LMFLASH) -q ek-tm4c123gxl -c $(TARGET_BIN)
$(TCLSH) $(QUTEST) $(TESTS) "" $(HOST)
$(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 $@
.PHONY : clean show
# 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
clean :
-$(RM) $(BIN_DIR)/*.o \
$(BIN_DIR)/*.d \
$(BIN_DIR)/*.bin \
$(BIN_DIR)/*.elf \
$(BIN_DIR)/*.map
show :
@echo PROJECT = $(PROJECT)
@echo TESTS = $(TESTS)
@echo TARGET_ELF = $(TARGET_ELF)
@echo CONF = $(CONF)
@echo VPATH = $(VPATH)
@echo C_SRCS = $(C_SRCS)
@echo CPP_SRCS = $(CPP_SRCS)
@echo ASM_SRCS = $(ASM_SRCS)
@echo C_DEPS_EXT = $(C_DEPS_EXT)
@echo C_OBJS_EXT = $(C_OBJS_EXT)
@echo CPP_DEPS_EXT = $(CPP_DEPS_EXT)
@echo CPP_OBJS_EXT = $(CPP_OBJS_EXT)
@echo ASM_OBJS_EXT = $(ASM_OBJS_EXT)
@echo LIB_DIRS = $(LIB_DIRS)
@echo LIBS = $(LIBS)
@echo DEFINES = $(DEFINES)
@echo QUTEST = $(QUTEST)
@echo HOST = $(HOST)

View File

@ -1,7 +1,7 @@
############################################################################## ##############################################################################
# Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM # Product: Makefile for EK-TM4C123GXL, QUTEST, GNU-ARM
# Last Updated for Version: 6.2.0 # Last Updated for Version: 6.3.0
# Date of the Last Update: 2018-04-13 # Date of the Last Update: 2018-05-10
# #
# Q u a n t u m L e a P s # Q u a n t u m L e a P s
# --------------------------- # ---------------------------
@ -42,7 +42,7 @@
# NOTE: # NOTE:
# To use this Makefile on Windows, you will need the GNU make utility, which # To use this Makefile on Windows, you will need the GNU make utility, which
# is included in the Qtools collection for Windows, see: # is included in the Qtools collection for Windows, see:
# http://sourceforge.net/projects/qpc/files/Qtools/ # http://sourceforge.net/projects/qpc/files/QTools/
# #
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -165,16 +165,12 @@ LINK := $(GNU_ARM)/bin/arm-eabi-gcc
BIN := $(GNU_ARM)/bin/arm-eabi-objcopy BIN := $(GNU_ARM)/bin/arm-eabi-objcopy
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# LMFLASH toolset (NOTE: You need to adjust to your machine) # NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
# see http://www.ti.com/tool/lmflashprogrammer # be found on the PATH. You might need to adjust this symbol to the
# location of the LMFlash utility on your machine
# #
ifeq ($(LMFLASH),) ifeq ($(LMFLASH),)
LMFLASH := $(QTOOLS)/../LM_Flash_Programmer/LMFlash.exe LMFLASH := LMFlash.exe
endif
# make sure that the LMFLASH tool exists...
ifeq ("$(wildcard $(LMFLASH))","")
$(error LMFLASH tool not found. Please adjust the Makefile)
endif endif
@ -250,9 +246,7 @@ endif
$(TARGET_BIN) : $(TARGET_ELF) $(TARGET_BIN) : $(TARGET_ELF)
$(BIN) -O binary $< $@ $(BIN) -O binary $< $@
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN) $(LMFLASH) -q ek-tm4c123gxl $@
echo Press RESET button on the EK-TM4C123GXL board
@pause
$(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT) $(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
$(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o $(CC) $(CFLAGS) -c $(QPC)/include/qstamp.c -o $(BIN_DIR)/qstamp.o
@ -260,9 +254,9 @@ $(TARGET_ELF) : $(ASM_OBJS_EXT) $(C_OBJS_EXT) $(CPP_OBJS_EXT)
flash : flash :
$(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN) $(LMFLASH) -q ek-tm4c123gxl $(TARGET_BIN)
echo Press RESET button on the EK-TM4C123GXL board
run : $(TARGET_BIN) run : $(TARGET_BIN)
$(LMFLASH) -q ek-tm4c123gxl -c $(TARGET_BIN)
$(TCLSH) $(QUTEST) $(TESTS) "" $(HOST) $(TCLSH) $(QUTEST) $(TESTS) "" $(HOST)
$(BIN_DIR)/%.d : %.c $(BIN_DIR)/%.d : %.c

View File

@ -1,34 +1,33 @@
::============================================================================ ::============================================================================
:: Batch file to load the DPP program to the flash of EK-TM4C123GXL :: Batch file to program to the flash of EK-TM4C123GXL
:: (equivalent to EK-LM4F120XL)
:: ::
:: NOTE: requires the LMFlash programmer from Texas Instruments, see: :: NOTE: requires the LMFlash programmer (included in QTools for Windows)
:: http://www.ti.com/tool/LMFLASHPROGRAMMER
:: ::
@echo off @echo off
setlocal setlocal
@echo Load the program to the flash of EK-TM4C123GXL @echo Load a given binary file to the flash of EK-TM4C123GXL
@echo usage: flash @echo usage: flash binary-file
@echo usage: flash rel @echo example: flash dbg\blinky-qk.bin
@echo usage: flash spy
::---------------------------------------------------------------------------- ::----------------------------------------------------------------------------
:: NOTE: Adjust the following symbol to the location of the :: NOTE: The following symbol LMFLASH assumes that LMFlash.exe can
:: LMFlash utility on your machine :: be found on the PATH. You might need to adjust this symbol to the
:: location of the LMFlash utility on your machine
:: ::
set LMFLASH=%QTOOLS%\..\LM_Flash_Programmer\LMFlash.exe set LMFLASH=LMFlash.exe
:: set the build directory depending on the first parameter %1 if ["%~1"]==[""] (
set BUILD_DIR=dbg @echo The binary file missing
if [%1] NEQ [] set BUILD_DIR=%1 @goto end
@echo on )
if not exist %~s1 (
@echo The binary file '%1' does not exist
@goto end
)
%LMFLASH% -q ek-tm4c123gxl %BUILD_DIR%\dpp.bin %LMFLASH% -q ek-tm4c123gxl -e -v -r %1
@echo. :end
@echo.
@echo Reset the target to start running your program!
@echo off
endlocal endlocal

View File

@ -3,8 +3,8 @@
* @brief Customizable and memory-efficient assertions for embedded systems * @brief Customizable and memory-efficient assertions for embedded systems
* @cond * @cond
****************************************************************************** ******************************************************************************
* Last updated for version 6.2.0 * Last updated for version 6.3.0
* Last updated on 2018-04-20 * Last updated on 2018-05-09
* *
* Q u a n t u m L e a P s * Q u a n t u m L e a P s
* --------------------------- * ---------------------------
@ -331,5 +331,8 @@ void Q_onAssert(char_t const * const module, int_t location);
#define Q_ASSERT_COMPILE(test_) \ #define Q_ASSERT_COMPILE(test_) \
extern int_t Q_assert_compile[(test_) ? 1 : -1] extern int_t Q_assert_compile[(test_) ? 1 : -1]
/*! Helper macro to calculate static dimension of a 1-dim @p array_ */
#define Q_DIM(array_) (sizeof(array_) / sizeof((array_)[0]))
#endif /* qassert_h */ #endif /* qassert_h */

View File

@ -5,7 +5,7 @@
* @cond * @cond
****************************************************************************** ******************************************************************************
* Last updated for version 6.3.0 * Last updated for version 6.3.0
* Last updated on 2018-05-03 * Last updated on 2018-05-09
* *
* Q u a n t u m L e a P s * Q u a n t u m L e a P s
* --------------------------- * ---------------------------
@ -189,9 +189,6 @@ QEvt *QEvt_ctor(QEvt * const me, enum_t const sig);
*/ */
#define Q_EVT_CAST(class_) ((class_ const *)e) #define Q_EVT_CAST(class_) ((class_ const *)e)
/*! Helper macro to calculate static dimension of a 1-dim @p array_ */
#define Q_DIM(array_) (sizeof(array_) / sizeof((array_)[0]))
/*! Perform cast from unsigned integer @p uint_ to pointer /*! Perform cast from unsigned integer @p uint_ to pointer
* of type @p type_. */ * of type @p type_. */
/** /**

View File

@ -5,7 +5,7 @@
* @cond * @cond
****************************************************************************** ******************************************************************************
* Last updated for version 6.3.0 * Last updated for version 6.3.0
* Last updated on 2018-04-30 * Last updated on 2018-05-10
* *
* Q u a n t u m L e a P s * Q u a n t u m L e a P s
* --------------------------- * ---------------------------
@ -1079,10 +1079,13 @@ enum QSpyObjKind {
EQ_OBJ, /*!< raw queue object */ EQ_OBJ, /*!< raw queue object */
TE_OBJ, /*!< time event object */ TE_OBJ, /*!< time event object */
AP_OBJ, /*!< generic Application-specific object */ AP_OBJ, /*!< generic Application-specific object */
SM_AO_OBJ, /*!< state machine or active object */
MAX_OBJ MAX_OBJ
}; };
enum OSpyObjCombnation {
SM_AO_OBJ = MAX_OBJ /*!< combination of SM and AO */
};
/*! Private QS data to keep track of the filters and the trace buffer. */ /*! Private QS data to keep track of the filters and the trace buffer. */
typedef struct { typedef struct {
uint8_t glbFilter[16]; /*!< global on/off QS filter */ uint8_t glbFilter[16]; /*!< global on/off QS filter */