Debugging an Application Project Using the Emulator (Command-Line Flow) - 2021.2 English

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
Release Date
2021.2 English

The Vitis tool supports both a GUI and a command-line flow to debug embedded applications. This section explains how to debug an embedded application from the command line using the emulator.

  1. Source the Vitis settings.csh/ file.
  2. Launch XSCT and create an embedded application project.
  3. Build the application project and make sure the ELF file is generated successfully.
  4. Open the new terminal and move to the application project debug directory.
  5. Execute the following command to start the QEMU/emulation:
    launch_emulator -device-family 7series -pid-file -t sw_emu -gdb-port 1137
    • For Zynq devices, the-device-family argument is 7series.
    • For Zynq UltraScale devices, the -device-family argument is Ultrascale.
    • For Versal ACAP, the -device-family argument is versal.
  6. Open another terminal and run the following command to start the xrt_server:
    xrt_server -I100 -S -s tcp::4352
  7. Open XSCT and try to connect to the emulation target using the following command:
    gdbremote connect localhost:1137
  8. Run the targets command to see the list of targets present in this particular connection.
  9. Download the ELF file and proceed with further debugging.