Download PX4 Source Code in Windows Subsystem for Linux (WSL2)
Note
This section explains the task to be completed as part of the step—Download
PX4 Source Code—of the Hardware Setup process (using the Hardware Setup
screens).
UAV Toolbox Support Package for PX4® Autopilots requires PX4 Autopilot Firmware v1.15.4.
Download PX4 Source Code from GitHub
To download the PX4 source code (PX4 Autopilot Firmware v1.15.4) on a Windows® Subsystem for Linux.
Launch the WSL2 shell.
Press the Windows Start key, type
cmd, and press Enter.Launch the WSL2 shell by running this command.
wsl
Navigate to the home directory by executing the following command.
After running this command, your terminal prompt should change to indicate that you are now in your home directory. For example:cd ~

Warning
Cloning the firmware in WSL2 home directory is crucial. If you clone it outside of the WSL file system, then you will encounter slow execution issues and access right / permission errors.
Note
Ensure that your PC is connected to an active internet connection before proceeding with the next step.
Download the PX4 source code using git.
git clone https://github.com/PX4/PX4-Autopilot.git --recursiveThe download might take several minutes to complete (depends on the internet speed).
After the firmware is cloned, run the below commands one by one in WSL2.
cd PX4-Autopilotgit checkout v1.15.4 -fgit submodule update --init --recursive
Run the following command in WSL2 to verify that the required version of PX4 Firmware (v1.15.4) is cloned.
git describe --tags
Confirm that the command outputs
v1.15.4, which indicates you have cloned the required firmware version.
After you complete this step, return to the Hardware Setup screen and continue with the next steps.