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 Can EZSDK omxcore output messages?

Hello everyone!

     I have a question . How can let debug message from omxcore?

SDK:

      ti-ezsdk_dm816x-evm_5_04_00_11.

Requirement:

     How can this message output?(Log_print1(), Log_print2(), etc.....)

\ti-ezsdk_dm816x-evm_5_04_00_11\component-sources\omx_05_02_00_38\src\ti\omx\omxcore\src\omx_core.c (Line 135)

OMX_ERRORTYPE OMX_Init (void)

{
OMX_ERRORTYPE tError = OMX_ErrorNone;

Log_print1 (Diags_ENTRY, "Entering %s: (void)\n", (xdc_IArg) __FUNCTION__);

if (OMX_FALSE == OMX_Core_Context.isInitialized)
{
tError = DomxInit ();
if (OMX_ErrorNone == tError)
{
OMX_Core_Context.isInitialized = OMX_TRUE;
}
if (MultiProc_self () == DomxTypes_coreCortexA8)
{
MEMCFG_ModuleInit();
Thread_start (NULL);
}
}
Log_print2 (Diags_EXIT, "Leaving %s: retVal OMX_ERRORTYPE: %d\n",
(xdc_IArg) __FUNCTION__, tError);

return tError;
}

I had did this :

   1. lookup ttyO2 output.

    2.lookup telnet output .(use loggerSMDump.out 0x9E400000 0x100000 all)

    3.modify the file \ti-ezsdk_dm816x-evm_5_04_00_11\component-sources\omx_05_02_00_38\src\ti\omx\omxutils\omx_utils.h(Line 838)

    

#ifndef __ti__
//#define ENABLE_LINUX_LOGGING
#ifdef ENABLE_LINUX_LOGGING
#define Log_print0(x,y) printf(y);printf("\n")
#define Log_print1(x,y,z1) printf(y,z1);printf("\n")
#define Log_print2(x,y,z1,z2) printf(y,z1,z2);printf("\n")

.......

modify to 

#ifndef __ti__
#define ENABLE_LINUX_LOGGING
#ifdef ENABLE_LINUX_LOGGING
#define Log_print0(x,y) printf(y);printf("\n")
#define Log_print1(x,y,z1) printf(y,z1);printf("\n")
#define Log_print2(x,y,z1,z2) printf(y,z1,z2);printf("\n")

.......

But  Log_print1 (Diags_ENTRY, "Entering %s: (void)\n", (xdc_IArg) __FUNCTION__) this code output message not appear.

So somebody can help me?

How can the message output? or Where to go to view information from this code?

