AVR-ISP-MKII AVRDUDE and OS X

Started by TheVoiceOfSaturn, February 07, 2014, 06:36:09 PM

Previous topic - Next topic

TheVoiceOfSaturn

I successfully managed to flash the libUSB-AVRISP-MKII.hex firmware onto the programmer using but Flip and dfuprogrammer on os x. I made a 10 pin to 6 pin ICSP adapter that I've checked over but I've been unable to program my atmega644 on my mac.

Below is the output when I try to burn the fuses.  I've tried the macports version of AVRDUDE as well as Crosspack and have had no luck.  Is there a known issue with libusb that would require a custom build or something of libusb/avrdude?

avrdude -p atmega644 -c avrispmkII -P usb     -u -v -v -U
efuse:w:0xFC:m -U hfuse:w:0xD2:m -U lfuse:w:0xF7:m

avrdude: Version 6.0.1, compiled on Feb  4 2014 at 00:44:52
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/opt/local/etc/avrdude.conf"
         User configuration file is "/Users/recompas/.avrduderc"
         User configuration file does not exist or is not a regular
file, skipping

         Using Port                    : usb
         Using Programmer              : avrispmkII
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200012345
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_getsync(): timeout communicating with programmer
         AVR Part                      : ATmega644
         Chip Erase delay              : 55000 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
         Memory Detail                 :

                                  Block Poll               Page
               Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages
MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------
----- ----- ---------
           eeprom        65    10   128    0 no       2048    8      0
9000  9000 0xff 0xff
           flash         33     6   256    0 yes     65536  256    256
4500  4500 0xff 0xff
           lock           0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0
9000  9000 0x00 0x00
           signature      0     0     0    0 no          3    0      0
    0     0 0x00 0x00
           calibration    0     0     0    0 no          1    0      0
    0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel AVR ISP mkII
         Programmer Model: AVRISP mkII
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_recv_frame(): usb_bulk_read(): No such file or directory

LubOlimex

#1
Hey,

There is a software bug that affects LUFA-based programmers in newest releases of AVRDUDE. Either use AVRDUDE versions prior to 6.x.x or apply https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/endpointdetect_pass1.patch this patch to the AVRDUDE sources and compile.

If you want to apply the patch refer to this post by HypervisorX: https://www.olimex.com/forum/index.php?topic=3208.msg19603#msg19603

The same problems appears in newest releases of Arduino IDE – they use AVRDUDE versions 6.0.1 or newer. The last suitable Arduino IDE version that uses pre-6.x.x AVRDUDE version is Arduino IDE 1.5.7.

The official bug report is here: https://savannah.nongnu.org/bugs/index.php?40831

More about the issue can be found here: http://www.avrfreaks.net/forum/lufa-based-avrisp-mkii-doesnt-work-avrdude-601

Best regards,
Lub/OLIMEX

P.S. I know it is an old post, just stumbled upon it and in case somebody else stumbles upon it I want the situation to be clear.
Technical support and documentation manager at Olimex

TheVoiceOfSaturn

Great, thanks for the update! I wound up just using a machine running Ubuntu to program what I needed but this is definitely good to know!

bassik

Sorry for x posting but I would need some help on using your avrisp mkii on mac osx.

Having made avrdude to work on my machine following this tutorial:
http://www.ladyada.net/learn/avr/setup-mac.html

I have then discovered I would need to recompile avrdude.
As I am not proficient in this, could you please help to send over an already compiled version?

I am using it for my own small projects building some eurorack modules for my own use,

Thank you
Sero