An In-Depth Look at the Features of DS-5 Debugger
Making the Toughest Part of Debugging Better
When your first silicon arrives from the foundry, bringing up a new device can be a costly race against time. Our tools have been used extensively within ARM and across many of our partners to make this part of device development easier.
The DS-5 IDE provides utilities such as the Platform Configuration Editor (PCE), which uses JTAG for auto-detection of your platform. Whilst modern SoCs will usually require some extra manual configuration, the initial scan will usually uncover several of the debug and trace elements, giving you a head start.
For cross-triggers, trace generators, sinks and fabric, as well as your own custom IP, we provide an abstraction layer called the Debug and Trace Services Layer (DTSL), which allows you describe these elements with simple Jython scripts.
However, if you're using an off-the-shelf part, it is likely that there is already a pre-built debug configuration in DS-5. This makes the majority of debugging a case of simply connecting to your target board.
Processor and Peripheral Control
Easy to Follow Register Views
We have made sure that DS-5 Debugger offers access into banked registers, system control coprocessor (CP15) registers and peripheral registers in a way that replicates the ARM Architecture Reference Manual.
When using DS-5 Debugger, you can specify these registers by their names, for example R13_fiq, making it intuitive to access a variety of memory classes.
Using address modifiers, you can access a specific type of memory, for instance, if you type S:0x0, the debugger will read the memory at address 0x0 in TrustZone secure mode.
These prefixes can be used to load symbols, set breakpoints, view/modify the content of memory and report the current stopped state.
|Address Modifiers in DS-5 for ARMv7 and AArch32|
|P:||Physical memory (MMU disabled)|
|S:||TrustZone secure mode|
|N:||TrustZone non-secure mode|
|Debug Access Port interfaces to memory|
|APB:||Advanced Peripheral Bus|
|AHB:||AMBA High-Performance Bus|
|AXI:||Advanced Extensible Interface|
|AArch64 address modifers|
|EL1N:||Exception Level 0/1 non-secure mode|
|EL1S:||Exception Level 0/1 secure mode|
|EL2:||Exception Level 2, for hypervisor|
|EL3:||Exception Level 3, for TrustZone monitor|
MMU View and Address Translation
To perform MMU page table walks, see an overview of the virtual memory map and translate between virtual and physical addresses, you can access the MMU view in DS-5 Debugger.
Custom Peripheral Registers
To allow DS-5 Debugger to access custom peripheral register views, we provide the Target Configuration Editor. This provides a visualization of the peripheral stack, which can be useful when there is a complex set of peripherals on your device.
Export Custom Configurations
Once your target is configured, you can export your settings in a CMSIS-SVD compatible format, allowing you to work with Keil MDK.
Breakpoints and Watchpoints
Full Control of DS-5 Debugger
With maximum control over hardware, software and conditional breakpoints, DS-5 Debugger helps you to eliminate complex bugs.
Conditional breakpoints can be set to stop execution when a C-like expression evaluates to true, allow multiple hits before the breakpoint triggers or run debugger scripts, whilst thread and virtual machine-specific breakpoints can be used to stop the processor when hit from a specific thread.
The type and number of breakpoints you can set depends on the memory region, hardware support in the processor, debug interface and running state.
Similarly, you can also set watchpoints, which monitor the address or value of a data access, rather than instructions executed from a specific address.
Trace in DS-5 is extremely powerful, giving you a non-intrusive way to sort out hard-to-find bugs when it's simply not practical to stop and start a core repeatedly.
To cope with the complex trace topologies of modern systems, DS-5 allows you to set and configure trace start, stop and trigger points.
In DS-5 Debugger, tracepoints can be set from the ARM assembly editor, C/C++ editor, disassembly view, functions view, memory view or trace view.
Debug and Trace Collaboratively
Breakpoints, tracepoints and watchpoints can all be exported for use in a different DS-5 workspace, helping you to debug code as a team.
Making Multicore Easy
More Cores Doesn't mean Greater Complexity
DS-5 was designed with complex SoC development in mind, so multicore debugging is extremely intuitive. Either regard the system as a whole, or rapidly test execution on an individual core.
Selecting a CPU, thread or call stack frame couldn't be easier in DS-5; just click in the debug control view and watch the other debug views automatically update to reflect your choice. DS-5 supports both this standard use case (of symmetric multiprocessing), as well as more complex operating modes.
Cortex-M, Cortex-A, Custom IP and Classic ARM cores
Many SoCs combine an application processor with simpler Cortex-M series MCUs for functions such as power management. This setup, known as asymmetric multiprocessing allows you to achieve as much as possible with a single chip.
DS-5 Debugger can connect to them all of the cores at once, giving you a full system view and greatly speeding up your debug process. This was pioneered for the complex SoCs found in smartphones, but benefits you with off-the-shelf devices such as the Freescale Vybrid VF6xx family, which pairs up a Cortex-A5 and Cortex-M4.
You'll find comprehensive support for big.LITTLE in DS-5 Debugger. Cores are identified as big or LITTLE in the debug control view, whilst the state of individual cores is clearly marked. Switch execution between big and LITTLE cores just as you would in any other multicore system, making the most of ARM's leading technology without increasing complexity.
For users of ARM's Versatile™ Express or FVPs, we provide a range of debug configurations, so that you can choose to operate in big.LITTLE mode or simply as a standard multicore/multicluster application processor.
DS-5 is tightly integrated with Linux, visualizing threads and processes as well as resources. From the first time you use DS-5, you can quickly launch a Linux application debug session with one of our included examples.
Many of our examples are also configured so that they can be launched via gdbserver, meaning you can experiment with the included models before moving to your own development boards.
It's easy to add new files to the filesystem of your model or development board with DS-5 using the Remote System Explorer (RSE). Just establish an SSH or FTP connection in DS-5 and you'll be able to navigate through the filesystem of your target.
As ARM-powered devices are being used more and more for server and client computing, UEFI on ARM has become a great solution to control the boot process.
It can be a daunting task to port UEFI, so we've added support in DS-5 Debugger, meaning you can debug all phases of the UEFI control flow at source level.
With support for a range of commonly used RTOSs and the ability to add custom RTOS support, DS-5 gives you as much flexibility with real-time systems as it does with Linux and Android.
We've worked closely with each RTOS vendor to offer visibility into interrupts, semaphores and task queues.
Powerful Debug Tools for your Applications
Debugging the Linux kernel and user space applications in DS-5 is made easy thanks to the OS awareness (see above). For user space application debug, we provide Application Rewind, which adds reversible debugging. By taking snapshots during program execution, Application Rewind allows you to recreate the steps that have led up to any point in execution history, so you can step back through your code.
When you encounter tricky bugs in Linux applications, especially ones that are hard to reproduce reliably, Application Rewind can prove to be a lifeline. Simply run back to the bug and in minutes you could have solved what might have taken weeks.
A Smarter Workspace
Features to make debugging quicker and easier
Debugging from the Command Line and Scripting
Right at the center of the debug perspective, you'll find the Commands View, giving you a familiar way of debugging from the command line.
For projects where it's necessary to drive DS-5 Debugger purely from the command line, you can work outside of the Eclipse environment completely. We know that this is still a popular way to debug, so provide a DS-5 Command Prompt to give you quick access.
You'll also find Jython scripting in several other areas of DS-5, including the DTSL scripting that makes it easy to define custom target configurations.
Keep track of data as it changes
The System Views provided in DS-5 give you a simple way to see at-a-glance when data changes. Recent changes in data can be excellent clues when debugging your code, so having these to hand can significantly cut the time it takes to find difficult bugs.
Hit F1 to bring up the integrated contextual help in DS-5, which will explain the functionality of a particular Eclipse view and give examples. This is great for exploring DS-5, but becomes a seriously useful tool when trying to solve complex debugging problems.
Newer versions of Eclipse give you the Quick Access search box, helping you find a view or function related to a particular query. This saves time, especially when you're first using DS-5.
C Expressions Everywhere
DS-5 Debugger allows you to write C-like expressions anywhere, including in the content of registers, memory addresses, breakpoints and Expressions View. With this kind of consistency, there's no need to switch your thinking to another language. This approach also gives you significant control.
The Expressions View enables you to add expressions that you use regularly or that you want to examine in more detail. You can also freeze the view to stop it from being updated by a running target.
Replicate Earlier Sessions
To help you or your colleagues recreate a particular debug session, we've made it easy to export the complete set of steps from your debug session via the history view. These are converted to a script, automating the whole process when it comes to reaching the same point in your code.
For cases where you might be using an MCU as part of your SoC, you can carry out Flash programming from the DS-5 Commands view. The command flash can be used, followed by the addresses to start and stop writing to. The underlying algorithms are compatible with Keil MDK, so porting across support for a particular MCU is simple.
Memory Fill & Dump
Similarly, to write a pattern of bytes to memory, or dump memory content, you can use the commands memory fill and memory dump, where the start and end address can be entered as addresses or expressions.