avrdude-dev
[Top][All Lists]
Advanced

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

Re: Moving avrdude to Git ?


From: Hannes Weisbach
Subject: Re: Moving avrdude to Git ?
Date: Fri, 3 Dec 2021 09:26:21 +0100


> Am 03.12.2021 um 02:33 schrieb Xiaofan Chen <xiaofanc@gmail.com>:
> 
> On Fri, Dec 3, 2021 at 7:29 AM Hannes Weisbach <hannes_weisbach@gmx.net> 
> wrote:
>> 
>> Just a comment about pthread dependencies, I think I’ve made before. If 
>> nothing changed,
>> only the ftdi_syncbb programmer used that and it was required only, because 
>> buffer limits
>> of the FTDI chip were ignored. Given proper handling of buffer sizes (see 
>> avrftdi) no
>> deadlocks can occur using libftdi/FTDI chips and hence the need for 
>> threading goes away.
>> I faintly remember making that argument before and advocating for the 
>> pthreads
>> requirement be dropped because it allows for easier windows builds. I’m not 
>> sure,
>> if I ever even submitted a patch for that, probably not.
>> 
>> I know that this is a tangent to the current discussion, but if people start 
>> investing time
>> in improving windows builds I thought I better mention it.
> 
> If only libftdi is the constraint, there is an alternative solution to
> replace libftdi
> with libusb.
> 
> FYI -- openocd project has done quite some conversion to replace libftdi
> with libusb.
> Eg:
> https://github.com/openocd-org/openocd/blob/master/src/jtag/drivers/mpsse.c
> https://github.com/openocd-org/openocd/blob/master/src/jtag/drivers/ft232r.c

With libusb you have the same issue that you would not be able to send 
arbitrary amounts of data to the FTDI chip. That is the real issue in 
ftdi_syncbb. Using threads is just a kludge to work around that.

—- 
Hannes




reply via email to

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