Skip to main content
Associate
Apr 9, 2025 6:35 AM UTC
Question

STM32CubeIDE 1.18 not work -u _printf_float

 
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.

This topic has been closed for replies.

6 replies

Alex2670Author
Associate
Apr 9, 2025 7:39 AM UTC

In 1.17 everything works correctly

Ozone
Principal
Apr 9, 2025 7:55 AM UTC

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

Alex2670Author
Associate
Apr 11, 2025 2:36 AM UTC

Where can I check the version?

AMars.4
Associate III
Apr 10, 2025 7:31 AM UTC

Do you have this setting?

printf.png

Alex2670Author
Associate
Apr 11, 2025 2:35 AM UTC

Yes, of course, these settings were made first.

Pavel A.
Apr 11, 2025 2:38 AM UTC

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