espressif / vscode-esp-idf-extension

Visual Studio Code extension for ESP-IDF projects
https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/
Apache License 2.0
1.06k stars 304 forks source link

Always popup OpenBCD messages if device disconnected (VSC-1307) #1148

Closed liyafe1997 closed 8 months ago

liyafe1997 commented 8 months ago

OS

Linux

Operating System version

Ubuntu 22.04

Visual Studio Code version

1.86.2

ESP-IDF version

1.7.0

Python version

3.10.12

Doctor command output

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report --------------------------------------------- OS linux x64 6.5.0-18-generic System environment variable IDF_PYTHON_ENV_PATH undefined System environment variable PATH

/.local/bin:/Android/Sdk/platform-tools:/nrfutil:/.nvm/versions/node/v21.5.0/bin:/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin System environment variable PYTHON undefined Visual Studio Code version 1.86.2 Visual Studio Code language en Visual Studio Code shell /usr/bin/bash ESP-IDF Extension version 1.7.0 Workspace folder /repo/esp32-testing ---------------------------------------------------- Extension configuration settings ------------------------------------------------------ ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH} ESP-IDF Path (idf.espIdfPath) /esp/v5.2/esp-idf ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH} ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH} Custom extra paths (idf.customExtraPaths) /.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin:/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/.espressif/tools/esp-rom-elfs/20230320 Custom extra vars (idf.customExtraVars) OPENOCD_SCRIPTS: /.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts ESP_ROM_ELF_DIR: /.espressif/tools/esp-rom-elfs/20230320/ Virtual env Python Path (idf.pythonBinPath) /.espressif/python_env/idf5.2_py3.10_env/bin/python Serial port (idf.port) /dev/ttyACM0 OpenOCD Configs (idf.openOcdConfigs) board/esp32c6-builtin.cfg ESP-IDF Tools Path (idf.toolsPath) /.espressif Git Path (idf.gitPath) git Notification Mode (idf.notificationMode) All -------------------------------------------------------- Configurations access ------------------------------------------------------------- Access to ESP-ADF Path (idf.espAdfPath) false Access to ESP-IDF Path (idf.espIdfPath) true Access to ESP-MDF Path (idf.espMdfPath) false Access to ESP-Matter Path (idf.espMatterPath) false Access to ESP-IDF Custom extra paths Access to /.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin: true Access to /.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin: true Access to /.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin: true Access to /.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin: true Access to /.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: true Access to /.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin: true Access to /.espressif/tools/esp-rom-elfs/20230320: true Access to Virtual env Python Path (idf.pythonBinPath) true Access to CMake in environment PATH true Access to Ninja in environment PATH true Access to ESP-IDF Tools Path (idf.toolsPath) true -------------------------------------------------------- Configurations has spaces ------------------------------------------------------------- Spaces in system environment Path false Spaces in ESP-ADF Path (idf.espAdfPath) false Spaces in ESP-IDF Path (idf.espIdfPath) false Spaces in ESP-MDF Path (idf.espMdfPath) false Spaces in ESP-Matter Path (idf.espMatterPath) false Spaces in ESP-IDF Custom extra paths Spaces in /.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin: false Spaces in /.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin: false Spaces in /.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin: false Spaces in /.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin: false Spaces in /.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: false Spaces in /.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin: false Spaces in /.espressif/tools/esp-rom-elfs/20230320: false Spaces in Virtual env Python Path (idf.pythonBinPath) false Spaces in ESP-IDF Tools Path (idf.toolsPath) false ----------------------------------------------------------- Executables Versions ----------------------------------------------------------- Git version 2.34.1 ESP-IDF version 5.2.0 Python version 3.10.12 Python's pip version 24.0 -------------------------------------------------- Project configuration settings ---------------------------------------------------------- -------------------------------------------------- Python packages in idf.pythonBinPath ---------------------------------------------------- bitarray version: 2.9.2 bitstring version: 4.1.4 CacheControl version: 0.14.0 certifi version: 2024.2.2 cffi version: 1.16.0 charset-normalizer version: 3.3.2 click version: 8.0.4 colorama version: 0.4.6 construct version: 2.10.70 contextlib2 version: 21.6.0 cryptography version: 41.0.7 ecdsa version: 0.18.0 esp-coredump version: 1.10.0 esp-debug-backend version: 1.0.3 esp-idf-kconfig version: 1.4.2 esp-idf-monitor version: 1.4.0 esp-idf-panic-decoder version: 1.0.1 esp-idf-size version: 1.1.1 esptool version: 4.7.0 filelock version: 3.13.1 freertos-gdb version: 1.0.2 idf-component-manager version: 1.5.1 idna version: 3.6 intelhex version: 2.3.0 kconfiglib version: 14.1.0 markdown-it-py version: 3.0.0 mdurl version: 0.1.2 msgpack version: 1.0.7 packaging version: 23.2 pip version: 24.0 pyclang version: 0.4.2 pycparser version: 2.21 pyelftools version: 0.30 pygdbmi version: 0.9.0.2 Pygments version: 2.17.2 pyparsing version: 3.1.1 pyserial version: 3.5 PyYAML version: 6.0.1 reedsolo version: 1.7.0 requests version: 2.31.0 requests-file version: 1.5.1 requests-toolbelt version: 1.0.0 rich version: 13.7.0 schema version: 0.7.5 setuptools version: 69.1.0 six version: 1.16.0 tqdm version: 4.66.2 urllib3 version: 1.26.18 ---------------------------------------------------- Check ESP-IDF python requirements.txt ------------------------------------------------- Check ESP-IDF Python packages Python requirements are satisfied. ---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------ Check Debug AdapterPython packages Python requirements are satisfied. ----------------------------------------------------------- Latest error ----------------------------------------------------------------- Latest error at Unknown error in ESP-IDF Doctor Command -------------------------------------------------------------------------------------------------------------------------------------------- ### Extension _No response_ ### Description Everything works well. But if the USB JTAG devices (My device is ESP32C6 Dev Kit) was unplugged it can always popup message, cause the vscode died sometime, even CPU 100% ![Screenshot from 2024-02-28 08-59-44](https://github.com/espressif/vscode-esp-idf-extension/assets/18359157/27a01258-9156-4f74-abb2-633d8755bfad) ### Debug Message ```plain [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! [OpenOCD] ❌ Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: missing data from bitq interface Error: dmi_scan failed jtag scan Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] Info : esp_usb_jtag: serial (40:4C:CA:51:4F:40) [OpenOCD] Info : esp_usb_jtag: Device found. Base speed 24000KHz, div range 1 to 255 [OpenOCD] ❌ Error: missing data from bitq interface [OpenOCD] ❌ Error: failed jtag scan: -104 Error: [esp32c6] Failed DMI read at 0x11; status=2 Error: [esp32c6] polling failed! [OpenOCD] ❌ Error: libusb_bulk_read error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: libusb_open() failed with LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_read error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_read error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_read error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_read error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_read error: LIBUSB_ERROR_NO_DEVICE [OpenOCD] ❌ Error: esp_usb_jtag: device not found! Error: esp_usb_jtag: failed to revive USB device! Error: libusb_bulk_read error: LIBUSB_ERROR_NO_DEVICE ``` ### Other Steps to Reproduce _No response_ ### I have checked existing issues, online documentation and the Troubleshooting Guide - [X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.
brianignacio5 commented 8 months ago

Apologies for this will fix asap !

liyafe1997 commented 8 months ago

Apologies for this will fix asap !

Also, sometimes it continuously infinity keeping popup this even the device is keeping connected, super super annoying. Please optimize the OpenOCD things, it always do something like this and crash my VSCode and computer... 1

github-actions[bot] commented 8 months ago

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities