Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to setup an Arduino Uno board in Gentoo
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Wed Jan 04, 2012 6:09 pm    Post subject: How to setup an Arduino Uno board in Gentoo Reply with quote

I recently set up Gentoo to work with my new Arduino Uno board, and since I ran into a few quirks I put together a quick how to on how to get things working. I also recommend reading this document, which is very helpful: http://www.arduino.cc/playground/linux/gentoo

Step 1: Install crossdev (which is needed to install gcc-avr)
Code:
emerge sys-devel/crossdev


Step 2 (optional): Add USE="cxx -nocxx" to your /etc/make.conf and run an `emerge -DuN world`

Details
When attempting to install gcc-avr I ran into an issue with my USE flags, since I had C++ support disabled globally, which caused an emerge error about having both the "cxx nocxx" and "-cxx -nocxx" USE flags enabled. I believe this is because gcc was built with USE="-cxx", but instead of fiddling around with individual packages I just enabled the USE flags globally.

Add this line to your /etc/make.conf (or just append the USE flags to your USE= line):
Code:
USE="$USE cxx -nocxx"
You will now need to apply the new USE flags to world
Code:
emerge -DuN world


Step 3: Install gcc-avr
Code:
crossdev -t avr


Step 4: Install arduino frontend. There are two options here:
Step 4a: Install the arduino frontend in the main portage tree:
Code:
echo "dev-embedded/arduino" >> /etc/portage/package.keywords
echo "dev-embedded/arduino java" >> /etc/portage/package.use
emerge arduino

Step 4b (recommended): Install the latest arduino frontend from the arduino overlay: http://gitorious.org/gentoo-arduino. Use layman or your usual method to add the arduino ebuilds to Gentoo. (I maintain my own personal overlay, so I just downloaded the tarball of the complete overlay and copied the ebuilds to my local overlay.) Once you have added the ebuilds do the following:
Code:

echo "dev-embedded/arduino java" >> /etc/portage/package.use
echo "dev-embedded/arduino" >> /etc/portage/package.keywords
echo "dev-java/rxtx" >> /etc/portage/package.keywords
emerge arduino
emerge -1 rxtx


Step 5: Install/Update avrdude to version 5.6 or later.
Details
I ran into an error when working in the arduino IDE that read:
Code:
avrdude: AVR Part "atmega328p" not found.
The solution is to update to the latest avrdude, which supports the atmega328p chipset.
Code:
echo "dev-embedded/avrdude" >> /etc/portage/package.keywords
emerge -1 avrdude


Step 6: Edit your arduino boards.txt configuration file to have the correct protocol for accessing the Arduino Uno board.

Details
In the arduino IDE, you will likely want to select the option Tools->Board->Arduino Uno. Initially I had an incorrect board selected, which caused the following error:
Code:
avrdude: stk500_getsync(): not in sync: resp=0xfe

However, if I chose the correct board (Arduino Uno), I received this error:
Code:
Double check connections and try again, or use -F to override this check.
This error was because boards.txt was pointing to an incorrect protocol to communicate with the board. To fix, change the following line in:
/usr/share/arduino-0021/hardware/arduino/boards.txt under the section that starts with "uno.name=Arduino Uno"
Original:
Code:
change uno.upload.protocol=stk500

New:
Code:
uno.upload.protocol=arduino



Step 7: Fix linker errors

Details
I ran into a couple linker errors when attempting to build code with gcc-avr
Error 1:
Code:
/usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr5.x: No such file or directory

Fix 1:
Code:
ln -s /usr/lib/binutils/avr/2.22/ldscripts /usr/avr/lib/ldscripts


Error 2:
Code:
/usr/libexec/gcc/avr/ld: cannot find crtm328p.o: No such file or directory

Fix 2:
Code:
ln -s /usr/avr/lib/avr5/crtm328p.o /usr/avr/lib/crtm328p.o



Step 8: Make sure your kernel is configured correctly.

Details
You will need ftdi_sio & cdc_acm built into your kernel or compiled as modules. I personally have them added as modules. When plugging in the Arduino board, cdc_acm should automatically load, but you will need to have ftdi_sio manually loaded, or the board won't function properly. The following will add ftdi_sio to be loaded at boot (you won't need to do this if it is built directly into your kernel):
Code:
echo 'modules_2_6="${modules_2_6} ftdi_sio" ' >> /etc/conf.d/modules
modprobe ftdi_sio


