GithubHelp home page GithubHelp logo

espressif / vscode-esp-idf-extension Goto Github PK

View Code? Open in Web Editor NEW
1.0K 30.0 294.0 33.83 MB

Visual Studio Code extension for ESP-IDF projects

License: Apache License 2.0

Python 0.45% Shell 0.05% JavaScript 0.44% TypeScript 86.39% Vue 12.01% CMake 0.13% C 0.25% C++ 0.01% SCSS 0.19% Dockerfile 0.08%

vscode-esp-idf-extension's Introduction

espressif logo

ESP-IDF Visual Studio Code Extension

Tutorials Documentation Troubleshooting ESP32 Version Releases Forum

Develop, build, flash, monitor, debug and more with Espressif chips using Espressif IoT Development Framework (ESP-IDF)

Nightly builds 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 documentation first to properly use the extension.

How to use

  1. Download and install Visual Studio Code.

  2. Install ESP-IDF system requirements for your operating system:

  1. 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.

  2. Search for ESP-IDF Extension.

  3. Install the extension.

  4. (OPTIONAL) Press F1 and type ESP-IDF: Select where to Save Configuration Settings, which can be User Settings (global), Workspace Settings or Workspace Folder Settings. Default is User settings.

    NOTE: Please take a look at Working with multiple projects for more information.

  5. In Visual Studio Code, select menu "View" and "Command Palette" and type configure esp-idf extension. After, choose the ESP-IDF: Configure ESP-IDF Extension option. You can also choose where to save settings in the setup wizard.

    NOTE: For versions of ESP-IDF < 5.0, spaces are not supported inside configured paths.

Select ESP-IDF

  1. Choose Express and select the download server:
  • Espressif: Faster speed in China using Espressif Download servers links.
  • Github: Using github releases links.
  1. Pick an ESP-IDF version to download or the find ESP-IDF in your system option to search for existing ESP-IDF directory.

  2. 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.

  3. If your operating system is Linux or MacOS, choose the python executable to create ESP-IDF virtual environment.

    NOTE: Windows users don't need to select a python executable since it is part of the setup. NOTE: 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.

  4. The user 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.

  5. If everything is installed correctly, the user will see a message that all settings have been configured. You can start using the extension. Otherwise check the Troubleshooting section if you have any issues.

  6. 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.

  7. (OPTIONAL) Configure the .vscode/c_cpp_properties.json as explained in C/C++ Configuration.

Note: For code navigation the Microsoft C/C++ Extension or Clangd extension can be used for C/C++ language support. By default, projects created with ESP-IDF: Create Project from Extension Template or ESP-IDF: Show Examples Projects include a template for Microsoft C/C++ extension c_cpp_properties.json configuration file and doesn't need to be configured. Run ESP-IDF: Run idf.py reconfigure task to generate the compile_commands.json file so language support works.

  1. Set the serial port of your device by pressing F1, typing ESP-IDF: Select Port to Use: and choosing the serial port your device is connected.

  2. Select an Espressif target (esp32, esp32s2, etc.) with the ESP-IDF: Set Espressif Device Target command.

  3. Use the ESP-IDF: Select OpenOCD Board Configuration to choose the openOCD configuration files for the extension openOCD server.

  4. Next configure your ESP-IDF project by pressing F1 and typing ESP-IDF: SDK Configuration Editor command (CTRL E G keyboard shortcut ) where the user can modify the ESP-IDF project settings. After all changes are made, click save and close this window.

  5. When you are ready, build your project by pressing F1 and typing ESP-IDF: Build your Project.

  6. Flash to your device by pressing F1 and typing ESP-IDF: Select Flash Method and Flash to select either UART, DFU or JTAG depending on your serial connection.

NOTE: You can also use the ESP-IDF: Flash (UART) your Project or ESP-IDF: Flash (with JTag) directly.

  1. Start a monitor by pressing F1 and typing ESP-IDF: Monitor Device which will log the device activity in a Visual Studio Code terminal.

  2. To make sure you can debug your device, select your board configuration by pressing F1 and typing ESP-IDF: Select OpenOCD Board Configuration. You can test the connection by 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: The user 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.

  3. 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).

Check the Troubleshooting section if you have any issues.

Tutorials

  1. Install and setup the extension.
  2. Create a project from ESP-IDF examples, Build, flash and monitor.
  3. Debugging with steps to configure OpenOCD and debug adapter.
  4. Heap tracing
  5. Code coverage
  6. Developing on Docker Container
  7. Developing on WSL

Check all the tutorials here.

Table of content

Check all the documentation.

Available commands

Click F1 to show Visual studio code actions, then type ESP-IDF to see all possible actions.

