ESP32 Get started install ESP-IDF on Windows

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

ESP32 Get started install ESP-IDF on Windows

Postby chromebin » Thu Apr 05, 2018 2:55 pm

I am posting this for future reference. In the reply I document the solution I arrived at.

I am trying to install a dev environment for the ESP32. I am at the step 'Get ESP-IDF' at page http://esp-idf.readthedocs.io/en/latest ... et-esp-idf

This step asks me to run:

Code: Select all

mkdir -p ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
But that fails with this message:

Code: Select all

user@DINV005 MINGW32 ~/esp/hello_world
$ git clone --recursive https://github.com/espressif/esp-idf.git
Cloning into 'esp-idf'...
fatal: unable to access 'https://github.com/espressif/esp-idf.git/': Failed to connect to github.com port 443: Connection timed out
`git` simply doesn't seem to work. `wget` also doesn't work. `wget` works on very few sites.

When I go to github and download the zip, extract it to ~/esp/esp-idf, and do `make menuconfig` it doesn't work, seems to require a .git folder. I get a .git folder if I run the `git clone` above and kill it. `make menuconfig` now runs but at some point it deletes all of the `esp-idf` folder (its way of saying "f*** you") and the final command fails..

Summary: I found no way to make the install work work in MSYS2 on Windows 10, using https://dl.espressif.com/dl/esp32_win32 ... 180110.zip.
Last edited by chromebin on Mon Apr 09, 2018 5:54 pm, edited 1 time in total.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: ESP32 Get started install ESP-IDF

Postby kolban » Fri Apr 06, 2018 12:37 pm

Looking at the error messages, I see:

Failed to connect to github.com port 443: Connection timed out

This is indicative of a fundamental networking problem. What the git command wants to do is make a network connection to the Github server, access the named project and download it's directory structure to your local PC file system. However, if your PC can't form a network connection to Github ... that would be the end of the story.

Perhaps github.com was transiently down. Try it again and see what happens. Perhaps there is a firewall or some other mechanism preventing access to that location. For example, in some businesses, they prevent access to github to prevent open source code making its way into the environment. Perhaps there is some configuration error in your "Linux on Windows wrapper".

Try and "ping github.com" and see if it responds.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

chegewara
Posts: 1211
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 Get started install ESP-IDF

Postby chegewara » Fri Apr 06, 2018 1:04 pm

Sometimes i got the same error message:

Code: Select all

fatal: unable to access 'https://github.com/espressif/esp-idf.git/': Failed to connect to github.com port 443: Connection timed out
but its enough to repeat git command or restart interface connection on linux ubuntu in VBox.

mikemoy
Posts: 479
Joined: Fri Jan 12, 2018 9:10 pm

Re: ESP32 Get started install ESP-IDF

Postby mikemoy » Fri Apr 06, 2018 5:30 pm

I was just getting ready to post this same problem when I saw this post last minute.
I am having the same issue.
Mike@DESKTOP-QPDOB55 MINGW32 ~/esp
$ git clone --recursive https://github.com/espressif/esp-idf.git
Cloning into 'esp-idf'...
1 [main] git-remote-https 2572 child_info_fork::abort: C:\msys32\usr\bin\msys-ssh2-1.dll: Loaded to different address: parent(0x2910000) != child(0x2840000)
error: cannot fork() for fetch-pack: Resource temporarily unavailable

Mike@DESKTOP-QPDOB55 MINGW32 ~/esp
Which is weird because I did all these same steps yesterday morning and worked great, Today I wanted to document the steps, and deleted everything to start over and I ran into this issue.

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: ESP32 Get started install ESP-IDF on Windows

Postby chromebin » Mon Apr 09, 2018 5:57 pm

This is the reply I intended to post immediately, but the original message got lost in moderation

The solution basically sidesteps the `git clone` command in MSYS2. Instead execute it in Windows:

- make sure the command works (`git` is installed) in Windows. I use `Git version 2.16` from the "Git Development Community".

- Open `cmd.exe`: Win+R then type "cmd.exe"

- goto the `~/esp` folder from step http://esp-idf.readthedocs.io/en/latest ... et-esp-idf

- execute `git clone --recursive https://github.com/espressif/esp-idf.git`

If some components failed to checkout:

- goto the `~/esp/esp-idf` folder

- execute `git submodule update --init`

Now the next steps should work inside the C:\msys32\mingw32.exe shell (`make menuconfig` and `make flash`).
Last edited by chromebin on Thu Apr 19, 2018 5:39 pm, edited 1 time in total.

mikemoy
Posts: 479
Joined: Fri Jan 12, 2018 9:10 pm

Re: ESP32 Get started install ESP-IDF on Windows

Postby mikemoy » Tue Apr 10, 2018 4:10 am

The exact same steps worked just fine the next morning. So all is good.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], fcampos and 36 guests