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.

String concatenation in GEL



I want to dynamically create stings in GEL.

What I really want to do is dynamically create a file name so when GEL stops I can save a file with a different name. I can't figue out a way to build a string.

Another thing that would work is if the time were imbedded in the string. I found that %t is the current time but it doesn't expand that from GEL_Save... and the file name part of the call of GEL_Save....

  • What you are trying to do is not possible with GEL. That is one of the limitations of it. Please describe your use case and version number of CCS so i can suggest some alternatives.

    Thanks

    ki

  • We are actually using CCS 3.3 (I know it's old and our local FAE tells us to switch to CCS5 but this is an automotive safety related project and if we switched a whole lot of testing would need to be re-done.)

    But I'm looking at a couple solutions. Have 25 lines in the GEL file with 25 different file names since GEL can't create a unique file name. And I was also looking at creating a file which contained unique file names and read file names from a file but then it wasn't clear that I could make that file name show up in the GEL_Save... command.

    It also looked like I could save the string and create the string within the actual DSP code but then I would need to load the string library to the real time DSP code and I don't think we have room or real time for that in the actual DSP code.

    I've also seen something about a PERL or JAVA script option. That sounded like it would work but I've not used that before so I'm hoping you could point me to a really good tutorial on how those work if they are an option.

     

  • DLR said:
    We are actually using CCS 3.3 (I know it's old and our local FAE tells us to switch to CCS5 but this is an automotive safety related project and if we switched a whole lot of testing would need to be re-done.)

    A big benefit for moving to v5 is that you can start using javascript over GEL inside the CCS debug environment. Javascript can easily handle all string concantenation you are looking to do.

    DLR said:

    But I'm looking at a couple solutions. Have 25 lines in the GEL file with 25 different file names since GEL can't create a unique file name. And I was also looking at creating a file which contained unique file names and read file names from a file but then it wasn't clear that I could make that file name show up in the GEL_Save... command.

    It also looked like I could save the string and create the string within the actual DSP code but then I would need to load the string library to the real time DSP code and I don't think we have room or real time for that in the actual DSP code.

    Yes GEL is quite limited with regards to what you are trying to do, however...

    DLR said:
    I've also seen something about a PERL or JAVA script option. That sounded like it would work but I've not used that before so I'm hoping you could point me to a really good tutorial on how those work if they are an option.

    With CCSv3.3, you could only use PERL or javascript with CCScripting:

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

    If you are doing all this in the context of some automated testing, CCScripting could be the solution you are looking for.

    Thanks

    ki