Category Command Description Description Keyboard Shortcuts (Mac) Keyboard Shortcuts (Windows/ Linux)
Configuration Add OpenOCD rules file (For Linux users) Add OpenOCD permissions to /etc/udev/rules.d to allow OpenOCD execution.
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
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.
Configure ESP-IDF extension 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 the user to set if to show notifications, show output, both or none of them.
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). 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. More information in working with multiple projects.
Basic Show Examples Projects Launch UI to show examples from selected framework and allow the user 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.
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.
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
Build your project Build your project using `CMake` and `Ninja-build` as explained in ESP-IDF Build System Using Cmake Directly. You could modify the behavior of the build task with idf.cmakeCompilerArgs for Cmake configure step and idf.ninjaArgs for Ninja step. For example, using [-j N] where N is the number of jobs run in parallel. I B Ctrl E B
Size analysis of the binaries Launch UI with the ESP-IDF project binaries size information. I S Ctrl E S
Select port to use Select which serial port to use for ESP-IDF tasks like flashing or monitor 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 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. I M Ctrl E M
Open ESP-IDF Terminal Launch a terminal window configured with extension ESP-IDF settings. Similar to export.sh script from ESP-IDF CLI. I T Ctrl E T
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.
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` I D Ctrl E D
Project creation Show Examples Projects Launch UI to show examples from selected framework and allow the user 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.
Create project from Extension Template Create ESP-IDF 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
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.
New Project Launch UI with a ESP-IDF project creation wizard using examples templates from ESP-IDF and additional frameworks configured in the extension. I N Ctrl E N
Flashing Select Flash Method Select which flash method to use for Flash your project command. It can be DFU, JTAG or UART.
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 I F Ctrl E F
Flash (DFU) your project Write binary data to the ESP’s flash chip from your current ESP-IDF project using DFU. Only for ESP32-S2 and ESP32-S3.
Flash (UART) your project 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
Encrypt and Flash your Project Execute flashing the project program to device while adding --encrypt for partitions to be encrypted.
Erase Flash Memory from Device 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
Configure Project SDKConfig for Coverage Set required values in your project SDKConfig to enable Code Coverage
Get HTML Coverage Report for project Parse your project GCOV Code coverage files to generate a HTML coverage report.
Remove Editor coverage Remove editor colored lines from Add Editor coverage command
Additional frameworks Install ESP-ADF Clone ESP-ADF inside the selected directory and set idf.espAdfPath (idf.espAdfPathWin in Windows) configuration setting.
Add Arduino ESP32 as ESP-IDF Component Add Arduino-ESP32 as a ESP-IDF component in your current directory (${CURRENT_DIRECTORY}/components/arduino).
Install ESP-IDF Python Packages (DEPRECATION NOTICE) Install extension python packages. Deprecated will be removed soon.
Install ESP-MDF Clone ESP-MDF inside the selected directory and set idf.espMdfPath (idf.espMdfPathWin in Windows) configuration setting.
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.
Set ESP-MATTER Device Path (ESP_MATTER_DEVICE_PATH) 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.
Install ESP-Rainmaker Clone ESP-Rainmaker and set idf.espRainmakerPath (idf.espRainmakerPathWin in Windows) configuration setting.
Install ESP-HomeKit-SDK Clone ESP-HomeKit-SDK inside the selected directory and set idf.espHomeKitSdkPath (idf.espHomeKitSdkPathWin in Windows) configuration setting.
eFuse Get eFuse Summary Get list of eFuse and values from currently serial port chip.
Clear eFuse Summary 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.
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.
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.
Monitoring 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. I M Ctrl E M
Launch IDF Monitor for CoreDump / GDB-Stub Mode Launch ESP-IDF Monitor with websocket capabilities. If the user 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.
Editors NVS Partition Editor Launch UI to create a CSV file for ESP_IDF Non Volatile Storage
Partition Table Editor Launch UI to manage custom partition table as described in ESP_IDF Partition Table
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
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
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.
Erase Flash Memory from Device 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.
Doctor Command Run a diagnostic of the extension setup settings and extension logs to provide a troubleshooting report.
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.
Run ESP-IDF-SBOM vulnerability check Creates Software bill of materials (SBOM) files in the Software Package Data Exchange (SPDX) format for applications generated by the Espressif IoT Development Framework (ESP-IDF).
Save Default SDKCONFIG file (save-defconfig) Generate sdkconfig.defaults files using the project current sdkconfig file.
Show Ninja Build Summary Execute the Chromium ninja-build-summary.py
Search in documentation... Select some text from your source code file and search in ESP-IDF documentation with results right in the vscode ESP-IDF Explorer tab. I Q Ctrl E Q
Search Error Hint Type some text to find a matching error from ESP-IDF hints dictionary.
Clear ESP-IDF Search Results Clear results from ESP Explorer Documentation Search Results
Clear Saved ESP-IDF Setups Clear existing esp-idf setups saved by the extension.

About commands

  1. The Add Arduino-ESP32 as ESP-IDF Component command will add Arduino-ESP32 as a ESP-IDF component in your current directory (${CURRENT_DIRECTORY}/components/arduino).

    NOTE: Not all versions of ESP-IDF are supported. Make sure to check Arduino-ESP32 to see if your ESP-IDF version is compatible.

  2. You can also use the ESP-IDF: Create Project from Extension Template command with arduino-as-component template to create a new project directory that includes Arduino-ESP32 as an ESP-IDF component.

  3. The Install ESP-ADF will clone ESP-ADF inside the selected directory and set idf.espAdfPath (idf.espAdfPathWin in Windows) configuration setting.

  4. The Install ESP-Matter will clone ESP-Matter inside the selected directory and set idf.espMatterPath configuration setting. 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.

  5. The Install ESP-MDF will clone ESP-MDF inside the selected directory and set idf.espMdfPath (idf.espMdfPathWin in Windows) configuration setting.

  6. The Install ESP-HomeKit-SDK will clone ESP-HomeKit-SDK inside the selected directory and set idf.espHomeKitSdkPath (idf.espHomeKitSdkPathWin in Windows) configuration setting.

  7. The Show Examples Projects command allows you create a new project using one of the examples in ESP-IDF, ESP-ADF, ESP-Matter, ESP-HomeKit-SDK or ESP-MDF directory if related configuration settings are correctly defined.

Commands for tasks.json and launch.json

We have implemented some utilities commands that can be used in tasks.json and launch.json that can be used like:

"miDebuggerPath": "${command:espIdf.getToolchainGdb}"
  • espIdf.getExtensionPath: Get the installed location absolute path.
  • espIdf.getOpenOcdScriptValue: Return the value of OPENOCD_SCRIPTS from idf.customExtraVars or from system OPENOCD_SCRIPTS environment variable.
  • espIdf.getOpenOcdConfig: Return the openOCD configuration files as string. Example -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg.
  • espIdf.getProjectName: Return the project name from current workspace folder build/project_description.json.
  • espIdf.getToolchainGcc: Return the absolute path of the toolchain gcc for the ESP-IDF target given by idf.adapterTargetName configuration setting and idf.customExtraPaths.
  • espIdf.getToolchainGdb: Return the absolute path of the toolchain gdb for the ESP-IDF target given by idf.adapterTargetName configuration setting and idf.customExtraPaths.

See an example in the debugging documentation.

Available Tasks in tasks.json

A template Tasks.json is included when creating a project using ESP-IDF: Create Project from Extension Template. These tasks can be executed by running F1, writing Tasks: Run task and selecting one of the following:

  1. Build - Build Project
  2. Set Target to esp32
  3. Set Target to esp32s2
  4. Clean - Clean the project
  5. Flash - Flash the device
  6. Monitor - Start a monitor terminal
  7. OpenOCD - Start the openOCD server
  8. BuildFlash - Execute a build followed by a flash command.

Note that for OpenOCD tasks you need to define OPENOCD_SCRIPTS in your system environment variables with openocd scripts folder path.

Troubleshooting

If something is not working please check for any error on one of these:

NOTE: Use idf.openOcdDebugLevel configuration setting to 3 or more to show debug logging in OpenOCD server output.

NOTE: Use logLevel in your /.vscode/launch.json to 3 or more to show more debug adapter output.

  1. In Visual Studio Code select menu View -> Output -> ESP-IDF. This output information is useful to know what is happening in the extension.
  2. In Visual Studio Code select menu View then click Command Palette... and type ESP-IDF: Doctor Command to generate a report of your environment configuration and it will be copied in your clipboard to paste anywhere.
  3. Check log file which can be obtained from:
  • Windows: %USERPROFILE%\.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log
  • Linux & MacOSX: $HOME/.vscode/extensions/espressif.esp-idf-extension-VERSION/esp_idf_vsc_ext.log
  1. In Visual Studio Code, select menu Help -> Toggle Developer Tools and copy any error in the Console tab related to this extension.

  2. Make sure that your extension is properly configured as described in JSON Manual Configuration. Visual Studio Code allows the user to configure settings at different levels: Global (User Settings), Workspace and Workspace Folder so make sure your project has the right settings. The ESP-IDF: Doctor command result might give the values from user settings instead of the workspace folder settings.

  3. Review the OpenOCD troubleshooting FAQ related to the OpenOCD output, for application tracing, debug or any OpenOCD related issues.

If there is any Python package error, please try to reinstall the required python packages with the ESP-IDF: Install ESP-IDF Python Packages command. Please consider that this extension install ESP-IDF, this extension's and ESP-IDF Debug Adapter python packages when running the ESP-IDF: Configure ESP-IDF Extension setup wizard.

NOTE: When downloading ESP-IDF using git cloning in Windows if you receive errors like "unable to create symlink", enabling Developer Mode while cloning ESP-IDF could help resolve the issue.

If the user can't resolve the error, please search in the github repository issues for existing errors or open a new issue here.

Code of Conduct

This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

License

This extension is licensed under the Apache License 2.0. Please see the LICENSE file for additional copyright notices and terms.

vscode-esp-idf-extension's People

Contributors

an-dr avatar arcticlampyrid avatar bdpdx avatar beruzebabu avatar biggates avatar boarchuz avatar brianignacio5 avatar dependabot[bot] avatar diegorro98 avatar dyarkovoy avatar fgnievinski avatar gonzabrusco avatar hahihula avatar hassandraga avatar igrr avatar jmigual avatar kolipakakondal avatar kowyo avatar kumekay avatar larryli avatar meltdown03 avatar pwmb avatar radurentea avatar rdancer avatar spacefish avatar thezim avatar timpur avatar ttytyper avatar vasilius-001 avatar xdanielpaul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-esp-idf-extension's Issues

Error In Launch Gui Configuration Tool (VSC-314)

I get the following error when launching gui configuration tool
---------------------------ERROR--------------------------

Error: spawn python ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
-----------------------END OF ERROR-----------------------

extension flashing performance is 4x slower (VSC-242)

Describe the bug
Flashing by extension task is almost 4 times slower than terminal command idf.py -p com flash.

To Reproduce
Build project, set correct device port.

  1. Click Flash button from toolbar at the bottom, watch esp-idf flash output.
Wrote 1057824 bytes (685281 compressed) at 0x00010000 in 60.8 seconds (effective 139.1 kbit/s)...
Hash of data verified.
  1. Open termianl, run "idf.py.exe -p COMX flash", watch terminal feedback.
Wrote 1058064 bytes (685377 compressed) at 0x00010000 in 16.0 seconds (effective 528.1 kbit/s)...
Hash of data verified.

Expected behavior
Both should flash the device nice and quick.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

Environment (please complete the following information):

  • OS Name & Version: [win10]
  • VSCode Version: [0.13]
  • ESP-IDF Version: [4.1]
  • Python Version: [3.7]
  • Hardware: ESP32-DevKitC with ESP32-WROOM-32

Additional context

full log from terminal (integrated windows power shell).


idf.py.exe -p COM7 flash  
Adding "flash"'s dependency "all" to list of commands with default set of options.
Executing action: all (aliases: build)
Running ninja in directory d:\workspace\vscode\workspace\hello\build
Executing "ninja all"...
[1/3] Performing build step for 'bootloader'
ninja: no work to do.
Executing action: flash
Running ninja in directory d:\workspace\vscode\workspace\hello\build
Executing "ninja flash"...
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
[1/2] cmd.exe /C "cd /D D:\workspace\vscode\esp-idf.v4\components\esptool_py && D:\workspace\vscode\.../workspace/hello/build" -P D:/workspace/vscode/esp-idf.v4/components/esptool_py/run_esptool.cmake" 
esptool.py --chip esp32 -p COM7 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0xd000 ota_data_initial.bin 0x1000 bootloader/bootloader.bin 0x10000 hello.bin
esptool.py v3.0-dev
Serial port COM7
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 84:0d:8e:36:a7:c4
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 3072 bytes to 156...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (156 compressed) at 0x00008000 in 0.0 seconds (effective 1755.3 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 31...
Writing at 0x0000d000... (100 %)
Wrote 8192 bytes (31 compressed) at 0x0000d000 in 0.0 seconds (effective 5947.9 kbit/s)...
Hash of data verified.
Compressed 26944 bytes to 16643...
Writing at 0x00001000... (50 %)
Writing at 0x00005000... (100 %)
Wrote 26944 bytes (16643 compressed) at 0x00001000 in 0.4 seconds (effective 528.3 kbit/s)...
Hash of data verified.
Compressed 1058064 bytes to 685377...
Writing at 0x00010000... (2 %)
Writing at 0x00014000... (4 %)
Writing at 0x00018000... (7 %)
Writing at 0x0001c000... (9 %)
Writing at 0x00020000... (11 %)
Writing at 0x00024000... (14 %)
Writing at 0x00028000... (16 %)
Writing at 0x0002c000... (19 %)
Writing at 0x00030000... (21 %)
Writing at 0x00034000... (23 %)
Writing at 0x00038000... (26 %)
Writing at 0x0003c000... (28 %)
Writing at 0x00040000... (30 %)
Writing at 0x00044000... (33 %)
Writing at 0x00048000... (35 %)
Writing at 0x0004c000... (38 %)
Writing at 0x00050000... (40 %)
Writing at 0x00054000... (42 %)
Writing at 0x00058000... (45 %)
Writing at 0x0005c000... (47 %)
Writing at 0x00060000... (50 %)
Writing at 0x00064000... (52 %)
Writing at 0x00068000... (54 %)
Writing at 0x0006c000... (57 %)
Writing at 0x00070000... (59 %)
Writing at 0x00074000... (61 %)
Writing at 0x00078000... (64 %)
Writing at 0x0007c000... (66 %)
Writing at 0x00080000... (69 %)
Writing at 0x00084000... (71 %)
Writing at 0x00088000... (73 %)
Writing at 0x0008c000... (76 %)
Writing at 0x00090000... (78 %)
Writing at 0x00094000... (80 %)
Writing at 0x00098000... (83 %)
Writing at 0x0009c000... (85 %)
Writing at 0x000a0000... (88 %)
Writing at 0x000a4000... (90 %)
Writing at 0x000a8000... (92 %)
Writing at 0x000ac000... (95 %)
Writing at 0x000b0000... (97 %)
Writing at 0x000b4000... (100 %)
Wrote 1058064 bytes (685377 compressed) at 0x00010000 in 16.0 seconds (effective 528.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Done

C++ extension include path for Windows (VSC-228)

There are underlined include directives under the windows environment. It would be great to add include paths to c_cpp_properities.json

"includePath": [
    "${config:idf.espIdfPathWin}/components/**",
    "${config:idf.espIdfPath}/components/**",
    "build/config"
 ],

there are both include paths for Linux and Windows, also the build/config is needed otherwise "portTICK_PERIOD_MS" is underlined (don't know why)

Windows 10, VScode 1.41.1, Extension 0.13, ESP-IDP 4.0

Tasks dont work... should they? (VSC-239)

Describe the bug
run task build (none of them work, build, clean, flash)

To Reproduce
Terminal->Run Task... pick anything...

Expected behavior
it should build the project

Screenshots
image

Environment (please complete the following information):

  • OS Name & Version: Windows 10
  • VSCode Version: 1.42
  • ESP-IDF Version: v4.0
  • Python Version: 3.7

Additional context
not sure why its trying to do anything with WINPTY_EXE...
this is NOT an MSYS2 environment!
MSYSTEM is not in os.environ

output of terminal:
`> Executing task: C:\Users\mitchjs.espressif\python_env\idf4.0_py3.7_env\Scripts\python.exe C:\Users\mitchjs\esp-idf\tools\idf.py build <

