In case you are getting this error it is due to one of the reasons below. You will have to try the following suggestions:
-
Make sure you have selected the correct board and port for your Arduino board from the
Tools > Port
menu. -
Remove any connections to pins 0 and 1. These pins are used for communication with your computer, including uploads. Connecting anything to these pins can interfere with uploads.
-
Do a loopback test. If it passes, you know the USB to TTL serial adapter chip on your Arduino board is good. If it fails, your board is damaged beyond economical repair and should be replaced.
-
If the loopback test passes. Try burning the bootloader again:
-
Using another Arduino board, for example an Arduino Mega or an Arduino UNO