question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

openOCD can not launch debug session but can flash using JTag (IEP-643)

See original GitHub issue

after installing a complete fresh environment , as a simple update didn’t work at all, I remain with the problem that any debug launch configuration can not start openOCD. However I can flash using Jtag.

Noteable as well, when I try to launch a debug session I can not flash after as well. I have to unplug the ESP-Prog and plug in again.

here the error log of the intent to flash the device after tried a debug session

error2.log after this error log was created I replugged the USB and the device flashed seamlessly. I also can flash many times with no issue.

here the flash attempt failed again after debug attempt error3.log

Environment Information: Eclipse > About Eclipse > Installation Details > Configuration > Copy to Clipboard (Attach as a file)

ESP-IDF Tools Information: `Executing C:.esp-tools\python_env\idf4.4_py3.10_env\Scripts\python.exe C:.esp\esp-idf\tools\idf_tools.py list

  • xtensa-esp32-elf: Toolchain for Xtensa (ESP32) based on GCC
    • esp-2021r2-patch2-8.4.0 (recommended, installed)
  • xtensa-esp32s2-elf: Toolchain for Xtensa (ESP32-S2) based on GCC
    • esp-2021r2-patch2-8.4.0 (recommended, installed)
  • xtensa-esp32s3-elf: Toolchain for Xtensa (ESP32-S3) based on GCC
    • esp-2021r2-patch2-8.4.0 (recommended, installed)
  • xtensa-clang: LLVM for Xtensa (ESP32, ESP32-S2) based on clang (optional)
    • 12.0.1-d9341b81fc (recommended, installed)
  • riscv32-esp-elf: Toolchain for 32-bit RISC-V based on GCC
    • esp-2021r2-patch2-8.4.0 (recommended, installed)
  • esp32ulp-elf: Toolchain for ESP32 ULP coprocessor
    • 2.28.51-esp-20191205 (recommended, installed)
  • esp32s2ulp-elf: Toolchain for ESP32-S2 and ESP32-S3 ULP coprocessors
    • 2.28.51-esp-20191205 (recommended, installed)
  • cmake: CMake build system
    • 3.20.3 (recommended, installed)
  • openocd-esp32: OpenOCD for ESP32
    • v0.11.0-esp32-20211220 (recommended, installed)
  • ninja: Ninja build system
    • 1.10.2 (recommended, installed)
  • idf-exe: IDF wrapper tool for Windows
    • 1.0.3 (recommended, installed)
  • ccache: Ccache (compiler cache)
    • 4.3 (recommended, installed)
  • dfu-util: dfu-util (Device Firmware Upgrade Utilities)
    • 0.9 (recommended, installed)

` IDF Eclipse Plugin Version: ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD ESP-IDF Eclipse Plugin 2.4.1.202202101602 com.espressif.idf.feature

Eclipse Error log:

!ENTRY org.eclipse.cdt.dsf 4 10005 2022-02-13 19:30:53.397
!MESSAGE Request for monitor: 'RequestMonitor (org.eclipse.cdt.dsf.concurrent.RequestMonitorWithProgress@443bd649): Status ERROR: ilg.gnumcueclipse.debug.gdbjtag code=5010 Starting OpenOCD timed out. null' resulted in an error.
!SUBENTRY 1 ilg.gnumcueclipse.debug.gdbjtag 4 5010 2022-02-13 19:30:53.397
!MESSAGE Starting OpenOCD timed out.

!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2022-02-13 19:30:53.401
!MESSAGE Error in services launch sequence
!STACK 1
org.eclipse.core.runtime.CoreException: Starting OpenOCD timed out.
	at org.eclipse.cdt.dsf.concurrent.Sequence.abortExecution(Sequence.java:599)
	at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleErrorOrWarning(Sequence.java:448)
	at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleFailure(RequestMonitor.java:433)
	at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:393)
	at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:831)
!SUBENTRY 1 ilg.gnumcueclipse.debug.gdbjtag 4 5010 2022-02-13 19:30:53.401
!MESSAGE Starting OpenOCD timed out.

!ENTRY com.espressif.idf.core 1 0 2022-02-13 19:30:53.453
!MESSAGE Open On-Chip Debugger  v0.11.0-esp32-20211220 (2021-12-20-15:43)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html