Traceback (most recent call last):
File "C:\Users\mitchjs\esp-idf\tools\idf.py", line 1298, in
[WINPTY_EXE, sys.executable] + sys.argv, env=os.environ
File "C:\Users\mitchjs\AppData\Local\Programs\Python\Python37\Lib\subprocess.py", line 339, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\mitchjs\AppData\Local\Programs\Python\Python37\Lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Users\mitchjs\AppData\Local\Programs\Python\Python37\Lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.`

Include errors after fresh install (VSC-229)

Pre Bug Report Checklist
Before reporting any bug please make sure of these points.

  • Make sure you have searched for existing bugs and features request before you post an issue.
  • This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
  • I've read the docs and found no information that could have helped solving the issue.

Describe the bug
After fresh installation of extension (and all required dependencies) and onboarding process (full success) I occurred problem with include error, but only on this line:
#include "freertos/FreeRTOS.h"
In any example project there is the same warning. Project builds and flash without any problems.

Here is my c_pp_properties.json (nothing changed here)

{
    "configurations": [
        {
            "name": "Linux",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "includePath": ["${config:idf.espIdfPath}/components/**"],
            "browse": {
                "path": [
                    "${config:idf.espIdfPath}/components"
                ],
                "limitSymbolsToIncludedHeaders": false   
            }
        }
    ],
    "version": 4
}

To Reproduce

  1. Install vscode extenstion
  2. Perform onboarding
  3. Generate new project based on blink example
  4. Error should pops out in Problems pane and in editor

Expected behavior
Problems pane should be empty.

Screenshots
image

Environment (please complete the following information):

  • OS Name & Version: [Arch Linux 5.4.15-arch1-1 GNOME 3.34.2 ]
  • VSCode Version: [1.41.1]
  • ESP-IDF Version: [v4.1.0]
  • Python Version: [3.8.0]

Additional context
I' ve downloaded ESP-IDF manually as stated https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html#linux-and-macos and provided path to esp-idf manually in onboarding process.

Here is my settings.json if it is relevant:

{
    "terminal.integrated.fontFamily": "Source Code Pro for Powerline",
    "typescript.updateImportsOnFileMove.enabled": "never",
    "editor.formatOnSave": true,
    "editor.fontWeight": "600",
    "idf.pythonSystemBinPath": "/usr/bin/python3",
    "idf.espIdfPath": "/home/bartosz/esp/esp-idf",
    "idf.toolsPath": "/home/bartosz/.espressif",
    "idf.pythonBinPath": "/home/bartosz/.espressif/python_env/idf4.1_py3.8_env/bin/python",
    "idf.customExtraPaths": ".:/usr/bin:/home/bartosz/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin:/home/bartosz/.espressif/tools/xtensa-esp32s2-elf/esp-2019r2-8.2.0/xtensa-esp32s2-elf/bin:/home/bartosz/.espressif/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin:/home/bartosz/.espressif/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin:/home/bartosz/.espressif/tools/openocd-esp32/v0.10.0-esp32-20191114/openocd-esp32/bin",
    "idf.customExtraVars": "{\"OPENOCD_SCRIPTS\":\"/home/bartosz/.espressif/tools/openocd-esp32/v0.10.0-esp32-20191114/openocd-esp32/share/openocd/scripts\"}",
    "idf.showOnboardingOnInit": false,
    "idf.projectName": "hello-world",
    "idf.port": "/dev/ttyUSB0"
}

Installation OpenOCD version problem (VSC-182)

Environment:

  • VSCode Version:
    1.41.1
  • ESP-IDF Version: (run cd $IDF_PATH; git describe --tags to find it):
    v3.3.1
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it):
    xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0
  • Python Version: python3 -V
    Python 3.6.9
  • Operating System: [Linux/Ubuntu]

Describe the bug
During the process of installation (extension installed from the marketplace, with option of downloading the tools), I have encountered a problem with the wrong version of OpenOCD.
The Expected version is: v0.10.0-esp32-20190708
The Found version displayed: v0.10.0

Possible solution
To solve the problem, I have edited the tools.json file. I changed the attribute: OpenOCD for ESP32 and proper (according to the system) attribute: versions (for the newest available version of OpenOCD) and - especially the value for name

Arrow keys do not work in menuconfig (VSCode terminal & Windows Terminal Preview) (IDFGH-1860) (VSC-170)

Environment

  • IDF version (run git describe --tags to find it):
    v4.1-dev-256-g9f145ff16
  • Build System: CMake
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it):
    xtensa-esp32-elf-gcc (crosstool-NG esp32-2019r1) 8.2.0
  • Operating System: Windows 10

Problem Description

When using idf.py menuconfig in a Visual Studio Code integrated terminal or a Windows Terminal Preview terminal, the arrow keys do not work as menu navigation. This does not occur under regular Windows terminal.

Expected Behavior

Arrow keys navigate the menu items

Actual Behavior

The menu does not respond to arrow keys

Steps to repropduce

  1. Install Visual Studio Code or Windows Terminal Preview
  2. Run idf.py menuconfig in a project within the Visual Studio Code integrated terminal or a Windows Terminal Preview session
  3. Use arrow keys to navigate the menu

VScode + Extension show "sizeof(void *)" is 8UL. (VSC-306)

My vscode and esp-idf extension show sizeof pointer is 8 byte length.
As I know, xtensa lx6 architecture is 32bit address system and this show me strangely.

This is not critical issue. But I thought we need to check this issue surely. So update issue here. Thanks

Screenshots
스크린샷 2020-04-18 오후 7 28 47

Environment

  • OS Name & Version: MacOS X 10.15.4
  • VSCode Version: 1.44.1
  • ESP-IDF Version: 4.0.0
  • Python Version: 2.7.16

Build task problems in the Problems tab have unresolved filepaths (VSC-276)

Describe the bug
After running the build task, the problems tab is populated with entries parsed from the output.
However, clicking one of these results in a VS Code error:

Unable to open 'main.cpp': Unable to read file '/../main/main.cpp' (Error: Unable to resolve non-existing file '/../main/main.cpp').

Where the actual filepath is '/home/boarchuz/Projects/MyProject/main/main.cpp'

To Reproduce
In a project with any error, "Tasks - Run task" -> "Build - Build project". Click the resulting entry in the Problems tab.

Solution
The default problemMatcher config has "fileLocation": "absolute" while the output provides relative paths.

Example build output error:

../main/main.cpp: In function 'void app_main()':
../main/main.cpp:82:7: error: 'some_undeclared_variable' was not declared in this scope
++some_undeclared_variable;
^~~~~~~~~~~~~~~~~~~~~~~~

This can be solved by changing "fileLocation" to the following:
"fileLocation": ["relative", "${workspaceFolder}/build"],

The only thing I'm not 100% sure about is if that path is ideal. ie. Which path is the build output's "../main/main.cpp" actually relative to? Using "fileLocation": ["relative", "${workspaceFolder}"] would also work with an altered regexp to handle the "../".

There are many other tasks that seem to use the same problemMatcher config that may be affected too.

Environment
Linux Mint 19.3, VS Code 1.43.1, IDF Extension 0.1.4, IDF 'master' (v4.2-dev-701-g0ae960f2f)

#includes missing in visual studio code (VSC-224)

Hey Guys,
I installed the vscode extension. Configuration and download of tools worked pretty well (thanks to the guiding menus).

Testing the cpp_pthread, includes Paths are not found. All Systems are the current ones.

Console says
IDF_PATH environment variable is different from inferred IDF_PATH.
What does that mean for me (can not get any IDF_PATH with "set" in vscode) and how to solve this?
I'm a developper in VS2017 but vscode is so different. Appreciate some help here.

Can Please someone support this?

This everthing is so anoying because I switched from eclipse to vscode cause of the include issue.

The ESP32 is really cool but these plugins don't seam to be final versions.

Regards, Manuel

Option to select where settings should be saved (VSC-251)

Currently, Onboarding works by appending the settings to the user settings, and building the project won't work if those settings are not specifically there.

There should be a way to choose if the settings should be user-wide and workspace-wide. An option for Onboarding and another one for the Command Palette. Consequently, the extension would default to look for workspace settings first before moving on to look at user settings, following the regular VSCode flow of workspace settings overriding user's, or another option to choose which one should take precedence, should there ever be a need for such a thing.

The main reason why this is a must have it's because it makes it easy to work with multiple projects, versions of the toolchain, and versions of ESP-IDF. Another reason is pollution of user configurations, especially if VSCode isn't used solely for ESP32 development. I'm sure there are others, but these are the ones that I can think of right now.

ESP-IDF: Create ESP-IDF project (VSC-238)

Describe the bug
this command doesnt exist (readme says it does)
Press F1 and type ESP-IDF: Create ESP-IDF project to generate a template ESP-IDF project.

To Reproduce
press f1, type "ESP-IDF: Create ESP-IDF project"

Expected behavior
create a template project

Screenshots
image

Environment (please complete the following information):

  • Windows 10
  • VSCode Version: 1.42
  • ESP-IDF Version: 4.0
  • Python Version: 3.7

Additional context
seems there is a command "Create ESP-IDF Project"

doesnt have the prefix "ESP-IDF:"

Building ouput format unexpected (VSC-234)

Describe the bug
Esp-idf build Output format contains unexpected spaces and lines.
Here is part of the logs.

[1/909] Generating project_elf_src.
c

[2/909] Generating linker s
cript...

[3/909] Generating ../../partition_table/partition-table.bin

[4/909] Building ASM obje
ct esp-idf/f
r
e
e
r
t
o
s/CMakeFiles/__idf_
freer
tos.dir/xtensa
/xtensa_int
r
_asm.S.obj

[5/909] Building ASM
 object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/expression_with_stack_xtensa_asm.S.obj

[6/909] Building ASM object esp-idf/xtensa/CMak
eFiles/__idf_xtensa.dir/debug_helpers_asm.S.obj

[7/909] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/eri.c.obj

[8/909] Building C obje
ct esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/trax.c.obj

[9/909] Building C obj
ect esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/debug_helpers.c.obj

To Reproduce

  1. Install Esp-idf extension, get onboard, and create a helloworld project.
  2. Build (and the building successes.)
  3. examine the output log

Expected behavior
Building log shows line by line.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS Name & Version: [Win10]
  • VSCode Version: [1.42]
  • ESP-IDF Version: [4.1]
  • Python Version: [3.7]

Additional context
Btw, I also have the issue about include Error, like following header file not found in the editor.
#include "freertos/FreeRTOS.h"

Tried solution mentioned in VSC-229, didn't work out.
So I hardcoded absolute path in .vscode\c_cpp_properties.json, and finally got it work.
It looks like that the idf.espIdfPath is not resolved correctly, wired.
The esp-idf extension is correctly configured because the project builds.

            "includePath": [
                "${workspaceFolder}/**",
                "D:/workspace/vscode/esp-idf.v4/components/**",
                "${config:idf.espIdfPath}/components/**"

            ],

fresh install of extenstions - menuconfig hangs (VSC-210)

i just installed the extension... did all the onboarding setup...
no known errors... everything went well during setup

then created example hello world
and clicked on the launch gui configuration icon

and it did a lot of stuff then hangs
Menuconfig: Loading Initial values...

image

Visual Studio Code hangs when closing integrated-terminal running menuconfig (IDFGH-2443) (VSC-168)

Environment

  • IDF version (run git describe --tags to find it):
    v4.1-dev-1572-g30372f5a4
  • Build System: [CMake]
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it):
    xtensa-esp32-elf-gcc (crosstool-NG esp-2019r2) 8.2.0
  • Operating System: [Windows]

Problem Description

When closing the vs code integrated-terminal when it's showing the menuconfig vscode hangs.

This seems to be a vscode issue, but I'm not to sure about that as I'm unable to find the root cause.

I think it may be due to idf.py starting a sub binary (the kconfig-frontend?), but not handling the closing of the terminal correctly?

I also tested this when running an infinite loop in a python script and also calling a different executable (cmd.exe) from a python script, but both times closing the terminal worked as expected.

All ideas are welcome!

See microsoft/vscode#87840 for more details.

Error on build in version 0.2.1 (VSC-316)

Describe the bug
Build randomly fails with error: "Make sure you have the build tools installed and set in $PATH".
After a restart it usually works, but not always. When it fails, there is no message in "ESP-IDF Build" output. The behavior is the same whether esp-idf is installed using the Windows installer or the wizard in the extension.

Downgrading the extension to 0.2.0 solves the problem.

To Reproduce

  1. Install ESP-IDF using Windows installer or using the wizard in the vscode-esp-idf extension.
  2. Run either "ESP-IDF: Build your project" task or click the build button in status bar.

Expected behavior
Project gets build as ESP-IDF is installed and the extension is correctly configured.

Environment (please complete the following information):

  • OS Name & Version: Windows 10 1909
  • VSCode Version: 1.44.2
  • ESP-IDF Version: 4.0.0
  • Python Version: 3.8

Logs

{"user":true,"message":"Make sure you have the build tools installed and set in $PATH","stack":"Error: spawn cmake ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)\n\tat onErrorNT (internal/child_process.js:456:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:77:11)","level":"error","timestamp":"2020-05-02T20:03:51.383Z"}

Error with ESP-IDF GUI Menuconfig tool (VSC-222)

Describe the bug
Variables defined as strings can't be modified with GUI menuconfig tool due to JSON error format. When you modify string variable, i.e. LWIP->Local netif hostname to espressif2 and try to save it, JSON passed to server is bad format and an error is shown:

{"version": 2, "set": { "LWIP_LOCAL_HOSTNAME": espressif2 }}

{"version": 2, "error": ["JSON formatting error: Expecting value: line 1 column 48 (char 47)"]}

Because LWIP_LOCAL_HOSTNAME is a string, value in json must be "double quoted" and value passed must be:

{"version": 2, "set": { "LWIP_LOCAL_HOSTNAME": "espressif2" }}

To Reproduce

  1. Open any IDF example.
  2. Open GUI menuconfig tool.
  3. Modify any "string" variable, i.e. LWIP->Local netif hostname.
  4. Click on save and see vscode output log.

Screenshots
If applicable, add screenshots to help explain your problem.
imagen

Environment (please complete the following information):

  • Windows 10
  • VSCode Version: 1.41.1
  • ESP-IDF Version: ESP-IDF v4.1-dev-1935-g647cb628a
  • Python Version: 3.7.6

Monitor Fails (VSC-211)

when clicking on the monitor icon...
using power shell, doesnt matter if its command prompt... pretty much same error

PS C:\esp32\blink> set IDF_PATH=C:\Users\mitchjs\esp-idf PS C:\esp32\blink> C:\Users\mitchjs\.espressif\python_env\idf4.0_py3.8_env\Scripts\python.exe C:\Users\mitchjs\esp-idf\tools\idf.py -p COM7 monitor Traceback (most recent call last): File "C:\Users\mitchjs\esp-idf\tools\idf.py", line 1297, in <module> ret = subprocess.call( File "C:\Users\mitchjs\AppData\Local\Programs\Python\Python38-32\Lib\subprocess.py", line 340, in call with Popen(*popenargs, **kwargs) as p: File "C:\Users\mitchjs\AppData\Local\Programs\Python\Python38-32\Lib\subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\mitchjs\AppData\Local\Programs\Python\Python38-32\Lib\subprocess.py", line 1307, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

problems with missing python dependencies (VSC-279)

Windows 10
esp-idf 4.2 (master) - installed from git
esp-tools - downloaded and installed separately, v 2.3
Python 3.7.5

Installed ESP-IDF vscode extension but at the end of process i had some error message about missing python dependencies (which was strange because all python dependencies were already installed by the esp tools setup). Fixed this by running pip install command suggested by the error message, and then was able to finish the onboarding successfully, but still get error when trying to build esp-idf projects:

-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
The following Python requirements are not satisfied:
click>=5.0
pyserial>=3.0
future>=0.15.2
cryptography>=2.1.4
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
esp-windows-curses; sys_platform == 'win32'
Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide
⚠️ CMake Error at C:/tools/esp-idf/tools/cmake/build.cmake:271 (message):
  Some Python dependencies must be installed.  Check above message for
  details.
Call Stack (most recent call first):
  C:/tools/esp-idf/tools/cmake/build.cmake:397 (__build_check_python)
  C:/tools/esp-idf/tools/cmake/project.cmake:395 (idf_build_process)
  CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
See also "C:/espdev/masterpiec2/blink/build/CMakeFiles/CMakeOutput.log".

cmakeoutput.log file shows just normal compilation, no error messages

But all the required libraries are installed - they were installed during esp tools setup. And to be sure i reinstalled them. No success.

edit: checked, all packages are there, with required versions.
and the project builds OK with idf.py commandline (idf.py build), only refuses to build with VS extension.
Maybe the VSCode extension has some different python environment than the rest of esp-idf tools?

C:\tools\esp-idf>python  -m pip list
Package                       Version
----------------------------- ----------
astroid                       2.3.3
backports.functools-lru-cache 1.6.1
certifi                       2019.11.28
cffi                          1.14.0
chardet                       3.0.4
click                         7.1.1
colorama                      0.4.3
cryptography                  2.8
esp-windows-curses            0.1
future                        0.18.2
graphviz                      0.13.2
idna                          2.9
isort                         4.3.21
lazy-object-proxy             1.4.3
mccabe                        0.6.1
pip                           20.0.2
psutil                        5.7.0
pycparser                     2.20
pyelftools                    0.26
pygdbmi                       0.9.0.3
pylint                        2.4.4
pyparsing                     2.3.1
pyserial                      3.4
pywin32                       227
requests                      2.23.0
setuptools                    46.1.3
six                           1.14.0
typed-ast                     1.4.1
typing                        3.7.4.1
urllib3                       1.25.8
virtualenv                    16.7.9
wheel                         0.34.2
windows-curses                2.1.0
wrapt                         1.11.2
xmlrunner                     1.7.7

Can not start debugger (VSC-265)

I have a problem to start debugger. OpenOCD is running, but the debugger stops almost immediatelly after the green arrow is pressed. Unfortunatelly no output is printed in either console. There is probably problem with the ${command:espIdf.getProjectName} variable. I have tried to find workaround and the following is working. Also there is needed to run xtensa-esp32-elf-gdb.exe under the windows.

launch.json

"miDebuggerPath": "xtensa-esp32-elf-gdb",
"program": "${workspaceFolder}/build/app-template.elf",
"windows": {
                "miDebuggerPath": "xtensa-esp32-elf-gdb.exe",
                "program": "${workspaceFolder}\\build\\app-template.elf",
 },

Extension 0.1.4
vscode 1.43.1
python 3.8.1
Windows 10

Support ESP8266 RTOS SDK? (VSC-261)

Looking for an alternative to Arduino; I need a platform that can compile ESP32 and ESP8266 code without any/many changes to the original code.
Arduino is NONOS
PlatformIO is the (very) old ESP8266 RTOS SDK 1.5beta5

With ESP8266 RTOS SDK being similar to ESP-IDF, can this extension support ESP8266? That way, I have one environment to program the two different chips.

Linker Error: failed to parse ESP-IDF/components/esp_event/linker.lf (VSC-237)

while I'm able to easily build and flash the hello_world sample from idf command prompt, the VS Code Extension gives the following error:

failed to parse C:/Users/r/esp/ESP-IDF/components/esp_event/linker.lf

detail:


[2/5] Generating ld/esp32.project.
ld
FAILED: esp-idf/esp32/ld/esp32.project.ld 
cmd.exe /C "cd /D C:\Users\r\esp\hello_world\build\esp-idf\esp32 && python c:/Users/r/esp/ESP-IDF/tools/ldgen/ldgen.py --config C:/Users/r/esp/hello_world/sdkconfig --fragments C:/Users/r/esp/ESP-IDF/components/esp_ringbuf/linker.lf	C:/Users/r/esp/ESP-IDF/components/spi_flash/linker.lf	C:/Users/r/esp/ESP-IDF/components/esp_wifi/linker.lf	C:/Users/r/esp/ESP-IDF/components/lwip/linker.lf	C:/Users/r/esp/ESP-IDF/components/esp_event/linker.lf	C:/Users/r/esp/ESP-IDF/components/espcoredump/linker.lf	C:/Users/r/esp/ESP-IDF/components/esp32/linker.lf	C:/Users/r/esp/ESP-IDF/components/esp32/ld/esp32_fragments.lf	C:/Users/r/esp/ESP-IDF/components/xtensa/linker.lf	C:/Users/r/esp/ESP-IDF/components/soc/linker.lf	C:/Users/r/esp/ESP-IDF/components/heap/linker.lf	C:/Users/r/esp/ESP-IDF/components/freertos/linker.lf	C:/Users/r/esp/ESP-IDF/components/newlib/newlib.lf	C:/Users/r/esp/ESP-IDF/components/app_trace/linker.lf	C:/Users/r/esp/ESP-IDF/components/esp_gdbstub/linker.lf --input C:/Users/r/esp/ESP-IDF/components/esp32/ld/esp32.project.ld.in --output C:/Users/r/esp/hello_world/build/esp-idf/esp32/ld/esp32.project.ld --kconfig c:/Users/r/esp/ESP-IDF/Kconfig --env-file C:/Users/r/esp/hello_world/build/config.env --libraries-file C:/Users/r/esp/hello_world/build/ldgen_libraries --objdump C:/Users/r/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-objdump.exe"
linker script generation failed for C:/Users/r/esp/ESP-IDF/components/esp32/ld/esp32.project.ld.in
ERROR: failed to parse C:/Users/r/esp/ESP-IDF/components/esp_event/linker.lf
Expected end of text, found 'i'  (at char 0), (line:1, col:1)
ninja: build stopped: subcommand failed.

This is a fresh install of VSCode, and the extension.

  • OS Name & Version: Win 10
  • VSCode Version: 2019
  • ESP-IDF Version: 4.0
  • Python Version: 3.7 (whichever is installed by the idf)

Additional context
prior to this, I was getting errors about missing python packages Pyserial and pyparsing. These are present when I open the IDF command prompt but not in a regular cmd.exe, so I pip installed them.

[GitHub] Missing UI options to create new issues (VSC-275)

After navigating to "Issues" -> "New issue" on GitHub I am presented with only the three external forum links.

There is no option to actually create a new issue here (ie. the usual 'bug report' / 'feature request' template links are absent).

IDF_PATH environment variable is different from inferred IDF_PATH (VSC-310)

Hello,

Describe the bug
I get the warning from CMAKE : IDF_PATH environment variable is different from inferred IDF_PATH

To Reproduce
Build the template created by the VScode xtension

Expected behavior
Build without warning

Environment (please complete the following information):

  • OS Name & Version: latest windows 10 pro 64 bits. Windows_NT x64 10.0.18363
  • VSCode Version: Version: 1.44.2
  • ESP-IDF Version: v4.0
  • Python Version: 3.8

Logs
If applicable, please share the log file which can be obtained from

  • Windows: `%USERPROFILE%.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log : can't share the log (file not supported ?)