The drivers are located here in `make menuconfig`:
Code:
Device Drivers -> USB support -> USB Serial Converter support -> USB FTDI Single Port Serial Driver
Device Drivers -> USB support -> USB Modem (CDC ACM) support



Step 9: Add your user to the appropriate groups to access the hardware.

To be added later... I wasn't able to get this working for my user, so I have been using the IDE as root for the time being


Step 10: Plug in the board, configure the arduino IDE and start coding!
Code:
arduino
You will want to make sure you have the following options selected:
Code:
Tools->Board->Arduino Uno
Tools->Board->Serial Port->/dev/ttyACM0
Back to top
View user's profile Send private message
bartex
n00b
n00b


Joined: 01 Jan 2012
Posts: 16

PostPosted: Wed Jan 04, 2012 6:28 pm    Post subject: Reply with quote

Hi mikegpitt,

very useful tutorial. Love it :)

BR,
bartex
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 225

PostPosted: Mon Jan 09, 2012 3:13 pm    Post subject: Reply with quote

Hello mikegpitt. On first place, thank for your guide, i will be really lost without it, but i'm really new on gentoo. I was following the guide but i found two issues that did not left run arduino.

for not corrupt your post i decided create a new for me [note: second issue solved]

https://forums.gentoo.org/viewtopic-p-6924386.html#6924386

The first is that i only could (after use overlay) use arduino v 0.017 and not the last v 1.0 contained on their web. On the same way installs rxtx v2.1.7.2-r3 being required rxtx-2.2_pre2 (contained in the overlay) or upload code on AMD64 systems. The overlay don't works
and the second is that finalized the steps of your guide, when i run #arduino from console, nothing happen.

Is detailed on my post.

Please, if you could help me a bit, i will be greatful and arduino will be posible for me on linux

Salutes


Last edited by Yczo on Mon Jan 09, 2012 7:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Jan 09, 2012 7:41 pm    Post subject: Reply with quote

Yczo wrote:
The first is that i only could (after use overlay) use arduino v 0.017 and not the last v 1.0 contained on their web (not very important to me)

Yes, this is the version that is in portage right now, I think... if you use the overlay you can install version 0.0021, but really I don't think there will be much of a difference.


Yczo wrote:
and the second is that finalized the steps of your guide, when i run #arduino from console, nothing happen
Have you emerged arduino with java support? I believe you need to do that to have the GUI available. I should modify my guide...
Code:
echo "dev-embedded/arduino java" >> /etc/portage/package.use
emerge arduino


EDIT: No need to modify the guide, I apparently already added that line in :lol: It still would explain why you aren't seeing the GUI though.
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 225

PostPosted: Mon Jan 09, 2012 7:55 pm    Post subject: Reply with quote

Oh it was an incompatibility with the latest java virtual machine oracle-jre-bin-1.7 . The solution is install sun-jre-bin-1.6

Now i need to install rxtx-2.2_pre2 or higher to upload code to board with AMD64, but i'm not sure how to do. I'm trying. Salutes
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Jan 09, 2012 8:01 pm    Post subject: Reply with quote

Yczo wrote:
Now i need to install rxtx-2.2_pre2 or higher to upload code to board with AMD64, but i'm not sure how to do.
dev-java/rxtx-2.2_pre2 is packaged with the arduino overlay... It looks like the ebuild has the ~amd64, so I would imagine it should work fine for you. Grab the overlay, add the ebuild to your package.keywords, emerge it, and you should be all set.
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 225

PostPosted: Tue Jan 10, 2012 3:14 pm    Post subject: Thinking on format gentoo Reply with quote

at last i could use overlay. After upgrade rxtx and arduino, i had the problem of avrdude: AVR Part "atmega328p" not found. but update arvdude did not bring the solution for me.

I decided repeat the steps od the guide. From the steep 1, and now i have a new and serious problem when i try to compile code with arduino, that did not have before

