请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS320F280049 工具/软件:Code Composer Studio
您好!
我想使用附加的 DSS 脚本对大约200个 F280049进行编程、并使用链接的 F28对多个 XDS110进行编程。 为了使脚本保持可扩展性、我希望使用数组和循环。 虽然可以轻松创建调试器名称和 CPU 名称的数组、但我不确定调试会话对象的数组。 这在 Java 中甚至是可能的吗?
降低整体编程时间的另一个要点是使用多线程。 这在 DSS 脚本中是可行的吗?
//要在 CCS 中的"View"选项卡下的"Scripting Console"中运行此脚本
//使用"loadJSFile" "用于加载和运行此脚本的命令
//将 DSS 软件包导入我们的命名空间以保存在键入
importPackage (Packages.com.ti.debug.engine.scripting)
importPackage (Packages.com.ti.ccstudio.scripting.environment)
importPackage (Packages.java.lang)
//可配置参数
var deviceCCXMLFile =" /targetConfigs/TMS320F280049.ccxml;
var programToLoad =" /cPU1_RAM/base_F280049.out";
//创建我们的脚本环境对象-这是任何脚本的主要入口点,
//创建其他脚本服务器和会话的工厂
var 脚本= ScriptingEnvironment.instance();
//创建调试服务器
var debugServer = script.getServer ("DebugServer.1");
//为调试器和模块创建具有适当名称的数组
var rack_debugger =["Texas Instruments XDS110 USB Debug Probe";
var rack_modules =["C28xx_CPU1"、
"C28xx_CPU1_0"、
"C28xx_CPU1_1"、
"C28xx_CPU1_2"、"C28xx_CPU1_3"
、"C28xx_CPU1_3"、CPU1_3"
"C28xx_CPU1_4"、
"C28xx_CPU1_5"、
"C28xx_CPU1_6"、"C28xx_CPU1_7"、
"C28xx_CPU1_7"、
"C28xx_CPU1_8"
];
//设置器件 ccxml
debugServer.setConfig (deviceCCXMLFile);
//打开调试会话
debugSession0 = debugServer.openSession ("Texas Instruments XDS110 USB Debug Probe"、"C28xx_CPU1");
debugSession1 = debugServer.openSession ("Texas Instruments XDS110 USB Debug Probe"、"C28xx_CPU1");"Debugu1_CPU1
= Debug_CPU1 ("Texas Instruments XDS28xx Debug_CPU1);"C28xx Debug_CPU1)
debugSession3 = debugServer.openSession("Texas Instruments XDS110 USB Debug Probe"、"C28xx_CPU1_2");
debugSession4 = debugServer.openSession("Texas Instruments XDS110 USB Debug Probe"、"C28xx_CPU1_3");
debugSession5 = debugServer.openSession4
("Texas Instruments XDS110_Debug")"Debug"、"C28xx_USB_C28xx_Probe";"Debug"
debugSession7 = debugServer.openSession("Texas Instruments XDS110 USB Debug Probe"、"C28xx_CPU1_6");
debugSession8 = debugServer.openSession("Texas Instruments XDS110 USB Debug Probe"、"C28xx_CPU1_7");
debugSession9 = debugServer.openSession4 (目标:"debug.sendore2e.connecte2e.tex)
;connecte2e.target.connect.connect.us.connect.connect.
debugSession5.target.connect();
debugSession6.target.connect();
debugSession7.target.connect();
debugSession8.target.connect();debugSession9.target.connect()
;debugSession9.target.connect();
//加载程序
debugSession0.memory.loadProgram( programToLoad );
debugSession1.memory.loadProgram( programToLoad );
debugSession2.memory.loadProgram( programToLoad );debugSession3.memory.loadProgram(
programToLoad );debugSession4.memory.programLoadProgram(
programToLoad );
debugSession5.memory.loadProgram( programToLoad );
debugSession6.memory.loadProgram( programToLoad );
debugSession7.memory.loadProgram( programToLoad );
debugSession8.memory.loadProgram( programToLoad );
debugSession9.memory.loadProgram( programToLoad );
//运行程序
debugSession0.target.runAsynch();
debugSession1.target.runAsynch();
debugSession2.target.runAsynch();
debugSession3.target.runAsynch();
debugSession4.target.runAsynch();
debugSession5.target.runAsynch();
debugSession6.target.runAsynch();
debugSession7.target.runAsynch();
debugSession8.target.runAsynch();
debugSession9.target.runAsynch();
//断开与目标的连接
//debugSession0.target.disconnect();
//debugSession1.target.disconnect();
//debugSession0.terminate();
//debugSession1.terminate();//debugSession1.terminate();
//debugServer.stop();
此致、
Martin