Closed vandy closed 6 months ago
It is because, when you hard reset the board, the usb-serial-jtag peripheral also will be under reset. This is a hardware design for now. However, we added a recovery mechanism into the OpenOCD to cover such cases. Communication should be established again. As I see recovery is not working for you, right?
Yes, the recovery mechanism doesn't work for me. As I do a hard reset, OpenOCD starts spitting errors out and never gets reconnected. The only method to make it work is to stop it (Ctrl+C
) and restart openocd.exe -f board/esp32c6-builtin.cfg
.
OK. I will have a look at it.
@vandy We have a fix for the Windows. Can you give it a try with the master branch built? https://github.com/espressif/openocd-esp32/actions/runs/9130378811
I am closing the issue. Feel free to re-open if you have a similar problem with the latest master.
Hi, I've installed ESP-IDF v5.3, vscode extension v1.8.0, openocd Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26) and working with H2 chip (dev board) right now. It seems the problem stays the same.
When I restart the board from the Monitor with Ctrl+T, Ctrl+R
shortcut, OpenOCD feels ok Info : [esp32c6] Reset cause (21) - (USB (UART) core reset)
. Monitor reconnects with all information.
When pushing the RST button on the dev board OpenOCD reports errors:
Error: libusb_bulk_write error: LIBUSB_ERROR_IO
Error: libusb_open() failed with LIBUSB_ERROR_NO_DEVICE
Error: missing data from bitq interface
Error: dmi_scan failed jtag scan
Error: libusb_bulk_write error: LIBUSB_ERROR_IO
Error: missing data from bitq interface
Error: failed jtag scan: -104
Error: [esp32h2] Failed DMI read at 0x11; status=2
Error: [esp32h2] polling failed!
Error: libusb_bulk_write error: LIBUSB_ERROR_IO
Error: missing data from bitq interface
Error: dmi_scan failed jtag scan
Error: libusb_bulk_write error: LIBUSB_ERROR_IO
Error: missing data from bitq interface
Error: failed jtag scan: -104
Error: [esp32h2] Failed DMI read at 0x11; status=2
Error: [esp32h2] polling failed!
Error: libusb_bulk_write error: LIBUSB_ERROR_IO
Error: missing data from bitq interface
Error: dmi_scan failed jtag scan
Error: libusb_bulk_write error: LIBUSB_ERROR_IO
Error: missing data from bitq interface
Error: failed jtag scan: -104
Error: [esp32h2] Failed DMI read at 0x11; status=2
Error: [esp32h2] polling failed!
Error: libusb_bulk_write error: LIBUSB_ERROR_IO
Error: missing data from bitq interface
Error: dmi_scan failed jtag scan
Error: libusb_bulk_write error: LIBUSB_ERROR_IO
Error: missing data from bitq interface
Error: failed jtag scan: -104
Error: [esp32h2] Failed DMI read at 0x11; status=2
Error: [esp32h2] polling failed!
@vandy We are about to release the new OpenOCD version. You can wait for it or try with the master branch artifact. https://github.com/espressif/openocd-esp32/actions/runs/10113579666/artifacts/1744402679
Btw, release binary has already been created. https://github.com/espressif/openocd-esp32/releases/tag/v0.12.0-esp32-20240726
Development Kit
ESP32-C6-DEVKIT
Module or chip used
ESP32-C6-WROOM-1
Debug Adapter
Built-in usb-jtag
OpenOCD version
v0.12.0-esp32-20230921
Operating System
Windows 10
Using an IDE ?
vsCode
OpenOCD command line
openocd.exe -f board/esp32c6-builtin.cfg
JTAG Clock Speed
24000 kHz
ESP-IDF version
v5.2
Problem Description
I'm working inside vsCode with Espressif IDF Extension v1.7.0, running all commands inside ESP-IDF Terminal (provided by the extension).
Ctrl+T, Ctrl+R
shortcut, OpenOCD feels okInfo : [esp32c6] Reset cause (21) - (USB (UART) core reset)
. Monitor reconnects with the full information as in step 3.Errors are similar to issue 176. I've updated esp-idf and tools several days ago, I believe there were no problems on the previous versions, but I'm not sure.
I've tried different options with usb drivers described in different posts (using Zadig, Espressif, default Windows) - there is no difference in the behavior.
I can flash, monitor, debug through usb-jtag in vsCode, there is only problem when I press reset button. When I connect my board through usb-uart (on-chip bridge) everything is fine after reset (apparently no OpenOCD is running in this case).
oocd.log
Debug Logs
Expected behavior
I expect OpenOCD doesn't throw errors after resetting the board with on-board button (as it's when resetting in Device Monitor).
Screenshots
No response