Linux Debugging Overview

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

This article is intended to give the reader a general overview of the debugging tools or methods available at the each of the major software layers: User space, Kernel space and Boot-loader space. A brief description of the characteristics of these three spaces is offered under each corresponding section.

Contents

User Space

The user space layer is where most of the customization or product differentiation software resides. In Linux, as in most high-level operating systems, multiple applications often written by different developers can co-exists and run at the same time; therefore, in order to avoid contention for hardware resources, applications access hardware via pre-defined software driver APIs as opposed directly (improves portability of application to another hardware platform with slightly different hardware). Similarly, user space applications cannot access physical memory directly, but rather access memory via virtual memory pointer; this virtual to physical memory conversion and vice-versa is taken care of by the Virtual Memory Manager (VMM) software module which resides in the kernel space.

Debugging Tools:

  • DDD : Data Display Debugger (DDD) is a popular open source graphical front end to GDB. To find out more information on using DDD, you can read the DDD Manual. In addition, this App Note gives a brief introduction on using DDD with one of our platforms (DM6446 EVM); however, the steps described in the App Note can easily be extended to other DaVinci and OMAP platforms.
  • DevRocket IDE: DevRocket is a commercial IDE available from MontaVista. Once a user purchases the correct License from MontaVista, the user typically gets access to MV Zone software update site where they can download the DevRocket software as well as the necessary documentation. In addition, MontaVista's online MELD community is a great source of support for this tool.


Kernel Space

This layer normally contains all the software drivers which abstract the hardware resources (memory, peripherals…) from the user space applications. Most of the software drivers adhere to an industry standardized APIs (e.g. V4L2 for capture, driver, ALSA for audio, I2C, USB….), hence the driver developer writers abide by these APIs; in the rare cases where there is no standardized industry API for a particular hardware peripheral, then the kernel developer can define their own API and provide corresponding documentation. Unlike user space software, kernel software is not restricted from accessing physical memory directly. Also, in addition to drivers which control the hardware, the kernel also includes software modules which implement various operating system managers (e.g. VMM discussed in previous section) and file-system types (EXT3, JFFS, YAFFS2…).

Debugging tools

Boot-loader

The boot-loader software is likely much smaller than the kernel or user space software; its goal is to initialize the basic (or minimal) hardware necessary to upgrade software, load the kernel and eventually user space software. This can be challenging to debug since only basic hardware is initialized at this point and hence many of the useful utilities available at the kernel and user space are not present. Some vendors include some basic diagnosis utilities, but these are very vendor specific and not covered here. Fortunately, the need to customize boot-loader is minimal and changes are often straight-forward; therefore, most users should not need to deal with debugging boot-loader at all.

Debugging Tools:

  • BDI2000 : This is a very popular choice for debugging ARM processors; you can find more information here
  • XDS510/560 series: These family of JTAGs are available from various vendors such as Blackhawk and Spectrum Digital and can be used to debug both ARM and DSP on TI processors. More details at: XDS510 and XDS560. There is also a low cost product line called XDS100.
Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox