Installing ESP-IDF.

frankie53
Posts: 3
Joined: Sat Jan 21, 2023 11:03 am

Installing ESP-IDF.

Postby frankie53 » Sat Jan 21, 2023 11:14 am

Having seen comparisons of ESP32 against Arduino I decided to go the ESP32 route. Great except I have spent 3 days try unsuccessfully to install and get working ESP-IDF. I have tried all the alleged fixes I have so far discovered but none of them seem to work. All I ever get is that damned "failed with error code -2" message. I'm beginning to wonder If I have made a mistake and would have been better off going with Arduino.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Installing ESP-IDF.

Postby ESP_Sprite » Sun Jan 22, 2023 1:08 am

Are you simply venting or do you want help? Because if you want us to help you, you'll need to provide a bit more information: OS, versions, how are you trying to install ESP-IDF, are you using an IDE etc etc.

karunt
Posts: 94
Joined: Sat Apr 03, 2021 7:58 am

Re: Installing ESP-IDF.

Postby karunt » Mon Jan 23, 2023 4:02 am

Best way to install ESP-IDF is to use VSCode. Follow the instructions provided in this link: https://github.com/espressif/vscode-esp ... install.md. If you get stuck, let us know where you got stuck and what error messages you're getting so we can help you accordingly.

RichPiano
Posts: 123
Joined: Mon May 18, 2020 2:51 pm

Re: Installing ESP-IDF.

Postby RichPiano » Mon Jan 23, 2023 7:19 am

Don't worry it took me a few days as well. Here's the big picture:

1) Download the esp-idf git repo
2) Install using install.bat (or install.sh when on linux) from the repo directory -> this will install the "toolchain" (compiler, cmake and such).

I would recommend to set environment variables IDF_PATH (where you cloned your repo) and IDF_TOOLS_PATH beforehand. I have mine set to C:/dev/esp/esp-idf and C:/dev/esp/.espressif respectively.

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Installing ESP-IDF.

Postby ESP_Roland » Mon Jan 23, 2023 8:27 am

I'd like to point out that the official and supported way to install ESP-IDF on Windows is the Windows Installer: https://docs.espressif.com/projects/esp ... -installer

Running the scripts manually and setting environment variables are not recommended - this can lead to issues which are very hard to identify and solve.

As for Vscode + ESP-IDF, https://github.com/espressif/vscode-esp ... install.md is the way to go as it was already linked earlier.

karunt
Posts: 94
Joined: Sat Apr 03, 2021 7:58 am

Re: Installing ESP-IDF.

Postby karunt » Mon Jan 23, 2023 3:49 pm

Curious - for Windows, what's a better approach? Using Windows Installer or VS Code? Or are both equally good and it really depends on whether user wants to develop in the VS Code environment or using the ESP-IDF shell?

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

Re: Installing ESP-IDF.

Postby mbratch » Mon Jan 23, 2023 4:00 pm

ESP_Roland wrote:
Mon Jan 23, 2023 8:27 am
I'd like to point out that the official and supported way to install ESP-IDF on Windows is the Windows Installer: https://docs.espressif.com/projects/esp ... -installer
This is the way I install it (on Windows), after having tried other methods, and it works great for me. I use both VS Code and Eclipse environments. After installing using the Windows installer, I just point to that installation in the VS Code and Eclipse plugin setups. I also have the option of using the command line tools in PowerShell or Command prompt if desired (which I do occasionally).

frankie53
Posts: 3
Joined: Sat Jan 21, 2023 11:03 am

Re: Installing ESP-IDF.

Postby frankie53 » Tue Jan 24, 2023 5:43 am

In response to ESP_Sprite, both of the above. My OS is windows 10, I have not installed an IDE (do I need to?"
Capture.JPG
Capture.JPG (43.3 KiB) Viewed 6122 times
, I go to this page https://dl.espressif.com/dl/esp-idf/ and attempt to install using this package "Universal Online Installer 2.18, Windows 10, 11, Size:4MB". I follow exactly the instructions presented and leave every setting at default and the response I get is "Installation has failed with exit code -2".

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Installing ESP-IDF.

Postby ESP_Roland » Tue Jan 24, 2023 6:03 am

frankie53, if you have the log from the installer then please submit an issue here: https://github.com/espressif/idf-installer/issues

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

Re: Installing ESP-IDF.

Postby mbratch » Tue Jan 24, 2023 11:21 am

frankie53 wrote:
Tue Jan 24, 2023 5:43 am
In response to ESP_Sprite, both of the above. My OS is windows 10, I have not installed an IDE (do I need to?"
No, you don't have to install an IDE.
I go to this page https://dl.espressif.com/dl/esp-idf/ and attempt to install using this package "Universal Online Installer 2.18, Windows 10, 11, Size:4MB". I follow exactly the instructions presented and leave every setting at default and the response I get is "Installation has failed with exit code -2".
I have not tried the "universal" installer. I used the Offline installer for the specific ESP-IDF version I wanted (they offer 4.4.3 and 5.0).

Who is online

Users browsing this forum: No registered users and 264 guests