Use XSCT command line tool to create the Vitis DFX platform.
Note: Vitis IDE support for creating Vitis DFX platforms will be added in the future.
Create a tcl file with XSCT commands.
# Create a platform project
platform create -name vck190_dfx_custom \
-desc "A custom VCK190 DFX platform" \
-hw <Static>.xsa \
-rp {id 0 hw <RP>.xsa hw_emu <HW_EMU>.xsa} \
-out <Output_Directory> \
-no-boot-bsp
# AIE domain
domain create -name aiengine -os aie_runtime -proc ai_engine
domain config -qemu-data ./boot
# Add Linux domain
domain create -name xrt -proc psv_cortexa72 -os linux -sd-dir {./sd_dir}
domain config -hw-boot-bin <PATH to Boot.bin>
domain config -boot {./boot}
domain config -generate-bif
domain config -qemu-data ./boot
platform write
platform generate
Note: Replace the file name and directory name in the script with your project file location. If you do not need to support hardware emulation, you can omit the option
-hw_emu
and its value for the commandplatform create
.
The platform create
command needs the following input values:
-name
: Platform name-hw
: Static Hardware XSA file location-rp
: The reconfigurable partition info with ID, XSA and hardware emulation XSA info. ID is reserved for multi-partition DFX. For now only one partition is supported. Please useid 0
.-out
: Platform output path. In this example, we set output directory tostep2_sw/build/pfm
.-sd-dir
: The directory that contains the files to be included in the FAT32 partition of the SD card image.
The domain
command will set up one AI Engine domain and one Linux domain. The Linux domain has SD boot mode. The DFX platform Linux domain requires you to provide the boot.bin
to boot the static region. It will use files in the ./sd_dir
directory to form the FAT32 partition of the SD card image. You have stored the required files in these directories in Prepare for Platform Packaging step.
You can pass the values to the script directly by replacing the variable with the actual value, or define them in the header of the Tcl script, or pass the value to XSCT when calling this script.
Here is an example of calling XSCT if you hard code all contents in xsct_create_pfm.tcl
.
xsct xsct_create_pfm.tcl
To support better generalization, the example Makefile and xsct_create_pfm.tcl in the ref_files
directory uses variables to represent the file names and directory location. Refer to them if you would like to get more programmability in your scripts.