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.

Need help in the GEL script to close the Code composer studio application



Hello,

 I am trying to load a GEL file on to the code composer studio v4.10.37 via command prompt as shown below:

C:\PRJ_FOLDER> C:\tic3x4x\cc\bin\cc_app.exe    Load.gel

 The contents of Load.gel is as shown below:

StartUp()

{

   GEL_Load("file.out");

   GEL_Run();

}

 As expected, the GEL file loads and executes the COFF file (file.out) also the result files are generated. But the GUI wont exits and needs manual close.

Hence to exit the GUI, gel command GEL_Exit() is used in the startup code as shown below:

StartUp()

{

   GEL_Load("file.out");

   GEL_Run();

   GEL_Exit();

}

 But this modification loads the the COFF file and executes also  instantly closes the application and results are not generated.

 

Could you please help me to achieve the following via a gel script,

-          Load a COFF file

-          Execute to generate the complete result

-          Exit the Code composer GUI (So that the whole process can be repeated for the next COFF file)

 

Thanks in advance,

Harish Rajanna

  • Hello Harish,

    The issue is because the GEL_Run() call is asynchronous in behavior. It will run the target and return immediately so the GEL_Exit() function will be called right after and shut down CCS.You have two options:

    1) Create some kid of delay (like a for or while loop) after the run that is long enough to delay the call of the GEL_Exit() function until you have your generated results.

    2) If you want to wait until your program halts (reach exit point) before calling GEL_Exit(), call GEL_Exit() in the OnHalt() callback function instead of after the GEL_Run(). OnHalt() will get called by CCS when a running target is halted. Note that I don't know for sure if callback functions were supported in CC 4.10. I think it is but I never really used CC 4.10 so there is a chance that callbacks came afterwards. I have been with TI for over 11 years and CC 4.10 was before my time so it show how old CC 4.10 is :)

    Thanks

    ki

  • I should also mention that GEL_Load() is also asynchronous. You could get in a state when CCS will run before the load is complete. You should use the callback OnFileLoaded() and but the GEL run call in there.

    Example:

    StartUp()

    {

       GEL_Load("file.out");

    }

    OnFileLoaded()

    {

      GEL_Run();

    }

    OnHalt()

    {

      GEL_Exit();

    }