20 lines
401 B
Batchfile
20 lines
401 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
set UV4=C:\Keil_v5\UV4\UV4.exe
|
|
set PROJ=%~dp0STM32F407-Demo.uvprojx
|
|
set LOG=%~dp0download_log.txt
|
|
set TARGET=STM32F407-Demo
|
|
|
|
"%UV4%" -f "%PROJ%" -t%TARGET% -j0 -o "%LOG%"
|
|
|
|
findstr /C:"Application running" "%LOG%" >nul
|
|
if %ERRORLEVEL% equ 0 (
|
|
echo DOWNLOAD_OK: flashed and running
|
|
exit /b 0
|
|
)
|
|
|
|
echo DOWNLOAD_FAIL: no application-running marker in log
|
|
type "%LOG%"
|
|
exit /b 1
|