3.Compile the A72 Host Application - 2023.2 English

Vitis Tutorials: AI Engine

Document ID
Release Date
2023.2 English

Note: Unlike the software emulation where we used a g++ compiler to compile the host application, you use Arm cross-compiler aarch64-xilinx-linux-g++ in hardware emulation. If you have exercised the software emulation step, please make sure to setback the SYSROOT and CXX variables as mentioned in the Introduction.

To compile the A72 host application, run the command:

make host


cd ./sw

aarch64-xilinx-linux-g++ -Wall -c -std=c++14 -Wno-int-to-pointer-cast --sysroot=$SDKTARGETSYSROOT -I$SDKTARGETSYSROOT/usr/include/xrt -I$SDKTARGETSYSROOT/usr/include -I./ -I../aie -I$XILINX_VITIS/aietools/include -I$XILINX_VITIS/include -o main.o .cpp

aarch64-xilinx-linux-g++ main.o -lxrt_coreutil -L$SDKTARGETSYSROOT/usr/lib --sysroot=$SDKTARGETSYSROOT -L$XILINX_VITIS/aietools/lib/aarch64.o -o host.exe
cd ..

For more details about the GCC options being used, refer to Section 3 topic - Compile the A72 Host Application.