Arduino and Gentoo

I wanted an fully OSS embedded device and IDE.
I also wanted something that was quick to develop for.
So I got myself an Arduino from dfrobot.

As expected the guide for Gentoo is a little out of date on the Arduino web site.

Here are some quick fixes to get the IDE up and running.

1)
Set Sun(Oracle) JRE or JDK as your system Java vm (Ice tea will make Arduino IDE fail)
I am using the JDK ( sun-jdk-1.6  system-vm)

2)
Building the tool chain. I had to remove the “-S” stable flag from the crossdev build would fail every-time.
$ USE=”-openmp” crossdev -t avr -s4 –without-headers 

3)
I had issues compiling my Arduino test code it complained at the two following things :-
“/usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr5.x: No such file or directory
collect2: ld returned 1 exit status”

To fix I made the following sym link :-
$ ln -s /usr/x86_64-pc-linux-gnu/avr/lib/ldscripts /usr/avr/lib/ldscripts

“/usr/libexec/gcc/avr/ld: cannot find crtm328p.o: No such file or directory
collect2: ld returned 1 exit status”

Once again fixed with another sym link :-
$ ln -s /usr/avr/lib/avr5/crtm328p.o /usr/avr/lib/crtm328p.o

4)
Use the current Arduino build from there web site the one in the portage overlay is way out of date.
I used the pre-compiled java binary with no issues from hear.
If you don’t use the latest one you may get an error like this :-
“avrdude: AVR Part “atmega328p” not found.”

Thats it! all up and running and writing code for it now.

Advertisements

7 Responses to “Arduino and Gentoo”

  1. This was very helpful. I was having all sorts of trouble on my Gentoo system and wondered if it was just me.

    I am up and running now as well. Thanks :-)

  2. For that second symlink I think you were just creating a link file within your current working directory? What directory was that?

    Thanks!

    • Hi, Thanks for pointing out that wrong symlink!
      Not in the current working directory no.

      I’ve updated the sylink to the full paths for target and link name.

      Thanks!

  3. I had the same problems that you and solved with this helpfull post. Thanks for share!

  4. mohammad Says:

    thank you , that symbolic link solution works fine , i am using everything from the overlay , no compiled binaries

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: