avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] [PATCH] avrdude + libftdi, on Linux


From: Dave N6NZ
Subject: Re: [avrdude-dev] [PATCH] avrdude + libftdi, on Linux
Date: Mon, 23 Oct 2006 14:21:54 -0700
User-agent: Thunderbird 1.5 (X11/20051201)


David Brownell wrote:
Very interesting, but I'm a little confused. Is it only the Windows version
that links the proprietary library? Or are you saying a proprietary library
is need for Linux? I thought there was an open sourced FTDI library, but it
may be incomplete/buggy, or my recollection may be incomplete/buggy.... or
both. (All four?)

The patch I referenced uses a proprietary "D2XX" library; libftdi is GPL.
There seems to be a partially functional d2xx for Linux, provided by FTDI
(but only "tested using kernel 2.4.25") also as closed/proprietary source.

OK, I was confused.  Imagine that.

So, I see there is no way to get a 100% open source solution for *any* FTDI serial port product. Which is a major annoyance for me.


So far as I know "libftdi" exposes all the features of "d2xx", but then I've
not done a real comparison.  (The public FTDI docs about their bitbanging
refer almose exclusively to the D2XX API, rather than the on-wire protocol.)

All software is buggy.  :)   I noticed a few bugs in libftdi as I was doing
this stuff, but only the baud rate stuff made me question anyone's ancestors.
(And that seems to be an FTDI issue...)


 Also, this seems like it would work with the TuxGraphics programmer, yes?
 http://tuxgraphics.org/electronics/200510/article05101.shtml

A quick glance suggests it certainly should.

# AvrUsb500-isp -- from tuxgraphics.org, to bootstrap stk500 firmware
programmer
  id       = "avrusb500-isp";
  desc     = "ft232b bitbanging, to bootstrap tuxgraphics.org AvrUsb500";
  type     = ftbb;
  reset    = 8;
  sck      = 5;
  mosi     = 7;
  miso     = 6;
;


 The TuxGraphics programmer uses FTDI bit-bang to load the bootloader, and
 then uses the bootloader to load the application code, so it is a
 self-bootstrapping AVR programmer. (I don't have one, but the concept is
 very cool.) Anyway, could this bootstrap the TuxGraphics programmer in lieu
of the bit-bang programner that Guido provides?

Presumably.  Using "avrdude" not "uisp" of course.

Doing a quick comparison of that uisp patch to what I sent, the uisp version:

 - rolls its own version of "libftdi"
 - with different baud rate code
 - hard-wires one pin configuration
 - can't work with parts that don't self-identify as generic-from-ftdi
 - uses the slower-than-painful mode many-calls-per-bit mode

Yes, sloooooow, which is why only the bootloader gets stuffed in that way.


Another way to look at that last is that it would never be able to use the
saner "SYNCBB" mode of the ft232r chips ... whereas the code I've sent should
be able to handle it easily, at probably at least 20x the bit rate.


 I am interested in seeing FTDI bit-bang get into avrdude for a project I
 have in mind for the near future. The TuxGraphics programmer uses the FT232BM,

I'd hope it has by now updated to the FT232BL for ROHS compliance... :)

You know, if we could just stop all those inner city kids from ingesting lead by opening up their parents consumer electronics and licking the circuit boards, we wouldn't have to deal with all this ROHS stuff.


 and I was planning to do the same, since it looks to me like it is better
 supported with opensource software than the FT232RL, in particular I don't
 think there is a good open source solution for tweaking the configuration
 of the 'RL.

I'm not sure that's true.  Aren't they supposed to be upwards compatible from
the software perspective?  That is, the integrated EEPROM acting like the one
that was previously external, the bitbang mode acting the same if you discount
those new optional modes and the r/w strobes, etc.  Changes to affect the board
design rather than software, in short.

OK, I'll have to go study that in further detail.



The 'RL, however, requires less support electronics, so the 'RL would be preferable if there were end-to-end opensource solutions that could
 do all configuration, and also support bit-bang AVR programming to create a
self-bootstrapping widget.

From what I can tell, without one in hand, the RL should look to software
like a drop-in replacement for the BL.  I hope that's not exactly the case;
one wants to be able to autodetect it so as to kick in the smarter SYNCBB
bitbang mode.  Failing autodetect, I'd expect there to be some way to feed
a manual config setting through avrdude.

- Dave

Thanks for the input. I'll need to study that some more. In any case, I am in favor of including FTDI bit-bang programming in avrdude so that I can draft that slipstream with my USB project.

-dave





reply via email to

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