From 3d37ae7074cc71c335a968d2fff1b404434e4507 Mon Sep 17 00:00:00 2001 From: Brian Ignacio Date: Mon, 20 Oct 2025 16:42:09 +0800 Subject: [PATCH] remove old debug adapter and esp frameworks besides ADF --- .github/actions/idf/entrypoint.sh | 1 - .github/actions/idf/ui-entrypoint.sh | 1 - .gitmodules | 3 - .prettierignore | 1 - README.md | 38 +- README_CN.md | 38 +- docs_espressif/en/commands.rst | 12 - docs_espressif/en/settings.rst | 12 +- docs_espressif/zh_CN/commands.rst | 14 - docs_espressif/zh_CN/settings.rst | 12 +- esp_debug_adapter | 1 - l10n/bundle.l10n.es.json | 16 - l10n/bundle.l10n.pt.json | 16 - l10n/bundle.l10n.ru.json | 16 - l10n/bundle.l10n.zh-CN.json | 16 - package.json | 173 -------- package.nls.es.json | 18 +- package.nls.json | 16 - package.nls.pt.json | 20 +- package.nls.ru.json | 18 +- package.nls.zh-CN.json | 16 - src/cmdTreeView/cmdStore.ts | 30 -- src/config.ts | 3 - src/espHomekit/espHomekitDownload.ts | 39 -- src/espIdf/debugAdapter/checkPyReqs.ts | 52 --- .../debugAdapter/debugAdapterManager.ts | 338 --------------- src/espMatter/espMatterDownload.ts | 370 ----------------- src/espMdf/espMdfDownload.ts | 34 -- src/extension.ts | 388 +----------------- src/newProject/newProjectInit.ts | 44 -- src/newProject/newProjectPanel.ts | 14 - src/newProject/utils.ts | 4 - src/pythonManager.ts | 114 ----- .../download/espRainmakerDownload.ts | 39 -- src/support/checkExtensionRequirements.ts | 44 -- src/support/checkSpacesInSettings.ts | 12 - src/support/configurationAccess.ts | 17 +- src/support/configurationSettings.ts | 3 - src/support/index.ts | 4 +- src/support/initReportObj.ts | 9 - src/support/types.ts | 9 - src/support/writeReport.ts | 9 - src/test/adapter.test.ts | 61 --- src/test/doctor.test.ts | 33 +- src/test/project.test.ts | 1 - src/utils.ts | 41 -- src/views/setup/Welcome.vue | 5 - templates/.vscode/launch.json | 5 - testFiles/testWorkspace/.vscode/settings.json | 1 - 49 files changed, 17 insertions(+), 2164 deletions(-) delete mode 100644 .gitmodules delete mode 160000 esp_debug_adapter delete mode 100644 src/espHomekit/espHomekitDownload.ts delete mode 100644 src/espIdf/debugAdapter/checkPyReqs.ts delete mode 100644 src/espIdf/debugAdapter/debugAdapterManager.ts delete mode 100644 src/espMatter/espMatterDownload.ts delete mode 100644 src/espMdf/espMdfDownload.ts delete mode 100644 src/rainmaker/download/espRainmakerDownload.ts delete mode 100644 src/support/checkExtensionRequirements.ts delete mode 100644 src/test/adapter.test.ts diff --git a/.github/actions/idf/entrypoint.sh b/.github/actions/idf/entrypoint.sh index 84a59870c..f5ad3b665 100644 --- a/.github/actions/idf/entrypoint.sh +++ b/.github/actions/idf/entrypoint.sh @@ -8,7 +8,6 @@ export OLD_PATH=$PATH cd /github/workspace pip install --upgrade pip -pip install --constraint espidf.constraints.txt -r esp_debug_adapter/requirements.txt export GIT_VERSION=$( echo "$a" | echo $(git --version) | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p') export IDF_VERSION=$( echo "$a" | echo $(idf.py --version) | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p') diff --git a/.github/actions/idf/ui-entrypoint.sh b/.github/actions/idf/ui-entrypoint.sh index 01b981e33..ffbc51fb5 100644 --- a/.github/actions/idf/ui-entrypoint.sh +++ b/.github/actions/idf/ui-entrypoint.sh @@ -8,7 +8,6 @@ export OLD_PATH=$PATH cd /github/workspace pip install --upgrade pip -pip install --constraint espidf.constraints.txt -r esp_debug_adapter/requirements.txt export GIT_VERSION=$( echo "$a" | echo $(git --version) | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p') export IDF_VERSION=$( echo "$a" | echo $(idf.py --version) | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p') diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 4ae019efe..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "esp_debug_adapter"] - path = esp_debug_adapter - url = git@github.com:espressif/esp-debug-adapter.git diff --git a/.prettierignore b/.prettierignore index ec3a0b5ed..a11979000 100644 --- a/.prettierignore +++ b/.prettierignore @@ -26,7 +26,6 @@ node_modules/ templates/ testFiles/ media/ -esp_debug_adapter/ external/ test-resources/ docs_espressif/ diff --git a/README.md b/README.md index ce40c1ecc..b86442603 100644 --- a/README.md +++ b/README.md @@ -315,7 +315,7 @@ Press F1 or click menu `View` -> `Command Palette...` to show Visual - Additional frameworks + Additional frameworks Install ESP-ADF Clone ESP-ADF inside the selected directory and set idf.espAdfPath (idf.espAdfPathWin in Windows) configuration setting. @@ -328,42 +328,6 @@ Press F1 or click menu `View` -> `Command Palette...` to show Visual - - Install ESP-IDF Python Packages (DEPRECATION NOTICE) - Install extension Python packages. This command is deprecated and 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. 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 diff --git a/README_CN.md b/README_CN.md index fa2de0775..4d32d4f36 100644 --- a/README_CN.md +++ b/README_CN.md @@ -321,7 +321,7 @@ ESP-IDF 扩展在 VS Code 底部蓝色窗口的状态栏中提供了一系列命 - 可集成软件框架 + 可集成软件框架 安装 ESP-ADF 在所选目录中克隆 ESP-ADF,并配置 idf.espAdfPath(Windows 系统中为 idf.espAdfPathWin)。 @@ -334,42 +334,6 @@ ESP-IDF 扩展在 VS Code 底部蓝色窗口的状态栏中提供了一系列命 - - 安装 ESP-IDF Python 包(已弃用) - 安装扩展 Python 包。本命令已弃用,即将被移除。 - - - - - 安装 ESP-MDF - 在所选目录中克隆 ESP-MDF,并配置 idf.espMdfPath(Windows 系统中为 idf.espMdfPathWin)。 - - - - - 安装 ESP-Matter - 克隆 ESP-Matter 并配置 idf.espMatterPath。Windows 系统不支持 ESP-Matter。运行该命令前请确保已安装 Matter 系统依赖项。 - - - - - 设置 ESP-MATTER 设备路径 (ESP_MATTER_DEVICE_PATH) - ESP-IDF:设置 ESP-MATTER 设备路径 (ESP_MATTER_DEVICE_PATH) 命令用于定义 ESP-Matter 的设备路径。Windows 系统不支持 ESP-Matter。 - - - - - 安装 ESP-Rainmaker - 克隆 ESP-Rainmaker,并配置 idf.espRainmakerPath(Windows 系统中为 idf.espRainmakerPathWin)。 - - - - - 安装 ESP-HomeKit-SDK - 在所选目录中克隆 ESP-HomeKit-SDK,并配置 idf.espHomeKitSdkPath(Windows 系统中为 idf.espHomeKitSdkPathWin)。 - - - eFuse 获取 eFuse 摘要 diff --git a/docs_espressif/en/commands.rst b/docs_espressif/en/commands.rst index 6cf3a653b..cf7046f05 100644 --- a/docs_espressif/en/commands.rst +++ b/docs_espressif/en/commands.rst @@ -66,16 +66,6 @@ All commands start with ``ESP-IDF:``. - Import an existing ESP-IDF project, add .vscode and .devcontainer files to a new location, and optionally rename the project. * - Install ESP-ADF - Clone ESP-ADF inside the selected directory and set **idf.espAdfPath** (**idf.espAdfPathWin** in Windows) configuration setting. - * - Install ESP-IDF Python Packages (DEPRECATION NOTICE) - - Install extension Python packages. This command is deprecated and 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**. ESP-Matter is not supported on 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. * - Launch IDF Monitor for Core Dump Mode/GDB Stub Mode - Launch ESP-IDF Monitor with WebSocket capabilities. If you have configured the panic handler to gdbstub or core dump, the monitor will launch a post-mortem debug session of the chip. * - Launch QEMU Server @@ -122,8 +112,6 @@ All commands start with ``ESP-IDF:``. - This extension shows many notifications and output in the Output window **ESP-IDF**. This command allows you to set if to show notifications only, output only, both notifications and output, or neither. * - 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. - * - 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. * - Show Ninja Build Summary - Execute the Chromium ninja-build-summary.py. * - Size Analysis of the Binaries diff --git a/docs_espressif/en/settings.rst b/docs_espressif/en/settings.rst index f0c64d2b1..c5d25628e 100644 --- a/docs_espressif/en/settings.rst +++ b/docs_espressif/en/settings.rst @@ -80,7 +80,7 @@ This is how the extension uses them: 1. **idf.customExtraVars** stores any custom environment variable such as OPENOCD_SCRIPTS, which is the openOCD scripts directory used in OpenOCD server startup. These variables are loaded to this extension command's process environment variables, choosing the extension variable if available, else extension commands will try to use what is already in your system PATH. **This doesn't modify your system environment outside Visual Studio Code.** 2. **idf.espIdfPath** (or **idf.espIdfPathWin** in Windows) is used to store ESP-IDF directory path within our extension. We override Visual Studio Code process IDF_PATH if this value is available. **This doesn't modify your system environment outside Visual Studio Code.**. It is also used to compute the list of ESP-IDF tools to add to environment variable PATH and the Python virtual environment path together from **idf.toolsPath** and **idf.pythonInstallPath**. 3. **idf.pythonInstallPath** is the system Python absolute path used to compute ESP-IDF Python virtual environment from **idf.toolsPath** and **idf.espIdfPath** where ESP-IDF Python packages will be installed and used. -4. **idf.gitPath** (or **idf.gitPathWin** in Windows) is used in the extension to clone ESP-IDF master version or the additional supported frameworks such as ESP-ADF, ESP-MDF and Arduino-ESP32. +4. **idf.gitPath** (or **idf.gitPathWin** in Windows) is used in the extension to clone ESP-IDF master version or the additional supported frameworks such as ESP-ADF and Arduino-ESP32. 5. **idf.toolsPath** (or **idf.toolsPathWin** in Windows) is used to compute the list of ESP-IDF tools to add to environment variable PATH and the Python virtual environment path together from **idf.pythonInstallPath** and **idf.espIdfPath**. .. note:: @@ -313,16 +313,6 @@ These settings support additional frameworks together with ESP-IDF: - Path to locate ESP-ADF framework (ADF_PATH) * - **idf.espAdfPathWin** - Path to locate ESP-ADF framework in Windows (ADF_PATH) - * - **idf.espMdfPath** - - Path to locate ESP-MDF framework (MDF_PATH) - * - **idf.espMdfPathWin** - - Path to locate ESP-MDF framework in Windows (MDF_PATH) - * - **idf.espMatterPath** - - Path to locate ESP-Matter framework (ESP_MATTER_PATH) - * - **idf.espRainmakerPath** - - Path to locate ESP-Rainmaker framework in Windows (RMAKER_PATH) - * - **idf.espRainmakerPathWin** - - Path to locate ESP-Rainmaker framework in Windows (RMAKER_PATH) * - **idf.sbomFilePath** - Path to create ESP-IDF SBOM report diff --git a/docs_espressif/zh_CN/commands.rst b/docs_espressif/zh_CN/commands.rst index 2dd9b03d3..6423517cd 100644 --- a/docs_espressif/zh_CN/commands.rst +++ b/docs_espressif/zh_CN/commands.rst @@ -64,16 +64,6 @@ - 导入现有的 ESP-IDF 项目,在新位置添加 .vscode 和 .devcontainer 文件,同时可以重命名项目。 * - 安装 ESP-ADF - 在所选目录中克隆 ESP-ADF,并配置 **idf.espAdfPath**(Windows 系统中为 **idf.espAdfPathWin**)。 - * - 安装 ESP-IDF Python 包(已弃用) - - 安装扩展 Python 包。本命令已弃用,即将被移除。 - * - 安装 ESP-MDF - - 在所选目录中克隆 ESP-MDF,并配置 **idf.espMdfPath**(Windows 系统中为 **idf.espMdfPathWin**)。 - * - 安装 ESP-Matter - - 克隆 ESP-Matter 并设置 **idf.espMatterPath**。ESP-Matter 不支持 Windows。 - * - 安装 ESP-Rainmaker - - 克隆 ESP-Rainmaker,并配置 **idf.espRainmakerPath**(Windows 系统中为 **idf.espRainmakerPathWin**)。 - * - 安装 ESP-HomeKit-SDK - - 在所选目录中克隆 ESP-HomeKit-SDK,并配置 **idf.espHomeKitSdkPath**(Windows 系统中为 **idf.espHomeKitSdkPathWin**)。 * - 启动 IDF 监视器以支持 Core Dump 模式/GDB Stub 模式 - 启动支持 WebSocket 的 ESP-IDF 监控器。如果紧急处理程序已经配置为 gdbstub 或核心转储,监控器将启动芯片的事后调试会话。 * - 启动 QEMU 服务器 @@ -120,10 +110,6 @@ - 此扩展会在输出窗口 ESP-IDF 中显示通知和输出。此命令可设置是否只显示通知、只显示输出、两者都显示或都不显示。 * - 设置乐鑫设备目标 - 该命令为当前项目设置目标 (IDF_TARGET),效果等同于 **idf.py set-target**。例如,若想使用 ESP32 或 ESP32-C3,则需执行此命令。 - * - 设置 ESP-MATTER 设备路径 (ESP_MATTER_DEVICE_PATH) - - **ESP-IDF:设置 ESP-MATTER 设备路径 (ESP_MATTER_DEVICE_PATH)** 命令用于定义 ESP-Matter 的设备路径。Windows 系统不支持 ESP-Matter。 - * - 展示示例项目 - - 启动 UI 以显示所选框架的示例,可从中创建新项目。此命令将显示扩展中已配置的框架,如果想查看 ESP-Rainmaker 示例,需要先运行 **安装 ESP-Rainmaker** 命令(或设置相应的 idf.espRainmakerPath),然后执行此命令以查看示例。 * - 显示 Ninja 构建摘要 - 运行 Chromium ninja-build-summary.py。 * - 二进制文件大小分析 diff --git a/docs_espressif/zh_CN/settings.rst b/docs_espressif/zh_CN/settings.rst index 989ea1bfb..e42acfaf2 100644 --- a/docs_espressif/zh_CN/settings.rst +++ b/docs_espressif/zh_CN/settings.rst @@ -70,7 +70,7 @@ ESP-IDF 相关设置 1. **idf.customExtraVars** 用于存储自定义环境变量,例如 OPENOCD_SCRIPTS,用于指定启动 OpenOCD 服务器时所需脚本文件的目录路径。这些变量会加载到扩展命令的进程环境变量中,优先使用扩展变量,如果没有,则扩展命令会尝试使用系统 PATH 中已有的设置。**该配置项不会改变 VS Code 之外的系统环境。** 2. **idf.espIdfPath**(Windows 系统中为 **idf.espIdfPathWin**)用于在扩展中存储 ESP-IDF 目录路径。如果该值已配置,则 VS Code 进程中原有的 IDF_PATH 会被覆盖。**该配置项不会改变 VS Code 之外的系统环境。** 此外,扩展使用 **idf.espIdfPath**,结合 **idf.toolsPath** 和 **idf.pythonInstallPath**,来确定要添加到环境变量 PATH 中的 ESP-IDF 工具路径和 Python 虚拟环境路径。 3. **idf.pythonInstallPath** 是系统 Python 的绝对路径,基于 **idf.toolsPath** 和 **idf.espIdfPath** 来生成 ESP-IDF Python 虚拟环境路径。创建虚拟环境后,ESP-IDF 的 Python 包将在该环境中安装和使用。 -4. **idf.gitPath**(Windows 系统中为 **idf.gitPathWin**)在扩展中用于克隆 ESP-IDF master 版本及其他支持的框架,如 ESP-ADF、ESP-MDF 和 Arduino-ESP32。 +4. **idf.gitPath**(Windows 系统中为 **idf.gitPathWin**)在扩展中用于克隆 ESP-IDF master 版本及其他支持的框架,如 ESP-ADF 和 Arduino-ESP32。 5. **idf.toolsPath**(Windows 系统中为 **idf.toolsPathWin**)用于结合 **idf.toolsPath** 和 **idf.pythonInstallPath** 来确定要添加到环境变量 PATH 中的 ESP-IDF 工具路径和 Python 虚拟环境路径。 .. note:: @@ -301,16 +301,6 @@ QEMU 相关设置 - 定位 ESP-ADF 框架的路径 (ADF_PATH) * - **idf.espAdfPathWin** - 在 Windows 系统中定位 ESP-ADF 框架的路径 (ADF_PATH) - * - **idf.espMdfPath** - - 定位 ESP-MDF 框架的路径 (MDF_PATH) - * - **idf.espMdfPathWin** - - 在 Windows 系统中定位 ESP-MDF 框架的路径 (MDF_PATH) - * - **idf.espMatterPath** - - 定位 ESP-Matter 框架的路径 (ESP_MATTER_PATH) - * - **idf.espRainmakerPath** - - 定位 ESP-Rainmaker 框架的路径 (RMAKER_PATH) - * - **idf.espRainmakerPathWin** - - 在 Windows 系统中定位 ESP-Rainmaker 框架的路径 (RMAKER_PATH) * - **idf.sbomFilePath** - 创建 ESP-IDF SBOM 报告的路径 diff --git a/esp_debug_adapter b/esp_debug_adapter deleted file mode 160000 index 0cabfa413..000000000 --- a/esp_debug_adapter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0cabfa41372ae7b8d8133b0f82c7eb8e6025adc3 diff --git a/l10n/bundle.l10n.es.json b/l10n/bundle.l10n.es.json index ae71ff1d4..9ce3e2f4f 100644 --- a/l10n/bundle.l10n.es.json +++ b/l10n/bundle.l10n.es.json @@ -18,10 +18,7 @@ "ESP-IDF: Erasing device flash memory (erase_flash)": "ESP-IDF: Borrado de la memoria flash del dispositivo (erase_flash)", "ESP-IDF: Arduino ESP32 as ESP-IDF component": "ESP-IDF: Arduino ESP32 como componente ESP-IDF", "{arduinoDirPath} already exists.": "{arduinoDirPath} ya existe.", - "ESP-Matter is not available for Windows.": "ESP-Matter no está disponible para Windows.", "Pick Workspace Folder to which settings should be applied": "Elija la carpeta del espacio de trabajo a la que se deben aplicar las configuraciones", - "Enter ESP_MATTER_DEVICE_PATH path": "Ingrese la ruta ESP_MATTER_DEVICE_PATH", - "ESP_MATTER_DEVICE_PATH has been set in idf.customExtraVars configuration setting.": "ESP_MATTER_DEVICE_PATH se ha establecido en la configuración de idf.customExtraVars.", "Select your current folder": "Seleccione su carpeta actual", "No workspace selected.": "No se ha seleccionado ningún espacio de trabajo.", "Show no notifications and do not focus tasks output.": "No muestre notificaciones y no centre la salida de tareas.", @@ -33,10 +30,6 @@ "No project configuration found": "No se encontró ninguna configuración de proyecto", "Select configuration to use:": "Seleccione la configuración a utilizar:", "No option selected.": "Ninguna opción seleccionada.", - "Installing ESP-IDF extension Python requirements...": "Instalación de la extensión ESP-IDF Requisitos de Python...", - "ESP-IDF Python Requirements has been installed": "Se han instalado los requisitos de ESP-IDF Python", - "Installing ESP-Matter Python Requirements...": "Instalación de los requisitos de ESP-Matter Python...", - "ESP-Matter Python Requirements have been installed": "Se han instalado los requisitos de ESP-Matter Python", "PyTest python packages are already installed.": "Los paquetes de Python de PyTest ya están instalados.", "ESP-IDF: Building unit test app and flashing": "ESP-IDF: aplicación de prueba unitaria de construcción y flasheo", "ESP-IDF vscode files have been added to the project.": "Se han agregado archivos ESP-IDF vscode al proyecto.", @@ -109,10 +102,6 @@ "Failed to sign-in with Rainmaker (via OAuth)": "No se pudo iniciar sesión con Rainmaker (a través de OAuth)", "Use ESP-IDF {espIdfPath}": "Utilice ESP-IDF {espIdfPath}", "Use current ESP-ADF {espAdfPath}": "Utilice ESP-ADF actual {espAdfPath}", - "Use current ESP-MDF {espMdfPath}": "Utilice ESP-MDF actual {espMdfPath}", - "Use current ESP-Matter {matterPathDir}": "Utilice ESP-Matter actual {matterPathDir}", - "Use current ESP-Rainmaker {rainmakerPathDir}": "Utilice ESP-Rainmaker actual {rainmakerPathDir}", - "Use current ESP-HomeKit-SDK {espHomeKitPathDir}": "Utilice ESP-HomeKit-SDK actual {espHomeKitPathDir}", "Enter non empty string": "Introduzca una cadena que no esté vacía", "Enter a valid integer": "Introduzca un número entero válido", "ESP-IDF: Building project": "ESP-IDF: Proyecto de construcción", @@ -151,13 +140,8 @@ "Error encountered while adding dependency {dependency} to the component \"{component}\"": "Se encontró un error al agregar la dependencia {dependency} al componente \"{component}\"", "Error encountered while creating project from example \"{example}\"": "Se encontró un error al crear un proyecto a partir del ejemplo \"{example}\"", "Install ESP-ADF": "Instalar ESP-ADF", - "Install ESP-MDF": "Instalar ESP-MDF", - "Install ESP-Matter": "Instalar ESP-Materia", - "Install ESP-Rainmaker": "Instalar ESP-Rainmaker", "Project Configuration editor": "Editor de configuración del proyecto", "Select Project Configuration": "Seleccione Configuración del proyecto", - "Install Extension Python Requirements": "Instalar la extensión Requisitos de Python", - "Install ESP-Matter Python Requirements": "Instalar los requisitos de ESP-Matter Python", "Add .vscode subdirectory files": "Agregar archivos de subdirectorio .vscode", "Add .devcontainer subdirectory files": "Agregar archivos de subdirectorio .devcontainer", "Flash with JTAG": "Flashear con JTAG", diff --git a/l10n/bundle.l10n.pt.json b/l10n/bundle.l10n.pt.json index d591c742b..0421eef5b 100644 --- a/l10n/bundle.l10n.pt.json +++ b/l10n/bundle.l10n.pt.json @@ -18,10 +18,7 @@ "ESP-IDF: Erasing device flash memory (erase_flash)": "ESP-IDF: Apagando a memória flash do dispositivo (erase_flash)", "ESP-IDF: Arduino ESP32 as ESP-IDF component": "ESP-IDF: Arduino ESP32 como componente ESP-IDF", "{arduinoDirPath} already exists.": "{arduinoDirPath} já existe.", - "ESP-Matter is not available for Windows.": "ESP-Matter não está disponível para Windows.", "Pick Workspace Folder to which settings should be applied": "Escolha a pasta do espaço de trabalho à qual as configurações devem ser aplicadas", - "Enter ESP_MATTER_DEVICE_PATH path": "Insira o caminho ESP_MATTER_DEVICE_PATH", - "ESP_MATTER_DEVICE_PATH has been set in idf.customExtraVars configuration setting.": "ESP_MATTER_DEVICE_PATH foi definido na configuração idf.customExtraVars.", "Select your current folder": "Selecione sua pasta atual", "No workspace selected.": "Nenhum espaço de trabalho selecionado.", "Show no notifications and do not focus tasks output.": "Não mostre notificações e não concentre a saída das tarefas.", @@ -33,10 +30,6 @@ "No project configuration found": "Nenhuma configuração de projeto encontrada", "Select configuration to use:": "Selecione a configuração a ser usada:", "No option selected.": "Nenhuma opção selecionada.", - "Installing ESP-IDF extension Python requirements...": "Instalando a extensão ESP-IDF Requisitos do Python...", - "ESP-IDF Python Requirements has been installed": "Os requisitos ESP-IDF Python foram instalados", - "Installing ESP-Matter Python Requirements...": "Instalando os requisitos do ESP-Matter Python...", - "ESP-Matter Python Requirements have been installed": "Os requisitos do ESP-Matter Python foram instalados", "PyTest python packages are already installed.": "Os pacotes PyTest python já estão instalados.", "ESP-IDF: Building unit test app and flashing": "ESP-IDF: Construindo aplicativo de teste de unidade e flashing", "ESP-IDF vscode files have been added to the project.": "Arquivos ESP-IDF vscode foram adicionados ao projeto.", @@ -109,10 +102,6 @@ "Failed to sign-in with Rainmaker (via OAuth)": "Falha ao fazer login com Rainmaker (via OAuth)", "Use ESP-IDF {espIdfPath}": "Usar ESP-IDF {espIdfPath}", "Use current ESP-ADF {espAdfPath}": "Usar ESP-ADF atual {espAdfPath}", - "Use current ESP-MDF {espMdfPath}": "Use ESP-MDF atual {espMdfPath}", - "Use current ESP-Matter {matterPathDir}": "Use ESP-Matter atual {matterPathDir}", - "Use current ESP-Rainmaker {rainmakerPathDir}": "Use o ESP-Rainmaker atual {rainmakerPathDir}", - "Use current ESP-HomeKit-SDK {espHomeKitPathDir}": "Use o ESP-HomeKit-SDK atual {espHomeKitPathDir}", "Enter non empty string": "Insira uma string não vazia", "Enter a valid integer": "Insira um número inteiro válido", "ESP-IDF: Building project": "ESP-IDF: Projeto de construção", @@ -151,13 +140,8 @@ "Error encountered while adding dependency {dependency} to the component \"{component}\"": "Erro encontrado ao adicionar a dependência {dependency} ao componente \"{component}\"", "Error encountered while creating project from example \"{example}\"": "Erro encontrado ao criar o projeto do exemplo \"{example}\"", "Install ESP-ADF": "Instale ESP-ADF", - "Install ESP-MDF": "Instale ESP-MDF", - "Install ESP-Matter": "Instale ESP-Matter", - "Install ESP-Rainmaker": "Instale ESP-Rainmaker", "Project Configuration editor": "Editor de configuração do projeto", "Select Project Configuration": "Selecione Configuração do Projeto", - "Install Extension Python Requirements": "Instalar requisitos de extensão Python", - "Install ESP-Matter Python Requirements": "Instale os requisitos do ESP-Matter Python", "Add .vscode subdirectory files": "Adicionar arquivos de subdiretório .vscode", "Add .devcontainer subdirectory files": "Adicionar arquivos de subdiretório .devcontainer", "Create ESP-IDF Component": "Criar componente ESP-IDF", diff --git a/l10n/bundle.l10n.ru.json b/l10n/bundle.l10n.ru.json index 96b8a2334..025729de2 100644 --- a/l10n/bundle.l10n.ru.json +++ b/l10n/bundle.l10n.ru.json @@ -18,10 +18,7 @@ "ESP-IDF: Erasing device flash memory (erase_flash)": "ESP-IDF: очистка флэш-памяти устройства (erase_flash)", "ESP-IDF: Arduino ESP32 as ESP-IDF component": "ESP-IDF: Arduino ESP32 как компонент ESP-IDF", "{arduinoDirPath} already exists.": "{arduinoDirPath} уже существует.", - "ESP-Matter is not available for Windows.": "ESP-Matter недоступен для Windows.", "Pick Workspace Folder to which settings should be applied": "Выберите папку рабочей области, к которой следует применить настройки", - "Enter ESP_MATTER_DEVICE_PATH path": "Введите путь ESP_MATTER_DEVICE_PATH", - "ESP_MATTER_DEVICE_PATH has been set in idf.customExtraVars configuration setting.": "ESP_MATTER_DEVICE_PATH установлен в настройках конфигурации idf.customExtraVars.", "Select your current folder": "Выберите текущую папку", "No workspace selected.": "Рабочая область не выбрана.", "Show no notifications and do not focus tasks output.": "Не показывать уведомления и не фокусировать вывод задач.", @@ -33,10 +30,6 @@ "No project configuration found": "Конфигурация проекта не найдена", "Select configuration to use:": "Выберите конфигурацию для использования:", "No option selected.": "Опция не выбрана.", - "Installing ESP-IDF extension Python requirements...": "Установка требований Python расширения ESP-IDF...", - "ESP-IDF Python Requirements has been installed": "Требования ESP-IDF Python установлены", - "Installing ESP-Matter Python Requirements...": "Установка требований Python ESP-Matter...", - "ESP-Matter Python Requirements have been installed": "Требования Python ESP-Matter установлены", "PyTest python packages are already installed.": "Пакеты Python PyTest уже установлены.", "ESP-IDF: Building unit test app and flashing": "ESP-IDF: создание приложения модульного тестирования и перепрошивка", "ESP-IDF vscode files have been added to the project.": "В проект добавлены файлы ESP-IDF vscode.", @@ -109,10 +102,6 @@ "Failed to sign-in with Rainmaker (via OAuth)": "Не удалось войти в систему с помощью Rainmaker (через OAuth)", "Use current ESP-IDF {espIdfPath}": "Использовать текущий ESP-IDF {espIdfPath}", "Use current ESP-ADF {espAdfPath}": "Использовать текущий ESP-ADF {espAdfPath}", - "Use current ESP-MDF {espMdfPath}": "Использовать текущий ESP-MDF {espMdfPath}", - "Use current ESP-Matter {matterPathDir}": "Использовать текущий ESP-Matter {matterPathDir}", - "Use current ESP-Rainmaker {rainmakerPathDir}": "Использовать текущий ESP-Rainmaker {rainmakerPathDir}", - "Use current ESP-HomeKit-SDK {espHomeKitPathDir}": "Использовать текущий ESP-HomeKit-SDK {espHomeKitPathDir}", "Enter non empty string": "Введите непустую строку", "Enter a valid integer": "Введите допустимое целое число", "ESP-IDF: Building project": "ESP-IDF: Собрать проект", @@ -151,13 +140,8 @@ "Error encountered while adding dependency {dependency} to the component \"{component}\"": "Произошла ошибка при добавлении зависимости {dependent} к компоненту \"{comment}\"", "Error encountered while creating project from example \"{example}\"": "Ошибка при создании проекта из примера \"{example}\"", "Install ESP-ADF": "Установка ESP-ADF", - "Install ESP-MDF": "Установка ESP-MDF", - "Install ESP-Matter": "Установка ESP-Matter", - "Install ESP-Rainmaker": "Установка ESP-Rainmaker", "Project Configuration editor": "Редактор конфигурации проекта", "Select Project Configuration": "Выбор конфигурации проекта", - "Install Extension Python Requirements": "Установка требований Python расширения", - "Install ESP-Matter Python Requirements": "Установка требований Python ESP-Matter", "Add .vscode subdirectory files": "Добавить файлы подкаталога .vscode", "Add .devcontainer subdirectory files": "Добавить файлы подкаталога .devcontainer", "Create ESP-IDF Component": "Создать компонент ESP-IDF", diff --git a/l10n/bundle.l10n.zh-CN.json b/l10n/bundle.l10n.zh-CN.json index ab8d99f41..67a408277 100644 --- a/l10n/bundle.l10n.zh-CN.json +++ b/l10n/bundle.l10n.zh-CN.json @@ -18,10 +18,7 @@ "ESP-IDF: Erasing device flash memory (erase_flash)": "ESP-IDF:擦除设备 flash 数据(erase_flash)", "ESP-IDF: Arduino ESP32 as ESP-IDF component": "ESP-IDF:添加 Arduino ESP32 为 ESP-IDF 组件", "{arduinoDirPath} already exists.": "{arduinoDirPath} 已经存在。", - "ESP-Matter is not available for Windows.": "ESP-Matter 不适用于 Windows 系统。", "Pick Workspace Folder to which settings should be applied": "选择要应用设置的工作区文件夹", - "Enter ESP_MATTER_DEVICE_PATH path": "输入 ESP_MATTER_DEVICE_PATH 路径", - "ESP_MATTER_DEVICE_PATH has been set in idf.customExtraVars configuration setting.": "ESP_MATTER_DEVICE_PATH 已在 idf.customExtraVars 配置中设置。", "Select your current folder": "选择当前文件夹", "No workspace selected.": "未选中工作区。", "Show no notifications and do not focus tasks output.": "不显示通知和任务输出。", @@ -33,10 +30,6 @@ "No project configuration found": "找不到项目配置", "Select configuration to use:": "选择要使用的配置:", "No option selected.": "未选择任何选项。", - "Installing ESP-IDF extension Python requirements...": "为 ESP-IDF 扩展安装 Python 依赖包…", - "ESP-IDF Python Requirements has been installed": "已安装 ESP-IDF Python 依赖包", - "Installing ESP-Matter Python Requirements...": "正在为 ESP-Matter 扩展安装 Python 依赖包…", - "ESP-Matter Python Requirements have been installed": "已安装 ESP-Matter Python 依赖包", "PyTest python packages are already installed.": "已安装 PyTest Python 包。", "ESP-IDF: Building unit test app and flashing": "ESP-IDF:正在构建并烧录单元测试应用程序", "ESP-IDF vscode files have been added to the project.": "ESP-IDF VS Code 文件已添加到项目中。", @@ -109,10 +102,6 @@ "Failed to sign-in with Rainmaker (via OAuth)": "无法使用 Rainmaker 登录(通过 OAuth)", "Use ESP-IDF {espIdfPath}": "使用 ESP-IDF {espIdfPath}", "Use current ESP-ADF {espAdfPath}": "使用当前的 ESP-ADF {espAdfPath}", - "Use current ESP-MDF {espMdfPath}": "使用当前的 ESP-MDF {espMdfPath}", - "Use current ESP-Matter {matterPathDir}": "使用当前的 ESP-Matter {matterPathDir}", - "Use current ESP-Rainmaker {rainmakerPathDir}": "使用当前的 ESP-Rainmaker {rainmakerPathDir}", - "Use current ESP-HomeKit-SDK {espHomeKitPathDir}": "使用当前的 ESP-HomeKit-SDK {espHomeKitPathDir}", "Enter non empty string": "请输入非空字符串", "Enter a valid integer": "请输入有效的整数", "ESP-IDF: Building project": "ESP-IDF:构建项目", @@ -151,13 +140,8 @@ "Error encountered while adding dependency {dependency} to the component \"{component}\"": "将依赖项 {dependency} 添加到组件 \"{component}\" 时出错", "Error encountered while creating project from example \"{example}\"": "基于 \"{example}\" 示例创建项目时出错", "Install ESP-ADF": "安装 ESP-ADF", - "Install ESP-MDF": "安装 ESP-MDF", - "Install ESP-Matter": "安装 ESP-Matter", - "Install ESP-Rainmaker": "安装 ESP-Rainmaker", "Project Configuration editor": "项目配置编辑器", "Select Project Configuration": "选择项目配置", - "Install Extension Python Requirements": "为扩展安装 Python 依赖包", - "Install ESP-Matter Python Requirements": "为 ESP-Matter 安装 Python 依赖包", "Add .vscode subdirectory files": "添加 .vscode 子目录文件", "Add .devcontainer subdirectory files": "添加 .devcontainer 子目录文件", "Create ESP-IDF Component": "创建 ESP-IDF 组件", diff --git a/package.json b/package.json index 8551e88e6..57f45cf50 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "bluetooth", "ESP-IDF", "ESP-ADF", - "ESP-MDF", "ESP-matter", "ESP", "Espressif", @@ -89,11 +88,6 @@ "onCommand:esp.rainmaker.backend.connect", "onCommand:esp.rainmaker.backend.sync", "onCommand:espIdf.getEspAdf", - "onCommand:espIdf.getEspMdf", - "onCommand:espIdf.getEspMatter", - "onCommand:espIdf.getEspRainmaker", - "onCommand:espIdf.installEspMatterPyReqs", - "onCommand:espIdf.installPyReqs", "onCommand:esp.webview.open.partition-table", "onCommand:espIdf.webview.nvsPartitionEditor", "onCommand:espIdf.selectOpenOcdConfigFiles", @@ -633,36 +627,12 @@ "description": "%param.espAdfPath%", "scope": "resource" }, - "idf.espMdfPath": { - "type": "string", - "default": "${env:MDF_PATH}", - "description": "%param.espMdfPath%", - "scope": "resource" - }, - "idf.espMatterPath": { - "type": "string", - "default": "${env:ESP_MATTER_PATH}", - "description": "%param.espMatterPath%", - "scope": "resource" - }, - "idf.espHomeKitSdkPath": { - "type": "string", - "default": "${env:HOMEKIT_PATH}", - "description": "%param.espHomeKitSdkPath%", - "scope": "resource" - }, "idf.toolsPath": { "type": "string", "default": "${env:IDF_TOOLS_PATH}", "description": "%param.toolsPath%", "scope": "resource" }, - "idf.espRainmakerPath": { - "type": "string", - "default": "${env:RMAKER_PATH}", - "description": "%param.espRainmakerPath%", - "scope": "resource" - }, "idf.espIdfPathWin": { "type": "string", "default": "${env:IDF_PATH}", @@ -675,30 +645,12 @@ "description": "%param.espAdfPath%", "scope": "resource" }, - "idf.espMdfPathWin": { - "type": "string", - "default": "${env:MDF_PATH}", - "description": "%param.espMdfPath%", - "scope": "resource" - }, "idf.toolsPathWin": { "type": "string", "default": "${env:IDF_TOOLS_PATH}", "description": "%param.toolsPath%", "scope": "resource" }, - "idf.espRainmakerPathWin": { - "type": "string", - "default": "${env:RMAKER_PATH}", - "description": "%param.espRainmakerPath%", - "scope": "resource" - }, - "idf.espHomeKitSdkPathWin": { - "type": "string", - "default": "${env:HOMEKIT_PATH}", - "description": "%param.espHomeKitSdkPath%", - "scope": "resource" - }, "idf.port": { "type": "string", "default": "detect", @@ -1607,36 +1559,6 @@ "title": "%espIdf.getEspAdf.title%", "category": "ESP-IDF" }, - { - "command": "espIdf.getEspMdf", - "title": "%espIdf.getEspMdf.title%", - "category": "ESP-IDF" - }, - { - "command": "espIdf.getEspMatter", - "title": "%espIdf.getEspMatter.title%", - "category": "ESP-IDF" - }, - { - "command": "espIdf.getEspRainmaker", - "title": "%espIdf.getEspRainmaker.title%", - "category": "ESP-IDF" - }, - { - "command": "espIdf.getEspHomeKitSdk", - "title": "%espIdf.getEspHomeKitSdk.title%", - "category": "ESP-IDF" - }, - { - "command": "espIdf.installEspMatterPyReqs", - "title": "%espIdf.installEspMatterPyReqs.title%", - "category": "ESP-IDF" - }, - { - "command": "espIdf.installPyReqs", - "title": "%espIdf.installPyReqs.title%", - "category": "ESP-IDF" - }, { "command": "esp.webview.open.partition-table", "title": "%esp.webview.open.partition-table.title%", @@ -1747,11 +1669,6 @@ "title": "%espIdf.welcome.title%", "category": "ESP-IDF" }, - { - "command": "espIdf.setMatterDevicePath", - "title": "%espIdf.setMatterDevicePath.title%", - "category": "ESP-IDF" - }, { "command": "espIdf.projectConfigurationEditor", "title": "%espIdf.projectConfigurationEditor.title%", @@ -1843,96 +1760,6 @@ } ], "debuggers": [ - { - "type": "espidf", - "label": "ESP-IDF", - "languages": [ - "cpp", - "c" - ], - "runtime": "python", - "configurationAttributes": { - "launch": { - "properties": { - "appOffset": { - "type": "string", - "description": "%esp_idf.appOffset.description%" - }, - "debugPort": { - "type": "number", - "description": "Port for ESP-IDF Debug Adapter. Default: 43474", - "default": 43474 - }, - "logLevel": { - "type": "number", - "description": "Log Level for ESP-IDF Debug Adapter", - "default": 2 - }, - "mode": { - "type": "string", - "description": "ESP-IDF Debug Session Mode", - "default": "auto", - "enum": [ - "auto", - "manual" - ], - "enumDescriptions": [ - "Auto Mode will execute a OpenOCD Server and Debug Adapter in Visual Studio Code", - "Manual Mode requires you to run OpenOCD and Debug Adapter separately" - ] - }, - "env": { - "type": "object", - "description": "Environments Variables override in Visual Studio Code launched ESP-IDF Debug Adapter", - "default": null - }, - "initGdbCommands": { - "type": "array", - "description": "%esp_idf.initGdbCommands.description%", - "items": { - "type": "string", - "description": "%esp_idf.debuggers.text.description%", - "default": "" - }, - "default": [] - }, - "gdbinitFile": { - "type": "string", - "description": "%esp_idf.gdbinitFile.description%", - "default": "" - }, - "verifyAppBinBeforeDebug": { - "type": "boolean", - "description": "%esp_idf.verifyAppBinBeforeDebug.description%", - "default": false - }, - "tmoScaleFactor": { - "type": "number", - "description": "%esp_idf.tmoScaleFactor.description%", - "default": 1 - } - } - } - }, - "initialConfigurations": [ - { - "name": "%debug.initConfig.name%", - "type": "espidf", - "request": "launch" - } - ], - "configurationSnippets": [ - { - "label": "%debug.initConfig.name%", - "body": { - "name": "%debug.initConfig.name%", - "type": "espidf", - "request": "launch" - }, - "description": "%debug.initConfig.description%" - } - ] - }, { "type": "gdbtarget", "label": "Eclipse GDB Target", diff --git a/package.nls.es.json b/package.nls.es.json index 11ff94d0c..7098fdbe4 100644 --- a/package.nls.es.json +++ b/package.nls.es.json @@ -50,15 +50,9 @@ "espIdf.genCoverage.title": "Agregar cobertura de editor", "espIdf.getCoverageReport.title": "Obtener informe de cobertura HTML para proyecto", "espIdf.getEspAdf.title": "Instalar ESP-ADF", - "espIdf.getEspHomeKitSdk.title": "Instalar ESP-HomeKit-SDK", - "espIdf.getEspMatter.title": "Instalar ESP-Matter", - "espIdf.getEspMdf.title": "Instalar ESP-MDF", - "espIdf.getEspRainmaker.title": "Instalar ESP-Rainmaker", "espIdf.heaptrace.title": "Rastreo de montón", - "espIdf.idfReconfigureTask.title": "ESP-IDF: Ejecute la tarea de reconfiguración de idf.py", + "espIdf.idfReconfigureTask.title": "ESP-IDF: Ejecute la tarea de reconfiguración de idf.py", "espIdf.importProject.title": "Importar proyecto ESP-IDF", - "espIdf.installEspMatterPyReqs.title": "Instalar paquetes Python de ESP-Matter", - "espIdf.installPyReqs.title": "Instalar paquetes Python de la extensión ESP-IDF", "espIdf.jtag_flash.title": "Flashear (con JTag)", "espIdf.launchQemu.title": "Iniciar servidor QEMU", "espIdf.launchWSServerAndMonitor.title": "Lanzar monitor IDF para CoreDump / GDB-Stub Mode", @@ -87,7 +81,6 @@ "espIdf.detectSerialPort.title": "Detectar puerto serie", "espIdf.setClangSettings.title": "Configurar el proyecto para usar ESP-Clang", "espIdf.setGcovConfig.title": "Configurar SDKConfig del proyecto para cobertura", - "espIdf.setMatterDevicePath.title": "Establecer Ruta del Dispositivo ESP-MATTER (ESP_MATTER_DEVICE_PATH)", "espIdf.setTarget.title": "Establecer Objetivo del Dispositivo Espressif", "espIdf.setup.title": "Configurar Extensión ESP-IDF", "espIdf.size.title": "Análisis de tamaño de los binarios", @@ -100,11 +93,6 @@ "espIdf.viewAsHex.title": "Ver como Hexadecimal", "espIdf.hexView.copyValue.title": "Copiar valor al portapapeles", "espIdf.hexView.deleteElement.title": "Eliminar valor hexadecimal de la lista", - "esp_idf.appOffset.description": "Anular la dirección de inicio del programa de compilación (ESP32_APP_FLASH_OFF)", - "esp_idf.debuggers.text.description": "El comando a ejecutar", - "esp_idf.gdbinitFile.description": "Ruta del archivo gdbinit para el Adaptador de Depuración ESP-IDF", - "esp_idf.initGdbCommands.description": "Uno o más comandos GDB para ejecutar con el fin de configurar el depurador subyacente. Ejemplo: \"initGdbCommands\": [ \"target remote /dev/ttyUSB0\"]", - "esp_idf.tmoScaleFactor.description": "Factor de escala para el tiempo de espera de gdb [predeterminado:1]", "esp_idf.verifyAppBinBeforeDebug.description": "Verificar binarios de la aplicación antes de depurar", "espIdf.searchError.title": "ESP-IDF: Sugerencia de error de búsqueda", "espIdf.removeEspIdfSettings.title": "Eliminar configuración de ESP-IDF", @@ -130,11 +118,7 @@ "param.enableUpdateSrcsToCMakeListsFile": "Habilitar actualización de archivos fuente en CMakeLists.txt", "param.esp.rainmaker.oauth.url": "URL del servidor OAuth de ESP-Rainmaker", "param.espAdfPath": "Ruta para localizar el framework ESP-ADF (ADF_PATH)", - "param.espHomeKitSdkPath": "Ruta para localizar el framework ESP-HomeKit-SDK (HOMEKIT_PATH)", "param.espIdfPath": "Ruta para localizar el framework ESP-IDF (IDF_PATH)", - "param.espMatterPath": "Ruta para localizar el framework ESP-Matter (ESP_MATTER_PATH)", - "param.espMdfPath": "Ruta para localizar el framework ESP-MDF (MDF_PATH)", - "param.espRainmakerPath": "Ruta para localizar el framework ESP-Rainmaker (RMAKER_PATH)", "param.exportVars": "Variables que se agregarán a las variables de entorno del sistema", "param.flashBaudRate": "Tasa de baudios de flasheo ESP-IDF", "param.flashPartitionToUse": "Especifica la partición a grabar durante el proceso de flasheo.", diff --git a/package.nls.json b/package.nls.json index 9cb08f006..332d2b1ff 100644 --- a/package.nls.json +++ b/package.nls.json @@ -50,15 +50,9 @@ "espIdf.genCoverage.title": "Add Editor Coverage", "espIdf.getCoverageReport.title": "Get HTML Coverage Report for Project", "espIdf.getEspAdf.title": "Install ESP-ADF", - "espIdf.getEspHomeKitSdk.title": "Install ESP-HomeKit-SDK", - "espIdf.getEspMatter.title": "Install ESP-Matter", - "espIdf.getEspMdf.title": "Install ESP-MDF", - "espIdf.getEspRainmaker.title": "Install ESP-Rainmaker", "espIdf.heaptrace.title": "Heap Trace", "espIdf.idfReconfigureTask.title": "ESP-IDF: Run idf.py reconfigure Task", "espIdf.importProject.title": "Import ESP-IDF Project", - "espIdf.installEspMatterPyReqs.title": "Install ESP-Matter Python Packages", - "espIdf.installPyReqs.title": "Install ESP-IDF Extension Python Packages", "espIdf.jtag_flash.title": "Flash (with JTag)", "espIdf.launchQemu.title": "Launch QEMU Server", "espIdf.launchWSServerAndMonitor.title": "Launch IDF Monitor for Core Dump Mode/GDB Stub Mode", @@ -87,7 +81,6 @@ "espIdf.detectSerialPort.title": "Detect Serial Port", "espIdf.setClangSettings.title": "Configure project for ESP-Clang", "espIdf.setGcovConfig.title": "Configure Project SDKConfig for Coverage", - "espIdf.setMatterDevicePath.title": "Set ESP-MATTER Device Path (ESP_MATTER_DEVICE_PATH)", "espIdf.setTarget.title": "Set Espressif Device Target", "espIdf.setup.title": "Configure ESP-IDF Extension", "espIdf.size.title": "Size Analysis of the Binaries", @@ -100,11 +93,6 @@ "espIdf.hexView.deleteElement.title": "Delete hex value from list", "espIdf.webview.nvsPartitionEditor.title": "Open NVS Partition Editor", "espIdf.welcome.title": "Welcome", - "esp_idf.appOffset.description": "Override build program start address offset (ESP32_APP_FLASH_OFF)", - "esp_idf.debuggers.text.description": "The command to execute", - "esp_idf.gdbinitFile.description": "gdbinit file path for ESP-IDF Debug Adapter", - "esp_idf.initGdbCommands.description": "One or more GDB commands to execute in order to setup the underlying debugger. Example: \"initGdbCommands\": [ \"target remote /dev/ttyUSB0\"]", - "esp_idf.tmoScaleFactor.description": "Scale factor for GDB timeout [default:1]", "esp_idf.verifyAppBinBeforeDebug.description": "Verify app binaries before debug", "espIdf.searchError.title": "ESP-IDF: Search Error Hint", "idf.flashType.description": "Device flash method, UART or JTAG", @@ -130,11 +118,7 @@ "param.enableUpdateSrcsToCMakeListsFile": "Enable update source files in CMakeLists.txt", "param.esp.rainmaker.oauth.url": "ESP-Rainmaker OAuth server URL", "param.espAdfPath": "Path to locate ESP-ADF framework (ADF_PATH)", - "param.espHomeKitSdkPath": "Path to locate ESP-HomeKit-SDK framework (HOMEKIT_PATH)", "param.espIdfPath": "Path to locate ESP-IDF framework (IDF_PATH)", - "param.espMatterPath": "Path to locate ESP-Matter framework (ESP_MATTER_PATH)", - "param.espMdfPath": "Path to locate ESP-MDF framework (MDF_PATH)", - "param.espRainmakerPath": "Path to locate ESP-Rainmaker framework (RMAKER_PATH)", "param.exportVars": "Variables to be added to system environment variables", "param.flashBaudRate": "ESP-IDF flash baud rate", "param.flashPartitionToUse": "Specifies the partition to flash during the build and flash process.", diff --git a/package.nls.pt.json b/package.nls.pt.json index 7c4d82d29..625ee2afa 100644 --- a/package.nls.pt.json +++ b/package.nls.pt.json @@ -50,15 +50,9 @@ "espIdf.genCoverage.title": "Adicionar cobertura do editor", "espIdf.getCoverageReport.title": "Obtenha relatório de cobertura HTML para projeto", "espIdf.getEspAdf.title": "Instale ESP-ADF", - "espIdf.getEspHomeKitSdk.title": "Instale ESP-HomeKit-SDK", - "espIdf.getEspMatter.title": "Instale ESP-Matter", - "espIdf.getEspMdf.title": "Instale ESP-MDF", - "espIdf.getEspRainmaker.title": "Instale ESP-Rainmaker", "espIdf.heaptrace.title": "Rastreamento de pilha", - "espIdf.idfReconfigureTask.title": "ESP-IDF: Execute a tarefa de reconfiguração idf.py", + "espIdf.idfReconfigureTask.title": "ESP-IDF: Execute a tarefa de reconfiguração idf.py", "espIdf.importProject.title": "Importar projeto ESP-IDF", - "espIdf.installEspMatterPyReqs.title": "Instale pacotes ESP-Matter Python", - "espIdf.installPyReqs.title": "Instale pacotes Python de extensão ESP-IDF", "espIdf.jtag_flash.title": "Flash (com JTag)", "espIdf.launchQemu.title": "Inicie o servidor QEMU", "espIdf.launchWSServerAndMonitor.title": "Inicie o IDF Monitor para modo CoreDump / GDB-Stub", @@ -87,7 +81,6 @@ "espIdf.detectSerialPort.title": "Detectar porta serial", "espIdf.setClangSettings.title": "Configurar o projeto para ESP-Clang", "espIdf.setGcovConfig.title": "Configurar o projeto SDKConfig para cobertura", - "espIdf.setMatterDevicePath.title": "Definir caminho do dispositivo ESP-MATTER (ESP_MATTER_DEVICE_PATH)", "espIdf.setTarget.title": "Definir destino do dispositivo Espressif", "espIdf.setup.title": "Configurar extensão ESP-IDF", "espIdf.size.title": "Análise de tamanho dos binários", @@ -99,12 +92,7 @@ "espIdf.welcome.title": "Bem-vindo", "espIdf.viewAsHex.title": "Ver como Hexadecimal", "espIdf.hexView.copyValue.title": "Copiar valor para a área de transferência", - "espIdf.hexView.deleteElement.title": "Excluir valor hexadecimal da lista", - "esp_idf.appOffset.description": "Substituir o deslocamento do endereço inicial do programa de construção (ESP32_APP_FLASH_OFF)", - "esp_idf.debuggers.text.description": "O comando para executar", - "esp_idf.gdbinitFile.description": "caminho do arquivo gdbinit para adaptador de depuração ESP-IDF", - "esp_idf.initGdbCommands.description": "Um ou mais comandos GDB a serem executados para configurar o depurador subjacente. ", - "esp_idf.tmoScaleFactor.description": "Fator de escala para tempo limite do gdb [padrão: 1]", + "espIdf.hexView.deleteElement.title": "Excluir valor hexadecimal da lista", "esp_idf.verifyAppBinBeforeDebug.description": "Verifique os binários do aplicativo antes da depuração", "espIdf.searchError.title": "ESP-IDF: Buscar Dica de Erro", "espIdf.removeEspIdfSettings.title": "Remover Configurações ESP-IDF", @@ -130,11 +118,7 @@ "param.enableUpdateSrcsToCMakeListsFile": "Habilite a atualização dos arquivos de origem em CMakeLists.txt", "param.esp.rainmaker.oauth.url": "URL do servidor ESP-Rainmaker OAuth", "param.espAdfPath": "Caminho para localizar a estrutura ESP-ADF (ADF_PATH)", - "param.espHomeKitSdkPath": "Caminho para localizar a estrutura ESP-HomeKit-SDK (HOMEKIT_PATH)", "param.espIdfPath": "Caminho para localizar a estrutura ESP-IDF (IDF_PATH)", - "param.espMatterPath": "Caminho para localizar a estrutura ESP-Matter (ESP_MATTER_PATH)", - "param.espMdfPath": "Caminho para localizar a estrutura ESP-MDF (MDF_PATH)", - "param.espRainmakerPath": "Caminho para localizar a estrutura ESP-Rainmaker (RMAKER_PATH)", "param.exportVars": "Variáveis ​​a serem adicionadas às variáveis ​​de ambiente do sistema", "param.flashBaudRate": "Taxa de transmissão de flash ESP-IDF", "param.flashPartitionToUse": "Especifica a partição a ser gravada.", diff --git a/package.nls.ru.json b/package.nls.ru.json index eacf7e65f..e340a2678 100644 --- a/package.nls.ru.json +++ b/package.nls.ru.json @@ -50,15 +50,9 @@ "espIdf.genCoverage.title": "Добавить покрытие редактора", "espIdf.getCoverageReport.title": "Получить HTML-отчет о покрытии проекта", "espIdf.getEspAdf.title": "Установить ESP-ADF", - "espIdf.getEspHomeKitSdk.title": "Установить ESP-HomeKit-SDK", - "espIdf.getEspMatter.title": "Установить ESP-Matter", - "espIdf.getEspMdf.title": "Установить ESP-MDF", - "espIdf.getEspRainmaker.title": "Установить ESP-Rainmaker", "espIdf.heaptrace.title": "Трассировка кучи", - "espIdf.idfReconfigureTask.title": "ESP-IDF: Запустить задачу перенастройки idf.py", + "espIdf.idfReconfigureTask.title": "ESP-IDF: Запустить задачу перенастройки idf.py", "espIdf.importProject.title": "Импортировать проект ESP-IDF", - "espIdf.installEspMatterPyReqs.title": "Установить пакеты Python ESP-Matter", - "espIdf.installPyReqs.title": "Установить пакеты Python расширения ESP-IDF", "espIdf.jtag_flash.title": "Прошить (через JTAG)", "espIdf.launchQemu.title": "Запуск сервера QEMU", "espIdf.launchWSServerAndMonitor.title": "Запуск IDF Monitor в режиме CoreDump/GDB-Stub.", @@ -87,7 +81,6 @@ "espIdf.detectSerialPort.title": "Обнаружить последовательный порт", "espIdf.setClangSettings.title": "Настроить проект для ESP-Clang", "espIdf.setGcovConfig.title": "Конфигурация Project SDKConfig для покрытия", - "espIdf.setMatterDevicePath.title": "Установка пути к устройству ESP-MATTER (ESP_MATTER_DEVICE_PATH)", "espIdf.setTarget.title": "Установка целевого устройства Espressif", "espIdf.setup.title": "Конфигурация расширения ESP-IDF", "espIdf.size.title": "Анализ размера двоичных файлов", @@ -100,11 +93,6 @@ "espIdf.hexView.deleteElement.title": "Удалить шестнадцатеричное значение из списка", "espIdf.webview.nvsPartitionEditor.title": "Открыть редактор разделов NVS", "espIdf.welcome.title": "Добро пожаловать", - "esp_idf.appOffset.description": "Переопределить смещение начального адреса программы сборки (ESP32_APP_FLASH_OFF)", - "esp_idf.debuggers.text.description": "Команда для выполнения", - "esp_idf.gdbinitFile.description": "Путь к файлу gdbinit для Адаптера Отладки ESP-IDF", - "esp_idf.initGdbCommands.description": "Одна или несколько команд GDB, которые необходимо выполнить для настройки базового отладчика. Пример: \"initGdbCommands\": [\"target remote /dev/ttyUSB0\"]", - "esp_idf.tmoScaleFactor.description": "Коэффициент масштабирования для тайм-аута GDB [по умолчанию:1]", "esp_idf.verifyAppBinBeforeDebug.description": "Проверка бинарников приложения перед отладкой", "espIdf.searchError.title": "ESP-IDF: Поиск подсказок об ошибках", "espIdf.removeEspIdfSettings.title": "Удалить настройки ESP-IDF", @@ -130,11 +118,7 @@ "param.enableUpdateSrcsToCMakeListsFile": "Включить обновление исходных файлов в CMakeLists.txt", "param.esp.rainmaker.oauth.url": "URL-адрес сервера OAuth ESP-Rainmaker", "param.espAdfPath": "Путь до фреймворка ESP-ADF (ADF_PATH)", - "param.espHomeKitSdkPath": "Путь до фреймворка ESP-HomeKit-SDK (HOMEKIT_PATH)", "param.espIdfPath": "Путь до фреймворка ESP-IDF (IDF_PATH)", - "param.espMatterPath": "Путь до фреймворка ESP-Matter (ESP_MATTER_PATH)", - "param.espMdfPath": "Путь до фреймворка ESP-MDF (MDF_PATH)", - "param.espRainmakerPath": "Путь до фреймворка ESP-Rainmaker (RMAKER_PATH)", "param.exportVars": "Переменные, добавляемые к переменным системного окружения", "param.flashBaudRate": "Скорость прошивки ESP-IDF", "param.flashPartitionToUse": "Указывает раздел для прошивки.", diff --git a/package.nls.zh-CN.json b/package.nls.zh-CN.json index c7da2ed3e..835a5f4b9 100644 --- a/package.nls.zh-CN.json +++ b/package.nls.zh-CN.json @@ -50,15 +50,9 @@ "espIdf.genCoverage.title": "添加编辑器覆盖率", "espIdf.getCoverageReport.title": "生成 HTML 格式的代码覆盖率报告", "espIdf.getEspAdf.title": "安装 ESP-ADF", - "espIdf.getEspHomeKitSdk.title": "安装 ESP-HomeKit-SDK", - "espIdf.getEspMatter.title": "安装 ESP-Matter", - "espIdf.getEspMdf.title": "安装 ESP-MDF", - "espIdf.getEspRainmaker.title": "安装 ESP-Rainmaker", "espIdf.heaptrace.title": "堆跟踪", "espIdf.idfReconfigureTask.title": "ESP-IDF: 运行 idf.py reconfigure 任务", "espIdf.importProject.title": "导入 ESP-IDF 项目", - "espIdf.installEspMatterPyReqs.title": "安装 ESP-Matter Python 包", - "espIdf.installPyReqs.title": "安装 ESP-IDF 扩展 Python 包", "espIdf.jtag_flash.title": "通过 JTAG 接口烧录项目", "espIdf.launchQemu.title": "启动 QEMU 服务器", "espIdf.launchWSServerAndMonitor.title": "启动 IDF 监视器以支持核心转储模式/GDB 存根模式", @@ -87,7 +81,6 @@ "espIdf.detectSerialPort.title": "检测串口", "espIdf.setClangSettings.title": "为 ESP-Clang 配置项目", "espIdf.setGcovConfig.title": "配置 SDKConfig 文件以启用代码覆盖率", - "espIdf.setMatterDevicePath.title": "设置 ESP-MATTER 设备路径 (ESP_MATTER_DEVICE_PATH)", "espIdf.setTarget.title": "设置乐鑫设备目标", "espIdf.setup.title": "配置 ESP-IDF 扩展", "espIdf.size.title": "二进制文件大小分析", @@ -100,11 +93,6 @@ "espIdf.hexView.deleteElement.title": "从列表中删除十六进制值", "espIdf.webview.nvsPartitionEditor.title": "打开 NVS 分区编辑器", "espIdf.welcome.title": "欢迎使用 ESP-IDF 扩展", - "esp_idf.appOffset.description": "覆盖构建程序的起始地址偏移量 (ESP32_APP_FLASH_OFF)", - "esp_idf.debuggers.text.description": "要执行的命令", - "esp_idf.gdbinitFile.description": "ESP-IDF 调试适配器的 gdbinit 文件路径", - "esp_idf.initGdbCommands.description": "执行一个或多个 GDB 命令来设置底层调试器。例如:\"initGdbCommands\": [ \"target remote /dev/ttyUSB0\"]", - "esp_idf.tmoScaleFactor.description": "GDB 超时的缩放因子 [默认值:1]", "esp_idf.verifyAppBinBeforeDebug.description": "在调试前验证应用程序二进制文件", "espIdf.searchError.title": "ESP-IDF: 搜索错误提示", "idf.flashType.description": "设备烧录方式,UART 或 JTAG", @@ -131,11 +119,7 @@ "param.enableUpdateSrcsToCMakeListsFile": "在 CMakeLists.txt 文件中启用更新源文件的功能", "param.esp.rainmaker.oauth.url": "ESP-Rainmaker OAuth 服务器 URL", "param.espAdfPath": "指定 ESP-ADF 框架的路径 (ADF_PATH)", - "param.espHomeKitSdkPath": "指定 ESP-HomeKit-SDK 框架的路径 (HOMEKIT_PATH)", "param.espIdfPath": "指定 ESP-IDF 框架的路径 (IDF_PATH)", - "param.espMatterPath": "指定 ESP-Matter 框架的路径 (ESP_MATTER_PATH)", - "param.espMdfPath": "指定 ESP-MDF 框架的路径 (MDF_PATH)", - "param.espRainmakerPath": "指定 ESP-Rainmaker 框架的路径 (RMAKER_PATH)", "param.exportVars": "要添加到系统环境变量中的变量", "param.flashBaudRate": "ESP-IDF 烧录速率", "param.flashPartitionToUse": "指定要烧录的分区。", diff --git a/src/cmdTreeView/cmdStore.ts b/src/cmdTreeView/cmdStore.ts index 799d5aca5..0d363cec1 100644 --- a/src/cmdTreeView/cmdStore.ts +++ b/src/cmdTreeView/cmdStore.ts @@ -59,12 +59,7 @@ export enum AdvancedCommandKeys { EraseFlash = "espIdf.eraseFlash", DoctorCommand = "espIdf.doctorCommand", GetADF = "espIdf.getEspAdf", - GetMDF = "espIdf.getEspMdf", - GetEspMatter = "espIdf.getEspMatter", - GetRainmaker = "espIdf.getEspRainmaker", ProjectConfEditor = "espIdf.projectConfigurationEditor", - InstallIdfPythonReqs = "espIdf.installPyReqs", - InstallMatterPythonReqs = "espIdf.installEspMatterPyReqs", CreateVscodeFolder = "espIdf.createVsCodeFolder", CreateDevContainerFolder = "espIdf.createDevContainer", CreateIdfComponent = "espIdf.createNewComponent", @@ -110,36 +105,11 @@ export function createAdvancedCommandDictionary(): Record< iconId: "extensions", tooltip: l10n.t("Install ESP-ADF"), }, - [AdvancedCommandKeys.GetMDF]: { - checkboxState: undefined, - iconId: "extensions", - tooltip: l10n.t("Install ESP-MDF"), - }, - [AdvancedCommandKeys.GetEspMatter]: { - checkboxState: undefined, - iconId: "extensions", - tooltip: l10n.t("Install ESP-Matter"), - }, - [AdvancedCommandKeys.GetRainmaker]: { - checkboxState: undefined, - iconId: "extensions", - tooltip: l10n.t("Install ESP-Rainmaker"), - }, [AdvancedCommandKeys.ProjectConfEditor]: { checkboxState: undefined, iconId: "project", tooltip: l10n.t("Project Configuration editor"), }, - [AdvancedCommandKeys.InstallIdfPythonReqs]: { - checkboxState: undefined, - iconId: "extensions", - tooltip: l10n.t("Install Extension Python Requirements"), - }, - [AdvancedCommandKeys.InstallMatterPythonReqs]: { - checkboxState: undefined, - iconId: "extensions", - tooltip: l10n.t("Install ESP-Matter Python Requirements"), - }, [AdvancedCommandKeys.CreateVscodeFolder]: { checkboxState: undefined, iconId: "add", diff --git a/src/config.ts b/src/config.ts index eec066350..7251ca424 100644 --- a/src/config.ts +++ b/src/config.ts @@ -61,9 +61,6 @@ export namespace ESP { "idf.buildPath", "idf.espIdfPath", "idf.espAdfPath", - "idf.espMdfPath", - "idf.espRainmakerPath", - "idf.espHomeKitSdkPath", "idf.gitPath", "idf.pythonBinPath", "idf.port", diff --git a/src/espHomekit/espHomekitDownload.ts b/src/espHomekit/espHomekitDownload.ts deleted file mode 100644 index 295bf1f63..000000000 --- a/src/espHomekit/espHomekitDownload.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Project: ESP-IDF VSCode Extension - * File Created: Monday, 29th January 2024 5:23:22 pm - * Copyright 2024 Espressif Systems (Shanghai) CO LTD - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Uri } from "vscode"; -import { AbstractCloning } from "../common/abstractCloning"; -import { readParameter } from "../idfConfiguration"; - -export class EspHomekitCloning extends AbstractCloning { - constructor(gitBinPath: string = "git") { - super( - "https://github.com/espressif/esp-homekit-sdk.git", - "ESP-HomeKit-SDK", - "master", - gitBinPath, - "https://gitee.com/EspressifSystems/esp-homekit-sdk" - ); - } -} - -export async function getEspHomeKitSdk(workspace: Uri) { - const gitPath = (await readParameter("idf.gitPath", workspace)) || "git"; - const homeKitInstaller = new EspHomekitCloning(gitPath); - await homeKitInstaller.getRepository("idf.espHomeKitSdkPath", workspace); -} diff --git a/src/espIdf/debugAdapter/checkPyReqs.ts b/src/espIdf/debugAdapter/checkPyReqs.ts deleted file mode 100644 index 99ca49c36..000000000 --- a/src/espIdf/debugAdapter/checkPyReqs.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Project: ESP-IDF VSCode Extension - * File Created: Friday, 23rd February 2024 6:13:58 pm - * Copyright 2024 Espressif Systems (Shanghai) CO LTD - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { join } from "path"; -import { readParameter } from "../../idfConfiguration"; -import { pathExists } from "fs-extra"; -import { Uri } from "vscode"; -import { extensionContext, startPythonReqsProcess } from "../../utils"; -import { getVirtualEnvPythonPath } from "../../pythonManager"; - -export async function checkDebugAdapterRequirements(workspaceFolder: Uri) { - const idfPath = readParameter("idf.espIdfPath", workspaceFolder); - const pythonBinPath = await getVirtualEnvPythonPath(workspaceFolder); - let requirementsPath = join( - extensionContext.extensionPath, - "esp_debug_adapter", - "requirements.txt" - ); - let checkResult: string; - try { - const doesPyTestRequirementsExists = await pathExists(requirementsPath); - if (!doesPyTestRequirementsExists) { - return false; - } - checkResult = await startPythonReqsProcess( - pythonBinPath, - idfPath, - requirementsPath - ); - } catch (error) { - checkResult = error && error.message ? error.message : " are not satisfied"; - } - if (checkResult.indexOf("are satisfied") > -1) { - return true; - } - return false; -} diff --git a/src/espIdf/debugAdapter/debugAdapterManager.ts b/src/espIdf/debugAdapter/debugAdapterManager.ts deleted file mode 100644 index 8cee16da0..000000000 --- a/src/espIdf/debugAdapter/debugAdapterManager.ts +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Project: ESP-IDF VSCode Extension - * File Created: Friday, 12th July 2019 5:59:07 pm - * Copyright 2019 Espressif Systems (Shanghai) CO LTD - *  - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *  - * http://www.apache.org/licenses/LICENSE-2.0 - *  - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { ChildProcess, spawn } from "child_process"; -import { EventEmitter } from "events"; -import * as path from "path"; -import * as vscode from "vscode"; -import * as idfConf from "../../idfConfiguration"; -import { Logger } from "../../logger/logger"; -import { - appendIdfAndToolsToPath, - canAccessFile, - getToolchainToolName, - isBinInPath, - PreCheck, -} from "../../utils"; -import { EOL } from "os"; -import { outputFile, constants } from "fs-extra"; -import { createFlashModel } from "../../flash/flashModelBuilder"; -import { OutputChannel } from "../../logger/outputChannel"; -import { getVirtualEnvPythonPath } from "../../pythonManager"; -import { getIdfTargetFromSdkconfig } from "../../workspaceConfig"; - -export interface IDebugAdapterConfig { - appOffset?: string; - tmoScaleFactor?: number; - coreDumpFile?: string; - currentWorkspace?: vscode.Uri; - debugAdapterPort?: number; - elfFile?: string; - env?: NodeJS.ProcessEnv; - gdbinitFilePath?: string; - initGdbCommands?: string[]; - isPostMortemDebugMode: boolean; - isOocdDisabled: boolean; - logLevel?: number; - target?: string; -} - -export class DebugAdapterManager extends EventEmitter { - public static init(context: vscode.ExtensionContext): DebugAdapterManager { - if (!DebugAdapterManager.instance) { - DebugAdapterManager.instance = new DebugAdapterManager(context); - } - return DebugAdapterManager.instance; - } - private static instance: DebugAdapterManager; - - private adapter: ChildProcess; - private appOffset: string; - private chan: Buffer; - private coreDumpFile: string; - private currentWorkspace: vscode.Uri; - private debugAdapterPath: string; - private elfFile: string; - private env; - private gdbinitFilePath: string; - private initGdbCommands: string[]; - private tmoScaleFactor?: number; - private isPostMortemDebugMode: boolean; - private isOocdDisabled: boolean; - private logLevel: number; - private port: number; - private target: string; - - private constructor(context: vscode.ExtensionContext) { - super(); - this.configureWithDefaultValues(context.extensionUri); - OutputChannel.init(); - this.chan = Buffer.alloc(0); - } - - public start() { - return new Promise(async (resolve, reject) => { - if (this.isRunning()) { - return; - } - if (!isBinInPath("openocd", this.env)) { - return reject( - new Error("Invalid OpenOCD bin path or access is denied for the user") - ); - } - if ( - this.env && - !this.isOocdDisabled && - typeof this.env.OPENOCD_SCRIPTS === "undefined" - ) { - return reject( - new Error( - "Invalid OpenOCD script path or access is denied for the user" - ) - ); - } - if (!canAccessFile(this.elfFile, constants.R_OK)) { - return reject(new Error(`${this.elfFile} doesn't exist. Build first.`)); - } - const logFile = path.join(this.currentWorkspace.fsPath, "debug") + ".log"; - - if (!this.appOffset) { - const serialPort = idfConf.readParameter( - "idf.port", - this.currentWorkspace - ); - const flashBaudRate = idfConf.readParameter( - "idf.flashBaudRate", - this.currentWorkspace - ); - const buildDirPath = idfConf.readParameter( - "idf.buildPath", - this.currentWorkspace - ) as string; - const flasherArgsJsonPath = path.join( - buildDirPath, - "flasher_args.json" - ); - if (!canAccessFile(flasherArgsJsonPath, constants.R_OK)) { - return reject( - new Error(`${flasherArgsJsonPath} doesn't exist. Build first.`) - ); - } - const model = await createFlashModel( - flasherArgsJsonPath, - serialPort, - flashBaudRate - ); - this.appOffset = model.app.address; - } - const pythonBinPath = await getVirtualEnvPythonPath(this.currentWorkspace); - - const toolchainPrefix = getToolchainToolName(this.target, ""); - const adapterArgs = [ - this.debugAdapterPath, - "-d", - this.logLevel.toString(), - "-e", - this.elfFile, - "-l", - logFile, - "-p", - this.port.toString(), - "-dn", - this.target, - "-a", - this.appOffset, - "-t", - toolchainPrefix, - ]; - if (this.isPostMortemDebugMode) { - adapterArgs.push("-pm"); - } - if (this.coreDumpFile) { - adapterArgs.push("-c", this.coreDumpFile); - } - if (this.isOocdDisabled) { - adapterArgs.push("-om", "without_oocd"); - } - const resultGdbInitFile = this.gdbinitFilePath - ? this.gdbinitFilePath - : await this.makeGdbinitFile(); - if (resultGdbInitFile) { - adapterArgs.push("-x", resultGdbInitFile); - } - if (this.tmoScaleFactor) { - adapterArgs.push("-tsf", this.tmoScaleFactor.toString()); - } - this.adapter = spawn(pythonBinPath, adapterArgs, { env: this.env }); - - this.adapter.stderr.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data) : data; - this.sendToOutputChannel(data); - OutputChannel.appendLine(data.toString(), "Debug Adapter"); - Logger.info(data.toString()); - this.emit("error", data, this.chan); - }); - - this.adapter.stdout.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data) : data; - this.sendToOutputChannel(data); - OutputChannel.appendLine(data.toString(), "Debug Adapter"); - Logger.info(data.toString()); - this.emit("data", this.chan); - if (data.toString().trim().endsWith("DEBUG_ADAPTER_READY2CONNECT")) { - return resolve(true); - } - }); - - this.adapter.on("error", (error) => { - this.emit("error", error, this.chan); - this.stop(); - return reject(error); - }); - - this.adapter.on("close", (code: number, signal: string) => { - if (!signal && code && code !== 0) { - Logger.errorNotify( - `ESP-IDF Debug Adapter exit with error code ${code}`, - new Error("Spawn exit with non-zero" + code), - "DebugAdapterManager start" - ); - } - this.stop(); - }); - OutputChannel.show(); - }); - } - - public stop() { - if (this.adapter && !this.adapter.killed) { - this.isPostMortemDebugMode = false; - this.initGdbCommands = []; - this.adapter.kill("SIGKILL"); - this.adapter = undefined; - const stoppedMsg = "[Stopped] : ESP-IDF Debug Adapter"; - Logger.info(stoppedMsg); - OutputChannel.appendLine(stoppedMsg); - } - } - - public configureAdapter(config: IDebugAdapterConfig) { - if (config.coreDumpFile) { - this.coreDumpFile = config.coreDumpFile; - } - if (config.currentWorkspace) { - this.currentWorkspace = config.currentWorkspace; - } - if (config.debugAdapterPort) { - this.port = config.debugAdapterPort; - } - if (config.elfFile) { - this.elfFile = config.elfFile; - } - if (config.env) { - for (const envVar of Object.keys(config.env)) { - this.env[envVar] = config.env[envVar]; - } - } - if (config.gdbinitFilePath) { - this.gdbinitFilePath = config.gdbinitFilePath; - } - if (config.initGdbCommands) { - this.initGdbCommands = config.initGdbCommands; - } - this.isPostMortemDebugMode = config.isPostMortemDebugMode; - if (config.logLevel) { - this.logLevel = config.logLevel; - } - if (config.target) { - this.target = config.target; - } - if (config.isOocdDisabled) { - this.isOocdDisabled = config.isOocdDisabled; - } - this.tmoScaleFactor = config.tmoScaleFactor; - this.appOffset = config.appOffset; - } - - public isRunning(): boolean { - return this.adapter && !this.adapter.killed; - } - - private async configureWithDefaultValues(extensionPath: vscode.Uri) { - this.currentWorkspace = PreCheck.isWorkspaceFolderOpen() - ? vscode.workspace.workspaceFolders[0].uri - : extensionPath; - this.debugAdapterPath = path.join( - extensionPath.fsPath, - "esp_debug_adapter", - "debug_adapter_main.py" - ); - this.isPostMortemDebugMode = false; - this.isOocdDisabled = false; - this.port = 43474; - this.logLevel = 0; - let idfTarget = await getIdfTargetFromSdkconfig(this.currentWorkspace); - this.target = idfTarget; - this.env = await appendIdfAndToolsToPath(this.currentWorkspace); - this.env.PYTHONPATH = path.join( - extensionPath.fsPath, - "esp_debug_adapter", - "debug_adapter" - ); - this.initGdbCommands = []; - this.elfFile = ""; - if (this.currentWorkspace) { - const buildDirPath = idfConf.readParameter( - "idf.buildPath", - this.currentWorkspace - ) as string; - this.elfFile = `${path.join(buildDirPath, "project-name")}.elf`; - } - } - - private sendToOutputChannel(data: Buffer) { - this.chan = Buffer.concat([this.chan, data]); - } - - private async makeGdbinitFile() { - try { - if (this.initGdbCommands && this.initGdbCommands.length > 0) { - let result = ""; - for (const initCmd of this.initGdbCommands) { - result = result + initCmd + EOL; - } - const lastValue = result.lastIndexOf(EOL); - result = result.substring(0, lastValue); - - const resultGdbInitPath = path.join( - this.currentWorkspace.fsPath, - "esp-idf-vscode-generated.gdb" - ); - await outputFile(resultGdbInitPath, result); - return resultGdbInitPath; - } - } catch (error) { - Logger.errorNotify( - "Error creating gdbinit file", - error, - "DebugAdapterManager makeGdbinitFile" - ); - } - return; - } -} diff --git a/src/espMatter/espMatterDownload.ts b/src/espMatter/espMatterDownload.ts deleted file mode 100644 index 0c3166085..000000000 --- a/src/espMatter/espMatterDownload.ts +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Project: ESP-IDF VSCode Extension - * File Created: Monday, 18th October 2021 2:27:27 pm - * Copyright 2021 Espressif Systems (Shanghai) CO LTD - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { pathExists } from "fs-extra"; -import { join } from "path"; -import { spawn } from "child_process"; -import { - CancellationToken, - Progress, - ProgressLocation, - ShellExecution, - ShellExecutionOptions, - TaskPanelKind, - TaskPresentationOptions, - TaskRevealKind, - TaskScope, - Uri, - window, - workspace, -} from "vscode"; -import { AbstractCloning } from "../common/abstractCloning"; -import { NotificationMode, readParameter } from "../idfConfiguration"; -import { Logger } from "../logger/logger"; -import { TaskManager } from "../taskManager"; -import { OutputChannel } from "../logger/outputChannel"; -import { PackageProgress } from "../PackageProgress"; -import { getVirtualEnvPythonPath, installEspMatterPyReqs } from "../pythonManager"; -import { platform } from "os"; - -export class EspMatterCloning extends AbstractCloning { - public static isBuildingGn: boolean; - constructor(gitBinPath: string = "git", public currWorkspace: Uri) { - super( - "https://github.com/espressif/esp-matter.git", - "ESP-MATTER", - "main", - gitBinPath, - "https://gitee.com/EspressifSystems/esp-matter.git" - ); - } - - public getShellExecution( - bootstrapFilePath: string, - shellOptions: ShellExecutionOptions - ) { - return new ShellExecution(`source ${bootstrapFilePath}`, shellOptions); - } - - public async startBootstrap(onlyActivate: boolean = false) { - if (EspMatterCloning.isBuildingGn) { - throw new Error("ALREADY_BUILDING"); - } - const matterPathDir = readParameter( - "idf.espMatterPath", - this.currWorkspace - ); - const espMatterPathExists = await pathExists(matterPathDir); - if (!espMatterPathExists) { - return; - } - const workingDir = join( - matterPathDir, - "connectedhomeip", - "connectedhomeip" - ); - const bootstrapFilePath = join( - workingDir, - "scripts", - onlyActivate ? "activate.sh" : "bootstrap.sh" - ); - const bootstrapFilePathExists = await pathExists(bootstrapFilePath); - if (!bootstrapFilePathExists) { - return; - } - EspMatterCloning.isBuildingGn = true; - const shellOptions: ShellExecutionOptions = { - cwd: workingDir, - }; - const shellExecutablePath = readParameter( - "idf.customTerminalExecutable", - this.currWorkspace - ) as string; - const shellExecutableArgs = readParameter( - "idf.customTerminalExecutableArgs", - this.currWorkspace - ) as string[]; - if (shellExecutablePath) { - shellOptions.executable = shellExecutablePath; - } - if (shellExecutableArgs && shellExecutableArgs.length) { - shellOptions.shellArgs = shellExecutableArgs; - } - const curWorkspaceFolder = - workspace.workspaceFolders && workspace.workspaceFolders.length - ? workspace.workspaceFolders.find((w) => w.uri === this.currWorkspace) - : undefined; - - const buildGnExec = this.getShellExecution(bootstrapFilePath, shellOptions); - const notificationMode = readParameter( - "idf.notificationMode", - this.currWorkspace - ) as string; - const showTaskOutput = - notificationMode === NotificationMode.All || - notificationMode === NotificationMode.Output - ? TaskRevealKind.Always - : TaskRevealKind.Silent; - - const matterBootstrapPresentationOptions = { - reveal: showTaskOutput, - showReuseMessage: false, - clear: true, - panel: TaskPanelKind.Dedicated, - } as TaskPresentationOptions; - - TaskManager.addTask( - { - type: "esp-idf", - command: "ESP-Matter Bootstrap", - taskId: "idf-bootstrap-task", - }, - curWorkspaceFolder || TaskScope.Workspace, - "ESP-Matter Bootstrap", - buildGnExec, - ["espIdf"], - matterBootstrapPresentationOptions - ); - } - - public async initEsp32PlatformSubmodules( - espMatterDir: string, - workspace: Uri - ) { - OutputChannel.appendLine("Downloading Matter ESP32 platform submodules"); - const notificationMode = readParameter( - "idf.notificationMode", - workspace - ) as string; - const progressLocation = - notificationMode === NotificationMode.All || - notificationMode === NotificationMode.Notifications - ? ProgressLocation.Notification - : ProgressLocation.Window; - await window.withProgress( - { - cancellable: true, - location: progressLocation, - title: "ESP-IDF: Installing ESP-Matter", - }, - async ( - progress: Progress<{ message: string; increment?: number }>, - cancelToken: CancellationToken - ) => { - progress.report({ - message: `Checking out ESP32 platform specific submodules`, - }); - try { - cancelToken.onCancellationRequested((e) => { - this.cancel(); - }); - await this.checkoutEsp32PlatformSubmodules( - espMatterDir, - undefined, - progress - ); - Logger.infoNotify( - `ESP32 platform specific submodules checked out successfully` - ); - } catch (error) { - OutputChannel.appendLine(error.message); - Logger.errorNotify(error.message, error, "EspMatterCloning initEsp32PlatformSubmodules"); - } - } - ); - } - - public async checkoutEsp32PlatformSubmodules( - espMatterDir: string, - pkgProgress?: PackageProgress, - progress?: Progress<{ message?: string; increment?: number }> - ) { - return new Promise((resolve, reject) => { - const matterDir = join( - espMatterDir, - "connectedhomeip", - "connectedhomeip" - ); - - const checkoutProcess = spawn( - join(matterDir, "scripts", "checkout_submodules.py"), - ["--platform", "esp32", platform(), "--shallow"], - { cwd: matterDir } - ); - - checkoutProcess.stderr.on("data", (data) => { - OutputChannel.appendLine(data.toString()); - Logger.info(data.toString()); - const errRegex = /\b(Error)\b/g; - if (errRegex.test(data.toString())) { - reject(data.toString()); - } - const progressRegex = /(\d+)(\.\d+)?%/g; - const matches = data.toString().match(progressRegex); - if (matches) { - let progressMsg = `Downloading ${matches[matches.length - 1]}`; - if (progress) { - progress.report({ - message: progressMsg, - }); - } - if (pkgProgress) { - pkgProgress.Progress = matches[matches.length - 1]; - } - } else if (data.toString().indexOf("Cloning into") !== -1) { - let detailMsg = " " + data.toString(); - if (progress) { - progress.report({ - message: `${data.toString()}`, - }); - } - if (pkgProgress) { - pkgProgress.Progress = detailMsg; - } - } - }); - - checkoutProcess.on("exit", (code, signal) => { - if (!signal && code !== 0) { - const msg = `ESP32 platform submodules clone has exit with ${code}`; - OutputChannel.appendLine(msg); - Logger.errorNotify( - "ESP32 platform submodules cloning error", - new Error(msg), - "EspMatterCloning checkoutEsp32PlatformSubmodules" - ); - return reject(new Error(msg)); - } - return resolve(); - }); - }); - } -} - -export async function installPythonReqs( - espMatterPath: string, - workspace?: Uri -) { - const espIdfPath = readParameter("idf.espIdfPath", workspace); - const pythonBinPath = await getVirtualEnvPythonPath(workspace); - const containerPath = - process.platform === "win32" ? process.env.USERPROFILE : process.env.HOME; - const confToolsPath = readParameter("idf.toolsPath", workspace); - const toolsPath = - confToolsPath || - process.env.IDF_TOOLS_PATH || - join(containerPath, ".espressif"); - const notificationMode = readParameter( - "idf.notificationMode", - workspace - ) as string; - const progressLocation = - notificationMode === NotificationMode.All || - notificationMode === NotificationMode.Notifications - ? ProgressLocation.Notification - : ProgressLocation.Window; - await window.withProgress( - { - cancellable: true, - location: progressLocation, - title: "ESP-IDF: Installing ESP-Matter", - }, - async ( - progress: Progress<{ message: string; increment?: number }>, - cancelToken: CancellationToken - ) => { - progress.report({ - message: `Installing Python Requirements...`, - }); - await installEspMatterPyReqs( - espIdfPath, - toolsPath, - espMatterPath, - pythonBinPath, - undefined, - cancelToken - ); - } - ); -} - -export async function getEspMatter(workspace?: Uri) { - const gitPath = - (await readParameter("idf.gitPath", workspace)) || "/usr/bin/git"; - let espMatterPath: string; - const espMatterInstaller = new EspMatterCloning(gitPath, workspace); - const installAllSubmodules = await window.showQuickPick( - [ - { - label: `No, download ESP32 platform specific submodules only`, - target: "false", - }, - { - label: "Yes, download all Matter submodules", - target: "true", - }, - ], - { placeHolder: `Download all Matter submodules?` } - ); - - try { - if (installAllSubmodules.target === "true") { - await espMatterInstaller.getRepository("idf.espMatterPath", workspace); - espMatterPath = readParameter("idf.espMatterPath", workspace); - await espMatterInstaller.startBootstrap(); - } else { - await espMatterInstaller.getRepository( - "idf.espMatterPath", - workspace, - false - ); - espMatterPath = readParameter("idf.espMatterPath", workspace); - await espMatterInstaller.getSubmodules(espMatterPath); - await espMatterInstaller.initEsp32PlatformSubmodules( - espMatterPath, - workspace - ); - await espMatterInstaller.startBootstrap(true); - } - await TaskManager.runTasks(); - EspMatterCloning.isBuildingGn = false; - } catch (error) { - const msg = - error && error.message ? error.message : "Error bootstrapping esp-matter"; - if (msg === "ALREADY_BUILDING") { - return Logger.errorNotify( - "ESP-Matter bootstrap is already running!", - error, - "getEspMatter or bootstraping already running" - ); - } - EspMatterCloning.isBuildingGn = false; - return Logger.errorNotify(msg, error, "getEspMatter"); - } - - try { - await installPythonReqs(espMatterPath, workspace); - } catch (error) { - const msg = error.message - ? error.message - : typeof error === "string" - ? error - : "Error installing ESP-Matter Python Requirements"; - return Logger.errorNotify(msg, error, "getEspMatter installPythonReqs"); - } - window.showInformationMessage("ESP-Matter has been successfully installed"); -} diff --git a/src/espMdf/espMdfDownload.ts b/src/espMdf/espMdfDownload.ts deleted file mode 100644 index f70863615..000000000 --- a/src/espMdf/espMdfDownload.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2019 Espressif Systems (Shanghai) CO LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -import { Uri } from "vscode"; -import { AbstractCloning } from "../common/abstractCloning"; -import { readParameter } from "../idfConfiguration"; - -export class MdfCloning extends AbstractCloning { - constructor(gitBinPath: string = "git") { - super( - "https://github.com/espressif/esp-mdf.git", - "ESP-MDF", - "master", - gitBinPath, - "https://gitee.com/EspressifSystems/esp-mdf.git" - ); - } -} - -export async function getEspMdf(workspace: Uri) { - const gitPath = await readParameter("idf.gitPath", workspace) || "git"; - const adfInstaller = new MdfCloning(gitPath); - await adfInstaller.getRepository("idf.espMdfPath", workspace); -} diff --git a/src/extension.ts b/src/extension.ts index 685196d89..0ecbe49c6 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -16,10 +16,6 @@ import * as path from "path"; import * as vscode from "vscode"; import { srcOp, UpdateCmakeLists } from "./cmake/srcsWatcher"; -import { - DebugAdapterManager, - IDebugAdapterConfig, -} from "./espIdf/debugAdapter/debugAdapterManager"; import { ConfserverProcess } from "./espIdf/menuconfig/confServerProcess"; import { IOpenOCDConfig, @@ -40,10 +36,7 @@ import { AppTraceTreeDataProvider } from "./espIdf/tracing/tree/appTraceTreeData import * as idfConf from "./idfConfiguration"; import { Logger } from "./logger/logger"; import { OutputChannel } from "./logger/outputChannel"; -import { - showInfoNotificationWithAction, - showInfoNotificationWithMultipleActions, -} from "./logger/utils"; +import { showInfoNotificationWithAction } from "./logger/utils"; import * as utils from "./utils"; import { PreCheck } from "./utils"; import { @@ -76,16 +69,11 @@ import { ESPEFuseTreeDataProvider } from "./efuse/view"; import { ESPEFuseManager } from "./efuse"; import { constants, createFileSync, pathExists, readFile } from "fs-extra"; import { getEspAdf } from "./espAdf/espAdfDownload"; -import { getEspMdf } from "./espMdf/espMdfDownload"; import { SetupPanel } from "./setup/SetupPanel"; import { ChangelogViewer } from "./changelog-viewer"; import { PreReleaseNotification } from "./preReleaseNotification"; import { getSetupInitialValues, ISetupInitArgs } from "./setup/setupInit"; -import { - getVirtualEnvPythonPath, - installEspMatterPyReqs, - installExtensionPyReqs, -} from "./pythonManager"; +import { getVirtualEnvPythonPath } from "./pythonManager"; import { checkExtensionSettings } from "./checkExtensionSettings"; import { CmakeListsEditorPanel } from "./cmake/cmakeEditorPanel"; import { seachInEspDocs } from "./espIdf/documentation/getSearchResults"; @@ -128,19 +116,13 @@ import { CustomTask, CustomTaskType } from "./customTasks/customTaskProvider"; import { TaskManager } from "./taskManager"; import { WelcomePanel } from "./welcome/panel"; import { getWelcomePageInitialValues } from "./welcome/welcomeInit"; -import { getEspMatter } from "./espMatter/espMatterDownload"; import { setIdfTarget } from "./espIdf/setTarget"; import { PeripheralTreeView } from "./espIdf/debugAdapter/peripheralTreeView"; import { PeripheralBaseNode } from "./espIdf/debugAdapter/nodes/base"; import { ExtensionConfigStore } from "./common/store"; import { projectConfigurationPanel } from "./project-conf/projectConfPanel"; import { ProjectConfigStore } from "./project-conf"; -import { - clearPreviousIdfSetups, - getPreviousIdfSetups, - loadIdfSetupsFromEspIdfJson, -} from "./setup/existingIdfSetups"; -import { getEspRainmaker } from "./rainmaker/download/espRainmakerDownload"; +import { clearPreviousIdfSetups } from "./setup/existingIdfSetups"; import { UnitTest } from "./espIdf/unitTest/adapter"; import { buildFlashTestApp, @@ -153,17 +135,11 @@ import { import { getFileList, getTestComponents } from "./espIdf/unitTest/utils"; import { saveDefSdkconfig } from "./espIdf/menuconfig/saveDefConfig"; import { createSBOM, installEspSBOM } from "./espBom"; -import { getEspHomeKitSdk } from "./espHomekit/espHomekitDownload"; import { getCurrentIdfSetup, selectIdfSetup } from "./versionSwitcher"; -import { checkDebugAdapterRequirements } from "./espIdf/debugAdapter/checkPyReqs"; import { CDTDebugConfigurationProvider } from "./cdtDebugAdapter/debugConfProvider"; import { CDTDebugAdapterDescriptorFactory } from "./cdtDebugAdapter/server"; import { IdfReconfigureTask } from "./espIdf/reconfigure/task"; -import { - ErrorHintProvider, - ErrorHintTreeItem, - HintHoverProvider, -} from "./espIdf/hints/index"; +import { ErrorHintProvider, HintHoverProvider } from "./espIdf/hints/index"; import { installWebsocketClient } from "./espIdf/monitor/checkWebsocketClient"; import { TroubleshootingPanel } from "./support/troubleshootPanel"; import { createCmdsStatusBarItems, statusBarItems } from "./statusBar"; @@ -172,7 +148,6 @@ import { createCommandDictionary, IDFWebCommandKeys, } from "./cmdTreeView/cmdStore"; -import { IdfSetup } from "./views/setup/types"; import { asyncRemoveEspIdfSettings } from "./uninstall"; import { clearSelectedProjectConfiguration, @@ -198,7 +173,6 @@ let covRenderer: CoverageRenderer; let openOCDManager: OpenOCDManager; let isOpenOCDLaunchedByDebug: boolean = false; let isDebugRestarted: boolean = false; -let debugAdapterManager: DebugAdapterManager; // QEMU let qemuManager: QemuManager; @@ -349,8 +323,6 @@ export async function activate(context: vscode.ExtensionContext) { ); } } - - debugAdapterManager = DebugAdapterManager.init(context); OutputChannel.init(); const registerIDFCommand = ( name: string, @@ -555,11 +527,6 @@ export async function activate(context: vscode.ExtensionContext) { ) as string; const projectName = await getProjectName(buildDirPath); const projectElfFile = `${path.join(buildDirPath, projectName)}.elf`; - const debugAdapterConfig = { - currentWorkspace: workspaceRoot, - elfFile: projectElfFile, - } as IDebugAdapterConfig; - debugAdapterManager.configureAdapter(debugAdapterConfig); const openOCDConfig: IOpenOCDConfig = { workspace: workspaceRoot, } as IOpenOCDConfig; @@ -584,7 +551,6 @@ export async function activate(context: vscode.ExtensionContext) { isOpenOCDLaunchedByDebug = false; openOCDManager.stop(); } - debugAdapterManager.stop(); }); const sdkconfigWatcher = vscode.workspace.createFileSystemWatcher( @@ -824,64 +790,6 @@ export async function activate(context: vscode.ExtensionContext) { registerIDFCommand("espIdf.getEspAdf", async () => getEspAdf(workspaceRoot)); - registerIDFCommand("espIdf.getEspMdf", async () => getEspMdf(workspaceRoot)); - - registerIDFCommand("espIdf.getEspHomeKitSdk", async () => - getEspHomeKitSdk(workspaceRoot) - ); - - registerIDFCommand("espIdf.getEspMatter", async () => { - if (process.platform === "win32") { - return vscode.window.showInformationMessage( - vscode.l10n.t(`ESP-Matter is not available for Windows.`) - ); - } - getEspMatter(workspaceRoot); - }); - - registerIDFCommand("espIdf.getEspRainmaker", async () => - getEspRainmaker(workspaceRoot) - ); - - registerIDFCommand("espIdf.setMatterDevicePath", async () => { - if (process.platform === "win32") { - return vscode.window.showInformationMessage( - vscode.l10n.t(`ESP-Matter is not available for Windows.`) - ); - } - const configurationTarget = vscode.ConfigurationTarget.WorkspaceFolder; - let workspaceFolder = await vscode.window.showWorkspaceFolderPick({ - placeHolder: vscode.l10n.t( - `Pick Workspace Folder to which settings should be applied` - ), - }); - if (!workspaceFolder) { - return; - } - const customMatterDevicePath = await vscode.window.showInputBox({ - placeHolder: vscode.l10n.t("Enter ESP_MATTER_DEVICE_PATH path"), - }); - if (!customMatterDevicePath) { - return; - } - const customVarsString = idfConf.readParameter( - "idf.customExtraVars", - workspaceFolder - ) as { [key: string]: string }; - customVarsString["ESP_MATTER_DEVICE_PATH"] = customMatterDevicePath; - await idfConf.writeParameter( - "idf.customExtraVars", - customVarsString, - configurationTarget, - workspaceFolder.uri - ); - return vscode.window.showInformationMessage( - vscode.l10n.t( - `ESP_MATTER_DEVICE_PATH has been set in idf.customExtraVars configuration setting.` - ) - ); - }); - registerIDFCommand("espIdf.selectPort", () => { PreCheck.perform([webIdeCheck, openFolderCheck], async () => SerialPort.shared().promptUserToSelect(workspaceRoot, false) @@ -1051,10 +959,6 @@ export async function activate(context: vscode.ExtensionContext) { commandDictionary[CommandKeys.SelectCurrentIdfVersion].iconId }) ESP-IDF InvalidSetup`; } - const debugAdapterConfig = { - currentWorkspace: workspaceRoot, - } as IDebugAdapterConfig; - debugAdapterManager.configureAdapter(debugAdapterConfig); const openOCDConfig: IOpenOCDConfig = { workspace: workspaceRoot, } as IOpenOCDConfig; @@ -1286,11 +1190,6 @@ export async function activate(context: vscode.ExtensionContext) { } }); - const debugProvider = new IdfDebugConfigurationProvider(); - context.subscriptions.push( - vscode.debug.registerDebugConfigurationProvider("espidf", debugProvider) - ); - const cdtDebugProvider = new CDTDebugConfigurationProvider(); context.subscriptions.push( vscode.debug.registerDebugConfigurationProvider( @@ -1307,73 +1206,6 @@ export async function activate(context: vscode.ExtensionContext) { ) ); - vscode.debug.registerDebugAdapterDescriptorFactory("espidf", { - async createDebugAdapterDescriptor(session: vscode.DebugSession) { - try { - const portToUse = session.configuration.debugPort || DEBUG_DEFAULT_PORT; - const launchMode = session.configuration.mode || "auto"; - const useMonitorWithDebug = idfConf.readParameter( - "idf.launchMonitorOnDebugSession", - workspaceRoot - ); - if ( - session.configuration.sessionID !== "core-dump.debug.session.ws" && - useMonitorWithDebug - ) { - await createNewIdfMonitor(workspaceRoot, true); - } - if ( - launchMode === "auto" && - !openOCDManager.isRunning() && - session.configuration.sessionID !== "core-dump.debug.session.ws" - ) { - isOpenOCDLaunchedByDebug = true; - await openOCDManager.start(); - } - if (session.configuration.sessionID === "qemu.debug.session") { - const debugAdapterConfig = { - appOffset: session.configuration.appOffset, - elfFile: session.configuration.elfFilePath, - debugAdapterPort: portToUse, - tmoScaleFactor: session.configuration.tmoScaleFactor, - } as IDebugAdapterConfig; - debugAdapterManager.configureAdapter(debugAdapterConfig); - await debugAdapterManager.start(); - } - if (session.configuration.sessionID === "core-dump.debug.session.ws") { - await debugAdapterManager.start(); - } - if (launchMode === "auto" && !debugAdapterManager.isRunning()) { - const debugAdapterConfig = { - appOffset: session.configuration.appOffset, - debugAdapterPort: portToUse, - elfFile: session.configuration.elfFilePath, - env: session.configuration.env, - gdbinitFilePath: session.configuration.gdbinitFile, - initGdbCommands: session.configuration.initGdbCommands || [], - tmoScaleFactor: session.configuration.tmoScaleFactor, - isPostMortemDebugMode: false, - isOocdDisabled: false, - logLevel: session.configuration.logLevel, - } as IDebugAdapterConfig; - debugAdapterManager.configureAdapter(debugAdapterConfig); - await debugAdapterManager.start(); - } - return new vscode.DebugAdapterServer(portToUse); - } catch (error) { - const errMsg = - error && error.message - ? error.message - : "Error starting ESP-IDF Debug Adapter"; - return Logger.errorNotify( - errMsg, - error, - "extension createDebugAdapterDescriptor espidf" - ); - } - }, - }); - vscode.debug.onDidStartDebugSession(async (session) => { const svdFile = idfConf.readParameter( "idf.svdFilePath", @@ -1615,152 +1447,6 @@ export async function activate(context: vscode.ExtensionContext) { ); }); - registerIDFCommand("espIdf.installPyReqs", () => { - return PreCheck.perform([openFolderCheck], async () => { - const notificationMode = idfConf.readParameter( - "idf.notificationMode", - workspaceRoot - ) as string; - const ProgressLocation = - notificationMode === idfConf.NotificationMode.All || - notificationMode === idfConf.NotificationMode.Notifications - ? vscode.ProgressLocation.Notification - : vscode.ProgressLocation.Window; - vscode.window.withProgress( - { - cancellable: true, - location: ProgressLocation, - title: "ESP-IDF: Installing Python requirements", - }, - async ( - progress: vscode.Progress<{ message: string; increment?: number }>, - cancelToken: vscode.CancellationToken - ) => { - try { - const espIdfPath = idfConf.readParameter( - "idf.espIdfPath", - workspaceRoot - ) as string; - const containerPath = - process.platform === "win32" - ? process.env.USERPROFILE - : process.env.HOME; - const confToolsPath = idfConf.readParameter( - "idf.toolsPath", - workspaceRoot - ) as string; - const toolsPath = - confToolsPath || - process.env.IDF_TOOLS_PATH || - path.join(containerPath, ".espressif"); - const pyPath = await getVirtualEnvPythonPath(workspaceRoot); - progress.report({ - message: vscode.l10n.t( - `Installing ESP-IDF extension Python requirements...` - ), - }); - await installExtensionPyReqs( - pyPath, - espIdfPath, - toolsPath, - undefined - ); - vscode.window.showInformationMessage( - vscode.l10n.t("ESP-IDF Python Requirements has been installed") - ); - } catch (error) { - const msg = error.message - ? error.message - : typeof error === "string" - ? error - : "Error installing Python requirements"; - Logger.errorNotify(msg, error, "extension installPyReqs"); - } - } - ); - }); - }); - - registerIDFCommand("espIdf.installEspMatterPyReqs", () => { - if (process.platform === "win32") { - return vscode.window.showInformationMessage( - vscode.l10n.t(`ESP-Matter is not available for Windows.`) - ); - } - return PreCheck.perform([openFolderCheck], async () => { - const notificationMode = idfConf.readParameter( - "idf.notificationMode", - workspaceRoot - ) as string; - const ProgressLocation = - notificationMode === idfConf.NotificationMode.All || - notificationMode === idfConf.NotificationMode.Notifications - ? vscode.ProgressLocation.Notification - : vscode.ProgressLocation.Window; - vscode.window.withProgress( - { - cancellable: true, - location: ProgressLocation, - title: "ESP-IDF:", - }, - async ( - progress: vscode.Progress<{ message: string; increment?: number }>, - cancelToken: vscode.CancellationToken - ) => { - try { - const espIdfPath = idfConf.readParameter( - "idf.espIdfPath", - workspaceRoot - ) as string; - const containerPath = - process.platform === "win32" - ? process.env.USERPROFILE - : process.env.HOME; - const confToolsPath = idfConf.readParameter( - "idf.toolsPath", - workspaceRoot - ) as string; - const toolsPath = - confToolsPath || - process.env.IDF_TOOLS_PATH || - path.join(containerPath, ".espressif"); - const espMatterPath = idfConf.readParameter( - "idf.espMatterPath", - workspaceRoot - ) as string; - const pyPath = await getVirtualEnvPythonPath(workspaceRoot); - progress.report({ - message: vscode.l10n.t( - `Installing ESP-Matter Python Requirements...` - ), - }); - await installEspMatterPyReqs( - espIdfPath, - toolsPath, - espMatterPath, - pyPath, - undefined, - cancelToken - ); - - vscode.window.showInformationMessage( - vscode.l10n.t( - "ESP-Matter Python Requirements have been installed" - ) - ); - } catch (error) { - const msg = error.message - ? error.message - : typeof error === "string" - ? error - : "Error installing ESP-Matter Python Requirements"; - Logger.errorNotify(msg, error, "extension installEspMatterPyReqs"); - } - } - ); - }); - }); - registerIDFCommand("espIdf.unitTest.installPyTest", () => { return PreCheck.perform([openFolderCheck], async () => { try { @@ -4663,69 +4349,3 @@ export function deactivate() { } KconfigLangClient.stopKconfigLangServer(); } - -class IdfDebugConfigurationProvider - implements vscode.DebugConfigurationProvider { - public async resolveDebugConfiguration( - folder: vscode.WorkspaceFolder | undefined, - config: vscode.DebugConfiguration, - token?: vscode.CancellationToken - ): Promise { - try { - const buildDirPath = idfConf.readParameter( - "idf.buildPath", - workspaceRoot - ) as string; - const projectName = await getProjectName(buildDirPath); - const elfFilePath = path.join(buildDirPath, `${projectName}.elf`); - const elfFileExists = await pathExists(elfFilePath); - if (!elfFileExists) { - throw new Error( - `${elfFilePath} doesn't exist. Build this project first.` - ); - } - if (config.verifyAppBinBeforeDebug) { - const isSameAppBinary = await verifyAppBinary(workspaceRoot); - if (!isSameAppBinary) { - throw new Error( - vscode.l10n.t( - `Current app binary is different from your project. Flash first.` - ) - ); - } - } - config.elfFilePath = elfFilePath; - const debugAdapterPackagesExist = await checkDebugAdapterRequirements( - workspaceRoot - ); - if (!debugAdapterPackagesExist) { - const installDAPyPkgs = await vscode.window.showInformationMessage( - "ESP-IDF Debug Adapter Python packages are not installed", - "Install" - ); - if (installDAPyPkgs && installDAPyPkgs === "Install") { - await vscode.commands.executeCommand("espIdf.installPyReqs"); - } - return; - } - } catch (error) { - const msg = error.message - ? error.message - : "Some build files doesn't exist. Build this project first."; - Logger.error( - error.message, - error, - "extension IdfDebugConfigurationProvider" - ); - const startBuild = await vscode.window.showInformationMessage( - msg, - "Build" - ); - if (startBuild === "Build") { - await buildFlashAndMonitor(false); - return; - } - } - return config; - } -} diff --git a/src/newProject/newProjectInit.ts b/src/newProject/newProjectInit.ts index 622c1faab..5a8772cbb 100644 --- a/src/newProject/newProjectInit.ts +++ b/src/newProject/newProjectInit.ts @@ -38,10 +38,6 @@ import { join } from "path"; export interface INewProjectArgs { espIdfSetup: IdfSetup; espAdfPath: string; - espMdfPath: string; - espMatterPath: string; - espHomeKitSdkPath: string; - espRainmakerPath: string; idfTargets: IdfTarget[]; boards: IdfBoard[]; components: IComponent[]; @@ -130,22 +126,6 @@ export async function getNewProjectArgs( "idf.espAdfPath", workspace ) as string; - const espMdfPath = idfConf.readParameter( - "idf.espMdfPath", - workspace - ) as string; - const espMatterPath = idfConf.readParameter( - "idf.espMatterPath", - workspace - ) as string; - const espHomeKitSdkPath = idfConf.readParameter( - "idf.espHomeKitSdkPath", - workspace - ) as string; - const espRainmakerPath = idfConf.readParameter( - "idf.espRainmakerPath", - workspace - ) as string; let templates: { [key: string]: IExampleCategory } = {}; const idfExists = await dirExistPromise(idfSetup.idfPath); if (idfExists) { @@ -169,26 +149,6 @@ export async function getNewProjectArgs( const adfTemplates = getExamplesList(espAdfPath); templates["ESP-ADF"] = adfTemplates; } - const rainmakerExists = await dirExistPromise(espRainmakerPath); - if (rainmakerExists) { - const rainmakerTemplates = getExamplesList(espRainmakerPath); - templates["ESP-RAINMAKER"] = rainmakerTemplates; - } - const matterExists = await dirExistPromise(espMatterPath); - if (matterExists) { - const matterTemplates = getExamplesList(espMatterPath); - templates["ESP-MATTER"] = matterTemplates; - } - const mdfExists = await dirExistPromise(espMdfPath); - if (mdfExists) { - const mdfTemplates = getExamplesList(espMdfPath); - templates["ESP-MDF"] = mdfTemplates; - } - const homekitSdkExists = await dirExistPromise(espHomeKitSdkPath); - if (homekitSdkExists) { - const homeKitSdkTemplates = getExamplesList(espHomeKitSdkPath); - templates["ESP-HOMEKIT-SDK"] = homeKitSdkTemplates; - } const targetsFromIdf = await getTargetsFromEspIdf( workspace, @@ -201,11 +161,7 @@ export async function getNewProjectArgs( components, espIdfSetup: idfSetup, espAdfPath: adfExists ? espAdfPath : undefined, - espMdfPath: mdfExists ? espMdfPath : undefined, idfTargets: targetsFromIdf, - espMatterPath: matterExists ? espMatterPath : undefined, - espHomeKitSdkPath: homekitSdkExists ? espHomeKitSdkPath : undefined, - espRainmakerPath: rainmakerExists ? espRainmakerPath : undefined, serialPortList, templates, workspaceFolder: workspace, diff --git a/src/newProject/newProjectPanel.ts b/src/newProject/newProjectPanel.ts index 5a2d843f9..4c9ca6aa2 100644 --- a/src/newProject/newProjectPanel.ts +++ b/src/newProject/newProjectPanel.ts @@ -77,20 +77,6 @@ export class NewProjectPanel { vscode.Uri.file(newProjectArgs.espIdfSetup.idfPath) ); } - if (newProjectArgs.espMdfPath) { - localResourceRoots.push(vscode.Uri.file(newProjectArgs.espMdfPath)); - } - if (newProjectArgs.espMatterPath) { - localResourceRoots.push(vscode.Uri.file(newProjectArgs.espMatterPath)); - } - if (newProjectArgs.espRainmakerPath) { - localResourceRoots.push(vscode.Uri.file(newProjectArgs.espRainmakerPath)); - } - if (newProjectArgs.espHomeKitSdkPath) { - localResourceRoots.push( - vscode.Uri.file(newProjectArgs.espHomeKitSdkPath) - ); - } this.panel = vscode.window.createWebviewPanel( NewProjectPanel.viewType, newProjectTitle, diff --git a/src/newProject/utils.ts b/src/newProject/utils.ts index 122caab6d..732a92d55 100644 --- a/src/newProject/utils.ts +++ b/src/newProject/utils.ts @@ -33,7 +33,6 @@ export async function setCurrentSettingsInTemplate( ) { const settingsJson = await readJSON(settingsJsonPath); const adfPathDir = readParameter("idf.espAdfPath", workspace); - const mdfPathDir = readParameter("idf.espMdfPath", workspace); const isWin = process.platform === "win32" ? "Win" : ""; if (idfSetup.idfPath) { settingsJson["idf.espIdfPath" + isWin] = idfSetup.idfPath; @@ -50,9 +49,6 @@ export async function setCurrentSettingsInTemplate( if (adfPathDir) { settingsJson["idf.espAdfPath" + isWin] = adfPathDir; } - if (mdfPathDir) { - settingsJson["idf.espMdfPath" + isWin] = mdfPathDir; - } if (openOcdConfigs) { settingsJson["idf.openOcdConfigs"] = openOcdConfigs.indexOf(",") !== -1 diff --git a/src/pythonManager.ts b/src/pythonManager.ts index c3c3929f9..85a8b15fb 100644 --- a/src/pythonManager.ts +++ b/src/pythonManager.ts @@ -164,120 +164,6 @@ export async function installPythonEnvFromIdfTools( return virtualEnvPython; } -export async function installExtensionPyReqs( - virtualEnvPython: string, - espDir: string, - idfToolsDir: string, - pyTracker?: PyReqLog, - opts?: { - env: NodeJS.ProcessEnv; - cwd: string; - cancelToken?: CancellationToken; - } -) { - const reqDoesNotExists = " doesn't exist. Make sure the path is correct."; - const debugAdapterRequirements = join( - utils.extensionContext.extensionPath, - "esp_debug_adapter", - "requirements.txt" - ); - if (!utils.canAccessFile(debugAdapterRequirements, constants.R_OK)) { - Logger.warnNotify(debugAdapterRequirements + reqDoesNotExists); - OutputChannel.appendLine(debugAdapterRequirements + reqDoesNotExists); - return; - } - const fullEspIdfVersion = await utils.getEspIdfFromCMake(espDir); - const majorMinorMatches = fullEspIdfVersion.match(/([0-9]+\.[0-9]+).*/); - const espIdfVersion = - majorMinorMatches && majorMinorMatches.length > 0 - ? majorMinorMatches[1] - : "x.x"; - const constrainsFile = join( - idfToolsDir, - `espidf.constraints.v${espIdfVersion}.txt` - ); - const constrainsFileExists = await pathExists(constrainsFile); - let constraintArg = []; - if (constrainsFileExists) { - constraintArg = ["--constraint", constrainsFile]; - } else { - const extensionConstraintsFile = join( - utils.extensionContext.extensionPath, - "espidf.constraints.txt" - ); - const extensionConstraintsFileExists = await pathExists( - extensionConstraintsFile - ); - if (extensionConstraintsFileExists) { - constraintArg = ["--constraint", extensionConstraintsFile]; - } - } - const installDAPyPkgsMsg = `Installing ESP-IDF Debug Adapter python packages in ${virtualEnvPython} ...\n`; - Logger.info(installDAPyPkgsMsg + "\n"); - if (pyTracker) { - pyTracker.Log = installDAPyPkgsMsg; - } - OutputChannel.appendLine(installDAPyPkgsMsg + "\n"); - const args = [ - "-m", - "pip", - "install", - "--upgrade", - ...constraintArg, - "--no-warn-script-location", - "-r", - debugAdapterRequirements, - "--extra-index-url", - "https://dl.espressif.com/pypi", - ]; - await execProcessWithLog(virtualEnvPython, args, pyTracker, opts); -} - -export async function installEspMatterPyReqs( - espDir: string, - idfToolsDir: string, - espMatterDir: string, - pythonBinPath: string, - pyTracker?: PyReqLog, - cancelToken?: CancellationToken -) { - const modifiedEnv: { [key: string]: string } = <{ [key: string]: string }>( - Object.assign({}, process.env) - ); - const opts = { env: modifiedEnv, cwd: idfToolsDir, cancelToken }; - const virtualEnvPython = await getPythonEnvPath( - espDir, - idfToolsDir, - pythonBinPath - ); - - const reqDoesNotExists = " doesn't exist. Make sure the path is correct."; - const matterRequirements = join(espMatterDir, "requirements.txt"); - if (!utils.canAccessFile(matterRequirements, constants.R_OK)) { - Logger.warnNotify(matterRequirements + reqDoesNotExists); - OutputChannel.appendLine(matterRequirements + reqDoesNotExists); - throw new Error(); - } - const installMatterPyPkgsMsg = `Installing ESP-Matter python packages in ${virtualEnvPython} ...\n`; - Logger.info(installMatterPyPkgsMsg); - if (pyTracker) { - pyTracker.Log = installMatterPyPkgsMsg; - } - OutputChannel.appendLine(installMatterPyPkgsMsg + "\n"); - const args = [ - "-m", - "pip", - "install", - "--upgrade", - "--no-warn-script-location", - "-r", - matterRequirements, - "--extra-index-url", - "https://dl.espressif.com/pypi", - ]; - await execProcessWithLog(virtualEnvPython, args, pyTracker, opts); - return virtualEnvPython; -} export async function execProcessWithLog( cmd: string, args: string[], diff --git a/src/rainmaker/download/espRainmakerDownload.ts b/src/rainmaker/download/espRainmakerDownload.ts deleted file mode 100644 index 522f58799..000000000 --- a/src/rainmaker/download/espRainmakerDownload.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Project: ESP-IDF VSCode Extension - * File Created: Tuesday, 6th June 2023 4:57:01 pm - * Copyright 2023 Espressif Systems (Shanghai) CO LTD - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Uri } from "vscode"; -import { AbstractCloning } from "../../common/abstractCloning"; -import { readParameter } from "../../idfConfiguration"; - -export class RainmakerCloning extends AbstractCloning { - constructor(gitBinPath: string = "git") { - super( - "https://github.com/espressif/esp-rainmaker.git", - "ESP-RAINMAKER", - "master", - gitBinPath, - "https://gitee.com/EspressifSystems/esp-rainmaker.git" - ); - } -} - -export async function getEspRainmaker(workspace?: Uri) { - const gitPath = (readParameter("idf.gitPath", workspace) as string) || "git"; - const rainmakerInstaller = new RainmakerCloning(gitPath); - await rainmakerInstaller.getRepository("idf.espRainmakerPath", workspace); -} diff --git a/src/support/checkExtensionRequirements.ts b/src/support/checkExtensionRequirements.ts deleted file mode 100644 index 536d5f6d6..000000000 --- a/src/support/checkExtensionRequirements.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Project: ESP-IDF VSCode Extension - * File Created: Wednesday, 30th December 2020 4:47:28 pm - * Copyright 2020 Espressif Systems (Shanghai) CO LTD - *  - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *  - * http://www.apache.org/licenses/LICENSE-2.0 - *  - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { join } from "path"; -import * as vscode from "vscode"; -import { reportObj } from "./types"; -import { checkRequirements } from "./checkEspIdfRequirements"; - -export async function checkDebugAdapterRequirements( - reportedResult: reportObj, - context: vscode.ExtensionContext -) { - try { - const requirementsPath = join( - context.extensionPath, - "esp_debug_adapter", - "requirements.txt" - ); - const result = await checkRequirements( - context, - reportedResult, - requirementsPath - ); - reportedResult.debugAdapterRequirements.output = result; - reportedResult.debugAdapterRequirements.result = result; - } catch (error) { - reportedResult.debugAdapterRequirements.result = "Error"; - reportedResult.latestError = error; - } -} diff --git a/src/support/checkSpacesInSettings.ts b/src/support/checkSpacesInSettings.ts index 0109b4be1..90f83348b 100644 --- a/src/support/checkSpacesInSettings.ts +++ b/src/support/checkSpacesInSettings.ts @@ -28,18 +28,6 @@ export function checkSpacesInSettings(reportedResult: reportObj) { reportedResult.configurationSettings.espIdfPath ); - reportedResult.configurationSpacesValidation.espMatterPath = checkSpacesInPath( - reportedResult.configurationSettings.espMatterPath - ); - - reportedResult.configurationSpacesValidation.espMdfPath = checkSpacesInPath( - reportedResult.configurationSettings.espMdfPath - ); - - reportedResult.configurationSpacesValidation.espHomeKitPath = checkSpacesInPath( - reportedResult.configurationSettings.espHomeKitPath - ); - reportedResult.configurationSpacesValidation.sysPythonBinPath = checkSpacesInPath( reportedResult.configurationSettings.sysPythonBinPath ); diff --git a/src/support/configurationAccess.ts b/src/support/configurationAccess.ts index 5b9db7e06..0a00067bd 100644 --- a/src/support/configurationAccess.ts +++ b/src/support/configurationAccess.ts @@ -17,14 +17,11 @@ */ import { constants } from "fs-extra"; import { delimiter } from "path"; -import * as vscode from "vscode"; import { canAccessFile, isBinInPath } from "../utils"; -import { execChildProcess } from "./execChildProcess"; import { reportObj } from "./types"; export async function getConfigurationAccess( - reportedResult: reportObj, - context: vscode.ExtensionContext + reportedResult: reportObj ) { reportedResult.configurationAccess.toolsPath = canAccessFile( reportedResult.configurationSettings.toolsPath, @@ -38,18 +35,6 @@ export async function getConfigurationAccess( reportedResult.configurationSettings.espIdfPath, constants.R_OK ); - reportedResult.configurationAccess.espMdfPath = canAccessFile( - reportedResult.configurationSettings.espMdfPath, - constants.R_OK - ); - reportedResult.configurationAccess.espMatterPath = canAccessFile( - reportedResult.configurationSettings.espMatterPath, - constants.R_OK - ); - reportedResult.configurationAccess.espHomeKitPath = canAccessFile( - reportedResult.configurationSettings.espHomeKitPath, - constants.R_OK - ); reportedResult.configurationAccess.sysPythonBinPath = canAccessFile( reportedResult.configurationSettings.sysPythonBinPath, constants.X_OK diff --git a/src/support/configurationSettings.ts b/src/support/configurationSettings.ts index dbb6567a9..6f007c052 100644 --- a/src/support/configurationSettings.ts +++ b/src/support/configurationSettings.ts @@ -72,9 +72,6 @@ export async function getConfigurationSettings( reportedResult.configurationSettings = { espAdfPath: conf.get("idf.espAdfPath" + winFlag), espIdfPath: conf.get("idf.espIdfPath" + winFlag), - espMdfPath: conf.get("idf.espMdfPath" + winFlag), - espMatterPath: conf.get("idf.espMatterPath"), - espHomeKitPath: conf.get("idf.espHomeKitSdkPath" + winFlag), customTerminalExecutable: conf.get("idf.customTerminalExecutable"), customTerminalExecutableArgs: conf.get("idf.customTerminalExecutableArgs"), flashType: conf.get("idf.flashType"), diff --git a/src/support/index.ts b/src/support/index.ts index 487cec995..891ac76d2 100644 --- a/src/support/index.ts +++ b/src/support/index.ts @@ -27,7 +27,6 @@ import { getPipVersion } from "./pipVersion"; import { getPythonPackages } from "./pythonPackages"; import { checkEspIdfTools } from "./checkEspIdfTools"; import { checkEspIdfRequirements } from "./checkEspIdfRequirements"; -import { checkDebugAdapterRequirements } from "./checkExtensionRequirements"; import { writeTextReport } from "./writeReport"; import { checkSystemInfo } from "./checkSystemInfo"; import { checkCCppPropertiesJson, checkLaunchJson } from "./checkVscodeFiles"; @@ -44,7 +43,7 @@ export async function generateConfigurationReport( ) { await getConfigurationSettings(reportedResult, currentWorkspace); await checkSystemInfo(reportedResult); - await getConfigurationAccess(reportedResult, context); + await getConfigurationAccess(reportedResult); checkSpacesInSettings(reportedResult); await getGitVersion(reportedResult, context); await getEspIdfVersion(reportedResult); @@ -53,7 +52,6 @@ export async function generateConfigurationReport( await getPythonPackages(reportedResult, context); await checkEspIdfTools(reportedResult, context); await checkEspIdfRequirements(reportedResult, context); - await checkDebugAdapterRequirements(reportedResult, context); await checkLaunchJson(reportedResult, currentWorkspace); await checkCCppPropertiesJson(reportedResult, currentWorkspace); getProjectConfigurations(reportedResult); diff --git a/src/support/initReportObj.ts b/src/support/initReportObj.ts index b3fa43727..9fddf8f8d 100644 --- a/src/support/initReportObj.ts +++ b/src/support/initReportObj.ts @@ -23,9 +23,6 @@ export function initializeReportObject() { systemEnvPath: undefined, espIdfPath: undefined, espAdfPath: undefined, - espMdfPath: undefined, - espMatterPath: undefined, - espHomeKitPath: undefined, flashType: undefined, flashPartitionToUse: undefined, customExtraPaths: undefined, @@ -48,9 +45,6 @@ export function initializeReportObject() { report.configurationAccess = { espIdfPath: undefined, espAdfPath: undefined, - espMdfPath: undefined, - espMatterPath: undefined, - espHomeKitPath: undefined, espIdfToolsPaths: undefined, pythonBinPath: undefined, cmakeInEnv: undefined, @@ -62,9 +56,6 @@ export function initializeReportObject() { customExtraPaths: undefined, espAdfPath: undefined, espIdfPath: undefined, - espMatterPath: undefined, - espMdfPath: undefined, - espHomeKitPath: undefined, gitPath: undefined, pythonBinPath: undefined, toolsPath: undefined, diff --git a/src/support/types.ts b/src/support/types.ts index d6ed11c24..759c92d4b 100644 --- a/src/support/types.ts +++ b/src/support/types.ts @@ -21,9 +21,6 @@ import { ProjectConfElement } from "../project-conf/projectConfiguration"; export class ConfigurationAccess { espIdfPath: boolean; espAdfPath: boolean; - espMdfPath: boolean; - espMatterPath: boolean; - espHomeKitPath: boolean; espIdfToolsPaths: { [key: string]: boolean }; pythonBinPath: boolean; cmakeInEnv: boolean; @@ -35,9 +32,6 @@ export class Configuration { systemEnvPath: string; espIdfPath: string; espAdfPath: string; - espMdfPath: string; - espMatterPath: string; - espHomeKitPath: string; customExtraPaths: string; flashType: string; flashPartitionToUse: string; @@ -61,9 +55,6 @@ export class ConfigurationSpacesValidation { systemEnvPath: boolean; espIdfPath: boolean; espAdfPath: boolean; - espMdfPath: boolean; - espMatterPath: boolean; - espHomeKitPath: boolean; customExtraPaths: { [key: string]: boolean }; pythonBinPath: boolean; sysPythonBinPath: boolean; diff --git a/src/support/writeReport.ts b/src/support/writeReport.ts index ac4a49416..ad974047e 100644 --- a/src/support/writeReport.ts +++ b/src/support/writeReport.ts @@ -43,9 +43,6 @@ export async function writeTextReport( output += `---------------------------------------------------- Extension configuration settings ------------------------------------------------------${EOL}`; output += `ESP-ADF Path (idf.espAdfPath) ${reportedResult.configurationSettings.espAdfPath}${EOL}`; output += `ESP-IDF Path (idf.espIdfPath) ${reportedResult.configurationSettings.espIdfPath}${EOL}`; - output += `ESP-MDF Path (idf.espMdfPath) ${reportedResult.configurationSettings.espMdfPath}${EOL}`; - output += `ESP-Matter Path (idf.espMatterPath) ${reportedResult.configurationSettings.espMatterPath}${EOL}`; - output += `ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) ${reportedResult.configurationSettings.espHomeKitPath}${EOL}`; output += `Custom extra paths ${reportedResult.configurationSettings.customExtraPaths}${EOL}`; if ( reportedResult.configurationSettings.idfExtraVars && @@ -88,9 +85,6 @@ export async function writeTextReport( output += `-------------------------------------------------------- Configurations access -------------------------------------------------------------${EOL}`; output += `Access to ESP-ADF Path (idf.espAdfPath) ${reportedResult.configurationAccess.espAdfPath}${EOL}`; output += `Access to ESP-IDF Path (idf.espIdfPath) ${reportedResult.configurationAccess.espIdfPath}${EOL}`; - output += `Access to ESP-MDF Path (idf.espMdfPath) ${reportedResult.configurationAccess.espMdfPath}${EOL}`; - output += `Access to ESP-Matter Path (idf.espMatterPath) ${reportedResult.configurationAccess.espMatterPath}${EOL}`; - output += `Access to ESP-HomeKit Path (idf.espHomeKitSdkPath) ${reportedResult.configurationAccess.espHomeKitPath}${EOL}`; output += `Access to ESP-IDF Custom extra paths${EOL}`; for (let key in reportedResult.configurationAccess.espIdfToolsPaths) { output += `Access to ${key}: ${reportedResult.configurationAccess.espIdfToolsPaths[key]}${EOL}`; @@ -104,9 +98,6 @@ export async function writeTextReport( output += `Spaces in system environment Path ${reportedResult.configurationSpacesValidation.systemEnvPath}${EOL}`; output += `Spaces in ESP-ADF Path (idf.espAdfPath) ${reportedResult.configurationSpacesValidation.espAdfPath}${EOL}`; output += `Spaces in ESP-IDF Path (idf.espIdfPath) ${reportedResult.configurationSpacesValidation.espIdfPath}${EOL}`; - output += `Spaces in ESP-MDF Path (idf.espMdfPath) ${reportedResult.configurationSpacesValidation.espMdfPath}${EOL}`; - output += `Spaces in ESP-Matter Path (idf.espMatterPath) ${reportedResult.configurationSpacesValidation.espMatterPath}${EOL}`; - output += `Spaces in ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) ${reportedResult.configurationSpacesValidation.espHomeKitPath}${EOL}`; output += `Spaces in ESP-IDF Custom extra paths${EOL}`; for (let key in reportedResult.configurationSpacesValidation .customExtraPaths) { diff --git a/src/test/adapter.test.ts b/src/test/adapter.test.ts deleted file mode 100644 index 7b428b292..000000000 --- a/src/test/adapter.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Project: ESP-IDF VSCode Extension - * File Created: Wednesday, 5th June 2019 2:03:34 pm - * Copyright 2019 Espressif Systems (Shanghai) CO LTD - *  - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *  - * http://www.apache.org/licenses/LICENSE-2.0 - *  - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as assert from "assert"; -import * as path from "path"; -import { EspIdfDebugClient } from "./espIdfDebugClient"; - -suite("Debug Adapter Tests", () => { - const DEBUG_ADAPTER = path.join( - __dirname, - "..", - "..", - "esp_debug_adapter", - "debug_adapter_main.py" - ); - const portToUse = 43474; // To use in server mode, i.e. start debug adapter yourself - - let debugClient: EspIdfDebugClient; - - setup((done) => { - debugClient = new EspIdfDebugClient( - "python", - ["-u", DEBUG_ADAPTER, "--developer-mode", "connection-check"], - "espidf", - { cwd: __dirname }, - true - ); - // Use portToUse here to attach to existing server. May be easier to debug initially - debugClient.startClient().then(() => done()); - }); - - suite("initialize", () => { - test("should return supported features", async () => { - const initArgs = { - adapterID: "espidf", - clientID: "vscode", - columnsStartAt1: true, - linesStartAt1: true, - }; - await debugClient.initializeRequest(initArgs).then((response) => { - response.body = response.body || {}; - assert.equal(response.body.supportsConfigurationDoneRequest, true); - }); - }).timeout(10000); - }); -}); diff --git a/src/test/doctor.test.ts b/src/test/doctor.test.ts index 6f8dd9194..6d2652ee0 100644 --- a/src/test/doctor.test.ts +++ b/src/test/doctor.test.ts @@ -31,7 +31,6 @@ import { getConfigurationSettings } from "../support/configurationSettings"; import { readFile, readJSON } from "fs-extra"; import { getPipVersion } from "../support/pipVersion"; import { checkEspIdfRequirements } from "../support/checkEspIdfRequirements"; -import { checkDebugAdapterRequirements } from "../support/checkExtensionRequirements"; import { checkCCppPropertiesJson, checkLaunchJson, @@ -74,7 +73,7 @@ suite("Doctor Command tests", () => { test("Wrong access to ESP-IDF path", () => { reportObj.configurationSettings.espIdfPath = "/some/non-existing-path"; - getConfigurationAccess(reportObj, mockUpContext); + getConfigurationAccess(reportObj); assert.equal(reportObj.configurationAccess.espIdfPath, false); }); @@ -86,7 +85,7 @@ suite("Doctor Command tests", () => { test("Wrong access to Python path", () => { reportObj.configurationSettings.pythonBinPath = "/some/non-existing-path"; - getConfigurationAccess(reportObj, mockUpContext); + getConfigurationAccess(reportObj); assert.equal(reportObj.configurationAccess.pythonBinPath, false); }); @@ -102,12 +101,6 @@ suite("Doctor Command tests", () => { assert.equal(reportObj.pipVersion.result, "Not found"); }); - test("Wrong debug adapter py requirements", async () => { - reportObj.configurationSettings.pythonBinPath = "/my/wrong/python/path"; - await checkDebugAdapterRequirements(reportObj, mockUpContext); - assert.equal(reportObj.debugAdapterRequirements.result, "Error"); - }); - test("Wrong esp-idf py requirements", async () => { reportObj.configurationSettings.pythonBinPath = "/my/wrong/python/path"; await checkEspIdfRequirements(reportObj, mockUpContext); @@ -154,10 +147,6 @@ suite("Doctor Command tests", () => { reportObj.configurationSettings.espIdfPath, settingsJsonObj["idf.espIdfPath"] ); - assert.equal( - reportObj.configurationSettings.espMdfPath, - settingsJsonObj["idf.espMdfPath"] - ); assert.equal( reportObj.configurationSettings.serialPort, settingsJsonObj["idf.port"] @@ -176,19 +165,6 @@ suite("Doctor Command tests", () => { ); }); - test("Good debug adapter py requirements", async () => { - reportObj.configurationSettings.pythonBinPath = `${process.env.IDF_PYTHON_ENV_PATH}/bin/python`; - reportObj.configurationSettings.espIdfPath = process.env.IDF_PATH; - await checkDebugAdapterRequirements(reportObj, mockUpContext); - assert.equal( - reportObj.debugAdapterRequirements.result, - `Python requirements from ${join( - __dirname, - "../../esp_debug_adapter/requirements.txt" - )} are satisfied.` - ); - }); - test("Good esp-idf py requirements", async () => { reportObj.configurationSettings.pythonBinPath = `${process.env.IDF_PYTHON_ENV_PATH}/bin/python`; reportObj.configurationSettings.espIdfPath = process.env.IDF_PATH; @@ -206,7 +182,7 @@ suite("Doctor Command tests", () => { delimiter + process.env.OLD_PATH, "" ); - getConfigurationAccess(reportObj, mockUpContext); + getConfigurationAccess(reportObj); assert.equal(reportObj.configurationAccess.pythonBinPath, true); assert.equal(reportObj.configurationAccess.espIdfPath, true); for (let toolPath in reportObj.configurationAccess.espIdfToolsPaths) { @@ -277,9 +253,6 @@ suite("Doctor Command tests", () => { expectedOutput += `---------------------------------------------------- Extension configuration settings ------------------------------------------------------${os.EOL}`; expectedOutput += `ESP-ADF Path (idf.espAdfPath) ${reportObj.configurationSettings.espAdfPath}${os.EOL}`; expectedOutput += `ESP-IDF Path (idf.espIdfPath) ${process.env.IDF_PATH}${os.EOL}`; - expectedOutput += `ESP-MDF Path (idf.espMdfPath) ${reportObj.configurationSettings.espMdfPath}${os.EOL}`; - expectedOutput += `ESP-Matter Path (idf.espMatterPath) ${reportObj.configurationSettings.espMatterPath}${os.EOL}`; - expectedOutput += `ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) ${reportObj.configurationSettings.espHomeKitPath}${os.EOL}`; expectedOutput += `Custom extra paths ${customExtraPaths}${os.EOL}`; if ( reportObj.configurationSettings.idfExtraVars && diff --git a/src/test/project.test.ts b/src/test/project.test.ts index 83eb3dc16..ef19be5bb 100644 --- a/src/test/project.test.ts +++ b/src/test/project.test.ts @@ -163,7 +163,6 @@ suite("Project tests", () => { ); assert.equal(newSettingsJson["idf.espIdfPath"], process.env.IDF_PATH); assert.equal(newSettingsJson["idf.espAdfPath"], "/test/esp-adf"); - assert.equal(newSettingsJson["idf.espMdfPath"], "/test/esp-mdf"); assert.equal(newSettingsJson["idf.toolsPath"], process.env.IDF_TOOLS_PATH); assert.equal(newSettingsJson["idf.openOcdConfigs"], openOcdConfigs); }); diff --git a/src/utils.ts b/src/utils.ts index 5b43a362c..d3fed5b19 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1044,32 +1044,12 @@ export async function appendIdfAndToolsToPath(curWorkspace: vscode.Uri) { const adfPathDir = idfConf.readParameter("idf.espAdfPath", curWorkspace); modifiedEnv.ADF_PATH = adfPathDir || modifiedEnv.ADF_PATH; - const mdfPathDir = idfConf.readParameter("idf.espMdfPath", curWorkspace); - modifiedEnv.MDF_PATH = mdfPathDir || modifiedEnv.MDF_PATH; - - const homekitPathDir = idfConf.readParameter( - "idf.espHomeKitSdkPath", - curWorkspace - ); - modifiedEnv.HOMEKIT_PATH = homekitPathDir || modifiedEnv.HOMEKIT_PATH; - - const rainmakerPathDir = idfConf.readParameter( - "idf.espRainmakerPath", - curWorkspace - ); - modifiedEnv.RMAKER_PATH = rainmakerPathDir || modifiedEnv.RMAKER_PATH; - const defaultToolsPath = path.join(containerPath, ".espressif"); const toolsPath = idfConf.readParameter( "idf.toolsPath", curWorkspace ) as string; modifiedEnv.IDF_TOOLS_PATH = toolsPath || defaultToolsPath; - const matterPathDir = idfConf.readParameter( - "idf.espMatterPath", - curWorkspace - ) as string; - modifiedEnv.ESP_MATTER_PATH = matterPathDir || modifiedEnv.ESP_MATTER_PATH; const idfToolsManager = await IdfToolsManager.createIdfToolsManager( modifiedEnv.IDF_PATH @@ -1100,27 +1080,6 @@ export async function appendIdfAndToolsToPath(curWorkspace: vscode.Uri) { } let pathToPigweed: string; - - if (modifiedEnv.ESP_MATTER_PATH) { - pathToPigweed = path.join( - modifiedEnv.ESP_MATTER_PATH, - "connectedhomeip", - "connectedhomeip", - ".environment", - "cipd", - "packages", - "pigweed" - ); - modifiedEnv.ZAP_INSTALL_PATH = path.join( - modifiedEnv.ESP_MATTER_PATH, - "connectedhomeip", - "connectedhomeip", - ".environment", - "cipd", - "packages", - "zap" - ); - } const sysPythonPath = await getPythonPath(curWorkspace); let pythonBinPath = ""; if (sysPythonPath) { diff --git a/src/views/setup/Welcome.vue b/src/views/setup/Welcome.vue index 5d3b79587..7ebf31a37 100644 --- a/src/views/setup/Welcome.vue +++ b/src/views/setup/Welcome.vue @@ -191,11 +191,6 @@ const whatsNewLink = computed(() => { ESP-ADF -