Skip to content

Instantly share code, notes, and snippets.

@xanderificnl
Last active March 29, 2023 23:05
Show Gist options
  • Save xanderificnl/a087576f452cef1ce8c4b43b57ab7a6d to your computer and use it in GitHub Desktop.
Save xanderificnl/a087576f452cef1ce8c4b43b57ab7a6d to your computer and use it in GitHub Desktop.
Flashing ESP* via WSL2

Getting "Access Denied" when trying to flash from Windows? Same here, no application was communicating with the device and my prompt was elevated.

I ended up installing https://github.com/dorssel/usbipd-win and flashing from WSL, i.e.:

$ esptool --before default_reset --after hard_reset --baud 115200 --chip esp8266 --port /dev/ttyUSB0 write_fl
ash 0x0 ./tasmota.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: -snip-
Enabling default SPI flash mode...
Configuring flash size...
Auto-detected Flash size: 4MB
Erasing flash...
Flash params set to 0x0340
Took 3.09s to erase flash block
Wrote 648192 bytes at 0x00000000 in 64.0 seconds (81.1 kbit/s)...

Leaving...
Hard resetting via RTS pin...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment