Skip to main content
Associate
April 9, 2025
Question

STM32CubeIDE 1.18 not work -u _printf_float

  • April 9, 2025
  • 4 replies
  • 797 views
 
char stringUSBCDC[50];
sprintf(stringUSBCDC, "Hello v%f\n", 1.0f);
while (1)
{
 CDC_Transmit_FS((uint8_t*)stringUSBCDC, strlen(stringUSBCDC));

 

In terminal - output

Hello v
Hello v
Hello v
Hello v


Code formatting applied - please see How to insert source code for future reference.

4 replies

Alex2670Author
Associate
April 9, 2025

In 1.17 everything works correctly

Ozone
Principal
April 9, 2025

Check it doesn't link against a libnano version by default.

Alex2670Author
Associate
April 11, 2025

Where can I check the version?

AMars.4
Associate III
April 10, 2025

Do you have this setting?

printf.png

Alex2670Author
Associate
April 11, 2025

Yes, of course, these settings were made first.

Pavel A.
Super User
April 11, 2025

You can install the same toolchain that you had in 1.17, and be happy. The new toolchain seems to have issues.