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/MSP430FG4618:Code Composer Studio

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/709444/ccs-msp430fg4618-code-composer-studio

器件型号:MSP430FG4618

工具/软件:Code Composer Studio

您好!

我正在使用 CCS 8.1版本、在该版本中、我将使用如下所示的 sprint 函数来转换浮点值

sprintf (msg_buff、"%5.1f%%、"、percent _clear_f);

但在编译之后、我遇到了以下错误  

#2631在 printf_support=minimal 模式下不允许转换 f

请向我提供解决此问题的建议。

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

    编译器选项--printf_support=minimal 可减少可使用的 sprintf 转换。  %f 属于不受支持的类型。  您可以更改它。  请在 MSP430编译器手册中阅读更多相关信息

    谢谢、此致、

    乔治