diff --git a/README.md b/README.md index 897dbcd2c..349527239 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ -# ESP-IDF Extension for VSCode +# ESP-IDF Extension for VS Code + +[中文](./README_CN.md) [![Tutorials](https://img.shields.io/badge/-Tutorials-red)](./docs/tutorial/toc.md) [![Espressif Documentation](https://img.shields.io/badge/Documentation-red)](https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/) @@ -14,7 +16,7 @@ Develop, build, flash, monitor, debug and [more](./docs/FEATURES.md) with Espressif chips using Espressif IoT Development Framework [(ESP-IDF)](https://github.com/espressif/esp-idf). -**Latest master installer** for Visual Studio Code. You can use this VSIX to test the current github master of the extension by pressing F1 or click menu `View` -> `Command Palette...`, type `Install from VSIX` and then select the previously downloaded `.vsix` file to install the extension. +**Latest master installer** for Visual Studio Code. You can use this VSIX to test the current github master of the extension by pressing F1 or click menu `View` -> `Command Palette...`, type `Install from VSIX` and then select the previously downloaded `.vsix` file to install the extension. Make sure to review our [Espressif documentation](https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/) or [Github documentation](./docs/ONBOARDING.md) first to properly use the extension. @@ -22,25 +24,24 @@ Make sure to review our [Espressif documentation](https://docs.espressif.com/pro ## Install -1. Download and install [Visual Studio Code](https://code.visualstudio.com/). +1. Download and install [Visual Studio Code](https://code.visualstudio.com/). -2. Install ESP-IDF system prerequisites for your operating system: +2. Install ESP-IDF system prerequisites for your operating system: -- Prerequisites for [MacOS](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/macos-setup.html#install-prerequisites) -- Prerequisites for [Linux](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-setup.html#install-prerequisites) +- Prerequisites for [MacOS and Linux](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/macos-setup.html#install-prerequisites). - For Windows there is no additional prerequisites. -3. In Visual Studio Code, Open the **Extensions** view by clicking on the Extension icon in the Activity Bar on the side of Visual Studio Code or the **View: Extensions** command (shortcut: ⇧ ⌘ X or Ctrl+Shift+X. +3. In Visual Studio Code, Open the **Extensions** view by clicking on the Extension icon in the Activity Bar on the side of Visual Studio Code or the **View: Show Extensions** command (shortcut: ⇧ ⌘ X or Ctrl+Shift+X). 4. Search for [ESP-IDF Extension](https://marketplace.visualstudio.com/items?itemName=espressif.esp-idf-extension). -5. Install the extension. After you install the extension, the ![Espressif icon](./media/readme/espressifIcon.png) should appear in the VS Code Activity bar (left side set of icons). When you click the Espressif icon you can see a list of the basic commands provided by this extension. +5. Install the extension. After you install the extension, the ![Espressif icon](./media/readme/espressifIcon.png) should appear in the VS Code Activity bar (left side set of icons). When you click the Espressif icon, you can see a list of basic commands provided by this extension.
-6. From the command list select **Configure ESP-IDF Extension** or press F1 and type `Configure ESP-IDF Extension`. After, choose the **ESP-IDF: Configure ESP-IDF Extension** option. +6. From the command list, select **Configure ESP-IDF Extension** or press F1 and type `Configure ESP-IDF Extension`. After, choose the **ESP-IDF: Configure ESP-IDF Extension** option. > **NOTE:** For versions of ESP-IDF < 5.0, spaces are not supported inside configured paths.
@@ -49,20 +50,20 @@ Make sure to review our [Espressif documentation](https://docs.espressif.com/pro 7. Choose **Express** and select the download server: -- Espressif: Faster speed in China using Espressif Download servers links. +- Espressif: Faster speed in China using Espressif download servers links. - Github: Using github releases links. 8. Pick an ESP-IDF version to download or the `Find ESP-IDF in your system` option to search for existing ESP-IDF directory. 9. Choose the location for ESP-IDF Tools (also known as `IDF_TOOLS_PATH`) which is `$HOME\.espressif` on MacOS/Linux and `%USERPROFILE%\.espressif` on Windows by default. -10. If your operating system is MacOS/Linux, choose the system python executable to create ESP-IDF virtual environment inside ESP-IDF Tools and install ESP-IDF python package there. +10. If your operating system is MacOS/Linux, choose the system Python executable to create ESP-IDF virtual environment inside ESP-IDF Tools and install ESP-IDF Python package there. - > **NOTE:** Windows users don't need to select a python executable since it is going to be installed by this setup. + > **NOTE:** Windows users don't need to select a Python executable since it is going to be installed by this setup. 11. Make sure that `IDF_TOOLS_PATH` doesn't have any spaces to avoid any build issues. Also make sure that `IDF_TOOLS_PATH` is not the same directory as `IDF_PATH`. -12. You will see a page showing the setup progress status showing ESP-IDF download progress, ESP-IDF Tools download and install progress as well as the creation of a python virtual environment. +12. You will see a page showing the setup progress status, including ESP-IDF download progress, ESP-IDF Tools download and install progress as well as the creation of a Python virtual environment. 13. If everything is installed correctly, you will see a message that all settings have been configured. You can start using the extension. @@ -80,29 +81,29 @@ These icons will be used in the steps below showing common ESP-IDF use cases: 1. Press F1 and type **ESP-IDF: Show Examples Projects** to create a new project from ESP-IDF examples. Select ESP-IDF and choose an example to create a new project from. -2. Once the project is created and opened in VS Code, Set the serial port of your device by pressing status bar icon ![serial port](./media/readme/serialport.png) or F1, typing **ESP-IDF: Select Port to Use:** and choosing the serial port your device is connected. +2. Once the project is created and opened in VS Code, set the serial port of your device by clicking status bar icon ![serial port](./media/readme/serialport.png). Alternatively, press F1, type **ESP-IDF: Select Port to Use**, and choose the serial port to which your device is connected. -3. Select an Espressif target (esp32, esp32s2, etc.) by pressing status bar icon ![IDF Target](./media/readme/target.png) or F1 and type **ESP-IDF: Set Espressif Device Target** command. +3. Select an Espressif target (esp32, esp32s2, etc.) by clicking status bar icon ![IDF Target](./media/readme/target.png). Alternatively, press F1 and type **ESP-IDF: Set Espressif Device Target** command. -4. Next configure your ESP-IDF project by pressing status bar icon ![sdkconfig editor](./media/readme/sdkconfig.png) or press F1 and typing **ESP-IDF: SDK Configuration Editor** command (CTRL E G keyboard shortcut ) where you can modify the ESP-IDF project settings. After all changes are made, click save and close this window. You can see the output in the menu `View` -> `Output` and choose `ESP-IDF` from the dropdown list. +4. Next, configure your ESP-IDF project by clicking status bar icon ![sdkconfig editor](./media/readme/sdkconfig.png) or press F1 and typing **ESP-IDF: SDK Configuration Editor** command (CTRL E G keyboard shortcut) where you can modify the ESP-IDF project settings. After all changes are made, click `Save` and close this window. You can see the output in the menu `View` -> `Output` and choose `ESP-IDF` from the dropdown list. -5. (OPTIONAL) Run **ESP-IDF: Run idf.py reconfigure task** to generate the compile_commands.json file so language support works. Additionally you can configure the `.vscode/c_cpp_properties.json` as explained in [C/C++ Configuration](./docs/C_CPP_CONFIGURATION.md) documentation. +5. (OPTIONAL) Run **ESP-IDF: Run idf.py reconfigure task** to generate the `compile_commands.json` file so language support works. Additionally, you can configure the `.vscode/c_cpp_properties.json` as explained in [C/C++ Configuration](./docs/C_CPP_CONFIGURATION.md) documentation. -6. At this point you can modify the code and when the project is completed, build your project by pressing status bar icon ![build](./media/readme/build.png) or press F1 and typing **ESP-IDF: Build your Project**. +6. At this point, you can modify the code. When the project is completed, build your project by clicking status bar icon ![build](./media/readme/build.png) or pressing F1 and typing **ESP-IDF: Build your Project**. -7. Flash to your device by pressing status bar icon ![flash](./media/readme/flash.png) or F1 and typing **ESP-IDF: Flash your project** to select either `UART`, `DFU` or `JTAG` depending on your serial connection, and start flashing the application to your device. +7. Flash to your device by clicking status bar icon ![flash](./media/readme/flash.png), or pressing F1 and typing **ESP-IDF: Flash your project**. From there, select `UART`, `DFU` or `JTAG` depending on your serial connection, and start flashing the application to your device. -8. Change the flash method pressing status bar icon ![flash method](./media/readme/flashmethod.png) or F1 and typing **ESP-IDF: Select Flash Method** to select either `UART`, `DFU` or `JTAG`. You can alternatively use the **ESP-IDF: Flash (UART) your Project**, **ESP-IDF: Flash (with JTag)** or **ESP-IDF: Flash (DFU) your project**. +8. Change the flash method by clicking status bar icon ![flash method](./media/readme/flashmethod.png), or pressing F1 and typing **ESP-IDF: Select Flash Method** to select from `UART`, `DFU` or `JTAG`. You can alternatively use one of the commands **ESP-IDF: Flash (UART) your Project**, **ESP-IDF: Flash (with JTAG)** or **ESP-IDF: Flash (DFU) your project**. -9. Start a monitor by pressing status bar icon ![monitor](./media/readme/monitor.png) or F1 and typing **ESP-IDF: Monitor Device** which will log the device activity in a Visual Studio Code terminal. +9. Start a monitor by clicking status bar icon ![monitor](./media/readme/monitor.png), or pressing F1 and typing **ESP-IDF: Monitor Device**, which will log the device activity in a Visual Studio Code terminal. 10. Make sure to configure your drivers as mentioned in ESP-IDF [Configure JTAG Interface](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/jtag-debugging/configure-ft2232h-jtag.html) documentation. -11. Before debugging your device, select the device OpenOCD board configuration files by pressing F1 and typing **ESP-IDF: Select OpenOCD Board Configuration**. You can test the connection by pressing status bar icon ![openocd](./media/readme/openocd.png) or F1 and typing **ESP-IDF: OpenOCD Manager**. The output is shown in the menu `View` -> `Output` and choose `ESP-IDF` from the dropdown list. +11. Before debugging your device, select the device OpenOCD board configuration files by pressing F1 and typing **ESP-IDF: Select OpenOCD Board Configuration**. You can test the connection by clicking status bar icon ![openocd](./media/readme/openocd.png) or pressing F1 and typing **ESP-IDF: OpenOCD Manager**. The output is shown in the menu `View` -> `Output` and choose `ESP-IDF` from the dropdown list. - > **NOTE:** you can start or stop the OpenOCD from Visual Studio Code using the **ESP-IDF: OpenOCD Manager** command or from the `OpenOCD Server (Running | Stopped)` button in the visual studio code status bar. + > **NOTE:** You can start or stop the OpenOCD in Visual Studio Code using the **ESP-IDF: OpenOCD Manager** command or by clicking the `OpenOCD Server (Running | Stopped)` button in the status bar. -12. If you want to start a debug session, just press `F5` (make sure you had at least build, flash and OpenOCD is connecting correctly so the debugger works correctly). The debug session output can be seen in the menu `View` -> `Debug Console`. +12. If you want to start a debug session, just press F5 (ensure the project is built, flashed, and OpenOCD is properly connected for the debugger to function correctly). The debug session output can be seen in the menu `View` -> `Debug Console`. Check the [Troubleshooting](#Troubleshooting) section if you have any issues. @@ -114,58 +115,59 @@ You can find a list of tutorials, commands and documentation about all features - Check all the extension [tutorials](./docs/tutorial/toc.md). -- Check all the extension [github documentation](./docs/ONBOARDING.md). +- Check all the extension [GitHub documentation](./docs/ONBOARDING.md). -## All Available commands +## All Available Commands -Click F1 or click menu `View` -> `Command Palette...` to show Visual studio code commands, then type **ESP-IDF** to see all possible extension commands. +Press F1 or click menu `View` -> `Command Palette...` to show Visual Studio code commands, then type **ESP-IDF** to see all available extension commands.
Category | -Command Description | +Command | Description | Keyboard Shortcuts (Mac) | -Keyboard Shortcuts (Windows/ Linux) | +Keyboard Shortcuts (Windows/Linux) |
---|---|---|---|---|---|---|
Add Docker Container Configuration | +Settings | +Add Docker Container Configuration | Add the .devcontainer files to the currently opened project directory, necessary to use a ESP-IDF project in a Docker container with Visual Studio Code - Remote - Containers extension | + Dev Containers extension.|||
Add vscode configuration folder | -Add .vscode files to the currently opened project directory. These include launch.json (for debugging), settings.json and c_cpp_properties.json for syntax highlight. | +Add .vscode files to the currently opened project directory. This includes launch.json (for debugging), settings.json and c_cpp_properties.json (for syntax highlight). | ||||
Configure ESP-IDF extension | -Open a window with a setup wizard to install ESP-IDF, IDF Tools and python virtual environment. | +Open a window with a setup wizard to install ESP-IDF, IDF Tools and Python virtual environment. | ||||
Select output and notification mode | -This extension shows many notifications and output in the Output window ESP-IDF. This command allows you to set if to show notifications, show output, both or none of them. | +This extension shows many notifications and output in the Output window ESP-IDF. This command allows you to set if to show notifications only, output only, both notifications and output, or neither. | ||||
Select where to save configuration settings | -In Visual Studio Code settings can be saved in 3 places: User Settings (global settings), workspace ( .code-workspace file) or workspace folder (.vscode/settings.json). + | In Visual Studio Code, settings can be saved in 3 places: User Settings (global settings), workspace ( .code-workspace file) or workspace folder (.vscode/settings.json). More information in working with multiple projects. | ||||
Pick a workspace folder | -when using a Visual Studio Code workspace with multiple workspace folders, this command allow you to select which workspace folder to use for this extension commands. + | When using a Visual Studio Code workspace with multiple folders, this command allows you to choose which workspace folder to apply this extension’s commands to. More information in working with multiple projects. | @@ -173,20 +175,19 @@ Click F1 or click menu `View` -> `Command Palette...` to show Visual | |||
Basic | Show Examples Projects | -Launch UI to show examples from selected framework and allow you to create a project from them. This command will show frameworks already configured in the extension so if - you want to see ESP-Rainmaker examples you need to run the Install ESP-Rainmaker first (or set the equivalent setting idf.espRainmakerPath) and then execute this command to see the examples. | +Launch UI to show examples from selected framework and allow you to create a project from them. This command will show frameworks already configured in the extension, so to view ESP-Rainmaker examples, you need to run the Install ESP-Rainmaker first (or set the equivalent setting idf.espRainmakerPath), and then execute this command to see the examples. | |||
Set Espressif device target | -This will set the target for the current project (IDF_TARGET). Similar to idf.py set-target. For example if you want to use ESP32 or ESP32-C3 you need to execute this command. | +This will set the target for the current project (IDF_TARGET). Similar to idf.py set-target. For example, if you want to use ESP32 or ESP32-C3, you need to execute this command. | ||||
SDK Configuration editor | -Launch a UI to configure your ESP-IDF project settings. This is equivalent to idf.py menuconfig | +Launch a UI to configure your ESP-IDF project settings. This is equivalent to idf.py menuconfig. | ⌘ I G | Ctrl E G | ||
Select port to use | -Select which serial port to use for ESP-IDF tasks like flashing or monitor your device. | +Select which serial port to use for ESP-IDF tasks, such as flashing or monitoring your device. | ⌘ I P | Ctrl E P | ||
Flash your project | -Write binary data to the ESP’s flash chip from your current ESP-IDF project. This command will use either UART, DFU or JTAG based on idf.flashType | +Write binary data to the ESP’s flash chip from your current ESP-IDF project. This command will use either UART, DFU or JTAG based on idf.flashType. | ⌘ I F | Ctrl E F | ||
Monitor device | -This command will execute idf.py monitor to start serial communication with Espressif device. - Please take a look at the IDF Monitor Documentation. | +This command will execute idf.py monitor to start serial communication with Espressif device. + Please take a look at the IDF Monitor. | ⌘ I M | Ctrl E M | ||
Select OpenOCD Board Configuration | -Select the OpenOCD configuration files that match your Espressif device target. For example if you are using DevKitC or ESP-Wrover-Kit. This is necessary for flashing with JTAG or debugging your device. | +Select the OpenOCD configuration files that match your Espressif device target, such as DevKitC or ESP-Wrover-Kit. This is necessary for flashing with JTAG or debugging your device. | ||||
Build, Flash and start a monitor on your device | -Build the project, write binaries program to device and start a monitor terminal with a single command. Similar to `idf.py build flash monitor` | +Build the project, write binaries program to device and start a monitor terminal with a single command. Similar to idf.py build flash monitor. | ⌘ I D | Ctrl E D | ||
Project creation | Show Examples Projects | -Launch UI to show examples from selected framework and allow you to create a project from them. This command will show frameworks already configured in the extension so if - you want to see ESP-Rainmaker examples you need to run the Install ESP-Rainmaker first (or set the equivalent setting idf.espRainmakerPath) and then execute this command to see the examples. | +Launch UI to show examples from selected framework and allow you to create a project from them. This command will show frameworks already configured in the extension, so to view ESP-Rainmaker examples, you need to run the Install ESP-Rainmaker first (or set the equivalent setting idf.espRainmakerPath), and then execute this command to see the examples. | |||
Create project from Extension Template | -Create ESP-IDF using one of the extension template projects. | +Create an ESP-IDF project using one of the extension template projects. | ⌘ I C | Ctrl E C | ||
Create New ESP-IDF Component | -Create a new component in the current directory based on ESP-IDF component template | +Create a new component in the current directory based on ESP-IDF component template. | ||||
Import ESP-IDF Project | -Import an existing ESP-IDF project and add .vscode and .devcontainer files to a new location and also able to rename the project. | +Import an existing ESP-IDF project, add .vscode and .devcontainer files to a new location, and optionally rename the project. | ||||
New Project | -Launch UI with a ESP-IDF project creation wizard using examples templates from ESP-IDF and additional frameworks configured in the extension. | +Launch UI with a ESP-IDF project creation wizard using example templates from ESP-IDF and additional frameworks configured in the extension. | ⌘ I N | Ctrl E N | ||
Flash (UART) your project | -Write binary data to the ESP’s flash chip from your current ESP-IDF project using esptool.py | +Write binary data to the ESP’s flash chip from your current ESP-IDF project using esptool.py. | ||||
Flash (with JTag) | -Write binary data to the ESP’s flash chip from your current ESP-IDF project using OpenOCD JTAG | +Flash (with JTAG) | +Write binary data to the ESP’s flash chip from your current ESP-IDF project using OpenOCD JTAG. | |||
Erase Flash Memory from Device | -Execute esptool.py erase_flash command to erase flash chip (set to 0xFF bytes) | +Execute esptool.py erase_flash command to erase flash chip (set to 0xFF bytes). | ⌘ I R | Ctrl E R | ||
Code coverage | Add Editor coverage | -Parse your project GCOV Code coverage files to add color lines - representing code coverage on currently opened source code file | +Parse your project GCOV code coverage files to add color lines + representing code coverage on currently opened source code file. | |||
Configure Project SDKConfig for Coverage | -Set required values in your project SDKConfig to enable Code Coverage | +Set required values in your project SDKConfig to enable code coverage analysis. | ||||
Get HTML Coverage Report for project | -Parse your project GCOV Code coverage files to generate a HTML coverage report. | +Parse your project GCOV code coverage files to generate a HTML coverage report. | ||||
Install ESP-IDF Python Packages (DEPRECATION NOTICE) | -Install extension python packages. Deprecated will be removed soon. | +Install extension Python packages. Deprecated will be removed soon. | ||||
Install ESP-Matter | -Clone ESP-Matter and set idf.espMatterPath. The ESP-IDF: Set ESP-MATTER Device Path (ESP_MATTER_DEVICE_PATH) is used to define the device path for ESP-Matter. ESP-Matter is not supported in Windows. Make sure to install Matter system prerequisites first. | +Clone ESP-Matter and set idf.espMatterPath. ESP-Matter is not supported in Windows. Make sure to install Matter system prerequisites first. | ||||
eFuse | Get eFuse Summary | -Get list of eFuse and values from currently serial port chip. | +Retrieve a list of eFuses and their corresponding values from the chip currently connected to the serial port. | |||
Clear eFuse Summary | -Clear the eFuse Summary tree from ESP Explorer EFUSEEXPLORER | +Clear the eFuse Summary tree from ESP Explorer EFUSEEXPLORER. | ||||
QEMU | Launch QEMU Server | -As described in QEMU documentation this command will execute ESP32 QEMU from the project Dockerfile with the current project binaries. | +As described in QEMU documentation, this command will execute ESP32 QEMU from the project Dockerfile with the current project binaries. | |||
Launch QEMU Debug Session | -As described in QEMU documentation this command will start a debug session to ESP32 QEMU from the project Dockerfile with the current project binaries. | +As described in QEMU documentation, this command will start a debug session to ESP32 QEMU from the project Dockerfile with the current project binaries. | ||||
Monitor QEMU Device | -As described in QEMU documentation this command will start a terminal to monitor the ESP32 QEMU from the project Dockerfile with the current project binaries. | +As described in QEMU documentation, this command will start a terminal to monitor the ESP32 QEMU from the project Dockerfile with the current project binaries. | ||||
Monitoring | Monitor device | -This command will execute idf.py monitor to start serial communication with Espressif device. + | This command will execute idf.py monitor to start serial communication with Espressif device. Please take a look at the IDF Monitor Documentation. | ⌘ I M | Ctrl E M | |
Launch IDF Monitor for CoreDump / GDB-Stub Mode | -Launch ESP-IDF Monitor with websocket capabilities. If you has configured the panic handler to gdbstub or core dump, the monitor will launch a post mortem debug session of the chip. | +Launch IDF Monitor for CoreDump/GDB-Stub Mode | +Launch ESP-IDF Monitor with WebSocket capabilities. If you has configured the panic handler to gdbstub or core dump, the monitor will launch a post-mortem debug session of the chip. | |||
Monitor QEMU Device | -As described in QEMU documentation this command will start a terminal to monitor the ESP32 QEMU from the project Dockerfile with the current project binaries. | +As described in QEMU documentation, this command will start a terminal to monitor the ESP32 QEMU from the project Dockerfile with the current project binaries. | ||||
Editors | NVS Partition Editor | -Launch UI to create a CSV file for ESP_IDF Non Volatile Storage | +Launch UI to create a CSV file for ESP-IDF Non-Volatile Storage Library. | |||
Partition Table Editor | -Launch UI to manage custom partition table as described in ESP_IDF Partition Table | +Launch UI to manage custom partition table as described in ESP-IDF Partition Tables. | ||||
SDK Configuration editor | -Launch a UI to configure your ESP-IDF project settings. This is equivalent to idf.py menuconfig | +SDK Configuration Editor | +Launch a UI to configure your ESP-IDF project settings. This is equivalent to idf.py menuconfig. | ⌘ I G | Ctrl E G | |
Unit Testing | Unit Test: Build and flash unit test app for testing | -Copy the unit test app in the current project, build the current project and flash the unit test application to the connected device. More information in Unit testing documentation | +Copy the unit test app in the current project, build the current project and flash the unit test application to the connected device. More information in Unit testing documentation. | |||
Unit Test: Install ESP-IDF PyTest requirements | -Install the ESP-IDF Pytest requirements packages to be able to execute ESP-IDF Unit tests. More information in | +Install the ESP-IDF Pytest requirements packages to be able to execute ESP-IDF Unit tests. More information in Unit testing documentation. | ||||
Scripts and Tools | Run idf.py reconfigure task | -This command will execute idf.py reconfigure (CMake configure task). Useful when you need to generate compile_commands.json for the C/C++ language support. | +This command will execute idf.py reconfigure (CMake configure task), which is useful for generating compile_commands.json for the C/C++ language support. | |||
Erase Flash Memory from Device | -Execute esptool.py erase_flash command to erase flash chip (set to 0xFF bytes) | +Execute esptool.py erase_flash command to erase flash chip (set to 0xFF bytes). | ⌘ I R | Ctrl E R | ||
Dispose Current SDK Configuration Editor Server Process | -If you already executed the SDK Configuration editor, a cache process will remain in the background for faster re opening. This command will dispose of such cache process. | +If you already executed the SDK Configuration Editor, a cache process will remain in the background for faster reopening. This command will dispose of such cache process. | ||||
Troubleshoot Form | -Launch UI for user to send a troubleshoot report with steps to reproduce, run a diagnostic of the extension setup settings and extension logs to send to telemetry backend. | +Launch UI for user to send a troubleshoot report with steps to reproduce. Run a diagnostic of the extension setup settings and extension logs to send to telemetry backend. | ||||
Show Ninja Build Summary | -Execute the Chromium ninja-build-summary.py | +Execute the Chromium ninja-build-summary.py. | ||||
Cleanup | Clear ESP-IDF Search Results | -Clear results from ESP Explorer Documentation Search Results | +Clear results from ESP Explorer Documentation Search Results. | |||
Clear Saved ESP-IDF Setups | -Clear existing esp-idf setups saved by the extension. | +Clear existing ESP-IDF setups saved by the extension. |
类别 | +命令 | +描述 | +快捷键(Mac) | +快捷键(Windows/Linux) | +
---|---|---|---|---|
设置 | +添加 Docker 容器配置 | +将 .devcontainer 文件添加到当前打开的项目目录中,从而能借助 Dev Containers 扩展 + 在 Docker 容器中使用 ESP-IDF 项目。 | ++ | + |
添加 vscode 配置文件夹 | +将 .vscode 文件添加到当前打开的项目目录中。这些文件包括 launch.json(用于调试)、settings.json 和 c_cpp_properties.json(用于语法高亮)。 | ++ | + | |
配置 ESP-IDF 扩展 | +打开一个带有安装向导的窗口,可以安装 ESP-IDF、IDF 工具和 Python 虚拟环境。 | ++ | + | |
选择输出和通知模式 | +此扩展会在输出窗口 ESP-IDF 中显示通知和输出。此命令可设置是否只显示通知、只显示输出、两者都显示或都不显示。 | ++ | + | |
选择设置存储范围 | +VS Code 中的设置可存储在三处:用户设置(全局设置)、工作区(.code-workspace 文件)或工作区文件夹(.vscode/settings.json)。 + 更多信息请参见处理多个项目。 | ++ | + | |
选择工作区文件夹 | +在使用包含多个工作区文件夹的 VS Code 工作区时,此命令会让此扩展的命令应用于指定文件夹。 + 更多信息请参见处理多个项目。 | ++ | + | |
基础命令 | +展示示例项目 | +启动 UI 以显示所选框架的示例,可从中创建新项目。此命令将显示扩展中已配置的框架,如果想查看 ESP-Rainmaker 示例,需要先运行 安装 ESP-Rainmaker 命令(或设置相应的 idf.espRainmakerPath),然后执行此命令以查看示例。 | ++ | + |
设置乐鑫设备目标 | +该命令为当前项目设置目标 (IDF_TARGET),效果等同于 idf.py set-target。例如,若想使用 ESP32 或 ESP32-C3,则需执行此命令。 | ++ | + | |
SDK 配置编辑器 | +启动 UI,进行 ESP-IDF 项目设置。该命令效果等同于 idf.py menuconfig。 | +⌘ I G | +Ctrl E G | +|
构建项目 | +使用 CMake 和 Ninja-build 来构建项目,具体说明请参见 ESP-IDF 构建系统直接使用 CMake。若想修改构建任务的行为,可以在配置 Cmake 时使用 idf.cmakeCompilerArgs 命令,或在配置 Ninja 时使用 idf.ninjaArgs 命令。例如,可以使用 [-j N] 来设置并行作业数,其中 N 是并行作业的数量。 | +⌘ I B | +Ctrl E B | +|
二进制文件大小分析 | +启动 UI 以显示 ESP-IDF 项目的二进制文件大小信息。 | +⌘ I S | +Ctrl E S | +|
选择任务串口 | +选择用于 ESP-IDF 任务(如烧录或监视设备)的串口。 | +⌘ I P | +Ctrl E P | +|
烧录项目 | +将当前项目生成的二进制文件烧录至目标设备。此命令将根据 idf.flashType 使用 UART、DFU 或 JTAG 接口。 | +⌘ I F | +Ctrl E F | +|
监视设备 | +此命令将执行 idf.py monitor,与乐鑫设备进行串行通信。 + 详情请参见 IDF 监视器。 | +⌘ I M | +Ctrl E M | +|
打开 ESP-IDF 终端 | +启动一个配置了 ESP-IDF 扩展设置的终端窗口,效果类似于 ESP-IDF CLI 的 export.sh 脚本。 | +⌘ I T | +Ctrl E T | +|
选择 OpenOCD 开发板配置 | +选择与使用的乐鑫设备目标相匹配的 OpenOCD 配置文件。例如,可以选择 DevKitC 或 ESP-Wrover-Kit。使用 JTAG 接口进行烧录或对设备进行调试时,此步骤必不可缺。 | ++ | + | |
构建、烧录项目并监视设备 | +此命令可用于构建项目、将二进制程序写入设备,并启动监视终端,效果类似于 idf.py build flash monitor。 | +⌘ I D | +Ctrl E D | +|
创建项目 | +展示示例项目 | +启动 UI 以显示所选框架的示例,可从中创建新项目。此命令将显示扩展中已配置的框架,如果想查看 ESP-Rainmaker 示例,需要先运行 安装 ESP-Rainmaker 命令(或设置相应的 idf.espRainmakerPath),然后执行此命令以查看示例。 | ++ | + |
基于模板创建新项目 | +使用扩展中的项目模板来创建一个新的 ESP-IDF 项目。 | +⌘ I C | +Ctrl E C | +|
创建新 ESP-IDF 组件 | +在当前目录下,基于 ESP-IDF 组件模板创建新组件。 | ++ | + | |
导入 ESP-IDF 项目 | +导入现有的 ESP-IDF 项目,在新位置添加 .vscode 和 .devcontainer 文件,同时可以重命名项目。 | ++ | + | |
新项目 | +启动 UI,通过 ESP-IDF 项目创建向导,使用 ESP-IDF 中的示例模板和扩展中配置的其他框架。 | +⌘ I N | +Ctrl E N | +|
烧录 | +选择烧录方式 | +选择用于 烧录项目 命令的烧录方法,可选择 DFU、JTAG 或 UART 接口。 | ++ | + |
烧录项目 | +将当前项目生成的二进制文件烧录至目标设备。此命令将根据 idf.flashType 使用 UART、DFU 或 JTAG 接口。 | +⌘ I F | +Ctrl E F | +|
通过 DFU 接口烧录项目 | +通过 DFU,将当前 ESP-IDF 项目的二进制文件写入 flash 芯片,此方案仅适用于 ESP32-S2 和 ESP32-S3。 | ++ | + | |
通过 UART 接口烧录项目 | +通过 esptool.py,将当前 ESP-IDF 项目的二进制文件写入 flash 芯片。 | ++ | + | |
通过 JTAG 接口烧录项目 | +使通过 OpenOCD JTAG,将当前 ESP-IDF 项目的二进制文件写入 flash 芯片。 | ++ | + | |
加密并烧录项目 | +执行项目烧录,同时为需要加密的分区添加 --encrypt。 | ++ | + | |
擦除设备 flash 数据 | +执行 esptool.py erase_flash 命令,擦除 flash,将芯片重置为 0xFF 字节。 | +⌘ I R | +Ctrl E R | +|
代码覆盖率 | +添加编辑器覆盖率 | +解析项目的 GCOV 代码覆盖率文件, + 并在源代码文件中用彩色高亮代码覆盖行。 | ++ | + |
配置 SDKConfig 文件以启用代码覆盖率 | +在项目的 SDKConfig 文件中设置必要的值,启用代码覆盖率分析。 | ++ | + | |
生成 HTML 格式的代码覆盖率报告 | +解析项目的 GCOV 代码覆盖率文件,生成 HTML 格式的覆盖率报告。 | ++ | + | |
移除编辑器覆盖率 | +移除因添加编辑器覆盖率命令而产生的彩色高亮代码行。 | ++ | + | |
可集成软件框架 | +安装 ESP-ADF | +在所选目录中克隆 ESP-ADF,并配置 idf.espAdfPath(Windows 系统中为 idf.espAdfPathWin)。 | ++ | + |
添加 Arduino ESP32 为 ESP-IDF 组件 | +将 Arduino-ESP32 + 添加为当前目录中的 ESP-IDF 组件(${CURRENT_DIRECTORY}/components/arduino)。 | ++ | + | |
安装 ESP-IDF Python 包(弃用通知) | +请安装扩展 Python 包。本命令已弃用,即将被移除。 | ++ | + | |
安装 ESP-MDF | +在所选目录中克隆 ESP-MDF,并配置 idf.espMdfPath(Windows 系统中为 idf.espMdfPathWin)。 | ++ | + | |
安装 ESP-Matter | +克隆 ESP-Matter 并配置 idf.espMatterPath。Windows 系统不支持 ESP-Matter。运行该命令前请确保已安装 Matter 系统依赖项。 | ++ | + | |
设置 ESP-MATTER 设备路径 (ESP_MATTER_DEVICE_PATH) | +ESP-IDF:设置 ESP-MATTER 设备路径 (ESP_MATTER_DEVICE_PATH) 命令用于定义 ESP-Matter 的设备路径。Windows 系统不支持 ESP-Matter。 | ++ | + | |
安装 ESP-Rainmaker | +克隆 ESP-Rainmaker,并配置 idf.espRainmakerPath(Windows系统中为 idf.espRainmakerPathWin)。 | ++ | + | |
安装 ESP-HomeKit-SDK | +在所选目录中克隆 ESP-HomeKit-SDK,并配置 idf.espHomeKitSdkPath(Windows 系统中为 idf.espHomeKitSdkPathWin)。 | ++ | + | |
eFuse | +获取 eFuse 总结 | +从当前连接到串口的芯片中获取 eFuse 列表及其对应的数值。 | ++ | + |
清除 eFuse 总结 | +从 ESP Explorer 的 EFUSEEXPLORER 中清除 eFuse 摘要集。 | ++ | + | |
QEMU | +启用 QEMU 服务器 | +如 QEMU 文档中所述,此命令将使用项目的 Dockerfile 和二进制文件执行 ESP32 QEMU。 | ++ | + |
启用 QEMU 调试回话 | +如 QEMU 文档中所述,此命令将使用项目的 Dockerfile 和二进制文件启动 ESP32 QEMU 的调试会话。 | ++ | + | |
监视 QEMU 设备 | +如 QEMU 文档中所述,此命令将启动终端,通过使用项目的 Dockerfile 和二进制文件来监视 ESP32 QEMU。 | ++ | + | |
监视 | +监视设备 | +该命令将执行 idf.py monitor,启动计算机与乐鑫设备之间的串行通信。 + 详情请参阅 IDF 监视器。 | +⌘ I M | +Ctrl E M | +
启用 IDF 监视器以支持 CoreDump/GDB-Stub 模式 | +启动支持 WebSocket 的 ESP-IDF 监控器。如果紧急处理程序已经配置为 gdbstub 或核心转储,监控器将启动芯片的事后调试会话。 | ++ | + | |
监视 QEMU 设备 | +如 QEMU 文档中所述,此命令将启动终端,通过使用项目的 Dockerfile 和二进制文件来监视 ESP32 QEMU。 | ++ | + | |
编辑器 | +NVS 分区编辑器 | +启动 UI,创建 ESP-IDF 非易失性存储库 的 CSV 文件。 | ++ | + |
分区表编辑器 | +启动 UI,如 ESP-IDF 分区表 中所述,管理自定义分区表。 | ++ | + | |
SDK 配置编辑器 | +启动 UI,进行 ESP-IDF 项目设置。该命令效果等同于 idf.py menuconfig。 | +⌘ I G | +Ctrl E G | +|
单元测试 | +单元测试:构建并烧录单元测试应用程序 | +复制当前项目中的单元测试应用程序,构建当前项目并将单元测试应用程序烧录到连接的设备上。详情请参阅单元测试。 | ++ | + |
单元测试:安装 ESP-IDF PyTest 依赖项 | +安装 ESP-IDF Pytest 依赖项,以便能够执行 ESP-IDF 单元测试。详情请参阅单元测试。 | ++ | + | |
脚本和工具 | +运行 idf.py reconfigure 任务 | +此命令将执行 idf.py reconfigure(CMake 配置任务),能够帮助生成 compile_commands.json 文件以支持 C/C++ 语言特性。 | ++ | + |
擦除设备 flash 数据 | +执行 esptool.py erase_flash 命令,擦除 flash,将芯片重置为 0xFF 字节。 | +⌘ I R | +Ctrl E R | +|
清理当前 SDK 配置编辑器服务器进程 | +若先前执行过SDK 配置编辑器命令,则后台将保留缓存进程,以便下次更快打开编辑器。此命令将清理此类缓存进程。 | ++ | + | |
诊断命令 | +诊断扩展设置及扩展日志,提供故障排除报告。 | ++ | + | |
故障排除表单 | +启动 UI,以便用户发送故障排除报告,报告中需包含重现问题的步骤。同时系统将诊断扩展设置及扩展日志,并将信息发送到遥测后端。 | ++ | + | |
运行 ESP-IDF-SBOM 漏洞检查 | +为使用 ESP-IDF 开发框架生成的应用程序创建 SPDX 格式的软件物料清单(SBOM)文件。 | ++ | + | |
保存默认的 SDKCONFIG 文件 (save-defconfig) | +使用当前项目的 sdkconfig 文件,生成 sdkconfig.defaults 文件。 | ++ | + | |
显示 Ninja 构建摘要 | +运行 Chromium ninja-build-summary.py。 | ++ | + | |
在文档中搜索... | +从源代码文件中选择文本,并在 ESP-IDF 文档中进行搜索,搜索结果将显示在 VSCode ESP-IDF Explorer 选项卡中。 | +⌘ I Q | +Ctrl E Q | +|
搜索错误提示 | +输入文本,在 ESP-IDF 提示库中搜索匹配的错误。 | ++ | + | |
清理 | +清除 ESP-IDF 搜索结果 | +清除 Explorer 中 Documentation Search Results 选项卡中的所有搜索结果。 | ++ | + |
清除已保存的 ESP-IDF 设置 | +清除扩展中保留的现有 ESP-IDF 设置。 | ++ | + |