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.

DSP setup and calls to use loggerSM

Other Parts Discussed in Thread: SYSBIOS, CCSTUDIO

Hello,

I am writing the C674x DSP code for a DM816x.  We're using sysbios 6.32.05.54, and CCS 5.1.0.09000.

We have messages going between the ARM and the DSP using sysLink. I am trying to get a DSP log/print string to appear in the Android logging which is dumped when running "logcat" in the serial port connected to our board. I know that this mechanism works because I have a DSP executable available (not my own) which is doing this kind of logging. It produces strings like this in the logcat output:

"D/mengine (  802): DEBUG dsp[0] #:00030 T:0000000e|81370a65 M:xdc.runtime.Main S:Got something: argc 2 arg "

I am missing something in my own DSP code and cannot get similar output.

I have settings in my .cfg file which seem to be fairly standard. I have put them in the attached file:

I have tried calls in the DSP code of the forms given below, getting the results in the JTAG console window shown in the comment:

    ModTrace(pMod, "ModTrace: received cmd msg: \"%s\"\n", pCmdMsg);
    printf("printf: received cmd msg: \"%s\"\n", pCmdMsg);
    LOGINFO("ACMSC", "what the fruit\n");
    Log_print1(Diags_USER1, "what the fruit?", pcmChanHandle);
    /* console output
    [C674X_0] DEBUG ti[1]: AudCtrlMod[0]: ModTrace: received cmd msg: "rxDgAdjust -3"
    [C674X_0] printf: received cmd msg: "rxDgAdjust -3"
    [C674X_0] INFO  ti[1]: ACMSC: what the fruit
    */
However I do not see the LOGINFO or Log_print1 output in the "logcat" output in the serial port.

I have looked at the example file simpleTask.c in this folder:

C:\CCStudio_v5.1\uia_1_00_03_25\packages\ti\uia\examples\evmti816x

In this file the call is as follows:

Log_print1(Diags_USER1, "count = %d", count++);

What DSP function should be called in order for the logging to be sent via loggerSM to the shared memory which is accessed by my host code? If there is another reference I should look at please let me know. I have been looking at the CCS online help and the System Analyzer User's Guide (spruh43b.pdf).

Thank you,

Annie

  • It looks like the attachment didn't work. I'm cutting and pasting the section of the .cfg file related to logging below (just one other point, I have confirmed in the .map file that the LOGGERSM section is there and at the expected address):

    /* ================ Logger configuration ================ */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Main = xdc.useModule('xdc.runtime.Main');
    var UIAErr = xdc.useModule('ti.uia.events.UIAErr');

    /*
    * 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
    "LOGGERSM". All cores will share this same memory. All cores must have numCores
    and sharedMemorySize be the same value. Note: LOGGERSM memory segment is
    defined in ti/uia/examples/evmTI816X/video/Platform.xdc.
    */
    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\uia\examples\platforms\evmti816x). 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 = "LOGGERSM";
    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";
    //LoggerCircBuf.moduleToRouteToStatusLogger = "ti.sysbios.utils.Load";
    /*
     *  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 * 2;
    LoggingSetup.mainLoggerSize = 1024*1024;
    LoggingSetup.sysbiosLoggerSize = 32768;
    LoggingSetup.sysbiosTaskLogging = false;
    //LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;

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

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

    /*
    * Turn on ANALYSIS for benchmark events and others for Log_print used in app
    */
    /* RUNTIME_ON Diags masks */
    Main.common$.diags_ASSERT = Diags.RUNTIME_ON;
    Main.common$.diags_USER2 = Diags.RUNTIME_ON;
    Main.common$.diags_STATUS = Diags.RUNTIME_ON;
    /* ALWAYS_OFF Diags masks */
    Main.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
    Main.common$.diags_ENTRY = Diags.ALWAYS_OFF;
    Main.common$.diags_EXIT = Diags.ALWAYS_OFF;
    Main.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
    Main.common$.diags_INTERNAL = Diags.ALWAYS_OFF;
    Main.common$.diags_USER1 = Diags.ALWAYS_OFF;
    Main.common$.diags_USER3 = Diags.ALWAYS_OFF;
    Main.common$.diags_USER4 = Diags.ALWAYS_OFF;
    Main.common$.diags_USER5 = Diags.ALWAYS_OFF;
    Main.common$.diags_USER6 = Diags.ALWAYS_OFF;
    Main.common$.diags_USER7 = Diags.ALWAYS_OFF;
    Main.common$.diags_INFO = Diags.ALWAYS_OFF;
    Main.common$.diags_USER8 = Diags.ALWAYS_OFF;

    /* Add this line myself: */
    ServiceMgr.transportType = ServiceMgr.TransportType_FILE;

  • Annie Mac said:
    Main.common$.diags_USER1 = Diags.ALWAYS_OFF;

    Annie,

    The above line is basically disabling Log_print calls to Diags_USER1.  You can change it to Diags.ALWAYS_ON or Diags.RUNTIME_ON with runtime enabling.

    Regards,

    - Rob

     

  • Thank you Rob! With ALWAYS_ON I see the logging I expect. Yay!

    Annie

  • Someone referred me to the Wiki page http://processors.wiki.ti.com/index.php/OMX_Viewing_Media_Controller_Traces . It may help others with similar issues.