Thank You very much!

  • Hello,

    Can you try with the latest EZSDK 5.05

    You can check here also:

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

    Regards,

    Pavel

  • Thank you for your reply!

    I had follow that guide.

    In step1 : 

    To enable this open makefile in appropriate module and set this slag to 1

    Ex: $(OMX_ROOT)/packages/ti/omx/domx/makefile
    But that Makefile said that:

    #Note: USE_SLOG_PRINT=0 is forced. No other value should be used.
    ifeq ($(CORE),a8host)
    CFLAGS_LOCAL_a8host += -D_LOCAL_CORE_a8host_ -DUSE_SLOG_PRINT=0 -DSLOG_DOMX_Module__MID=0x8001
    CFLAGS_LOCAL_a8host += -DSLOG_DOMXDH_Module__MID=0x8002 -DSLOG_DOMXRPC_Module__MID=0x8003
    CFLAGS_LOCAL_a8host += -DSLOG_DOMXIPC_Module__MID=0x8004
    endif

    I had modify -DUSE_SLOG_PRINT=0 to -DUSE_SLOG_PRINT=1

    then the debug message did not output.

    So I look at step2 from that guide.But I do not understand.

    about this :

     #include <Log.h>
     #include <LoggerSys.h>
    
     #define DIAGS_ALL_MASKS (0xFFFF)
     #define DIAGS_ALWAYS_ON (DIAGS_ALL_MASKS)
     
    
     #define DOMX_Module__MID (0x8001)
     #define DOMXDH_Module__MID (0x8002)
     #define DOMXDH_Module__MID (0x8003)
     #define DOMXIPC_Module__MID (0x8004)
     #define DOMXIPC_Module__MID (0x8004)
     #define LDRMEMCFG_Module__MID (0x8005)
    
     Diags_DictElem Diags_dictElems[] ={
                     {"main", 0x8000, 0x0, 0, DIAGS_ALWAYS_ON},
                     {"domx", DOMX_Module__MID, 0x0, 0, DIAGS_ALWAYS_ON},
                     {"domx-dh", DOMXDH_Module__MID, 0x0, 0, DIAGS_ALWAYS_ON},
                     {"domx-rcm", DOMXDH_Module__MID, 0x0, 0, DIAGS_ALWAYS_ON},
                     {"domx-ipc", DOMXIPC_Module__MID, 0x0, 0, DIAGS_ALWAYS_ON},
                     {"memcfg", LDRMEMCFG_Module__MID, 0x0, 0, DIAGS_ALWAYS_ON},
                     {NULL, 0, 0, 0, 0}
                    };
    
    
    add to where?(which file add this code?)
    
    
    If I Skip this step。
    I do step3:
    And I find that the Makefie of step3 has add this content

    ifeq ($(CORE),a8host)
    CFLAGS_LOCAL_a8host += -D_LOCAL_CORE_a8host_ -DUSE_SLOG_PRINT=1 -DSLOG_DOMX_Module__MID=0x8001
    CFLAGS_LOCAL_a8host += -DSLOG_DOMXDH_Module__MID=0x8002 -DSLOG_DOMXRPC_Module__MID=0x8003
    CFLAGS_LOCAL_a8host += -DSLOG_DOMXIPC_Module__MID=0x8004
    endif

    Then I do the step4

    \ti-ezsdk_dm816x-evm_5_04_00_11\component-sources\omx_05_02_00_38\examples\ti\omx\demos\capture_encode\Makefile

    EXTLIBS_m3video =
    EXTLIBS_m3vpss =
    EXTLIBS_a8host = $(omx_LIBPATH)/../lib/omxcore.av5T \
    $(omx_LIBPATH)/../lib/memcfg.av5T \
    $(omx_LIBPATH)/../lib/domx.av5T \
    $(omx_LIBPATH)/../lib/domx_delegates_shmem.av5T \
    $(omx_LIBPATH)/../lib/timmosal.av5T \
    $(omx_LIBPATH)/../lib/omxcfg.av5T \
    $(osal_PATH)/packages/linuxdist/build/lib/osal.a \
    $(osal_PATH)/packages/linuxdist/cstubs/lib/cstubs.a \
    $(fc_PATH)/packages/ti/sdo/rcm/lib/debug/rcm_syslink.av5T \
    $(fc_PATH)/packages/ti/sdo/fc/memutils/lib/release/memutils.av5T \
    $(osal_PATH)/packages/ti/sdo/xdcruntime/linux/lib/debug/osal_linux_470.av5T \
    $(fc_PATH)/packages/ti/sdo/fc/global/lib/debug/fcsettings.av5T \
    $(syslink_PATH)/packages/ti/syslink/lib/syslink.a_release \
    $(linuxutils_PATH)/packages/ti/sdo/linuxutils/cmem/lib/cmem.a470MV \
    $(uia_PATH)/packages/ti/uia/linux/lib/servicemgr.a
    # $(omx_LIBPATH)/../lib/ldrmemcfg.av5T
    $(slog_PATH)/lib/slog.a \
    $(slog_PATH)/lib/slog_modtbl.a

    OK.

    I start to Make omx.

    But Make omx failed.

    the error message as follow:

    # Building capture_encode executable for core: a8host
    make -C /home/szreach/ti-ezsdk_dm816x-evm/ti-ezsdk_dm816x-evm_5_04_00_11/component-sources/omx_05_02_00_38/examples/ti/omx/demos/capture_encode CORE=a8host
    make[2]: Entering directory `/home/szreach/ti-ezsdk_dm816x-evm/ti-ezsdk_dm816x-evm_5_04_00_11/component-sources/omx_05_02_00_38/examples/ti/omx/demos/capture_encode'
    makefile:38: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
    make[2]: Leaving directory `/home/szreach/ti-ezsdk_dm816x-evm/ti-ezsdk_dm816x-evm_5_04_00_11/component-sources/omx_05_02_00_38/examples/ti/omx/demos/capture_encode'
    make[1]: *** [capture_encodehost] Error 2
    make[1]: Leaving directory `/home/szreach/ti-ezsdk_dm816x-evm/ti-ezsdk_dm816x-evm_5_04_00_11/component-sources/omx_05_02_00_38/src'
    make: *** [omx] Error 2
    [szreach@szreach-desktop ti-ezsdk_dm816x-evm_5_04_00_11]$

    So Can You Help Me?

    Where is wrong?

    Thank You very much!

  • Hello,

    Please try with this file (on different path):

    ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/omx_05_02_00_46/src/ti/omx/domx/domx_util.h

    #ifndef __ti__
    //#define ENABLE_LINUX_LOGGING             <=== Uncomment this line.
    #ifdef ENABLE_LINUX_LOGGING
    #define Log_print0(x,y) printf(y);printf("\n")
    #define Log_print1(x,y,z1) printf(y,z1);printf("\n"..

    .....

    This works for me.

    BR

    Pavel

  • Hi Pavel

     Thank you very much~

    As you said  Uncomment this line.(//#define ENABLE_LINUX_LOGGING)  

    In the beginning of the time。I want to see the omx debug message,I had did that.

    Uncomment that line,have no use. The omx Debug messages do not output!


    Thank you all the same!

  • Hi Pavel

       I'm very sorry, due to my carelessness.

     I find I not updata my APP when I use make omx_install command.

    Uncomment this line.(//#define ENABLE_LINUX_LOGGING)  Can output the debug message..


    Thank You very much.