ESP32 Building the Windows Development environment (official method)

Source: Internet
Author: User
Tags git client idf

First of all to ensure that the computer has downloaded the Git client, no self- https://git-scm.com/download

STEP1: Get the Build Toolchain

Windows does not have a built-in "make" environment, so you will need a GNU-compatible environment to install the toolchain. We use the MSYS2 Environment to provide this. You don't have to use this environment all the time, you can program with front-end software such as Eclipse or Arduio, but the toolchain is actually running in the background.

The quick Setup is to download the Windows All-in-one toolchain and Msys Zip files from dl.espressif.com:

Https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20170330.zip

Unzip it and open git cmd, then all the way to the Unpacked folder (not Chinese in the path, I extract it directly to the desktop Esp32 folder

STEP2:Get ESP-IDF

by directive

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

Download ESP-IDF to your PC, which is a ESP32 specific API/library. They are provided by Espressif in the esp-idf repository .

Move the previously downloaded compilation toolchain to C:\USERS\LI\ESP-IDF and open the Mingw32.exe file under C:\Users\li\Desktop\ESP32\msys32 to get the following window

STEP3:to add Idf_path to a user profile

the user profile script is included in the c:\users\li\desktop\esp32\msys32\etc\profile.d/ the directory. They are executed each time the MSYS2 window is opened.

    1. in c:\users\li\desktop\esp32\msys32\etc\profile.d/ Create a new script file in the directory . Name it export_idf_path.sh .

    2. Identifies the path to the ESP-IDF directory. C:\Users\li\Desktop\ESP32\msys32\esp-idf

    3. will be export Command is added to the script file, for example:

Remember to use/replace \ In the original Windows path.

4. Save the script file.

5. Close the MSYS2 window and turn it back on. Check whether IDF_PATH the settings, type:

Printenv  Idf_path

Prints the path previously entered in the script file.

Of course, you can also use your hands before each compilation.

Export  Idf_path = "c:/msys32/home/user-name/esp/esp-idf"

Set up.

STEP4:Start Project

You are now ready to prepare your ESP32 application. to get started quickly, we'll use the C:\Users\li\Desktop\ESP32\msys32\esp-idf\examples\get-started\hello_world in IDF Project for validation of the development environment.

Create a new ESP folder in C:\Users\li\Desktop\ESP32\msys32 and copy the Get-started/hello_world to the ~/esp in the catalog

you can also in ESP-IDF of the A series of sample projects are found under the examples directory . These sample project catalogs can be copied in the same way as above to start your own project.

Important

STEP5:establish a serial connection to the ESP32

Connect the ESP32 board to the PC using a USB cable. If the device driver is not installed automatically, identify the USB-to-serial converter chip on the ESP32 board (or external dongle dongle), search for the driver on the Internet, and install it.

The following is a link to the windows and MacOS drivers for the ESP32 board produced by Espressif:

    • ESP32 Core Board- cp210x USB to UART bridging VCP driver
    • ESP32 Wrover Kit and ESP32 Demo Board- FTDI Virtual COM Port driver

For Linux, the appropriate driver should already be bundled with the operating system.

Displays the serial port of the ESP32 DEVKITC

Open/dev View serial number at this time

The red part of the figure is the serial number that is available on your computer, usually your COM number minus one, such as mine is COM3, map to Inside is ttyS2. And then input it into the inside.

STEP6: Configuring

in the terminal window, hello_world Enter the application directory by typing . then start the project configuration tool :cd ~/esp/hello_worldmenuconfig

If the previous steps have been completed correctly, the following menu is displayed:

At this point, you can set up the tool for ESP32 like Linux, with the emphasis on configuring SDK tool configuration

The second is the baud rate setting, the third does not know what, first, regardless, the fourth is the SPI Flash mode, this is not important when configuring eclipse, but you want to use the Espressif download tool, sorry, this you have to remember, the fifth is the speed of the SPI. Remember, you can save it after you change it.

STEP7: Burn write program into flash

Now that everything is configured, you can enter it in the Command box

 make Flash

Can be directly burned write (, this article first explain how to use the tool chain to write, understand the overall design process, the next article will be how to build eclipse development environment and Burn write), have to spit slot is the window with the tool chain compiled compared to Linux is really a lot slower.

The result of the burn write is this.

STEP8: Detect if the write is successful

Open the Serial debugging assistant or enter it directly in the command box

Make Monitor

Turn on the monitoring software. You can see the following work effect.

You can see the output, the program has been successfully burned into the Development Board.

ESP32 Building the Windows Development environment (official method)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.