Eclipse from Box to Debug

From Gumstix User Wiki

Jump to: navigation, search

This page is meant to serve as a quickstart guide that takes you from opening an Overo + Expansion out of the Box up to Remote Debugging with Eclipse on Ubuntu.


Setting up Minicom

  1. sudo apt-get install minicom
  2. sudo minicom -s
  3. [Serial port setup] -> A - Serial Device -> /dev/ttyUSB0 -> [enter]
  4. [Serial port setup] -> F - Hardware Flow Control -> NO -> [enter]
  5. [Modem and dialing] -> A - Init String -> [empty] -> [enter]
  6. [Modem and dialing] -> B - Reset String -> [empty] -> [enter]
  7. [Modem and dialing] -> K - Hang-up String -> [empty] -> [enter]
  8. [Save as dfl]
  9. [Exit from Minicom]

Power & Boot

  1. Plug the gumstix into the expansion board
  2. Plug the expansion board into your ethernet router / switch / whatever
  3. Plug in the micro-SD
  4. Plug a mini-usb plug (as you would use with a camera) into the mini-usb port labeled console
  5. sudo minicom -o # disables modem and dialing settings
  6. Plug in the 5v power supply
  7. Watch the system boot

OpenEmbedded [OE] Toolchain on Ubuntu

Official (and Thorough) Documentation

   sudo apt-get install git-core
   mkdir -p ~/overo-oe/user.collection
   cd ~/overo-oe
   git clone git://
   git checkout --track -b overo origin/overo
   cd ~/overo-oe
   git clone git:// bitbake # just try this again if it hangs up
   cd bitbake
   git checkout 1.8.18
   cd ~/overo-oe
   cp -r .
   cp ~/.bashrc ~/bashrc.bak
   cat ~/overo-oe/build/profile >> ~/.bashrc
   source ~/overo-oe/build/profile

The important part:

   bitbake gdb-cross

Gumstix Setup

From the previous step your Gumstix should have started configuring itself and hopefully is done, leaving you at the login prompt

   passwd #(change your password)
   ifconfig # configure as necessary. I assume that your IP address is
   opkg install gdbserver

Hello World!

This is all taking place on the Ubuntu system (


   mkdir ~/overo-oe/Code/
   cd ~/overo-oe/Code/
   vim hello.c
   #include <cstdio>
   int main(int argc, char ** argv) {
     printf("Hello World!\n");


   vim Makefile
   CGTOOLS = ~/overo-oe/tmp/cross/armv7a
   # Compiler and Linker flags
   C_FLAGS += -Wall -g
   CPP_FLAGS += -Iinclude
   LD_FLAGS += -g -lm
   # compiler
   CC = $(CGTOOLS)/bin/arm-angstrom-linux-gnueabi-g++ $(C_FLAGS) $(CPP_FLAGS) -c
   LINK = $(CGTOOLS)/bin/arm-angstrom-linux-gnueabi-g++ $(LD_FLAGS)
   STRIP = $(CGTOOLS)/bin/arm-angstrom-linux-gnueabi-strip 
   .PHONY: all clean
   all: clean hello
        rm hello *.o -rf
   hello: hello.o
        $(LINK) -o hello hello.o
        cp hello hello.debug
        $(STRIP) hello
   hello.o: hello.c
        $(CC) -o hello.o hello.c


Now we'll compile the program with the debug symbols, strip the symbols, and copy it to the gumstix (

   cp ./hello ./hello.debug
   ~/overo-oe/tmp/cross/armv7a/bin/arm-angstrom-linux-gnueabi-strip ./hello
   ./hello # fails because it can't run on your architecture
   ssh-copy-id root@
   scp ./hello root@ #
   ssh root@ "/hello" # succeeds
   ssh root@ "gdbserver /hello" # starts remote gdb
   # use ctrl-z and then bg 1 to background this process, or run it from another ssh session
   ~/overo-oe/tmp/cross/armv7a/bin/arm-angstrom-linux-gnueabi-gdb --symbols ./hello.debug
   target remote


Now we can introduce a bug and test again

   mkdir ~/overo-oe/Code/
   cd ~/overo-oe/Code/
   vim hello.c
   #include <cstdio>
   int main(int argc, char ** argv) {
     printf("Hello World!\n");
     char * h;
     delete h;
     delete h;


We explore how to use eclipse.

I'm currently grokking through and


Update sites and plugins


Navigating through menus

Remote Deployment Debugging

Having it somehow all come together to this culminating point

Personal tools