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.

DSS logging “GEL_TextOut” to a file

Hi,
 
In my DSS (Java) I am using “CIOlogging” function to capture the log. I am able to capture the log from running a *.out file but I could not capture the log from running the GEL files. So How to log the output from the GEL file running in DSS.  
 
Regards
Antony 
  • Antony,

    Capturing output from file is one of the big limitations of GEL.  The output goes to the console in CCS.  If you move the commands to your DSS script you can use the traceWrite commands there which will end up in the log.

    Regards,

    John

  • John,

    Myself & Antony are working on this, we are having a DSS java script which loads GEL file to run a "memtest", we want to log the memtest reasult (basically GELtextout ) to a file using DSS java script.Previously we were using *.out program for the memtest and using the CIOlogging we were able to capture the log, but the CIOlogging doesn't working for the GEL fille output logging. 

    Do we have a other logging method for capture the GEL file output in DSS ?

    Thanks in advance,

    Regards,

    Karthi

  • Karthi,

    Sorry it has been a while since I have worked with DSS.  

    beginCIOLogging and endCIOLogging are only applicable to C I/O, i.e. printf...

    I was playing around with GEL_TextOut() this morning and I do see the output in log if I am calling the GEL_TextOut from DSS.

    i.e. if I have a line like this:

    debugSession.expression.evaluate("GEL_TextOut(\"hello\")");

    Then I see this in my log:

    MSP430: GEL Output: hello

    Next I tried having the calls in a GEL file

    Inside the OnTargetConnect() function in my GEL file I have

    GEL_TextOut( "Startup Sequence\n\n" );

    GEL_TextOut( "Startup Complete\n\n" );

    In my log I see:

    MSP430: GEL Output: Startup Sequence


    MSP430: GEL Output: Startup Complete

    Thus it does look like you can get GEL_TextOut() output in the log.  You can direct your log to a file, but not just the GEL_TextOut portion.

    John

  • Rafael found another option that might be more what you are looking for.

    There is a GEL function GEL_EnableFileOutput() that allows you to direct GEL_TextOut to file.  I stuck this in a GEL file and can config that even when the function is called from DSS that the output does go to the file. The last 2 parameters are for if you want to append to an existing file or not and if you also want to send the output to the console in CCS.

    Here is an example:

    GEL_EnableFileOutput("C:\\Temp\\test.log", 1, 1);

  • Yes you are right, and presently I am using the "GEL_EnableFileOutput()" but issue is I am calling the GEL funtion in DSS script and want to log the results for various external parameters, so I will call the same gel file for different other settings thus I need to change the log file name accordingly.

    with "GEL_EnableFileOutput()" I can't have the file name as variable !

     

    Reagrds,

    Karthi

     

  • Karthi - if you are calling "GEL_EnableFileOutput()" from DSS via expression.evaluate API, then you can use a variable in your script when constructing the expression string (GEL call) to evaluate.


    ex (in javascript):

    var fileName;

    expression.evaluate('GEL_EnableFileOutput("' + fileName + '",1,1)');

    If GEL_EnableFileOutput() is being called from a GEL file, then you cannot do this as this is a known limitation of GEL.

    thanks

    ki

  • Ki,

    Thanks for the solution and I could able to use variable in the file name as well as capture the log from GelTexout using,

    expression.evaluate('GEL_EnableFileOutput("' + fileName + '",1,1)');

    But I am not able to capture the same log (from Geltextout) using CIOlogging ! 

    Regards,

    Karthi

  • Karthikeyan Dhalapathi said:
    But I am not able to capture the same log (from Geltextout) using CIOlogging ! 

    See John's previous post:

    JohnS said:
    beginCIOLogging and endCIOLogging are only applicable to C I/O, i.e. printf...

    He also mentioned other alternatives. Please re-read his post.

    Thanks

    ki

  • John,

    I tried CIO logging to capture the GELTextOut() but mine is not working ! the log file is created but it empty nothing is logging. I could see the GEL_TextOut on the console window (Power Shell) but its not logging into the file.

    ---------------------------------------------------

    debugSession.expression.evaluate('GEL_LoadGel("C:/Userdata/Karthi/EVMs.gel")');

    // Write to CPSR register to reset the mode to supervisor mode
    debugSession.memory.writeRegister('CPSR', 0x1D3);

    debugSession.beginCIOLogging("./log/CIO_LOG.txt");

    //to test the logging
    debugSession.expression.evaluate("GEL_TextOut(\"hello\")");

    try
    {
    // run the script in loaded GEL
    debugSession.expression.evaluate("Sys_Init()");
    }

    catch(logException)
    {
    java.lang.System.exit(0);
    }

    ------------------------------------

    Am I missing something in the script above ?

    Regards,

    Karthi

  • Karthi,

    There are different types of logs.

    GEL_TextOut() output will NOT show up in the log file you specify with beginCIOLogging().  This log is online for C I/O as in printf output from the C runtime library.

    GEL_TextOut output will go to the regular DSS log.   More information on this log is available here: http://processors.wiki.ti.com/index.php/DSS#Logging

    Regards,

    John