请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:CODECOMPOSER 工具与软件:
您好!
CCS 20.0.1.
我如何设置 CCS 调试器以从不同的文件加载程序和符号?
假设我具有通过具有签名等的可执行文件形成的十六进制记录 、以及具有符号的 ELF 输出文件、但不包含所有其他数据。 我想能够将十六进制记录编程到目标闪存中、并且只从 out 文件加载符号。 在 CCS 中如何做到这一点?
此致、
尤金
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 20.0.1.
我如何设置 CCS 调试器以从不同的文件加载程序和符号?
假设我具有通过具有签名等的可执行文件形成的十六进制记录 、以及具有符号的 ELF 输出文件、但不包含所有其他数据。 我想能够将十六进制记录编程到目标闪存中、并且只从 out 文件加载符号。 在 CCS 中如何做到这一点?
此致、
尤金
如何设置 CCS 调试器以从不同文件加载程序和符号?
这不是仅通过启动配置支持的。
您可以让启动引用要加载的 hex 文件、然后使用初始化脚本加载符号或其他相关操作。
您碰巧有此选项的初始化脚本示例吗?
我花了一些时间尝试找出最佳选择、在这过程中我发现了一些问题 、我希望未来的 CCS 版本能够修复这些问题。 我能够解决这些问题。
现在效果最好的做法是让无工程启动配置仅引用初始化脚本、然后让脚本完成其余操作(加载十六进制和符号)。
对于启动配置、它可以如下所示:
{
"name": "f280049c.ccxml",
"type": "ccs-debug",
"request": "launch",
"targetConfig": "/d:/SCRATCH/targetConfigs/f280049c.ccxml",
"initializationScript": "C:/Users/user/workspace_ccstheia2/gpio_ex2_toggle/init.js"
}
然后初始化脚本:
ds = initScripting();
session = ds.openSession("Texas Instruments XDS110 USB Debug Probe/C28xx_CPU1");
session.target.connect();
// A bug causes memory.loadProgram() to get blocked when loading hex files. Hence using GEL_Load() as workaround
//session.memory.loadProgram("C:/Users/user/workspace_ccstheia2/gpio_ex2_toggle/CPU1_RAM/gpio_ex2_toggle.hex");
session.expressions.evaluate('GEL_Load("C:/Users/user/workspace_ccstheia2/gpio_ex2_toggle/CPU1_RAM/gpio_ex2_toggle.hex")');
session.expressions.evaluate('GEL_SymbolLoad("C:/Users/user/workspace_ccstheia2/gpio_ex2_toggle/CPU1_RAM/gpio_ex2_toggle.out")');
// initialization scripts will not return unless the debug server instance for it is shutdown. CCS should remove this dependency inthe future.
ds.shutdown();
这将为启动 config 启动调试会话、并调用 init.js 脚本以连接到目标、加载十六进制文件、然后加载符号。