!ENTRY com.espressif.idf.debug.gdbjtag.openocd 4 1 2022-02-13 19:30:53.455
!MESSAGE C:\.esp-tools\tools\openocd-esp32\v0.11.0-esp32-20211220\openocd-esp32\bin/openocd.exe -c gdb_port 3333 -c telnet_port 4444 -c tcl_port 6666 -s C:\.esp-tools\tools\openocd-esp32\v0.11.0-esp32-20211220\openocd-esp32\bin/share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover-kit-1.8v.cfg -c program_esp_bins C:/Users/ralph/.workspace20220213/maxill/build flasher_args.json verify reset -c echo "Started by GNU MCU Eclipse"

!ENTRY org.eclipse.core.jobs 4 2 2022-02-13 19:30:53.609
!MESSAGE An internal error occurred during: "Starting OpenOCD".
!STACK 0
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@b729a05[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@3a82c554[Wrapped task = ilg.gnumcueclipse.debug.gdbjtag.dsf.GnuMcuGdbServerBackend$5@eb3e80b]] rejected from org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor@78e09b60[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 41]
	at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2057)
	at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:827)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:340)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:562)
	at org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor.schedule(DefaultDsfExecutor.java:450)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:715)
	at org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor.submit(DefaultDsfExecutor.java:482)
	at ilg.gnumcueclipse.debug.gdbjtag.dsf.GnuMcuGdbServerBackend.checkServer(GnuMcuGdbServerBackend.java:459)
	at ilg.gnumcueclipse.debug.gdbjtag.dsf.GnuMcuGdbServerBackend$GdbServerStep$2.run(GnuMcuGdbServerBackend.java:722)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

`

`
[eclipse configuration.txt](https://github.com/espressif/idf-eclipse-plugin/files/8056398/eclipse.configuration.txt)
`

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17

github_iconTop GitHub Comments

1reaction
ralphdecommented, Feb 18, 2022

@sigmaaa I got it working now, I don#t know what fixed the problem but i can tell what I did. Following your advice I reviewed all settings I opened Preferences -> C/C++ -> Build -> Environment checked (was fine) and saved and what I did as well (and didn’t before as I was not aware of this) I opened Preferences -> MCU -> Global OpenOCD Path, checked (was OK) and saved

restart and it worked

I can debug now with one little problem regarding uxTopUsedPriority is not defined, however I will open a new ticket about that.

But the fact that this installation does not work out of the box remains.

0reactions
ralphdecommented, Feb 17, 2022

no sorry, not one is working !!! except the provided one when I do new sample project

Am Do., 17. Feb. 2022 um 16:21 Uhr schrieb Denys Almazov < @.***>:

@ralphde https://github.com/ralphde now I see where the problem is. I haven’t noticed, that you were using GDB OpenOCD Debugging instead of ESP-IDF GDB OpenOCD Debugging on your screenshot. Sorry for that misunderstanding.

GDB OpenOCD Debugging it’s an external plugin that comes from Eclipse CDT. ESP-IDF GDB OpenOCD Debugging is part of our plugins. Please refer to this GDB OpenOCD Debugging https://github.com/espressif/idf-eclipse-plugin/tree/master/docs/OpenOCD Debugging.md The other option to debug your app is GDB hardware debugging. Please refer to GDB Hardware Debugging guide https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html Answering to your question regarding ${openocd_path} and ${openocd_executable}. For GDB OpenOCD Debugging plugin are stored under MCU [image: image] https://user-images.githubusercontent.com/24419842/154510319-52cc61dc-dbdc-406c-9e91-22f83cd5504c.png

To debug your project with our plugin, you need to select debug mode and configuration with the ESP-IDF GDB OpenOCD Debugging icon, which is in your case blink configuration.

May I ask for more details on this and what is the difference? Why does the provided work and which debugger is used and why does ANY other configuration not work?

Do I understand correctly, that provided configuration, which is blink Configuration works for you, but launch run blink doesn’t?

— Reply to this email directly, view it on GitHub https://github.com/espressif/idf-eclipse-plugin/issues/480#issuecomment-1043063871, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADL5WF5DPIY26Z45NLTQT2LU3UHABANCNFSM5OJQJUXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Open On-Chip Debugger: OpenOCD User's Guide
What is OpenOCD? The Open On-Chip Debugger (OpenOCD) aims to provide debugging, in-system program- ming and boundary-scan testing for embedded target ...
Read more >
JTAG Debugging - ESP32 - — ESP-IDF Programming Guide ...
Steps to start up a debug session with GDB from Eclipse and from Command Line. ... ESP32 is an industry-standard JTAG port which...
Read more >
The OpenOCD debugging plug-in - Eclipse Embedded CDT
How to run Eclipse debug sessions using OpenOCD. ... Unfortunately SWD support in the current OpenOCD version (0.8.x) is not that great, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found