What all is necessary to get floating point working?

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

What all is necessary to get floating point working?

ソリューションへジャンプ
1,184件の閲覧回数
manasvb
Contributor III

Hi,

Am using LPC55s69 EVK board, with Free-Rtos and floating point `FPv5-SP-D16 (Hard ABI)`.

In the FreeRtosConfig.h I have set this macro `configENABLE_FPU` to 1.

Basically I want to display floating numbers sent via UART.

I am storing my float number and the info that I want to send in a uint8_t buffer[], using sprintf, something like this

sprintf(buffer,"Float data:%f\r\n",3.14);

And using USART functions I send this buffer.

 

But on serial monitor I observe

Float data: 
ie(Float data: and whitespace(0x20)

 

How to solve this issue

ラベル(1)
0 件の賞賛
返信
1 解決策
1,132件の閲覧回数
manasvb
Contributor III
0 件の賞賛
返信
2 返答(返信)
1,133件の閲覧回数
manasvb
Contributor III
0 件の賞賛
返信
1,167件の閲覧回数
ErichStyger
Specialist I

depending on your library used, you have to enable floating point support for the library, e.g.

ErichStyger_0-1690199380097.png

 

 

0 件の賞賛
返信