OTA upload succesfull, but old sketch remians #151
Replies: 4 comments
-
did you use a current version of MegaCore to burn the bootloader? |
Beta Was this translation helpful? Give feedback.
-
Yes, MegaCore is freshly downloaded (2.1.3) and bootloader updated after that. Now, the symptom is that the board hangs after sketch upload and needs a power reset. After the power cycle, the new sketch starts running. Here's the IDE output: |
Beta Was this translation helpful? Give feedback.
-
I have two Mega 2560 boards. I'm seeing something very similar. First I successfully burn the bootloader.
I unplug the target from the programmer. I plug USB into the target. I flash, in this case, ATmega_SD.ino
I check the output from Serial and see the date and time that I put on line 44. I change the date and time that I put on line 44 and flash OTA:
Check the Serial output from the target. The sketch has not changed. |
Beta Was this translation helpful? Give feedback.
-
Does flashing the first sketch over USB somehow replace the bootloader with the original, non-optiboot bootloader? How would I detect that? Should the first sketch be flashed onto the Mega in a way other than USB? |
Beta Was this translation helpful? Give feedback.
-
Hi Juraj,
I have 2x Mega2560 (with builtin Wifi) boards and i'd really like to make OTA working for them!
So i burned the Optiboot bootloader by MCUDude.
Then i used your example sketch (SerialWiFiOTA) to test. Then i make minor change in the code and upload it via "Upload using programmer". All seems OK, "Sketch uploaded successfully" message appears, but after board resets, the old sketch started running again (or it just hangs completely).
Any advise please?
Thanks!
Attila
Beta Was this translation helpful? Give feedback.
All reactions