To run the design on hardware using an SD card, you need to package all the files created. For a Linux application, you must make sure that the generated .xclbin, libadf.a, and all Linux info from the platform are in an easy to copy directory.
Open the
Makefilewith your editor of choice, and familiarize yourself with the contents specific to thepackagetask.In an easier to read command-line view, here is the command:
v++ --package --target hw --platform $PLATFORM_REPO_PATHS/xilinx_vck190_base_202520_1 /xilinx_vck190_base_202520_1.xpfm \ --package.rootfs ${ROOTFS} \ --package.kernel_image ${IMAGE} \ --package.boot_mode=sd \ --package.image_format=ext4 \ --package.defer_aie_run \ --package.sd_file host.exe \ tutorial1.xsa libadf.a
NOTE: Remember to change the
${ROOTFS}and${IMAGE}to the proper paths.Here you are invoking the packaging capabilities of
v++and defining how it needs to package your design.Switch/Flag
Description
--package.rootfsThis specifies the root file system to be used. In the case of the tutorial it is using the pre-built one from the platform.
--package.kernel_imageThis is the Linux kernel image to be used. This is also a using a pre-built one from the platform.
--package.boot_modeUsed to specify how the design is to be booted. For this tutorial, an SD card is used, and it creates a directory with all the contents needed to boot from one.
--package.image_formatTells the packager the format of the Kernel image and root file system. For Linux, this should be
ext4.--package.defer_aie_runThis tells the packager that when building the boot system to program the AI Engine, to stop execution. In some designs, you do not want the AI Engine to run until the application is fully loaded.
--package.sd_fileSpecify this to tell the packager what additional files need to be copied to the
sd_carddirectory and image.Run the command:
make package.When the packaging is complete, do an
cd ./sw && lsand notice that several new files were created, including thesd_carddirectory.Format the SD card with the
sd_card.imgfile.
When running the VCK190 board, make sure you have the right onboard switches flipped for booting from the SD card.
Insert the SD card and turn ON the board.
Wait for the Linux command prompt to be available on an attached monitor and keyboard.
To run your application enter the command:
./host.exe a.xclbin.You should see a TEST PASSED which means that the application ran successfully!
IMPORTANT: To re-run the application, you must power cycle the board.