Skip to main content
IHiro.1
Visitor II
January 25, 2023
Question

Trying to print float value using stdarg.h file in CubeIDE

  • January 25, 2023
  • 1 reply
  • 777 views

I'm using an STM32F4 mcu to receive data from a sensor. Now i want to print that same data which is in float. I've tried using functions like snprintf/sprintf but they give some error about linker flag. Now i've tried to add -u_print_f in the linker command also but it didn't help. It still returns an error. I was hoping to get a simplistic solution for this problem, one that would mean making tweaks in the main print function on stdarg source code.

Thanks

This topic has been closed for replies.

1 reply

RomainR.
ST Employee
January 25, 2023

Hello IHiro.1 (Community Member)

Maybe these discussion will help you.

https://community.st.com/s/question/0D50X0000B0AEJbSQO/uprintffloat-where-to-set-for-clinker-in-stm32cubeide

https://forum.digikey.com/t/easily-use-printf-on-stm32/20157

Regards,

Romain

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.