In file included from /usr/lib/gcc/avr/4.5.3/../../../../avr/include/util/delay.h:44:0,
from /usr/lib/gcc/avr/4.5.3/../../../../avr/include/avr/delay.h:37,
from /usr/share/arduino-0021/hardware/arduino/cores/arduino/wiring_private.h:30,
from /usr/share/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:33:
/usr/lib/gcc/avr/4.5.3/../../../../avr/include/math.h:426:15: error: expected identifier or ‘(’ before ‘double’
/usr/lib/gcc/avr/4.5.3/../../../../avr/include/math.h:426:15: error: expected ‘)’ before ‘>=’ token

uf, my head explodes, and think that probably i have to format and reinstall all the system makes me tremble.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Tue Jan 10, 2012 8:15 pm    Post subject: Reply with quote

Hmm... Well it doesn't seem that you are alone, I see a lot of Google results with a similar error. Here's one page that explains some of what might be happening: http://arduino.cc/forum/index.php?topic=79371.0

Although, I noticed today in my `emerge --sync` that there appears that cross-avr/avr-libc-1.8.0 is now in portage. I'm currently running 1.7.1 on my system. Perhaps when you started again from scratch you went to version 1.8.0, which is causing the error?
Back to top
View user's profile Send private message
riding_qwerty
n00b
n00b


Joined: 08 Jul 2010
Posts: 25

PostPosted: Tue Jan 10, 2012 11:19 pm    Post subject: Reply with quote

Nice little tutorial. I am about halfway through...having an issue with the Arduino IDE itself. In this case, when I click on a menu, it stays open so long as the mouse button is depressed, and disappears upon release; also, I cannot select anything.

Is this a Java issue? I am using the sun-jre-bin-1.6, and emerged the stable arduino package (arduino-0017) as I am not very familiar with using overlays.

Any advice or known issues similar to this? Thanks in advance.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Wed Jan 11, 2012 3:27 pm    Post subject: Reply with quote

riding_qwerty wrote:
Nice little tutorial. I am about halfway through...having an issue with the Arduino IDE itself. In this case, when I click on a menu, it stays open so long as the mouse button is depressed, and disappears upon release; also, I cannot select anything.

Is this a Java issue? I am using the sun-jre-bin-1.6, and emerged the stable arduino package (arduino-0017) as I am not very familiar with using overlays.

Any advice or known issues similar to this? Thanks in advance.
I'm also using sun-jre-bin:1.6, and I did have arduino-0017 installed for a bit without this issue. Do you see any debugging output on the command line? If yes, post that here... also it may help to run the command with strace, to get some lower level debugging information.

For overlays, take a look at this guide: http://www.gentoo.org/proj/en/overlays/userguide.xml

