Requirements
You will need to install some programs to use Arduino under Linux (the way you do this depends on your distribution):
* sun's java runtime (JRE, package sun-java6-jre)
* avr-gcc-c++ (Else you will get this error: Cannot run program "avr-g++":j ava.io.IOException:Error=2: No such file or directory)
* avr-gcc (aka "gcc-avr"), version 4.3.2 or later
o Version 4.3.0 has a major bug which affects multiplication of long int's. This is the default version in Ubuntu Intrepid (8.10). Check using "avr-gcc --version" and upgrade if necessary.
o Versions prior to 4.3.0 do not support the ATmega328 (which comes on the Arduino Duemilanove). People running distributions like Hardy Heron (Ubuntu) or Etch (Debian) and previous will need to upgrade their version of avr-gcc.
* avr-libc
You will also need a compatible kernel. For example, it needs USB serial support with the FTDI driver.
If you have brltty installed (the default on recent versions of Ubuntu), you'll need to remove it.
Download the latest Arduino Linux distribution from the arduino dowload section. Copy/extract these files to a directory (or your desktop) and Run the "arduino" script.
Installing Arduino BT on Ubuntu 9.04 and 9.10
Refer to Arduino BT - Ubuntu for the full guide. This guide section was created in a new page by the author.
64-Bit Linux
The Arduino software distribution includes a couple of pre-compiled binaries that may not work on 64-bit systems:
* RXTX (Java communication library)
* avrdude (for uploading programs to an Arduino board)
Your distribution should provide a package for RXTX (probably called librxtx-java). Once installed, you need to copy librxtxSerial.so. to the lib/ sub-directory of your Arduino application directory or to the extensions folder of the JRE.
On some distributions however the version of librxtx-java supplied is still not up to date, a working version can be downloaded here: http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip further instructions are available at http://chemicaloliver.net/programming/fixing-arduino-on-ubuntu-9-10-karmic-x64/ which also includes a full version of arduino-0017.tgz with a working version of rxtx included. Note: Just installed Ubuntu 9.10 64-bit (2010-02-15), required packages from repository, and latest IDE. Works out of the box.
Arduino uses a patched version of avrdude. The source is available here: avrdude-5.4-arduino-0010-src.tgz. After compiling, copy avrdude and avrdude.conf to the hardware/tools/ sub-directory of the Arduino application directory. The version of avrdude packaged with the latest Arduino software seems to work under x64 linux. The proposed source file does not include support for the latest ATmega328, and should therefore not be used with the Arduino Duemilanove.
Locking assertion failure from java when using Xinerama
To fix:
sudo sed -i 's/XINERAMA/FAKEEXTN/g' /usr/lib/jvm/java-6-sun/jre/lib/amd64/motif21/libmawt.so
USB-Serial Devices
Arduino's (and other USB-serial devices) end up as /dev/ttyUSB#.
If you have more than one such device then some udev magic may help avoid confusion.
Kernel Configuration
If you configured your own kernel, the driver is under "Device Drivers => USB Support => USB Serial Converter Support => USB FTDI Single Port Serial Driver", either select [Y], to have it "built in" to the kernel or [M] to have it built as a module. Dmesg then should show the device like this:
ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
User Rights
Make sure you are in the tty group. On some distros you might need to create an udev rule for the FTDI USB Serial Device converter.
Checking the avr-gcc version
Run avr-gcc --v from a terminal window to check your version number.
Running from a menu
The current arduino script won't run from a menu because the java libraries aren't found. (You would get "Could not find the main class: processing.app.Base." error.) I suggest adding a line to the script like this:
cd `dirname $0`
before the CLASSPATH line.
Labels: Linux
0 comments:
Post a Comment