avrdude with AVRISP-mkII on macOS 10.12 ?

Go To Last Post
7 posts / 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
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nobody? I'll assume it really cannot work then.

It doesn't matter anymore - I'm using a serial ISP programmer from Pololu.  And of course it works, since it makes a serial device like  /dev/cu.usbmodem00192032.

 

Mike

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mha11 wrote:
I'm using a serial ISP programmer from Pololu.
version 2?

Pololu Robotics and Electronics

Pololu

Electronics » Computer Interface »

Pololu USB AVR Programmer v2

https://www.pololu.com/product/3170

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mha11 wrote:
The version of 'avrdude' in CrossPack is old, but it's the one I used in 2014.
Some of what's in CrossPack version 20170210 :

libusb 1.0.21

avarice 2.13

avrdude 6.3

AVR GCC 4.9.2 plus Atmel 3.5.4

mha11 wrote:
... homebrew ...
There's also one for MacPorts on macOS 10.12.5 :

Up to date instructions for the AVR GNU toolchain on OS X and the Olimex AVR-ISP-MK2 programmer.

https://github.com/brettyhale/AVR-OSX-and-Olimex-ISP-MK2

(second README)

https://github.com/brettyhale/AVR-OSX-and-Olimex-ISP-MK2/blob/master/README.xcompile.20170518

via

Olimex Support Forum

Olimex

https://www.olimex.com/forum/index.php?topic=5781.0

 


https://github.com/obdev/CrossPack-AVR/blob/master/mkdist.sh

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, #3170 Pololu USB AVR Programmer v2

 

Thanks for the links - brettyhale's github site sounds promising -- I'll try it this weekend.  Also seems that I have to put new firmware into the programmer?  The other links are the ones I chased down, and they didn't help. I'm glad that they work on Linux, but they weren't doing anything for me - and they build avrdude the same way I was.

 

And, avrdude 6.0.1 works OK with the programmer, when running 10.9, but not when running 10.11, 10.12.

 

Thanks for taking time to answer!

 

 

 

Mike

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mha11 wrote:
Also seems that I have to put new firmware into the programmer?
I'm guessing no though, on the Windows side, there is new firmware.

mha11 wrote:
I'm glad that they work on Linux, but they weren't doing anything for me - and they build avrdude the same way I was.
Another source for AVRDUDE on macOS is PlatformIO.  (oh, post 1)

http://docs.platformio.org/en/latest/platforms/atmelavr.html#packages

Python or Homebrew :

http://docs.platformio.org/en/latest/installation.html#installer-script

 


AVRISP-MKII Clone non-functional under Atmel Studio 7 #63

https://github.com/abcminiuser/lufa/issues/63

...

... Added signed driver

...

 

Edit : strikethru

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Wed. Oct 18, 2017 - 04:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got excited when I saw "Added signed driver", but then saw out that it's for Windows.

I looked through the other issues on the LUFA github site, followed the OS X ones, and didn't find anything helpful.

Thanks again for helping.

Mike