Go Down

Topic: Arduino on Linux (Read 28 times) previous topic - next topic

David Cuartielles

Updated installation method by people at Riereta.Net. Taken from:

http://riereta.net/tiki/tiki-index.php?page=PdInstallationArduino

Thanks 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


Dgepeto

i have two arduino board-USB on LINUX-debian kernel 2.6.15-4
-one with resistor 1/4w , go well
-one (newer) whis resistor SMD . this board can download a compiled program but can ejecut it.
¿ have you got idea about problem ?
thanks

ICEM4N

#22
Jun 28, 2006, 05:17 pm Last Edit: Jun 28, 2006, 05:34 pm by ICEM4N Reason: 1
Hi, Working on a Ubuntu Dapper, i have jre installed since i work with Eclipse and NetBeans for different java projects.

I managed to run the IDE and "compile", but when i try to upload the sketch|program to the board it freezes, the IDE freezes. If i try to "burn the bootloader" (i was trying if something works) it freezes too. The only way to close that window is clossing the terminal from the IDE was create (it doesn¡t respond at anything but i could move the window)

I think that is my version of jre (1.5 of sun - yeah it sucks, but blackdown only has 1.4 version)
More info :
I put a led over pin 13 and GND, it start bliking (i thougth the led_blik_tutorial was loaded from "fabric") I run the IDE, change the led_blik_tutorial to hold the led on for 2 seconds. I reset the board y hit "Upload button" after 8 seconds (more or less) it start bliking like at first, no changes were made. RX and TX led's do nothing. (i try this on the two usb-board i buy)

This was my shell output
Quote
nodani@noworld:~/arduino/build/linux$ ./run.sh
Stable Library
=========================================
Native lib Version = RXTX-2.1-7pre17
Java lib Version   = RXTX-2.1-7
WARNING:  RXTX Version mismatch
       Jar version = RXTX-2.1-7
       native lib Version = RXTX-2.1-7pre17
RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB0









Binary sketch size: 5238 bytes (of a 7168 byte maximum)



How i could make it work?

Thanks

geraldo

Thanx to all the Arduino Linux guys for describing their installation steps. I'm running a AMD64 Ubuntu 5.10 and noticed some small differences so I made a document discribing the steps I did to get Arduino up and running: http://yuri.at/go/?page_id=35

@ICEM4N: could it be that you have another RXTX copy installed somewhere, see this similar error message from Processing:  http://processing.org/faq/bugs.html#serial

ICEM4N

Thx, following this guide http://riereta.net/tiki/tiki-index.php?page=PdInstallationArduino and makingsome minor changes it worked! (Ubuntu dapper 6.06 -updated from breezy 5.10 )

Go Up