工具/软件:TI-RTOS
大家好、
我需要执行哪些步骤(包括、定义、初始化?) 以便使用 Log_info()。
此致、
Rui Costa;
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.
工具/软件:TI-RTOS
大家好、
我需要执行哪些步骤(包括、定义、初始化?) 以便使用 Log_info()。
此致、
Rui Costa;
尊敬的 Rui:
LOG_INFOR()由 RTSC (http://rtsc.eclipse.org/docs-tip/Main_Page)中的 XDC 运行时实现 、以允许模块为自己记录信息。 要调用它、您需要在 C 代码中包含 XDC/runtime /Log.h。 要进行设置、需要使用.cfg 文件中的记录器对日志模块进行配置:
VAR 默认值= xdc.useModule('xdc.runtime.Defaults');
VAR 诊断= xdc.useModule('xdc.runtime.Diags');
VAR 日志= xdc.useModule('xdc.runtime.Log');
/*覆盖所选模块的诊断掩码*/
xdc.useModule('xdc.runtime.Main');
Diags.setMaskMeta("xdc.runtime.Main"、
diags.info、
diags.always_on);
/*创建记录器*/
VAR LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var logerBufP =新 LoggerBuf.Params();
logerBufP.numEntry = 64;/* 64个条目= 2KB 存储器*/
VAR appLogger = LoggerBuf.create (logerBufP);
appLogger.instance.name ="AppLoger";
/*设置默认记录器*/
Defaults.common$.logger = appLogger;
有关日志模块 的更多详细信息、请参阅 XDC 运行时文档:rtsc.eclipse.org/.../Log.html
此致、
文森特