TI中文支持网
TI专业的中文技术问题搜集分享网站

CC1310: CC1310

Part Number:CC1310

CC1310 IAR 怎么使用printf函数 打印调试信息  通过串口输出

ruo guo:

terminal IO 可以打印 但是速度特别慢

,

Nick Sun:

您好,

我们这边建议您参考如下帖:https://e2e.ti.com/support/wireless-connectivity/other-wireless-group/other-wireless/f/other-wireless-technologies-forum/15869/how-to-print-to-debugger-console-in-iar。

具体您应该参考您的IAR user manual。

我们这边还建议您可以尝试使用TI的CCS,在官方的Resource Explorer中有相关Debug Printing的介绍讲解:https://dev.ti.com/tirex/explore/node?node=A__ANhb8wLgMuaIL980opkRTQ__com.ti.SIMPLELINK_ACADEMY_CC13X0SDK__1FaRUBA__LATEST&search=debugging。

,

ruo guo:

使用Display_printf可以输出 但是输出的带有行列数据 怎么可以直接输出打印数据 不需要行列数据

,

Nick Sun:

您好,

关于这部分您需要查看您使用版本的IAR的相关文档。比如IAR C/C++ Development Guide的FORMATTERS FOR PRINTF部分。

,

ruo guo:

关于Display_printf的这部分是ti的相关软件模块吧  和IAR应该没啥关系

,

Nick Sun:

您好,

我们工程师建议您也可以使用串行端口的显示 API,或者您可以直接使用 UART 驱动程序中的 UART 写入。(You can use the display APIs for the serial port as well, or you can directly use UART write from the UART driver. ) 以下是示例。

https://dev.ti.com/tirex/explore/node?node=A__ALP9mnlWHKUDYR9Hs7qYMA__com.ti.SIMPLELINK_CC13X0_SDK__eCfARaV__LATEST
https://dev.ti.com/tirex/explore/node?node=A__ALhOmMyWEbkPYNCOoPsvUQ__com.ti.SIMPLELINK_CC13X0_SDK__eCfARaV__LATEST

,

ruo guo:

Display_printf 就是 display中api 但是输出的数据需要带有部分无关数据 这部分数据可以去掉不  就是第二个回复

,

Nick Sun:

您好,

帮您同步给工程师,有结论及时联系您。

,

ruo guo:

请问下 System_printf 可以映射到串口输出打印数据吗

,

Nick Sun:

您好,

跟进的消息也同步给工程师了,有答复及时联系您。

感谢您的支持。

,

Nick Sun:

您好,

收到工程师的回复:

我们刚刚尝试了我之前给的链接的 display_cc1310 示例。

我只是通过删除打印循环计数器的示例中的默认打印语句来修改示例 。(I just modified the example by removing the default print statement in the example which prints the loopcounter.)

// Display_printf(hSerial, ledPinValue ? 0 : 1, 0, "LED: %s",
// (ledPinValue == Board_GPIO_LED_ON) ? serialLedOn : serialLedOff);
Display_printf(hSerial, DisplayUart_SCROLLING, 0, "Hi");

以上是串行终端的结果。这里没有问题,Display_printf 工作正常。(The above was the result in serial terminal. There is no garbage here. Display_printf works fine.)

https://dev.ti.com/tirex/explore/node?node=A__ANhb8wLgMuaIL980opkRTQ__com.ti.SIMPLELINK_ACADEMY_CC13X0SDK__1FaRUBA__LATEST

这个教程解释了我们拥有的不同 printf 方法。display_printf 似乎工作正常。(There is a tutorial explaining the different printf methods we have. But the display_printf seems to work fine. )

希望能够帮助到您。

赞(0)
未经允许不得转载:TI中文支持网 » CC1310: CC1310
分享到: 更多 (0)