avr-chat
[Top][All Lists]
Advanced

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

[avr-chat] FTDI programmer device name space--suggestions?


From: Johnathan Corgan
Subject: [avr-chat] FTDI programmer device name space--suggestions?
Date: Sat, 24 Sep 2005 10:15:42 -0700
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050912)

I am continuing my work to add an inboard FTDI USB<->serial
converter-based bit bang programming mode to avrdude.  This allows one
to wire MOSI/MISO/SCLK/RESET to the FTDI bit-bang bus and have USB based
in-circuit programming of an AVR.  So, one could use an FT232BM or
similar part to not only provide a simple USB interface to an AVR
project for normal communications, but also to reuse this same set up
for in-circuit programming.

I've had this working for several weeks now in experimental form, using
FTDI's FTD2XX driver library on Windows and libftdi under Linux.  My own
project is a USB-powered peripheral device with an FT232BM and an
ATmega8, and flash updates over the USB are pretty convenient.

Anyway, I'm trying to formalize this functionality and make it ready for
general inclusion in avrdude (potentially as part of the 5.1 release),
and I'm struggling with what "name space" I should use to designate the
"port" (-P command line parameter.)

Under Windows, using FTD2XX, the open call to access an FTDI device on
the bus takes an integer device number, which corresponds to the order
the bus scan finds FTDI chips.  Alternatively, one can specify a USB
device name string or serial number string.

Under Linux, using libftdi, the open call takes an integer vendor
ID/product ID pair, optionally qualifying them with a device name string
or serial number string.  The ID pair is required; the strings are
simply used to further restrict the device selection if they are supplied.

Finally, certain FTDI parts are dual-interface, and one must choose
which interface.  Under the FTD2XX library in Windows, these enumerate
as separate devices during bus scan so one would just use a different
integer in the open call.  Under libftdi, one has to select the
interface once opened with a different call, passing a 0 or a 1.

So, what's a good way to supply this to -P in avrdude?

I can see something like:

-P <vendor ID>:<product ID>:<desc>:<serial>:<interface>

or

-P <devnum>

with suitable defaults for blank fields.  But this seems overly
complicated, and which one to use is platform dependent.  (It's also a
lot of work to program and debug :-)

I know the FTDI/AVR combination is a (relatively) small subset of the
AVR community, but I'm sure there are others besides myself who would
benefit from this and I want to get it right.

Comments?

-Johnathan




reply via email to

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