In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to install Eclipse under the Windows system to build ESP32 compilation environment, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to know about it.
I. prepare the software and environment
Esp32_win32_msys2_environment_and_toolchain-20181001
Esp-idf_3.3.1
Ecppse Cpico +
Python 3.8
Git
II. Installation process
1. Install python3.8 and git first
Download the windows installation package of python3.8 and git and install it by default.
2. Esp32_win32_msys2_environment_and_toolchain-20181001 decompression
Extract the esp32_win32_msys2_environment_and_toolchain-20181001 to disk C:
3. Extract esp-idf_3.3.1 to the C:\ msys32\ home\ developer\ esp\ esp-idf (you need to create this folder yourself) directory
4. Add environment variables IDF_PATH (the path to ESP-IDF) and python environment variables to the windows system.
In addition, you need to further install the python dependency package: (the C disk directory will be changed according to your own installation)
Python-m pip install-- user-r C:\ msys32\ home\ developer\ esp\ esp-idf\ requirements.txt
5. Install Ecppse C * +. 6. Extract the projects you need, such as github, to the c:\ msys32\ home\ developer\ esp\ folder.
Import the project into Ecppse
Ecppse uses Makefile support in ESP-IDF. This means that you need to start by creating an ESP-IDF project. You can use the idf-template project in github, or open one of the examples in the esp-idf examples subdirectory.
After Ecppse is running, select File-> Import...
In the dialog box that pops up, select "C _ Existing Code as Makefile Project +"-> "capture", and click Next.
On the next page, enter "Existing Code Location" as the directory for your IDF project. Do not specify the path to the ESP-IDF directory itself (provided later). The directory you specify should contain a file named "Makefile" (project Makefile).
On the same page, under tool chain for indexer settings, select Cross GCC. Then click finish.
Project attribute
The new project will appear under Project Explorer. Right-click the project and select Properties from the context menu.
Click the "Environment" property page under "C _ Environment + Build". Click add. And enter the name BATCH_BUILD and a value of 1.
Click add... again, and enter the name IDF_PATH. This value should be the full path where ESP-IDF is installed. Windows users can copy from Windows Explorer with IDF_PATH.
Edit the PATH environment variable. Keep the current value and append the path to the Xtensa toolchain installed as part of the IDF settings, if this is not already listed in PATH. The typical path to the tool chain is shown below / home/user-name/esp/xtensa-esp32-elf/bin. Note that you need to add a colon before appending the path. Windows users need to add the PATH environment variable in advance C:\ msys32\ mingw32\ bin;C:\ msys32\ opt\ xtensa-esp32-elf\ bin;C:\ msys32\ usr\ bin (if you install msys32 to a different directory, you need to change these paths to match).
On macOS, add a PYTHONPATH environment variable and set it to / Library/Frameworks/Python.framework/Versions/2.7/pb/python2.7/site-packages. In this way, the system Python on which pyserial is installed in the installation step will overwrite any built-in Ecppse Python.
Additional instructions:
If the IDF_PATH directory or project directory is located outside the C:\ msys32\ home directory, you must provide a custom build command in the C _ msys32 build + build property: (note that this approach may significantly increase build time. ) python ${IDF_PATH} / tools/windows/ecppse_make.py
Navigate to the "Preprocessor Include Paths Candle + General"-> "Preprocessor Include Paths" property page:
Click the provider tab
In the list of providers, click CDT Cross GCC Built-in Compiler Settings. Change the command to get compiler specification to .xtensa-esp32-elf-gcc ${FLAGS}-std=c++11-E-P-v-dD "${INPUTS}"
In the provider list, click "CDT GCC Build Output Parser" and change "Compiler command pattern" to xtensa-esp32-elf- (gcc | g\ +\ + | c\ +\ + | cc | cpp | clang)
Navigate to the "Indexer Candle + General"-> "Indexer" property page:
Select enable project-specific settings to enable the remaining settings on this page.
Uncheck allow included heuristic parsing. When this option is enabled, Ecppse sometimes fails to find the correct header directory.
Navigate to the "Behavior Candle + Build"-> "Behavior" property page:
Select enable parallel build to enable multiple build jobs in parallel.
IV. Make menuconfig
Before Ecppse compilation, you need to first use C:\ msys32\ msys2.exe to build the project structure, otherwise compiling directly in Ecppse will report an error and cannot compile.
Click to open msys2 to enter the project folder:
Cd / home/developer/esp/project_esp32_v1
Then execute:
Make menuconfig
When you wait for the project to build, you will enter the interface:
At this time, you need to configure the burning string slogan: select Serial flasher config to enter and check the serial port used by your ESP32 and change it in this interface: COM9, and then OK, exit the configuration interface.
5. Return Ecppse compilation and burning
After the construction of step 4 above is successful, close the cmd command line interface and return to the ecppse software:
After the compilation is successful. Prepare to burn the project:
Right-click your project in Project Explorer (it is important to make sure that you select the project, not the directory in the project, otherwise Ecppse may find the wrong Makefile. )
Select Build Targets-> Create... from the context menu.
Enter "flash" as the target name. Leave the other options at their default values.
Now you can use Project-> Build Target-> Build (Shift+F9) to build a custom flash target, which will compile and flash the project.
Note that you need to use "make menuconfig" to set the serial port and other configuration options for flashing. "make menuconfig" still requires a command line terminal (see instructions for your platform. )
Burn successfully!
Thank you for reading this article carefully. I hope the article "how to install Eclipse under Windows system to build ESP32 compilation environment" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.