13/06/12 Arduino playground - Linux
Main Site Blog Playground Forum Labs Store
Logged in as javacasm
|
Profile
|
Help
|
Sign out
search
The playground is a publicly-
editable wiki about Arduino. view history edit print logout
Manuals and Curriculum
Installing Arduino on
Linux
Installing Arduino on Linux
For more detailed instructions, pick your distribution:
Board Setup and Configuration
ArchLinux
Development Tools
Debian
Arduino on other Atmel Chips
Fedora
Interfacing With Hardware Gentoo
Output openSUSE
Input Puppy
User Interface Pussy
Storage Slackware
Communication Ubuntu
Power supplies Xandros (Debian derivative) on Asus Eee PC
General All, "the hard way"
Interfacing with Software
User Code Library Requirements
Snippets and Sketches
You will need to install some programs to use Arduino under Linux (the way
Libraries
you do this depends on your distribution):
Tutorials
openjdk-7-jre (although openjdk-6-jre, sun's java 6 runtime, the sun-
Suggestions & Bugs
java6-jre package or the oracle JRE 7, should work too)
Electronics Technique
it is HIGHLY recommended to use arduino IDE 1.0.1, because it use an
Sources for Electronic Parts internal pre-build gcc compiler. This exclude all tool-chain problem, or at
Related Hardware and least guarantee we all have the same problem. Also this mean you don't
Initiatives need to install all the above package anymore. That's it, no more other
Arduino People/Groups & Sites Requirements, you can skip the rest of this section.
Exhibition If you want to use your system's compiler, delete the folder
Project Ideas ./hardware/tools/avr in your arduino IDE installation
If you still want to use older Arduino IDE version, then you need
Languages
avr-gcc (aka "gcc-avr"), version 4.3.2 or later 4.3.x version (4.4.x and
PARTICIPATE 4.5.x seem to have various problems)
Suggestions Version 4.3.0 has a major bug which affects multiplication of
Formatting guidelines long int's. This is the default version in Ubuntu Intrepid (8.10).
All recent changes Check using "avr-gcc --version" and upgrade if necessary.
PmWiki Versions prior to 4.3.0 do not support the ATmega328
WikiSandBox training (which comes on the Arduino Duemilanove). People running
Basic Editing distributions like Hardy Heron (Ubuntu) or Etch (Debian) and
Cookbook (addons) previous will need to upgrade their version of avr-gcc.
Documentation index Version 4.7 have break some older standard and the arduino
core class give some compiling error.
www.arduino.cc/playground/Learning/Linux 1/3
13/06/12 Arduino playground - Linux
edit SideBar 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-libc
Download the latest Arduino Linux distribution from the arduino dowload
section. Copy/extract these files to a directory (or your desktop) and Runthe
"arduino" script. Be sure that the full extracted directory location/name has
no spaces in the /location/name.
Included Dependencies
The Arduino software download includes custom versions of two additional
dependencies:
RXTX, a Java and native library for communicating with serial devices
like Arduino boards
avrdude, an application for uploading programs to AVR
microcontrollers (like the ones on Arduino boards)
from Arduino IDE 1.0.1 a full working avr-gcc package is included
You should be able to use the versions of these programs that come with the
Arduino software download. If, however, they won't run on your computer,
you may need to compile the Arduino-specific versions of these programs for
yourself rather than using the standard packages from your distribution.
The avrdude that comes with Arduino was modified to ensure proper
functioning of the auto-reset of Arduino boards before upload (without which
the upload will fail). The source code to the Arduino version is available on
GitHub.
The RXTX that comes with Arduino was modified to support devices of the
form /dev/ttyACM*, which are used by the Arduino Uno and Mega 2560
boards (which use an ATmega8U2 instead of an FTDI chip for USB-serial
communication). Source code for the Arduino version is also available on
GitHub.
Other notes
Locking assertion failure from java when using Xinerama
To fix:
sudo sed i 's/XINERAMA/FAKEEXTN/g' /usr/lib/jvm/java6sun/jre/lib/amd64/motif21/libmawt.so
USB-Serial Devices
Arduino's (and other USB-serial devices) end up as /dev/ttyUSB#or
/dev/ttyACM#.
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 either under "Device Drivers
=> USB Support => USB Serial Converter Support => USB FTDI Single Port
Serial Driver" or "Device Drivers => USB Support => USB Modem (CDC
ACM) support". 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 22:1.0: FTDI USB Serial Device converter detected
www.arduino.cc/playground/Learning/Linux 2/3
13/06/12 Arduino playground - Linux
or like this:
cdc_acm 52:1.0: ttyACM0: USB ACM device
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
This works only if you are using Arduino IDE older than 1.0, or you have
deleted the ./hardware/tools/avr folder
Run avrgcc v from a terminal window to check your version number.
(The old instructions for installing Arduino on Linux are still available.)
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.
| Share
www.arduino.cc/playground/Learning/Linux 3/3