-
Notifications
You must be signed in to change notification settings - Fork 150
Description
Development Kit
Custom hardware ESP32-C3 based
Module or chip used
ESP32C3-MINI
Debug Adapter
Built in USB-JTAG
OpenOCD version
v0.11.0-esp32-20221026 (2022-10-26-14:48)
Operating System
Windows
Using an IDE ?
Espressif-IDE (Eclipse)
OpenOCD command line
openocd -f board/esp32c3-builtin.cfg
JTAG Clock Speed
default
ESP-IDF version
4.4.2
Problem Description
Open OCD or ESP32 gets stuck in a state where it is repeatedly trying to set a duplicate breakpoint.
My typical workflow is:
- Power ESP32 with USB cable connected
- idf.py flash
- idf.py monitor
- openocd -f board/esp32c3-builtin.cfg
- Start debuging (with external OpenOCD) in Espressif IDE
Usually this works fine, but sometimes an issue occurs when I try place a breakpoint, or try to start a debug session with existing breakpoints. At that moment, the monitor starts spewing out guru meditation errors and Open OCD shows duplicate breakpoint errors.
Once this issue happens, it is very hard to make it go away. sometimes I cant make it go away, like there is some persistent state in one of the parts.
It is necessary to stop OpenOCD, stop the monitor, close Espressif IDE, turn off power to the ESP32, then start everything again. Usually OpenOCD will start fine, but then once Espressif IDE starts a debug session, it gets OpenOCD (or the ESP32) into this state again. After that, if you stop OpenOCD and restart it, it will still be stuck with duplicate breakpoint at address errors.
I suspect this problem is triggered by Espressif IDE and its use of OpenOCD, but once in this state, the problem will occur if OpenOCD is restarted, without starting a new Espressif IDE debug session.
Debug Logs
Documents\ESP32\EvnexHomeESP32Firmware>openocd -f board/esp32c3-builtin.cfg
Open On-Chip Debugger v0.11.0-esp32-20221026 (2022-10-26-14:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : esp_usb_jtag: serial (A0:76:4E:6C:69:F0)
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : datacount=2 progbufsize=16
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40101104
Info : starting gdb server for esp32c3 on 3333
Info : Listening on port 3333 for gdb connections
Info : [esp32c3] Found 8 triggers
Error: Duplicate Breakpoint address: 0x00000000 (BP 0)
Error: Duplicate Breakpoint address: 0x00000000 (BP 0)
Error: Duplicate Breakpoint address: 0x00000000 (BP 0)
Error: Duplicate Breakpoint address: 0x00000000 (BP 0)
Error: Duplicate Breakpoint address: 0x00000000 (BP 0)
Error: Duplicate Breakpoint address: 0x00000000 (BP 0)
Error: Duplicate Breakpoint address: 0x00000000 (BP 0)
... error repeats forever
ESP monitor output:
Setting breakpoint at 0x00000000 and returning...
Guru Meditation Error: Core 0 panic'ed (Instruction access fault). Exception was unhandled.
Setting breakpoint at 0x00000000 and returning...
Guru Meditation Error: Core 0 panic'ed (Instruction access fault). Exception was unhandled.
Setting breakpoint at 0x00000000 and returning...
Guru Meditation Error: Core 0 panic'ed (Instruction access fault). Exception was unhandled.
Setting breakpoint at 0x00000000 and returning...
Guru Meditation Error: Core 0 panic'ed (Instruction access fault). Exception was unhandled.
Setting breakpoint at 0x00000000 and returning...
Guru Meditation Error: Core 0 panic'ed (Instruction access fault). Exception was unhandled.
... error repeats forever ...Expected behavior
To be able to start a debug session every time and add/remove breakpoints at will.
Screenshots
No response