Ardunio Nano V3 Development on Linux

After I’ve read an interesting article about Arduino I obtained an “Arduino Nano V3”, which contains already the newer AVR Atmega 328p micro processor. The starter kit contained also a 3 axis accelerometer (ADXL330), a bread board, an LED, push button and so on.
See for more information about the arduino itself.

Arduino Starterkit

The nice thing about arduino nano is, that it comes preinstalled with a USB plug so you don’t need to solder yourself. It’s just plug & play and you even do not need a power supply, because it’s powered over USB (external power supply is possible too of course).

The seconds nice thing is that there exists an Open Source IDE, also called “Arduino” which make programming really easy also for people without great programming skills. This IDE is written in JAVA, and so is portable. Underneeth the GUI it uses the AVR-GCC toolchain to compile C and C++ programs and links against AVR-LIBC. The most complicated thing to get it running is building a working AVR toolchain, but Gentoo has this nice “crossdev” script which can generate complete toolchains including compiler, binutils and libc 🙂

Installing the AVR Toolchain
To use crossdev you should add the line ‘PORTDIR_OVERLAY=”/usr/local/portage”‘ to your /etc/make.conf.

crossdev -t avr -s4 --without-headers
ln -s /usr/i686-pc-linux-gnu/avr/lib/ldscripts /usr/avr/lib/ldscripts
emerge avrdude -av

There first line executes the crossdev script which compiles the toolchain for AVR (See crossdev –help for more info). The second line creates a missing symlink due to bug 147155. The third line installs avrdude, a tool for downloading programs to the AVR.

If everything succeeded you should be able to run “avr-gcc –version” to check the compiler version. You need at least avr-libc 1.6.4 to support the Atmega328p, but this is already default meanwhile.

Now you can simply download the Arduino IDE from, unpack and run it. For compiling you should select the “Arduino Deumilanove w/ Atmega 328” via the menu Tools->Board. The normal nano configuration has no Atmega 328.


For downloading you have to select your serial port via Tools->Serial Port. This is /dev/ttyUSB0 normally if it is the first connected tty device.
If you don’t see this device when you plug in the cable you probably don’t have the FTDI driver compiled into your kernel.

Configuring the FTDI USB serial converter
You can activate it via the kernel menu config (you must know how to compile a kernel for that):
Device Drivers -> USB support -> USB Serial Converter support -> USB FTDI Single Port Serial.

To get access to the tty device file you should be in the uucp group. Use “sudo usermod -a -G uucp ” to add the group to a user. This change requires you to relogin to get active.

2 Responses to “Ardunio Nano V3 Development on Linux”

  1. 1 His_wife69 October 10, 2009 at 6:40 pm

    Moreover, teaching reading requires considerable knowledge and skill, acquired over several years through focused study and super- vised practice. ,

  1. 1 Gerhard Gappmeier (gergap) 's status on Monday, 10-Aug-09 11:13:17 UTC - Trackback on August 10, 2009 at 11:13 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: