@echo off
rem This program was created by AXELL CORPORATION.
rem Copyright (C) 2015-2022 AXELL CORPORATION, all rights reserved.

set BUILD_ROOT=%CD%

if "%1" EQU "ON" ( goto EXEGCC ) ELSE ( goto IAR )

:EXEGCC
title AG903 Develop [exeGCC]
color 1B

set EXEGCC=ON
set GCCVER=4.8.4
set GCC_DEFAULT=armv7aLaine
set SYSROOT=C:\GCC4\ARM\r004
set COMPILER_PATH=%SYSROOT%\bin

set PATH=%COMPILER_PATH%;%PATH%
goto END

:IAR
title AG903 Develop [EWARM]
color F5

set EXEGCC=OFF
rem EWARM=7.5 when EWARM 7.80 / EWARM=8.0 when EWARM 8.20
set EWARM=7.5
rem set EWARM=8.0
set EWARM_ROOT=C:\Program Files (x86)\IAR Systems\Embedded Workbench %EWARM%\arm

set PATH=%EWARM_ROOT%\bin;%PATH%
goto END

:END
set PATH=%CD%\BUILD\BIN;%PATH%

cls
if %EXEGCC% EQU ON (@echo exeGCC [Version %GCCVER%]) else (@echo EWARM [Version %EWARM%])
%ComSpec%
