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.

enabling dsp trace

Hi,
  How do you enable dsp side trace to see codec engine GT trace messages? I am trying to run examples/apps/video_copy/dual_cpu on dm6446 with a modified memory map (changed app tcf accordingly) but app.out hangs with the following trace output
 
# CE_TRACE="*=01234567" TRACE_UTIL_VERBOSE=2  ./app.out in.dat out.dat
TraceUtil> Warning: Failed to open local log file "trace/cearmlog.txt", using stdout
TraceUtil> Warning: Failed to open dsp CE log file "trace/cedsp0log.txt", using stdout
TraceUtil> Warning: Failed to open dsp/bios log file "trace/bioslog.dat", disabling log
@0x00044954:[T:0x4003a6e8] CE - Engine_open('video_copy', 0x0, 0xbefffc78)
@0x00044d6c:[T:0x4003a6e8] CE - rserverOpen('./video_copy.x64P'), count = 0
@0x0004504d:[T:0x4003a6e8] OP - Process_create> Enter(imageName='./video_copy.x64P', attrs=0xbefffbf8)
@0x000455d8:[T:0x40945b60] OP - daemon> thread created.
@0x00046197:[T:0x40945b60] OP - Process_create_d> Enter(proc=0x25548)
@0x000464b5:[T:0x40945b60] OP - Process_create_d> Initializing DSP PROC...
@0x00046f1b:[T:0x40945b60] OP - Process_create_d> Attaching to DSP PROC...
@0x000477fb:[T:0x40945b60] OP - Process_create_d> Opening MSGQ pool...
@0x00047d76:[T:0x40945b60] OP - Process_create_d> Loading ./video_copy.x64P on DSP (2 args)...
@0x000500b3:[T:0x40945b60] OP - Process_create_d> Starting DSP PROC...
@0x00050dcb:[T:0x40945b60] OP - Process_create_d> Opening remote transport...
@0x000512dc:[T:0x40945b60] OP - Process_create_d> return (1)
@0x0005165d:[T:0x4003a6e8] OP - Process_create> return (0x25548)
@0x0005193a:[T:0x4003a6e8] CE - rserverOpen('./video_copy.x64P'): 0x2466c done.
@0x00051c2a:[T:0x4003a6e8] OC - Comm_create> Enter(queueName='video_copy', msgqQueue=0x25528, attrs=0x0)
@0x00052125:[T:0x4003a6e8] OC - Comm_create> return (0x25580)
@0x0005240e:[T:0x4003a6e8] OC - Comm_alloc> Enter(poolId=0x0, msg=0x25534, size=576)
@0x00052730:[T:0x4003a6e8] OC - Comm_alloc> return (0)
@0x000529fc:[T:0x4003a6e8] OC - Comm_locate> Enter(queueName='rmsq', msgqQueue=0x25524)

My current settings are
-----------------------------------
server/video_copy/video_copy.cfg
/* activate BIOS logging module */
var LogServer = xdc.useModule('ti.sdo.ce.bioslog.LogServer');
-----------------------------------
server/video_copy/main.c
changed to
GT_set("*=01234567");
instead of GT_set("servers.video_copy=01234567");
-----------------------------------
app/video_copy/dual_cpu/ceapp.cfg
changed tracing to
TraceUtil.attrs = TraceUtil.FULL_TRACING;
instead of SOCRATES_TRACING

added TraceUtil.attrs.dspTraceMask = "";
-----------------------------------
app/video_copy/dual_cpu/ceapp.c
makes a call to TraceUtil_start(engineName)


