espressif / vscode-esp-idf-extension

Visual Studio Code extension for ESP-IDF projects
Apache License 2.0
1.03k stars 298 forks source link

Problem using monitoring - params in sdkconfig not used (VSC-1105) #963

Closed reivax85 closed 1 year ago

reivax85 commented 1 year ago

OS

Windows

Operating System version

Windows 10

Visual Studio Code version

1.78.0

ESP-IDF version

4.4.2

Python version

3.9.1

Doctor command output

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report --------------------------------------------- OS win32 x64 10.0.19045 System environment variable IDF_PYTHON_ENV_PATH undefined System environment variable PATH C:\Program Files (x86)\VMware\VMware Player\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\Program Files (x86)\Cegid\ManufacturingPMI;C:\Program Files\TortoiseSVN\bin;C:\Raisonance\Ride\bin;C:\Raisonance\Ride\arm-gcc\bin;C:\Program Files (x86)\Microchip\xc8\v1.44\bin;%JAVA__HOME%\bin;C:\Program Files\Java\jdk1.8.0_101\bin;C:\Program Files (x86)\Inno Setup 5;C:\Program Files (x86)\WiX Toolset v3.11\bin;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility;C:\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts;C:.espressif\python_env\idf4.4-rc1_py3.8_env\Scripts;C:\Program Files\PuTTY;C:\Program Files\Maven\apache-maven-3.8.5\bin;%IDF_PATH%\tools;%ADF_PATH%\tools;C:\Program Files\TortoiseGit\bin;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\flutter\flutter\nuget.exe;C:\Program Files\Git\cmd;C:\AppData\Local\Microsoft\WindowsApps;C:\AppData\Roaming\npm;C:\AppData\Local\Programs\Microsoft VS Code\bin;C:.espressif\python_env\idf4.4-rc1_py3.8_env\Scripts;C:\Program Files (x86)\Actiona;C:.espressif\esp-idf\tools;C:\flutter\flutter\bin;C:\AppData\Local\Microsoft\WinGet\Links System environment variable PYTHON undefined Visual Studio Code version 1.78.0 Visual Studio Code language en Visual Studio Code shell C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe ESP-IDF Extension version 1.6.2 Workspace folder c:\MICRO\GITHUB\amplificateur-connecte-bt-can ---------------------------------------------------- Extension configuration settings ------------------------------------------------------ ESP-ADF Path (idf.espAdfPath) C:.espressif\esp-adf ESP-IDF Path (idf.espIdfPath) C:\Desktop\esp-idf ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH} ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH} Custom extra paths (idf.customExtraPaths) C:.espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\bin;C:.espressif\tools\xtensa-esp32s2-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32s2-elf\bin;C:.espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32s3-elf\bin;C:.espressif\tools\riscv32-esp-elf\esp-2021r2-patch2-8.4.0\riscv32-esp-elf\bin;C:.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;C:.espressif\tools\cmake\3.20.3\bin;C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20211220\openocd-esp32\bin;C:.espressif\tools\ninja\1.10.2;C:.espressif\tools\idf-exe\1.0.3;C:.espressif\tools\ccache\4.3\ccache-4.3-windows-64;C:.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64 Custom extra vars (idf.customExtraVars) OPENOCD_SCRIPTS: C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts IDF_CCACHE_ENABLE: 1 Virtual env Python Path (idf.pythonBinPath) C:.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe Serial port (idf.port) COM10 OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,board/esp32-wrover.cfg ESP-IDF Tools Path (idf.toolsPath) C:.espressif Git Path (idf.gitPath) C:.espressif\tools\idf-git\2.30.1\cmd\git.exe -------------------------------------------------------- Configurations access ------------------------------------------------------------- Access to ESP-ADF Path (idf.espAdfPath) true Access to ESP-IDF Path (idf.espIdfPath) true Access to ESP-MDF Path (idf.espMdfPath) false Access to ESP-Matter Path (idf.espMatterPath) false Access to ESP-IDF Custom extra paths Access to C:.espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\bin: true Access to C:.espressif\tools\xtensa-esp32s2-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32s2-elf\bin: true Access to C:.espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32s3-elf\bin: true Access to C:.espressif\tools\riscv32-esp-elf\esp-2021r2-patch2-8.4.0\riscv32-esp-elf\bin: true Access to C:.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin: true Access to C:.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin: true Access to C:.espressif\tools\cmake\3.20.3\bin: true Access to C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20211220\openocd-esp32\bin: true Access to C:.espressif\tools\ninja\1.10.2: true Access to C:.espressif\tools\idf-exe\1.0.3: true Access to C:.espressif\tools\ccache\4.3\ccache-4.3-windows-64: true Access to C:.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64: true Access to Virtual env Python Path (idf.pythonBinPath) true Access to CMake in environment PATH undefined Access to Ninja in environment PATH undefined Access to ESP-IDF Tools Path (idf.toolsPath) true -------------------------------------------------------- Configurations has spaces ------------------------------------------------------------- Spaces in system environment Path true Spaces in ESP-ADF Path (idf.espAdfPath) false Spaces in ESP-IDF Path (idf.espIdfPath) false Spaces in ESP-MDF Path (idf.espMdfPath) false Spaces in ESP-Matter Path (idf.espMatterPath) false Spaces in ESP-IDF Custom extra paths Spaces in C:.espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\bin: false Spaces in C:.espressif\tools\xtensa-esp32s2-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32s2-elf\bin: false Spaces in C:.espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32s3-elf\bin: false Spaces in C:.espressif\tools\riscv32-esp-elf\esp-2021r2-patch2-8.4.0\riscv32-esp-elf\bin: false Spaces in C:.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin: false Spaces in C:.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin: false Spaces in C:.espressif\tools\cmake\3.20.3\bin: false Spaces in C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20211220\openocd-esp32\bin: false Spaces in C:.espressif\tools\ninja\1.10.2: false Spaces in C:.espressif\tools\idf-exe\1.0.3: false Spaces in C:.espressif\tools\ccache\4.3\ccache-4.3-windows-64: false Spaces in C:.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64: false Spaces in Virtual env Python Path (idf.pythonBinPath) false Spaces in ESP-IDF Tools Path (idf.toolsPath) false ----------------------------------------------------------- Executables Versions ----------------------------------------------------------- Git version 2.30.1.windows.1 ESP-IDF version 4.4 Python version 3.8.7 Python's pip version 20.3.3 -------------------------------------------------- Project configuration settings ---------------------------------------------------------- -------------------------------------------------- Python packages in idf.pythonBinPath ---------------------------------------------------- bitstring version: 3.1.9 Brotli version: 1.0.9 certifi version: 2021.10.8 cffi version: 1.15.0 charset-normalizer version: 2.0.10 click version: 8.0.4 colorama version: 0.4.4 construct version: 2.10.54 contextlib2 version: 21.6.0 cryptography version: 36.0.1 ecdsa version: 0.17.0 esp-windows-curses version: 0.1 Flask version: 0.12.5 Flask-Compress version: 1.10.1 Flask-SocketIO version: 2.9.6 future version: 0.18.2 gcovr version: 5.2 gdbgui version: 0.13.2.0 gevent version: 1.5.0 greenlet version: 1.1.2 idf-component-manager version: 1.1.4 idna version: 3.3 itsdangerous version: 2.0.1 Jinja2 version: 3.0.3 kconfiglib version: 13.7.1 lxml version: 4.8.0 MarkupSafe version: 2.0.1 pip version: 21.3.1 psutil version: 5.9.4 pycparser version: 2.21 pyelftools version: 0.27 pygdbmi version: 0.9.0.2 Pygments version: 2.11.2 pyparsing version: 2.3.1 pyserial version: 3.5 python-engineio version: 3.14.2 python-socketio version: 4.6.1 pywin32 version: 305 PyYAML version: 6.0 reedsolo version: 1.5.4 requests version: 2.28.1 requests-toolbelt version: 0.9.1 schema version: 0.7.5 semantic-version version: 2.8.5 setuptools version: 65.6.0 six version: 1.16.0 tqdm version: 4.62.3 urllib3 version: 1.26.8 websocket-client version: 1.4.2 Werkzeug version: 0.16.1 wheel version: 0.36.2 windows-curses version: 2.3.0 xmlrunner version: 1.7.7 ---------------------------------------------------- Check ESP-IDF python requirements.txt ------------------------------------------------- Check ESP-IDF Python packages Python requirements from C:\Desktop\esp-idf\requirements.txt are satisfied. ---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------ Check Extension Python packages Python requirements from c:.vscode\extensions\espressif.esp-idf-extension-1.6.2\requirements.txt are satisfied. ---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------ Check Debug AdapterPython packages Python requirements from c:.vscode\extensions\espressif.esp-idf-extension-1.6.2\esp_debug_adapter\requirements.txt are satisfied. ---------------------------------------------------- Visual Studio Code launch.json -------------------------------------------------------- { "version": "0.2.0", "configurations": [ { "type": "espidf", "name": "Launch", "request": "launch" } ] } ---------------------------------------------------- Visual Studio Code c_cpp_properties.json ---------------------------------------------- { "configurations": [ { "name": "ESP-IDF", "compilerPath": "C:\Users\poncetbijonnetxavier\.espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe", "cStandard": "c11", "cppStandard": "c++17", "includePath": [ "${config:idf.espIdfPath}/components/", "${config:idf.espIdfPathWin}/components/", "${config:idf.espAdfPath}/components/", "${config:idf.espAdfPathWin}/components/", "${workspaceFolder}/" ], "browse": { "path": [ "${config:idf.espIdfPath}/components", "${config:idf.espIdfPathWin}/components", "${config:idf.espAdfPath}/components/", "${config:idf.espAdfPathWin}/components/**", "${workspaceFolder}" ], "limitSymbolsToIncludedHeaders": false }, "configurationProvider": "ms-vscode.makefile-tools" } ], "version": 4 }

