If you're trying to upload code with Arduino and you get an error message that looks something like this:
"Problem uploading code.....

avrdude: stk500_getsync(): not in sync: resp=0x78
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x78"

(or any other error report when uploading code, aside from the obvious ones like compile errors or choosing the wrong serial port)

Here are the most common causes and things to check.

  1. Did you check the "Set RTS on close" box in the Windows Com port, as instructed in the manual?
  2. Are you selecting the right board? For ArduPilotMega, if your board uses an ATMega1280 processor (the big chip on the APM board will say "ATmega1280") select "Arduino Mega (Atmega1280)". If you've got an ATMega2560 chip, select "Arduino Mega 2560". For the original ArduPilot and ArduIMU, choose "Arduino Duemilanove".
  3. Is the cable plugged into a USB hub? That can sometimes cause trouble. Try plugging it straight into your PC.
  4. Are you using the latest FTDI drivers? Install them if not. If you're still having trouble, try reinstalling them.
  5. Check your solder joints! It's a good idea to reheat and reflow all of the ones you did, just to be sure.
  6. Other errors that have caused this problem in the past include a power source (such as your ESC) that is putting out a voltage outside the acceptable range of 4-7v, faulty USB or FTDI cables, and corrupted FTDI drivers. When in doubt, try a different power source, a different cable or a different PC.

Additional things to check if you're using the original ArduPilot board (not ArduPilotMega):

  1. [For original ArduPilot board only] Is your FTDI cable plugged in the right way? The black wire or side marked "black" should be on ArduPilot's BLK pin.
  2. [For original ArduPilot board only] Are you using the DIYDrones or Adafruit FTDI cable? We've had trouble with other ones...
  3. [For original ArduPilot board only] Is the ArduPilot board powered on, ideally through your RC system or ESC? (You can NOT power it from the FTDI cable; this is a safety measure to avoid power conflicts.)

If those all look fine and you're still getting the error message (especially if you can successfully load code to other Arduino boards), you may have a corrupted FTDI driver or a bad FTDI cable. Try reinstalling on another PC and see if that does the trick. If it doesn't, you may need a replacement FTDI cable.

In some rare cases, a power glitch may have resulted in a corrupted ArduPilot bootloader on the ATMega chip. This tutorial will show you how to reload the bootloader. (Warning--for experts only and requires an AVR programmer. This should not be necessary for most people.)

Other problems can include "Serial port not found" (just check that you've selected the right serial port in the Tools menu. It's the one assigned when you first plugged in the FTDI cable--probably 5 or higher), and the Arduino IDE freezing (try unplugging the FTDI cable. If that doesn't work, just reboot your computer).

Views: 30885

Comment by Ken Burnes on January 3, 2013 at 1:59pm

Question - I too am getting compile errors even after implementing all the tips I've read.  Do you have to have anything hooked up to just compile the code?

Comment by Vince Hogg on January 28, 2013 at 3:15am

Have I got this right?

Have done the basic steps as described here.

http://code.google.com/p/ardupilot-mega/wiki/Code

Am trying to edit the motor direction in motors library – so, have done that OK (who knows!) and re-save the AP_MotorsQuad.cpp – is that right?

Then load Arducopter.PDE and try to verify (have not tried connecting APM yet).

Am getting a few warnings – mostly concerning heli stuff. Should there be NO warnings at all?

I guess if Im getting verify errors then there will also be upload errors?

 

Any tips appreciated.

 

Comment by Vince Hogg on January 28, 2013 at 3:33am

These are the warnings

Comment by Mike Mac on March 12, 2013 at 6:07am

I am a first time Arduino user compiling copter 2.9.1 and got two error messages:

Undefined reference to ‘setup’

Undefined reference to ‘loop’

 

What did I do wrong?

 


Admin
Comment by Thomas J Coyle III on March 12, 2013 at 6:51am

@Mike,

You may not be using the correct version of the Aruino IDE 1.0.3 to compile the code. Try this compiler: http://code.google.com/p/ardupilot-mega/downloads/detail?name=ArduP...

Regards,

TCIII

Comment by Joseph Nicholas R. Alcantara on March 15, 2013 at 9:26am

Good Day Everyone,

I recently downloaded the arduIMU ver 1.9.8 at the repository. Also downloaded the arduino 1.0.3 in ardupilot site.

While compiling I'm having this error.

C:\Users\JA185141\Documents\Arduino\libraries\FastSerial/FastSerial.h:105: error: conflicting return type specified for 'virtual void FastSerial::write(uint8_t)'
C:\Users\JA185141\Downloads\android\ArduPilot-Arduino-1.0.3-windows\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

please help.

Comment by RUBENS SACHETTO SANCHEZ on May 25, 2013 at 3:56pm

Hello Chris. I have many difficulties to install APM. Arduino at the error that appears is this: variable or field 'run_cli' declared void. I've tried in several ways without success. You can give me a hint?

Comment by Tvixen on July 9, 2013 at 4:34am

Hi Guys

After installing  APM version of the Aruino IDE 1.0.3 and uploadet the 3.06 code i'm having serious problems.

It's completely dead. Only the yellow LED is on.  

And my APM 2.5 is now sending me garbage back when i connect it to MP i CLI mode. (But Yellow LED blinks when uploading from MP. But at the end it has a error saying ""Upload succeeded but verify failed: exp 2 got 26 at 78".

And if i try to upload ANY Arduino sketch to it, i'm' getting errors return, saying it cannot confirm the uploaded code.

And it just "came out of the blue sky" when i was programming it. 

Is it fried or is there still hope .... Any suggestions  ?

/Tvixen

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service