Additional context
build output :

⚠️ CMake Warning at H:/Espressif/esp-idf/tools/cmake/idf.cmake:14 (message):
  IDF_PATH environment variable is different from inferred IDF_PATH.

                              Check if your project's top-level CMakeLists.txt includes the right
                              CMake files. Environment IDF_PATH will be used for the build.
Call Stack (most recent call first):
  H:/Espressif/esp-idf/tools/cmake/project.cmake:7 (include)
  CMakeLists.txt:6 (include)

Problem Matcher support for IDF Build, Flash, and other tasks (VSC-227)

Hello!

My problem is, that with even the 0.1.3 the VSCode can't highlight me in the Editor (or at the Problems) the errors/warnings given by the output (at build). I tried more settings in the tasks.json file, but none of it worked.
Can you give me tips to use it properly?
(I added errors to my code, it fails to build, but the VSCode doesn't recognize it as a problem.
The problem matcher pattern is matched by the output (as I tested in an online tester). )

Hexadecimal menuconfig items are saved incorrectly (VSC-292)

After changing a menuconfig item with a hex value and clicking the save button, its "0x" prefix is truncated in the updated sdkconfig file.

Taking CONFIG_USB_DESC_CUSTOM_VID, for example, with this default value in sdkconfig:

CONFIG_USB_DESC_CUSTOM_VID=0x1234

