...
Clone repo
Update wsl2 stuff https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package and install a distro (do Ubuntu, makes it much easier, I was just able to run
wsl --install
and it worked)Open a Windows terminal and run
winget install usbipd
Open a WSL terminal (
wsl -d ubuntu
) and runsudo apt install linux-tools-virtual hwdata
andsudo update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools/*/usbip | tail -n1` 2
(might need to runsudo update-alternatives
before running that last command ?)If the first command produces errors, try running
sudo apt-get update
and then rerun the command
Open Docker Desktop
Open a terminal in the repo directory
Build sample STM dockerfile with
docker build -f ./Dockerfile -t ner-gcc-arm .
Note that you only have to do this once really or if the environment was updated, not every time you want to develop
Start sample STM dockerfile with
docker run --rm -it --privileged -v "$(PWD):/home/app" ner-gcc-arm:latest bash
Start the Ubuntu WSL client with
wsl -d ubuntu
in one terminal(If interacting with hardware) Mount the Raspberry Pi probe by finding the device in another Windows terminal with
usbipd wsl list
and mount the device in a Windows terminal window (with admin privileges the first time you do this) withusbipd wsl attach --distribution=ubuntu --busid=<BUSID>
...