Go Down

Topic: Problem uploading specific sketch on MEGA2560 ... (Read 962 times) previous topic - next topic

SeaLyon

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.


SurferTim

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: [Select]
Serial.println("It works!!!");


SeaLyon

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.

SurferTim

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.

SeaLyon

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.

retrolefty


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.  ;)

Lefty

retrolefty



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.  ;)

Lefty

SeaLyon

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

retrolefty


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

Go Up