After 'Launch GUI configuration tool' -> changing this value to 0x1235 -> Save:

CONFIG_USB_DESC_CUSTOM_VID=1235

Interestingly, it appears correctly as "0x1235" in the GUI, even after reopening Code.

Extension 0.2.0

Remote Debugging over local network (VSC-278)

I want to use my jtag adapter for debugging via the Internet, without a direct connection via usb using port 3333, so I want to be able to debug via OpenOCD-client.
I also want to say that I would like to see the output of information in one window, because after build and flash the data output window does not go between the commands.

Invalid template-app CMakeLists with IDF version < 4 (VSC-257)

The CMakeLists.txt for the template-app has been updated for IDF v4.x (#38) which breaks compatibility with IDF v3.x:

CMake Error at /.../main/CMakeLists.txt:1 (idf_component_register):
Unknown CMake command "idf_component_register".

Perhaps there should be a duplicate template-app with the original v3-compatible CMakeLists.txt? eg. "template-app (for IDF pre-v4.0)".

IDF Onboarding virtualenv unrecognized arg: --no-site-packages (VSC-244)

Pre Bug Report Checklist
Before reporting any bug please make sure of these points.

  • Make sure you have searched for existing bugs and features request before you post an issue.
  • This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
  • I've read the docs and found no information that could have helped solving the issue.

Describe the bug
Onboarding is trying to execute virtualenv with --no-site-packages, which has been deprecated for some time now. Latest Windows IDF installer installs a version that doesn't have it any more, causing onboarding to fail. This was just recently fixed in the Windows installer: espressif/esp-idf#4744

To Reproduce
Install ESP-IDF using the standard installer (latest 2.3 version). Install ESP-IDF VSCode extension, start onboarding. Onboarding will fail on Define ESP-IDF tools install directory. stage.

Expected behavior
Onboarding to proceed, virtualenvs to be created.

Screenshots
image

Environment (please complete the following information):

  • OS Name & Version: Windows 10, 1904
  • VSCode Version: 1.41.1
  • ESP-IDF Version: 4.1 I think
  • Python Version: 3.7.3

Additional context
This was just recently fixed in the Windows installer: espressif/esp-idf#4744

Configure ESP-IDF extension fails at the stage of downloading tools at Python 3.8 (VSC-329)

Describe the bug
Hi guys! I'm preparing a debugging training right now and experimenting with the clean installation of the extension.

I've faced with the bug breaking the configuration process with the Python 3.8.2 (Python 2 works).

To Reproduce

  • Create a new project
  • Call >ESP-IDF: Configure ESP-IDF extension
  • At the step of downloading tools you'll get the error

Expected behavior
Installing of the tools and appearing of the button "Next"

Screenshots
Screenshot from 2020-05-18 13-42-31

Environment (please complete the following information):

  • OS Name & Version: Ubuntu 20.04
  • VSCode Version: 1.45.1
  • ESP-IDF Version: 4.2
  • Python Version: 3.8.2

Logs
esp-idf_output_panel.log
esp_idf_vsc_ext.log

IDF Project must be added to workspace for onboarding to work (VSC-209)

Steps to recreate

  1. Clear VSCode workspace of any projects
  2. Do a fresh install of the ESP-IDF extension
  3. ESP-IDF extension does not open at all.

The VS Code Developer Tools log shows the following:

console.ts:137 [Extension Host] activating extension
console.ts:137 [Extension Host] starting language server
console.ts:137 [Extension Host] (node:8736) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:137
console.ts:137 [Extension Host] (node:8736) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:137
play_light.svg:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
console.ts:137 [Extension Host] activating extension
console.ts:137 [Extension Host] starting language server
abstractExtensionService.ts:396 Activating extension 'espressif.esp-idf-extension' failed: Cannot read property 'uri' of undefined.
_logMessageInConsole @ abstractExtensionService.ts:396
console.ts:137 [Extension Host] (node:5168) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:137
console.ts:137 [Extension Host] (node:5168) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:137

Environment:

  • OS Name & Version: Windows 7 Professional
  • VSCode Version: 1.41.1
  • ESP-IDF Version: Master
  • Python Version: 3.7.2

Adopt VS Code's 'asWebviewUri' API (VSC-323)

Hi, I maintain VS Code's Webview API

Issue

Our telemetry suggests that your extension uses webviews and may be loading resources in these webviews using hardcoded vscode-resource: URIs. These URIs have some important limitations and don't work properly when VS Code is run in a browser. We are also making changes in the desktop version of VS Code that may cause these URIs to not work properly in future versions of VS Code.

While we are making our best effort to continue support existing webview extensions that use vscode-resource: URIs on desktop versions of VS Code, we will not able to fully support all uses cases.

Fix

To ensure that your extension continues to work in as many environments as possible—including on web and remotely—please:

These APIs shipped around 2 years ago so they should be available in all modern versions of VS Code. You can find additional information about the issue here: microsoft/vscode#97962

Let me know if you have any questions about this change

Windows asking how do you want to open this file, when running task (VSC-199)

When I run some task, windows asks "How do you want to open this file" (means idf.py).

my workaround is to run python command and put the script as an argument, the example for the Clean task

"windows": {
    "command": "python",
    "args": [
        "${config:idf.espIdfPathWin}\\tools\\idf.py",
        "fullclean"
    ]
},

Windows 10, VSCode 1.41.1, ESP Extension 0.1.2, ESP-IDF Version 4, Python 3.7.3

Make sure you have the build tools installed and set in $PATH (VSC-324)

I had used ESP-IDF with vs code and it worked fine but after a month it stops working and showing error. Kindly guide

Screenshots
If applicable, add screenshots to help explain your problem.
image

Environment

  • OS Name & Version: [Windows 10]
  • VSCode Version: [e.g. 1.45.1]
  • ESP-IDF Version: [e.g. v4.0]
  • Python Version: [e.g. 3.7.3]

Logs
{"user":true,"message":"Make sure you have the build tools installed and set in $PATH","stack":"Error: spawn cmake ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)\n\tat onErrorNT (internal/child_process.js:456:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:77:11)","level":"error","timestamp":"2020-05-16T07:32:17.171Z"}

Cannot run OpenOCD with v0.1.2 (VSC-200)

It is not possible to start an OpenOCD debugger from the task or via the status bar button. It was working in the previous version.

When I press the status bar button, the following error is raised

this.openOcdConfigFilesList.forEach is not a function

If a try to start the OpenOCD task, this error is raised

'${config:idf.openOcdScriptsPathWin}'
can not be resolved because setting
'idf.openOcdScriptsPathWin' not found.

Obviously, there are missing configure variables and probably something else

config:idf.openOcdBin
config:idf.openOcdScriptsPath
command:espIdf.getOpenOcdConfigs

Windows 10, VSCode 1.41.1, ESP Extension 0.1.2, ESP-IDF Version 4, Python 3.7.3

Open Example Project only copies one level deep (VSC-220)

Describe the bug
Creating an example only copies one level of folders.

To Reproduce
Open the example menu, choose a project containing multiple levels of folders (eg restful server, touch_pad_read,...) click "Create project using example...".
results in nested folders being treated as files:
afbeelding

Expected behavior
Fully recursively copied folders and files.

Screenshots
Leftside: original example in esp-idf folder, rightside: the folder after copy.
afbeelding

Environment:
plugin version 0.1.2
Windows 10

Wrong version of toolchain installed for IDF v3.3.1 (VSC-249)

Pre Bug Report Checklist
Before reporting any bug please make sure of these points.

  • Make sure you have searched for existing bugs and features request before you post an issue.
  • This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
  • I've read the docs and found no information that could have helped solving the issue.

Describe the bug
I tried the vscode extension from the marketplace and ran into a bug that's been fixed already, so I built the extension from source and installed that. When selecting IDF v3.3.1 it still downloads the gcc 8 toolchain which doesn't work with 3.3.1.

I have worked around by manually running esp-idf/tools/idf_tools.py after finishing the extension onboarding process, and changing the custom extra paths.

I didn't see any other ways to configure which version of the toolchain to download, but I may have missed them.

To Reproduce
Build extension from source and install
Select v3.3.1 during onboarding

Expected behavior
It downloads the correct version of gcc and other tools compatible with v3.3.1 by running esp-idf/tools/idf_tools.py install

Environment (please complete the following information):

  • OS Name & Version: Ubuntu 18.04
  • VSCode Version: 1.42.1
  • ESP-IDF Version: 3.3.1
  • Python Version: 2.7.17

Auto save before build (VSC-267)

It would be great, if there would be auto save before build. It would be helpful also with the build - flash - monitor combo. As I very often forgot to save before build, this feature would save me a lot of time :)

