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.

Codec Server does not print DEBUG message



Hi,

I've added this line in the main.c of my codec server:

Log_print0(Diags_ENTRY, "Welcome to Server's main()");

However I cannot see the 'welcome' message in the output console after executing

CE_DEBUG=2 ./app_remote.xv5T -s xe674 | tee info.txt

What is missing?

Regards,
gaston

  • Gaston,

    Do you have the following code in your server's .cfg file?

    // Set up logging for Servers.
    // By default, the server logs are circular buffers where
    // Log statements are written. The RMS server extracts the data from the
    // circular buffer, and passes it to the client upon request.
    var Diags = xdc.useModule('xdc.runtime.Diags');

    // Set up the System support proxy
    var System = xdc.useModule('xdc.runtime.System');
    System.SupportProxy = xdc.useModule('ti.sdo.ce.utils.syscbuf.SysCBuf');
    // ... else, if you want to see the trace in the server's CIO buf, uncomment this
    //System.SupportProxy = xdc.useModule('xdc.runtime.SysStd');

    // Choose the logger that prints thread ID
    var LoggerSys = xdc.useModule('ti.sdo.utils.loggers.LoggerSysTID');

    var LoggerSysParams = new LoggerSys.Params();

    // Set up the timestamp
    var Timestamp = xdc.useModule('xdc.runtime.Timestamp');

    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    Defaults.common$.logger = LoggerSys.create(LoggerSysParams);

    // Set Main diags to RUNTIME_ON.
    xdc.useModule('xdc.runtime.Main');
    Diags.setMaskMeta('xdc.runtime.Main', Diags.ALL, Diags.RUNTIME_ON);

    // Enable logging for metaonly modules
    var Registry = xdc.useModule('xdc.runtime.Registry');
    Diags.setMaskMeta("xdc.runtime.Registry", Diags.ALL, Diags.RUNTIME_OFF);

    To get trace from the DSP, the server needs to be built with SysCBuf, which prints trace into a buffer whose contents are passed up to the Arm.  The codec engine server examples include the file ti/sdo/ce/examples/buildutils/server_log.cfg which contains the code above.

    If you have this code in your .cfg file, but you're still not getting trace, you can post the .cfg file so we can take a look at it.

    Best regards,

        Janet

  • Janet.

    It works. I've modified the server .cfg file as you suggested and I can see the log messages from the remote (DSP) server side. Now I'd like to go further by adding trace prints in my codec rt3d.c file as follows:

    TRACE_6print(handle, TRACE_ENTER,
                "RT3D_DS_process> Enter (h=0x%x, inBufs=0x%x, "
                "outBufs=0x%x, inOutBufs=0x%x, inArgs=0x%x, outArgs=0x%x)\n", h,
                inBufs, outBufs, inOutBufs, inArgs, outArgs);

    What do I have to do to see this message?

    Regards,
    gaston

  • Gaston,

    I answered a similar question on the forum awhile back here:

    http://e2e.ti.com/support/embedded/bios/f/355/p/145079/592343.aspx#592343

    (start at about the 6th message in the post).  Basically you need to implement the functions:

        extern XDAIS_TRACE_AssertFxn XDAIS_TRACE_assert;
        extern XDAIS_TRACE_PrintFxn XDAIS_TRACE_print;

    defined in ti/xdais/trace.h.  You then link your implementation into your server.  Your implementation of would call System_printf(), which outputs to the circular trace buffer that is read by the host.  You can find the source code on the post I referred to.

    Best regards,

        Janet