libftdi Archives

Subject: Re: Programming an FT245RL

From: Karl Cunningham <karlc@xxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 26 Oct 2011 15:40:00 -0700
On 10/26/2011 01:55 PM, Uwe Bonnes wrote:
"Karl" == Karl Cunningham<karlc@xxxxxxxxxx>  writes:

     Karl>  We have an older Mint (Ubuntu) system which works fine to program
     Karl>  FT245R chips, using ftdi_eeprom 0.3 and libftdi 0.15. This uses
     Karl>  the 2.6.27 kernel.

     Karl>  We're bringing up a new system with Ubuntu 10.04, kernel
     Karl>  2.6.32. We downloaded a fresh ftdi_eeprom v0.3 and libftdi 0.19,
     Karl>  but we're having a hard time getting this to work.

     Karl>  We compiled and installed libftdi-0.19.

     Karl>  Compiling ftdi_eeprom, the compiler gives an error:
     Karl>  ftdi_eeprom-0.3/src/main.c:112: error: �struct ftdi_eeprom�
     Karl>  has no member named �BM_type_chip� Commenting out line 112
     Karl>  lets it compile ok (but may not be the right thing to do). After
     Karl>  programming a chip with this we get a MaxPacketSize of zero for
     Karl>  the IN endpoint.

     Karl>  lsusb -v [snip] Endpoint Descriptor: bLength 7 bDescriptorType 5
     Karl>  bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk
     Karl>  Synch Type None Usage Type Data wMaxPacketSize 0x0000 1x 0 bytes

     Karl>  I get the feeling there is something fundamental we're doing wrong
     Karl>  here.

Can you try to run on a git libftdi-1.0?

Thanks for the reply.

Compiled and installed lubftdi-1.0 from
git://developer.intra2net.com/libftdi

Compiling ftdi_eeprom, at first it couldn't find libusb.h. I put in a symlink to that, but then got the errors below. Also tried ftdi_eeprom branch master from git://developer.intra2net.com/ftdi_eeprom (didn't see that on the web site but took a guess at the url).

ftdi_eeprom/src/main.c:100: error: storage size of ‘eeprom’ isn’t known
ftdi_eeprom/src/main.c:146: error: too few arguments to function ‘ftdi_eeprom_initdefaults’ ftdi_eeprom/src/main.c:197: error: ‘struct ftdi_context’ has no member named ‘eeprom_size’ ftdi_eeprom/src/main.c:216: error: too many arguments to function ‘ftdi_read_eeprom’ ftdi_eeprom/src/main.c:218: error: ‘struct ftdi_context’ has no member named ‘eeprom_size’ ftdi_eeprom/src/main.c:218: warning: passing argument 2 of ‘ftdi_eeprom_decode’ makes integer from pointer without a cast /usr/local/include/libftdi/ftdi.h:500: note: expected ‘int’ but argument is of type ‘unsigned char *’ ftdi_eeprom/src/main.c:218: error: too many arguments to function ‘ftdi_eeprom_decode’ ftdi_eeprom/src/main.c:260: error: too many arguments to function ‘ftdi_eeprom_build’ ftdi_eeprom/src/main.c:286: error: too many arguments to function ‘ftdi_write_eeprom’

Seems like it's picking up the wrong ftdi.h file, but this is the only one I see (other than in the build directories).
/usr/local/include/libftdi/ftdi.h

Any ideas?

Karl

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
Current Thread