With the Software Emulation build complete, you can
use the following steps to debug the system. This process will launch a new terminal
that will allow for gdb
commands to be used, as well as visual of the
files for code stepping.
- Launch QEMU emulator environment using launch_sw_emu.sh script that is generated during the
v++ --package
process. - Using a specific command-line option,
-kernel-dbg
and set it totrue
. - Specify the kernels, PL or AI Engine kernels.
- To launch the emulation environment with debug use the following
command from your build
directory.
./emulation/launch_sw_emu.sh -kernel-dbg true
Where,
- ./emulation is the output directory of the packaging process.
-
-kernel-dbg true
will setup the emulator to rungdb
at the execution of the application.
- Run the following commands in the QEMU shell once you see the
qemu%
prompt.export LD_LIBRARY_PATH=/mnt/sd*1:/tmp:$LD_LIBRARY_PATH export XCL_EMULATION_MODE=sw_emu export XILINX_XRT=/usr
- Run the PS application. For example,
./host.exe a.xclbin
.This will start running the host application and launchgdb
in a separate terminal. Here you can do all the debug activities such as, breakpoint, next (step), and continue on PL kernels and AI Engine kernels.Note: To get a textual user interface ofgdb
, select with Ctrl + X, Ctrl + A.