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/processor-SDK-TDAX:hotmenu_addJSFunction问题

Guru**** 2542680 points


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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/581330/ccs-processor-sdk-tdax-hotmenu_addjsfunction-issue

部件号:processor-SDK-TDAX

工具/软件:Code Composer Studio

您好,

IM Using CCS  Version: CCS.JS, im在使用2.0.0015万 功能添加6.1 IDE中的菜单项时遇到问题。

下面是我的示例代码:

我尝试从CCSDebugSession.js加载gel文件

@CCSDebugSession.js

debugSessionM3VIDEO = debugServer.openSession(Emulator);

调试SessionM3VIDEO.TARGET.CONNECTE();

调试SessionM3VIDEO.MEMORY.loadProgram(Out-File);

debugSessionM3VIDEO.target.run();

debugSessionM3VIDEO.Expression.Evaluate ('gel_LoadGel("C:/script.gel")');

在script.gel中,我放置了函数dump和 hotmenu_addJSFunction,以便可以添加菜单项。

@script.gel

函数dump(){

VAR Arrayaddr = mySession.symbol.getAddress("var_array");

VAR ArraySize = mySession.Expression.Evaluate ("sizeof (var_array)");  

mySession.memory.saveBinary (Arrayaddr,0,ArraySize,Dump_Filletxt);

}

hotmenu_addJSFunction("Dump/StartDump","dump()");

IDE错误/问题

GEL:加载文件时出错

第1行:期待LeftParen,找到'dump'

 意外标记:"dump/StartDump"

 意外标记:"dump()"

是否有人建议如何正确使用 hotmenu_addJSFunction.

谢谢!

杰西

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好,Jess:
    script.gel中的语法不是gel语法。 它类似于DSS javascript。 您不会使用loadGEL来实现这一目的。 您需要使用脚本控制台中的loadJSFile来加载javascript。

    我看到您最近在自动化方面有三个单独的线程。 我想他们都是相关的。 我想我正在慢慢地整理您的环境。 您能准确地告诉我您要做什么吗? 如果我清楚地了解您的具体使用情况,我可以帮助您提供一些更具体的帮助

    谢谢
    KI