Chapter 3 Windows builds ESP32 development environment (vscode)

1. Artifact installation

The construction of windos is very simple. Espressif officially has the artifact " ESP-IDF Tool Installer ". Be sure to download the latest offline version.

Espressif official download link:

https://dl.espressif.com/dl/esp-idf/?idf=4.3https://dl.espressif.com/dl/esp-idf/?idf=4.3The official download link is too slow (V2.12 version 1.7G), I saved a copy to the network disk, and the WeChat public account "Jiayouchuang Information Technology" replied "esp32" to download.

The installation method is very simple, it is the next step, remember the installation directory , and finally it is very suitable for development with vscode .

2.vscode installation

It is best to install the latest version of vscode or V1.5 or later.

The installation steps are the next step, adding configuration to make vscode call the command line of esp32 .

 My configuration is as follows:

  1. {
  2. "idf.showOnboardingOnInit": true,
  3. "idf.espIdfPathWin": "E:/ESP/esp-idf/",
  4. "editor.fontSize" : 18, // code font size
  5. "editor.fontFamily" : "Monaco, 'Courier New', monospace" , // code font
  6. "update.mode" : "manual" , // set not to update automatically
  7. "terminal.integrated.defaultProfile.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe (migrated)",
  8. "terminal.integrated.cwd" : "E:/ESP/esp-idf/" ,// home directory
  9. "terminal.integrated.profiles.windows": {
  10. "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe (migrated)": {
  11. "path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
  12. "args": [
  13. "-ExecutionPolicy",
  14. "Bypass",
  15. "-NoExit",
  16. "-File",
  17. "D:/Users/jiauc/.espressif/Initialize-Idf.ps1",
  18. ]
  19. }
  20. },
  21. "workbench.colorTheme": "Default Dark+"
  22. }

 3. Compile the helloworld of the SDK

3.1 Open vscode Select File -> Open Folder, select the path of the SDK, as follows:

3.2 Select Terminal -> New Terminal, as follows:

 If it fails, you need to increase the sdk path and compile chain path in the computer's environment variables, as follows:

 3.3 After success, open the helloworld directory of the sdk on the command line and enter idf.py build to compile

 Other main commands:

idf.py set-target esp32 Set which chip the sdk is used for, I use esp32

idf.py -p com6 flash Download the program to the board through serial port 6, and modify com6 according to your serial port number

idf.py -p com6 monitor View serial port log

idf.py clean and idf.py fullclean clean compiled files


Pay attention to the public account of Jiayouchuang Technology

  • ESP32 development guide QQ group: 824870185, there is a pdf version, and the layout is neat.


 

Click me -> more ESP32 development guide series catalog

Tags: Chapter 3 Windows builds ESP32 development environment (vscode)

ESP32 development ESP32 Development Guide windows vscode here

Related: Chapter 3 Windows builds ESP32 development environment (vscode)