The arduino overlays is easy to add, even without layman. Just download the full tarball of the overlay (it's linked to the link I posted in the tutorial), unpack them somewhere on your filesystem, and point to it using the PORTDIR_OVERLAY variable in your make.conf. I have a line like this in my make.conf. I unpacked the arduino overlay files in /usr/local/gentoo-arduino-arduino.
Code:
PORTDIR_OVERLAY="$PORTDIR_OVERLAY /usr/local/gentoo-arduino-arduino"
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 225

PostPosted: Wed Jan 11, 2012 5:42 pm    Post subject: Solutioned Reply with quote

That is! Your last link, soved me all the problems.

Thank you very much for your attention!!
Back to top
View user's profile Send private message
riding_qwerty
n00b
n00b


Joined: 08 Jul 2010
Posts: 25

PostPosted: Thu Jan 12, 2012 1:25 am    Post subject: Reply with quote

mikegpitt wrote:
riding_qwerty wrote:
Nice little tutorial. I am about halfway through...having an issue with the Arduino IDE itself. In this case, when I click on a menu, it stays open so long as the mouse button is depressed, and disappears upon release; also, I cannot select anything.

Is this a Java issue? I am using the sun-jre-bin-1.6, and emerged the stable arduino package (arduino-0017) as I am not very familiar with using overlays.

Any advice or known issues similar to this? Thanks in advance.
I'm also using sun-jre-bin:1.6, and I did have arduino-0017 installed for a bit without this issue. Do you see any debugging output on the command line? If yes, post that here... also it may help to run the command with strace, to get some lower level debugging information.

For overlays, take a look at this guide: http://www.gentoo.org/proj/en/overlays/userguide.xml

The arduino overlays is easy to add, even without layman. Just download the full tarball of the overlay (it's linked to the link I posted in the tutorial), unpack them somewhere on your filesystem, and point to it using the PORTDIR_OVERLAY variable in your make.conf. I have a line like this in my make.conf. I unpacked the arduino overlay files in /usr/local/gentoo-arduino-arduino.
Code:
PORTDIR_OVERLAY="$PORTDIR_OVERLAY /usr/local/gentoo-arduino-arduino"


It might be worth mentioning that I have "dev-embedded/arduino ~amd64" in /etc/portage/package.keywords, and that without the ~amd64 flag the package is masked and cannot be emerged.

Here is the output of "strace arduino &> arduino.log"; the java.io.IOException line towards the bottom and the indented portion that follows popped up after trying to run a program that didn't exist, and everything after that popped up upon quitting the IDE. Also, even though the file menus are unusable, I can use keyboard shortcuts like CTRL+Q to quit or CTRL+O to open a file.

Code:

execve("/usr/bin/arduino", ["arduino"], [/* 45 vars */]) = 0
brk(0)                                  = 0x20a0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f45ac3ce000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=138640, ...}) = 0
mmap(NULL, 138640, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f45ac3ac000
close(3)                                = 0
open("/lib64/libncurses.so.5", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200S\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=341840, ...}) = 0
mmap(NULL, 2439168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f45abf5c000
mprotect(0x7f45abfab000, 2093056, PROT_NONE) = 0
mmap(0x7f45ac1aa000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4e000) = 0x7f45ac1aa000
mmap(0x7f45ac1af000, 2048, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f45ac1af000
close(3)                                = 0
open("/lib64/libdl.so.2", O_RDONLY)     = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\17\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14512, ...}) = 0
mmap(NULL, 2109704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f45abd58000
mprotect(0x7f45abd5a000, 2097152, PROT_NONE) = 0
mmap(0x7f45abf5a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f45abf5a000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260!\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1592528, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f45ac3ab000
mmap(NULL, 3701768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f45ab9d0000
mprotect(0x7f45abb4f000, 2093056, PROT_NONE) = 0
mmap(0x7f45abd4e000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17e000) = 0x7f45abd4e000
mmap(0x7f45abd53000, 19464, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f45abd53000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f45ac3aa000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f45ac3a9000
arch_prctl(ARCH_SET_FS, 0x7f45ac3aa700) = 0
mprotect(0x7f45abd4e000, 16384, PROT_READ) = 0
mprotect(0x7f45abf5a000, 4096, PROT_READ) = 0
mprotect(0x7f45ac1aa000, 16384, PROT_READ) = 0
mprotect(0x6d1000, 4096, PROT_READ)     = 0
mprotect(0x7f45ac3cf000, 4096, PROT_READ) = 0
munmap(0x7f45ac3ac000, 138640)          = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
open("/dev/tty", O_RDWR|O_NONBLOCK)     = 3
close(3)                                = 0
brk(0)                                  = 0x20a0000
brk(0x20c1000)                          = 0x20c1000
open("/usr/lib64/locale/locale-archive", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1534640, ...}) = 0
mmap(NULL, 1534640, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f45ac232000
close(3)                                = 0
getuid()                                = 1000
getgid()                                = 1000
geteuid()                               = 1000
getegid()                               = 1000
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
open("/proc/meminfo", O_RDONLY)         = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f45ac3cd000
read(3, "MemTotal:        3797416 kB\nMemF"..., 1024) = 1024
close(3)                                = 0
munmap(0x7f45ac3cd000, 4096)            = 0
rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f45aba05690}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f45aba05690}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f45aba05690}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f45aba05690}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f45aba05690}, {SIG_DFL, [], SA_RESTORER, 0x7f45aba05690}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7f45aba05690}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7f45aba05690}, {SIG_DFL, [], SA_RESTORER, 0x7f45aba05690}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigaction(SIGQUIT, {SIG_IGN, [], SA_RESTORER, 0x7f45aba05690}, {SIG_DFL, [], SA_RESTORER, 0x7f45aba05690}, 8) = 0
uname({sys="Linux", node="node", ...})  = 0
stat("/home/george", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
getpid()                                = 32455
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26050, ...}) = 0
mmap(NULL, 26050, PROT_READ, MAP_SHARED, 3, 0) = 0x7f45ac3c7000
close(3)                                = 0
getppid()                               = 32454
getpgrp()                               = 32454
rt_sigaction(SIGCHLD, {0x441c00, [], SA_RESTORER|SA_RESTART, 0x7f45aba05690}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f45aba05690}, 8) = 0
getrlimit(RLIMIT_NPROC, {rlim_cur=29130, rlim_max=29130}) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
open("/usr/bin/arduino", O_RDONLY)      = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fff984f00f0) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR)                   = 0
read(3, "#!/bin/bash\ncd /usr/share/arduin"..., 80) = 55
lseek(3, 0, SEEK_SET)                   = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=4*1024}) = 0
fcntl(255, F_GETFD)                     = -1 EBADF (Bad file descriptor)
dup2(3, 255)                            = 255
close(3)                                = 0
fcntl(255, F_SETFD, FD_CLOEXEC)         = 0
fcntl(255, F_GETFL)                     = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(255, {st_mode=S_IFREG|0755, st_size=55, ...}) = 0
lseek(255, 0, SEEK_CUR)                 = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
read(255, "#!/bin/bash\ncd /usr/share/arduin"..., 55) = 55
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
stat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/share", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
stat("/usr/share/arduino-0017", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
chdir("/usr/share/arduino-0017")        = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f45ac3aa9d0) = 32456
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x43fa30, [], SA_RESTORER, 0x7f45aba05690}, {SIG_DFL, [], SA_RESTORER, 0x7f45aba05690}, 8) = 0
wait4(-1, Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
0x7fff984f002c, 0, NULL)      = ? ERESTARTSYS (To be restarted)
--- {si_signo=SIGWINCH, si_code=SI_KERNEL, si_value={int=1662233169, ptr=0x7f446313aa51}} (Window changed) ---
wait4(-1,










java.io.IOException: Target platform: "null" not found.
Make sure that "build.target" in the
preferences file points to a subdirectory of
/usr/share/arduino-0017/hardware/cores
   at processing.app.debug.Target.<init>(Target.java:49)
   at processing.app.Editor$43.run(Editor.java:1751)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$000(Unknown Source)
   at java.awt.EventQueue$1.run(Unknown Source)
   at java.awt.EventQueue$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Experimental:  JNI_OnLoad called.
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 32456
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32456, si_status=0, si_utime=0, si_stime=0} (Child exited) ---
wait4(-1, 0x7fff984efb9c, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn(0xffffffffffffffff)        = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f45aba05690}, {0x43fa30, [], SA_RESTORER, 0x7f45aba05690}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
read(255, "", 55)                       = 0
exit_group(0)                           = ?


