Invalid Signature Problem with 0012 and Diecimila

When i try to upload the blink example i get an error which says.

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

I know that the issue is with avrdude but 0011 has no issue with the same example.
What could be causing this?

Which chip are you using?

You can modify the software to pass a -F to avrdude to override

There was a post showing how to do this on the forums

On Linux you could run it by hand

avrdude -F -v -v -v -v -pm168 -cstk500v1 -P/dev/ttyUSB0 -b19200 -D -Uflash:w:program.hex

This assumes you have an ATmega168 and your board is attached to /dev/ttyUSB0

avrdude uses the same options on other operating systems but you need to pass the correct port ( -P option ) and so on

:slight_smile:

Probably you have a fried ATMEGA168 chip.

I hope it isn't fried, it's barely been used. In any case it works fine in the Arduino 0011 IDE.

I'll have a look at passing the option with avrdude. I have i may have seen something too. Maybe at ladyada.

Are you sure you have the right board selected under the Tools->Board drop down in the Arduino IDE?

I don't think it remembers your selection across upgrades

Yep, i'm pretty sure. It was the first thing i checked. I can't get to my main pc right now so i can't re-check for a while.

Try to run avrdude by hand as mentioned earlier with the -F and see if it works

That'll tell you what's going on

:slight_smile:

Hi all again. Thanks for your help.

Ok, i ran the command with the Blink.hex file. Absolutely no problems.

I then went back to the IDE and de-set the Board selection. When i did the program hung for a bit and then the following was spit out.

/home/jon/arduino-0012/hardware/cores/arduino/Print.h:32: warning: 'class Print' has virtual functions but non-virtual destructor
/home/jon/arduino-0012/hardware/cores/arduino/HardwareSerial.h:28: warning: 'class HardwareSerial' has virtual functions but non-virtual destructor
Print.h:32: warning: 'class Print' has virtual functions but non-virtual destructor
Client.h:6: warning: 'class Client' has virtual functions but non-virtual destructor
Server.h:12: warning: 'class Server' has virtual functions but non-virtual destructor
Print.h:32: warning: 'class Print' has virtual functions but non-virtual destructor
Client.h:6: warning: 'class Client' has virtual functions but non-virtual destructor
Server.h:12: warning: 'class Server' has virtual functions but non-virtual destructor
Server.h:12: warning: alignment of 'Server::_ZTV6Server' is greater than maximum object file alignment.  Using 1
Print.h:32: warning: 'class Print' has virtual functions but non-virtual destructor
Print.h:32: warning: 'class Print' has virtual functions but non-virtual destructor
Client.h:6: warning: 'class Client' has virtual functions but non-virtual destructor
Server.h:12: warning: 'class Server' has virtual functions but non-virtual destructor
Client.h:6: warning: alignment of 'Client::_ZTV6Client' is greater than maximum object file alignment.  Using 1
/home/jon/arduino-0012/hardware/cores/arduino/Print.h:32: warning: 'class Print' has virtual functions but non-virtual destructor
LiquidCrystal.h:7: warning: 'class LiquidCrystal' has virtual functions but non-virtual destructor
/home/jon/arduino-0012/hardware/cores/arduino/HardwareSerial.h:28: warning: 'class HardwareSerial' has virtual functions but non-virtual destructor
LiquidCrystal.h:7: warning: alignment of 'LiquidCrystal::_ZTV13LiquidCrystal' is greater than maximum object file alignment.  Using 1
/home/jon/arduino-0012/hardware/cores/arduino/Print.h:32: warning: 'class Print' has virtual functions but non-virtual destructor
/home/jon/arduino-0012/hardware/cores/arduino/HardwareSerial.h:28: warning: 'class HardwareSerial' has virtual functions but non-virtual destructor

Reselected the Diecimilla (the same warnings flew out again) and tried to upload the hexfile. No dice.

For extra info

jon@genbox ~/arduino-0012 $ find ./ | grep avrdude
./hardware/tools/avrdude.conf
./hardware/tools/avrdude
jon@genbox ~/arduino-0012 $ cd hardware/tools/
jon@genbox ~/arduino-0012/hardware/tools $ ls -la
total 155
drwxr-xr-x 2 jon jon      4 Oct 20 10:29 .
drwxr-xr-x 6 jon jon      8 Oct 12 21:08 ..
lrwxrwxrwx 1 jon jon     16 Oct 20 10:29 avrdude -> /usr/bin/avrdude
-rwxr-xr-x 1 jon jon 399492 Oct 12 21:07 avrdude.conf
jon@genbox ~/arduino-0012/hardware/tools $

There should be a custom version of avrdude that comes with the Arduino software. The standard one can't read the device signature from the bootloader on the Arduino.

Ah. Just copied over the file "avrdude" to remove the symlink. All is fine. Someone remind me in 2 days to edit the Gentoo-Linux install guide.