setup esp32

How to Setup ESP32 on Windows using ESP-IDF and CMake

Use this step by step procedure to install the ESP-IDF development framework on your Windows 10. Keep in mind that Espressif does a great job of keeping up their documentations. This is just as a reference if you need to just make sure that you are taking the right steps.

Step 1: Download esp-idf-tools-setup-2.2.exe

https://dl.espressif.com/dl/esp-idf-tools-setup-2.3.exe

Step 2: Install esp-idf-tools-setup-2.2.exe

2.1 – Right-click on the .exe file and Run as Administrator

2.2 – Setup Wizard: Accept the agreement

2.3 – Select Python 3.7

If Python 3.7 is not already detected in your system, then the Setup Wizard will automatically ask you to select the Python version to download and setup.

2.4 – Select Git version

Again, same idea here. If you have Git already installed, then this step should already be completed for you. If not, then select the Install Git <version #> and the Wizard will automatically install and setup Git on your system.

2.5 – Download ESP-IDF

If you do not have ESP-IDF downloaded, which most likely you do not have it downloaded if its your first time setting up ESP32. Then go ahead and select Download ESP-IDF.

2.6 – Select ESP-IDF version

  • Use v4.0 for prototyping
  • Use v3.3.2 for production – since this is the stable version with the least amount of issues

2.7 – Select the installation folder

Preferably in C:\Users\<user-name>\.espressif

NOTE: ESP-IDF Tools DOES NOT support any spaces in the directory! Make sure there are no spaces or else the setup will have some weird results.

2.8 – Complete installation and select Run ESP-IDF

Step 3: Run hello_world sample to test the setup

3.1 – Make a new directory in your user folder named esp

Run the following command

C:\Users\%user-name% > mkdir esp

3.2 – Copy hello_world from get-started folder into your newly created esp folder

Run the following commands

C:\Users\%user-name% > cd esp
C:\Users\%user-name%\esp > xcopy /e /i %IDF_PATH%\examples\get-started\hello_world hello_world

3.3 – Build the hello_world example

C:\Users\%user-name%\esp > cd hello_world
C:\Users\%user-name%\esp\hello_world > idf.py build

3.4 – Connect the ESP32 device and find the port number

  • Search for Device Manager
  • Expand the Ports (COM & LPT)
  • Take down the port number for your connected device, most likely it would say something like USB to UART Bridge (COM#). You need the COM#

3.5 – Flash the ESP32

Run the following command (make sure to replace the “#” with your actual port number obtained from step 3.4.

idf.py -p COM# flash

3.6 – Monitor the Serial output of the ESP32 device

Run the following command (remember to replace the “#” with your own port number from step 3.4).

idf.py -p COM# monitor

3.7 – Your final output

Your serial monitor should look like this:

You are all done!

Please follow us and comment if you have any questions. We will be posting more tutorials and How-To’s so we can all build IoT devices.

How To's , , , , , , , , ,

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: