Pages: [1]   Go Down
Author Topic: Problem uploading specific sketch on MEGA2560 ...  (Read 606 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a sketch that I'm working on that has been uploading fine for a week and now I can't get uploading to complete (using V.1.0.1).  I'm using a Seeeduino Mega board (and have been for many months without any problems).  I'm not getting any visible errors reported in the IDE for this sketch (and normal compile completes without errors), it just won't finish an upload cycle on this specific sketch.  I can upload other sketches without problems.  Here's what it looks like when it hangs:



When it begins to upload, the TX & RX LEDs blink for a bit (as expected) and then it appears the pin13 LED is lighted and it hangs (I'm not using the pin13 OUTPUT in this sketch).  If I shutdown the IDE and remove/reset power to the board, it doesn't seem like its running any program and the pin13 LED appears to blink in a sequence (2 quick pulses, OFF, repeat).  I'm a little perplexed, appreciate any help.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tried uploading with Arduino 1.0.3?
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You might want to post your code.

If you have any "!!!" in your code, that will cause an upload hang in some versions of the Mega.
Code:
Serial.println("It works!!!");
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow!  I did have a "!!!" in a Serial.print in my code.  Took that out and it uploaded OK.  Is this an issue specific to 1.0.1 or does it happen in 1.0.3 too?

Does this occur only with 3 !'s or any number of !'s?  Why does that character (string) cause an upload hang?  Is it only an issue with a Serial.print or could similar problems occur if there is just a reference to a "!!!" string in the program?  Why does this happen?  Are there any other characters to watch out for?  Is there a list of "oddities" like this that is maintained somewhere?  Thanks for the help.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is the only glitch as far as I know. It happens in all IDE versions. It is a bootloader issue. If you can avoid getting really excited and use "!!" instead of "!!!", you can avoid that issue.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is really strange!  I never would have been able to unravel that issue on my own.  From now on, I'll definitely keep my enthusiasm in-check [!!]  Thank you very much for the help.
Logged

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

That is really strange!  I never would have been able to unravel that issue on my own.  From now on, I'll definitely keep my enthusiasm in-check [!!]  Thank you very much for the help.


When your arduino knowledge and skills progresses to knowing how (and wanting to of course) burn bootloaders to boards there is a updated bootloader available somewhere for the mega2560 that fixes that feature/bug so that you could then be as enthusiastic as you wish.  smiley-wink

Lefty
Logged

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

That is really strange!  I never would have been able to unravel that issue on my own.  From now on, I'll definitely keep my enthusiasm in-check [!!]  Thank you very much for the help.


When your arduino knowledge and skills progresses to knowing how to (and wanting to of course) burn bootloaders to boards there is a updated bootloader available somewhere for the mega2560 that fixes that feature/bug so that you could then be as enthusiastic as you wish.  smiley-wink

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you please post a link to the updated bootloader for the MEGA2560 ...
Logged

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

Can you please post a link to the updated bootloader for the MEGA2560 ...

Not owning a mega2560 board I never saved a link to it. However I'm sure someone around here can do that for you.

Lefty
Logged

Pages: [1]   Go Up
Jump to: