Mega gradually stopped uploading by IDE 1.8.19 and IDE 1.8.15. Avrdude complains "not in sync". Symptoms are:
- avrdude: stk500_recv(): programmer is not responding -- sometimes complains stk500_getsync() attempt 1 of 10: not in sync ... (see below)
- Arduino IDE 2.0 can upload sketches, but not IDE 1.8.19/ 15
- three other Megas, two out of the box, display same problem, and will not upload
- Same problem (programmer not responding, not in sync) trying to upload to an Uno.
- replaced USB cable
- Serial Monitor works, and I can send and receive using serial monitor
- re-installed windows USB driver, and same problem with CH340 Mega boards
- rebooted Windows 7
- re-installed IDE 1.8.19
- board (AVR Mega) and port are all correct - only one port available and says Arduino Mega 2560. IDE 2.0 has no issues uploading.
- Loopback test is successful
This is really baffling. If the bootloader is broken, why does IDE 2.0 work, and why do the other 3 Megas not upload with IDE 1.18.19?
My theory: IDE 2.0 has hacked the Arduino USB driver to disable IDE 1.8 uploading!!! (just kidding)
I'm pretty noob. Looked but could not find a parallel situation in past comments. Frankly, I am happier with IDE 2.0, except for its Serial Monitor.
C:\Users\Taler\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Taler\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -V -patmega1280 -carduino -PCOM22 -b57600 -D -Uflash:w:C:\Users\Taler\AppData\Local\Temp\arduino_build_371376/Blink.ino.hex:i avrdude: Version 6.3-20190619
System wide configuration file is "C:\Users\Taler\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM20
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0c
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x8c
...
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x6
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x73
avrdude done. Thank you
An error occurred while uploading the sketch