I've added this line in the main.c of my codec server:
Log_print0(Diags_ENTRY, "Welcome to Server's main()");
However I cannot see the 'welcome' message in the output console after executing
CE_DEBUG=2 ./app_remote.xv5T -s xe674 | tee info.txt
What is missing?
Do you have the following code in your server's .cfg file?
// Set up logging for Servers.// By default, the server logs are circular buffers where// Log statements are written. The RMS server extracts the data from the// circular buffer, and passes it to the client upon request.var Diags = xdc.useModule('xdc.runtime.Diags');// Set up the System support proxyvar System = xdc.useModule('xdc.runtime.System');System.SupportProxy = xdc.useModule('ti.sdo.ce.utils.syscbuf.SysCBuf');// ... else, if you want to see the trace in the server's CIO buf, uncomment this//System.SupportProxy = xdc.useModule('xdc.runtime.SysStd');// Choose the logger that prints thread IDvar LoggerSys = xdc.useModule('ti.sdo.utils.loggers.LoggerSysTID');var LoggerSysParams = new LoggerSys.Params();// Set up the timestampvar Timestamp = xdc.useModule('xdc.runtime.Timestamp');var Defaults = xdc.useModule('xdc.runtime.Defaults');Defaults.common$.logger = LoggerSys.create(LoggerSysParams);// Set Main diags to RUNTIME_ON.xdc.useModule('xdc.runtime.Main');Diags.setMaskMeta('xdc.runtime.Main', Diags.ALL, Diags.RUNTIME_ON);// Enable logging for metaonly modulesvar Registry = xdc.useModule('xdc.runtime.Registry');Diags.setMaskMeta("xdc.runtime.Registry", Diags.ALL, Diags.RUNTIME_OFF);
To get trace from the DSP, the server needs to be built with SysCBuf, which prints trace into a buffer whose contents are passed up to the Arm. The codec engine server examples include the file ti/sdo/ce/examples/buildutils/server_log.cfg which contains the code above.
If you have this code in your .cfg file, but you're still not getting trace, you can post the .cfg file so we can take a look at it.
It works. I've modified the server .cfg file as you suggested and I can see the log messages from the remote (DSP) server side. Now I'd like to go further by adding trace prints in my codec rt3d.c file as follows:
TRACE_6print(handle, TRACE_ENTER, "RT3D_DS_process> Enter (h=0x%x, inBufs=0x%x, " "outBufs=0x%x, inOutBufs=0x%x, inArgs=0x%x, outArgs=0x%x)\n", h, inBufs, outBufs, inOutBufs, inArgs, outArgs);
What do I have to do to see this message?
I answered a similar question on the forum awhile back here:
(start at about the 6th message in the post). Basically you need to implement the functions:
extern XDAIS_TRACE_AssertFxn XDAIS_TRACE_assert; extern XDAIS_TRACE_PrintFxn XDAIS_TRACE_print;
defined in ti/xdais/trace.h. You then link your implementation into your server. Your implementation of would call System_printf(), which outputs to the circular trace buffer that is read by the host. You can find the source code on the post I referred to.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.