Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIM Integration #1355

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs_espressif/en/additionalfeatures/docker-container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ For more information about ``devcontainer.json``, please refer to the comments.
*/
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"idf.espIdfPath": "/opt/esp/idf",
"idf.toolsPath": "/opt/esp",
"idf.gitPath": "/usr/bin/git"
},
/* An array of extensions that should be installed into the container. */
Expand Down
50 changes: 24 additions & 26 deletions docs_espressif/en/additionalfeatures/multiple-projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,19 @@ Project folders (known in VS Code as workspace folders) and workspace-level sett

.. code-block:: JSON

{
"folders": [
{
"path": "./project1"
},
{
"path": "./project2"
}
],
"settings": {
"idf.port": "/dev/ttyUSB1",
"idf.espIdfPath": "${env:HOME}/esp/esp-idf"
}
{
"folders": [
{
"path": "./project1"
},
{
"path": "./project2"
}
],
"settings": {
"idf.port": "/dev/ttyUSB1",
}
}

Settings in the root folder's ``.code-workspace`` are used when your ``ESP-IDF: Current Project`` directory lacks a ``.vscode/settings.json`` file.

Expand Down Expand Up @@ -69,20 +68,19 @@ And ``my-ws.code-workspace``:

.. code-block:: JSON

{
"folders": [
{
"path": "/my-projects-root/project1"
},
{
"path": "/my-projects-root/project2"
}
],
"settings": {
"idf.port": "/dev/ttyUSB1",
"idf.espIdfPath": "${env:HOME}/esp/esp-idf"
}
{
"folders": [
{
"path": "/my-projects-root/project1"
},
{
"path": "/my-projects-root/project2"
}
],
"settings": {
"idf.port": "/dev/ttyUSB1",
}
}

1. Open Visual Studio Code, go to ``File`` > ``Open Workspace`` and open ``my-ws.code-workspace``, you will see only the folders defined in this workspace (``/my-projects-root/project1`` and ``/my-projects-root/project2``).

Expand Down
40 changes: 19 additions & 21 deletions docs_espressif/en/configureproject.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,24 @@ The file structure is as follows:

.. code-block:: JSON

{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "/path/to/toolchain-gcc",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"includePath": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components/",
"${workspaceFolder}/"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${workspaceFolder}"
]
}
}
]
}
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "/path/to/toolchain-gcc",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"includePath": [
"/path/to/esp-idf/components/**",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"/path/to/esp-idf/components",
"${workspaceFolder}"
]
}
}
]
}

If ``compile_commands.json`` is not defined, Microsoft C/C++ extension will browse the provided ESP-IDF path to resolve code navigation.
15 changes: 2 additions & 13 deletions docs_espressif/en/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,15 @@ These are the configuration settings that ESP-IDF extension contributes to your
- Enable CCache in build task (make sure CCache is in PATH)
* - idf.enableIdfComponentManager
- Enable IDF Component manager in build command
* - idf.espIdfPath
- Path to locate ESP-IDF framework (IDF_PATH)
* - idf.espIdfPathWin
- Path to locate ESP-IDF framework in Windows (IDF_PATH)
* - idf.ninjaArgs
- Arguments for Ninja build task
* - idf.pythonInstallPath
- System Python absolute path used to compute ESP-IDF Python virtual environment
* - idf.toolsPath
- Path to locate ESP-IDF Tools (IDF_TOOLS_PATH)
* - idf.toolsPathWin
- Path to locate ESP-IDF Tools in Windows (IDF_TOOLS_PATH)

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

.. note::

Expand Down Expand Up @@ -288,4 +277,4 @@ Use of Environment Variables in ESP-IDF ``settings.json`` and ``tasks.json``

Environment (env) variables and other ESP-IDF settings (config) can be referenced in ESP-IDF settings using the syntax ``${env:VARNAME}`` and ``${config:ESPIDFSETTING}``, respectively.

