You can use the Vitis Unified IDE's debug environment to add breakpoints, step over or step into lines of codes, loops, or functions, examine and set variables.
The Debug view shows the states of cores that are under debug. These states include where the debugger stops at and what action it is taking (for example, breakpoint or step-over).
In the following figure, the square with a check mark indicates that you enabled a breakpoint. Click the check mark to disable the breakpoint. You can manage breakpoints without needing to remove them or add them back into the code.
main() by default.
Breakpoints attached to a while statement consume
two breakpoint resources. A workaround is to attach the breakpoint inside the
while loop, resulting in consumption of one
breakpoint.In the source-level debugger, you can trace the source variables that the tool allocates to memory or registers. Tracing allows you to visualize location and contents. The following conditions can lead to difficulty in tracing variables.
- Local scalar variables typically reside in registers. Different variables at different points in the execution can lead to difficulty in tracing.
- Variables you allocate to memory that do not automatically update can lead to difficulty in tracing. For example, you can load a global variable in registers in front of a loop.
- Stepping through the source code can be difficult when you scatter a line across the eventual object code.