1@ECHO OFF
2
3ECHO INFO: Building %CD%...
4
5ECHO INFO: Building ThreadX_Library...
6DEL out.txt 2> NUL
7START /wait %AZRTOS_KEIL_UV% -j0 -b ThreadX_Library.uvproj -o out.txt
8IF %ERRORLEVEL% GEQ 2 GOTO BUILD_ERROR
9TYPE out.txt 2> NUL
10
11ECHO INFO: Building ThreadX_Demo...
12DEL out.txt 2> NUL
13START /wait %AZRTOS_KEIL_UV% -j0 -b ThreadX_Demo.uvproj -o out.txt
14IF %ERRORLEVEL% GEQ 2 GOTO BUILD_ERROR
15TYPE out.txt 2> NUL
16
17DEL out.txt 2> NUL
18ECHO INFO: Build completed successfully!
19EXIT /B 0
20
21:BUILD_ERROR
22TYPE out.txt 2> NUL
23ECHO ERROR: build failed.
24EXIT /B 1
25