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.

[参考译文] CODECOMPOSER:Scripting 'Load Program'后跟'Load Symbols'

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1347842/codecomposer-scripting-load-program-followed-by-load-symbols

器件型号:CODECOMPOSER
主题中讨论的其他器件:AM2634

您好!

背景

我使用 AM2634。

我们有一个多核项目、在每个内核上运行一个 FreeRTOS 内核。 但是、其 设计方式(我可能不会选择添加)意味着 Core 1、2和3的 FreeRTOS 任务(因此其相关的应用程序代码)仅链接到 Core 中 0 输出。 内核1、2和3的 FreeRTOS 任务由目标内核通过指向链接到 Core0.out 的函数(任务)的函数指针执行。 每个内核上的代码运行正常、即专为内核2执行的任务实际上仅在内核2上执行。 但是、如果没有额外的调试会话步骤、则无法调试内核1、2和3。

我必须...

  • 从  Core0.out 为 Core0加载程序
  • 从 Core1.Out 中为 Core1加载程序
  • 从  Core2中加载 Core2的程序。out
  • 从  Core3.out 为 Core3加载程序

像往常一样 但是,我必须:

  • 从 Core0.out 加载 Core1的符号
  • 从 Core0.out 加载酷睿2的符号
  • 从 Core0.out 加载 Core3的符号

当然、我只能在调试配置中为每个内核选择一个单个.out 文件、并选择 Load Program 或 Load Symbols、因此目前上述 Load Symbols 步骤都是手动的、不切实际的。

问题 :我能不能以某种方式编写以上所有项目符号步骤吗?

谢谢你。

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

    假设我在本视频中找到了想要的内容: 使用脚本定制调试器启动(youtube.com)

    我制作了一个似乎有效的脚本:

    // Import the DSS packages
    importPackage(Packages.com.ti.debug.engine.scripting)
    importPackage(Packages.com.ti.ccstudio.scripting.environment)
    importPackage(Packages.java.lang)
    
    // Create our scripting environment object
    var script = ScriptingEnvironment.instance();
    
    // Create a debug server
    var debugServer = script.getServer( "DebugServer.1" );
    
    // Set the device ccxml 
    debugServer.setConfig( "AM263x_LockStep.ccxml" );
        
    // Open a debug session for each CPU
    var debugSession_R5_0 = debugServer.openSession("*","Cortex_R5_0");
    var debugSession_R5_1 = debugServer.openSession("*","Cortex_R5_1");
    var debugSession_R5_2 = debugServer.openSession("*","Cortex_R5_2");
    var debugSession_R5_3 = debugServer.openSession("*","Cortex_R5_3");
    
    // Connect the targets.
    debugSession_R5_0.target.connect();
    debugSession_R5_1.target.connect();
    debugSession_R5_2.target.connect();
    debugSession_R5_3.target.connect();
    
    // Load the programs for each core.
    debugSession_R5_0.memory.loadProgram("Core0.out");
    debugSession_R5_1.memory.loadProgram("Core1.out");
    debugSession_R5_2.memory.loadProgram("Core2.out");
    debugSession_R5_3.memory.loadProgram("Core3.out");
    
    // Run to main() on each core.
    debugSession_R5_0.breakpoint.add("main");
    debugSession_R5_0.target.run();
    
    debugSession_R5_1.breakpoint.add("main");
    debugSession_R5_1.target.run();
    
    debugSession_R5_2.breakpoint.add("main");
    debugSession_R5_2.target.run();
    
    debugSession_R5_3.breakpoint.add("main");
    debugSession_R5_3.target.run();
    
    // Load the symbols in Core0.out to the other cores
    debugSession_R5_1.symbol.load("Core0.out");
    debugSession_R5_2.symbol.load("Core0.out");
    debugSession_R5_3.symbol.load("Core0.out");
    

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

    是的、以上脚本看起来不错。