Advanced Debug Toolbar (ADT) Functions

ADT provides advanced debug features not available in the base CodeBlocks IDE engine. By collecting these features in a separate more modern-looking UI window, the CodeBlocks IDE becomes less cluttered.


On the Windows Task Bar, ADT uses a Ladybug icon:




The top row of icons control program execution, mirroring the toolbar icons on the CodeBlocks IDE. ADT also uses the same keyboard shortcuts as the CodeBlock IDE’s control.


There are five “views” in ADT. The second row of icons is used to select the display, from left to right:


1.    Core (CPU) Register View

2.    Code View

3.    Peripheral (I/O Register) View

4.    Memory View

5.    Simple Trace View


Each view is displayed as a tabbed window under the ADT control bar by default, or each can be “torn off” to be its own floating window.



Core (CPU) Register View

This displays the CPU registers, which is useful for low-level debugging.

Code View

This displays the assembler code of the current program location, interspersed with C source code if available. You can use the ADT toolbar icon to step (over) to the next assembler or C instruction, or step into a function call.

Peripheral (I/O Register) View

This is one of the most useful features that makes use of the MCU’s powerful peripheral systems when debugging a program. It allows you to examine the content of the I/O registers.


A peripheral subsystem typically has multiple I/O registers associated with it. The peripheral view displays the peripheral list alphabetically. The contents of the I/O registers are only updated when you expand that peripheral’s view by clicking on the + control next to the name of the peripheral. Additional controls are available by right-clicking to invoke the popup menu:


·         Hide peripheral: this removes this peripheral from the project’s ADT session. This is useful for de-cluttering the display if the peripheral is not being used in this project.

·         Show hidden peripherals: this shows all the peripherals.

·         Expand multiple peripherals. As it is resource-intensive to obtain the values of the I/O registers, ADT by default only allows one peripheral to be expanded at a time. Selecting this disables that behavior.


If single stepping is slow to execute, be sure to collapse as many non-interesting I/O registers as possible, or deselect this option.


Typically, an I/O register content is broken into different sets of bits. The debugger obtains the register content descriptions through vendor-provided XML or SVD files and displays the content accordingly.

Memory View

This displays the content of data (SRAM) memory in a variety of formats.

Simple Trace or "Poor Man’s" Trace

"Simple Trace" captures the assembly instructions that you step through, and optionally captures the values of the CPU registers prior to the execution of each instruction. This allows you to determine the program flow in detail. For example, you may perform a series of program step-throughs, and then need to trace back and see why the program runs certain way.


In the "Trace View" window, you can save and load Trace Memory to a file, clear the trace memory, and control which CPU registers are saved during a trace. Loading trace memory from a file allows you to re-examine the data afterward.