avrdude with AVRISP-mkII on macOS 10.12 ?

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, all!

 

Three questions:

 

1. Can anyone confirm that 'avrdude' works with an AVRISP-mkII clone (LUFA-based) connected to a USB3 port on a MacBook Pro (mid-2012) running macOS 10.12.6 "Sierra"?

 

2. Or, can anyone verify that 'avrdude' 6.3 does not and cannot talk to an AVRISP-mkII clone on macOS 10.12?

 

3. Or, can anyone confirm that some other USB ISP programmer works with 'avrdude' on 10.12?  The Adafruit USBtinyISP?  Or the USBuISP on Tindie?

My situation:

 

I last used avrdude with this device when running OS X 10.9 in 2014, and it worked OK back then - no errors. I booted an old backup of 10.9, and avrdude 6.0.1 still works there.  On 10.12 and 10.11, avrdude gives errors; which ones depends on the version of avrdude and where it came from.

 

The programmer is detected by the OS; it shows up in System Information with the other USB devices. The examples and tests for libusb and libusb-compat work with it (listdevs, testlibusb, hotplugtest). So, I don't think it's a low-level USB problem.

 

The version of 'avrdude' in CrossPack is old, but it's the one I used in 2014. Here's what it does today:

 

$ avrdude -n -vvv -p t13 

avrdude: Version 6.0.1, compiled on Dec 16 2013 at 17:26:24
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf"
         User configuration file is "/Users/xyz/.avrduderc"

         Using Port                    : usb
         Using Programmer              : avrispmkII
avrdude: usbdev_open(): Found AVRISP mkII, serno: 00A20000011E0
get_endpoints: an error occurred getting pipe information on pipe 1
avrdude: usbdev_open(): error claiming interface 0: usb_claim_interface: couldn't claim interface
avrdude: usbdev_open(): did not find any USB device "usb"

 

 

The avrdude's in the Arduino.app, the platformio installation, and the old Library/Arduino15 directory are byte identical, according to 'cmp', and give this result:

 

$ ./Apps/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C Apps/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -n -vv -p t13

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
         User configuration file is "/Users/xyz/.avrduderc"

         Using Port                    : usb
         Using Programmer              : avrispmkII
avrdude: usbdev_open(): Found AVRISP mkII, serno: 00A20000011E0
avrdude: usbdev_open(): error claiming interface 0: Result too large
avrdude: usbdev_open(): no usable interface found
avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)

avrdude done.  

Thank you.

 

 

So, I download, build, and install libusb-1.0.21, libusb-compat-0.1.5, libhid-0.2.16 (which seems to be used only on Windows? - then why does homebrew use it?) and avrdude-6.3. Yes, the USB libraries are detected and 'avrdude' is built with them.  The result:

 

$ ./avrdude -C avrdude.conf -n -vvv -p t13 

avrdude: Version 6.3, compiled on Sep 12 2017 at 17:38:40
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "avrdude.conf"
         User configuration file is "/Users/xyz/.avrduderc"

         Using Port                    : usb
         Using Programmer              : avrispmkII
avrdude: usbdev_open(): Found AVRISP mkII, serno: 00A20000011E0
avrdude: max packet size expected 64, but found 8 due to EP 0x82's wMaxPacketSize
avrdude: usbdev_send(): wrote -34 out of 1 bytes, err = Result too large
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_recv_frame(): usb_bulk_read(): Result too large
avrdude: stk500v2_recv_mk2: error in USB receive
 ...
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x11
avrdude: stk500v2_disable(): failed to leave programming mode

avrdude done.  

Thank you.

 

Yep, it's "miserable" all right.

 

Also tried 'sudo' (didn't help), a old USB hub (no difference), looked at the FTDI kext (wasn't loaded), and tried to make a dummy kext (need special code-signing certificate for 10.12). All dead ends.

 

I applied the 'endpointdetect_pass1.patch' as described in a bug report at https://savannah.nongnu.org/bugs/index.php?40831 and covered at http://www.avrfreaks.net/comment/1011406#comment-1011406 .  Still no change. (I looked at the source, verified the patch, added a 'printf', and verified that the patched version was running.)

 

So, are there any USB AVR ISP programmers that actually work with avrdude on macOS 10.12?

 

Failing that, is there some other USB programmer that is absolutely known to work on 10.12?

 

I'm hoping that I've done something incredibly stupid and you knowledgable folks will point out my errors with hilarity and/or derision.  :-)

 

Thank you!

 

Mike

Last Edited: Thu. Sep 14, 2017 - 01:15 PM