[Bug Report]: Can't start OpenOCD (VSC-667)
See original GitHub issuePre Bug Report Checklist Before reporting any bug please make sure of these points.
- [ x] Make sure you have searched for existing bugs and features request before you post an issue.
- This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
- [ x] I’ve read the docs and found no information that could have helped solving the issue.
Describe the bug I’m trying to learn how to debug the basic blinky. I can build and flash and get an led flashing on the breadboard (after a days work 😦 )
I’m following the instructions here: https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/tutorial/debugging.md
I cannot get past the first step of opening the OpenOCD server.
When I open the blink.c and press F5 I get: Open On-Chip Debugger v0.10.0-esp32-20200709 (2020-07-09-08:54) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html adapter speed: 20000 kHz
Info : Configured 2 cores Info : Lis❌ tening on port 6666 for tcl connections Error: couldn’t bind telnet to socket on port 4444: No error [Stopped] : OpenOCD Server
I can see the OpenOCD server (Stopped) in the status bar. I click on it, accept the Start OCD and same error.
A popup with the message: OpenOCD Exit with non-zero error code 1
Not helpful
I click on report - what should I see?
To Reproduce Steps to reproduce the behavior (including the full log).
As above
Expected behavior A clear and concise description of what you expected to happen.
I expect to be able to set a breakpoint and then single step through application
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS Name & Version: [e.g. MacOS X 10.14.5]
- VSCode Version: [e.g. 1.35.1]
- ESP-IDF Version: [e.g. v3.2.2]
- Python Version: [e.g. 2.7.10]
NOTE: You can use the
ESP-IDF: Doctor command
to generate a report of your configuration.
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report --------------------------------------------- OS win32 x64 10.0.19043 System environment variable PATH C:\Program Files (x86)\STMicroelectronics\st_toolset\asm;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\PuTTY;C:\xampp\mysql\bin;C:\Program Files\cmder\vendor\git-for-windows\mingw64\bin;C:\Program Files\xpdf\bin64;C:\Program Files\Java\jdk-11.0.1\bin;C:\Program Files\Java\jdk-11.0.1;C:\Program Files\javafx-sdk-11.0.1;C:\Program Files\javafx-sdk-11.0.1\lib;C:\Program Files (x86)\AOMEI Backupper;C:\Program Files\R\R-3.5.1\bin;C:\Users\Gordon\AppData\Local\Programs\Python\Python37-32;C:\Users\Gordon\AppData\Local\Microsoft\WindowsApps;C:\Users\Gordon\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\sendmidi-windows-1.0.14;C:\Program Files (x86)\receivemidi-windows-1.1.0-beta1;C:\MinGW\bin;C:\MinGW\include;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\Plantronics\Spokes3G;C:\Program Files\dotnet;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Git\cmd;C:\Program Files (x86)\dotnet;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\jdk-15.0.2\bin;C:\Program Files\AdoptOpenJDK\jdk8u192-b12\bin;C:\Program Files\Java\jdk1.8.0_211\bin;C:\Android\android-sdk\tools;C:\Android\android-sdk\platform-tools;C:\Android\android-sdk\tools\bin;C:\Program Files\IVI Foundation\VISA\Win64\Bin;C:\Program Files (x86)\Common Files\Sage SData;C:\Program Files\PowerShell\7;C:\Program Files (x86)\nodejs;C:\Users\Gordon\AppData\Local\Programs\Python\Python39;C:\Users\Gordon\AppData\Local\Programs\Python\Python39\Scripts;C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin;C:\Program Files\Git\bin;C:\Program Files\Git;C:\Users\Gordon\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\Gordon\AppData\Local\Programs\Python\Python39;C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\bin;C:\Users\Gordon.cargo\bin;C:\Users\Gordon\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\sendmidi-windows-1.0.14;C:\Program Files (x86)\receivemidi-windows-1.1.0-beta1;C:\MinGW\bin;C:\MinGW\include;C:\xampp\php;C:\Users\Gordon\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\Program Files\R\R-3.6.3\bin;C:\Program Files\R\R-3.6.3;C:\Program Files\Java\jdk-13.0.1\bin;C:\Users\Gordon\Documents\PowerShell\Scripts;C:\Users\Gordon.dotnet\tools;C:\Android\android-sdk\emulator;C:\Android\android-sdk\emulator\qemu\windows-x86_64;C:\Program Files\SDCC\bin;C:\Users\Gordon\AppData\Roaming\Python\Python39\Scripts;C:\Users\Gordon\AppData\Local\Android\Sdk\platform-tools;C:\Users\Gordon\AppData\Roaming\npm;C:\Users\Gordon\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts;C:\Users\Gordon\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts;C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin; Visual Studio Code version 1.57.0-insider Visual Studio Code language en Visual Studio Code shell C:\Program Files\PowerShell\7\pwsh.exe ESP-IDF Extension version 1.0.3 ---------------------------------------------------- Extension configuration settings ------------------------------------------------------ ESP-IDF Path (idf.espIdfPath) c:\Users\Gordon\esp-idf\esp-idf Custom extra paths (idf.customExtraPaths) C:\Users\Gordon.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin;C:\Users\Gordon.espressif\tools\xtensa-esp32s2-elf\esp-2020r3-8.4.0\xtensa-esp32s2-elf\bin;C:\Users\Gordon.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:\Users\Gordon.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;C:\Users\Gordon.espressif\tools\cmake\3.16.4\bin;C:\Users\Gordon.espressif\tools\openocd-esp32\v0.10.0-esp32-20200709\openocd-esp32\bin;C:\Users\Gordon.espressif\tools\ninja\1.10.0;C:\Users\Gordon.espressif\tools\idf-exe\1.0.1;C:\Users\Gordon.espressif\tools\ccache\3.7;C:\Users\Gordon.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64 Custom extra vars (idf.customExtraVars) {“OPENOCD_SCRIPTS”:“C:\Users\Gordon\.espressif\tools\openocd-esp32\v0.10.0-esp32-20200709/openocd-esp32/share/openocd/scripts”,“IDF_CCACHE_ENABLE”:“1”} Virtual env Python Path (idf.pythonBinPath) C:\Users\Gordon.espressif\python_env\idf4.2_py3.9_env\Scripts\python.exe Serial port (idf.port) /dev/ttyUSB1 OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,target/esp32.cfg ESP-IDF Tools Path (idf.toolsPath) ${env:IDF_TOOLS_PATH} -------------------------------------------------------- Configurations access ------------------------------------------------------------- Access to ESP-IDF Path (idf.espIdfPath) true Access to ESP-IDF Custom extra paths Access to C:\Users\Gordon.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin: true Access to C:\Users\Gordon.espressif\tools\xtensa-esp32s2-elf\esp-2020r3-8.4.0\xtensa-esp32s2-elf\bin: true Access to C:\Users\Gordon.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin: true Access to C:\Users\Gordon.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin: true Access to C:\Users\Gordon.espressif\tools\cmake\3.16.4\bin: true Access to C:\Users\Gordon.espressif\tools\openocd-esp32\v0.10.0-esp32-20200709\openocd-esp32\bin: true Access to C:\Users\Gordon.espressif\tools\ninja\1.10.0: true Access to C:\Users\Gordon.espressif\tools\idf-exe\1.0.1: true Access to C:\Users\Gordon.espressif\tools\ccache\3.7: true Access to C:\Users\Gordon.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) false ----------------------------------------------------------- Executables Versions ----------------------------------------------------------- Git version 2.29.0 ESP-IDF version 4.2.1 Python version 3.9.5 Python’s pip version 21.1.1 -------------------------------------------------- Python packages in idf.pythonBinPath ---------------------------------------------------- bidict version: 0.21.2 bitstring version: 3.1.7 Brotli version: 1.0.9 certifi version: 2020.12.5 cffi version: 1.14.5 chardet version: 4.0.0 click version: 8.0.1 colorama version: 0.4.4 contextlib2 version: 0.6.0.post1 cryptography version: 3.4.7 ecdsa version: 0.17.0 esp-windows-curses version: 0.1 Flask version: 0.12.5 Flask-Compress version: 1.9.0 Flask-SocketIO version: 2.9.6 future version: 0.18.2 gcovr version: 4.2 gdbgui version: 0.13.2.0 gevent version: 1.5.0 greenlet version: 1.1.0 idf-component-manager version: 0.2.1a1 idna version: 2.10 itsdangerous version: 2.0.1 Jinja2 version: 3.0.1 lxml version: 4.6.3 MarkupSafe version: 2.0.1 pip version: 21.1.1 psutil version: 5.8.0 pycparser version: 2.20 pyelftools version: 0.27 pygdbmi version: 0.9.0.2 Pygments version: 2.9.0 pyparsing version: 2.3.1 pyserial version: 3.5 python-engineio version: 4.2.0 python-socketio version: 5.3.0 pywin32 version: 300 PyYAML version: 5.4.1 reedsolo version: 1.5.4 requests version: 2.25.1 requests-toolbelt version: 0.9.1 schema version: 0.7.4 semantic-version version: 2.8.5 setuptools version: 56.0.0 six version: 1.16.0 tqdm version: 4.61.0 urllib3 version: 1.26.5 websocket-client version: 1.0.1 Werkzeug version: 0.16.1 wheel version: 0.36.2 windows-curses version: 2.2.0 xmlrunner version: 1.7.7 ---------------------------------------------------- Check ESP-IDF python requirements.txt ------------------------------------------------- Check ESP-IDF Python packages Python requirements from c:\Users\Gordon\esp-idf\esp-idf\requirements.txt are satisfied. ---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------ Check Extension Python packages Python requirements from c:\Users\Gordon.vscode-insiders\extensions\espressif.esp-idf-extension-1.0.3\requirements.txt are satisfied. ---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------ Check Debug AdapterPython packages Python requirements from c:\Users\Gordon.vscode-insiders\extensions\espressif.esp-idf-extension-1.0.3\esp_debug_adapter\requirements.txt are satisfied. ---------------------------------------------------- Visual Studio Code launch.json -------------------------------------------------------- { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 “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\Gordon\.espressif\tools\xtensa-esp32-elf\esp-2020r3-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 }, “compileCommands”: “${workspaceFolder}/build/compile_commands.json” } ], “version”: 4 }
Logs If applicable, please share the log file which can be obtained from
- Windows:
%USERPROFILE%\.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log
- Linux & MacOSX:
$HOME/.vscode/extensions/espressif.esp-idf-extension-VERSION/esp_idf_vsc_ext.log
Extension Configuration settings
Open Command Palette (F1) and type Preferences: Open Settings (JSON)
or use {CURRENT_PROJECT}/.vscode/settings.json
to get the following extension configuration settings value:
idf.espIdfPath
(MacOS or Linux) oridf.espIdfPathWin
(Windows) also calledPath to locate ESP-IDF framework (IDF_PATH)
inPreferences: Open Settings (UI)
.idf.pythonBinPath
(MacOS or Linux) oridf.pythonBinPathWin
(Windows) also calledPython absolute binary path used to execute ESP-IDF Python Scripts
inPreferences: Open Settings (UI)
.idf.openOcdConfigs
also calledList of configuration files inside OpenOCD Scripts directory
inPreferences: Open Settings (UI)
.idf.customExtraPaths
also calledPaths to be appended to PATH
inPreferences: Open Settings (UI)
.idf.customExtraVars
also calledVariables to be added to system environment variables
inPreferences: Open Settings (UI)
.idf.adapterTargetName
also calledTarget name for ESP-IDF Debug Adapter
inPreferences: Open Settings (UI)
.idf.customAdapterTargetName
is used whenidf.adapterTargetName
is set tocustom
.
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10
Top GitHub Comments
Thanks for your help, it’s appreciated 😃
For openOCD compatible boards check Debug Adapter Hardware and ESP-IDF Selecting JTAG adapter.