New IT forum
21 September 2020, 06:25:44 am *
Welcome, %1$s. Please login or register.

: PiHub now in stock.
 
Pages: [1]

Author Topic: Dreamplug / JTAG for Mac OSX 10.6  (Read 14963 times)

IanE

  • Newbie
  • *
  • Posts: 3
Dreamplug / JTAG for Mac OSX 10.6
« on: 05 June 2011, 10:30:32 am »

I took a while this morning to try to load the JTAG FTDI Drivers for the Mac and I got this far.

I hope the story so far might be of use to others in any case:

Download and install FTDI VCP Drivers from http://www.ftdichip.com/Drivers/VCP.htm

Connect the JTAG

Open System Profiler and look for the JTAG device under the Hardware => USB

Mine looked like this:
Code: [Select]
SheevaPlug JTAGKey FT2232D B:

  Product ID: 0x9e8f
  Vendor ID: 0x9e88
  Version: 5.00
  Serial Number: FTTH8PDG
  Speed: Up to 12 Mb/sec
  Manufacturer: FTDI
  Location ID: 0xfa140000
  Current Available (mA): 500
  Current Required (mA): 100

Note Device name, Product and Vendor ID's and convert the Ids from Hex to decimal - in this case 40591 and 40584

Edit /System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/Info.plist and add (substitute Device name and IDs if different)
Note although only the B device showed up in System Profiler there is an A too - hence two entries in the .plist
Code: [Select]
<key>SheevaPlug JTAGKey FT2232D A</key>
        <dict>
                <key>CFBundleIdentifier</key>
                <string>com.FTDI.driver.FTDIUSBSerialDriver</string>
                <key>IOClass</key>
                <string>FTDIUSBSerialDriver</string>
                <key>IOProviderClass</key>
                 <string>IOUSBInterface</string>
                <key>bConfigurationValue</key>
                <integer>1</integer>
                <key>bInterfaceNumber</key>
                <integer>0</integer>
                <key>idProduct</key>
                <integer>40591</integer>
                <key>idVendor</key>
                <integer>40584</integer>
        </dict>
        <key>SheevaPlug JTAGKey FT2232D B</key>
        <dict>
                <key>CFBundleIdentifier</key>
                <string>com.FTDI.driver.FTDIUSBSerialDriver</string>
                <key>IOClass</key>
                <string>FTDIUSBSerialDriver</string>
                <key>IOProviderClass</key>
                <string>IOUSBInterface</string>
                <key>bConfigurationValue</key>
                <integer>1</integer>
                <key>bInterfaceNumber</key>
                <integer>1</integer>
                <key>idProduct</key>
                <integer>40591</integer>
                <key>idVendor</key>
                <integer>40584</integer>
        </dict>

Now reload the driver with:
Code: [Select]
sudo kextunload -b com.FTDI.driver.FTDIUSBSerialDriver

sudo kextload -b com.FTDI.driver.FTDIUSBSerialDriver

Now open a terminal and:
Code: [Select]
ls -las /dev | grep -i usb

This should show something like:
Code: [Select]
0 crw-rw-rw-   1 root  wheel      11,   9  5 Jun 11:34 cu.usbserial-FTTH8PDGA
0 crw-rw-rw-   1 root  wheel      11,   7  5 Jun 11:34 cu.usbserial-FTTH8PDGB
0 crw-rw-rw-   1 root  wheel      11,   8  5 Jun 11:34 tty.usbserial-FTTH8PDGA
0 crw-rw-rw-   1 root  wheel      11,   6  5 Jun 11:34 tty.usbserial-FTTH8PDGB


I had a problem when running screen:

screen /dev/tty.usbserial-FTTH8PDGB 115200

It reported:

    Resource busy - then Sorry, could not find a PTY

I got round this by unloading and reloading the drivers kextunload and kextreload as above.
 

« Last Edit: 05 June 2011, 11:41:23 am by IanE »
Logged

TheOracle

  • Newbie
  • *
  • Posts: 10
Re: Dreamplug / JTAG for Mac OSX 10.6
« Reply #1 on: 05 August 2011, 12:55:09 pm »

Hi all,
speaking of JTAG, what we can see in the message above is about how to use the serial on dreamplug.
But connecting the jtag board when the ftdi module is loaded, we can see the following:
Code: [Select]
0 crw-rw-rw-   1 root  wheel      11,   9  5 Jun 11:34 cu.usbserial-FTTH8PDGA
0 crw-rw-rw-   1 root  wheel      11,   7  5 Jun 11:34 cu.usbserial-FTTH8PDGB
0 crw-rw-rw-   1 root  wheel      11,   8  5 Jun 11:34 tty.usbserial-FTTH8PDGA
0 crw-rw-rw-   1 root  wheel      11,   6  5 Jun 11:34 tty.usbserial-FTTH8PDGB

So, if we can use tty.usbserial-FTTH8PDGB as the serial interface, does anyone has ever tried something else with the other interface (tty.usbserial-FTTH8PDGA)?
I'm quite sure tty.usbserial-FTTH8PDGA is supposed to be used when we want to interact to the jtag interface on the dreamplug, for example if we want to write a new version of uboot through jtag, we are supposed to connect the jtag cable and deal somehow with this interface.
There is any reference for this kind of knowledge in this forum?
As far as i know, there should be some kind of universal program like openocd to use for jtag purposes.
Any contribute to this area are wellcome, just to have trace of another experience or have another feedback before wasting my dreamplug starting playing with development version of uboot ;)
Logged

cikub

  • Newbie
  • *
  • Posts: 18
Re: Dreamplug / JTAG for Mac OSX 10.6 - nothing in dev
« Reply #2 on: 19 August 2011, 11:03:07 pm »

I followed the instructions given but this
Code: [Select]
ls -las /dev | grep -i usbdoes not return any results.

However kextunload and kextload appear to work - for example if I do kextunload twice then I get an error on the second attempt, indicating that kextload had loaded the driver. Indeed this is backed up by the following in kernel.log after trying kextunload the second time:

Code: [Select]
Aug 19 23:20:44 grimalkin kernel[0]: Kext com.FTDI.driver.FTDIUSBSerialDriver not found for unload request.
So I am comfortable that kextload is working.

install.log reports successful installation of FTDIUSBSerialDriverInstaller.

I am at a loss as to what to do next. I couldn't work out what logs to look in to see if there are any errors.

I am using Mac OS X 10.6.8 .
Any help gratefully appreciate.
-Colin
Logged

Classe

  • Newbie
  • *
  • Posts: 4
Re: Dreamplug / JTAG for Mac OSX 10.6
« Reply #3 on: 20 August 2011, 10:47:37 am »

Hi,

Try this command instead: ls /dev/tty.*
 
Follow this tutorial:

http://primates.ximian.com/~flucifredi/plugcomputers/FTDI-mac-HOWTO.html

Regards
Logged

cikub

  • Newbie
  • *
  • Posts: 18
Re: Dreamplug / JTAG for Mac OSX 10.6
« Reply #4 on: 21 August 2011, 07:45:45 am »

Huzzah!
Thanks for that link Classe. Between the original instructions and that extra info I found out the problem. I was adding the extra entries to the bottom of Info.plist before the last closing tag. The new instructions state specifically to put the two new entries inside the <key>IOKitPersonalities</key> section of the file, so I added them immediately below that line.

I then had to do the kextunload and kextload lines mentioned above, pull the power on the Dreamplug and reconnect power.

hey presto: console is go!
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!