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.

[参考译文] CCS/LAUNCHXL-CC26X2R1:printf ()在闪存模式下不工作(但"调试模式"正常工作)

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/966612/ccs-launchxl-cc26x2r1-printf-not-work-in-flash-mode-but-debug-mode-work-fine

器件型号:LAUNCHXL-CC26X2R1

工具/软件:Code Composer Studio

您好!

我们的客户存在以下问题:

我尝试在"console:CIO window"中使用"printf()" show,当我使用"CCS 调试模式"时,它运行正常!
"printf()"和"led 闪存"会定期闪烁并按照我的代码执行操作。

但当我使用 CCS 闪存模式(单击闪存图标)时、"printf()"只显示一次、但 LED 也定期闪烁、
有什么错误吗? 我使用 Code Composer Studio 10.1.1.00004和更低版本是我的代码、
谢谢!

#include
#include
#include
#include
#include
#include
#include
#include "ti_drivers_config.h"

/*
*==== mainThread ====
*
void * mainThread (void * arg0)

uint32_t 时间= 1;
GPIO_init();
GPIO_setConfig (CONFIG_GPIO_LED_0、GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
GPIO_WRITE (CONFIG_GPIO_LED_0、CONFIG_GPIO_LED_ON);

while (1){
printf ("通过 printf\n"Hello world via printf\n");
GPIO_TOGGLE (CONFIG_GPIO_LED_0);
睡眠(时间);

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

    使用 CIO 机制的 printf 需要设置一个断点、CCS 调试器在目标恢复前暂停时从目标读取消息。

    "CCS 闪存模式"是什么意思?

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

    Roland、

    在 CCS 中点击"flash"(运行方式)按钮仅用于对器件进行编程。  它不会启动调试会话。 因此、您不会看到任何 printf 输出、因为没有连接调试器。

    如果要进行调试、则需要单击调试按钮。

    此致、

    John