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