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.

[参考译文] CCS/MSP430G2553:DSS:LoadProgram在n´t CCSv7中使用脚本控制台时无法正常工作

Guru**** 2595770 points
Other Parts Discussed in Thread: CCSTUDIO, MSP430G2553, MSP-FET

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/620227/ccs-msp430g2553-dss-loadprogram-doesn-t-work-using-script-using-scripting-console-in-ccsv7

部件号:MSP430G2553
主题中讨论的其他部件:CCStudio,MSP-FET

工具/软件:Code Composer Studio

你好,

我有以下问题。 我正在开发第一个DDS脚本,以实现软件调试和测试的自动化。 当我通过Windows CMD行( c:\TI\ccsv7\CCS_base\scripting\bin>DSS test_script.js)运行脚本时一切正常,但当我尝试使用CCS脚本控制台(调用loadJSFile C:\Users\Malinowski\ti\workspace\scriptingtst\test_script.js)执行同样的操作时,脚本卡在以下行中并返回加载消息。

错误消息:

MSP430:在长度0x24c的第0页0xc000处写入内存块时出现问题:无法写入设备内存
MSP430:文件加载器:验证失败:目标写入0xC000失败
MSP430:Gel:文件:C:/Users/Malinowski/ti/workspace/scriptingtst/Debugge/scriptingtst.out:加载失败。

脚本:

//将DSS软件包导入我们的命名空间,以便在键入时保存
ImportPackage(Packages.com.ti.debug.engine.scripting)
ImportPackage(Packages.com.ti.ccstudio.scripting.environment)
ImportPackage(Packages.java.lang)

//创建我们的脚本环境对象-它是任何脚本和的主要入口点
//创建其他可脚本服务器和会话的工厂
VAR脚本= ScriptingEnvironment.instance ()

//在当前目录中创建一个日志文件以记录脚本执行
script.traceBegin ("C:/Users/Malinowski/ti/workspace/scriptingtst/BreakpointsTestLog.xml")

//记录所有内容
script.traceSetConsoleLevel (TraceLevel)
script.traceSetFileLevel (TraceLevel)

//测试日志消息
script.traceWrite("success::)")

//创建调试服务器
VAR debugServer = script.getServer("DebugServer.1")

//设置设备CCXML
debugServer.setConfig ("C:/Users/Malinowski/ti/workspace/scriptingtst/targetConfigs/MSP430G2553.CCXML")

//打开调试会话
debugSession = debugServer.openSession(".*")

//连接到目标
debugSession.target.connect()

//加载程序
script.setScriptTimeout(1.5万)
debugSession.memory.loadProgram("C:/Users/Malinowski/ti/workspace/scriptingtst/Debug/scriptingtst.ut")

其他:

MCU:MSP430G2553

调试器:MSP-FET

提前感谢您的帮助:)。

祝你度过美好的一天!

半径

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Radim,

    我不知道是否有另一个正在运行的实例。 您可以尝试调整脚本以检测它是否正在从控制台运行,并让它使用现有的env和DS对象。

    这是一个非常简单的更改,如下所述:
    processors.wiki.ti.com/.../Scripting_Console

    此致,
    John