USB serial port (FTDI) and avr jtag problems


Zink

Member
Joined
Mar 8, 2012
Messages
170
I'm quite much into AVR development, and thought I could use Pandora for programming devices in places where laptop is highly inconvenient.


I have jtag-lock-pick device (essentially the same as Amontec JTAGkey, uses FT2232D chip), that I can use as a serial interface for JTAGICE mkI. The problem is I can't get it to work with Pandora. I tried sudo modprobe ftdi-sio, and also sudo modprobe ctc-acm, as suggested somewhere, but when I connect the device to the USB port nothing happens, and nothing appears in dmesg.


I also tried the kernel 2.6, and there doing modprobe ftdi-sio causes two devices to appear in /dev: usbdev1.1_ep00 and usbdev1.1_ep81, and some messages in dmesg (ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver and sometimes hub 1-0:1.0: unable to enumerate USB device on port 2). When I connect the JTAG still nothing shows in dmesg, and when I try to use avrdude it shows avrdude:ser_open(): can't open device "/dev/usbdev1.1_ep00": No such device or address (and the same for ...ep81).


I also have JTAGICE mkII, and tried to connect it, but avrdude doesn't see it too (avrdude: jtagmkII_getsync(): sign-on command: status -1).


Is it possible to make it working?
 
Are you directly connecting this to the Pandora?, if so this appears to be a USB 1.1 device and as you may or may not know the Pandora's regular sized USB port is USB 2.0 High Speed only. The solution is to connect this device to USB 2.0 hub will allow you to use USB 1.1 devices without issues.
 
Last edited by a moderator:
Ah, right. I have read about USB 1.1 incompatibility numerous of times already, but now completely forgot about it :) . I thought FTDIs were 2.0 already.


FTDI works through a hub without modprobing anything. JTAGICE mkII doesn't work, but shows in dmesg while connecting, so I suppose it's a driver issue.


By the way I have another question (more serious this time :) ): The avrdude included in the avr development pnd (and the Angstrom repo) is version 5.10, which does not have support for JTAGkey (ISP programming). Version 5.11 has, but I have troubles compiling it. I'm trying to compile on the Pandora using cdevtools version 0.0.3.39 (from Pandora repo). It builds fine, although when I try to access JTAGkey it says that it hasn't been compiled with USB support.


Alright, I have downloaded, built and installed libusb 1.0. No problem here. Then I configured and made avrdude again, and... the same message. What's wrong? Configure script for avrdude outputs the following:



Code:
checking libusb-1.0/libusb.h usability... yes

checking libusb-1.0/libusb.h presence... yes

checking for libusb-1.0/libusb.h... yes

checking libusb.h usability... no

checking libusb.h presence... no

checking for libusb.h... no

checking for libusb_init in -lusb... no

checking for ftdi_init in -lftdi... no


So I guess it's missing libusb 0.1 compat. I tried to build it, but it complains that libusb.h is missing... Wut? libusb.h file is missing from the libusb source? How am I supposed to build it? :)


From the above output I also guess that I will need libfdti, so I have downloaded it and tried to build, but it's configure says that it cannot find libusb-configure script. So maybe the libusb is broken somehow. I tried doing make install for libusb again, but it didn't change anything. Any ideas?
 
I made it! :)


First I installed libftdi-1.0 (with -dev) and libftdi-compat (also with -dev) from Angstrom repo. Then installed libftdi-0.19 (+ -dev) from the repo, and the avrdude still compiled the same. So I called configure with LIBS="-lusb-1.0", then make clean and it compiled USB and FTDI support. And now the JTAG lock pick works fine. JTAGICE mkII also works, however it fails on verification and then hangs when trying to set back fuses (but that may be a power issue).


I'm not sure if the LIBS thing is necessary, because when I tried without it I forgot to make clean before compilation, so it wasn't actually building it.


If anyone is willing to update the AVR devel pnd with the newest avrdude, drop me a pm.
 
Back
Top