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.

[参考译文] RTOS/CC2650:启用 Log_info()

Guru**** 2618835 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/575927/rtos-cc2650-enable-log_info

器件型号:CC2650

工具/软件: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

    此致、
    文森特

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    有一个建议的答案、由于此主题在一周内未激活、建议的答案被标记为验证。 请随意选择"拒绝回答"按钮、并回复更多详细信息。