View previous topic :: View next topic |
Author |
Message |
andrewwalker27 l33t
Joined: 27 Jun 2005 Posts: 660
|
Posted: Tue Jun 26, 2012 1:09 pm Post subject: |
|
|
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 |
|
|
yngwin Retired Dev
Joined: 19 Dec 2002 Posts: 4572 Location: Suzhou, China
|
Posted: Wed Jul 04, 2012 9:29 am Post subject: |
|
|
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 |
|
|
shimbob Tux's lil' helper
Joined: 13 Sep 2003 Posts: 140
|
Posted: Thu Jul 12, 2012 4:07 am Post subject: sabayon-distro overlay wrecks things |
|
|
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 |
|
|
cwc Veteran
Joined: 20 Mar 2006 Posts: 1386 Location: Tri-Cities, WA USA
|
Posted: Sun Aug 26, 2012 1:46 pm Post subject: !!! All ebuilds that could satisfy "dev-embedded/uisp&a |
|
|
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 |
|
|
rockdw n00b
Joined: 19 Sep 2003 Posts: 26
|
Posted: Sun Aug 26, 2012 8:45 pm Post subject: |
|
|
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 |
|
|
cwc Veteran
Joined: 20 Mar 2006 Posts: 1386 Location: Tri-Cities, WA USA
|
Posted: Sun Aug 26, 2012 11:16 pm Post subject: |
|
|
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 |
|
|
rockdw n00b
Joined: 19 Sep 2003 Posts: 26
|
Posted: Mon Aug 27, 2012 1:11 am Post subject: |
|
|
Cool. I'll be interested to hear how it works out.
Good luck. |
|
Back to top |
|
|
cwc Veteran
Joined: 20 Mar 2006 Posts: 1386 Location: Tri-Cities, WA USA
|
Posted: Sat Sep 01, 2012 3:02 pm Post subject: |
|
|
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 |
|
|
cwc Veteran
Joined: 20 Mar 2006 Posts: 1386 Location: Tri-Cities, WA USA
|
Posted: Fri Sep 07, 2012 11:40 am Post subject: |
|
|
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 |
|
|
oliv3r n00b
Joined: 06 Jan 2013 Posts: 16
|
Posted: Sun Jan 06, 2013 11:07 pm Post subject: |
|
|
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 |
|
|
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Tue Jan 08, 2013 1:50 pm Post subject: |
|
|
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 |
|
|
oliv3r n00b
Joined: 06 Jan 2013 Posts: 16
|
Posted: Tue Jan 08, 2013 8:40 pm Post subject: |
|
|
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 |
|
|
qwerty013 n00b
Joined: 22 Jan 2009 Posts: 19 Location: Kharkov, Ukraine
|
Posted: Fri Apr 21, 2017 12:28 pm Post subject: 2017 update |
|
|
For Arduino UNO 2017 update
First, prepare local overlay:
Code: | sudo mkdir /usr/local/portage
sudo mkdir /usr/local/portage/profiles
sudo touch /usr/local/portage/profiles/repo_name
echo "my_arduino" > /usr/local/portage/profiles/repo_name
sudo vim /etc/portage/make.conf
add 'PORTDIR_OVERLAY="/usr/local/portage"' |
Second, do kernel, group and crossdev stuff like here: https://wiki.gentoo.org/wiki/Arduino
But don't forget to compile crossdev (gcc) with c++ USE flag:
Code: | USE="-openmp -hardened -sanitize -vtv cxx" crossdev -s4 -S --target avr |
Kernel modules that worked for me: ch341,ftdi_sio (details at wiki page)
Third, workaround for gentoo bug 147155 ('ld' for avr cannot find linker script 'avr5.x'):
Code: | ln -s /usr/lib/binutils/avr/2.20.1/ldscripts /usr/avr/lib/ldscripts |
Fourth, workaround for "cannot find crtatmega328p.o":
You need to accept_keyword and install cross-avr/avr-libc-2.0.0.
In my case, there was auto-created file, where I placed ~x86 before the avr-libc
Code: | vim /etc/portage/package.keywords/cross-avr
sudo emerge -pv cross-avr/avr-libc |
Fifth, udev and groups tweaks:
http://www.arduino.org/learning/getting-started/arduino-ide-on-linux-based-os
STEPS 1,2,6
UPD: due to arduino site fcukup and according to my bad memory:
1, 2 - download and extract arduino IDE
6 - ??? run install script, probably (according to current arduino guideline you need to add yourself to 'dialout' group)
7 - PROFIT
Last edited by qwerty013 on Tue Sep 12, 2017 2:09 pm; edited 2 times in total |
|
Back to top |
|
|
qwerty013 n00b
Joined: 22 Jan 2009 Posts: 19 Location: Kharkov, Ukraine
|
Posted: Fri Apr 21, 2017 1:07 pm Post subject: |
|
|
And two more tweaks.
To fix IDE menu font problem:
run before IDE launching
Code: | export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on" |
To fix editor font problem:
Change string in ~/.arduino/preferences.txt
Code: | editor.font=Consolas,bold,14 |
PS: I didn't succeed in 'external editor thing'
UPD: you can write code in your beloved editor, compile it with avr-gcc and upload with avrdude, without IDE at all.
Good example: https://balau82.wordpress.com/2011/03/29/programming-arduino-uno-in-pure-c/
"/usr/share/arduino/hardware/tools/avrdude.conf" - official IDE's avrdude options
avr-gcc flags could be found in terminal stdout, from where you started arduino IDE and tried to compile something.
Last edited by qwerty013 on Tue Sep 12, 2017 2:09 pm; edited 1 time in total |
|
Back to top |
|
|
andrewwalker27 l33t
Joined: 27 Jun 2005 Posts: 660
|
Posted: Fri May 05, 2017 8:05 pm Post subject: |
|
|
When you state
Quote: | compile gcc with c++ |
do you mean cross-avr/gcc or sys-devel/gcc?
It now looks like cross-avr/gcc cross-avr/binutils cross-avr/avr-libc are all obsolete, masked or removed from portage though crossdev still exists, do I only need crossdev now?
The wiki page seems a bit out of date. |
|
Back to top |
|
|
qwerty013 n00b
Joined: 22 Jan 2009 Posts: 19 Location: Kharkov, Ukraine
|
Posted: Tue Sep 12, 2017 12:50 pm Post subject: |
|
|
andrewwalker27 wrote: | When you state
Quote: | compile gcc with c++ |
do you mean cross-avr/gcc or sys-devel/gcc?
|
I meant "run this string of code":
Code: | USE="-openmp -hardened -sanitize -vtv cxx" crossdev -s4 -S --target avr |
It will compile cross-avr/gcc and other things for arm crossdev toolchain. I just emphasized 'cxx' use flag.
Quote: | It now looks like cross-avr/gcc cross-avr/binutils cross-avr/avr-libc are all obsolete, masked or removed from portage though crossdev still exists, do I only need crossdev now?
The wiki page seems a bit out of date. |
Yes, you need to emerge only crossdev. I am using 'sys-devel/crossdev-20160602-r1' |
|
Back to top |
|
|
|