OpenOCD board.cfg configuration (VSC-280)

Hi.

I can finally work with vscode debugger, but I want to ask about board.cfg passed to openocd.

When I started trying debugger and clicked on Lauch, every time an error "OpenOCD exit with error code 1" was shown. Reviewing logs, error was related with board/esp32-wrover.cfg file. As I have an esp-wrover-kit 4.1, I knew that I must use board/esp32-wrover-kit-3.3v.cfg. Extension uses board/esp32-wrover.cfg by default but I couldn't find an option to change it. Finally, I edited package.json file in vscode extension directory and then, debugger started and worked without problem.

So, my question, is there any option in launch.json or any other file where I can set board.cfg file instead of modify package.json?

Regards.

SPACE in Path to Python on Windows prevents completion of the Onboarding wizzard (VSC-282)

Describe the bug
Unable to complete IDF Onboarding config steps. Everything checks in OK, except the last step when verifying Python requirements..
##################################################
Verify Python packages requirements
Command failed: C:\Users\STUPID USER.espressif\python_env\idf4.0_py3.8_env\Scripts\python.exe c:\esp\esp-idf\tools\check_python_dependencies.py -r c:\esp\esp-idf\requirements.txt
'C:\Users\STUPID' is not recognized as an internal or external command,
operable program or batch file.
###################################################
The above runs OK at command prompt with quotation marks around "C:\Users\STUPID USER.espressif\python_env\idf4.0_py3.8_env\Scripts\python.exe"

