You can run Vivado and Vitis on WSL2. One reason to do that, is that you can run the provided build scripts as is.
You 'll be able to recreate the source for the Pynq Base Vivado project, and Digilent's Vivado project for the Arty Z7 (and S7).
It 'll also allow you to build a PetaLinux image.
When you try to connect to your debugger from WSL2, you 'll notice that Vitis and Vivado only find your board, if you run the programs via sudo. There is a solution though:
prerequisite: know how to attach your USB board / debugger to WSL2: Vivado, Vitis and PetaLinux on Windows Sublayer for Linux (WSL2): attach and detach your USB debugger
The udev service should run on WSL2. This is the mechanism that will allow user level access to the USB device, according to rules.
sudo /etc/wsl.conf
[boot] command="service udev start"
Restart is not needed at this point. The service will be (re)started a bit later.
Enable rules for the device:
Most PYNQ compatible boards have an FTDI USB JTAG / COM device. You can just use the OpenOCD instructions.
Unplug the device, then from a WSL2 terminal prompt:
curl -fsSL https://raw.githubusercontent.com/openocd-org/openocd/master/contrib/60-openocd.rules | sudo tee /etc/udev/rules.d/60-openocd.rules sudo service udev restart sudo usermod -aG plugdev $USER
Plug the board into your computer, and hand the USB device over to WSL2: Vivado, Vitis and PetaLinux on Windows Sublayer for Linux (WSL2): attach and detach your USB debugger .
You are now able to start Vivado or Vitis with your normal Linux user account. The programs will be able to connect and control your FPGA.
Easiest way to test, is to open a Vivado project, and connect the hardware manager:
Happy signal:
You only need to set this up once. From now on, WSL2 will start up with these settings.