-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32-C3: failing to connect GDB (OCD-580) #233
Comments
Do you see the same issue with hello_world example? |
I get the same in the hello_world example, @erhankur. However, as it turns out, this is apparently fixed by forcing the chip into Download Boot by pulling GPIO9 low on powerup. (Not yet sure whether this is a permanent fix, but I've managed to hit the entry point successfully.) Is this usually a requirement? |
I'm now finding that GDB freezes after hitting that initial breakpoint - I can't enter any commands at all. If I interrupt with Ctrl+C, I can enter commands but nothing appears to actually happen...? OpenOCD reports nothing out of sorts? |
... Yeah, so going into Download Boot means that the program doesn't execute at all... the builtin JTAG doesn't seem to notice and just freezes as if execution is continuing. |
Could you post collected |
@gerekon I did, I posted it as a gist link just above the GDB log, since it's so long. |
Sorry. Can not find attached file with openocd log. I see only GDB log posted as a part of the initial message. Does your program uses WIFI/BLE?
|
The gist link is there... it's in the verbose-styled part of the issue just under the "Debug Logs" header. Here's the link again: https://gist.github.com/tcbennun/e1625a2c6fd85873721a51334ed65098
It does use BLE. I just retried hello_world with success this time - so I assume it's PHY related after all. I already had ESP_PHY_ENABLE_USB enabled, and it looks like (edit: which I believe covers the fixes you mentioned?) |
@tcbennun If you still have an issue with the latest OpenOCD feel free to re-open. |
Development Kit
N/A
Module or chip used
ESP32-C3-MINI-1
Debug Adapter
Built-in USB
OpenOCD version
v0.11.0-esp32-20211220
Operating System
Debian Linux (kernel 5.18)
Using an IDE ?
N/A
OpenOCD command line
openocd -f board/esp32c3-builtin.cfg
JTAG Clock Speed
Any (tried default, tried 1 MHz)...
ESP-IDF version
v4.4.1
Problem Description
openocd -l openocd.log -d3 -f board/esp32c3-builtin.cfg
in a new terminal with ESP-IDF already exported.gdbinit
with the following contents:riscv32-esp-elf-gdb -ex "set remotelogfile gdb.log" -x gdbinit build/blecent.elf
in another new terminal with ESP-IDF already exported.The result is a failure for GDB to connect to the device. OpenOCD initially connects correctly, but problems occur when GDB is invoked. See logs.
Key line in the OpenOCD log:
Error: 1043 69168 riscv.c:1898 riscv_wait_algorithm(): Algorithm timed out after 40001 ms.
Debug Logs
Expected behavior
Expected GDB to connect to OpenOCD and for the program to stop at a temporary breakpoint at the start of
app_main
.Screenshots
No response
The text was updated successfully, but these errors were encountered: