The Vitis IDE debug environment has many features found in traditional GUI-based debug environments, such as GDB. You can add break points to the code, step over or step into specific lines of codes, loops, or functions, and examine the state of variables and force them to specific values. The AI Engine Debug view contains several windows or views as shown in the following figure.
- Control Panel
- The Debug view's Control
Panel is displayed in the upper-left corner of the
screen as shown in the image below. During debugging, you can use the control
buttons such as Continue, Step
Over, Step
Into, Step
Out, Restart, and Stop to control the debugging process. Figure 2. Debug Control Panel
- Threads
- Threads shows the related debugging threads. Threads are created and destroyed during the debugging process. You can switch between multiple threads.
- Call Stack
- Call Stack shows the function call stack being updated as the application is run.
- Variables
- Variables shows the current value of global and local variables. When switching threads, the variable information is updated.
- Watch
- Watch shows variables and expressions you have specified to watch. To add watch points select Add Expression (+).
- Breakpoints
-
Vitis IDE sets break points at the main function of the host component and at the top function of the PL kernels if they can be debugged. To add breakpoints, you can open the source file and click the left side of the line number when a red dot appears. You can remove breakpoints by clicking on a previously added breakpoint.
You can add conditional breakpoints by right-clicking when the red dot appears and select Add Conditional Breakpoint. You can also right-click and select Add Logpoint to insert a message to be logged when the breakpoint is reached.
- Source Code Editor
- The Source Code view is opened when Debug is launched from the Flow Navigator or Launch Configuration view.
- Memory Inspector
- You can manually open the Memory Inspector. The Memory Inspector displays the content of specific memory addresses.
- Register Inspector
- You can manually open the Register Inspector. The Viewing Registers shows the registers of the Cortex-A72 when a breakpoint is triggered in the Application Component source code, and the AI Engine when a breakpoint is triggered in the AI Engine kernel.
- Disassembly View
- You can open the Disassembly view from the Source Code window right-click menu.
- Debug Console
- Displays the transcript of the debug process, and any messages received from the tested application.