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.

Multicore debug script problem



Hi,

I'm trying to debug a 6678 on CCS 5.1.0.09 using a script following these instructions:

http://processors.wiki.ti.com/index.php/Debug_Server_Scripting#Multiple_Debug_Sessions_for_Multi-core_Debug

But when it gets to the line

debugServer.simultaneous.run

I get the error:

Can't find method com.ti.debug.engine.scripting.Simultaneous.run

How can I solve it?

Thanks

  • Hi,

    Could you attach the whole script?

    Thanks

    ki

  • Hi Ki,

    See it attached.

    One thing about the script is that the ccxml file is configured to use the GEL file, so I'm not using it in the script.

    It goes alright until the line with simultaneous.run. If I just go until the load part and run the programs by clicking on the play button in Debug, it works fine. 

    Thanks

    // Board Name: TMS320C6678_0
    // CPU Names : C66xx_0, C66xx_1, C66xx_2, C66xx_3, C66xx_4, C66xx_5, C66xx_6, C66xx_7
    
    // 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();
    
    // Get the Debug Server and start a Debug Session
    debugServer = script.getServer("DebugServer.1");
     
    // Configure target for a C6678 EVM with SD XDS560 USB emulator
    script.traceWrite("Configuring debug server for TMS320C6678 EVM...");
    debugServer.setConfig("C:\\TargetCfgFiles\\EVM6678.ccxml");
    script.traceWrite("Done!");
     
    // Open a debug session for each C6678 CPU
    script.traceWrite("Opening a debug session for cores 0-4 of 6678 ...");
    var debugSessionC0 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_0");
    var debugSessionC1 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_1");
    var debugSessionC2 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_2");
    var debugSessionC3 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_3");
    var debugSessionC4 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_4");
    script.traceWrite("Done!");
    
    // Connect to each C6678 CPU
    script.traceWrite("Connecting to CPUs 0-4 of C6678...");
    debugSessionC0.target.connect();
    debugSessionC1.target.connect();
    debugSessionC2.target.connect();
    debugSessionC3.target.connect();
    debugSessionC4.target.connect();
    script.traceWrite("Done!");
    
    // Load a program for just C6678 Core0
    script.traceWrite("Loading program to C6678 C0...");
    debugSessionC0.memory.loadProgram("C:\\CCS_Workspace\\App0\\Debug\\App0.out");
    script.traceWrite("Done!");
    
    // Load a program for just C6678 Core1
    script.traceWrite("Loading program to C6678 C1...");
    debugSessionC1.memory.loadProgram("C:\\CCS_Workspace\\App1\\Debug\\App1.out");
    script.traceWrite("Done!");
    
    // Load a program for just C6678 Core2
    script.traceWrite("Loading program to C6678 C2...");
    debugSessionC2.memory.loadProgram("C:\\CCS_Workspace\\App2\\Debug\\App2.out");
    script.traceWrite("Done!");
    
    // Load a program for just C6678 Core3
    script.traceWrite("Loading program to C6678 C3...");
    debugSessionC3.memory.loadProgram("C:\\CCS_Workspace\\App3\\Debug\\App3.out");
    script.traceWrite("Done!");
    
    // Load a program for just C6678 Core4
    script.traceWrite("Loading program to C6678 C4...");
    debugSessionC4.memory.loadProgram("C:\\CCS_Workspace\\App3\\Debug\\App4.out");
    script.traceWrite("Done!");
    
    // Run the program for CPUs 0-4 of C6678 simultaneously
    script.traceWrite("Executing program on CPUs 0-4 of C6678...");
    debugServer.simultaneous.run(debugSessionC0, debugSessionC1, debugSessionC2, debugSessionC3, debugSessionC3); // Run CPUs 0-4
    script.traceWrite("Done!");

  • Thank you for attaching the script. I see the issue. Looks like the implementation has changed and the wiki needs to be updated. You need to pass an array of debug sessions to the API

    var dsArray = new Array();
    dsArray[0] = debugSessionC0;
    dsArray[1] = debugSessionC1;
    dsArray[2] = debugSessionC2;
    dsArray[3] = debugSessionC3;

    // Run the program for CPUs 0-4 of C6678 simultaneously
    script.traceWrite("Executing program on CPUs 0-4 of C6678...");
    debugServer.simultaneous.run(dsArray);

    Thanks

    ki