I may look into using the overlay tonight to see if that alleviates the issue.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Thu Jan 12, 2012 4:16 am    Post subject: Reply with quote

Code:
java.io.IOException: Target platform: "null" not found.

Yes, I would look to use the version in the overlay. It seems like this is a pretty common error with 0017, but I'm not sure why it's happening. Some googling suggests that it could have something to do with your preferences.txt... but I think the best option is to use the latest version of the IDE.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 507
Location: Wales, UK

PostPosted: Thu Jan 26, 2012 6:21 am    Post subject: Reply with quote

For information, I have created an ebuild and patch files for arduino-1.0 source build. I posted it on the arduino-1.0 enhancement request (https://bugs.gentoo.org/show_bug.cgi?id=303043), and it is also part of my personal overlay at http://gitorious.org/homeoverlay/homeoverlay. I have tested it with a duemilenove arduino, without any issues. in terms of my current versions of other key programs:

  • sys-devel/crossdev-20111221
  • cross-avr/gcc-4.5.3-r2
  • cross-avr/binutils-2.21.1-r2
  • dev-embedded/avrdude-5.5
  • cross-avr/avr-libc-1.8.0

I would appreciate any constructive feedback (eg, does it work with other boards)!
Back to top
View user's profile Send private message
mistik1
n00b
n00b


Joined: 03 Dec 2006
Posts: 6

PostPosted: Fri Jan 27, 2012 6:02 am    Post subject: Reply with quote

Thanks for sharing your experience setting up your Uno.

Step 2 is not caused by your /etc/make.conf but by crossdev itself https://bugs.gentoo.org/394665
You need to upgrade crossdev to at least crossdev-20111118

Code:

echo "=sys-devel/crossdev-20111118" >>/etc/portage/package.keywords
emerge -av crossdev


Then proceed to step 3.
_________________
Dell Inspiron 1501
AMD Turion X2 1600 MHZ, 1Gig RAM, 60 GB HDD, ATI Xpress 200M
Back to top
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 137
Location: Europe/Vienna

PostPosted: Fri Feb 10, 2012 1:17 pm    Post subject: Reply with quote

wow! this thread is simply great!!
thanks a lot for sharing your experiences, finally no use for windows on my notebook anymore ;)
i use the xml file with layman, the overlay then is called luksans-arduino. it covers quite everything (except the two ln -s ... commands and the unmasking).
_________________
bill who? micro what?
Back to top
View user's profile Send private message
florintanasa
n00b
n00b


