WinAVR avrdude: stk500_getsync(): not in sync err

Hello,

I know this might sound cliche, but, I am working at a University and we are trying to use Arduino boards for a class of 40. There are few boards which can be flashed with WinAVR but with the others I end up getting the following error

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

What puzzles me is that, I am able to flash all the boards with Arduino IDE but not with WinAVR.

Board selection problem? Do all your Arduino boards use the same processor chip 168 or 328? If you have mix then that could cause your problem.

Lefty

There is too few information, so I can just do some guesses.

Maybe you are using two different versions of the Arduino board. The ones with the ATmega168 need 19200 baud and the newer ones with the ATmega328 need 57600 baud.

To download a sketch to an Arduino board using the USB connection, you need a Bootloader on the Arduino. The bootloader is a small program which is activated when the board is reset. The boards have a auto-reset feature, which means they reset themselve and enter thebootloader, when the serial connection is opened and the DTR signal is set to HIGH.

Have you used an ISP programmer with WinAVR? If yes, you might have overridden the bootloader and need to restore it. You can't damage the bootloader with the USB connection. To check if there is a bootloader on the Arduino, connect it to USB and look if the LED is flashing.

Another problem might be, that you use the wrong version of avrdude. The one which is delivered with the Arduino IDE supports the auto-reset feature and you can find it in the folder arduino-0017\hardware\tools\avr\bin.

MikeT