Updated installation method by people at Riereta.Net. Taken from:
http://riereta.net/tiki/tiki-index.php?page=PdInstallationArduinoThanks acracia and dddani for it
/David
- - - - --
1. apt-get install subversion
2. getting arduino package sources:
download the latest version of arduino cvs with subversion:
~/ svn checkout svn://svn.berlios.de/arduino/trunk
we will come back to this directory later
3. apt-get install gcc-avr avr-libc jikes uisp
4. install jre*your version_number* (java.com) de
http://www.java.com/es/download/manual.jsp and put it into the /usr/lib firectory
5. install rxtx for Java:
- - - - - - - -
Installing RXTX
First, obtain the RXTX binaries package with CommAPI from:
http://www.rxtx.org/ take the latest version for linux
Decompress and Untar this package:
~/ cp gunzip rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz
~/tar xf rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz
At this point, you'll have an rxtx-2.1-7pre17-i686-pc-linux-gnu directory. Next, you'll need to copy the shared objects into your java installation:
~/cp rxtx-2.1-7pre17-i686-pc-linux-gnu/librxtxParallel.so /usr/lib/jre*your version_number*/lib/i386
~/cp rxtx-2.1-7pre17-i686-pc-linux-gnu/librxtxSerial.so /usr/lib/jre*your version_number*/lib/i386
If you are installing on an architecture other than an x86, you'll need to adjust both the /i386-pc-linux/ and the /i386/ accordingly.
Next, you'll need to install the RXTXcomm.jar file:
~/cp rxtx-2.1-7pre17-i686-pc-linux-gnu/RXTXcomm.jar /usr/lib/jre*your version_number*/lib/ext/
At this point, the RXTX installation is complete.
We are almost finished. We just need to create the properties file that the Comm API will use to load the drivers (.so files). To create this file, type the following command:
~//bin/echo Driver=gnu.io.RXTXCommDriver > /usr/lib/jre*your version_number*/lib/javax.comm.properties
o
~//bin/echo Driver=gnu.io.RXTXCommDriver > /usr/lib/j2se/1.4/jre/lib/javax.comm.properties
~/ln -s /dev/ttyUSB0 /dev/ttyS99
If you don't have the /dev/ttyUSB0, do
~/ modprobe ftdi_sio
If you don't have it, then you have to give to your kernel support to usbhid and libftdi.
Device Drivers ---> USB support ---> USB Serial Converter support ---> USB FTDI Single Port Serial Driver (EXPERIMENTAL)
Congratulations! You have installed the Linux Comm API.
- - - - - - -
6. add the path to java/bin and rt.jar to your CLASSPATH:
in my case this looks like:
export CLASSPATH=/usr/lib/jreyour_version_number/bin:/usr/lib/jreyour_version_number/lib/rt.jar
7. you can check on this variables with the "env" command
note that as soon as you close your xterm this settings are gone. for a tutorial on environment variables
look at:
http://www.dynamic-apps.com/tutorials/classpath.jsp 8. go back to arduino svn directory:
~/ cd to trunk/build/linux
9. compile it:
~/ ./make.sh
10. go to work directory
~/ cd work
11. create binaries directory
~/ mkdir -p tools/avr/bin/
12. create symbolic links to the programs arduino uses to compile
~/ cd tools/avr/bin/
~/ ln -s /usr/bin/avr-gcc avr-gcc ;
ln -s /usr/bin/avr-objcopy avr-objcopy ;
ln -s /usr/bin/avr-objdump avr-objdump ;
ln -s /usr/bin/avr-size avr-size ;
ln -s /usr/bin/uisp uisp ;
13. go back to /trunk/build/linux/ folder
~/ cd ../../../../
Per executar arduino
~/ ./run.sh
14. for having the comm.api driver always properly set, change your bash configuration file:
~/ vi /root/.bashrc
and add
/bin/echo Driver=gnu.io.RXTXCommDriver > /usr/lib/jre*your version_number*/lib/javax.comm.properties