Thanks

  • What version of Codec Engine?  I want to say use CE_DEBUG as it disables TraceUtils (and therefore eliminates much of the complexities it introduces) and automatically handles retreiving and displaying the DSP-side trace.

    (Frankly, with the lack of support for the SoC Analyzer, I'm not sure anyone should use TraceUtils anymore...)

    Chris

  • Hi,

       This is for CE 1.02 part of dvevm_1_10, umm yes it is very old - i need to update to later version by booting through host pc, at the moment I just want to get some test apps running. I was following the suggestions mentioned on this thread

    http://www.mail-archive.com/davinci-linux-open-source@linux.davincidsp.com/msg03269.html

     

    I think CE_DEBUG was introduced in CE 2.0 so I can't use with my current setup.

     

    Thanks,

     

  • K.  Generally, support for a 4 yr old product - especially a very early 1.0x product - will be a bit spotty... but I'll try.

    The good news is that TraceUtils might be your friend in this pre-CE_DEBUG world - that will provide the energy for periodically retrieving the DSP-side trace.  And these two lines, although they look like errors, show that both ARM and DSP side traces will be sent to stdout rather than a file:

    TraceUtil> Warning: Failed to open local log file "trace/cearmlog.txt", using stdout
    TraceUtil> Warning: Failed to open dsp CE log file "trace/cedsp0log.txt", using stdout

    [ Not that you want to get rid of those error, but I think if you mkdir a 'trace' subdirectory under your app, these errors would go away and the trace would be sent to a file.  Might be best to leave it sent to stdout for now - up to you. ]

    So let's look at some of the remaining [all ARM-side at this point] trace:

    @0x00044954:[T:0x4003a6e8] CE - Engine_open('video_copy', 0x0, 0xbefffc78)
    @0x00044d6c:[T:0x4003a6e8] CE - rserverOpen('./video_copy.x64P'), count = 0
    @0x0004504d:[T:0x4003a6e8] OP - Process_create> Enter(imageName='./video_copy.x64P', attrs=0xbefffbf8)
    @0x000455d8:[T:0x40945b60] OP - daemon> thread created.
    @0x00046197:[T:0x40945b60] OP - Process_create_d> Enter(proc=0x25548)
    ...
    @0x000512dc:[T:0x40945b60] OP - Process_create_d> return (1)
    @0x0005165d:[T:0x4003a6e8] OP - Process_create> return (0x25548)
    @0x0005193a:[T:0x4003a6e8] CE - rserverOpen('./video_copy.x64P'): 0x2466c done.
    @0x00051c2a:[T:0x4003a6e8] OC - Comm_create> Enter(queueName='video_copy', msgqQueue=0x25528, attrs=0x0)
    @0x00052125:[T:0x4003a6e8] OC - Comm_create> return (0x25580)
    @0x0005240e:[T:0x4003a6e8] OC - Comm_alloc> Enter(poolId=0x0, msg=0x25534, size=576)
    @0x00052730:[T:0x4003a6e8] OC - Comm_alloc> return (0)
    @0x000529fc:[T:0x4003a6e8] OC - Comm_locate> Enter(queueName='rmsq', msgqQueue=0x25524)

    This shows that the DSP image appears to be loaded ok, and the Comm_locate() request is hanging forever.  This is deep in the ARM-side of Engine_open() trying to locate a presumably-at-this-point-DSP-booted-and-created communications pipe (a MSGQ - named 'rmsq') and that locate request never returns.  This is often b/c the memory maps aren't lined up right and the shared-memory-based communication between the processors isn't occurring.

    So, per your original question, it's not that we're failing to print any DSP-side traces... we're don't even have the communications between the processors going yet.  FWIW, this communication happens inside the DSPLINKMEM section of memory - double/triple check your DSP/ARM memory map configs.

    In newer releases we have things like createFromServer() to help with memory map config, and our friend CE_DEBUG to help with the tracing... if you need more reasons to update to something newer than the Bush era.  :P

    Chris

  • Hi,

       Thanks for the detailed clarification! I thought i had setup the memory map correctly -looks like I was wrong! I will take a look it. I wanted to try a sample app with the version dvevm/dvsdk thats on the board first.

    I appreciate your help!

    Thanks