For example, to use ``"~/esp/esp-idf"``, set the value of **idf.espIdfPath** to ``"${env:HOME}/esp/esp-idf"``.
For example, to use ``"~/workspace/blink"``, set the value to ``"${env:HOME}/workspace/blink"``.
6 changes: 5 additions & 1 deletion l10n/bundle.l10n.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,18 @@
"Discarded changes in SDK Configuration editor": "Cambios descartados en el editor de configuración del SDK",
"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}\"",
"Open ESP-IDF installation manager": "Abra el administrador de instalación ESP-IDF",
"Choose from existing ESP-IDF setups.": "Elija entre configuraciones ESP-IDF existentes.",
"The extension configuration is not valid. Choose an action:": "La configuración de la extensión no es válida. Elija una opción",
"No ESP-IDF Setups found": "No se encontraron configuraciones ESP-IDF",
"Use docker container configuration": "Usar la configuración del contenedor docker",
"Create ESP-IDF From Extension Templates": "Cree ESP-IDF a partir de plantillas de extensión",
"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",
Expand Down
6 changes: 5 additions & 1 deletion l10n/bundle.l10n.pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,18 @@
"Discarded changes in SDK Configuration editor": "Alterações descartadas no editor de configuração do SDK",
"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}\"",
"Open ESP-IDF installation manager": "Abra o gerenciador de instalação ESP-IDF",
"Choose from existing ESP-IDF setups.": "Escolha entre as configurações ESP-IDF existentes.",
"The extension configuration is not valid. Choose an action:": "A configuração da extensão não é válida. Escolha uma ação:",
"No ESP-IDF Setups found": "Nenhuma configuração ESP-IDF encontrada",
"Use docker container configuration": "Use a configuração do contêiner do Docker",
"Create ESP-IDF From Extension Templates": "Crie ESP-IDF a partir de modelos de extensão",
"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",
Expand Down
6 changes: 5 additions & 1 deletion l10n/bundle.l10n.ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,18 @@
"Discarded changes in SDK Configuration editor": "Отменены изменения в редакторе конфигурации SDK.",
"Error encountered while adding dependency {dependency} to the component \"{component}\"": "Произошла ошибка при добавлении зависимости {dependent} к компоненту \"{comment}\".",
"Error encountered while creating project from example \"{example}\"": "Ошибка при создании проекта из примера \"{example}\".",
"Open ESP-IDF installation manager": "Откройте диспетчер установки ESP-IDF.",
"Choose from existing ESP-IDF setups.": "Выбирайте из существующих настроек ESP-IDF.",
"The extension configuration is not valid. Choose an action:": "Недопустимая конфигурация расширения. Выберите действие:",
"No ESP-IDF Setups found": "Настройки ESP-IDF не найдены",
"Use docker container configuration": "Использовать конфигурацию Docker-контейнера",
"Create ESP-IDF From Extension Templates": "Создание ESP-IDF из шаблонов расширений",
"Install ESP-ADF": "Установите ESP-ADF",
"Install 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.",
Expand Down
6 changes: 5 additions & 1 deletion l10n/bundle.l10n.zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,18 @@
"Discarded changes in SDK Configuration editor": "已放弃 SDK 配置编辑器中的更改",
"Error encountered while adding dependency {dependency} to the component \"{component}\"": "将依赖项 {dependency} 添加到组件 \"{component}\" 时出错",
"Error encountered while creating project from example \"{example}\"": "基于 \"{example}\" 示例创建项目时出错",
"Open ESP-IDF installation manager": "打开 ESP-IDF 安装管理器",
"Choose from existing ESP-IDF setups.": "从现有 ESP-IDF 设置中进行选择。",
"The extension configuration is not valid. Choose an action:": "扩展配置无效 选择一个操作:",
"No ESP-IDF Setups found": "未找到 ESP-IDF 设置",
"Use docker container configuration": "使用docker容器配置",
"Create ESP-IDF From Extension Templates": "基于扩展模板创建 ESP-IDF",
"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 子目录文件",
Expand Down
47 changes: 9 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,11 @@
{
"title": "%configuration.title%",
"properties": {
"idf.espIdfPath": {
"idf.eimIdfJsonPath": {
"type": "string",
"default": "${env:IDF_PATH}",
"description": "%param.espIdfPath%",
"scope": "resource"
"default": "",
"description": "%param.eimIdfJsonPath%",
"scope": "application"
},
"idf.espAdfPath": {
"type": "string",
Expand All @@ -614,24 +614,12 @@
"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}",
"description": "%param.espIdfPath%",
"scope": "resource"
},
"idf.espAdfPathWin": {
"type": "string",
"default": "${env:ADF_PATH}",
Expand All @@ -644,12 +632,6 @@
"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}",
Expand All @@ -674,12 +656,6 @@
"description": "%param.port%",
"scope": "resource"
},
"idf.pythonInstallPath": {
"type": "string",
"default": "python",
"description": "%param.pythonBinPath%",
"scope": "application"
},
"idf.flashBaudRate": {
"type": "string",
"default": "460800",
Expand Down Expand Up @@ -1246,6 +1222,11 @@
"title": "%espIdf.setup.title%",
"category": "ESP-IDF"
},
{
"command": "espIdf.installManager",
"title": "%espIdf.installManager.title%",
"category": "ESP-IDF"
},
{
"command": "espIdf.examples.start",
"title": "%espIdf.examples.title%",
Expand Down Expand Up @@ -1468,11 +1449,6 @@
"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%"
Expand Down Expand Up @@ -1597,11 +1573,6 @@
"title": "%espIdf.projectConf.title%",
"category": "ESP-IDF"
},
{
"command": "espIdf.clearSavedIdfSetups",
"title": "%espIdf.clearSavedIdfSetups.title%",
"category": "ESP-IDF"
},
{
"command": "espIdf.selectNotificationMode",
"title": "%espIdf.selectNotificationMode.title%",
Expand Down
Loading
Loading