While there is no support for USB devices on WSL2 for now, this tool comes to help you to flash and monitor ESP-IDF and ESP8266_SDK applications on the WSL2.
Info:
Tested on Ubuntu 20.04 LTS and Debian distributions.
Note:
As a prerequisite for using this tool, Python 🐍 needs to be installed on the Windows.
idfx COMMAND [PORT]
COMMAND
sbuild
- Build the project (alias foridf.py build
).flash
- Flash the project.monitor
- Display serial output.all
- Build project, flash and monitor serial output.erase_flash
- Erase the entire flash content.
PORT
- Serial COM Port on the Windows. Use Device Manager to find your port.
Execute next command inside of your WSL to install idfx
wget https://raw.githubusercontent.com/abobija/idfx/main/idfx -O $HOME/.local/bin/idfx && chmod u+x $HOME/.local/bin/idfx
idfx supports:
- ESP-IDF version 4.0 and above
- ESP8266_SDK version 3.0 and above
Command | Description |
---|---|
idfx build |
Building project (alias for idf.py build ) |
idfx flash COM2 |
Flashing project using port COM2 |
idfx monitor COM2 |
Display serial output on the port COM2 |
idfx all COM2 |
Build project, flash and monitor serial output, using port COM2 |
idfx flash COM2 monitor |
Flash project and display serial output, using port COM2 |
idfx erase_flash COM2 |
Erase the entire flash, using port COM2 |