Compiling xgdb on Arm Linux

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
bsmithyman
Experienced Member
Posts: 126
Joined: Fri Feb 12, 2010 10:31 pm

Compiling xgdb on Arm Linux

Postby bsmithyman » Fri Feb 12, 2010 10:38 pm

Hi All,

I mentioned on xmoslinkers that I'm working on getting bootloading functionality to work from an Arm Linux host (in particular, the Rev. C4 BeagleBoard running Gentoo Linux).

I've run into some difficulties compiling (missing references to xmos_xe_... and x_... functions), so I thought I'd ask about the compile process for the development tools.

Is there a particular order that things need to be done in? How does the FTDI d2xx library fit into all of this?

Many thanks,
Brendan
User avatar
___
Member++
Posts: 30
Joined: Wed Feb 03, 2010 5:04 pm

Postby ___ » Sat Feb 13, 2010 3:14 pm

bsmithyman wrote:Hi All,

I mentioned on xmoslinkers that I'm working on getting bootloading functionality to work from an Arm Linux host (in particular, the Rev. C4 BeagleBoard running Gentoo Linux).

I've run into some difficulties compiling (missing references to xmos_xe_... and x_... functions), so I thought I'd ask about the compile process for the development tools.

Is there a particular order that things need to be done in? How does the FTDI d2xx library fit into all of this?

Many thanks,
Brendan
I will double check that the code builds correctly on x86 linux from the download, hopefully I have not forgotten to include anything!

What interface library do you have for the FTDI chip on arm linux? This is important as we are using the interface described here http://ftdichip.com/Documents/ProgramGu ... 00071).pdf

Without this interface you will have to re-write the ftdi to tools layer that we are using.
User avatar
bsmithyman
Experienced Member
Posts: 126
Joined: Fri Feb 12, 2010 10:31 pm

Postby bsmithyman » Sat Feb 13, 2010 10:05 pm

___ wrote: I will double check that the code builds correctly on x86 linux from the download, hopefully I have not forgotten to include anything!
Thanks, that's much appreciated :)
___ wrote: What interface library do you have for the FTDI chip on arm linux? This is important as we are using the interface described here http://ftdichip.com/Documents/ProgramGu ... 00071).pdf

Without this interface you will have to re-write the ftdi to tools layer that we are using.
That's really going to be the trick, I think. If I understand how your system is set up, it uses the d2xx binary from FTDI and links to it, right? I don't believe that the FTDI library is available for the arm architecture, though the ftdi_sio driver is in the kernel tree. I'm still getting a feel for this, but this might be the fatal flaw in the whole plan.
User avatar
___
Member++
Posts: 30
Joined: Wed Feb 03, 2010 5:04 pm

Postby ___ » Mon Feb 15, 2010 10:32 am

Does libusb exist on the version of linux you have? This is what is used by the ftdi library to talk to USB devices. Also can you see the kernel log when you plug in you xmos development board? On x86 linux the dmesg command will output some useful information to the terminal, not sure whether you can get to this from your setup?
User avatar
bsmithyman
Experienced Member
Posts: 126
Joined: Fri Feb 12, 2010 10:31 pm

Postby bsmithyman » Fri Feb 19, 2010 6:12 am

___ wrote:Does libusb exist on the version of linux you have? This is what is used by the ftdi library to talk to USB devices. Also can you see the kernel log when you plug in you xmos development board? On x86 linux the dmesg command will output some useful information to the terminal, not sure whether you can get to this from your setup?
Hi ___, sorry for the wait on my reply. Issuing dmesg gives the following output:

Code: Select all

[16533.428741] usb 1-2.4: new full speed USB device using ehci-omap and address 7
[16533.550903] usb 1-2.4: New USB device found, idVendor=0403, idProduct=6010
[16533.550933] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[16533.550964] usb 1-2.4: Product: XC-1 1V0
[16533.550964] usb 1-2.4: Manufacturer: XMOS
[16533.550964] usb 1-2.4: SerialNumber: 77110198
[16533.556274] usb 1-2.4: configuration #1 chosen from 1 choice
[16533.566894] usb 1-2.4: USB disconnect, address 7
[16533.831176] usb 1-2.4: new full speed USB device using ehci-omap and address 8
[16533.923614] usbcore: registered new interface driver usbserial
[16533.924285] USB Serial support registered for generic
[16533.949798] usb 1-2.4: New USB device found, idVendor=0403, idProduct=6010
[16533.949829] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[16533.949829] usb 1-2.4: Product: XC-1 1V0
[16533.949829] usb 1-2.4: Manufacturer: XMOS
[16533.949859] usb 1-2.4: SerialNumber: 77110198
[16533.950775] usb 1-2.4: configuration #1 chosen from 1 choice
[16533.955322] usbcore: registered new interface driver usbserial_generic
[16533.955352] usbserial: USB Serial Driver core
[16533.976623] USB Serial support registered for FTDI USB Serial Device
[16533.977630] ftdi_sio 1-2.4:1.0: FTDI USB Serial Device converter detected
[16533.978027] usb 1-2.4: Detected FT2232C
[16533.978057] usb 1-2.4: Number of endpoints 2[16533.978057] usb 1-2.4: Endpoint 1 MaxPacketSize 64
[16533.978057] usb 1-2.4: Endpoint 2 MaxPacketSize 64
[16533.978088] usb 1-2.4: Setting MaxPacketSize 64
[16533.979095] usb 1-2.4: FTDI USB Serial Device converter now attached to ttyUSB0
[16533.979187] ftdi_sio 1-2.4:1.1: FTDI USB Serial Device converter detected
[16533.979522] usb 1-2.4: Detected FT2232C
[16533.979553] usb 1-2.4: Number of endpoints 2[16533.979553] usb 1-2.4: Endpoint 1 MaxPacketSize 64
[16533.979553] usb 1-2.4: Endpoint 2 MaxPacketSize 64
[16533.979583] usb 1-2.4: Setting MaxPacketSize 64
[16533.980224] usb 1-2.4: FTDI USB Serial Device converter now attached to ttyUSB1
[16533.980316] usbcore: registered new interface driver ftdi_sio
[16533.980346] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver
As you can see, it detects the FT2232D (calls it FT2232C), and configures the two endpoints. However, it uses the open source ftdi_sio driver, so they're both configured as serial ports, as opposed to a serial port and a fifo. Libusb is supported and working, v1.0.6.

I'm currently running Gentoo Linux on the system, with a hand-compiled kernel 2.6.32 and the linux-omap patches.

Output of 'uname -a':

Code: Select all

Linux nymph 2.6.32.7-x7.1wallaby #7 Sun Feb 14 12:27:24 PST 2010 armv7l ARMv7 Processor rev 3 (v7l) OMAP3 Beagle Board GNU/Linux
C options:

Code: Select all

CHOST=armv7a-unknown-linux-gnueabi
ARCH=arm
CFLAGS="-Os -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -fomit-frame-pointer"

Who is online

Users browsing this forum: No registered users and 0 guests