Joined: 11 Feb 2012
Posts: 5

PostPosted: Sat Feb 11, 2012 8:48 am    Post subject: Reply with quote

Hello,
I use funtoo linux and thanks for this.
In funtoo or gentoo is very dificult to install avr toolset and arduino, but I did with layman/luksans-arduino
With this I have errors compilation in arduino (sanguino).
Code:
/home/florin/arduino-0023/hardware/arduino/cores/arduino/HardwareSerial.cpp:145:15: error: attempt to use poisoned "SIG_USART1_RECV"
make: *** [.build/arduino/HardwareSerial.d] Error 1

Then I downloaded the arduino-0023 from arduino.cc site and I got (copy) the toolset from wiring (tools directory) http://wiring.org.co/ and I put the toolset in arduino-0023 in hardware folder.
The I modified Sconstruct from http://code.google.com/p/arscons/ with new toolset path and I make compilation without errors.
Now I using arduino (sanguino) with qt-creator
Back to top
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 137
Location: Europe/Vienna

PostPosted: Sat Feb 11, 2012 11:43 am    Post subject: Reply with quote

finally! arduino 1.0 made it into the main portage tree, and with all those fixes mentioned here ist seems to work.
_________________
bill who? micro what?
Back to top
View user's profile Send private message
Robelix
l33t
l33t


Joined: 21 Jul 2002
Posts: 760
Location: in a World created by a Flying Spaghetti Monster

PostPosted: Sat Feb 25, 2012 1:09 am    Post subject: Reply with quote

Got the Arduino Uno working with:

Code:

cd /usr/avr/lib
ln -s avr5/crtm328p.o .
ln -s avr5/libc.a .
ln -s avr5/libm.a .




So to the Arduino Mege2560

First I got these "error: attempt to use poisoned "SIG_USART1_RECV" errors - after downgrading to cross-avr/avr-libc-1.7.1 these are gone.

and I did:
Code:

cd /usr/avr/lib
ln -s avr6/crtm2561.o .
ln -sf avr6/libc.a .
ln -sf avr6/libm.a .


Now I get
Code:

/usr/libexec/gcc/avr/ld: skipping incompatible /usr/lib/gcc/avr/4.5.3/libgcc.a when searching for -lgcc
/usr/libexec/gcc/avr/ld: cannot find -lgcc
collect2: ld returned 1 exit status


But /usr/lib/gcc/avr/4.5.3/libgcc.a seems to be the only avr-libgcc I've got - how does this get incompatible?
_________________
mysql> SELECT question FROM life, universe, everything WHERE answer=42;
Empty set (2079460347 sec)
Back to top
View user's profile Send private message
Robelix
l33t
l33t


Joined: 21 Jul 2002
Posts: 760
Location: in a World created by a Flying Spaghetti Monster

PostPosted: Sat Feb 25, 2012 12:13 pm    Post subject: Reply with quote

Got it.

The second patch from https://bugs.gentoo.org/show_bug.cgi?id=378387 did it for me.
Now both Arduinos work without any symlinks in /usr/avr/lib/
_________________
mysql> SELECT question FROM life, universe, everything WHERE answer=42;
Empty set (2079460347 sec)
Back to top
View user's profile Send private message
andrewwalker27
l33t
l33t


