Host Code Migration - 2021.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
ft:locale
English (United States)
Release Date
2021-12-15
Version
2021.2 English

The XILINX_XRT environment variable is used to specify the location of the XRT library environment and must be set before you compile the host code. When the XRT library environment has been installed, the XILINX_XRT environment variable can be set by sourcing the /opt/xilinx/xrt/setup.csh, or /opt/xilinx/xrt/setup.sh file as appropriate. Secondly, ensure that your LD_LIBRARY_PATH variable also points to the XRT library installation area.

To compile and run the host code, source the <INSTALL_DIR>/settings64.csh or <INSTALL_DIR>/settings64.sh file from the Vitis installation.

If you are using the GUI, it will automatically incorporate the new XRT library location and generate the makefile when you build your project.

However, if you are using your own custom makefile, you must use the XILINX_XRT environment variable to set up the XRT library.

  • Include directories are now specified as: -I${XILINX_XRT}/include and -I${XILINX_XRT}/include/CL
  • Library path is now: -L${XILINX_XRT}/lib
  • OpenCL library will be: libxilinxopencl.so, use -lxilinxopencl in your makefile