String with three exclamations

Hi,

The following code will compile, but can be not uploaded. The upload stops on about 80% without an error.

 void setup() {  
     Serial.println("Sensoren parasitär!!!");
}
void loop() {}

The same code with only two exclamation works fine

 void setup() {  
     Serial.println("Sensoren parasitär!!");
}
void loop() {}

I use Arduino 1.0.1 on Windows XP with Arduino Mega 2560 and Freaduino Mega 2560.

Please verify.

Konrad

1 Like

Three exclamation marks mean something special to the bootloader - make do with two in your message!

Yes, it's a known bug in the mega bootloader program (where if an upload data stream has three consecutive ! characters (and that can either be constant string or char values in your sketch, or just three equivalent byte values is the code part of the uploading the sketch) that causes the bootloader to jump into a 'monitor mode' awaiting user monitor commands (which will never come) thus hanging the up load operation. The other known mega bootloader bug is that it doesn't handle watch dog timer interrupts correct as they did fix in the Uno's bootloader. There has been corrected/updated mega bootloaders available for some time now (not sure where to find it though) but at present a 'fixed' mega bootloader is still not shipping with mega board, nor does the IDE have a updated mega bootloader as part of the arduino IDE distribution. Simply put the arduino mega just has received no love from the arduino company for a long while now. This bug has existed for at least as long as the original mega1280 started shipping several years ago.

Lefty

Maybe you can get by with something like

Serial.print("Sensoren parasitär!!");
Serial.println("!");

if it is important to have 3, but I am guessing 2 would be enough.

if you need 3 or more you could place space in between ! ! !

Hi,
it is not important to have three exclamation marks in this text. The problem was i did some minor programm changes in a running system. Suddenly I was not able to write a new programm in the mega. I could not imagine that this change in a string could cause this problem. Therefor I checked everything, from powersupply to casing. I also ordered a second Mega 2560 (Freaduino) and was not deliverd in two weeks. I found an old usbprog in my "spare part stock". Which I have had to flash befor the first use. Finally I could programm the mega thru ISP (with three exclamation marks in source code).

This bug took me a lot of time and nerves. Nevertheless I am very satisfied with the Arduino Mega.

Konrad

Oh yes, thanks for the head's up to that particular bit of weirdness!