Hello all, I am having and issue regarding the stdio configuration in a custom target using STM32F091VC.
My printf(“Hello World!\r\n”) hangs if I config “platform.stdio-buffered-serial”: 1 in mbed_app.json, but works when I dissable it, “platform.stdio-buffered-serial”: 0.
looks like you are experiencing an issue with the stdio configuration in a custom target using STM32F091VC. When you set the “platform.stdio-buffered-serial” to 1 in mbed_app.json, the printf(“Hello World!\r\n”) hangs, but it works when you disable it and set “platform.stdio-buffered-serial” to 0.
One possible reason for this issue could be that the buffer size allocated for the serial port may not be enough to hold the entire message “Hello World!\r\n”. When “platform.stdio-buffered-serial” is set to 1, it enables buffered I/O for serial output, which can cause this issue if the buffer size is too small.
You can try increasing the buffer size allocated for the serial port by setting “platform.stdio-buffer-size”: in mbed_app.json, where is the size of the buffer in bytes. This might help resolve the issue.
Alternatively, you can also try using a different printf library instead of “std” by setting “target.printf_lib” to the appropriate library for your target, as some libraries may handle buffered I/O differently.
Hello all, I have tried with the NUCLEO-F091RC and works fine, to be honest I don´t think it is a matter of my custom target (F091VC) as in this case it is extremely easy as it is quite similar to the F091RC even both boards has 8Mhz crystal, so I will try to look at the serial_device.c and related code and debug to see where crashes.
Thank you to all of you.