How to make stm32duino support sprintf under Arduino frame?

I have tried add build flags but no effect?
build_flags =

or how to enable it like this

could you help me?

1 Like

Looking at the file boards.txt from which that menu is generated, it looks like you are after: Nano + Float Printf -u _printf_float

This gets used in platforms.txt in c.compiler.elf.flags

I just don’t know if you shove it in like build_flags = -Wl,--specs=nano.specs,-u _printf_float or something else… it looks about right given that example you gave for the Arduino Nano/atmega328.

The docs tell you exactly how to do it.


in the platformio.ini.

The python builder code will handle it then.

1 Like

thank you for your help