Suddenly unable to upload

I've been using an Uno without any problems for the past few weeks. It's a genuine board. Today, I find I'm unable to upload any sketches. The board works fine running the previously-installed sketch.

  • I can program the AVR using a USBTinyISP and the sketches run ok.
  • The board outputs to the serial monitor ok. I'm running the Adafruit ILI9341 graphicstest and it outputs everything as expected
  • I installed the IDE on a 2nd PC. No difference
  • Re-installing the boot loader has no effect
  • I have a (genuine) Due which works fine

The output is:

Sketch uses 20798 bytes (64%) of program storage space. Maximum is 32256 bytes.
Global variables use 507 bytes (24%) of dynamic memory, leaving 1541 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
An error occurred while uploading the sketch

I have a couple of other boards where I can't upload but the symptoms are different. One is a Sainsmart Uno which gives an error: 'error opening serial port COM11...'. I assume that's a hardware failure. The 2nd is a mega and I understand that the "avrdude: stk500v2_ReceiveMessage(): timeout" message could be due to an outdated bootloader (and I don't have a 6-pin connector to update it).

Has something suddenly changed to prevent the upload? I'm wondering if it's a windows update or something.

Rob.

rob190:
I can program the AVR using a USBTinyISP and the sketches run ok.

Note that when you do that the bootloader is erased. You need to do a Tools > Burn Bootloader before going back to doing normal uploads.

rob190:
One is a Sainsmart Uno which gives an error: 'error opening serial port COM11...'. I assume that's a hardware failure.

Make sure you have the correct port selected from the Arduino IDE's Tools > Port menu. Different Arduino boards may be assigned different ports.

rob190:
The 2nd is a mega and I understand that the "avrdude: stk500v2_ReceiveMessage(): timeout" message could be due to an outdated bootloader

Could be, but that issue is not at all common anymore. There are many other things that could cause the error.

rob190:
I don't have a 6-pin connector to update it

You can just use jumper wires between the programmer and the board.


Remove any connections to pins 0 and 1 on your Arduino board. These pins are used for communication with your computer, including uploads. Connecting anything to these pins can interfere with uploads.

Make sure you have the correct board selected from the Tools > Board menu.

Make sure you have selected the port of your Arduino board from the Tools > Port menu.

Sometimes the port will be labeled with the board name in the menu. Other times it will not. If you don’t know which port is your Arduino board, you can find it like this:

  • Unplug your Arduino board from the computer.
  • Tools > Port
  • Note the ports, if any, listed in the menu.
  • Close the Tools menu. The ports list is only updated when the Tools menu is re-opened, so this step is essential.
  • Plug your Arduino board into the computer.
  • Tools > Port - The new port listed in the menu is your Arduino board.

Thanks for a very comprehensive reply!

I think the cause for the problem with the arduino was as you said. I hadn't appreciated that uploading a sketch with the ISP would remove the bootloader. Makes sense that you don't need to waste space on a bootleader you don't need.

The mega is also working. It's a very old board. I was given it 10 years ago by someone who didn't need it any more. I didn't realize it was a 1280 and the error message led me to think it was a problem with the serial interface.

No luck with the Sainsmart yet although it has a Atmega16U2 interface chip so I'll have a go at reprograming it.

Rob.