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.