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.

[参考译文] MSP430FR2475:sprint f 不工作

Guru**** 2489685 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1552590/msp430fr2475-sprintf-not-working

器件型号:MSP430FR2475


工具/软件:

我正在尝试将浮点数打印为字符串、如下所示:

        RES = 12.456
        sprint f (rms_volts、“%f",“,res、res);
在“properties /MSP430 Compiler/Advanced Options / Language /--printf support options“下、我设置了完整的。 运行 Debug 时也没有报告问题、但上述代码会导致字符串 Rms_volts 为空。 有人有什么建议吗?