IDE 2.0.0-rc7 Monitor output gibberish but Tera Term displays correctly

Any serial output to the monitor is displaying gibberish (like the baud rate is wrong). However, if I connect to the COM port using Tera Term it displays correctly.

Problem is occuring 95% of sketch uploads for IDE rc7. Was doing same in rc6 sometimes but I could get it to work correctly by uploading any different sketch and then reload the one that had previously had the problem.

As mentioned, it now happens almost all the time and with any sketch loaded. Here is a simple sketch that now will display only gibberish on the IDE monitor but works fine with Tera Term.

This is pretty much stopping my development which after using the 2.0 IDE for a couple of months now is really a concern for me.

Development platform: 2.0 IDE rc6, then rc7 installed on Windows 10. The device is authentic Arduino Mega 2560 R3. In the last few days I purchased an Elegoo ATmega 2560 R3 and can confirm that it is behaving exactly the same as the authentic Mega 2560 R3. Please note, this doesn't happen if I upload the same sketch to my Uno.

#include <Arduino.h>
void setup(){

    Serial.begin(9600);
    while (!Serial) continue;

    Serial.print("\nStarting...");
    Serial.print(F("0123456789abcdefghijklmnopqrstuvwxyz9876543210 ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
}
void loop(){}

Looks like your TeraTerm is set to "both NL & CR"
Is the Arduino serial monitor set that way, too?

Hi @abehil. Thanks for your report.

Please tell me what sort of output you get in the Serial Monitor after uploading this sketch to your Mega:

#include <Arduino.h>
int counter;
void setup() {

  Serial.begin(9600);
  while (!Serial) continue;

  Serial.print("\nStarting...");
  Serial.print(F("0123456789abcdefghijklmnopqrstuvwxyz9876543210 ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
Serial.println();
}
void loop() {
  Serial.print("#");
  Serial.print(counter++);
  Serial.print(": ");
  Serial.println(F("0123456789abcdefghijklmnopqrstuvwxyz9876543210 ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
  delay(500);
}

Here is the monitor output from the sketch you provided.

In Tera Term, a new row of data appears every 1/2 second and doesn't stop.

Is there anything more than that in Serial Monitor? The screenshot is cropped pretty tightly so it is not clear to me.

Nothing more in the serial monitor and it's not adding more characters if I wait for minute.

But, another interesting thing I just noticed is that the output seems to freeze until I open Tera Term.

  1. I uploaded your sketch and looked on serial monitor to see a long single line of gibberish and that line did not continue to grow. I observed the monitor for another 30 seconds so see nothing was happening.
  2. Close the IDE.
  3. Open Tera Term. The output immediately started with the output line from the setup() and was followed with the loop() beginning with line zero.

OK, that is definitely not good. I had a suspicion it might be this known issue:

However, that is only about some garbage output immediately after upload. Even though I do get that initial bad output in the Arduino IDE 2.0.0-rc7 Serial Monitor when running the sketch I provided on my Mega, I then get the expected correct output from then on, so it is a different symptom from the one you describe.

Please submit a bug report to the Arduino IDE developers here:

More likely is that the board resets when you open Tera Term. That reset is the standard behavior for a Mega whenever a serial connection is opened to it.

I read what you posted "Spurious output in Serial Monitor after upload". That describes what I had previously seen with rc6. Sometimes it would begin to display correctly after an initial line of gibberish but sometimes would just keep spewing out gibberish. When it didn't work correctly I could load some other sketch which would fix it and then the original sketch would also work for some time.
Now, with rc7 it seems to have gotten worse and loading a different sketch doesn't fix it anymore.

I'll post the bug.

Is it possible for me to roll back to rc6?

Yes. The download links for the older Arduino IDE 2.x releases are not listed on the Arduino website, but they are available for download from the GitHub repository where the development work happens.

You can download 2.0.0-rc6 from the links in the "Assets" section of the release page here:

https://github.com/arduino/arduino-ide/releases/tag/2.0.0-rc6#:~:text=Assets

Use the "arduino-ide_2.0.0-rc6_Windows_64bit.exe" link if you want the "Windows Win 10 and newer, 64 bits" version of the Arduino IDE.

Use the "arduino-ide_2.0.0-rc6_Windows_64bit.zip" link if you want the "Windows ZIP file" version of the Arduino IDE.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.