Command Line Debug Flow - 2022.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2022-12-07
Version
2022.2 English
Tip: Set up the command shell or window as described in Setting Up the Vitis Environment prior to running the tools.

The following describes the steps required to run the debug flow in software emulation from the command line. Refer to Using the Vitis IDE for information on debugging in the IDE. Debugging in the Vitis core development kit uses the following steps:

  1. Compiling and linking the host code for debugging by adding the -g option to the g++ command line as described in Building the Software Application.
  2. Compiling and linking the kernel code for debugging by adding the -g option to the v++ command line as described in Building the Device Binary.
    Note: When debugging OpenCL kernels, there are additional steps that you can take during compiling and linking as described in Debugging OpenCL Kernels.
  3. Launching GDB to debug the application. There are currently two flows supporting debug during software emulation:
    1. Debugging PL or AI Engine kernels using the kernel-dbg option as explained in Software Emulation Debug for Embedded Processors, or Software Emulation Debug for Alveo Accelerators. This is a simple flow, but only enables debugging of the kernels in the .xclbin, and not the host application.
    2. Debugging the host application and PL kernels using three command terminals and xrt_server as described in Launching Host and Kernel Debug. This is a more complex flow, but supports concurrent debug of both the host and kernels.