Archives For JTAG

Flyswatter JTAG and AVR32

August 9, 2010 — 1 Comment

>Today I soldered AVR32 adapter for Flyswatter JTAG. Actually it’s very simple task – just connect respective pins and make common ground wire. No capacitors, resistors or MOSFETs. Idea was to make it nice and neat but having bought wrong breadboard and soldered first headers in a wrong place I just let it flow and here it is:


From aesthetics point of view suck, but it also works and it’s everything I need:

Info : JTAG tap: avr32.cpu tap/device found: 0x21e8203f (mfg: 0x01f, part: 0x1e82, ver: 0×2)

Warn : JTAG tap: avr32.cpu UNEXPECTED: 0x21e8203f (mfg: 0x01f, part: 0x1e82, ver: 0×2)

>Back from the land of GUI software. I have bought one more Flyswatter JTAG recently and now have two boards connected to my home box. Unfortunately both Flyswatters got the same USB serial number so stock openocd opens only the first device it stumbles upon. Here is small patch that adds ft2232_index command to OpenOCD FTDI driver that allows to point at specific device to open. Works only with libftdi. In the same directory you can find my configs for AR71XX-based RouterStation Pro and Portwell’s CAM-0010 device based on Octeon CN3010

>Since I lent my RS232/USB adapter to a friend it was nice opportunity to experiment with Flyswatter on-board RS232 port. OS X does not support FTDI devices out of the box, but it’s not a problem for OpenOCD, which uses generic interface to communicate JTAG board. Things get a little bit more complicated when you’re trying to get on-board RS232 port working.

I started with installing stock drivers from FTDI site. Current version supports Snow Leopard. With these drivers installed system started to detect two COM ports but JTAG part stopped to work as OpenOCD failed to claim USB device.

Long story short: you’ll need to edit kext content to prevent first usb device from being recognized as a virtual COM port. Nothing fancy, simple text editor would do the trick for all you need to edit is plain XML file. Find line <key>FT2232C_A</key> and delete it along with following <dict> element. Reload kext using kextunload/kextload and voila – JTAG works, “cu -s 115200 -l cu.usbserial-FS000000B” works.

>So it has been a month since last post about this device and I think it’s time to announce current state of affairs.

  • UART: just works
  • PCI controller: kind of works. Proper interrupt handling/routing required.
  • On-board ethernet controller: WAN port works fine. Mounts NFS root/loads init. Some minor work should be done in order to get both ports working.
  • Integrated OHCI controller: kernel detects and initializes it. Need USB cable to connect something to headers on the board and test if it actually works.
  • Integrated EHCI controller: in progress. Some refactoring of current MIPS bus_space implementation required.
  • GPIO: to be done
  • Flash memory: to be done

At the moment further progress was blocked with something that looks like memory corruption. It’s hard to trace with ktr(4) and printf(9) so I ordered Flyswatter JTAG adapter and MIPS14 adapter from Tin Can Tools. I was warned that Flyswatter/MIPS combination is not supported by OpenOCD but I’d better spend some time making it work then tracing obscure memory corruptions in the wild.