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.
我想请教,我想利用TI所提供的Debug Server Scripting (DSS)功能,并透过撰写 JavaScript code来把CCS 5 program download到DSP (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上执行8颗core的方式是在RUN之前先将8颗core做group的动作,再选择group按run来执行。在JavaScript code是利用simultaneous.run( )的function来完成此动作
但我遇到的情况是在”Run program”阶段,8颗core在run时,发现只能使5颗core可以同时run,如下图。
另外3个核是停在哪里的呢?(截图太小看不清楚),首先要保证code正常加载了哦。为了排除是脚本问题,能不能只加载下3 4 56 7core并run,看能否成功
我已确定code正常加载了,8个core加载后,并试着只run core 4 , 5, 6, 7,会出现不会run,只停留在8个core加载完毕的状态
我试了好几个case,发现只要JavaScript 中有run core 6,7,就会出现只停留在8个core载入完毕的状态(都不会run),难道project 的properties要特别设定甚么吗?
或是DSS中有一些核心数量的限制条件?
我从其他数据找到2个core的JavaScript 写法是跟我一样,只是我是用在8个core
(参考连结: Multiple Debug Sessions for Multi-core Debug)
这问题困扰好久了
再麻烦解惑
谢谢