avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] [bug #38659] AVRFTDI not working anymore since svn1098


From: Hannes Weisbach
Subject: Re: [avrdude-dev] [bug #38659] AVRFTDI not working anymore since svn1098 and destroys flash-contents
Date: Thu, 11 Apr 2013 16:42:42 +0200

Am 09.04.2013 um 19:52 schrieb Tom:

> Follow-up Comment #5, bug #38659 (project avrdude):
> 
> For r1097, the file not exists before, it's created but empty for raw data
> (size=0) or starts with some expected stuff for hex-files (but the content is
> missing).
Ok, so with Joerg's explanation r1097 obviously works.
> 
> For r1139, there must be something different. I guess - it can't be a hardware
> or driver problem, if the previous software version can communicate without
> problems and the new one stops with the same system, libraries and conditions
> (just switch to other svn-version and call configure/make). 
Do you do an svn update -r<rev>? If so, do you call 'make clean'? Maybe you 
should call 'make distclean' or 'make maintainer-clean-am' to avoid having old 
files around built by './configure'.
> 
> Last time i started debugging, the application hangs inside
> write_flush-function (especially the ftdi_write_data-call),
This makes sense, since libftdi is failing to communicate with the FT2232D
> previously used
> ftdi_usb_purge_buffers, but without deeper knowlege - i don't know what's
> going on.
Calling ftdi_usb_/purge/_buffers() to /flush/ buffers is a bad idea, since 
purge just drops all data not yet sent to the USB device instead of flushing 
this data to the USB device.
> 
> Another problem is, if the previous application call failed (Ctrl+C) .. the
> next call hangs at beginning with:
> 
>> [..]
>>                                  1    OUTPUT      1      0
>>                                  0    OUTPUT      0      0
>> 
>>        Programmer Type : avrftdi
>>        Description     : FT2232D based generic programmer
>> 
>> avrftdi: Setting pin 4 (ADBUS3) as RESET: low (high active)
>> avrftdi: avrdude info: direction: 0x000b, value: 0x0000
>> avrftdi: FTDI LOG: 80 00 0b 82 00 00
>> 
> 
> Looks like the initialization of the FTDI not works properly to start from a
> clean starting line.
Yes, this is a known problem. If you have to kill avrdude it is best to unplug 
and replug the USB cable. Although FTDI has an application note describing 
synchronizing with a chip in an unknown state, it does not work reliably (read: 
not at all) on OS X but it does work on Linux. I suspect it has something to do 
with how libusb works on different operating systems.
> 
> Maybe you can create a working windows binary with latest svn version, if it
> is working with your hardware (just read a empty flash back in file), it
> should working with my hardware too.
I don't have a Windows tool chain.

Cheers,
Hannes


reply via email to

[Prev in Thread] Current Thread [Next in Thread]