Compiling on Windows - Szybet/InkWatchy GitHub Wiki

Guide made by jbr929

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

  1. Close and reopen powershell as administrator
  2. Execute (powershell)
usbipd list
  1. Try to identify your watchy BUSID. For example mine was 2-2 (remember to change it) and execute:

image

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

image

How to check if its working

Execute (powershell)

wsl -u root
lsusb

Connect to WSL

  1. From VS Code select Remote host (blue icon, bottom left) -> Connect to WSL OR view -> command pallete -> and type Connect to WSL \

image

image

  1. You should now see WSL: Ubuntu
    image

Clone and compile

  1. Clone the Repository, you can follow this tutorial here: https://www.youtube.com/watch?v=ILJ4dfOL7zs
    image
    image
    image
    Press ok

  2. Open the repo
    image

  3. Reopen in Container (bottom right)
    image

  4. Choose default (middle up)
    image

  5. Make sure the required extensions are installed/installing
    image

  6. Wait for everything to install and press Reload Now (bottom right)
    image

  7. Press Compile (bottom left) and select 2 First build
    image
    image

  8. After everything is finished (don`t worry, it might take some time), you can now use PlatformIO interface and buttons

  9. Upload
    image
    If your device is not found go back to Passthrough Usb Connection

  10. Press Resources / Filesystem (bottom left) and select 1 Generate Resources. After its done go back and select 2 Flash Filesystem
    image
    image

  11. Thats it, enjoy your inkwatchy and continue reading the wiki.