# error: avrdude: stk500_getsync(): not in sync: resp=0x00

I'm new in this field and I'm working with ardupilot APM 1 (atmega1280), and I got this

error: avrdude: stk500_getsync(): not in sync: resp=0x00

while I was uploading. I've read so many articles on internet and I tried everything to make the board working. I've started having problem three months ago and I always solve it in maximum six days, but now the problem is more frequent and I can't solve it anymore.

These were the things that I tried:

Does anyone have some idea?

Is the board broken?

Is an hardware problem?

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "C:\arduino-0100-relax\hardware/tools/avr/etc/avrdude.conf"

Using Port                    : \\.\COM20
Using Programmer              : arduino
Overriding Baud Rate          : 57600
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.

• What is 'the right board' and what exact command is executed that throws the error? You may have to enable verbose output in the Arduino IDE Settings. – jippie Jul 3 '13 at 12:05
• Thank you for helping me. The board is "Arduino Mega (ATmega1280)" and I'm going to add the verbose to the question. – DarkCoffee Jul 3 '13 at 12:23
• I had exactly the same problem this morning setting up avrdude using Atmel Studio 6. In the end I found that my Arduino UNO board used a different baud rate (115200) to the 57600 that I was told to use. Not sure if this is the same for you though.. – Dave Jul 3 '13 at 12:39
• I also read that Comm numbers > 9 can cause issues, and that changing the port can fix things. Again, this is just one of many possible 'fixes' that are about. 1 error, many causes :/ – Dave Jul 3 '13 at 13:57
• If you are dealing with an FTDI USB-serial cable, first disconnect it from the board and use the cable by itself. Get a little piece of wire or a small value resistor and connect the transmit pin to the receive pin. Open a terminal program, disable hardware flow control, and type something. Depending on if the wire is installed or not, you should get one more copy of each character than without (half duplex - 2 copies with, 1 without, full duplex 1 copy with none without). If you can't even open the port, you have a bad cable, wrong driver or are trying the wrong com port. – Chris Stratton Jul 3 '13 at 14:40

This is not a very explicit error, I give you that. It could be lots of things, but I think I remember I had this particular error a while back because of bootloader issues.

The bootloader on most arduinos listens for a few seconds on the USART, checks and copies a code if it receives a correct one or otherwise just gives up, then calls the main program and does not run in the background. Therefore when the uploader tries to communicate with the board, it might be already running the main program and be unresponsive, hence the "not in sync". The simple fix is to hit "upload", wait for the program to compile, and reset the board just when the program starts being uploaded. There must be a second leeway, but it has always solved the problem.

I think I remember it's also possible to upload a code compiled for another board, which prevents proper synchronisation once the wrong code is uploaded. Not sure under which conditions this can happen (probably when the bootloader is uploaded and run together with the main program as one single program), but that would be worth investigating if none of that works.