Unable to get printf to print floating point

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Unable to get printf to print floating point

ソリューションへジャンプ
8,768件の閲覧回数
aberger
Contributor V

I am using the NXP MCU Tools toolchain with Gnu Make Builder in the MCUXpresso IDE. I am able to use printf statements generally while debugging, but floating point specifiers (%f) do not print. I have enabled PRINTF_FLOAT_ENABLE=1 in the preprocessor (see below), but that makes no difference. I also have the Floating point mode set to "FPv4-SP (Hard ABI)." How can I get a floating point number to print using printf?

pastedImage_1.png

タグ(2)
1 解決策
6,742件の閲覧回数
lpcxpresso_supp
NXP Employee
NXP Employee

Remove the symbol "CR_INTEGER_PRINTF" from the preprocessor settings, then clean/rebuild.

For more information, see section 13.5.1,"Redlib printf variants" in the supplied MCUXpresso IDE v10.1. User Guide.

Regards,

MCUXpresso IDE Support

元の投稿で解決策を見る

3 返答(返信)
6,742件の閲覧回数
remybringold
Contributor I

For me this helped:
float.jpg

6,743件の閲覧回数
lpcxpresso_supp
NXP Employee
NXP Employee

Remove the symbol "CR_INTEGER_PRINTF" from the preprocessor settings, then clean/rebuild.

For more information, see section 13.5.1,"Redlib printf variants" in the supplied MCUXpresso IDE v10.1. User Guide.

Regards,

MCUXpresso IDE Support

6,742件の閲覧回数
giampietropompo
Contributor I

I have the same problem, follow the case.

0 件の賞賛
返信