The Vitis IDE lets you open the debug tool for projects that have been built using the command line flow.
Launching Standalone Debug for Embedded Platforms
The standalone debug flow supports both the embedded processor
application acceleration flow (
the embedded processor software development flow (
embedded). For embedded platforms, the application is running on the
Arm processor of the device, the files
that are required to boot the system, and load the application and kernel, are on a
remote system, but the debug tools are running on the local system, and the data and
reports generated need to be moved from the embedded system to the local system. The
process for debugging in that environment requires more setup and configuration.
embedded_accel flow is a two-step process.
- You must first launch the QEMU emulator environment using
the launch_sw_emu.sh or the launch_hw_emu.sh script, that is generated
- Then you must launch the Vitis IDE in standalone debug mode using the
To run standalone debug in the Vitis IDE for the
you must first launch the QEMU emulator environment using the launch_hw_emu.sh script, that is generated during
The files required for emulation of the system are also defined by
--package command. This means that launching
the standalone debug process for embedded platforms is reliant on the output of the
package process, including the emulation script. An example command to launch the
emulation environment would include the following.
launch_hw_emu.sh -pid-file emulation.pid -no-reboot -forward-port 1440 1534 \
- Opens two different command shells to launch QEMU and XSIM, and enables the GDB connection to the QEMU shell.
- Forwards the TCP port from target to host for connecting
to the QEMU shell. The QEMU port default is 1440. You can change it if
necessary, for example, to 1446, but you must specify it for both the
launch_emulationcommand or script and in the
vitis -debugcommand line.
- Exit the QEMU environment when done.
- Write the process ID to the specified file, used to kill the process, if necessary.
For hardware emulation, this launches two terminal windows running the QEMU system mode, and the Vivado simulator for simulating the PL kernel.
After the terminals and emulation are up and running, you can launch the Vitis IDE in standalone debug mode in a separate command shell:
vitis -debug -flow embedded_accel -target hw_emu -exe vadd.elf \
-program-args vadd.xclbin -kernels vadd
- Launches the Vitis IDE in standalone debug mode.
- Specifies the application acceleration flow on an embedded processor platform.
- Indicates the target build being debugged.
- Indicates the executable application to run and debug.
- Specifies the .xclbin file to be loaded as an argument to the executable.
The default for embedded systems
searches for the executable and the .xclbin
file, and any other required input files, on the /mnt folder of the emulation environment, or the embedded system.
You can change this by specifying the
-target-work-dir when launching the tool. This launches the Vitis IDE with the Debug perspective enabled, running a
debug configuration for the specified executable application and kernel code. From
this point you can do all the debug activities like step in/step over/viewing
variables/adding break points within the GUI-based debug environment.
Launching Standalone Debug for Data Center Platforms
Launching standalone debug for Data Center applications is a bit simpler. In this case, you need to identify the build target and the executable to run and debug. The Data Center platforms do not require an emulation environment.
The following example launches the Vitis standalone debug for the
data_center flow targeting the software emulation build. It specifies
the executable, host.exe, which is looked for
in the current directory, and specifies the kernel to debug.
vitis -debug -flow data_center -target sw_emu -exe host.exe -kernels krnl_vadd
By default, the standalone debug flow looks in the current
directory for specified files and to write results. You can specify the
-work-dir option to indicate a different working
directory from the default. This might be necessary when the .xclbin file is built in a different directory.
This launches the Vitis IDE with the Debug perspective enabled, letting you perform debug activities like step in/step over/viewing variables/adding break points within the GUI-based debug environment.