test.bat 878 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. @ECHO off
  2. REM Usage: test.bat [PATH TO UV4.exe]
  3. IF "%1"=="" (
  4. SET UV4_EXE=C:\Keil_v5\UV4\UV4.exe
  5. ) ELSE (
  6. SET UV4_EXE=%1
  7. )
  8. ECHO Using %UV4_EXE%
  9. ECHO.
  10. ECHO Building application...
  11. IF EXIST .\Objects\Validation.axf del .\Objects\Validation.axf
  12. %UV4_EXE% -b Validation.uvprojx
  13. IF EXIST .\Objects\Validation.axf (
  14. ECHO Build succeded
  15. ) ELSE (
  16. ECHO Build failed
  17. GOTO :done
  18. )
  19. ECHO.
  20. ECHO Loading application to hardware target...
  21. %UV4_EXE% -f Validation.uvprojx -t"CMSIS_DAP"
  22. IF ERRORLEVEL 1 (
  23. ECHO Flash download failed
  24. GOTO :done
  25. )
  26. ECHO.
  27. ECHO Debugging hardware target...
  28. IF EXIST .\test_results.txt del .\test_results.txt
  29. %UV4_EXE% -d Validation.uvprojx -t"CMSIS_DAP"
  30. IF EXIST .\test_results.txt (
  31. TYPE .\test_results.txt
  32. ) ELSE (
  33. ECHO Test ended abnormally - file test_results.txt was not produced
  34. GOTO :done
  35. )
  36. ECHO.
  37. ECHO All tests completed
  38. :done