[MacPorts] #41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 ----------------------+-------------------------------- Reporter: abusse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: ----------------------+-------------------------------- After updating to 6.0.1, trying to program with an AVR ISP MK2 only results in the following repeating statement: avrdude: stk500v2_recv_mk2: error in USB receive Reverting to 5.11.1 resolved the problem and everything works as expected. So it seems the port gets broke with the push to 6.0.1. -- Ticket URL: <https://trac.macports.org/ticket/41654> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => bsd@… * port: => avrdude Old description:
After updating to 6.0.1, trying to program with an AVR ISP MK2 only results in the following repeating statement:
avrdude: stk500v2_recv_mk2: error in USB receive
Reverting to 5.11.1 resolved the problem and everything works as expected. So it seems the port gets broke with the push to 6.0.1.
New description: After updating to 6.0.1, trying to program with an AVR ISP MK2 only results in the following repeating statement: {{{ avrdude: stk500v2_recv_mk2: error in USB receive }}} Reverting to 5.11.1 resolved the problem and everything works as expected. So it seems the port gets broke with the push to 6.0.1. -- Comment: In the future, please use WikiFormatting, fill in the Port field and Cc the port maintainers (port info --maintainers avrdude). -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Comment (by macports@…): I believe this is part of a bigger issue with avrdude. I am having similar issues with 6.0.1 on three different computers (10.6.8, 10.7.5, and 10.9). I've tried two different programmers. The AVRISP MKII, and the AVR Dragon via JTAG. The AVR ISM MKII was used on a ATmega328P (Uno), and the dragon on a ATmega64L on a custom board. Both devices work on on all machines using the 5.11 binary shipped with the Arduino IDE, but fail (sometimes hang, others timeout endlessly depending on the type of read) using 6.0.1. Here is the failed output from both targets while reading fuses: {{{ HackNMac:~ admin$ /opt/local/bin/avrdude -vvvv -c dragon_jtag -p ATmega64 -P usb avrdude: Version 6.0.1, compiled on Jan 3 2014 at 14:01:59 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/admin/.avrduderc" Using Port : usb Using Programmer : dragon_jtag avrdude: jtagmkII_dragon_open() avrdude: usbdev_open(): Found AVRDRAGON, serno: 00A20000357E avrdude: jtagmkII_getsync() avrdude: jtagmkII_getsync(): Sending sign-on command: avrdude: jtagmkII_send(): sending 1 bytes avrdude: Sent: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97] avrdude: jtagmkII_recv(): avrdude: usb_fill_buf(): usb_bulk_read() error Operation timed out avrdude: jtagmkII_recv(): Timeout receiving packet avrdude: jtagmkII_getsync(): sign-on command: status -1 avrdude: jtagmkII_getsync(): Sending sign-on command: avrdude: jtagmkII_send(): sending 1 bytes avrdude: Sent: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97] avrdude: jtagmkII_recv(): avrdude: usb_fill_buf(): usb_bulk_read() error Operation timed out avrdude: jtagmkII_recv(): Timeout receiving packet avrdude: jtagmkII_getsync(): sign-on command: status -1 avrdude: jtagmkII_getsync(): Sending sign-on command: avrdude: jtagmkII_send(): sending 1 bytes avrdude: Sent: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97] avrdude: jtagmkII_recv(): }}} and... {{{ HackNMac:~ admin$ /opt/local/bin/avrdude -vvv -P usb -c avrispmkii -p ATmega328P -qq -U lfuse:r:/tmp/LOW.tmp:h -U efuse:r:/tmp/EXTENDED.tmp:h -U hfuse:r:/tmp/HIGH.tmp:h avrdude: Version 6.0.1, compiled on Jan 3 2014 at 14:01:59 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/admin/.avrduderc" Using Port : usb Using Programmer : avrispmkii avrdude: usbdev_open(): Found AVRISP mkII, serno: 0000B0016102 avrdude: usbdev_recv_frame(): usb_bulk_read(): Operation timed out avrdude: stk500v2_recv_mk2: error in USB receive avrdude: usbdev_recv_frame(): usb_bulk_read(): Operation timed out avrdude: stk500v2_recv_mk2: error in USB receive avrdude: usbdev_recv_frame(): usb_bulk_read(): Operation timed out avrdude: stk500v2_recv_mk2: error in USB receive ^Cavrdude: usbdev_recv_frame(): usb_bulk_read(): Operation timed out avrdude: stk500v2_recv_mk2: error in USB receive avrdude: usbdev_recv_frame(): usb_bulk_read(): Operation timed out avrdude: stk500v2_recv_mk2: error in USB receive ^C HackNMac:~ admin$ }}} Both output were generated on the 10.7.5 machine. All three errors are USB related, though the hardware driver appears to report the error differently. All three of my machines have the same libusb: {{{ HackNMac:~ admin$ sudo port list | grep libusb Password: libusb @1.0.17 devel/libusb libusb-compat @0.1.4 devel/libusb-compat libusb-devel @1.0.8.20101017 devel/libusb-devel libusb-legacy @0.1.12 devel/libusb-legacy HackNMac:~ admin$ }}} -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Comment (by macsforever2000@…): {{{port list}}} [wiki:FAQ#portlist doesn't tell us anything very useful]. The output of the following command will however: {{{ port installed libusb* }}} -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Comment (by abusse@…): Stupid me already forgot about this ticket. In fact I had solved the problem back in december but had not the time to to get back since I had a very pressing deadline. I am very sorry for that! The problem is that the patch to the file {{{stk500v2.c}}} was removed with the push to 6.0.1. Adapting the changes from that file to 6.0.1 did the trick for me. -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Comment (by macports@…): Replying to [comment:3 macsforever2000@…]:
{{{port list}}} [wiki:FAQ#portlist doesn't tell us anything very useful]. The output of the following command will however:
{{{ port installed libusb* }}}
Here is the output from the 10.7.5 machine (the other two are identical): {{{ HackNMac:~ admin$ port installed libusb* The following ports are currently installed: libusb @1.0.17_0 (active) libusb-compat @0.1.4_0 (active) HackNMac:~ admin$ }}} -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Comment (by macports@…): Replying to [comment:4 abusse@…]:
Stupid me already forgot about this ticket. In fact I had solved the problem back in december but had not the time to to get back since I had a very pressing deadline back then. I am very sorry for that!
The problem is that the patch to the file {{{stk500v2.c}}} was removed with the push to 6.0.1. Adapting the changes from that file to 6.0.1 did the trick for me.
That sounds like it'll fix the problem with the AVR ISP MKII, but doesn't explain why the AVR Dragon via JTAG fails as well. Is there a chance a patch was left out there as well? It would be great to solve these issues and update the port. -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Comment (by g5pw@…): Does it work with avrdude 6.1 (just updated in r120473)? -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Comment (by abusse@…): Thanks for the upgrade! Unfortunately this does not fix the problem. Like I said before applying the patch from 5.11.1 of the `stk500v2.c` file made 6.0.1 working again. But looking at the vanilla code of 6.1 the part of the code in question looks like this: {{{#!c DEBUG("STK500V2: stk500v2_getsync()\n"); if (PDATA(pgm)->pgmtype == PGMTYPE_JTAGICE_MKII || PDATA(pgm)->pgmtype == PGMTYPE_JTAGICE3) return 0; retry: }}} To make it work, I would expect something like this: {{{#!c DEBUG("STK500V2: stk500v2_getsync()\n"); if (PDATA(pgm)->pgmtype == PGMTYPE_JTAGICE_MKII || PDATA(pgm)->pgmtype == PGMTYPE_JTAGICE3 || PDATA(pgm)->pgmtype == PGMTYPE_AVRISP_MKII) return 0; retry: }}} I am currently using an Arduino Mega to test it and since the Arduino does only an emulation of the original programmer it might be a flaw on the Arduino side. I do not have an original AVR programmer at my disposal right now, so I cannot test this hypothesis. But since I assume that some people are trying to use the Arduino with a Mac it might be worth fixing this flaw in avrdude, so they can simply get everything running without a problem. If you don't want to have this patch in the code, maybe we can at least create a variant with this patch to make life of some people easier. -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Comment (by g5pw@…): This sounds like it should be reported upstream, though, as it doesn't look like a bug in the port as a bug in avrdude itself. Perhaps it's linked to [https://savannah.nongnu.org/bugs/?40831 this bug] or [https://savannah.nongnu.org/bugs/?40702 this one]? -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: avrdude | -----------------------+------------------- Comment (by abusse@…): Yes definitely, I will report it as soon as I have some minutes to spare...and it doesn't seem to be connected to the bugs you mentioned. However, the patch was part of the port file prior to version 6.0, so for me it raises the question why? -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#41654: cross/avrdude: update to 6.0.1 broken with AVR ISP MK2 -----------------------+-------------------- Reporter: abusse@… | Owner: bsd@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: avrdude | -----------------------+-------------------- Changes (by g5pw@…): * status: new => closed * resolution: => fixed Comment: Re-added patch in r120866. -- Ticket URL: <https://trac.macports.org/ticket/41654#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts