1@ECHO OFF
2
3ECHO INFO: Building %CD%...
4
5ECHO INFO: Building ThreadX_Library...
6PUSHD .
7DEL out.txt 2> NUL
8%AZRTOS_KEIL_UV% -j0 -b ThreadX_Library.uvprojx -o out.txt
9IF %ERRORLEVEL% NEQ 0 GOTO ERR_BUILD
10TYPE out.txt 2> NUL
11POPD
12
13ECHO INFO: Building demo_secure_zone...
14PUSHD demo_secure_zone
15DEL out.txt 2> NUL
16%AZRTOS_KEIL_UV% -j0 -b demo_secure_zone.uvprojx -o out.txt
17IF %ERRORLEVEL% NEQ 0 GOTO ERR_BUILD
18TYPE out.txt 2> NUL
19POPD
20
21ECHO INFO: Building demo_threadx_non-secure_zone...
22PUSHD demo_threadx_non-secure_zone
23DEL out.txt 2> NUL
24%AZRTOS_KEIL_UV% -j0 -b demo_threadx_non-secure_zone.uvprojx -o out.txt
25IF %ERRORLEVEL% NEQ 0 GOTO ERR_BUILD
26TYPE out.txt 2> NUL
27POPD
28
29REM ECHO Building ThreadX_Demo...
30REM PUSHD demo_threadx_non-secure_zone
31REM DEL out.txt 2> NUL
32REM REM %AZRTOS_KEIL_UV% -j0 -b ThreadX_Demo.uvproj -o out.txt
33REM IF %ERRORLEVEL% NEQ 0 GOTO ERR_BUILD
34REM TYPE out.txt 2>NUL
35REM POPD
36
37DEL out.txt 2> NUL
38ECHO INFO: Build completed successfully!
39EXIT /B 0
40
41:ERR_BUILD
42TYPE out.txt 2> NUL
43POPD
44echo ERROR: build failed.
45EXIT /B 1
46