-
Notifications
You must be signed in to change notification settings - Fork 134
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
Timeout with CMSIS-DAP on ESP32 (OCD-771) #292
Comments
@gudvinr Based on the log, it appears that the chip is resetting unexpectedly while running the stub algorithm. Could you please disable flash support and try again? If it succeeds, we can then focus on identifying the specific issue. /path/to/openocd/bin/openocd -d3 \
-c "gdb_port pipe; tcl_port disabled; telnet_port disabled" \
-s /path/to/openocd/share/openocd/scripts \
-f "interface/cmsis-dap.cfg" \
-c "cmsis_dap_vid_pid 0xc251 0xf001; cmsis_dap_backend hid" \
-c "set ESP32_FLASH_VOLTAGE 3.3" \
-c "set ESP_FLASH_SIZE 0" \
-f "target/esp32.cfg" |
Sure. Now it does not reset but there are still errors: Another one with FWIW, esptool reports 4MB flash:
|
@erhankur any follow up on this one? |
@gudvinr I couldn't find a time to check your latest logs. I will have a look soon. |
Hello, I am also having the same issue, I was using wuxx nanoDAP firmware on an STM32F103C8T6 and openOCD keeps reporting that the target gets reset continuously. |
@erhankur Thank you for the quick reply, |
This is not configurable yet. You have to compile it from the source. If you can't, tell me your OS, and I will share the compiled binary. According to your log, you are a windows user. Can be hard to compile it. |
@erhankur I am running on Windows 10 64bit version (22H2). |
openocd-esp32-win32-0.12.0-esp32-20230419-192-g9ef398ef8.zip Please replace this package with yours. including script files. For a reference; I increased this timeout from 100ms to 2000ms now. Lets see if it helps. |
@erhankur I run the new openOCD in the terminal, the problem is still the same. It doesn't seem like the timeout was increased at all. |
openocd-esp32-win32-0.12.0-esp32-20230419-193-gd1405eab6.zip Ok. last try. If it doesn't help, I will re-test with my setup. |
@erhankur The problem still persists. Here is the debug log from the latest attempt. |
At least there is no reset timeout now. I don't know now why your board resetting consistently. Reset reason seems odd. You can try disabling watchdogs. You can make sure, your application works fine without debugger. Or if any chance to connect other debuggers? Sorry, not much familiar with DAP probes. |
@erhankur I did use a jlink to connect to my esp32 running debugger on platformIO and it works fine. |
@erhankur I have FTDI-ish debugger that works with openocd-esp32 and modified config without modifications to source code. I might test your build with daplink too but I can't really build it myself right now (x86_64 linux). |
Now it does not reset indefinitely and I am able to stop at breakpoint but I need some more testing |
Hello! Any follow up on this issue? I have a similar setup from @dphzz - a nanoDAPlink flashed on a STM32F103CB Blue Pill. My ESP32 is a WROOM Dev module. Using the Windows compiled OpenOCD provided here a few posts ago, I don't get the reset timeouts, but the ESP32 keeps being reset, just as @dphzz. On an interesting note, if I put the ESP32 in bootloader mode, the reset messages go away (but the debugging still doesn't work, gdb fails after some time. EDIT: EDIT 2: |
@arthurfprecht @gudvinr sorry for the late response. I don't know the latest status of this but to avoid timeout issues, did you try using faster adapter speed like 5000 khz? |
I switched to different debugger for development but I'll give this daplink one more try. |
@gudvinr I am closing this. Feel free to re-open if you need something from our side. |
Development Kit
None
Module or chip used
ESP-WROOM-32 (Wemos D1-mini32, ESP32-D0WDQ6 (revision v1.0))
Debug Adapter
DAPLink (WCH CH32F103)
OpenOCD version
v0.12.0-esp32-20230419
Operating System
Arch Linux
Using an IDE ?
VSCode (PlatformIO)
OpenOCD command line
JTAG Clock Speed
500 (and 5000 too)
ESP-IDF version
v4.4.4 (arduino-esp32 v2.0.9)
Problem Description
I am using platformio with following board config:
udev rules are set for daplink to work under normal user:
cmsis_dap_vid_pid
set toc251
f001
according to lsusb:CMSIS-DAP with
cmsis_dap_backend hid
seems to be supported since v0.12 as seen in #237 so I can't use default openocd-esp32 that comes with espressif32 platform atm. To work around that I set debug tool in platformio to custom.I don't use daplink for upload though. It is handled by esptool since I connect to PC via second USB anyway.
Debug Logs
openocd-esp32-verbose-debug.txt
Expected behavior
I kinda expect it to work and jump into debugging.
Screenshots
No response
The text was updated successfully, but these errors were encountered: