Contributed by 沈夜, organized by Ai-Thinker
Ai-WB2 VS Code Development Environment Deployment
The test path is as follows: 
Right-click and open the Ai-Thinker-WB2 directory with VS Code. The main VS Code configuration is in the .vscode folder. If you have configured the system variables, you can compile without any additional configuration. If you don't want to configure system variables, a simple configuration here will also work. Recommended configuration files:
Header file references — after configuration, you can view function definitions, etc.: c_cpp_properties.json
Click to expand full code
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\\TDM-GCC-64\\bin\\gcc.exe",
"cStandard": "c17",
"cppStandard": "gnu++14",
"intelliSenseMode": "windows-gcc-x64"
}
],
"version": 4
}The shortcut configuration file. You can simply change the gcc path to use it, or leave it unchanged — no impact.
The system configuration file defines the project's environment variables. The benefit is that multiple environments won't conflict, and you don't need to modify system variables.
settings.json
Click to expand full code
{
"terminal.integrated.env.windows": {
"PATH":"Y:\\code\\bl602\\\\mys2\\usr\\bin;Y:\\code\\bl602\\\\wb3\\Ai-Thinker-WB2\\toolchain\\riscv\\MSYS\\bin;;"
},
"terminal.integrated.cwd": "${fileDirname}/../"Full path It is recommended to use a batch script for one-click generation.
set PATH=%~dp0\wb3\Ai-Thinker-WB2\toolchain\riscv\MSYS\bin;%PATH% set PATH=%~dp0\mys2\usr\bin;%PATH%
echo %path% >>path.txt This directly exports the path.
Then simply replace \ with \ in the text.
To build a project, right-click on the file tree on the left and open the integrated terminal — the system variables are then configured automatically. Y:\code\bl602\wb3\Ai-Thinker-WB2\applications\get-started\blink> Both compiling and flashing work properly.
Video demonstration: <https://www.bilibili.com/video/BV1KoUXYxEqg>

