In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Arduino8266 development environment how to build VSCode related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe everyone will read this Arduino8266 development environment how to build VSCode article will have some gains, let's take a look at it.
1. Manual build ESP8266 RTOS SDK development environment
Here I am referring to an article of the Great God Half Heart,"Esp8266 Advanced Road 27 [Advanced Chapter] Keep up with the pace, develop esp8266 rtos SDK v3.0 version with Visual Studio Code under Windows, brand new idf framework, save memory modular development." to operate.
Note: This method can be used as an editor using VSCode, but compilation and burning is still based on the command line form, so students who need full automation do not have to look down.
Download Integration Package
Since Le Xin official is the first upgrade for the esp32 development board, so the name of the integration package here is esp32, which can be downloaded from Le Xin official website to ensure quality. (The installer below has also been tried, but it seems to have some problems. I will study it later.)
After decompression, you get a folder named msys32, and you can put it anywhere.
Download ESP8266 RTOS SDK
Download from Lexin official Github, here is recommended to download stable release version. (I downloaded Release v3.2, of course, you can clone the master branch)
Unzip SDK to any location, Great God Half Heart points out that 360 compression cannot be used to decompress here, which will lead to incomplete data. It is recommended to use winrar to decompress.
Download Toolchain for ESP8266
On the official Github page above for downloading SDK, you will see the download address of the tool chain for ESP8266. The SDK I downloaded above is V3.2 version. According to the instructions, I should download the V5.2.0 tool chain.
After downloading, extract it to the/opt directory of the integration package. Here, you can see that there is already an esp32 tool chain in the/opt directory.
Open and modify the file msys32\etc\profile.d\esp32_toolchain.sh
Make PATH point to ESP8266's toolchain instead of ESP32's toolchain, and add an environment variable IDF_PATH to point to ESP8266_RTOS_SDK's storage location
#export PATH="/opt/xtensa-esp32-elf/bin:$PATH"export PATH="/opt/xtensa-lx106-elf/bin:$PATH"export IDF_PATH="D:\Your SDK Unzip Location\ESP8266_RTOS_SDK"
2. run the Demo
Configure VSCode runtime environment
Copy\examples\get-started\project_template in ESP8266_RTOS_SDK package as project template, and use VSCode to open the directory.
After opening, modify the C/C++ plug-in configuration first, right-click the C/C++ plug-in, click "Extension Settings"
Use json configuration instead of UI configuration. Find and click on any of them to edit in setting.json.
Add cmd environment and startup parameters in integration package to json configuration (other parameters are not important)
"terminal.integrated.shell.windows": "D:/path to integration package storage/msys32/msys2_shell.cmd", "terminal.integrated.shellArgs.windows": [ "-defterm", "-mingw32", "-no-start", "-here" ],
project development
Open the project\main\user_main.c file can start the project development, at this time there will be error messages in the code, you can add external package dependency in\.vscode\c_cpp_properties.json to solve the problem, this is the basic use of VSCode method, here will not go into detail.
project compilation
Right-click the project catalog and click "Open in Terminal."
It takes a while to start up. After successful startup, the following message will be displayed. Enter the make all command to compile. The first compilation takes a while, usually 2-3 minutes.
Enter the make menuconfig command to configure the development board
In the first menu, select the development board model 8266
The fourth menu modifies burning related information. From top to bottom:
1. Port to which the development board is connected (modify according to the actual port to which the hardware is connected) 2. Baud rate of burning 3. Enable compressed upload (burning) 4. Flash mode 5. Flash speed 6. Flash size (note that the development board is 32 MB, select 4MB here) 7. Operation before burning (reset boot area) 8. Operation after burning (restart, etc.) 9. Baud rate used when serial port is connected
Other menus haven't been studied yet. We'll supplement them later.
Finally, the settings are saved and exit. Execute the make flash command to burn the development board.
After burning, the development board will restart according to the configuration. Execute the make monitor command to connect to the development board through the serial port to view the information. You can see that hello world has been printed successfully (but the SDK version number has not been printed. This needs to be checked again).
About "Arduino8266 development environment how to build VSCode" The content of this article is introduced here, thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to build VSCode in Arduino8266 development environment." If you still want to learn more knowledge, please pay attention to the industry information channel.
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.