Notes About Working with Various Arduino & Netduino Microcontroller Boards

Wednesday, May 27, 2015

Installing the gcc Compiler on an Arduino Galileo Running Clanton

I posted yesterday about a problem I ran into in trying to get the tools to cross-compile C code to run on my first-generation Arduino Galileo.  As the previous post indicates, I fixed the problem and am now able to compile C programs in a Linux environment so that they run on Clanton.  I should have dug a bit deeper, though...

It turns out that it is quite possible to get the gcc compiler and tools that run on the Galileo.  AlexT's Galileo and Edison Pages has a post about configuring opkg so that you can install the required packages.

When trying to install gcc, I found that I did need to pay attention to AlexT's note and use the command opkg install --force-overwrite uclibc before continuing.  After installing the binutils, gcc, gcc-symlinks, and libgcc-s-dev, I can compile C programs right on the Galileo without needing to cross-compile on another platform. (As noted in my post yesterday, I boot my Galileo from an SD card using the Clanton image provided by Intel).

There are also packages available for g++.

Note (05/30/2015): The OS image for download at includes development tools, but I find that image is too small (in terms of disk space) to be useful. Until I successfully build a custom image using the Yocto tools, I find it easier to use the older image (uClibc microSD card image) and add gcc.

No comments:

Post a Comment