espressif / openocd-esp32

OpenOCD branch with ESP32 JTAG support
Other
350 stars 128 forks source link

openocd currently not disables watchdog? (OCD-994) #332

Open denizzzka opened 3 weeks ago

denizzzka commented 3 weeks ago

Development Kit

LuatOS ESP32-C3

Module or chip used

ESP32c3

Debug Adapter

directly connected USB

OpenOCD version

v0.12.0-esp32-20240726 (2024-07-26-15:19)

Operating System

Linux

Using an IDE ?

CLI

OpenOCD command line

openocd -c "telnet_port 5449" -c "gdb_port 3117" -f interface/esp_usb_jtag.cfg -f board/esp32c3-builtin.cfg

JTAG Clock Speed

default

ESP-IDF version

v5.3

Problem Description

It seems, openocd currently not disables watchdog timer?

Iit is leads to panic condition after debug seesion stop on the breakpoint if user tries to execute next step manually

Temporary fix: just add CONFIG_INT_WDT=n into the project config

Debug Logs

No response

Expected behavior

Step by step debugging should work without CONFIG_INT_WDT=n

Screenshots

No response

erhankur commented 3 weeks ago

@denizzzka we do disable the watchdogs in every halt with this function. https://github.com/espressif/openocd-esp32/blob/master/tcl/target/esp32c3.cfg#L26

From OpenOCD's perspective, reason of the halt doesn't matter. WDTs will be disabled after step, breakpoint or manual halt command.

Perhaps you could share your application log output to see what happens during the step. You should have seen the reset reason during the next boot. Additionally, you can monitor the OpenOCD output by running it with the -d3 option.

openocd -c "telnet_port 5449" -c "gdb_port 3117" -f board/esp32c3-builtin.cfg -d3

erhankur commented 4 days ago

@denizzzka any update?