espressif / vscode-esp-idf-extension

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

Monitor not working on linux - version 1.8.0 (VSC-1460) #1277

Closed Florioo closed 2 months ago

Florioo commented 3 months ago

OS

Windows

Operating System version

Ubuntu 24.04 LTS

Visual Studio Code version

Extension: 1.8.0 Vscode: 1.92

ESP-IDF version

5.2.2

Python version

3.12.3

Doctor command output

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS linux x64 6.8.12-1-pve 
System environment variable IDF_PYTHON_ENV_PATH 
 <HOMEPATH>/tools/.espressif/python_env/idf5.2_py3.12_env 
System environment variable PATH 
 <HOMEPATH>/.vscode-server/cli/servers/Stable-b1c0a14de1414fcdaa400695b4db1c0799bc3124/server/bin/remote-cli:<HOMEPATH>/tools/esp/v5.2.2/esp-idf/components/espcoredump:<HOMEPATH>/tools/esp/v5.2.2/esp-idf/components/partition_table:<HOMEPATH>/tools/esp/v5.2.2/esp-idf/components/app_update:<HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin:<HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin:<HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:<HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin:<HOMEPATH>/tools/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:<HOMEPATH>/tools/.espressif/tools/cmake/3.24.0/bin:<HOMEPATH>/tools/.espressif/tools/openocd-esp32/v0.12.0-esp32-20240318/openocd-esp32/bin:<HOMEPATH>/tools/.espressif/tools/ninja/1.11.1/:<HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin:<HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin:<HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:<HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin:<HOMEPATH>/tools/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:<HOMEPATH>/tools/.espressif/tools/cmake/3.24.0/bin:<HOMEPATH>/tools/.espressif/tools/openocd-esp32/v0.12.0-esp32-20240318/openocd-esp32/bin:<HOMEPATH>/tools/.espressif/tools/ninja/1.11.1/:<HOMEPATH>/tools/.espressif/python_env/idf5.2_py3.12_env/bin:<HOMEPATH>/tools/esp/v5.2.2/esp-idf/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:<HOMEPATH>/dev/tools/nrf_utils:<HOMEPATH>/dev/tools/nrf_cli_tools/nrf-command-line-tools/bin 
System environment variable PYTHON 
 undefined 
Visual Studio Code version 1.92.0 
Visual Studio Code language en 
Visual Studio Code shell /bin/bash 
ESP-IDF Extension version 1.8.0 
Workspace folder <HOMEPATH>/dev/redacted/boards/comms-esp 
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) <HOMEPATH>/tools/esp/v5.2.2/esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) ${env:HOMEKIT_PATH}
Custom extra paths (idf.customExtraPaths) <HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin:<HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin:<HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:<HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin:<HOMEPATH>/tools/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:<HOMEPATH>/tools/.espressif/tools/cmake/3.24.0/bin:<HOMEPATH>/tools/.espressif/tools/openocd-esp32/v0.12.0-esp32-20240318/openocd-esp32/bin:<HOMEPATH>/tools/.espressif/tools/ninja/1.11.1:<HOMEPATH>/tools/.espressif/tools/esp-rom-elfs/20230320
Custom extra vars (idf.customExtraVars)
    OPENOCD_SCRIPTS: <HOMEPATH>/tools/.espressif/tools/openocd-esp32/v0.12.0-esp32-20240318/openocd-esp32/share/openocd/scripts
    ESP_ROM_ELF_DIR: <HOMEPATH>/tools/.espressif/tools/esp-rom-elfs/20230320/
