Debugging Techniques For Embedded Linux Applications

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box
Tux.png Applies to Linux

Introduction[edit | edit source]

Modern Embedded Linux systems often run complex applications that require powerful tools to cope with the con resulting debugging challenge. This how-to guide aims to explain some of the most effective techniques available nowadays.

Remote Debugging with Eclipse/CDT[edit | edit source]

Most common techniques used to debug applications for embedded Linux systems are based on the famous GNU Project Debugger, better known as GDB ( Developer can run GDB on the target, if this provides enough memory. However this strategy is not very friendly because, as most of embedded systems does not provide graphical interfaces, the work must be carried on with the command line interface. Thanks to the flexibility GDB offers, developers have a second option. GDB package provides gdbserver, too. This tool is run on the target on which it controls the application to be debugged. Also it implements a TCP server. On the port on which it listens to, a remote GDB instance can connect and send commands to control the actual execution of the application, allowing remote debugging. In the case in exam, GDB is arm-linux-gdb running on the build host and developer can run on top of it graphical frontends that make his/her life much easier. This section shows how to implement such a solution to debug C applications on the target platform. As graphical frontend we will use Eclipse/CDT1. Eclipse is “open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle”. Its growing popularity makes it a de facto standard in the debugging tools arena. Please note that is not just a debugger, it is a full-featured IDE that allows to manage and build complex projects with a powerful user-friendly graphical interface.