Extension

No response

Description

When starting monitoring my esp32 board powershell seems not to take into account the parameters present in the sdkconfig file of the project. For exemple I've a COM10 with baudrate set to 115200 but monitoring is start with 460800... This problem appeared on version 1.6.2 and does not exist in version 1.6.1. It seems related to functionality #951 Returning to version 1.6.1 resolve my problem. This is a log from terminal: image

Debug Message

A powershell popup error appears with exit code 1.

Other Steps to Reproduce

No response

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

brianignacio5 commented 1 year ago

Have you try using the new idf.monitorBaudRate configuration setting to set the monitoring baud rate ?

The thing is that starting from 5.0, values from sdkconfig for monitor baud rate are not taken into account.

vsh-ektos commented 1 year ago

Add a line to setting.json "idf.monitorBaudRate": "115200" The update 1.6.2 set the wrong default UART BoudRate

vsh-ektos commented 1 year ago

@brianignacio5 Maybe it's better to change it to 115200? https://github.com/espressif/vscode-esp-idf-extension/blob/f00a29da7c6dd3caaecc70f01f5f438dc62c2fd0/package.json#L467

reivax85 commented 1 year ago

Ok it's solved by adding the line "idf.monitorBaudRate":"115200", thanks. But it's very annoying to come across this kind of bug. Now what's the use of the line CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y in the sdkconfig file ?

