What all is necessary to get floating point working?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

What all is necessary to get floating point working?

跳至解决方案
1,193 次查看
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,141 次查看
manasvb
Contributor III
0 项奖励
回复
2 回复数
1,142 次查看
manasvb
Contributor III
0 项奖励
回复
1,176 次查看
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 项奖励
回复