This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am trying to load GEL file using DSS, below is my script file
// Import the DSS packages into our namespace to save on typing
importPackage(Packages.com.ti.debug.engine.scripting)
importPackage(Packages.com.ti.ccstudio.scripting.environment)
importPackage(Packages.java.lang)
importPackage(Packages.java.io)
// Create our scripting environment object - which is the main entry point into any script and
// the factory for creating other Scriptable ervers and Sessions
var script = new ScriptingEnvironment()
// Get the Debug Server and start a Debug Session
debugServer = script.getServer("DebugServer.1")
debugServer.setConfig("test.ccxml")
debugSession = debugServer.openSession("Test Java Script test file")
debugSession.target.connect();
debugSession.expression.evaluate('GEL_LoadGel("C:/mytestgel.gel")');
I have saved this as test.js
I am following the procedure as below.
I have saved path of dss.bat as env variable , my present working directory is C:\Program Files\Texas Instruments\ccsv5\ccs_base_5.0.3.00028\scripting\examples\DebugServerExamples
and i am running the command as dss test.js.
I have the Target configuration file in my PWD.
I am trying to connect to my board using Blackhawk USB560M emulator.
But i am not getting any thing. Am i doing right things here.
Regards
Pradeep
Hi Pradeep,
It looks like you are doing it right. If the GEL load failed, you should have gotten an error message in the log or the console. Did you get a specific error message?How are you confirming that the GEL load failed?
Thanks
ki
Hi,
I got it working. I am able to load the gel and run the script. I am posting the script below.
But i am unable to run the binary [ I have commented the line ]. The control just hangs after this [ debugSession.memory.loadProgram("My_Binary.out"); ]
Also when i give the command [ ../../../../bin> dss test.js ], it opens the rhino debugger, i ahve to manually press "go" to run the test. But for my case, i want every thing to be automated. That after giving the command on command line. The script should complete the test and return. i don't have to provide any input to the rhino debugger. Is there any way to do it ?
// Import the DSS packages into our namespace to save on typing
importPackage(Packages.com.ti.debug.engine.scripting);
importPackage(Packages.com.ti.ccstudio.scripting.environment);
importPackage(Packages.java.lang);
importPackage(Packages.java.io);
// Create our scripting environment object - which is the main entry point into any script and
// the factory for creating other Scriptable Servers and Sessions
var script = ScriptingEnvironment.instance();
// Create a log file in the current directory to log script execution
script.traceBegin("testlog.xml", "DefaultStylesheet.xsl");
// Log everything
script.traceSetConsoleLevel(TraceLevel.ALL);
script.traceSetFileLevel(TraceLevel.ALL);
script.traceSetConsoleLevel(TraceLevel.INFO);
script.traceWrite("Test requires a C64x!");
script.traceWrite("TEST FAILED!");
debugServer = script.getServer( "DebugServer.1" );
debugServer.setConfig("myconfig.ccxml");
debugSession = debugServer.openSession("Emulator/Core")
debugSession.target.connect();
debugSession.expression.evaluate('GEL_LoadGel("C:/my.gel")');
debugSession.expression.evaluate("My_Gel_Function_Call()");
//debugSession.memory.loadProgram("My_Binary.out");
//debugSession.target.run();
debugSession.terminate();
debugServer.stop();
script.traceEnd();
java.lang.System.exit(0);
Regards
Pradeep
Hi
I found the answer,
i have to add debugSession .target.reset();
before load program.