Virtual env Python Path (idf.pythonBinPath) <HOMEPATH>/tools/.espressif/python_env/idf5.2_py3.12_env/bin/python
Serial port (idf.port) /dev/ttyUSB1
OpenOCD Configs (idf.openOcdConfigs) board/esp32s3-builtin.cfg
ESP-IDF Tools Path (idf.toolsPath) <HOMEPATH>/tools/.espressif
Git Path (idf.gitPath) git
Notification Mode (idf.notificationMode) Output
-------------------------------------------------------- Configurations access -------------------------------------------------------------
Access to ESP-ADF Path (idf.espAdfPath) false
Access to ESP-IDF Path (idf.espIdfPath) true
Access to ESP-MDF Path (idf.espMdfPath) false
Access to ESP-Matter Path (idf.espMatterPath) false
Access to ESP-HomeKit Path (idf.espHomeKitSdkPath) false
Access to ESP-IDF Custom extra paths
Access to <HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin: true
Access to <HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin: true
Access to <HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin: true
Access to <HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin: true
Access to <HOMEPATH>/tools/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: true
Access to <HOMEPATH>/tools/.espressif/tools/cmake/3.24.0/bin: true
Access to <HOMEPATH>/tools/.espressif/tools/openocd-esp32/v0.12.0-esp32-20240318/openocd-esp32/bin: true
Access to <HOMEPATH>/tools/.espressif/tools/ninja/1.11.1: true
Access to <HOMEPATH>/tools/.espressif/tools/esp-rom-elfs/20230320: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH true
Access to Ninja in environment PATH true
Access to ESP-IDF Tools Path (idf.toolsPath) true
-------------------------------------------------------- Configurations has spaces -------------------------------------------------------------
Spaces in system environment Path false
Spaces in ESP-ADF Path (idf.espAdfPath) false
Spaces in ESP-IDF Path (idf.espIdfPath) false
Spaces in ESP-MDF Path (idf.espMdfPath) false
Spaces in ESP-Matter Path (idf.espMatterPath) false
Spaces in ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) false
Spaces in ESP-IDF Custom extra paths
Spaces in <HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin: false
Spaces in <HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf-gdb/14.2_20240403/riscv32-esp-elf-gdb/bin: false
Spaces in <HOMEPATH>/tools/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin: false
Spaces in <HOMEPATH>/tools/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin: false
Spaces in <HOMEPATH>/tools/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: false
Spaces in <HOMEPATH>/tools/.espressif/tools/cmake/3.24.0/bin: false
Spaces in <HOMEPATH>/tools/.espressif/tools/openocd-esp32/v0.12.0-esp32-20240318/openocd-esp32/bin: false
Spaces in <HOMEPATH>/tools/.espressif/tools/ninja/1.11.1: false
Spaces in <HOMEPATH>/tools/.espressif/tools/esp-rom-elfs/20230320: false
Spaces in Virtual env Python Path (idf.pythonBinPath) false
Spaces in ESP-IDF Tools Path (idf.toolsPath) false
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.43.0
ESP-IDF version 5.2.2
Python version 3.12.3
Python's pip version 24.2
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.9.2
bitstring version: 4.2.3
CacheControl version: 0.14.0
certifi version: 2024.7.4
cffi version: 1.17.0
charset-normalizer version: 3.3.2
click version: 8.1.7
colorama version: 0.4.6
construct version: 2.10.70
contextlib2 version: 21.6.0
cryptography version: 41.0.7
ecdsa version: 0.19.0
esp-coredump version: 1.11.0
esp-idf-kconfig version: 1.4.3
esp-idf-monitor version: 1.4.0
esp-idf-panic-decoder version: 1.1.0
esp-idf-size version: 1.5.0
esptool version: 4.7.0
filelock version: 3.15.4
freertos-gdb version: 1.0.3
idf-component-manager version: 1.5.3
idna version: 3.7
intelhex version: 2.3.0
kconfiglib version: 14.1.0
markdown-it-py version: 3.0.0
mdurl version: 0.1.2
msgpack version: 1.0.8
packaging version: 24.1
pip version: 24.2
pyclang version: 0.4.2
pycparser version: 2.22
pyelftools version: 0.31
pygdbmi version: 0.11.0.0
Pygments version: 2.18.0
pyparsing version: 3.1.2
pyserial version: 3.5
PyYAML version: 6.0.2
reedsolo version: 1.7.0
requests version: 2.32.3
requests-file version: 1.5.1
requests-toolbelt version: 1.0.0
rich version: 13.7.1
schema version: 0.7.5
setuptools version: 71.0.0
six version: 1.16.0
tqdm version: 4.66.5
urllib3 version: 1.26.19
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Error
----------------------------------------------------------- Latest error -----------------------------------------------------------------
{
    "errno": -2,
    "code": "ENOENT",
    "syscall": "open",
    "path": "<HOMEPATH>/dev/redacted/boards/comms-esp/.vscode/launch.json"
}
--------------------------------------------------------------------------------------------------------------------------------------------

Extension

No response

Description

Issue When pressing the monitor button the execution fails with the error

root@embedded-dev:~/dev/redacted/boards/redacted-esp# & '/root/tools/.espressif/python_env/idf5.2_py3.12_env/bin/python' '/root/tools/esp/v5.2.2/esp-idf/tools/idf_monitor.py' -p /dev/ttyUSB1 -b 115200 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 '/root/dev/redacted/boards/redacted-esp/build/redacted_comms.elf'

"bash: syntax error near unexpected token `&''

Resolution 1 Running the commands without the & works as expected

Resolution 2 Downgrading the extension from 1.8.0 to 1.7.1 makes it work without issues

Debug Message

`root@embedded-dev:~/dev/redacted/boards/redacted-esp# & export IDF_PATH='/root/tools/esp/v5.2.2/esp-idf'
bash: syntax error near unexpected token `&'
root@embedded-dev:~/dev/redacted/boards/redacted-esp# & '/root/tools/.espressif/python_env/idf5.2_py3.12_env/bin/python' '/root/tools/esp/v5.2.2/esp-idf/tools/idf_monitor.py' -p /dev/ttyUSB1 -b 115200 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 '/root/dev/redacted/boards/redacted-esp/build/redacted_comms.elf'
bash: syntax error near unexpected token `&'
`

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

radurentea commented 3 months ago

Hi @Florioo,

This might be a duplicate of #1233.

Could you please try to install the extension using this .vsix file? esp-idf-extension.vsix.zip

This contains the latest changes that are not yet released and I think it might solve your issue.