XC-2 Linux issues

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

XC-2 Linux issues

Post by Folknology »

After successfully installing the XC-2 on Windows XP, I decided to install the XC-2 on Linux, with my favourite distribution Ubuntu, in fact version 9.10. Given some of the issues I had I figured I would share it with you:

First I am using 32 bit version at the moment so I downloaded the 32 bit Linux redhat version from XMOS downloads, if you are not sure open a terminal window and run 'arch' if it shows *-64 you will need the 64 bit version instead mine reported a plain 'i686'. If you use the 64 bit version you may need to add 32bit compatible libraries see xmos FAQ.

Once downloaded decompress (or have Firefox unarchive it automagically), the dir structure will be like this XMOS/DesktopTools/version/ mine was XMOS/DesktopTools/9.9.1 .You will need to open a terminal and cd into it e.g

Code: Select all

cd XMOS/DesktopTools/9.9.1
This assumes you unarchived it into you home dir, if you didn't use the 'mv' command to move it to your home dir (mv whereveritisnow/XMOS ~/)

Next you need to edit your fstab file (this controls how file systems are mounted among other things, this can include usb devices.

Code: Select all

sudo nano /etc/fstab
This will bring up a small commandline editor (or use whatever you prefer emacs/vim)
Add these two lines at the bottom:

none /proc/bus/usb usbfs defaults,devmode=0666 0 0
none /dev/bus/usb usbfs defaults,devmode=0666 0 0

Then save (Control-O)
Make sure the changes are loaded by issuing the following commands in the terminal

Code: Select all

sudo umount /proc/bus/usb
sudo mount /proc/bus/usb
sudo umount /dev/bus/usb
sudo mount  /dev/bus/usb
This should now mean that the system can see the XC-2 and that the following can talk to it. next set up the xmos environment and check for devices:

Code: Select all

source SetEnv
xrun --listdevices
This should show your XC-2 as listed and attached.

If it doesn't try physically reconnecting the XC-2, if problems persist you may even need to restart the system

Assuming you can see you XC-2 using xrun you now need to get the XMOS Developement Environment (XDE) up, this is where you could run into issues like myself.

First try to run the XDE

Code: Select all

./XDE
If this works, congratulations you ROCK write some awesome code and join XEOS group!

If you get a unhelpful small empty dialog box up (xde.exe) you are going to need to take steps because you have run into the XULRunner issue, heres a way to get around it.

The version of Eclipse you are using within XDE uses XulRunner part of Firefox's dev environment to bring up a splash screen the very first time you run it (this is and Eclipse/XulRunner issue). The simplest way to I found to get around this was found on an Linkers thread, which is to deinstall XulRunner temporarily, run XDE, quit XDE and reinstall Firefox. beware this may also deinstall a bunch of other stuff like your Ubuntu documentation!! I am waiting for a better suggestion but here is what I did :

Code: Select all

sudo apt-get remove xulrunner-*
./XDE
Next Quit XDE once its fully up and you have told it your workspace.

Code: Select all

apt-get install firefox
This reinstalls Firefox which was unistalled in the earlier step (it also reinstalls xulrunner grr..)

Bingo you now ROCK, pat yourself on the back you are now an Ubuntu XMOS developer Jedi please pass on you valuable knowledge to your Padawan, and don't forget to join XEOS ;-)

regards
Al
Last edited by Folknology on Wed Dec 16, 2009 5:18 pm, edited 1 time in total.


Heater
Respected Member
Posts: 296
Joined: Thu Dec 10, 2009 10:33 pm

Post by Heater »

Folknology: Glad to hear that I ROCK ! Well partially anyway...

I installed all this on my Debian unstable box and XDE comes up OK but would rock more if clicking "OK", "next" etc in all the dialog boxes would work. For many it requires tabbing around to the button an pressing space. Yet to find a fix for that.

Thanks for the info re: USB. I have no XMOS hardware yet so have yet to have the pleasure of fighting with that.
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

Actually Heater I am also suffering the buttons don't work issue, I use the Alt commands rather than tab but even so its really annoying :(

I think the Eclipse version included with XDE is somewhat broken on newer linux versions, anyone at XMOS care to comment on this, is there a newer version coming that fixes these sort of issues, it would probably require a later Eclipse version?

P.S. It would be excellent if there could be an Ubuntu packaged version in the near future, given that this is probably one of the most popular distributions now.

regards
Al
Heater
Respected Member
Posts: 296
Joined: Thu Dec 10, 2009 10:33 pm

Post by Heater »

Odd but I tried XDE on a Debian stable box and there were no issues with clicking on buttons. Only here on my "unstable" box at home. Click on the button and then hit space does it for me.
User avatar
Rudolph
Newbie
Posts: 1
Joined: Thu Dec 10, 2009 8:01 pm

Post by Rudolph »

Regarding "apt-get install firefox" re-installing xulrunner, here's a copy of my last post from the "karmic koala" thread on xmoslinkers:


After installing a few updates to Ubuntu 9.10 (via the Update Manager popping up with available updates), and updating to 9.9.1 of DesktopTools, XDE seems to have failed to work again. I re-uninstalled xulrunner-*, then XDE worked, then re-installed firefox (which re-installs xulrunner-1.9.1), then XDE fails again.

After some poking about, it seems there's another xulrunner available in the ubuntu repos, just called "xulrunner" and apparently version 1.8.1. With that installed ("sudo apt-get install xulrunner" should do it, or use Synaptic) I can run "xde_bin/xde.exe -vmargs -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner/xulrunner" from the install dir (blah/blah/XMOS/DesktopTools/9.9.1/) and things work normally again.

Now I edited the last line in blah/XMOS/DesktopTools/9.9.1/XDE to look like this (all on one line)(technically next to last line, as last line is blank):

Code: Select all

system("bash -c 'cd $installpath; . SetEnv; xde.exe -vmargs -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner/xulrunner'");
and things seem to be working just fine.
User avatar
DrFingersSchaefer
Experienced Member
Posts: 65
Joined: Fri Dec 18, 2009 1:27 pm
Location: The Interzone

Post by DrFingersSchaefer »

I guess we could do with a wiki the amount of support that is getting written up.

There is a risk that it could be buried under the other postings here eventually.

Thanks for the usbfs notes folknology. That was a good find, my XDE which wasn't working needed the workaround from Rudolph, installation of the ia32libs and your notes on usbfs before it would compile download and run the demo apps for my v1.0 xc-1.

But the LED cycle demo runs and downloads so this is good.

Just need to get the command line tools working now.

xrun --devicelist does'nt return anything although the XDE clearly works, so not sure about that.

More testing tomorrow.

For all your valuable input sirs, thank you. :D
"Dr Fingers Schaefer, The Lobotomy Kid"
Caesar ad sum iam forti
Brutus ad erat
Caesar sic in omnibus
Brutus sic in at
:ugeek:
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

I think Jason has plans for a wiki, once he gets the other issues on XCore Exchange sorted, as you say it would be great to try and get a more structured wiki operational for these kinds of things.

Hopefully the XDE tools will also get updated to avoid some of the issues we are having, that would save some the of the queries in the first place.
User avatar
TonyD
XCore Addict
Posts: 234
Joined: Thu Dec 10, 2009 11:11 pm
Location: Newcastle, UK

Post by TonyD »

Folknology wrote:I think Jason has plans for a wiki, once he gets the other issues on XCore Exchange sorted, as you say it would be great to try and get a more structured wiki operational for these kinds of things.
I agree with you about needing a wiki, it would definitely be a good place to put additional help, tips and tutorials, documentation, resources etc. Hopefully Jason can sort one out soon.
User avatar
errordeveloper
Active Member
Posts: 50
Joined: Wed Dec 16, 2009 6:04 pm
Location: London

Post by errordeveloper »

on gentoo and slackware64-13.0 i had no problems ..
haven't used it propertly yet, but looks like it works just fine :)

i have installed it into prefix ;)

could be nice to have packaging system igration different distros!

also may be they can put a link on freshmeat.net, it's a good place to link projects ;0)
also there are some linux EDA sites, and a link on a few of those could be reasonable too!
User avatar
johanar
Active Member
Posts: 60
Joined: Tue Feb 16, 2010 8:21 am
Location: Sweden

Post by johanar »

Any possibility of installing XDE as an Eclipse plugin instead of stand-alone app?

I'm also getting the this problem with XDE, but there are no issues with my regular Eclipse which kinda makes me believe there has to be a better solution that temporarily uninstalling xulrunner :)

Edit: Rudolph's tip worked :)

Edit2: The next, back and finish buttons in the New Project Wizard aren't working. Double clicking in the project type dialog and pressing enter after writing the project's name works though.