ESP32 Flashing in WSL

Having trouble getting your ESP32 flashed in WSL? Here are some tips.

ESP32 Flashing in WSL

Something I figured out whilst trying to get my esp32 development environment up and running in WSL.

Use WSL1. Currently WSL2 does not have serial pass-through support. If you use WSL1, windows COMx devices will be available as /dev/ttySx.

Install the correct CP210x driver. You need the slightly older v6.7.6 series driver from here. You want the version without serial enumeration. The newer driver, which windows picks up automatically does not work with WSL correctly.

Specify a baud rate whilst flashing. You can add -b 115200 to the command. Otherwise it will try to flash at too fast a rate and it will not work.