Am 24.08.2011 um 22:08 schrieb Joerg Wunsch: > Follow-up Comment #9, patch #7486 (project avrdude): > > OK, I finally had a chance to try this on my FreeBSD machine > (the Linux machines I've got access to don't allow me to > access an unknown FTDI device). > > I've got an OpenOCD-USB: > > http://www2.embedded-projects.net/index.php?page_id=256 > > which I believed were compatible with the "avrftdi" wiring. > > All I get is: > > % ./avrdude -p m128 -c avrftdi -C avrdude.conf -B10 > > avrftdi.c:96 avrftdi_flush() ftdi_read_data(&ftdic, buf, 1) != 1: Device busy > (16) > all fine > avrdude: initialization failed, rc=-1 > Double check connections and try again, or use -F to override > this check. > > > avrdude done. Thank you. > > (See attachment for full -vvvv log.) > > When I try the 2232HIO programmer, I get: > > % ./avrdude -p m128 -c 2232HIO -C avrdude.conf -B10 > avrdude failure: invalid pin definition (pin no > 11) in config file > pin function no 7, pin no: 0xc > > avrdude done. Thank you. > The reason is, pin_direction is used unintialized. Well, technically it is initialized; to 0. When ftdi_set_bitmode() is called, no pin is configured as output. Which should be the case for data out, clock and reset (at least). Some dozen lines later pin_direction is initialized with the corresponding values. Either the initialization is moved up, or the call to ftdi_set_bitmode is moved down.
Regards, Hannes _______________________________________________ avrdude-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avrdude-dev
