-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
The code doesn't output anything via serial usb, but works in case fflush is there:
int main() {
stdio_init_all();
tusb_init();
while (!tud_cdc_connected()) { sleep_ms(100); }
fprintf(stdout, "any string"); // same with fwrite
// flush(stdout);
puts(""); // print a newline
return 0;
}The following code also works fine:
int main() {
stdio_init_all();
tusb_init();
while (!tud_cdc_connected()) { sleep_ms(100); }
fprintf(stdout, "any string\n");
return 0;
}Is the problem caused by some crt implementation detail?
Host: Windows 11
Command: putty (plink -serial -sercfg 115200,8,n,1,N COM2)