1@ECHO OFF
2
3ECHO INFO: Cleaning %CD%...
4
5ECHO INFO: Cleaning ThreadX_Library...
6DEL out.txt 2> NUL
7START /wait %AZRTOS_KEIL_UV% -j0 -c ThreadX_Library.uvprojx -o out.txt
8IF %ERRORLEVEL% GEQ 2 GOTO CLEAN_ERROR
9TYPE out.txt 2> NUL
10
11ECHO INFO: Cleaning demo_secure_zone...
12DEL out.txt 2> NUL
13START /wait %AZRTOS_KEIL_UV% -j0 -c demo_secure_zone\demo_secure_zone.uvprojx -o out.txt
14IF %ERRORLEVEL% GEQ 2 GOTO CLEAN_ERROR
15TYPE out.txt 2> NUL
16
17ECHO INFO: Cleaning demo_threadx_non-secure_zone...
18DEL out.txt 2> NUL
19START /wait %AZRTOS_KEIL_UV% -j0 -c demo_threadx_non-secure_zone\demo_threadx_non-secure_zone.uvprojx -o out.txt
20IF %ERRORLEVEL% GEQ 2 GOTO CLEAN_ERROR
21TYPE out.txt 2> NUL
22
23DEL out.txt 2> NUL
24ECHO INFO: Cleaning completed successfully!
25EXIT /B 0
26
27:CLEAN_ERROR
28DEL out.txt 2> NUL
29ECHO ERROR: clean failed.
30EXIT /B 1
31