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.

Dual Core Script Run Command not executing

Other Parts Discussed in Thread: CCSTUDIO

importPackage(Packages.com.ti.debug.engine.scripting);
importPackage(Packages.com.ti.ccstudio.scripting.environment);
importPackage(Packages.java.lang);

var script = ScriptingEnvironment.instance();

script.traceSetConsoleLevel(TraceLevel.ALL);

script.traceWrite("Setting Up Debug Server API\n");

var debugServer = script.getServer("DebugServer.1");
debugServer.setConfig("<TargetConfigs>.ccxml")


script.traceWrite("Initializing Debug Sessions\n");
var debugSessionCPU1 = debugServer.openSession("Texas Instruments XDS110 USB Debug Probe/C28xx_CPU1");
var debugSessionCPU2 = debugServer.openSession("Texas Instruments XDS110 USB Debug Probe/C28xx_CPU2");

script.traceWrite("Connecting to Each CPU\n");
debugSessionCPU1.target.connect();
debugSessionCPU2.target.connect();

script.traceWrite("Loading Program to CPU1\n");
debugSessionCPU1.memory.loadProgram("CPU1.out");
script.traceWrite("Loading Program to CPU2\n");
debugSessionCPU2.memory.loadProgram("CPU2.out");

script.traceWrite("Running Programs\n");


var dsArray = new Array();
dsArray[0] = debugSessionCPU1;
dsArray[1] = debugSessionCPU2;

debugServer.simultaneous.run(dsArray);
script.traceWrite("Done!");

Hello, 

So with the following code I am hoping to script 

1)Starting a debug sessions

2)Loading both CPU's with their .out files.

3)And running those .out files.

Steps 1 & 2 are working but 3 is not.

Does anybody have any suggestions.

I have tried this in CCS v9.3 & CCS v12.0

* I replaced the actual paths with representative strings*

Thank you!

  • Daniel,

    Our DSS expert is out until next week.  However your script looks ok to me.  You are constructing an array of debugSessions and then running it.

    How do you know that the run is not working?  Do you just never get the "Done!" message, if so do the programs you are loading terminate?  With the run() command you will not get to the next line unless the call returns.  You could place breakpoints somewhere so that the program hits them and then that would cause a return.

    One thing you could try as a temporary workaround is to run each of the sessions independently.  You would not be able to use a normal run as that would have to finish before the second one would run but instead you could use a runAsynch() for the first one and then a normal run() for the second one.  Or use runAsynch() for both, that would ensure that you get to the Done message even if the programs are still running on the device

    debugSessionCPU1.target.runAsynch("CPU1.out");
    debugSessionCPU2.target.run("CPU2.out");
    
    OR
    
    debugSessionCPU1.target.runAsynch("CPU1.out");
    debugSessionCPU2.target.runAsynch("CPU2.out");

    Regards,

    John

  • Typo on my part. runAsynch()

    ccs/ccs_base/scripting/docs/DS_API/index.html