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.

Unlaoding and reloading OMX components

Hello, 

I am using EZSDK 5.05.02 on the EVM. My program is an IL application that loads two simultaneous capture streams and serves them using HLS. I am testing whether stream 0 (on VIP1) can be unloaded and restarted without affecting stream 1 (on VIP2).

I have been seeing some strange behavior. It will unload and restart once every time, but subsequent attempts seem to hang up when attempting to free the handle to the AAC encoder.

I've attached a log file, but I don't know if it will show anything, I don't see any reference to the DSP components in there.

An interesting data point: If I am not reading the logger messages, I can restart exactly once. Any further attempts will fail.

If I open a telnet window and dump the logger messages I am able to restart 7 or 8 times before failing. This leads me to believe there is some  kind of synchronization error between the components.

Has anyone seen this, any advice on things to try?

Thanks, Rob

6886.log.txt

  • Hello Rob,

    Robert Dahlgren1 said:
    I've attached a log file, but I don't know if it will show anything, I don't see any reference to the DSP components in there.

    To view the DSP trace you should add in file DspAppMain.cfg:

    /* ====================================================== */
    /* ================ 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 shall recompile.
    To see the logs execute:
    ./loggerSMDump.out 0x9E400000 0x100000 dsp

    Best Regards,
    Margarita