book icon indicating copy to clipboard operation
book copied to clipboard

Flashing from with WSL is also possible

Open lure23 opened this issue 2 years ago • 4 comments

It's not much more troublesome than flashing from Windows.

  • Both need the CP210x driver to be installed
  • Instead of flashing tools, the usbip-win USB/IP server needs to be installed

WSL has usbip within it, and the two are intended to work together. I would add a mention about this to the "Troubleshooting" section:

-build inside WSL and only flash the compiled MCU ELF file from outside of WSL.
+build inside WSL and only flash the compiled MCU ELF file from outside of WSL. A third is to use USB/IP to show the development board within WSL itself, and flash it from there <sub>[ESP32-WSL](https://github.com/lure23/ESP32-WSL)</sub>. Pick your poison.

Should I send this as a PR? Is it too much to have the repo link included?

lure23 avatar Jan 02 '24 19:01 lure23

Maybe we could add a note saying that it's possible, but I don't think we should cover it in too much detail, maybe just add the note with a link.

SergioGasquez avatar Jan 04 '24 10:01 SergioGasquez

Then should I just proceed and file a PR with the diff above?

On details - absolutely not. There are already a bit too many different ways to flash a board and it's kinda confusing. But I think for WSL users being able to flash from within that environment is the smoothest way, and worth mentioning.

lure23 avatar Jan 04 '24 18:01 lure23

I see that there are different methods: https://blog.golioth.io/usb-support-in-wsl2-now-with-a-gui/?hss_channel=tw-1348350211681251328

SergioGasquez avatar Jan 24 '24 13:01 SergioGasquez

That blog post shows two GUI's to control the USB/IP.

Hopefully they help the remaining Windows devs who prefer something graphical over using the commandline

I did not know such exist - but... I don't see that as being very essential. The auto-attach feature was mentioned, and that is potentially useful. Haven't used that one, either.

lure23 avatar Jan 25 '24 10:01 lure23