Note, if you are going to use Visual Studio Code then you can let its Espressif plugin handle installing ESP-IDF – see here
Espressif guides
https://docs.espressif.com/projects/esp-idf/en/stable/get-started/
Setting up a Windows PC to program the ESP32
Create the required GNU-compatible environment with toolchain (the programs to compile and build your applications)
Download the Windows all-in-one toolchain from https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/windows-setup.html
Use the Universal installer.
Pre-installation system check
If the Apply Fixes button is enabled, let the installer apply the fixes it needs and then re-check your system setup.
Selecting software packages
Ensure ESP-IDF is selected
Once installation is complete
ESP-IDF x.x CMD
Windows start menu and desktop will have a new “ESP-IDF x.x CMD” shortcut added.
Opens the Command Prompt and sets up all the required environment variables.
ESP-IDF x.x PowerShell
Windows start menu and desktop will have a new “ESP-IDF x.x PowerShell” shortcut added.
Opens PowerShell and sets up all the required environment variables.
Examples
Will be located in: C:\Espressif\frameworks\esp-idf-vX.X.X\examples
Important notes
- The ESP-IDF build system does not support spaces in the paths to projects.
Where things are installed
C:\Users\YOUR_USERNAME\.espressif\
C:\Espressif\
Path to Python
C:\Espressif\python_env\idfX.X_pyX.X_env\Scripts\python.exe
C:\Espressif\frameworks\esp-idf-vX.X.X\tools\idf.py
Updating Packages
Updating ESP-IDF
See “Updating ESP-IDF” on this page: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/