@echo off SETLOCAL REM =========================================================================== REM This batch file executes LoadTI for DSS for Windows. REM =========================================================================== REM =========================================================================== REM Do not edit the lines below. REM =========================================================================== REM Set the DSS and DebugServer Root. REM this batch file can be call from local host or remote REM in first case use TI _DIR var for local install of CCS REM otherwise gives the network name- ex CNYNC04162 REM CAUTION the ccsv4 directory must be SHARED in that case REM set DEBUGSERVER_ROOT=%~dp0..\..\..\DebugServer @echo TI CCSV4 install directory: %TI_DIR% rem set DEBUGSERVER_ROOT=%TI_DIR%\DebugServer setlocal ENABLEDELAYEDEXPANSION :setccscfg4 if "%1"=="-c" goto setccscfg1 @echo error config file must be given as argument (%1) goto help :setccscfg1 REM ccs cfg file is next argument SET CCS_CFG_FILE=%2 SHIFT SHIFT :setccscfg2 @echo CCS config file used: %CCS_CFG_FILE% if "%1" =="-t" goto timeout_1 REM set timeout max value here: 240000 ms = 4 minutes SET TIMEOUT_MAX_MS=240000 goto timeout_2 :timeout_1 SET TIMEOUT_MAX_MS=%2 REM arg must be shifted to be aligned in all cases SHIFT SHIFT :timeout_2 @echo Timeout value (in ms) %TIMEOUT_MAX_MS% REM This path to point to the absolute install location of the Debug Server. REM We're going to use the DOS macro %~dp0 which always points to the REM absolute path of this batch file, no matter where on the system this REM batch file is called from. rem set DEBUGSERVER=%~dp0..\..\DebugServer set DEBUGSERVER=%TI_DIR%\DebugServer if not exist "!DEBUGSERVER!" set DEBUGSERVER=%TI_DIR%\..\..\xulrunner REM prior to modify path, save old value, restored at this end set OLD_PATH=!PATH! REM Path to necessary bbinaries set PATH=!DEBUGSERVER!\..\eclipse\plugins\com.ti.dvt.ofssymbolmanager_1.0.0;!PATH! set PATH=!DEBUGSERVER!\..\eclipse\plugins\com.ti.dvt.tidisassembly_1.0.0\os\win32;!PATH! REM Path to Rhino JAR File set RHINO_JAR="!DEBUGSERVER!\packages\ti\dss\java\js.jar" REM Path to DVT Scripting JAR File set DVT_SCRIPTING_JAR="!DEBUGSERVER!\..\dvt\scripting\dvt_scripting.jar" REM Path to DebugServer JAR File set SCRIPTING_JARS="!DEBUGSERVER!\packages\ti\dss\java\dss.jar" REM If this is CCS (rather than stand-alone DSS) also add Eclipse's startup.jar REM to the app classpath if exist "!DEBUGSERVER!\..\eclipse\startup.jar" ( set SCRIPTING_JARS=!SCRIPTING_JARS!;"!DEBUGSERVER!\..\eclipse\startup.jar" ) REM Name of Rhino Shell Java Application set RHINO_SHELL=org.mozilla.javascript.tools.shell.Main REM Name of Rhino Debugger Java Application set RHINO_DEBUGGER=org.mozilla.javascript.tools.debugger.Main REM If the user chose to install the JRE with this DSS install - use that JRE. if exist "!DEBUGSERVER!\..\jre" ( set JAVA_HOME=!DEBUGSERVER!\..\jre set PATH=!DEBUGSERVER!\..\jre\bin;!PATH! goto LAUNCH_SCRIPT ) REM If this CCS (rather than stand-alone DSS) the installed jre is in REM \eclipse\jre if exist "!DEBUGSERVER!\..\eclipse\jre" ( set JAVA_HOME=!DEBUGSERVER!\..\eclipse\jre set PATH=!DEBUGSERVER!\..\eclipse\jre\bin;!PATH! goto LAUNCH_SCRIPT ) REM Set full path to script SET LOADTI_JS=%SCRIPT_DIR%\dss\omap4_dss.js REM Launch Rhino script engine. Import the scripting package. :LAUNCH_SCRIPT java.exe -Xms40m -Xmx256m -Dxpcom.bridge.executeOnDedicatedThread=no -Dorg.eclipse.swt.browser.XULRunnerPath="!DEBUGSERVER!\win32" -DXPCOM.RUNTIME="!DEBUGSERVER!\win32" -cp !RHINO_JAR!;!SCRIPTING_JARS!;!DVT_SCRIPTING_JAR! !RHINO_DEBUGGER! "%LOADTI_JS%" -c %CCS_CFG_FILE% -t %TIMEOUT_MAX_MS% %1 %2 %3 %4 %5 %6 %7 %8 %9 REM Done. @echo ERROR CODE: %ERRORLEVEL% if ERRORLEVEL 1 goto Test_Fail if ERRORLEVEL 0 goto Test_Pass goto Test_Fail :invalidpath @echo %DEBUGSERVER_ROOT% does not point to a valid DSS DebugServer installation goto end :help @echo usage: loadti_omap4 [-c {ccs cfg file}] [arg] @echo arg :options given to the script @echo -c, --cfg-file=CONFIG_FILE : CCS cxml configuration file @echo -t, TIME_OUT : max time before automatic exit (in ms) @echo -h, --help : to display script usage @echo -mlr1,-mlr2 ="PAGE,ADDR,FILE,TYPE_SIZE,BYTE_SWAP" : Memory Raw Load , done at @echo test inner loop entry level 1 / 2 @echo -mld1, --mld2 ="PAGE,ADDR,FILE,LEN" : Memory Hex Load , done at test inner @echo loop entry level 1 @echo -msr1, -mssr2 ="PAGE,ADDR,FILE,LEN,TYPE_SIZE,BYTE_SWAP" : Memory Raw Save , @echo done at test inner loop level 1 / 2 @echo -msd1, -msd2 ="PAGE,ADDR,FILE,LEN,IO_FORMAT,APPEND" : Memory Raw Save , @echo done at test inner loop level 1 / 2 @echo -msll1,-msll2 : Memory length to be saved when --msr1/2 option is set with @echo length parameter equals 0 @echo -q, --quiet : do not display information on console @echo -r, --reset : reset CPU at connection @echo -s, --stdout-file=FILE : save console output in a file @echo -v, --verbose : verbose mode for displayed information on console @echo -x, --xml-log=FILE : Save DSS event sequences on a xml file @echo -ca9_0 : MANDATORY : open a Cortex A9 Cpu 0 session @echo -ca9_1: OPTIONNAL : open a Cortex A9 Cpu 1 session @echo -cm3_0: OPTIONNAL : open a Cortex M3 Cpu 0 session @echo -cm3_1: OPTIONNAL : open a Cortex M3 Cpu 1 session @echo -c64,: OPTIONNAL : open a Cortex Tesla C64 session @echo -bkp_te: OPTIONNAL : Set a breakpoint at test entry function @echo -bkp_ils1 : OPTIONNAL: Set a breakpoint at Inner loop level 1 start @echo (loop on test pattern) @echo -bkp_ile1: OPTIONNAL Set a breakpoint at Inner loop level 1 end @echo (loop on test pattern), @echo -tid_expr: Expression to evaluate prior to start test, OPTIONNAL @echo -tid_gel: Gel function to execute prior to start test, OPTIONNAL @echo -res: Test result structure to display, MANDATORY @echo -dual_core : to launch CPU1 execution for dhrystone test @echo -@, --options-file=FILE : use input file conaaining all options goto end :Test_Fail @echo Test Fail - Error returned: %ERRORLEVEL% set DSS_TEST_RES=TEST_FAIL goto end :Test_Pass @echo Test Pass set DSS_TEST_RES=TEST_PASS :end set DEBUGSERVER_ROOT= SET CCS_CFG_FILE= SET TIMEOUT_MAX_MS= set DSS_ROOT= set DSS_LIB_PATH= set LOADTI_JS= set RHINO_JAR= set SCRIPTING_JAR= set RHINO_SHELL= set RHINO_DEBUGGER= set PATH=%OLD_PATH% endlocal