hi,
first I have to say thx to the arduino developers to make the effort of having their app cross OS.
here some steps i had to take to make arduino work on linux.
i m running debian unstable.
open a xterm:
- to get java add the following line to /etc/apt/sources.list
or substitute the url with another mirror from http://www.blackdown.org:
deb ftp://ftp.easynet.be/blackdown/debian unstable main non-free
- install avr-gcc (debian package is gcc-avr), avr-libc, binutils-avr and jikes
- add the path tojava/bin and rt.jar to your CLASSPATH:
in my case this looks like:
export CLASSPATH=/usr/java/jre1.5.0_02/bin:/usr/java/jre1.5.0_02/lib/rt.jar
-add the path to avr-gcc to DIRAVR, note the deafault for that iis /bin, and at the moment this will be added to what stands in DIRAVR, so i needed to add:
export DIRAVR=/usr
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
got to trunk/build/linux:
compile it:
./make.sh
start it:
./run.sh
now the ide is running.
if i now try to compile a sketch i get an error that avr-gcc
is not found and i should add it to the PATH which i do
not understand as /usr/bin is in my PATH
any ideas ?
another thing is that at the moment i do no tknow how to tell
the app that my serial port is at /dev/ttyUSB0 as it is not descoverd and i can not add it by hand.
erich
Thanks for the great instructions. I'll add them to the documentation soon.
Right now, the IDE looks for avr-gcc in ARDUINO/tools/avr/bin, so you'll need to create a symbolic link to /usr/bin from that directory. You may also need to install the libc-avr (or avr-libc) package, which contains the standard C library for the AVRs (and which doesn't seem to be a prerequisite for avr-gcc).
To upload code to the board, you'll need the uisp package. Make sure that the binary (or a link to it) is in the same directory as avr-gcc (e.g. /usr/bin).
The serial library we're using (RXTX) doesn't seem to know about serial ports named USB. Try creating a symbolic link from /dev/ttyS48 (for example) to /dev/ttyUSB0.
Also, remember to switch the baud rate in the "Tools | Serial port speed" menu to 9600.
I'm sorry this is so hard to get working. Is anyone interested in helping create a debian (or redhat or ...) package for Arduino? It could be useful for Processing and Wiring as well.
hi,
i now did the following:
- installed uisp
- added symlink from /dev/ttyUSB0 to /dev/ttyS5
after restarting arduino it recognized the new port.
- added directory in the work directory:
tools/avr/bin/
in this directory i made the symlinks to the following applications: avr-gcc avr-objcopy avr-objdump avr-size uisp
when i now run zb the led_blink sketch it compiles fine
exporting it gives me the "device is not responding correctly" error message, even i reset before exporting.
baudrate is 9600
i m allowed to write to /dev/ttyS5 and even see the TX led blinking when i send down something from the shell via cat.
any idea ?
erich
ps. when i get it working i will write a nice howto
ps.2 just as a reminder for myself, i forgot to mention in the previous post that also j2re1.4 has to be installed
Erich
Great job on getting arduino to work on linux :)
I've tried on my linux box and I think your problem now is that the bootloader on your board is running at 19200 baud and not 9600.
When gianluca started shipping the usb boards I gave him a the new bootloader to install which runs at 19200.
if you get a chance to build the parallel port programmer you can upgrade to the latest bootloader (another mellis masterpiece) that takes only 1 k of space instead of the 2k used by the old one.
massimo
Hi,
I'm one of the attendants to the Madrid workshop. Congratulations for the good work.
I've almost made Arduino work on my Debian laptop. I'm using Debian stable (Sarge), and after a few headaches with getting Java to work right (had to switch from Sun's to BlackDown's j2sdk to bypass some Sun bugs) I finally compiled the IDE.
Somehow, the installation script skipped the targets directory (maybe my fault, don't know) and had to cp it manually to the work/lib directory.
Now Arduino is compilng the sketches fine, but whenever I try to export them to the board, I'm getting this:
->/dev//dev/ttyS0
Error: No such file or directory
How can I tweak this?
is this really the correct error message ?
/dev//dev/ttyS0 does not exist at all.
strange that you get an additional /dev in front.
otherwise if you use the USB board your serial device most likely is called /dev/ttyUSB0 (you can look this up with the dmesg command, after attaching it)
as already pointet out before by mellis, the RTXTX lib does not recognize USB serial devices, so you need to make a symlink
to a non existing /dev/ttySx, zb:
log in as root and then:
ln -s /dev/ttyUSB0 /dev/ttyS10
restart arduino and the new serialport should show up.
maek shure you have the rights to read and write from/to it.
best
erich
Yes, that's the correct message... I'm using the serial board, and I know that /dev//dev/ttyS0 doesn't exist ;)
Seems like an extra "/dev/" string is added somewhere. ???
massimo,
is there a reason why it would not work with the other "older"
bootloader ?
erich
Jose: it sounds like you have a slightly old version of the source (the linux version has been changing quickly :) ). Run "svn update" from in the root arduino directory, and then, from the build/linux directory, "rm -rf work" and "./make.sh". That should fix the "/dev/dev" problem and the new make.sh script should copy the targets/ directory.
The bootloader issue concerns the baud rate at which it connects to the computer. Older versions of the bootloader (including the one burned on the serial boards at the Madrid workshop) run at 9600 baud. Newer versions (including the one on the pre-assembled USB boards) run at 19200 baud. The baud rate in the bootloader must match the one in the "Tools | Serial port speed" menu or the upload won't work.
Again, thanks for your patience and posts. It's a big help getting the Linux version working (esp. now that my Ubuntu laptop seems to be dead).
hi,
well then ist a different issue, because neather 19200 nor 9600
is working here.
erich
Well, thanks for the help.
I updated the code and finally i have the IDE working in my Debian Sarge with the serial board. Next, I'll try and get the serial proxy compiled and working in the same machine.
Also, I've been talking with David today about making a .deb package... I've never made one, but I'll start reading the documentation to see if it's feasible for me, although I guess the code should be quite stable before we pack it!
hi,
this might now as well belong to the hardware section but ...
as i was neather on windows or linux able to export a file to the board (tried different settings and scenarios) without the " [VP 1] Device is not responding correctly." message i thought i try the new bootloader.
i build the isp and updated the bootloader,
which worked without any problems.
but the behaviour on win and linux is still the same.
if i download, the TX gets red once, and then the RX
keeps blinking.
could it be that my board is damaged ?
erich
i give the answer to myself:
one has to press the export button on the ide twice after resetting the board.
finally i can say the ide is successfully running under linux !
cheers
erich
Damn, I should have thought to suggest that. That will be fixed in the next version and you'll only have to click once.
Congratulations on getting everything working.
If you (or jose or anyone else) would like, we'd love to have a howto for getting Arduino running under linux. We have some preliminary instructions in the general build instructions:
http://svn.berlios.de/viewcvs/arduino/trunk/build/howto.txt?view=markup
and a few notes in the comments at the top of the linux make.sh:
http://svn.berlios.de/viewcvs/arduino/trunk/build/linux/make.sh?view=markup
hi,
here a dirty summary for installing
arduino on debian unstable:
with the next checkout i will update it.
- you need a kernel supporting the ftdi serial/usb chip
- install the "subversion" package to be able to check out arduino:
- check out the code via the instructions on https://developer.berlios.de/svn/?group_id=3590
- to get java add the following line to /etc/apt/sources.list
deb ftp://ftp.easynet.be/blackdown/debian unstable main non-free
or substitute the url with another mirror from http://www.blackdown.org
- install avr-gcc (debian package is gcc-avr), avr-libc, binutils-avr, jikes, uisp, j2re and j2sdk
- add the path tojava/bin and rt.jar to your CLASSPATH:
in my case this looks like:
export CLASSPATH=/usr/java/jre1.5.0_02/bin:/usr/java/jre1.5.0_02/lib/rt.jar
- add the path to avr-gcc to DIRAVR, note the default for that is /bin,
and at the moment this will be added to what stands in DIRAVR, so i needed to add:
export DIRAVR=/usr
- 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
- cd to trunk/build/linux:
- compile it:./make.sh
- add symlink from /dev/ttyUSB0 to /dev/ttyS5 (use a non existing /dev/ttyS*)
ln -s /dev/tty/USB0 /dev/ttyS5
- added following directory in the work directory: tools/avr/bin/
- in this directory i made the symlinks to the following applications: avr-gcc avr-objcopy avr-objdump avr-size uisp
- start it: ./run.sh
just to put it on the record:
arduino0003 works without problems under linux.
thanks a lot !
erich
On linux 2.6.x:
# modprobe ftdi_sio
# echo ftdi_sio >> /etc/modules
welcome fab
that was fast... you got the board 1 day ago :)
massimo
Hej,
last week in Barcelona we managed to install Arduino on several linux boxes: ubuntu, knoppix, max2.0, debian (raw), etc.
The good news are that Eric's tutorial applies almost step by step to each one of them. The bad news are that ubuntu and debian won't bring Java and that is not cool.
We had endless problems to fix this also because RXTX (from www.rxtx.org), the library that we use for the serial communication, had serious problems to talk to the latest javaComm (version 3). We are happy to announce that RXTX has developed version 2.1.7 of their software that fixes any problems and leaves javaComm out of the picture.
The only problem I found was to get a serial port monitor that would allow us to send data down to the board, any ideas?
/David
I suggest append to make.sh
if [ ! -d work/tools/avr/bin/ ]
then
mkdir -p work/tools/avr/bin/
cd work/tools/avr/bin/
for i in avr-gcc avr-objcopy avr-objdump avr-size uisp
do
ln -s ${DIRAVR}/bin/${i}
done
fi
My 10 Euro cent!
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
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
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
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
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
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 )
ICEMAN,
The arduino board comes pre-programmed with the led blinking program.
hi i was following the installation instruction on the post above without any trouble but as soon as i do ./run.sh i get this error:
olsen@ll-928:~/lab/arduino/trunk/build/linux$ ./run.sh
Exception in thread "main" java.lang.NoClassDefFoundError: processing.app.Base
at gnu.java.lang.MainThread.run(libgcj.so.7)
Caused by: java.lang.ClassNotFoundException: processing.app.Base not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:lib/,file:lib/build/,file:lib/pde.jar,file:lib/antlr.jar,file:lib/oro.jar,file:lib/registry.jar,file:lib/mrj.jar,file:lib/RXTXcomm.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7)
at java.lang.ClassLoader.loadClass(libgcj.so.7)
at java.lang.ClassLoader.loadClass(libgcj.so.7)
at java.lang.Class.forName(libgcj.so.7)
at gnu.java.lang.MainThread.run(libgcj.so.7)
...
any clue around?
thanks&greets
olsen
I'm having trouble installing Arduino, because of the lack of Java in Ubuntu... I'm really not an expert with Linux, but would it be possible to have Arduino be stand-alone in the same way that Processing is?
Hey all,
I hope people are still watching this thread.
#1. I'm trying to get arduino working on debian/etch using only packages available from repos (java from blackdown, as well as rxtx) I had package issues with 1.4 so I'm using 1.3 right now. I'm currently getting stuck with Jikes could not find package "java.lang" in it is not provided by any of the java packges I see.
#2. Due to the "fun" of java I would greatly perfer a non java dependant version of arduino for linux. probably just a few scripts would do it, "arduino_upload" "arduino_download" "arduino_compile" and I guess a serial debugger... I've gone somewhere on this but even things like uuisp are not working quite so well:
uisp -dserial=/dev/ttyUSB0 -dspeed=9600 --download of=~/Projects/Arduino/test.pde -dprog=stk500 -dpart=ATmega8 -v=3
Programmer is not responding.
I saw somewhere on the playground that arduino uses the stk500. I was able to get a little more luck (downloading what I think is the firmware) using:
uisp -dserial=/dev/ttyUSB0 --download of=~/Projects/Arduino/test.pde -dprog=dasa -dpart=ATmega8 -v=3
Reset inactive time (t_reset) 1000 us
AVR Direct Parallel Access failed after 32 retries.
Override signature bytes, device ATmega8 assumed.
Vendor Code: 0x1e
Part Family: 0x93
Part Number: 0x07
Atmel AVR ATmega8 is found.
Downloading: flash
Is there a more simple guide than http://www.arduino.cc/playground/Learning/BuildProcess on what the arduino IDE actually does?
Thanks.
I was able to fix the "java.lang" problem by editing the CLASSPATH to find rt.jar
So thats all I can do since the output is meaningless to me. Looks like I can't attach it to this post: http://b.goto10.org/misc/arduino_make.sh_output.txt
./run.sh gives me:
Exception in thread "main" java.lang.NoClassDefFoundError: processing/app/Base
Ok, looks like for some reason the make.sh script creates the work directory is such a way that it is not writible by the regular user?? so I did this:
sudo chown -R bbogart trunk/
sudo chgrp -R bbogart trunk/
looks like the svn make.sh script refers to something not in svn:
Extracting examples...
unzip: cannot find or open ../shared/dist/examples.zip, ../shared/dist/examples.zip.zip or ../shared/dist/examples.zip.ZIP.
I'm guessing these java erros are due to my old 1.3 version, off to try some different packages...
so I've switched to blackdown 1.4 and It seems to compile! It would be nice for the makefile to print out "success" or something when it works, since I did not realize it with all the errors.
I build with DIRAVR=/usr so that the build could find the avr compiler. Now when I run the environment ./run.sh it says it can't find the compiler but it is in my path:
which avr-g++
/usr/bin/avr-g++
I'll post this and followup on the next steps.
Looks like the processing .class files have hard references to the compiler tools.
On linux it should just run avr-g++ which will be in the PATH when installed from a package.
I don't see how to edit the source to point to my own avr tools... since its encased in a binary .class file and the SVN trunk seems to contain no files used to generate that .class file.. ?
Maybe adding a setting in the "Perferences" for the Avr tool path would be best..?
.b.
I've tried using the script higher in this thread, and using the instructions from
http://www.arduino.cc/playground/Learning/Linux
but no matter what I do I can't get arduino to find my avr-g++ binary (and I suppose neither the rest of the AVR toolkit)
ok, after searching it looks like these files refer to the tools/blah stuff:
Library.java, Compiler.java, Sizer.java, Uploader.java
Seems to me there should be a function that has the job of choosing where all the avr and uisp tools are.
Ok, HCS is making some changed to these files and I'll post back here results.
anyone out there working on a debian package for arduino?
.b.
I just worked out a patch for the avr-gcc, etc. path issues with bbogart:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1156638816/0
Tested on Mac OS X and Linux.
I've documented the process of today at: http://www.arduino.cc/playground/Linux/Debian
Thanks much for your help with us. None of the core developers have regular access to a Linux box, so we rely on contributions to improve the process. If you have any other suggestions or fixes, please let me know. In particular, I'm curious about the need to chmod the Arduino files from svn. Who owned them when they were checked out? Did you check them out with a sudo?
I am trying to get the Arduino board installed on my Fedora Core 5 laptop: no luck yet.
My problem appears to be with the Java GUI
I have followed the guid of an earlier post in this thread, taken form here: http://riereta.net/tiki/tiki-index.php?page=PdInstallationArduino
I was getting a strange error...
check_group_uucp(): error testing lock file creation Error details: Permission deniedcheck_lock_status: No permission to create lock file.
So I copied the proper rxtx version serial lib into the work directory ( cp /usr/java/jre1.5.0_07/lib/i386/librxtxSerial.so work/ )
Now I don't get that error.
When I run arduino:
1) I get the file selector dialog but no files are displayed.
2) When I enter a filename a directory within the work directory is created: for example if I try to open Pd_firmware.pde a directory is created work/NullPd_firmware.pde/
Is there a way to upload this firmware to the arduino from the command line?
Hi,
So I looked into it and this is the specific error:
Copying dist files...
cp: cannot create regular file `work/lib/.svn/empty-file': Permission denied
cp: cannot create regular file `work/lib/.svn/entries': Permission denied
cp: cannot create regular file `work/lib/.svn/format': Permission denied
cp: cannot create regular file `work/lib/.svn/README.txt': Permission denied
and this is beause the build/linux/dist/lib contains a few read-only files:
-r--r--r-- 1 bbogart bbogart 0 2006-08-27 15:45 empty-file
-r--r--r-- 1 bbogart bbogart 6192 2006-08-27 15:45 entries
-r--r--r-- 1 bbogart bbogart 2 2006-08-27 15:45 format
-r--r--r-- 1 bbogart bbogart 118 2006-08-27 15:45 README.txt
Which seems to be an .svn directory.. does svn creates this itself, or are they checked in? I tried running through again and the errors can be ignored (I did not realize that at the time.) if the compile fails and someone tries to recompile though then they need to override the readonly to delete the work/ directory.
probably best to have all files read-write for the current user.
Thanks for applying the patch to the svn! I'll update the howto accordingly.
How do I debug a java freeze???
Thanks much for your help with us. None of the core developers have regular access to a Linux box, so we rely on contributions to improve the process. If you have any other suggestions or fixes, please let me know. In particular, I'm curious about the need to chmod the Arduino files from svn. Who owned them when they were checked out? Did you check them out with a sudo?
yo on the second service i got the arduino compiled. with run.sh i get the file open dialog however steering f.e. to work/dist/examples/digital\ IO/ no files are displayed/can be chosen & selecting this (or others) directory it segfaults.
what kind of file the selector is looking for to keep him goin?
Experimental: JNI_OnLoad called.
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Experimental: JNI_OnLoad called.
./arduino: line 51: 27916 Segmentation fault java processing.app.Base
I'm working on installing on Arch Linux, which has no avr packages
Just wanted to say that I found this website
http://www.nongnu.org/avr-libc/user-manual/install_tools.html
it seems to have good instructions for compiling gcc binutils and libc for avr.
I'm in the midst of it now, i'll post back if its successful
That works!
I have the Arduino devel evironment running under Arch Linux
If anybody needs help with that lemme know.
i'm trying to make arduino work from the command line on my fedora core 6 box. since there are no avr-gcc rpms available at the time of writing for fedora, i compiled them myself.
using the instructions from here: http://www.arduino.cc/playground/Learning/CommandLine i'm trying to compile a simple example code, but i'm getting errors:
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex foo.elf foo.eep
avr-objcopy: there are no sections to be copied!
avr-objcopy: --change-section-lma .eeprom=0x00000000 never used
make: [foo.eep] Error 1 (ignored)
avr-objdump gives the following output:
$ avr-objdump -h foo.elf
foo.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00001050 00000000 00000000 00000094 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000096 00800060 00001050 000010e4 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 0000009b 008000f6 008000f6 0000117a 2**0
ALLOC
3 .stab 00002280 00000000 00000000 0000117c 2**2
CONTENTS, READONLY, DEBUGGING
4 .stabstr 000016fd 00000000 00000000 000033fc 2**0
CONTENTS, READONLY, DEBUGGING
the versions of the software i'm using are the following: avr-binutils-2.17, avr-gcc-4.1.1, avr-gcc-g++-4.1.1, avr-libc-1.4.5.
$ avr-gcc -v
Using built-in specs.
Target: avr
Configured with: ./configure --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --target=avr --disable-libssp --enable-languages=c,c++ --disable-libmudflap --disable-libiberty --disable-libstdc
Thread model: single
gcc version 4.1.1
any help would be appreciated.
i figured it can be a problem of avr-binutils, although the program can be uploaded regardless of the error.
objcopy.c should be patched at about line 1421:
if (bfd_count_sections (obfd) == 0)
{
non_fatal (_("there are no sections to be copied!"));
return FALSE;
}
FALSE can be changed to TRUE to avoid the error.
reference: http://2313.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=39014&start=0&POSTNUKESID=9c998e6153cb4e6bba14ec5311d6cc05
gabor: the error seems to be appearing in a command to build a file you don't really need. You can modify the Makefile to not build it at all. Change line 127 from:
build: elf hex eep
to:
build: elf hex
And change line 136 from:
upload: $(TARGET).hex $(TARGET).eep
to:
upload: $(TARGET).hex
This will be fixed soon.
Hi,
I just compiled everything needed to run arduino on Linux by myself and it works fine.
I just missed the hint to build an avr-g++ either - but that was a minor problem to be fixed easily.
Just follow blindly step by step the buildprocess of an avr-environment, install some JRE, jikes, RXTX, build the usb-serial kernel module, get the IDE via the subversion repository, set up pathes and environment variables and smile happily at your blue-ish IDE. :)
Now I have to wait for the actual board as I just placed my order two hours ago.
Just to report some success... (Slackware 11.0)
mellis, thanks for your help.
on the other hand, i'm planning to submit the avr rpms to fedora repositories. if they got excepted users will be able to install avr development tools easier in the future in fedora.
Hey All,
I had a little trouble getting things to run on Ubuntu Edgy AMD64. I had to install the package "librxtx-java" first. Then I had to fix the CLASSPATH reference to the local copy of RXTXcomm.jar. It needs to point to "/usr/share/java/RXTXcomm.jar". Next I had to make two changes to the dist/arduino script. I had to again, swap the reference to the installed RXTXcomm.jar and then I had to change the LD_LIBRARY_PATH to point to /usr/lib instead of the {cwd}/lib so that it will find the correct .so files.
I can supply patches if needed.
Everybody running Ubuntu Linux: forget about compiling the software
The only working Howto for me was: http://www.arduino.cc/playground/Linux/Debian
It is simple and up to date ...
8-)
Hi I am a total Newbie to Linux I have SuSE 8.2 Personal Edition. I could not get Ubuntu to work on my machine. I am currently working with it in the Windows Environment and want to expand my horizons.
I downloaded the latest version of the Arduino software and "unpacked" it onto my desktop and can't get it to run. I read the installation instructions and to be honest - just don't understand what they are trying to tell me. :-/.
Remember that I am a total Newbie to Linux and I would really appreciate the help.
Is there a reason why you still use SuSE 8.2 ?
This is _really_ old, no patches anymore.
Have you tried the installation instructions I wrote for openSUSE ?
( http://www.arduino.cc/playground/Linux/OpenSUSE )
madworm,
Thanks for the reply. I downloaded and installed openSuSE 10.3.
Please take no offense, but I just don't understand the installation instructions. I am a total newbie here. :-/ I think I downloaded the right files.
arduino-0012-linux.tgz
avrdude-5.5.tar.gz.sig
avrdude-5.5.tar.gz
avr-libc-1.6.4.tar.bz2.sig
avr-libc-1.6.4.tar.bz2
avr-binutils-2.13.2.1nb2.tgz
cross-avr-gcc-4.1.3_20070724-15.x86_64.rpm
I tried to install them through YaST but just don't know how.
If you have a step by step procedure like the installation of the 10.3 OS that would be great.
Thank you for your help :)
ok.
- open a console in X
- type:
su
- enter the root password
- type:
yast2
- start the module for installation sources
- make sure these repositories are added and active:
http://download.opensuse.org/distribution/10.3/repo/oss/
http://download.opensuse.org/distribution/10.3/repo/non-oss/
http://download.opensuse.org/update/10.3/
- start the software installer module
- in the search field type AVR and press the search button
- select these packages: avrdude, avr-libc, cross-avr-binutils, cross-avr-gcc
- press accept
- yast2 will download and install the stuff
- start the user/group manager module
- edit the users who need to use the arduino software
- select the group 'UUCP' in the group membership tab. this will grant access to the usb port (/dev/ttyUSB*) and press OK/FINISH
- quit yast2
- in the console type:
find /opt/cross/bin/ -iname "avr*" -exec ln -s -t /usr/local/bin/ {} \;
- close the root console
- RESTART X (logoff/logon)
- as a normal user, open a console window
- extract arduino-0012-linux.tgz to the desired folder
- change to that directory
- type:
./arduino
- the IDE should start.
Thank you so much - I'll give it a shot
madworm,
Thank you so much for your help!!
I ended up getting a DVDROM for $10 for the local computer parts store so I could load the full version had everything going fine except I could not find the repositories you mentioned:
http://download.opensuse.org/distribution/10.3/repo/oss/
http://download.opensuse.org/distribution/10.3/repo/non-oss/
http://download.opensuse.org/update/10.3/
Then I noticed that those looked like websites. Lacking a wireless card I hauled the machine upstairs and plugged it straight in to the router, reinstalled the software and there it was (I ended up installing the 11.0 version). The finding of the AVR packages was as simple as you said!
I did notice that I have to log into the terminal with "su" to have full access. But maybe that is something for later.
I found that running Arduino with Linux is actually easier to configure than in windows since the port setting actually says "usb":D
Again thank you for your help and time.
Sparky
Hi everyone,
i have a problem with the arduino ide on archlinux. It works perfectly except that it doesn't upload the code to the board. The system correctly create a symlink in /dev/ttyUSB0 to /dev/tts/USB0, so the problem is not ftdi_sio, all the modules needed for connecting arduino are loaded. It give me always "/dev/tts/USB0 not found, have you selected the right port from Tools -> Serial port?". I know the file to exists, and Tools -> Serial port is grayed out, i can't select the port from there. I changed the voice on .arduino/preferences.txt. I tryed the following:
1) Changing RXTXcomm.jar and rxtxSerial.so in the arduino folder with the one's downloaded from rxtx.org
2) Removing RXTXcomm.jar and rxtxSerial.so and installing them system wide (yes, is almost the same as before, but I'm trying everything -_-)
3) chmod 666 on /dev/tts/USB0. Still not working.
4) chown myuser /dev/tts/USB0.
5) adding my user to groups uucp, tty and lock. Still nothing.
Even launching the ide as root doesn't make the things work as they should.
Do you have any clue?
Thanks.
Hi,
I'm not sure if the RXTX-lib can deal with symbolic links to devices. Tried this briefly, didn't work.
Is there a reason archlinux creates the device-file as /dev/tts/USB0? Sounds very strange to me....
Eberhard
From what I know, is not RXTX-lib that have to deal with symlinks, but the o.s. Also I don't see the problem, is the device /dev/ttyUSB0 or /dev/tts/USB0 the point is that udev can see arduino and link it to a device. I tried to set serial.port in preferences.txt in both ways, but every time the arduino ide say it can't find that port. A friend of mine solved it with a chmod on /dev/tts/USB0, and the ide's "serial port" menù is grayed out no more. This didn't work for me. This sound very strange to me.
I had looked into this myself as I wanted my FTDI 232 cable to always appear as /dev/boarduino.
I found that I could get the port to show up in Arduino's Serial menu by manually adding 'boarduino' to the list of device names in RXTXCommDriver.java (starting at line 519 for version 2.1.9). Of course this means that I had to compile RXTX myself.
In the end I decided not to complicate my installation and went back to using precompiled RXTX files from the rxtx.org site.
On reading the INSTALL file you could try using
java -Dgnu.io.rxtx.SerialPorts=/dev/tts/USB com.foo.MyApp
where com.foo.MyApp is the arduino java app.
DISCLAIMER: I haven't tried this so have no idea if it will work for you
HTH
Ver
Regards
Hi Ver
I had looked into this myself as I wanted my FTDI 232 cable to always appear as /dev/boarduino.
....
In the end I decided not to complicate my installation and went back to using precompiled RXTX files from the rxtx.org site.
On reading the INSTALL file you could try using
java -Dgnu.io.rxtx.SerialPorts=/dev/tts/USB com.foo.MyApp
where com.foo.MyApp is the arduino java app.
DISCLAIMER: I haven't tried this so have no idea if it will work for you
This works fine for a single board, thanks for the tip.
I wish I could set a search-prefix for the rxtx-lib that way.
Udev creates a symlink Arduino.[SerialNumber] for all my boards.
If I could tell rxtx : "search for all devices starting with 'Arduino.' "
that would be great...
Some more background information is here
http://www.capybara.org/~dfraser/?p=29
Eberhard
You can... but you have to modify the RXTX source code. I did have /dev/boarduino and /dev/arduino (former was for my FTDI 232 cable plugged into a boarduino and the latter for the duemilanove). You need to look at RXTXCommDriver.java starting from line 519 for version 2.1.9.
I had this working with arduino ver 0014 iirc and java sdk 32bit . I then scrapped that as I wanted to get arduino/java/rxtx working completely with x86_64 and I couldn't compile rxtx.
HTH