::====================================================================================================
::
::    @file                launch.bat
::    @version             1.0.0
::
::    @brief               Integration Framework - internal build launcher.
::    @details             Launches the build of the sample application
::
::    Platform      :      PA
::    Build Version :      MPC5777CXG_MCAL_1_0_0_RTM_ASR_REL_4_3_REV_0001_20190318
::
::   (c) Copyright 2006-2016 Freescale Semiconductor, Inc. 
::       Copyright 2017 - 2018 NXP
::       All Rights Reserved.
::
::    This file contains sample code only. It is not part of the production code deliverables.
::
::====================================================================================================
::

@echo off

::You have to uncomment and set the following variables if they are not already set
:: uncomment line below if you do not set TRESOS_DIR over environment
::TRESOS
SET TRESOS_DIR=C:/EB/tresos
::MAKE
SET MAKE_DIR=C:/NXP/S32DS_Power_v2.1/S32DS/build_tools/msys32/usr
::GHS
SET GHS_DIR=C:/ghs/comp_201814
::GCC
SET LINARO_DIR=C:/NXP/S32DS_Power_v2.1/S32DS/build_tools/powerpc-eabivle-4_9/bin
::IAR
SET IAR_DIR=
::DIAB
::SET DIAB_DIR=C:/tools/WindRiver/596/compilers/diab-5.9.6.6
SET DIAB_DIR=C:/Windriver/diab/5.9.4.6

::Path to the plugins folder
::SET PLUGINS_DIR=C:/EB/tresos/plugins
SET PLUGINS_DIR=C:/NXP/AUTOSAR/MPC5777C_MCAL4_3_RTM_1_0_0/MPC5777C_MCAL4_3_RTM_1_0_0_Sample_Application/eclipse/plugins

::SSC Path to OS installer             
SET SSC_ROOT=C:/NXP/AUTOSAR/S32K_AUTOSAR_OS_4_0_98_RTM_1_0_0

::FRAMEWORK WORKSPACE        
SET TRESOS_WORKSPACE_DIR=C:/NXP/AUTOSAR/MPC5777C_MCAL4_3_RTM_1_0_0/MPC5777C_MCAL4_3_RTM_1_0_0_Sample_Application/Tresos/Workspace/lightning_MPC5777C_4.3_Split/output

::OS WORKSPACE        
SET OS_TRESOS_WORKSPACE_DIR=C:/Tools/EB/v24.0.1/workspace/OS_standalone_S32K14x_4.0/output/generated/epc
::SET TRESOS_WORKSPACE_DIR=C:/tools/Tresos_24_0_1/workspace/lighting_S32K118_4.3_RTM1.0.0/output

::USERCODE        
SET USER_CODE_DIR=C:/Users/nxa07100/Desktop/mysource

::MOTORCONTROL LIBRARY  
SET MOTORCTRL_LIB_DIR=C:/Projects/Libraries/MotorControl

::ANFC - LIBRARY 
::SET ANFC_LIB_DIR=

::ANFC - TRESOS WORKSPACE DIR
::SET ANFC_CONFIG_DIR=

if not defined TRESOS_DIR GOTO missing_path_names_TRESOS_DIR
if not exist %TRESOS_DIR% GOTO missing_path_names_TRESOS_DIR

cmd /c "make.bat %1 %2 %3 %4 %5 %6"
CodeCRC.bat
GOTO end

:: The variable TRESOS_DIR was not specified
:missing_path_names_TRESOS_DIR
ECHO.
ECHO    The variable TRESOS_DIR was not set correctly.
ECHO    Please specify this variable manually, by editing
ECHO    the batch file 'launch.bat'.
ECHO.
pause
GOTO end
:end
