- Clone the Vitis AI
repository:
$ cd ~ $ git clone --recurse-submodules https://github.com/Xilinx/Vitis-AI - Install the cross-compilation system
environment.
$ cd Vitis-AI/setup/mpsoc $ ./host_cross_compiler_setup.shNote: The ~/petalinux_sdk_2022.1 path is recommended for the installation. Regardless of the path you choose for the installation, make sure the path has read-write permissions. In this section, it is installed in ~/petalinux_sdk_2022.1.Note: For VAI 2.5, the VCK190 production board is based on the 2022.1 release. Use the following commands to install the cross-compiler.$ cd Vitis-AI/setup/vck190 $ ./host_cross_compiler_setup.sh - When the installation is complete, follow the prompts and execute the
following
command:
$ source ~/petalinux_sdk_2022.1/environment-setup-cortexa72-cortexa53-xilinx-linuxIf you close the current terminal, you need to re-execute the above instructions in the new terminal interface.
- To compile the library sample in the Vitis AI Library, take
classificationfor example, execute the following command.$ cd ~/Vitis-AI/examples/Vitis-AI-Library/samples/classification $ bash -x build.shThe executable program is now produced.
- To modify the library source code, view, and modify them under ~/Vitis-AI/src/Vitis-AI-Library.
Before compiling the Vitis AI libraries, confirm the compiled output path. The default output path is $HOME/build.
To change the default output path, modify the build_dir_default in cmake.sh. For example, you can change from build_dir_default=$HOME/build/build.${target_info}/${project_name} to build_dir_default=/workspace/build/build.${target_info}/${project_name}.
Note: If you want to modify thebuild_dir_default, it is suggested to modify$HOMEonly. - Build the libraries all at once by executing the following
command.
$ cd ~/Vitis-AI/src/Vitis-AI-Library $ ./cmake.sh --cleanAfter compiling, you can find the generated libraries in the build_dir_default location. If you want to change the compilation rules, check and change the
cmake.shin the library directory.Note: All the source codes, samples, demos, and header files can be found in the~/Vitis-AI/tools/Vitis-AI-Librarylocation.
Use the following steps to set up the
host for Edge device development.