Compiling on Windows - Szybet/InkWatchy GitHub Wiki
Guide made by jbr929
Notes
- If you get an error "Command not found" or something like that, you might need to execute all the commands found here, after "RUN" (Without the run): https://github.com/Szybet/InkWatchy/blob/master/resources/tools/other/compile/Dockerfile
- If you still get those errors:
- You might want to follow the "compile directly in linux terminal" guide but in your wsl terminal, skipping the docker initialisation steps.
- If you still (so in the terminal) get errors about command not found (Like pio, cargo, rustup etc.) try this command, then try again:
export PATH="$PATH:$HOME/.platformio/penv/bin:$HOME/.cargo/bin"
Prerequisites
Make sure you have WSL2 installed and running
https://learn.microsoft.com/en-us/windows/wsl/install
Latest usbipd-win
https://github.com/dorssel/usbipd-win/releases
VS Code extensions:
Remote Development with the extention pack
https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack
Install Python interpreter for PlatformIO
Open terminal and execute: (powershell)
wsl -u root
apt install python3-venv -y
Passthrough Usb Connection
https://learn.microsoft.com/en-us/windows/wsl/connect-usb
- Close and reopen powershell as administrator
- Execute (powershell)
usbipd list
- Try to identify your watchy BUSID. For example mine was 2-2 (remember to change it) and execute:
usbipd bind --busid 2-2
usbipd attach --wsl --busid 2-2
If you get usbipd: error: There is no WSL2 2 distribution"](usbipd: error: There is no WSL2 2 distribution running;
or similar, open ubuntu and try again
How to check if its working
Execute (powershell)
wsl -u root
lsusb
Connect to WSL
- From VS Code select Remote host (blue icon, bottom left) -> Connect to WSL
OR
view -> command pallete -> and type Connect to WSL \
- You should now see
WSL: Ubuntu
Clone and compile
-
Clone the Repository, you can follow this tutorial here: https://www.youtube.com/watch?v=ILJ4dfOL7zs
Press ok -
Open the repo
-
Reopen in Container (bottom right)
-
Choose
default
(middle up)
-
Make sure the required extensions are installed/installing
-
Wait for everything to install and press
Reload Now
(bottom right)
-
Press
Compile
(bottom left) and select2 First build
-
After everything is finished (don`t worry, it might take some time), you can now use PlatformIO interface and buttons
-
Upload
If your device is not found go back to Passthrough Usb Connection -
Press Resources / Filesystem (bottom left) and select
1 Generate Resources
. After its done go back and select2 Flash Filesystem
-
Thats it, enjoy your inkwatchy
$${\color{red}Attention: \space To \space customise \space the \space firmware, \space enable \space features,}$$
wiki page $${\color{red}also \space for \space sure \space read \space this}$$ important part
$${\color{red}follow \space this}$$Now continue to other wiki pages (on the bar on the right) for further guidance or contact me directly for questions