Pages: [1]   Go Down
Author Topic: String with three exclamations  (Read 809 times)
0 Members and 1 Guest are viewing this topic.
Bavaria
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

The following code will compile, but can be not uploaded. The upload stops on about 80% without an error.
Code:
void setup() { 
     Serial.println("Sensoren parasitär!!!");
}
void loop() {}
The same code with only two exclamation works fine
Code:
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
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 67
Posts: 3678
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: November 15, 2012, 04:52:22 pm by retrolefty » Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4802
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 216
Posts: 13670
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Bavaria
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4802
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Pages: [1]   Go Up
Jump to: