Arduino 0022 on 64 bit linux

Arduino 22 on 64 bit linux

Having been to the 27c3, I purchased one of the new Arduino Unos on account of my old duemilanove having a broken USB port. However, there are some hurdles to running the arduino IDE on a 64 bit linux. "It's Java, it should run anywhere", I hear you say. Yes, but it needs some fixes (because, luckily, the all-java OS hasn't yet found it's way to my computer).

Zeroth, install all prerequisites: librxtx (librxtx-dev packages on Debian and Ubuntu), avr-gcc and its ilk (gentoo: "emerge crossdev; crossdev -t avr"), java (of course) and ant. Then, download the source code from here and unpack it to some temporary directory. Go to the build/ subdirectory and run ant.

Then remove linux/work/lib/librxtxSerial.so and linux/work/lib/RXTXcomm.jar and replace them with links to the distribution installed library like so:

rm linux/work/lib/librxtxSerial.so
rm linux/work/lib/RXTXcomm.jar

ln -s /usr/lib64/rxtx-2/librxtxSerial.so linux/dist/lib/
ln -s /usr/share/rxtx-2/lib/RXTXcomm.jar linux/dist/lib/

This should compile the IDE without errors, you can try to execute ant run to test it. However, there is still a problem: The rxtx library is retarded, and only searches for ttyUSB* ports. However, the new Arduino Uno registers as ttyACM*, which means that you can't select dev/ttyACM0 from the serial port menu, because it's greyed out. This can be fixed by a little udev rule: Edit etc/udev/rules.d/96-own.rules, and add the following line:

KERNEL=="ttyACM*", SYMLINK+="ttyUSB%n"

This links all ttyACM* devices to ttyUSB* devices, and so allows the arduino IDE to find the serial ports. Finally, a last fix that is required for compiling avr code on gentoo : Due to this bug, avr-gcc cannot find the correct linker scripts. Executing ln -s /usr/lib/binutils/avr/2.21/ldscripts /usr/avr/lib/ldscripts fixes this bug and allows you to compile AVR code on your gentoo.

Happy LED blinking! And remember, if you have constructive criticism, comment.

Author: Jan Seeger

Email: sitecomments@thenybble.de

Validate