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.

SYS/BIOS Data Logging

Good morning,

i'm using CCS v5.3 for DSP C6457.

Actually i'm using the Log_infoX() in order to notify the program execution.

Actually i have the necessity to differentiate the Logger. (as for the LOG_printf(&log1...LOG_printf(&log2, in the CCS v3.3).

Is possible to have multiple TAB in order to differentiate the program Log and collect them?

Thanks in advance.

 

Fabio

 

 

  • Fabio,

    Unfortunately, I do not see a way to support routing Log_info() calls to different LoggerBuf instances.

    However, if all you need are TWO different log paths, you can configure a LoggerBuf.statusLogger and use Log_errorX() calls to route to it, and Log_infoX() calls to route to the other.

    For instance, to configure a statusLogger:

        var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
        Program.global.statusLogger = LoggerBuf.create();
        LoggerBuf.statusLogger = Program.global.statusLogger;

       Program.global.mainLogger = LoggerBuf.create();
       var Main = xdc.useModule('xdc.runtime.Main');
       Main.common$.logger = Program.global.mainLogger;

    In your C code, Log_errorX() calls will be routed to "statusLogger", and Log_infoX() calls will be routed to "mainLogger".

    Alan

  • You can get a different logger instance by using the xdc.runtime.Registry module also.

    Todd

  • Thank you Alan for the information.

    But i read that if i use SYS/BIOS, the procedure to be used is by means of LoggingSetup and is necessary to remove all LoggerBuf. Isn't it?

    My necessity is sent to different logger the informations from different module of my application. (by means Log_writeX(),,or Log_erroX(),,etc).

     

    How to use LoggingSetup for different Loggers?

    Thanks and regards

    Fabio

     

     

     

  • Hi Todd,

    i'm using SYS/BIOS with C6457 DSP.

    I read that if I use SYS/BIOS, i mus use LoggingSetup and remove any LoggerBuff in my CFG.

    Now, wich is the correct procedure to use SYS/BIOS an multiple Logger.

    For example i want to send some information to Logger myDATALOAD from an acuisition procedure of my application, and send other info to myELABDATA logger.

    How is possible to create two logger (while using SYS/BIOS), and sent info (Log_xxxx) to them?

     

    Thanks in advance

     

    Fabio

     

     

  • Hi Fabio,

    It is possible to log data to different Logger instances using the UIA Log_iprintnUC, Log_iinfonUC, etc, APIs.  You will
    see these APIs in <UIA_INSTALL_DIR>/packages/ti/uia/runtime/LogUC.h.  The UC stands for "unconditional", since
    these APIs don't test the Diags mask before logging.

    Here is an example of configuration code to do "instance based" logging:

    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');

    Program.global.appLogger = LoggerBuf.create();
    Program.global.infoLogger = LoggerBuf.create();

    var Main = xdc.useModule('xdc.runtime.Main');
    Main.common$.logger = Program.global.appLogger;

    You must be careful to make sure that if you use instance based logging in a module, that all logging done
    in that module uses the same type of Log.  For example, you cannot mix LoggerBuf and LoggerSys in the
    same module, otherwise your program will probably crash.  That is why I set Main.common$.logger to one
    of the LoggerBuf instances, since I am using the instance based logging in my app.

    Here is the example code in the .c file:

    /* Include UIA's LogUC.h file instead of xdc/runtime/Log.h */
    #include <ti/uia/runtime/LogUC.h>

    /* include declarations of Logger instances */
    #include <xdc/cfg/global.h>

    Void main()
    {
        Log_iprintUC0(appLogger, "Log_iprintUC0()");

        Log_iinfoUC0(infoLogger, "Log_iinfoUC0()");

        BIOS_start();

        /* Fall into BIOS idle loop */
        return;
    }

    You should be able to see the output in the different LoggerBuf instances using ROV.

    Best regards,

        Janet

  • Hi Janet,

    i try to make your indication but it don't work. In particoular it don'find Log_iinfoUC0 and Log_iprintUC0.

    It know only Log_infoUC0(). (in ....packages/ti/uia/runtime/LogUC.h).

    How i can resolve it?

    But with LoggingSetup is not possible to add loggers and send to them my application info?

    Best regards.

     

    Fabio

     

     

     

  • Hi Fabio,

    You must have an older version of UIA, then.  This feature is available in UIA 1.02 and higher.  Is it
    possible for you to use a newer version?  For example, if you install CCS 5.4, you should get UIA 1.03.

    Best regards,

        Janet

  • Hi Janet,

    i have UIA 1_01...etc. I will update it.

    But i want to ask to you if the CCS 5.4 is relesed or is a Beta version. Because the UIA 1.3 require SYS/BIOS 6.35 (and i have 6.34) and SYS/BIOS 6.35 require CCS v 5.4.

    Where i find the link to CCS v5.4 in order to download it?

    Thanks and best regards

    Fabio.

  • Yes, you would BIOS 6.35 with UIA 1.03.  I found the CCS 5.4 Beta releases here:

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

    That will come with BIOS 6.35 and UIA 1.03.

    Best regards,

        Janet

  • Just a note -- the CCS team is hoping to post the final version of CCS 5.4 tomorrow, so you should pick that up and move off the beta as soon as you can.