To Reproduce
Follow the Onboarding Wizzard config steps on Windows 10 with a SPACE in full path to python.exe

Expected behavior
All requirements satisfied and configuration saved.

Environment:

  • OS Name & Version: Windows 10
  • VSCode Version: 1.43.2
  • ESP-IDF Version: 4.0
  • Python Version: 3.8.2

Debug feature estimation time (VSC-254)

Hi.

My esp32 develop is growing in complexity quickly. Till now, I can "debug" programs in old school mode... uart logs. However, I need better and accurate debug tool. Is there an estimation when debug feature will be available in vscode? should I change to eclipse IDE + idf plugin?

Thanks in advance.

Need to update app-template (VSC-236)

Describe the bug
CMakefile.txt is using old components registration API, which doesn't have document support.

To Reproduce

Press F1 and type ESP-IDF: Create ESP-IDF project to generate a template ESP-IDF project.

Expected behavior
I suppose CMakefile.txt should be using idf_component_register instead of register_component

Screenshots
image

Environment (please complete the following information):
OS Name & Version: [Win10]
VSCode Version: [1.42]
ESP-IDF Version: [4.1]
Python Version: [3.7]

Additional context
https://github.com/espressif/esp-idf-template

Completely lost with errors setting up VSCode ESP-IDF extension (VSC-320)

Thank you for this great tool.

Pre Bug Report Checklist
Before reporting any bug please make sure of these points.

  • Make sure you have searched for existing bugs and features request before you post an issue.
  • This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
  • I've read the docs and found no information that could have helped solving the issue.

Describe the bug
I made a video showing ESP-IDF working from the terminal, followed by the VSCode issue: https://www.youtube.com/watch?v=WJATDQhhZM4&feature=youtu.be

