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.

Debug Server Scripting (DSS)之JavaScript code无法多核同时run,请求指导

Other Parts Discussed in Thread: CCSTUDIO

我想请教,我想利用TI所提供的Debug Server Scripting (DSS)功能,并透过撰写 JavaScript code来把CCS 5 program downloadDSP (TCI6638K2K)

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

以下是JavaScript code内容:

 

//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;
debugServer.simultaneous.run(dsArray);

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

原来我在CCS5上执行8core的方式是在RUN之前先将8coregroup的动作,再选择grouprun来执行。在JavaScript code是利用simultaneous.run( )function来完成此动作

但我遇到的情况是在”Run program”阶段,8corerun时,发现只能使5core可以同时run,如下图。