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
- Using a specific command-line option,
-kernel-dbgand set it to
- Specify the kernels, PL or AI Engine kernels.
- To launch the emulation environment with debug use the following
command from your build
./emulation/launch_sw_emu.sh -kernel-dbg true
- ./emulation is the output directory of the packaging process.
-kernel-dbg truewill setup the emulator to run
gdbat the execution of the application.
- Run the following commands in the QEMU shell once you see the
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 launch
gdbin 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 (TUI) of
gdb, enable with Ctrl+x Ctrl+a.