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 Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
andrewwalker27
Guru
Guru


Joined: 27 Jun 2005
Posts: 522

PostPosted: Tue Jun 26, 2012 1:09 pm    Post subject: Reply with quote

Still can't get it working! I've started from scratch and done the following

Installed crossdev-20120531
emerge sys-devel/crossdev
and
crossdev -t avr
------------------------------------------------------------------------------------------------------------------------------------------------------
* crossdev version: 20120531
* Host Portage ARCH: amd64
* Target Portage ARCH: *
* Target System: avr
* Stage: 4 (C/C++ compiler)
* ABIs: default

* binutils: binutils-[latest]
* gcc: gcc-[latest]
* libc: avr-libc-[latest]

* CROSSDEV_OVERLAY: /var/lib/layman/rion
* PORT_LOGDIR: /var/log/portage
* PORTAGE_CONFIGROOT:
* Portage flags:
_ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ -
* leaving metadata/layout.conf alone in /var/lib/layman/rion
_ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ -
* Log: /var/log/portage/cross-avr-binutils.log
* Emerging cross-binutils ... [ ok ]
* Log: /var/log/portage/cross-avr-gcc-stage1.log
* Emerging cross-gcc-stage1 ... [ ok ]
* Log: /var/log/portage/cross-avr-avr-libc.log
* Emerging cross-avr-libc ... [ ok ]
* Log: /var/log/portage/cross-avr-gcc-stage2.log
* Emerging cross-gcc-stage2 ... [ ok ]

Installed dev-embedded/arduino-1.0 USE="java"
emerge arduino

Installed rxtx-2.2_pre2
emerge -1 rxtx

Installed avrdude
emerge -1 avrdude-5.11.1

and checked I'm in the right groups. I can now select Uno and /dev/ttyACM0 and when I select upload I get no errors and all the correct lights light up on the Arduino only the code doesn't work. I also get the same result with a Duemilanove.
I'm only using the blink example sketch but I just get the onboard pin 13 led permanently lit, it should blink but doesn't! I've tried other Arduino boards and they work ok when I use my laptop with Ubuntu but Gentoo seems to not work correctly.
Any ideas anyone?
Back to top
View user's profile Send private message
yngwin
Developer
Developer


Joined: 19 Dec 2002
Posts: 4394
Location: Suzhou, China

PostPosted: Wed Jul 04, 2012 9:29 am    Post subject: Reply with quote

It would be nice if you guys add the information from this thread to the Gentoo Wiki!
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
shimbob
n00b
n00b


Joined: 13 Sep 2003
Posts: 43

PostPosted: Thu Jul 12, 2012 4:07 am    Post subject: sabayon-distro overlay wrecks things Reply with quote

I just discovered after much head-wall contact that having the sabayon-distro overlay enabled will cause the 'crossdev avr' step to fail. It was complaining about masked packages and "missing IUSE: libffi". Disabled the sabayon-distro overlay and now it's happy.

[edit]
Sigh.. for several hours now I have been trying to install arduino:
Code:
>>> Emerging (1 of 1) dev-embedded/arduino-0021 from ardunio
 * Missing avr-g++; you need to crossdev -s4 avr
 * Note that you need >=cross-avr/gcc-4.4.1, if you intend to use the new
 * Arduino Mega 2560.
>>> Unpacking source...
 * git.eclass is deprecated.
 * Please update your ebuilds to use git-2 instead. For details, see
 * http://archives.gentoo.org/gentoo-dev/msg_b7ba363cae580845819ae3501fb157e9.xml
 * GIT update -->
 *    repository:       git://github.com/arduino/Arduino.git
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
remote: Counting objects: 19115, done.
remote: Compressing objects: 100% (6359/6359), done.
Receiving objects:  38% (7310/19115), 51.48 MiB | 699 KiB/s   

and it just hangs there receiving objects...
If I try again, it might hang at 40%, 64%, 65%, it's always different.
Back to top
View user's profile Send private message
cwc
l33t
l33t


Joined: 20 Mar 2006
Posts: 803
Location: Tri-Cities, WA USA

PostPosted: Sun Aug 26, 2012 1:46 pm    Post subject: !!! All ebuilds that could satisfy "dev-embedded/uisp&a Reply with quote

Thank you for the thread! I just purchased an Arduino Uno and I'm trying to set up my Gentoo (Funtoo) box to run the IDE.
azzerare ~ # uname -a
Linux azzerare 3.2.12-gentoo #3 SMP Fri Apr 13 05:16:30 PDT 2012 x86_64 AMD Athlon(tm) 64 Processor 3400+ AuthenticAMD GNU/Linux

I'm stuck here.
!!! All ebuilds that could satisfy "dev-embedded/uisp" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-embedded/uisp-20050207-r1::gentoo (masked by: ~amd64 keyword)

This is my /etc/portage/package.unmask

>=dev-java/rxtx-9999
>=dev-embedded/uisp-9999

package.unmask is the only /etc/portage/ file I have not put in a directory.

Here is the error:
emerge arduino
Calculating dependencies... done!

!!! All ebuilds that could satisfy "dev-embedded/uisp" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-embedded/uisp-20050207-r1::gentoo (masked by: ~amd64 keyword)

