Compiling the PS Application Source Code - 2023.2 English

Vitis Tutorials: AI Engine

Document ID
Release Date
2023.2 English

You now need to compile your PS host application (main_partial.cpp or main_full.cpp) and the additional source code your PS host applications need. The source code is stored in the baremetal_src/ folder. This bare-metal PS host application only controls the PL kernels, so you do not need to compile the aie_control.cpp file in this design.

Compile the main_partial.cpp file using the following command:

aarch64-none-elf-g++ -c -Wall -O0 -g -mcpu=cortex-a72 -MMD -MP \
                     -I=build/vck190_baremetal/psv_cortexa72_0/standalone_domain/bsp/psv_cortexa72_0/include  \  
                     -o build/main_partial.o main_partial.cpp

In this step, you need to include the BSP include files from the generated platform. This command creates a build/main_partial.o object. The same options are used when compiling the main_full.cpp file.

Next, compile the helper source code stored in the baremetal_src/*.cpp files. Below is an example of how to compile the dlbf_din.cpp file. The rest of the baremetal_src/*.cpp files are compiled the same way.

aarch64-none-elf-g++ -c -Wall -O0 -g -mcpu=cortex-a72 -MMD -MP \
                     -I=build/vck190_baremetal/psv_cortexa72_0/standalone_domain/bsp/psv_cortexa72_0/include \   
                     -o build/dlbf_din.o baremetal_src/dlbf_din.cpp

This step creates a build/*.o object for each file in the baremetal_src/*.cpp.