Arm Mbed OS support forum

Minimal printf() in Mbed OS v.6.4.0 adds unwanted carriage return before line feed

Using Mbed OS v.6.4.0 and NUCLEO_F429ZI. Trying a simple test program with :
#include “mbed.h”
int main() {
while (true) {
printf(“Hello World!\n”);
ThisThread::sleep_for(1000ms); // changed for Mbed OS v.6 instead of wait()
}
Looking at the oscilloscope, a carriage return (\r) is added before the line feed (\n). But the program does not show a \r. Of course TeraTerm or other terminal shows a carriage return at the end of the string.
I feel this is a bug as in the case of version 6.2.0 where a \r was added before any string coming from minimal printf(). However this bug was solved with v.6.3.0.
Old 5.14.4 version did not show this problem and a line feed was a real line feed.
Any help?
Thanks. Andrea Scorzoni