-
Notifications
You must be signed in to change notification settings - Fork 135
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
OpenOCD halts CPU when connecting to gdb-server (OCD-979) #330
Comments
To avoid halt, you can comment out https://github.com/espressif/openocd-esp32/blob/master/tcl/target/esp_common.cfg#L195 and https://github.com/espressif/openocd-esp32/blob/master/tcl/target/esp_common.cfg#L214 As the explanation says, halt is needed for the flash probe. That means, you need to disable the flash support.
|
Hi, thank you @erhankur for your help. When following the steps you mentioned, and then trying to connect to GDB server, we ran into an issue. These are the steps we took:
However, it is interesting that this does not happen if the MCU is halted already. |
Sorry no idea what is happening. If you can share the verbose OpenOCD logs, I can suggest something more.
|
Sorry for the wait @erhankur , I am attaching the log file. |
Thanks for the log. We can comment out configure_event_gdb_attach call inside configure_openocd_events.
We disabled flash support so we don't need mem prot check anymore. After that, there is nothing to do in the gdb attach event. |
@Stefasaurus Can we close this issue now? Do you have any other question? |
Closed. Feel free to re-open if you have any other question. |
OpenOCD version
v0.12.0-esp32-20240318
Operating System
Windows 10
Using an IDE ?
VScode esp-idf extension
OpenOCD command line
openocd -f esp32s3-builtin.cfg
ESP-IDF version
v4.4
Problem Description
During the development of an open source project, we wanted to use the gdb-server to extract data from esp32 RAM. Then we fell into an issue, where the application successfully extracts the data, but when we connect to the gdb socket the target halts. This happens before sending any gdb commands over the tcp/ip gdb protocol. We wish to not make the target halt when the attach happens, so we would be happy if you could help us configure OpenOCD for esp32, so that the attachment does not halt the target. Thanks!
Debug Logs
No response
Expected behavior
Custom OpenOCD 'cfg' file as to not halt the target when the attach happens.
Screenshots
No response
The text was updated successfully, but these errors were encountered: