Skip to content

XSCT

Warning

XSCT is deprecated as of Vivado 2024.2. Depending on what XSCT is being used for, vitis or sdtgen should be used instead.

Running TCL scripts through XSCT

Source

The first argument after xsct can be a TCL file:

xsct script.tcl [args]

Creating device tree overlays from hardware platform files

You will need to have a .xsa file for the FPGA platform that you want a device tree for.

createdts
    -compile -overlay -zocl \
    -platform-name $platform_name \
    -hw $path_to_xsa_file \
    -out $path_to_output_directory

Note: Downloads

This command will git clone the device-tree-xlnx repository into the requested output directory.

Tip: Without downloads

You can use --local-repo to provide an existing clone of that repository if you need to do this on an air gapped system, or need to make changed.

Tip: Output directory

Create a dedicated output directory as this makes a lot of files.

Tip: If you encounter errors with xsct

If you have to run this more than once, to avoid any weird errors:

  • Close xsct.
  • Delete the output directory between runs.
  • Restart xsct.

The generated pl.dtsi will then need to be compiled with dtc:

source /path/to/xilinx/vivado/settings64.sh  # to get the correct `dtc` into PATH
dtc -@ -O dtb \
    -o "$path_to_output_directory/$platform_name/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo" \
    "$path_to_output_directory/$platform_name/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi"

Note

-@ adds the symbols to the device tree.

This will be needed for any AXI IP in the FPGA to be visible in userspace.