20 lines
386 B
Batchfile
20 lines
386 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
set UV4=C:\Keil_v5\UV4\UV4.exe
|
|
set PROJ=%~dp0STM32F407-Demo.uvprojx
|
|
set LOG=%~dp0build_log.txt
|
|
set TARGET=STM32F407-Demo
|
|
|
|
"%UV4%" -b "%PROJ%" -t%TARGET% -j0 -o "%LOG%"
|
|
|
|
findstr /C:"0 Error(s), 0 Warning(s)" "%LOG%" >nul
|
|
if %ERRORLEVEL% equ 0 (
|
|
echo BUILD_OK: 0 errors, 0 warnings
|
|
exit /b 0
|
|
)
|
|
|
|
echo BUILD_FAIL: no success marker in log
|
|
type "%LOG%"
|
|
exit /b 1
|