[Top][All Lists]

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

Re: [avrdude-dev] avrdude and FT2232

From: Ville Voipio
Subject: Re: [avrdude-dev] avrdude and FT2232
Date: Wed, 30 Apr 2008 16:11:14 +0300
User-agent: Thunderbird (Windows/20080213)

Very small update to the testing part:

- tested in out-of-the-box Ubuntu 7.10 with libftdi-0.12 (I needed to make small changes to the configure.ac to be able to use the new autotools, but thats a topic of another patch.) NO CYGWIN / OS X testing (I'll do the OS X part, but only have a 64-bit Cygwin.)

- tested with OS X Leopard (10.5.2) and libftdi 0.10. Compiles without complaints (with the autotools patch), runs without complaints. Is somewhat slower (2.5x) than in Linux despite the OS X machine being faster per se. (This seems to be a general tendency with libftdi in OS X. Another reason to hack in the D2XX support.)

Please note that in OS X the built-in FTDI serial driver (kernel extension) interferes with libftdi (and D2XX), a small edit is needed. I cut&paste some info below. This should probably be documented in avrdude documentation, if the FT2232 patch makes its way into trunk. I try to make Apple aware of this problem, so that it would become fixed in OS X.

- Ville

[Note: this text was written in another context, and it only talks about the Olimex JTAG adapter, but similar things may happen with other FT2232 adapters, as well.]

The trivial (sledgehammer) solution is to get rid of the FTDI serial driver:

  sudo rm -r /System/Library/Extensions/FTDIUSBSerialDriver.kext

Unfortunately, this has the very nasty side effect that no FTDI-based serial adapter will work in the future any more. That may be acceptable in some cases, but many people need the serial port for embedded systems, as well.

Ideally, the operating system should be prevented from loading the serial driver for port A of the JTAG adapter. Port B is actually used as a serial port in the Olimex adapter, so even that driver should be loaded.

This can be achieved by editing the FTDI kernel extension. Sounds frightening but is not that difficult, just edit the file /System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/Info.plist. This is an OS X property list file, and it is a valid XML file, so any text editor or XML editor will do.

This file lists all known FTDI based USB devices with the VID ad PID (Vendor and Product ID) values and names. The file lists both serial ports of the Olimex part, and the A port defintion needs to be removed. Here is the part to be removed:

<key>Olimex OpenOCD JTAG A</key>

Remove this part and leave the B device intact. Save the file (and remember to check the file permissions).

Now reboot the computer. That is not absolutely necessary; removing and reinserting the USB device may suffice, but as the FTDI driver refuses to unload with kextunload, the best way to ensure everything works is to reboot.

reply via email to

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