-
-
Save astrolemonade/53f5d756b28c97091c368d9fc3fcdbd5 to your computer and use it in GitHub Desktop.
Revisions
-
abobija revised this gist
Aug 5, 2022 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `sudo apt update && sudo apt upgrade -y` - Install tools required for esp-idf<br> `sudo apt install -y git wget curl flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0` - Make python3 as default python<br> `sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1` @@ -49,7 +49,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `echo -e '\n\n. $HOME/esp/esp-idf/export.sh > /dev/null 2>&1 || true' >> ~/.profile` - Install **idfx** ( [**?**](https://github.com/abobija/idfx) )<br> `curl https://git.io/JyBgj --create-dirs -L -o $HOME/bin/idfx && chmod u+x $HOME/bin/idfx` - Source profile script to add all necessary tools to the PATH<br> `. ~/.profile || true` -
abobija revised this gist
Aug 3, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `sudo apt update && sudo apt upgrade -y` - Install tools required for esp-idf<br> `sudo apt install -y git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0` - Make python3 as default python<br> `sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1` -
abobija revised this gist
Aug 21, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `sudo apt update && sudo apt upgrade -y` - Install tools required for esp-idf<br> `sudo apt install -y git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0` - Make python3 as default python<br> `sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1` -
abobija revised this gist
Dec 5, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ [WSL2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) still [does not support USB devices](https://github.com/microsoft/WSL/issues/4322), but with a little effort we can make possible to flash and monitor ESP device from WSL2. > **Info:**<br>Tested on [Ubuntu 20.04 LTS](https://www.microsoft.com/en-us/p/ubuntu-2004-lts/9n6svws3rx71) and [Debian](https://www.microsoft.com/en-us/p/debian/9msvkqc78pk6) distributions. For flashing and monitoring over the serial COM port, I've wrote this compact [idfx](https://github.com/abobija/idfx) shell script. @@ -21,7 +21,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command ## Commands :scroll: ### Installation :rocket: - Update Linux<br> `sudo apt update && sudo apt upgrade -y` - Install tools required for esp-idf<br> -
abobija revised this gist
Dec 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -52,7 +52,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `wget https://raw.githubusercontent.com/abobija/idfx/main/idfx -O $HOME/.local/bin/idfx && chmod u+x $HOME/.local/bin/idfx` - Source profile script to add all necessary tools to the PATH<br> `. ~/.profile || true` ### Create (a copy of hello_world) project :page_facing_up: -
abobija revised this gist
Dec 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,7 +49,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `echo -e '\n\n. $HOME/esp/esp-idf/export.sh > /dev/null 2>&1 || true' >> ~/.profile` - Install **idfx** ( [**?**](https://github.com/abobija/idfx) )<br> `wget https://raw.githubusercontent.com/abobija/idfx/main/idfx -O $HOME/.local/bin/idfx && chmod u+x $HOME/.local/bin/idfx` - Source profile script to add all necessary tools to the PATH<br> `. ~/.profile` -
abobija revised this gist
Dec 5, 2020 . 1 changed file with 3 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,18 +24,15 @@ Ok, that was short intro, now you can open WSL and start to execute next command - Update Ubuntu<br> `sudo apt update && sudo apt upgrade -y` - Install tools required for esp-idf<br> `sudo apt install -y git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util` - Make python3 as default python<br> `sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1` - Make pip3 as default pip<br> `sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1` - Make esp directory and go inside<br> `cd ~ && mkdir esp && cd esp` -
abobija revised this gist
Dec 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1` - Install tools required for esp-idf<br> `sudo apt install -y git wget flex bison gperf python python-pip python-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util` - Make esp directory and go inside<br> `cd ~ && mkdir esp && cd esp` -
abobija revised this gist
Nov 29, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,7 +49,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `. ./install.sh || true` - Add esp-idf export script to the user profile script in order to make isp-idf tools visible on the PATH for every session<br> `echo -e '\n\n. $HOME/esp/esp-idf/export.sh > /dev/null 2>&1 || true' >> ~/.profile` - Install **idfx** ( [**?**](https://github.com/abobija/idfx) )<br> `curl -L https://raw.githubusercontent.com/abobija/idfx/main/idfx -o $HOME/.local/bin/idfx && chmod u+x $HOME/.local/bin/idfx` -
abobija revised this gist
Nov 24, 2020 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,6 @@ ## Demo [](https://www.youtube.com/watch?v=eQ0D8pnZTSY) ## Intro -
abobija revised this gist
Nov 24, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ ## Demo YouTube: [](https://www.youtube.com/watch?v=eQ0D8pnZTSY) ## Intro -
abobija revised this gist
Nov 24, 2020 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,11 @@ # ESP-IDF on WSL2 - Build, Flash and Monitor :zap: ## Demo [](https://www.youtube.com/watch?v=eQ0D8pnZTSY) ## Intro [WSL2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) still [does not support USB devices](https://github.com/microsoft/WSL/issues/4322), but with a little effort we can make possible to flash and monitor ESP device from WSL2. > **Info:**<br>Tested on [Ubuntu 20.04 LTS](https://www.microsoft.com/en-us/p/ubuntu-2004-lts/9n6svws3rx71) distribution. -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,7 +48,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command - Install **idfx** ( [**?**](https://github.com/abobija/idfx) )<br> `curl -L https://raw.githubusercontent.com/abobija/idfx/main/idfx -o $HOME/.local/bin/idfx && chmod u+x $HOME/.local/bin/idfx` - Source profile script to add all necessary tools to the PATH<br> `. ~/.profile` ### Create (a copy of hello_world) project :page_facing_up: -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,7 +49,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `curl -L https://raw.githubusercontent.com/abobija/idfx/main/idfx -o $HOME/.local/bin/idfx && chmod u+x $HOME/.local/bin/idfx` - Run profile script to add all necessary tools to the PATH<br> `. ~/.profile` ### Create (a copy of hello_world) project :page_facing_up: -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,15 +42,15 @@ Ok, that was short intro, now you can open WSL and start to execute next command - Run esp-idf installation script<br> `. ./install.sh || true` - Add esp-idf export script to the user profile script in order to make isp-idf tools visible on the PATH for every session<br> `echo -e "\n\n. $HOME/esp/esp-idf/export.sh > /dev/null 2>&1 || true" >> ~/.profile` - Install **idfx** ( [**?**](https://github.com/abobija/idfx) )<br> `curl -L https://raw.githubusercontent.com/abobija/idfx/main/idfx -o $HOME/.local/bin/idfx && chmod u+x $HOME/.local/bin/idfx` - Run profile script to add all necessary tools to the PATH<br> `. ~./.profile` ### Create (a copy of hello_world) project :page_facing_up: - Make a copy of hello_world example project in home directory<br> -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -79,7 +79,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command `idfx monitor COM2`<br> <sub>(To exit monitor press `CTRL+]` or `CTRL+T`,`X`)</sub> > **Tip:**<br>Flash and monitor with single command:<br>`idfx flash COM2 monitor` <br> That's it.<br> -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -77,7 +77,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command - Monitor<br> <sup>(change `COM2` with your port)</sup><br> `idfx monitor COM2`<br> <sub>(To exit monitor press `CTRL+]` or `CTRL+T`,`X`)</sub> > **Note:**<br>Flash and monitor with single command:<br>`idfx flash COM2 monitor` -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -77,7 +77,6 @@ Ok, that was short intro, now you can open WSL and start to execute next command - Monitor<br> <sup>(change `COM2` with your port)</sup><br> `idfx monitor COM2`<br> <sup>(To exit monitor press `CTRL+]` or `CTRL+T`,`X`)</sup> > **Note:**<br>Flash and monitor with single command:<br>`idfx flash COM2 monitor` -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -78,7 +78,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command <sup>(change `COM2` with your port)</sup><br> `idfx monitor COM2`<br> <br> <sup>(To exit monitor press `CTRL+]` or `CTRL+T`,`X`)</sup> > **Note:**<br>Flash and monitor with single command:<br>`idfx flash COM2 monitor` -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -78,7 +78,7 @@ Ok, that was short intro, now you can open WSL and start to execute next command <sup>(change `COM2` with your port)</sup><br> `idfx monitor COM2`<br> <br> <sup>To exit monitor press `CTRL+]` or `CTRL+T`,`X`</sup> > **Note:**<br>Flash and monitor with single command:<br>`idfx flash COM2 monitor` -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # ESP-IDF on WSL2 - Build, Flash and Monitor :zap: [WSL2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) still [does not support USB devices](https://github.com/microsoft/WSL/issues/4322), but with a little effort we can make possible to flash and monitor ESP device from WSL2. -
abobija revised this gist
Nov 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -88,7 +88,7 @@ Happy coding and flashing! :zap: <br> <br>  ## Author -
abobija created this gist
Nov 23, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,95 @@ # ESP-IDF on WSL2 - Build, Flash and Monitor [WSL2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) still [does not support USB devices](https://github.com/microsoft/WSL/issues/4322), but with a little effort we can make possible to flash and monitor ESP device from WSL2. > **Info:**<br>Tested on [Ubuntu 20.04 LTS](https://www.microsoft.com/en-us/p/ubuntu-2004-lts/9n6svws3rx71) distribution. For flashing and monitoring over the serial COM port, I've wrote this compact [idfx](https://github.com/abobija/idfx) shell script. > **Note:**<br>As a prerequisite for using `idfx`, [Python :snake:](https://www.python.org) needs to be installed on the Windows. More about `idfx` you can find in [official repository](https://github.com/abobija/idfx). Ok, that was short intro, now you can open WSL and start to execute next commands. ## Commands :scroll: ### Installation :rocket: - Update Ubuntu<br> `sudo apt update && sudo apt upgrade -y` - Make python3 as default python<br> `sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1` - Install python3-pip<br> `sudo apt install -y python3-pip` - Make pip3 as default pip<br> `sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1` - Install tools required for esp-idf<br> `sudo apt install -y git wget flex bison gperf python-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util` - Make esp directory and go inside<br> `cd ~ && mkdir esp && cd esp` - Clone esp-idf repository<br> `git clone --recursive https://github.com/espressif/esp-idf.git` - Modify esp-idf installation script to work with WSL<br> `cd esp-idf && ! grep -q "dirname --" install.sh; [ $? -eq 0 ] && sed -i 's/dirname/dirname --/g' install.sh` - Run esp-idf installation script<br> `. ./install.sh || true` - Run esp-idf export script<br> `. ./export.sh || true` - Add esp-idf export script to the user profile script in order to make isp-idf tools visible on the PATH for every session<br> `echo -e "\n\n. $HOME/esp/esp-idf/export.sh > /dev/null 2>&1 || true" >> ~/.profile` - Install **idfx** ( [**?**](https://github.com/abobija/idfx) )<br> `curl -L https://raw.githubusercontent.com/abobija/idfx/main/idfx -o $HOME/.local/bin/idfx && chmod u+x $HOME/.local/bin/idfx` ### Create (a copy of hello_world) project :page_facing_up: - Make a copy of hello_world example project in home directory<br> `cd ~ && cp -r $IDF_PATH/examples/get-started/hello_world .` ### Build, flash and monitor :zap: - Go inside of project<br> `cd hello_world` - Set target<br> `idf.py set-target esp32` - Configure<br> `idf.py menuconfig` - Build<br> `idf.py build` - Flash<br> <sup>(open Device Manager on Windows to find COM port of your ESP, mine is `COM2`)</sup><br> `idfx flash COM2` - Monitor<br> <sup>(change `COM2` with your port)</sup><br> `idfx monitor COM2`<br> <br> To exit monitor press `CTRL+]` or `CTRL+T`,`X` > **Note:**<br>Flash and monitor with single command:<br>`idfx flash COM2 monitor` <br> That's it.<br> Happy coding and flashing! :zap: <br> <br>  ## Author [abobija](https://github.com/abobija) - [abobija.com](https://abobija.com)