ESP-IDF works correctly on the command line after following instructions from Espressif, but I'm having issues understanding what the issue is with the VSCode extension. I hope it's just a missing configuration option that I overlooked, but I'm not sure yet.

I also don't understand the difference between the python environment I created at ~/.pyenv/esp-idf during the ESP-IDF setup tutorial, vs the one ESP-IDF apparently made for itself under ~/.espressif. Or why neither of those environments seem to be actually needed when sourcing esp-idf/export.sh in practice.

  • Intellisense is not understanding some of the ESP-IDF library variables, such as portTICK_PERIOD_MS.

I have encountered multiple errors in the terminal section of VSCode when trying to build, including:

  • identifier "CONFIG_FREERTOS_HZ" is undefined [35,27]
  • The task provider for "C/C++" tasks unexpectedly provided a task of type "shell".
  • > Executing task: /usr/bin/python /home/yankee/build/src/esp-idf/tools/idf.py build < 'cmake' must be available on the PATH to use /home/yankee/build/src/esp-idf/tools/idf.py The terminal process terminated with exit code: 2 Terminal will be reused by tasks, press any key to close it.

To Reproduce

  1. Setup ESP-IDF via the command line and show that it is working.
  2. Install VSCode and the ESP-IDF extension
  3. Setup ESP-IDF extension following onboarding instructions, using existing ESP-IDF from step 1.
  4. Look at extra instructions from VSCode Extension GitHub page
  5. Try to run hello_world ESP32 project
  6. Encounter many errors

Expected behavior
Once the onboarding process confirmed the existence and location of the build dependencies, I expected it to be able to build without an issue.

Screenshots
https://www.youtube.com/watch?v=WJATDQhhZM4&feature=youtu.be

Environment (please complete the following information):

  • OS Name & Version:
$ uname -a
Linux ibn5100 5.6.0-1-amd64 #1 SMP Debian 5.6.7-1 (2020-04-29) x86_64 GNU/Linux

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bullseye/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
  • VSCode Version:
$ code --version
1.45.0
d69a79b73808559a91206d73d7717ff5f798f23c
x64
  • ESP-IDF Version:
$ git log
commit b0f053d82dc4484479521a0d49a0b6917946602a (HEAD -> release/v4.0, origin/release/v4.0)
  • Python Version:
$ python --version
Python 3.8.3rc1

Logs
If applicable, please share the log file which can be obtained from

  • Windows: %USERPROFILE%\.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log
  • Linux & MacOSX: $HOME/.vscode/extensions/espressif.esp-idf-extension-VERSION/esp_idf_vsc_ext.log
    esp_idf_vsc_ext.log

Additional context
Add any other context about the problem here.

getting charmap codec error (VSC-268)

Windows 10.
Python 3.8.2
ESP-IDF Version: 4.0

Opened a new User in my computer(English language instaed of Hebrew on the other two), fresh intalled VSCODE,Git,Python,ESP-IDF.
this works on another computer in the same way I did to this user. what am I missing????
I'm trying to solve this 3 days now, losing hope, losing my mind.

I get this problem when trying to build blink example:

-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.25.1.windows.1") 
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/Users/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Project version: 1
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Python requirements from C:\Users\ESP32\esp-idf\requirements.txt are satisfied.
⚠️ Traceback (most recent call last):
  File "C:/Users/ESP32/esp-idf/tools/kconfig_new/confgen.py", line 571, in <module>
    main()
  File "C:/Users/ESP32/esp-idf/tools/kconfig_new/confgen.py", line 230, in main
    config = kconfiglib.Kconfig(args.kconfig)
  File "C:\Users\ESP32\esp-idf\tools\kconfig_new\kconfiglib.py", line 653, in __init__
    self._parse_block(None,           # end_token
⚠️   File "C:\Users\ESP32\esp-idf\tools\kconfig_new\kconfiglib.py", line 1632, in _parse_block
    self._parse_block(_T_ENDMENU,
  File "C:\Users\ESP32\esp-idf\tools\kconfig_new\kconfiglib.py", line 1584, in _parse_block
    prev_node = self._parse_block(None,            # end_token
  File "C:\Users\ESP32\esp-idf\tools\kconfig_new\kconfiglib.py", line 1584, in _parse_block
    prev_node = self._parse_block(None,            # end_token
  File "C:\Users\ESP32\esp-idf\tools\kconfig_new\kconfiglib.py", line 1551, in _parse_block
    while self._has_tokens or self._next_line():
  File "C:\Users\ESP32\esp-idf\tools\kconfig_new\kconfiglib.py", line 1186, in _next_line
    self._line = self._file.readline()
  File "C:\Users\ESP32\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp1255.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8c in position 3651: character maps to <undefined>
⚠️ CMake Error at C:/Users/ESP32/esp-idf/tools/cmake/kconfig.cmake:208 (message):
  Failed to run confgen.py
  (C:\Users\ESP32\.espressif\python_env\idf4.0_py3.8_env\Scripts\python.exe;C:/Users/ESP32/esp-idf/tools/kconfig_new/confgen.py;--kconfig;C:/Users/ESP32/esp-idf/Kconfig;--sdkconfig-rename;C:/Users/ESP32/esp-idf/sdkconfig.rename;--config;C:/Users/ESP32/Documents/blink/sdkconfig;--defaults;C:/Users/ESP32/Documents/blink/sdkconfig.defaults;--env-file;C:/Users/ESP32/Documents/blink/build/config.env).
  Error 1
Call Stack (most recent call first):
  C:/Users/ESP32/esp-idf/tools/cmake/build.cmake:441 (__kconfig_generate_config)
⚠️   C:/Users/ESP32/esp-idf/tools/cmake/project.cmake:337 (idf_build_process)
  CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!

Minor 'export not recognized...' error when starting monitor (VSC-184)

Describe the bug
Minor error when running monitor:
export IDF_PATH=c:\Users\tinus\esp\esp-idf 'export' is not recognized as an internal or external command, operable program or batch file.

To Reproduce
Start monitor, look at console output.

Expected behavior
No error.

Environment (please complete the following information):

  • OS Name & Version: [Windows 10]
  • VSCode Version: [e.g. 1.41.1]
  • ESP-IDF Version: master
  • Python Version: [3.7]

Additional context
This seems to originate from this piece of code:
afbeelding

However this line seems to be unnecessary as (at least on Windows) it does not seem to do anything as the monitor command afterward runs fine.

Thank you for providing this great extension!

kconfiglib's menuconfig rendered badly, barely usable in visual studio code integrated-terminal (Windows). (IDFGH-2442) (VSC-169)

Environment

  • IDF version (run git describe --tags to find it):
    v4.1-dev-1572-g30372f5a4
  • Build System: [CMake]
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it):
    xtensa-esp32-elf-gcc (crosstool-NG esp-2019r2) 8.2.0
  • Operating System: [Windows]

Problem Description

After updating to the latest version of esp-idf the menuconfig renders badly in the vscode integrated terminal.
Arrow keys did not work in previous versions either. As a workaround the j and k keys do work.

This is most likely an issue with the vscode integrated terminal, but maybe a workaround/fix is known.
See microsoft/vscode#87838 for more details.
Issue espressif/esp-idf#4067 is also equal to my issue, however using bash is not feasible.
Issue espressif/esp-idf#1969 also seems to be relevant, however removing/cleaning the build dir does not help.

Using existing Python install results in failure to find module 'future' when building. (VSC-183)

Describe the bug
Error when building:
from future.utils import iteritems ModuleNotFoundError: No module named 'future'

To Reproduce
Use a pre installed python distribution and build the project. By following the onboarding, keeping the suggested python install and (re)installing the ESP-IDF Tools.

Expected behavior
A build without errors.

Screenshots
afbeelding

Environment (please complete the following information):

  • OS Name & Version: [Windows 10]
  • VSCode Version: [e.g. 1.41.1]
  • ESP-IDF Version: master
  • Python Version: [3.7]

Additional context
The python path "C:\Users\tinus\AppData\Local\Programs\Python\Python37" was suggested in the onboarding.
After changing the above path to "C:\Users\tinus.espressif\python_env\idf4.1_py3.7_env\Scripts" in the option Custom Extra Paths the build runs successfully.

Thank you for providing this great extension!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.