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.

DM8168 Codec Engine enable logging.

Other Parts Discussed in Thread: SYSBIOS

Hi,


I'm (desperately) trying to get the codec engine logging.

I'm using the EZ-SDK for the DM8168, with the NDA version applied.

So far, I haven't been able to view/enable the logging of the codec engine.

I'm using "loggerSMDump.out 0x9E400000 0x100000 all" to see the SM memory partition.

I've tried:

* CE_DEBUG=1

* Changing *.cfg files inside component-sources/omx-ti81xx-src_05_02_00_48/examples/ti/omx/demos/dm816xbm/

I believe the answer will be really simple, but I haven't managed to get any CE related logging so far.

  • Hi Theo,

    Did you try getting trace with one of the Codec Engine examples?  I'm not sure which version of Codec Engine you are using, but if it's 3.21.02.25, you can run the remote universal copy example on the Arm, loading the server on the DSP, as follows:

    CE_DEBUG=2 ./app_remote.xv5T -p DSP -s xe674

    This would give you Codec Engine trace from both the DSP and the Arm.  You should not need to use LoggerSM in this case to get CE trace.

    Best regards,

        Janet

  • Thanks for the answer, Janet, but I'm trying to get some codec engine logging from the M3's.

    As mentioned above, I already tried the CE_DEBUG option, without results.


    Any other ideas?

    I'm using the following versions:

    bios_6_33_05_46
    codec_engine_3_22_01_06
    edma3lld_02_11_05_02
    framework_components_3_22_01_07
    ipc_1_24_03_32
    linuxutils_3_22_00_02
    omx-ti81xx-src_05_02_00_48
    osal_1_22_01_09
    slog_04_00_00_02
    syslink_2_20_02_20
    uia_1_01_01_14
    xdais_7_22_00_03
    xdctools_3_23_03_53

  • Hi Theo,

    Are you running a remote app from the Arm with a server on the M3s?

    Thanks,

        Janet

  • Janet,


    I'm trying to add MJPEG encoding support to the omx layer, which is, afaik, not support by TI.

    I'm using the MJPEG lib from the RDK.

    Most of the work has been done. (I added the library, Added lib to ce server, I added an additional VENC, etc)

    I'm willing to share that piece of code, since it's not really that special.

    However, when I try to instantiate an encoding object, CE simply returns NULL. No error code, nothing. So it's a bit hard to figure out what might be missing.

    Therefore, I'm looking for a way to enable the CE M3 debug messages. I have NDK source access, and I could recompile CE, but I'm convinced that there should be an easier way to enable logging.

  • Hi Theo,

    Could you post just the .cfg file you are using to build the M3 server?  Maybe there is something missing there.  The Codec Engine example server .cfg files include ti/sdo/ce/examples/buildutils/server_log.cfg, which configures the trace.

    Thanks,

        Janet

  • Janet,


    See attachment.

    I tried some changes myself, but they are probably wrong. (If you would compare it against the ezsdk)

    VpsAppMain should be the main app on the M3's

    Thanks in advance.

    omx.tar.gz
  • Hi Theo,

    Maybe you are just missing some run-time code for enabling CE Diags masks.  Normally, when you run a remote app with CE_DEBUG=2, the remote app passes a Diags mask to the server for enabling trace.  But if this is not how you are running your app, you can always enable the trace directly in your server's main() function.  I'm attaching an example server you can look at.

    Best regards,

        Janet

    2364.main.c

  • Thank you for the suggestion.

    I'll try it out asap, and I will let you know the outcome. :)

    (Weekend here, so it'll have to wait until Monday.)

  • Hi Janet,

    I tried your suggestion, and I do get more log output, but I still don't have anything CE related.

    Theo

  • Hi Theo,

    Which log output are you now getting?  My example code just enabled logging for FC and CE, so if you were able to get more log output, I would guess it was from one of those modules.

    Thanks,

        Janet

  • Janet,

    Sorry for the late reply, but I wasn't in the office, thus, I couldn't make the log output.

    I attached my current log content.


    Issue occurs between #:00418 && #00420.

    As can be seen, there is no CE logging. :(

    I won't be able to respond next week, I'll be out of office again.

    omx_log.tar.gz
  • For 'local' BIOS-side-invoked codecs, this might help:
        http://processors.wiki.ti.com/index.php/CE_DEBUG#Usage_for_BIOS

    Chris

  • Another late response. (Sorry)

    I added

    extern __FAR__ Char *ti_sdo_ce_osal_bios_Global_CE_DEBUG;
     
    ti_sdo_ce_osal_bios_Global_CE_DEBUG[0] = '1';
    ti_sdo_ce_osal_bios_Global_CE_DEBUG[1] = '\0';

    Right before CERuntime_init(); inside src/ti/omx/comp/server/src/ivahd_frwkconfig.c


    But still no CE comments.

  • Hi Theo,

    It looks like you're only getting xdc.runtime.Main log events.  I wonder if your Codec Engine log events are going to a logger other than LoggerSM.

    Could you try  if (0) {} 'ing out this code in your VpsAppMain.cfg:

    /*
     *  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";
    LoggerCircBuf.moduleToRouteToStatusLogger = "xdc.runtime.Register";

    /*
     *  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;
    LoggingSetup.mainLoggerSize = 1024*1024;
    LoggingSetup.sysbiosLoggerSize = 32768;

    /* 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;

    and add:

        Defaults.common$.logger = statusLogger;

    Maybe your CE Logs are going to a LoggerCircBuf logger.  Or maybe it's mis-spelling of xdc.runtime.Registry?

    Best regards,

        Janet

  • Janet,


    The first option ("if(0)") doesn't compile.

    The second option ("Registry") doesn't change anything.

    Is there a way that you could reproduce this? Taking an DM8168 evm, and trying to access the CE logs?

  • Hi Theo,

    I'm surprised that removing LoggingSetup, LoggerCircBuf, and ServiceMgr from the .cfg file would cause your program to not build.  Is it possible for you to step through Codec Engine code (eg, Engine_open()) in the debugger, and try to step into the Log statements?  This way, you could see if they are enabled and going to another logger.

    Unfortunately, I don't have the setup to reproduce this problem, so I can only guess what's happening based on previous experiences with not getting Log data.  So, either the module's logging is not enabled, or it is enabled but going to a logger you did not expect.

    Looking at your .cfg files again, I see this in AppLogCfg.cfg:

    Defaults.common$.logger = LoggerSys.create(LoggerSysParams);

    So maybe your Codec Engine logs are going into a LoggerSys logger, and not LoggerSM as you wanted.  Could you try changing that to:

    Defaults.common$.logger = statusLogger;

    in VpsAppMain.cfg, after the line var statusLogger = LoggerSM.create();
    It looks like the xdc.runtime.Registry module's logger is not assigned, so it would be getting the xdc.runtime.Defaults logger.  Hopefully, that is the problem.

    Best regards,

        Janet

  • Janet,

    No luck. Still no logging.

  • Hi Theo,

    Are you able to step into the Codec Engine Log calls with a debugger?

    Thanks,

        Janet