1@ECHO OFF 2 3ECHO INFO: Setting up GHS environment... 4 5SET "AZRTOS_TEST_DIR=%~dp0" 6 7IF EXIST %AZRTOS_GHS_COMP_DIR% GOTO FOUND_GHS_COMP_DIR 8set AZRTOS_GHS_COMP_DIR="C:\ghs\comp_202014" 9IF EXIST %AZRTOS_GHS_COMP_DIR% GOTO FOUND_GHS_COMP_DIR 10set AZRTOS_GHS_COMP_DIR="C:\ghs\comp_201952" 11IF EXIST %AZRTOS_GHS_COMP_DIR% GOTO FOUND_GHS_COMP_DIR 12set AZRTOS_GHS_COMP_DIR="C:\ghs\comp_201914" 13IF EXIST %AZRTOS_GHS_COMP_DIR% GOTO FOUND_GHS_COMP_DIR 14ECHO ERROR: Green Hills Software compiler directory not found. 15EXIT /B 2 16:FOUND_GHS_COMP_DIR 17 18SET AZRTOS_GHS_COMP_GBUILD=%AZRTOS_GHS_COMP_DIR%\gbuild.exe 19IF NOT EXIST %AZRTOS_GHS_COMP_GBUILD% ( 20 ECHO ERROR: gbuild.exe not found at %AZRTOS_GHS_COMP_GBUILD% 21 EXIT /B 1 22) ELSE ( 23 ECHO INFO: gbuild.exe found at %AZRTOS_GHS_COMP_GBUILD% 24) 25 26IF EXIST %AZRTOS_GHS_MULTI_DIR% GOTO FOUND_GHS_MULTI_DIR 27set AZRTOS_GHS_MULTI_DIR="C:\ghs\multi_716d" 28IF EXIST %AZRTOS_GHS_MULTI_DIR% GOTO FOUND_GHS_MULTI_DIR 29set AZRTOS_GHS_MULTI_DIR="C:\ghs\multi_716" 30IF EXIST %AZRTOS_GHS_MULTI_DIR% GOTO FOUND_GHS_MULTI_DIR 31set AZRTOS_GHS_MULTI_DIR="C:\ghs\multi_714" 32IF EXIST %AZRTOS_GHS_MULTI_DIR% GOTO FOUND_GHS_MULTI_DIR 33ECHO ERROR: Green Hills Software MULTI directory not found. 34EXIT /B 1 35:FOUND_GHS_MULTI_DIR 36 37SET AZRTOS_GHS_MULTI_MULTI=%AZRTOS_GHS_MULTI_DIR%\multi.exe 38IF NOT EXIST %AZRTOS_GHS_MULTI_MULTI% ( 39 ECHO ERROR: multi.exe not found at %AZRTOS_GHS_MULTI_MULTI% 40 EXIT /B 1 41) ELSE ( 42 ECHO INFO: multi.exe found at %AZRTOS_GHS_MULTI_MULTI% 43) 44 45ECHO INFO: GHS environment setup completed successfully! 46