Overview

Software rarely works completely correctly the first time that you run it.

CoreSight technology from Arm provides solutions for debug and trace of complex SoC designs to let you investigate the operation of your code:

  • Debug lets you single-step through instructions, inspecting the values of registers and memory during program execution. Or you can set breakpoints to pause execution at particular places in your code. Debug usually involves halting execution, so it may not be appropriate for investigating dynamic problems, such as timing issues.
  • Trace provides continuous collection of system information for later analysis. Execution trace generation macrocells are optional debug components that you can integrate into your processor to produce trace output, software can be instrumented with dedicated trace generation, and some peripherals can generate performance monitoring trace streams. Because trace does not interrupt execution, it is useful for investigating dynamic problems.

Trace and debug are used together at all stages in the design flow from initial platform bringup, through software development and optimization, and even to in-field debug or failure analysis.

The following video shows how to use the trace functionality of Arm Cortex-M0 processors with Keil MDK:


Some tools are available to help you debug your software:

  • Simulation models like Cycle Models, Fast Models, and Fixed Virtual Platforms let you develop software for Arm IP even when you don't have access to hardware.
  • If you do have access to hardware, debug probes like DSTREAM and ULINK let you look inside the system that you are debugging. This means that you can collect trace information, inspect register values, and read memory locations.
  • Arm Development Studio includes Arm Debugger. The Arm Debugger helps you get to the root of software bugs throughout your development process.
  • For application development on Linux:
    • GDB (the GNU Project Debugger) is a standard debugger used by the GNU software community.
    • Arm Development Studio supports GDB-based application debugging via gdbserver for 32- and 64- bit applications.
    • Arm DDT (part of Arm Allinea Studio) is a graphical debugger for C/C++/Fortran applications running on Arm servers or Arm systems. It supports all major 64-bit Linux distributions and includes sophisticated memory debugging and highly scalable multi-process debugging.
  • For application development on Android, ADB (Android Debug Bridge) provides debug capabilities and is supported by Arm Development Studio.

 

Debug with simulation models

Simulation models like Cycle Models, Fast Models, and Fixed Virtual Platforms let you develop software for Arm IP even when you do not have access to hardware.

Debug with hardware

Arm Development Studio ships with pre-loaded debug configurations and examples for many popular devices. However, if you are designing your own SoC or are developing software for a less popular ASIC, Arm Debugger and DSTREAM debug probe can help to create a new device configuration.

Linux and Android debug

For application development on Linux or Android, it is common to use GDB (the GNU Project Debugger) or ADB (Android Debug Bridge). These methods of debug do not make a connection into the lower level CoreSight architecture of a system and instead rely on a server to allow software debug. GDB is integrated into Arm Development Studio.

Arm DDT  (part of Arm Allinea Studio) is a graphical debugger for C/C++/Fortran applications running on Arm servers or Arm systems. It supports all major 64-bit Linux distributions and includes sophisticated memory debugging and highly scalable multi-process debugging.

  • Getting Started provides a complete workflow from installation to debugging your first program with Arm DDT.
  • The DDT User Guide is a detailed manual providing information on various aspects of Arm DDT.
  • The Arm Forge video library provides a number of video tutorials to help you debug with Arm DDT.