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.

Unable to load GEL automatically within Target Debug Configuration

I am using CCS 5.3.00090, and generating a project RTSC, XDC, SYS/BIOS 6, etc. targeting the C6655.

I have not been successful in loading a GEL file via the Initialization Script mechanism within a debug configuration.  I want to configure DDR3 upon on-connect so that application can be loaded and executed directly from DDR3 memory.

Can a GEL file be loaded via a debug configuration using this "initialization script" mechanism?

The online docs says that this "initialization script" is for a DSS script, but I would like to use it to load a GEL file to perform CCS event-based target configuration.  How?

At the moment I have had to resort to starting debug session, connect target, wait for application to load into DDR3, disconnect target, manually load GEL File interactively, connect target again which now configures DDR3 via GEL on_connect, then load application code to DDR3.  This works, but is quite a tedious process.

Any help would be greatly appreciated.

-George

 

 

  • Hi George,

    George Lathrop said:

    Can a GEL file be loaded via a debug configuration using this "initialization script" mechanism?

    The online docs says that this "initialization script" is for a DSS script, but I would like to use it to load a GEL file to perform CCS event-based target configuration.  How?

    There is a DSS API that allows you to call GEL functions (expression.evaluate() ). You can use that API to call GEL_LoadGel()

    debugsession.expression.evaluate('GEL_LoadGel("C:/path/to/myfile.gel")')

    George Lathrop said:
    At the moment I have had to resort to starting debug session, connect target, wait for application to load into DDR3, disconnect target, manually load GEL File interactively, connect target again which now configures DDR3 via GEL on_connect, then load application code to DDR3.  This works, but is quite a tedious process.

    Why not add the GEL file to your target configuration file as a GEL startup script? This will autoload the GEL file when launching the debug session.

    Thanks

    ki

  • Ki,

    You asked...

    Why not add the GEL file to your target configuration file as a GEL startup script? This will autoload the GEL file when launching the debug session.

    My original intent was to do just that, i.e. use a GEL file to do target configuration automatically upon entering a debug session.

    Your "expression.evaluate()" suggestion is promising to address this very issue.

    Upon adding the following line to the inialization script of my debug configuration...

    debugsession.expression.evaluate('GEL_LoadGel("C:/path/to/myfile.gel")')

    ...and entering a debug session I see the following output to the console and obviously no GEL file loaded... 

    missing ) after argument list

    What is wrong with this syntax?

     

  • The syntax should be fine. At least the syntax in the example I provided (just checked it out and it works). Please provide exactly how you are calling the API.

    Thanks

    ki

  • Ki,

    The following command string provided by you has been entered verbatim into the Initialization Script text entry box within my Debug Configuration's "Main tab" screen within CCS 5.3.00090

    debugsession.expression.evaluate('GEL_LoadGel("C:/path/to/myfile.gel")')

    I have literally used your syntax and created the path specified C:/path/to/myfile.gel that you provided.  I've renamed my GEL and placed in this path.

    Hopefully this is what you're looking for.

    Thanks for the help,

    -George

     

  • George Lathrop said:
    The following command string provided by you has been entered verbatim into the Initialization Script text entry box

    The field is for a DSS script, not a DSS API call. It is not a command line interpreter for DSS APIs. You need to write an actual DSS script and create the scripting environment, instances of the debug server and debug session and then call the API.

    See the DSS wiki:

    http://processors.wiki.ti.com/index.php/Debug_Server_Scripting

    I created an example script for you. Just change the last line to your GEL file. I renamed the *.js extension to a *.txt. You have to rename it back

    // Import the DSS packages into our namespace to save on typing
    importPackage(Packages.com.ti.debug.engine.scripting);
    importPackage(Packages.com.ti.ccstudio.scripting.environment);
    importPackage(Packages.java.lang);
    
    // Create our scripting environment object - which is the main entry point into any script and
    // the factory for creating other Scriptable ervers and Sessions
    var script = ScriptingEnvironment.instance();
    
    // Get the Debug Server and start a Debug Session
    debugServer = script.getServer("DebugServer.1");        
    debugSession = debugServer.openSession(".*");
    
    // Load GEL file
    debugSession.expression.evaluate('GEL_LoadGel("C:/path/to/myfile2.gel")');

    If you just solely want to work with GEL, I suggest you instead add the GEL file to your target configuration file. That would be the simpler option for you.

    Thanks

    ki