Building the System
In the SDSoC™ environment, the sds++ compiler builds both the main application (.elf) and
the hardware accelerated functions (bitstream for the PL region). In the simple example,
the command line for compiling the main() function
and mmult hardware function would be as follows:
sds++ -Wall -O0 -g -I"../src" -c -fmessage-length=0 -MT"src/mmult.o" -MMD \
-MP -MF"src/mmult.d" -MT"src/mmult.o" -o "src/mmult.o" "../src/mmult.cpp" \
-sds-hw mmult mmult.cpp -sds-end -sds-sys-config a53_linux -sds-proc \
a53_linux -sds-pf "zcu102"
From this single command, the sds++ command
processes the sds-hw block to compile the mmult
function, and later links the main.o object file to
build the target application, main.elf. Finally, it
produces the sd_card folder with the appropriate
files required to boot and run the application.
In the Vitis environment, the compilation of the hardware kernels and the main application are performed by two separate compilers.
- The host program is compiled by the GNU Arm® cross-compiler,
g++, as discussed in Compiling and Linking for Arm. - The hardware kernels are compiled and linked using the Vitis compiler. Refer to Compiling Kernels with Vitis Compiler and Linking the Kernels for more information.