Notes About Working with Various Arduino & Netduino Microcontroller Boards

Wednesday, May 27, 2015

Installing the gdb Debugger on an Arduino Galileo (Clanton)

My previous post pointed out that the gcc compiler can be installed used opkg on an Arduino Galileo running Clanton (and booting from an SD card so there is room). I wasn't able to install the C/C++ gdb debugger using opkg, though.

Download the gdb Source Code

With the gcc compiler installed, though, it is possible to download the source and build gdb for the Galileo.  You can find the source code in the GNU Project Archives.  Just be sure to unzip and untar the source in a directory on the SD card so that you'll have enough room.


gdb needs ncurses.  I installed the ncurses, ncurses-dev, and ncurses-terminfo packages via opkg.

The first time that I tried to compile gdb, the build process terminated prematurely with an error because the ar utility didn't work correctly.  Rather than using the version of ar that comes with BusyBox, use a soft link (or the update-alternatives utility) so that ar points to the version of ar in the /usr/i586-poky-linux-uclibc/bin/ directory.

With these pieces in place, I was able to run configure, make, and make install.  The build process took more than a couple hours, so you won't want to be in a hurry.

I should note that the build process did end with an error with a message telling me that makeinfo is missing, but that didn't impact the building and running of the program.

No comments:

Post a Comment