Arduino Package Conflicts

Hey there,

Just thought I would post a note here for others who may be using the Arduino on Suse. Currently (to my surprise) there are no search results on the forum for Arduino. Heavens!

First off, check on this article over at the Suse wiki. It definitely gives some good advice on the kernel modules you need to load, and on setting permissions on the /dev/ttyUSB* device files. (Note the suggestion to add your user to the uucp group, otherwise you will have to constantly change these permissions. Annoying.)

However, I then ran into a bit of a snag the article does not cover and wanted to share it. (I’ll likely update the article too.)

The problem is in trying to use the ATmega328 Arduino with the avr packages in the repos.

You need to use avr-gcc 4.3+ in order for the Ardunio development environment to communicate with the board, otherwise you will get an error that it can’t communicate with the board, despite having the correct USB port and board model selected.

Note there are two versions in the OSS repo:



Callandor:~ # zypper search cross-avr-gcc
Loading repository data...
Reading installed packages...

S | Name            | Summary                                 | Type
--+-----------------+-----------------------------------------+--------
  | cross-avr-gcc   | The GNU C Compiler and Support Files    | package
  | cross-avr-gcc44 | The GNU C Compiler and Support Files    | package

However, if you install cross-avr-gcc44 from the Open Suse Build Service, it will un-install avr-libc! Well, you need that as it provides the C libraries you will build against.

My solution was to download avr-gcc43 and the avr-libc from a site like rpm.pbone.net or find the right versions on the Build Service site:

wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/qfix/openSUSE_11.1/i586/avr-libc-1.6.2-5.11.i586.rpm

wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/qfix/openSUSE_11.0/i586/cross-avr-gcc43-4.3.3_20090126-17.1.i586.rpm

When done, the packages and versions I have installed are:

Callandor:~ # rpm -qa | grep avr
avr-libc-1.6.2-5.11.i586
cross-avr-binutils-2.19.51-11.26.2.i586
avrdude-5.5-112.3.i586
cross-avr-gcc43-4.3.3_20090126-17.1.i586

You should now be able to both compile Arduino programs and upload then to the board!

It may be just a fluke that the gcc44 version removes the avr-libc, and it may fix itself soon - but if you don’t know this and run into it, you may find it puzzling.

Happy hacking!

Cheers,
Lews Therin

oops, I mis-stated the dependency issue. The problem is that you can install avr-gcc44, but when you try to install avr-libc it will remove cross-avr-gcc44 and install cross-avr-gcc:

(avr-libc: Version: 1.6.1-55.3)

Callandor:~ # zypper install avr-libc
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
  avr-libc cross-avr-gcc

The following package is going to be REMOVED:
  cross-avr-gcc44

2 new packages to install, 1 to remove.
Overall download size: 5.1 MiB. After the operation, 12.6 MiB will be freed.
Continue? [y/n/p/?] (y):

So, you can either download and install cross-avr-gcc43 as noted earlier, or install cross-avr-gcc44 and then force the install of a later version of avr-libc:

rpm -Uvh --nodeps avr-libc-1.6.8-12.4.i586.rpm

Either way, seems you have to take one route or the other to get what is required.

Cheers,
Lews Therin

good info, thanks!