(dependency required by "dev-embedded/arduino-1.0[java]" [ebuild])
(dependency required by "arduino" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

Any ideas?
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
rockdw
n00b
n00b


Joined: 19 Sep 2003
Posts: 26

PostPosted: Sun Aug 26, 2012 8:45 pm    Post subject: Reply with quote

My system is a 32bit setup, but I just bypassed all the compiling and grabbed the tarball from arduino.cc:

http://arduino.cc/en/Main/Software

Set up the user to be in the uucp,tty and usb groups and just ran the arduino binary in the arduino-1.0.1 directory. That has worked just fine for me with my Duemilanove and took about two minutes to set up. No fuss, no muss.

Just because gentoo is a "from source" distro, that doesn't mean you always have to do that for everything on it. Sometimes using a binary is ok. ;-)
Back to top
View user's profile Send private message
cwc
l33t
l33t


Joined: 20 Mar 2006
Posts: 803
Location: Tri-Cities, WA USA

PostPosted: Sun Aug 26, 2012 11:16 pm    Post subject: Reply with quote

rockdw wrote:
My system is a 32bit setup, but I just bypassed all the compiling and grabbed the tarball from arduino.cc:

http://arduino.cc/en/Main/Software

Set up the user to be in the uucp,tty and usb groups and just ran the arduino binary in the arduino-1.0.1 directory. That has worked just fine for me with my Duemilanove and took about two minutes to set up. No fuss, no muss.

Just because gentoo is a "from source" distro, that doesn't mean you always have to do that for everything on it. Sometimes using a binary is ok. ;-)


Thanks! This is the way I run Blender. Before I tried to emerge ardhino I did the crossdev stuff. Hopefully this will not interfere with anything. Once I get things running I'll edit this post or post again.

I got the arduino running from root now I just need to build a circuit and test. /opt/arduino-1.0.1/arduino

Thanks again.
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
rockdw
n00b
n00b


Joined: 19 Sep 2003
Posts: 26

PostPosted: Mon Aug 27, 2012 1:11 am    Post subject: Reply with quote

Cool. I'll be interested to hear how it works out.

Good luck. :-)
Back to top
View user's profile Send private message
cwc
l33t
l33t


Joined: 20 Mar 2006
Posts: 803
Location: Tri-Cities, WA USA

PostPosted: Sat Sep 01, 2012 3:02 pm    Post subject: Reply with quote

rockdw wrote:
Cool. I'll be interested to hear how it works out.

Good luck. :-)


I finally got time to work with my Arduino.

Here are my groups:
azzerare ~ # groups cwc
root tty wheel uucp audio cdrom video cdrw users polkituser plugdev apache ftp cwc

I got the code to compile but when I went to upload I got this error:

Binary sketch size: 3,464 bytes (of a 32,256 byte maximum)
processing.app.SerialNotFoundException: Serial port 'COM1' not found. Did you select the right one from the Tools > Serial Port menu?

I open the application with tty and I get these errors:

^Ccwc@azzerare ~ $ /opt/arduino-1.0.1/arduino
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL

Any ideas??
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
cwc
l33t
l33t


Joined: 20 Mar 2006
Posts: 803
Location: Tri-Cities, WA USA

PostPosted: Fri Sep 07, 2012 11:40 am    Post subject: Reply with quote

rockdw wrote:
Cool. I'll be interested to hear how it works out.

Good luck. :-)


I finally got arduino to work. I downloaded the binary and just run it.

I had to recompile my kernel before I could connect to com1 though.

Now I want to set up a shield https://www.adafruit.com/products/815
Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685
This requires some special cpp code.

Thanks for the help.
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
oliv3r
n00b
n00b


Joined: 06 Jan 2013
Posts: 16

PostPosted: Sun Jan 06, 2013 11:07 pm    Post subject: Reply with quote

I've found a few posts dating back to 2009/2010 running into the same bug:

Quote:
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


It is now 2013 and I did a fresh crosscompile of avr and avr-libc. I did try arduino IDE, but prefer working with pure avr and thus using avr-gcc. Yet I also find this linker error (different .x file though for my target).

Is this a bug that needs to be fixed? Is a bug report needed? Fix 1 is a nice workaround, but is really a dirty hack. If this really is what is is needed, then why doesn't the e-build sort this? Otherwise, what is the proper way to deal with this.
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Tue Jan 08, 2013 1:50 pm    Post subject: Reply with quote

Does gentoo have an overlay for gnoduion?

http://gnome.eu.org/index.php/Gnoduino

The only things to take care are these:

Code:

 Dependencies

avr-gcc
avr-gcc-g++
avr-libc
avr-binutils
avrdude
pygtk2
gnome-python2-gconf
gnome-python2-gnomevfs
pyserial
pygtksourceview
pyxdg (python-xdg for debian)
dbus-x11
librsvg2 (librsvg2-bin for debian)


I am wary of installing trillion java deps for something as simple as arduino.

thnks
Back to top
View user's profile Send private message
oliv3r
n00b
n00b


Joined: 06 Jan 2013
Posts: 16

PostPosted: Tue Jan 08, 2013 8:40 pm    Post subject: Reply with quote

I would suppose there is an overlay.

In any case, this thread was about one of the dependencies and whether is bugged on Gentoo or flawed by design ;)

I guess if nobody can respond on this thread whether it is; i'll just open a bug report about it.
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 Previous  1, 2
Page 2 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