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 Issue

Part Number: PROCESSOR-SDK-TDAX


Tool/software: Code Composer Studio

Hi,

Im using CCS  Version: 6.1.2.00015, im having trouble in using hotmenu_addJSFunction to add menu item in the CCS IDE.

Below is my sample code:

from CCSDebuSession.js i tried to load Gel file

@CCSDebuSession.js

debugSessionM3VIDEO = debugServer.openSession(Emulator);

debugSessionM3VIDEO.target.connect();

debugSessionM3VIDEO.memory.loadProgram(Out_File);

debugSessionM3VIDEO.target.run();

debugSessionM3VIDEO.expression.evaluate('GEL_LoadGel("C:/script.gel")');

from script.gel i put the function dump and the hotmenu_addJSFunction so that i can add a menu item.

@script.gel

function dump(){

var Arrayaddr = mySession.symbol.getAddress("Var_array");

var ArraySize = mySession.expression.evaluate("sizeof(Var_array)"); 

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

}

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

IDE Error/Issue

GEL: Error loading file

line 1: expecting LeftParen, found 'dump'

 unexpected token: "Dump/StartDump"

 unexpected token: "dump()"

Can somebody give advice if how to correctly use the hotmenu_addJSFunction.

Thanks!

Jessie

  • Hi Jess,
    The syntax in script.gel is not GEL syntax. It looks like DSS javascript. You wouldn't use loadGEL for that. You need to use loadJSFile from the scripting console to load a javascript.

    I see you have three separate threads on automation recently. I asusme they are all related. I think I am slowly putting together what your environment looks like. Can you tell me exactly what you are tying to do? If I clearly understand your exact usecase, I can help provide some more concrete help

    Thanks
    ki