brianignacio5 commented 1 year ago

From V5.0 sdkconfig is already not being used by idf.py monitor as described here

reivax85 commented 1 year ago

Ok, so if I understand correctly we accept a bug for those who use old version like 4.4. I can't upgrade to version 5 because I'm using esp-adf framework which is not supported with version 5 (see here in the readme: https://github.com/espressif/esp-adf ).

roblatour commented 1 year ago

I have the same problem, it took me 40 minutes this morning to realize it was because of this update. Not sure how to add the line "idf.monitorBaudRate":"115200" as described above can you please explain?

reivax85 commented 1 year ago

if you are under vs code, you into .vscode folder, open settings.json and add this here: image

roblatour commented 1 year ago

Thank you, that resolved it for the current project I am working on.

brianignacio5 commented 1 year ago

You're right @Xav-Scheiber I'll add esp-idf version validation to fix this issue

BlackGhostHD commented 1 year ago

Quality assurance is our passion... :angry:

crackwitz commented 1 year ago

These changes were introduced by merged pull request #951

I think Espressif deserve some slack. Espressif/esp-idf has been quite above "industry standard" in terms of responsiveness to all kinds of issues, reaction times, competent solutions, not to mention chip availability ;) Other manufacturers, if their chips are available at all, don't exhibit the level of care for API quality, amenities (logging, console, ...) or decent usable documentation.

reivax85 commented 1 year ago

Yes I agree. Errors happen to everyone! And luckily we have a temporary solution! Let's get things :)