esp-rs / book

The Rust on ESP Book
https://esp-rs.github.io/book/
Apache License 2.0
177 stars 54 forks source link

Flashing from with WSL is also possible #135

Open lure23 opened 10 months ago

lure23 commented 10 months ago

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

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?

SergioGasquez commented 10 months ago

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.

lure23 commented 9 months ago

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.

SergioGasquez commented 9 months ago

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

lure23 commented 9 months ago

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.