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.
- Source the Vitis settings.csh/settings.sh file.
- Launch XSCT and create an embedded application project.
- Build the application project and make sure the ELF file is generated successfully.
- Open the new terminal and move to the application project debug directory.
- 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 is7series
. - For Zynq
UltraScale devices, the
-device-family
argument isUltrascale
. - For Versal ACAP, the
-device-family
argument isversal
.
- For Zynq devices,
the
- Open another terminal and run the following command to start the
xrt_server
:xrt_server -I100 -S -s tcp::4352
- Open XSCT and try to connect to the emulation target using the following
command:
gdbremote connect localhost:1137
- Run the
targets
command to see the list of targets present in this particular connection. - Download the ELF file and proceed with further debugging.