Hi all,
I am working on developing an embeded system which processor is 6671 with SYS/BIOS. I want to use Log_pinrtX or Log_infoX to display some message in my code. However, no matter what I tried, I can not get the correct output result using Log.
Below is the code relevant to log in my project. And I am using JTAGRUNMode.
--------------------------------.cfg file---------------------------------
var System = xdc.useModule('xdc.runtime.System');
SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
LoggingSetup.loadLoggerSize = 1024;
LoggingSetup.sysbiosHwiLogging = true;
LoggingSetup.sysbiosSwiLogging = true;
LoggingSetup.sysbiosTaskLogging = true;
var Load = xdc.useModule('ti.sysbios.utils.Load');
Load.hwiEnabled = false;
Load.swiEnabled = false;
var Log = xdc.useModule("xdc.runtime.Log");
Load.common$.instanceSection = null;
Load.common$.diags_INFO = xdc.module("xdc.runtime.Diags").ALWAYS_ON;
LoggingSetup.mainLoggerSize = 32768;
var LoggerCircBuf = xdc.useModule('ti.uia.runtime.LoggerCircBuf');
//add by new
var loggerCircBuf0Params = new LoggerCircBuf.Params();
loggerCircBuf0Params.transferBufSize = 2048; //zitianjia
loggerCircBuf0Params.instance.name = "loggerCircBuf0";
Program.global.loggerCircBuf0 = LoggerCircBuf.create(loggerCircBuf0Params);
LoggingSetup.loadLogger = Program.global.loggerCircBuf0;
LoggingSetup.mainLogger = Program.global.loggerCircBuf0;
LoggingSetup.sysbiosLogger = Program.global.loggerCircBuf0;
LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGRUNMODE;
-------------------------------------------------------------------------------------------------------------------------
In this case, I could not use Log_infoX or Log_printX anywhere( In main function or other Task I customized ). Otherwise I can get the wrong message in console, like below:
[C66xx_0]ti.sysbios.knl.Semaphore: line 204: assertion failure: A_badContext: bad calling context. Must be called from a Task.
[C66xx_0] xdc.runtime.Error.raise: terminating execution
I need your help, and thanks in advance.
Leo