Olimex Support Forum

Microcontrollers => AVR => Topic started by: jbz on January 04, 2018, 03:01:41 PM

Title: AVR-ISP-MK2 and macOS X not working
Post by: jbz on January 04, 2018, 03:01:41 PM
I recently purchased an AVR-ISP-MK2 through Farnell. Despite following instructions to deal with avrdude bug, I cannot connect to it on a Mac. In particular, running avrdude -v -p atmega328p -P usb -c avrispmkii -C avrdude.conf gets me
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200312345
...
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
avrdude: initialization failed, rc=-1


I did follow instructions https://www.olimex.com/forum/index.php?topic=5781.0 (https://www.olimex.com/forum/index.php?topic=5781.0) which involves installing the libusb firmware (which I take is the same as here: https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/AVR-ISP-MK2-Firmware-WindowsDrivers.zip (https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/AVR-ISP-MK2-Firmware-WindowsDrivers.zip), which just to be sure I also tried) and then compiling a patched version of avrdude 6.3 (patch from here: https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/endpointdetect_pass1.patch (https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/endpointdetect_pass1.patch); I tried both the included patched version from the instructions as well as applying the patch myself).

For reference, using my old usbTinyISP I can read/write the Arduino board (with ATMega328P) without issues.
What am I missing?
Title: Re: AVR-ISP-MK2 and macOS X not working
Post by: LubOlimex on January 04, 2018, 03:40:43 PM
Did you also change the firmware of AVR-ISP-MK2 as the guide suggests?

Did you test with older version of AVRDUDE (versions prior to 6.x.x, like 5.x.x)? Such a test would determine if it is the endpointdetect_pass bug. If you are using Arduino IDE, then get version 1.5.7 or older (the last suitable Arduino IDE version that uses pre-6.x.x AVRDUDE version is Arduino IDE 1.5.7).

Best regards,
Lub/OLIMEX
Title: Re: AVR-ISP-MK2 and macOS X not working
Post by: jbz on January 04, 2018, 03:48:29 PM
I did change the firmware, and I also tried older versions of avrdude (compiled 5.9), to no avail.
Title: Re: AVR-ISP-MK2 and macOS X not working
Post by: LubOlimex on January 04, 2018, 03:55:09 PM
It can be something else, not related to the software installation. You mentioned that Usbtinyisp works fine. Usbtinyisp has two ISP connectors - 6-pin and 10-pin one. Did you notice that AVR-ISP-MK2 has NO 6-pin ISP connector; and only a 10-pin ISP connector?

Edit: This error might also appear if the target is not powered or insufficiently powered; how do you power the target ATmega328p? If you power it from the AVR-ISP-MK2, are the jumpers set properly?
Title: Re: AVR-ISP-MK2 and macOS X not working
Post by: jbz on January 04, 2018, 04:33:59 PM
 :-[ D'oh. It'll be the ISP connector. It didn't even occur to me they might not be the same. Cannot test it now, but that'll be it. Sorry for the waste of your time.