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.

[参考译文] MSPM0L1106:通过 UART 进行 printf

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1264084/mspm0l1106-printf-via-uart

器件型号:MSPM0L1106
主题中讨论的其他器件:MSPM0L1306

您好!

我们希望通过 UART 使用 printf()进行调试。 我们检查了 uart_tx_console_multibyte_repeo_fifo_dma_lp_MSPM0L1306_nortos 和 uart_tx_multibyte_fifo_dma_interrupts_lp_MSPM0L1306_nortos_ticlang、遗憾的是它们不提供典型 printf ()函数的灵活性。  

我们使用了一个包装器来包含 vsprintf()以转发到 UART,这很有效。 但是、此可变参数函数与我们的 静态代码分析不兼容。

是否有更好的方法可以直接通过 UART 来代替 printf()?

谢谢、此致、

安布罗维斯

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

    您好、Ambroise

    您能否分享解决方案代码的详细信息:"一个包装器,包括 vsprintf ()转发到 UART"? 或者 printf()灵活性的具体要求是什么?

    若要通过 UART 完成 printf、只需将变量发送到 TXDATA、无需 DMA 即可完成。

    B.R.

    萨尔