PLEASE NOTE: This article is obsolete or related to a discontinued product.

Debugging applications on the FOX

created by Geert Vancompernolle
article written by Roberto Asquini and John Crispin
In this article you will learn how to setup your Linux PC and FOX to be able to debug applications over the network

Table of contents

  • Installing applications required to rum the debugger
  • Setting up DDD
  • Setting up the FoxBoard
  • Building you application with debug info
  • Debugging an application

Installing the needed applications

For you Linux PC to be able to debug FOX applications remotely, the following applications need to be installed
  • ddd - The Data Display Debugger, a graphical debugger frontend
  • db-cris - the actual debugger for cris executables
ddd is available on most distributions. On debian please issue the following command to install it.
$ apt-get install ddd
The next step is to install the cris debugger. Thjis is unfortunatley not part of any linux distribution. Please download it from the axis webserver. On debian you have to issue the following commands.
$ wget
$ dpkg -i gdb-cris_6.2.50-cvs20041012-2_i386.deb
In order to run the debugger it need to be in your PATH. I simply linked it to the folder /usr/bin by issuing the following command
$ ln -s /usr/local/cris/bin/gdb-cris /usr/bin/
Your linux PC now has all the needed apps installed and you can proceed to setting up DDD.

Setting up DDD

If you were to start ddd directly it would try to debug applications for the i686 architecture. we therefore need to start ddd with the following commandline parameter
$ ddd --debugger gdb-cris
To verify that the correct debugger is chosen, type "show version" in the command line interface of ddd. You should get an output like this
In order to avoid having to specify the command line parameter every time you use ddd, you can add the following line "Ddd*debuggerCommand: gdb-cris" in your ~/.ddd/init configuration file. ddd is now configure correctly to debug cris applications remotely and you can move on to setting up you FOX

Setting up the FOX

For the FOX to be able to host a debug seesion you need to compile the gdbserver into the fimag. This can be done, by running make menuconfig and choosing the "Enable GDB server support" under "Advanced Settings --> Debug Configuration". This is a screenshot of the setting.
Now you need to recompile the fimage and flash the FOX with it. After you have done this, you can move on to building a debugable application.