Logging via UART [message #1022581] |
Fri, 22 March 2013 03:00  |
Eclipse User |
|
|
|
Hello,
I want to use Log interface to display real time logs via UART.
I have created an UART-PRUSS driver for OMAPL platform in order to realize background log streaming via UART.
And I configured cfg file to hook "flush" function :
var Log = xdc.useModule('xdc.runtime.Log');
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var SysMin = xdc.useModule('xdc.runtime.SysMin');
var System = xdc.useModule('xdc.runtime.System');
var Main = xdc.useModule('xdc.runtime.Main');
/* Create LoggerBuf instance and bind it to Default */
LoggerBuf.TimestampProxy = xdc.useModule('xdc.runtime.Timestamp');
LoggerBuf.enableFlush = true;
var LoggerBufParams = new LoggerBuf.Params;
var logger0 = LoggerBuf.create(LoggerBufParams);
Defaults.common$.logger = logger0;
/* Enable USER1 diags in Main module */
Main.common$.diags_USER1 = Diags.ALWAYS_ON;
/* Hook for Flush logs */
System.SupportProxy = SysMin;
SysMin.outputFxn = "&PRUSS_UARTDVR_put"; /* This is my UART-PRUSS driver code */
And then, Log_print in Application :
Log_print0(Diags_USER1, "Hellow\n");
With this code, the control did not come to PRUSS_UARTDVR_put()...
Could you please suggest me what is wrong in my code ?
Best Regards,
Kawada
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04158 seconds