For some reason I have started having trouble getting serial output from Serial.printf() statements in programs with a Teensy 3.x target. I created a minimal program to illustrate the problem
/*
Name: Printf_Demo.ino
Created: 5/24/2020 10:13:54 AM
Author: FRANKNEWXPS15\Frank
*/
void setup()
{
Serial.begin(115200);
// wait until serial port opens for native USB devices
while (!Serial)
{
delay(10);
}
Serial.print("Serial.print without a terminating linefeed");
Serial.printf("Serial.printf without a terminating linefeed");
//Serial.println("Serial.println");
}
void loop()
{
}
When this program is compiled in VS2019/VM with a Teensy 3.2 target, with all other settings unchanged, no serial output appears in the serial monitor window. However, if I uncomment the "Serial.println()" line, then all three strings appear, all on one line, as expected.
This same program, when compiled in the Arduino IDE works fine; when the last line is commented out, I get the first two strings on one line, and with it uncommented, I get the same behavior as in VS/VM - all three strings on the same line.
I must be doing something wrong, but I have no idea what that might be. Any help would be appreciated. I have attached a ZIP file containing the verbose compiler output, and my entire project folder. If anything else is required, I'll be happy to provide it
TIA,
Frank