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/TMS320F240: CCS/TMS320F240

Part Number: TMS320F240


Tool/software: Code Composer Studio

Hello,

           I have some automated test scripts that were written in gel using GEL_system function. I am able to run the test inside of Code Composer 4.10 (which is very older version) via the GEL Files window. The test script executes and i see the data is logging in to GEL Window(Refer below snapshot), but the DOS commands passed in to "GEL_System" are not executing. Need help to resolve this issue.

For Example Test script is having below mentioned Commands:
GEL_System("if exist output.txt del output.txt");
GEL_System("echo -------------------------------------------- >>output.txt");
GEL_System("echo Test Case ID : XXXXX >>output.txt");
GEL_System("echo -------------------------------------------- >>output.txt");


Issue: While test script is executing it is observed that data is logging in to GEL Windows, but data is not redirecting to output.txt .
( output.txt is generating with zero bytes) 

Thanks & Regards,

Subramanyam Venna.

  • Hello,

    I am unable to reproduce this issue. I am using CCv4.10 and copied your example to a GEL file and executed the commands. It generated a "output.txt" file in the same location as the gel file and it has the proper content:

    I'm not sure what the discrepancy is. Please provide the full GEL file being used and how the commands are called (when the GEL script is loaded?).

    Thanks

    ki

  • Hello Ki,
    Please find the script below, i was not facing this issue, but recently i am seeing this abnormal behavior.


    menuitem "MSTP20"

    hotmenu START_HERE()
    {
    GEL_OpenWindow("INSTRUCTIONS");
    GEL_TextOut("Step 1: Ensure Executable.out file \n", "INSTRUCTIONS", 0);
    GEL_TextOut(" placed into the target PC (Drive A:)\n\n", "INSTRUCTIONS", 0);
    GEL_TextOut("Step 2: Select: \n", "INSTRUCTIONS", 0);
    GEL_TextOut(" GEL->MSTP20->LoadCOFF\n\n", "INSTRUCTIONS", 1);
    }

    hotmenu LoadCOFF()
    {
    GEL_CloseWindow("INSTRUCTIONS");

    GEL_SymbolLoad("A:\\Executable.out");
    GEL_Reset();
    GEL_Restart();

    GEL_OpenWindow("RUN1INSTRUCT");
    GEL_TextOut("Step 9: Select: \n", "RUN1INSTRUCT", 0);
    GEL_TextOut(" GEL->MSTP20->Run1\n\n", "RUN1INSTRUCT", 1);
    }

    hotmenu Run1()
    {
    GEL_CloseWindow("RUN1INSTRUCT");
    GEL_System("if exist output.txt del output.txt");
    GEL_System("echo -------------------------------------------- >>output.txt");
    GEL_System("echo Test Case ID : XXXXX >>output.txt");
    GEL_System("echo -------------------------------------------- >>output.txt");

    GEL_System("ccperl getresults.pl");
    GEL_System("ccperl gelout.pl %s", "BlankLine");
    GEL_System("echo --------- End Test --------- >>output.txt");

    GEL_System("rename output.txt MSTP20.log");
    }


    Thanks & Regards,
    Subramanyam Venna.
  • Thanks.
    The above script works fine (other than the system dependent ones (loading of the symbol file and the ccperl calls) ). I have a file called MSTP20.log in the same directory as the gel file, and with valid content.

    Just to confirm, the file is being generated, it is just that the file is blank (0KB)? Also what Windows version are you using?

    Thanks
    ki
  • Hello Ki,

                      The file "output.txt' is generating with 0KB. As per my observation, system commands specified in GEL_System function are executing. when i manually run the system commands on DOS prompt its working, but not from GEL_System function via gel script.

    Windows Version: XP Service Pack3.

    Thanks,
    Subramanyam Venna.

  • Hello Ki,

                      The file "output.txt' is generating with 0KB. As per my observation, system commands specified in GEL_System function are  not   executing.

    when i manually run the system commands on DOS prompt its working, but not from GEL_System function via gel script.

    Windows Version: XP Service Pack3.

    Thanks,
    Subramanyam Venna.

  • If an output.txt file is getting generated, then it sounds like the system commands via GEL are indeed being executed. It is more of an issue of the execution now working as expected. The script is fine since it work fine for me (also on Windows XP SP3). What kind of permissions do you have on your PC? Administrator?
  • I have Administrator privileges in that PC and having read and write access to the Parent folder where the scripts exist. I have tried below mentioned commands in Gel command window and the responses as mentioned below:

    GEL_System("echo -------------------------------------------- >>output.txt");   

    Response:   Displayed the content in GEL output window but just created "output.txt'  with zero bytes in parent directory

    GEL_System("if exist output.txt del output.txt"); 

     Response:   Displayed the content in GEL output window, but 'output.txt' is not deleted from parent directory.

    Thanks & Regards,

    Subramanyam Venna.

  • Subramanyam, it really does look like CCS is passing the command to the system, but that the execution of the commands is not fully succeeding. Does a GEL_System("dir") output the directory to the console?
  • Hello,
    I haven’t heard back from you, hence this issue is being closed. If you wish to continue the discussion, please post a reply with an update below (or create a new thread).

    Thanks,
    ki