From 4abbf3abea60a58afc32c062a8c0917b9e2ceb12 Mon Sep 17 00:00:00 2001 From: marc Date: Sun, 16 Nov 2025 14:56:08 +0100 Subject: [PATCH] add custom task --- .vscode/launch.json | 3 ++- .vscode/settings.json | 2 +- .vscode/tasks.json | 43 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 8edba55..cfea52c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -36,7 +36,8 @@ "name": "Debug ihm with gdb", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/components/domotic_display/test_host/build/nvs_host_test.elf", + "preLaunchTask": "Build - Build IHM", + "program": "${workspaceFolder}/components/domotic_display/test_host/build/nvs_host_test.elf", "args": [], "cwd": "${workspaceFolder}", "stopAtEntry": false, diff --git a/.vscode/settings.json b/.vscode/settings.json index ba3b7d1..daed9bf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "C_Cpp.intelliSenseEngine": "default", "idf.espIdfPath": "/home/marc/esp/v5.5.1/esp-idf", - "idf.pythonBinPath": "/home/marc/.espressif/python_env/idf5.3_py3.10_env/bin/python", + "idf.pythonBinPath": "/home/marc/.espressif/python_env/idf5.5_py3.10_env/bin/python", "idf.toolsPath": "/home/marc/.espressif", "idf.customExtraPaths": "/home/marc/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin:/home/marc/.espressif/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin:/home/marc/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin:/home/marc/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20240530/riscv32-esp-elf/bin:/home/marc/.espressif/tools/esp32ulp-elf/2.38_20240113/esp32ulp-elf/bin:/home/marc/.espressif/tools/cmake/3.24.0/bin:/home/marc/.espressif/tools/openocd-esp32/v0.12.0-esp32-20240318/openocd-esp32/bin:/home/marc/.espressif/tools/ninja/1.11.1:/home/marc/.espressif/tools/esp-rom-elfs/20240305", "idf.customExtraVars": { diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c4f0010..c7fa301 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -33,7 +33,7 @@ "isDefault": true }, "dependsOn": "Build" - } + }, { "label": "Build - Build project", "type": "shell", @@ -73,6 +73,47 @@ "isDefault": true } }, + { + "label": "Build - Build IHM", + "type": "shell", + "command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py build", + "windows": { + "command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py build", + "options": { + "env": { + "PATH": "${env:PATH};${config:idf.customExtraPaths}" + } + } + }, + "options": { + "cwd": "${workspaceFolder}/components/domotic_display/test_host/", + "env": { + "IDF_TARGET": "linux", + "PATH": "${env:PATH}:${config:idf.customExtraPaths}" + } + }, + "problemMatcher": [ + { + "owner": "cpp", + "fileLocation": [ + "autoDetect", + "${workspaceFolder}" + ], + "pattern": { + "regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 + } + } + ], + "group": { + "kind": "build", + "isDefault": true + } + }, { "label": "Set ESP-IDF Target", "type": "shell",