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.

How to get log from the DSP in DM8168 ?

Dear all,

I need to debug an OMX component that I developed that runs on the DSP, but I do not see any log from the DSP side, even for the VLPB component or other similar components running on the DSP. I tried to follow the instructions in the site http://processors.wiki.ti.com/index.php/OMX_Viewing_Media_Controller_Traces, but I do not get any output related to the DSP in the loggerSMDump utility. Am I missing something?

I am a z3 ezsdk build for the DM8168, and omx version 05_02_00_48.

Thanks,

Danillo

  • Hello,

    Make sure that you make this change in the file /examples/ti/omx/demos/dm81xx/DspAppMain.cfg, add the following at the end and recompile DSP firmware:

    /* ====================================================== */
    /* ================ Logger configuration ================ */
    /* ====================================================== */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Load = xdc.useModule('ti.sysbios.utils.Load');
    Load.hwiEnabled = false;
    Load.swiEnabled = false;
    /*
    * Create a static task for M3 UIA configuration
    */
    var taskParams = new Task.Params();
    taskParams.instance.name = "uiaServerTask";
    task_params.stackSize = 0x6000;
    Task.create('&uiaServerTask', taskParams);
     /*
     *  Create a LoggerSM instance and use it for all logging. Make sure it is at the same section
     for all cores (DSP, Video, VPSS) and not put anything else in "LOGGER_SM". All cores will
     share this same memory. All cores must have numCores and sharedMemorySize be the same value.
     */
    var LoggerSM = xdc.useModule('ti.uia.runtime.LoggerSM');
    LoggerSM.partitionId = 0;
    LoggerSM.bufSection = ".loggerSM";
    LoggerSM.sharedMemorySize = 0x00100000;
    LoggerSM.numPartitions = 3;
    LoggerSM.decode = true;
    LoggerSM.overwrite = false;
    var statusLogger = LoggerSM.create();
     /*
     *  Make sure the section is in LOGGERSM (defined in
     *  ti\omx\build\MemSegmentDefinition.xs). Also make sure it is a NOLOAD
     *  section. This avoids wiping out another cores logger memory when more
     *  than one cores is loaded.
     */
    Program.sectMap[".loggerSM"] = new Program.SectionSpec();
    Program.sectMap[".loggerSM"].loadSegment = "LOGGER_SM";
    Program.sectMap[".loggerSM"].type = "NOLOAD";
     /*
     *  Plug the LoggerSM logger into LoggerCircBuf. All STATUS events
     *  and logs from Main will go to the LoggerSM instance
     */
    LoggerCircBuf = xdc.useModule('ti.uia.runtime.LoggerCircBuf');
    LoggerCircBuf.statusLogger = statusLogger;
    LoggerCircBuf.filterByLevel = true;
    LoggerCircBuf.moduleToRouteToStatusLogger = "xdc.runtime.Main";
     /*
     *  Use LoggingSetup which uses UploadMode_JTAGSTOPMODE as the
     *  default. Increase the Log sizes.
     *
     *  Configuration done by the application is still honored (e.g. setting
     *  up the common$.diags mask).
     *
     *  Please refer to the ti.uia.sysbios.LoggingSetup module for more
     *  details and configuration options.
     */
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.loadLoggerSize = 1024*10;
    LoggingSetup.mainLoggerSize = 1024*1024;
    LoggingSetup.sysbiosLoggerSize = 32768*10;
     /* Use the a transport to move the records to MCSA */
    LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_NONJTAGTRANSPORT;
     /* ================ UIA configuration ================ */
    /*
     *  The default is to have a single core. This example is a multi-core
     *  example. So UIA must be told to act accordingly.
     */
    var ServiceMgr = xdc.useModule('ti.uia.runtime.ServiceMgr');
    ServiceMgr.topology = ServiceMgr.Topology_MULTICORE;
    ServiceMgr.transportType = ServiceMgr.TransportType_NULL;
     /* The HOST is the master UIA processors */
    ServiceMgr.masterProcId = 3;
     /* The application is using the UIA benchmark events. */
    var UIABenchmark  = xdc.useModule('ti.uia.events.UIABenchmark');
     var UIAStatistic = xdc.useModule('ti.uia.events.UIAStatistic');
     /*
     * Turn on ANALYSIS for benchmark events and others for Log_print used in app
     */
    /* RUNTIME_ON Diags masks */
    Main.common$.diags_USER1 = Diags.RUNTIME_ON;
    /* RUNTIME_OFF Diags masks */
    Main.common$.diags_ANALYSIS = Diags.RUNTIME_OFF;
    Main.common$.diags_ENTRY = Diags.RUNTIME_OFF;
    Main.common$.diags_EXIT = Diags.RUNTIME_OFF;
    Main.common$.diags_USER2 = Diags.RUNTIME_OFF;
    Main.common$.diags_USER3 = Diags.RUNTIME_OFF;
    Main.common$.diags_USER4 = Diags.RUNTIME_OFF;
    Main.common$.diags_USER5 = Diags.RUNTIME_OFF;
    Main.common$.diags_USER6 = Diags.RUNTIME_OFF;
    Main.common$.diags_USER7 = Diags.RUNTIME_OFF;
    Main.common$.diags_INFO = Diags.RUNTIME_OFF;
    Main.common$.diags_USER8 = Diags.RUNTIME_OFF;
    /* Turning Semaphore logging off */
    Semaphore.common$.diags_USER1 = Diags.RUNTIME_OFF;
    Semaphore.common$.diags_USER2 = Diags.RUNTIME_OFF;


    You should rebuild the example also and execute ./loggerSMDump.out 0x9e400000 0x100000 dsp.

    Make sure that you have copy/paste the DSP firmware which you could find here ti-ezsdk/component-sources/omx_05_02_00_48/bin/dm81xx/bin/ti816x-evm
    after the recompile.

    Let me know the result.

    Best Regards,
    Margarita

  • Hi Danillo,

    I am able to see prints from DSP after modifying DSPAppMain.cfg accoriding to the link you shared.

    In omx_adec.c I included  <xdc/runtime/Log.h>

    and used Log_print1(Diags_USER1, :%d\n", x); I am able to see prints when I executed

    LoggerSMDump 0x9e400000 0x100000 dsp

    Did you add Log_print to traces the variables?

    Thanks

    Ram

  • Margarita,

    thanks for your answer. I have done the modifications on the DspAppMain.cfg before, with no effect. What I did not realize is that the DSP executable was not being copied to the appropriate location, even after I issued a make omx_install. I then copied the executable file from the directory you indicated into the directory on the target /usr/share/ti/ti-media-controller-utils/. I also renamed the file (which had a _debug extension) to the name dm816x_cxdsp.xe674, and moved the original files dm816x_cxdsp.xe674 and dm816x_cxdsp.xe674.gz to a different directory. Now I am seeing the log file output.

    Thanks again!

    Danillo

  • Hello,

    I am glad that issue is solved.

    If you need further details let us know.

    Best Regards,

    Margarita