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

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

Document ID
UG1400
Release Date
2021-12-15
Version
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/settings.sh 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 emulation.pid -t sw_emu -gdb-port 1137
    Note:
    • 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.