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.
I want to use TI provided Debug Server Scripting (DSS) function, and through write JavaScript code to the CCS 5 program download to the DSP (TCI6638K2K)
-------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------
The following is the JavaScript code content
//To execute this script, simply type in the following line in the script console
//loadJSFile D:\DSP_code\DSP_Lite\start_USB560M_DSPLiteTx_X100.js
// 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)
//change the directory path into your project location
importPackage(Packages.org.eclipse.core.resources);
env.setCurrentDirectory("D:/wkspc_Ue_BAND0_v1.0");
// 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 = ScriptingEnvironment.instance();
// Get the Debug Server and start a Debug Session
debugServer = script.getServer("DebugServer.1");
// Configure target for a Blackhawk USB560-M Emulator_0
script.traceWrite("Configuring debug server for TCI6638...");
debugServer.setConfig("D:/wkspc_Ue_BAND0_v1.0/Ue_RxCore0123.ccxml");
script.traceWrite("Done!");
// Open a debug session for each TCI6638 CPU
script.traceWrite("Opening a debug session for all TCI6638 cores...");
debugSession0 = debugServer.openSession("Texas Instruments XDS2xx USB Emulator_0/C66xx_0");
debugSession1 = debugServer.openSession("Texas Instruments XDS2xx USB Emulator_0/C66xx_1");
debugSession2 = debugServer.openSession("Texas Instruments XDS2xx USB Emulator_0/C66xx_2");
debugSession3 = debugServer.openSession("Texas Instruments XDS2xx USB Emulator_0/C66xx_3");
debugSession4 = debugServer.openSession("Texas Instruments XDS2xx USB Emulator_0/C66xx_4");
debugSession5 = debugServer.openSession("Texas Instruments XDS2xx USB Emulator_0/C66xx_5");
debugSession6 = debugServer.openSession("Texas Instruments XDS2xx USB Emulator_0/C66xx_6");
debugSession7 = debugServer.openSession("Texas Instruments XDS2xx USB Emulator_0/C66xx_7");
script.traceWrite("Done!");
// Connect to each TCI6638 CPU
script.traceWrite("Connecting to all TCI6638 CPUs...");
debugSession0.target.connect();
debugSession1.target.connect();
debugSession2.target.connect();
debugSession3.target.connect();
debugSession4.target.connect();
debugSession5.target.connect();
debugSession6.target.connect();
debugSession7.target.connect();
script.traceWrite("Done!");
//======================= load program ================================
//--------- Device 1 -----------
script.traceWrite("Loading program to CPU 0...");
debugSession0.memory.loadProgram("/Ue_coreC/Debug/Ue_coreC.out");
script.traceWrite("Done!");
script.traceWrite("Loading program to CPU 1...");
debugSession1.memory.loadProgram("Ue_coreD/Debug/Ue_coreD.out");
script.traceWrite("Done!");
script.traceWrite("Loading program to CPU 2...");
debugSession2.memory.loadProgram("/Ue_coreE/Debug/Ue_coreE.out");
script.traceWrite("Done!");
script.traceWrite("Loading program to CPU 3...");
debugSession3.memory.loadProgram("/Ue_coreF/Debug/Ue_coreF.out");
script.traceWrite("Done!");
script.traceWrite("Loading program to CPU 4...");
debugSession4.memory.loadProgram("/Ue_coreA/Debug/Ue_coreA.out");
script.traceWrite("Done!");
script.traceWrite("Loading program to CPU 5...");
debugSession5.memory.loadProgram("/Ue_coreB/Debug/Ue_coreB.out");
script.traceWrite("Done!");
script.traceWrite("Loading program to CPU 6...");
debugSession6.memory.loadProgram("/Ue_coreG/Debug/Ue_coreG.out");
script.traceWrite("Done!");
script.traceWrite("Loading program to CPU 7...");
debugSession7.memory.loadProgram("/Ue_coreH/Debug/Ue_coreH.out");
script.traceWrite("Done!");
//======================= Run program ================================
var dsArray=new Array();
dsArray[0]=debugSession0;
dsArray[1]=debugSession1;
dsArray[2]=debugSession2;
dsArray[3]=debugSession3;
dsArray[4]=debugSession4;
dsArray[5]=debugSession5;
dsArray[6]=debugSession6;
dsArray[7]=debugSession7;
script.traceWrite("End Scripint session!");
-------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------
But "Run program" phase, can not run eight core simultaneously , only five core can run, as shown below.
As I mentioned earlier, it seems like the programs for the first 5 cores are unable to reach main. What I would like to know is if you manually just load each program to each core, are they all able to reach 'main' and stay halted there? Do all the programs have a 'main'?
user4735746 said:i try another way, i use "debugSession0.target.run();" run command, one by one sequential run multi-core, but only first core can auto-run.
//======================= Run program ================================
debugSession0.target.run();
debugSession1.target.run();
debugSession2.target.run();
debugSession3.target.run();
debugSession4.target.run();
debugSession5.target.run();
debugSession6.target.run();
debugSession7.target.run();
If the first core is not reaching main, the call would just be blocked since it is a synchronous run call.