工具/软件: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.
谢谢!
杰西