Joined: 27 Jun 2005
Posts: 660

PostPosted: Tue Mar 13, 2012 4:27 pm    Post subject: Reply with quote

I've got the Duemilanove 328 board running ok but not my Uno. The Uno device driver exists in /dev as ttyACM0 but not in the menu in the arduino-1.0 software. I'm running ~x86_64 and I've checked I'm in the correct groups. I've also checked with another Uno to prove it wasn't the board at fault.
The strange thing is that dmesg shows the board

[24006.462034] usb 6-2: udev 13, busnum 6, minor = 652
[24006.462037] usb 6-2: New USB device found, idVendor=2341, idProduct=0001
[24006.462040] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[24006.462043] usb 6-2: Product: Arduino Uno
[24006.462045] usb 6-2: Manufacturer: Arduino (www.arduino.cc)
[24006.462047] usb 6-2: SerialNumber: 64932343738351402142
[24006.462127] usb 6-2: usb_probe_device
[24006.462130] usb 6-2: configuration #1 chosen from 1 choice
[24006.465037] usb 6-2: adding 6-2:1.0 (config #1, interface 0)
[24006.465074] cdc_acm 6-2:1.0: usb_probe_interface
[24006.465078] cdc_acm 6-2:1.0: usb_probe_interface - got id
[24006.465100] cdc_acm 6-2:1.0: ttyACM0: USB ACM device
[24006.468081] usb 6-2: adding 6-2:1.1 (config #1, interface 1)
[24006.468138] drivers/usb/core/inode.c: creating file '013'


but lsusb just shows a blank line

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 003 Device 002: ID 413c:2003 Dell Computer Corp. Keyboard
Bus 006 Device 013: ID 2341:0001
Bus 002 Device 004: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse


Can anyone tell me if it is the Arduino software at fault or the USB system? I've checked the USB FTDI Single Port Serial Driver and the USB Modem (CDC ACM) support are enabled in the kernel so I don't think the kernel is at fault. I'm using kernel-3.2.9
Back to top
View user's profile Send private message
MuMulambda
n00b
n00b


Joined: 20 Mar 2012
Posts: 1

PostPosted: Tue Mar 20, 2012 1:44 pm    Post subject: Reply with quote

Sorry to bump a relatively old post, just wanted to help out here

Quote:
Nice little tutorial. I am about halfway through...having an issue with the Arduino IDE itself. In this case, when I click on a menu, it stays open so long as the mouse button is depressed, and disappears upon release; also, I cannot select anything.

Is this a Java issue? I am using the sun-jre-bin-1.6, and emerged the stable arduino package (arduino-0017) as I am not very familiar with using overlays.

Any advice or known issues similar to this? Thanks in advance.


This was happening for me under xmonad, I fixed it by following the steps here in the XMonad Wiki. Hope it helps some people. Basically you get the WM to tell Java that it's one of the non reparenting WM's they have their small list.
Back to top
View user's profile Send private message
Robelix
l33t
l33t


Joined: 21 Jul 2002
Posts: 760
Location: in a World created by a Flying Spaghetti Monster

PostPosted: Tue Mar 20, 2012 1:59 pm    Post subject: Reply with quote

0017 is really old - I'm using ardunio-0021 from the overlay http://gitorious.org/gentoo-arduino/arduino with sun-jdk-1.6

(Tried the 1.0 from portage some time ago, but this did not upload to my Uno)
_________________
mysql> SELECT question FROM life, universe, everything WHERE answer=42;
Empty set (2079460347 sec)
Back to top
View user's profile Send private message
linoseros
n00b
n00b


Joined: 05 Feb 2012
Posts: 3

PostPosted: Fri Mar 23, 2012 10:34 am    Post subject: Reply with quote

I was looking for this thank you so much
Back to top
View user's profile Send private message
mikankun
n00b
n00b


Joined: 17 Mar 2010
Posts: 6

PostPosted: Tue May 15, 2012 2:33 pm    Post subject: Reply with quote

Not sure if you ever figured it out but for anyone wondering about the groups bit. You need to to be part of uucp and tty. You'll also need to make sure /var/lock is writable for the group.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum