Avrdude

From Uzebox Wiki
Jump to: navigation, search

Using avrdude under Windows with an AVRISPMKII programmer

When AVRstudio is installed, it also deploy the Jungo USB driver that will conflict with Libusb, required by avrdude. To be able to use both, you need to install the libusb "filter" driver. Check here on how to instal: [1]. The installer use a simple gui that will let you attach the filter driver on top of the Jungo driver.

After installation open a command window an type:

C:\WinAVR-20100110\bin>avrdude -c avrispmkii -p m644 -P usb:xx -v

avrdude: Version 5.11-Patch#7610, compiled on Aug 31 2011 at 08:02:19
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : usb:xx
         Using Programmer              : avrispmkii
avrdude: usbdev_open(): Found AVRISP mkII, serno: 0000B0038732
avrdude: usbdev_open(): did not find any (matching) USB device "usb:xx"

Your device should be listed with it's serial number (in the above case it's "serno: 0000B0038732"). Use the last 4 digits of the serial number to invoke avrdude:

C:\WinAVR-20100110\bin>avrdude -c avrispmkii -p m644 -P usb:87:32 -v

avrdude: Version 5.11-Patch#7610, compiled on Aug 31 2011 at 08:02:19
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : usb:87:32
         Using Programmer              : avrispmkii
avrdude: usbdev_open(): Found AVRISP mkII, serno: 0000B0038732
         AVR Part                      : ATMEGA644
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
....

Also when using multiple avrdude commands in a batch file, if only the first command works and the next fails, insert a delay between command using the sleep command.