Skip to content

Commit 3098897

Browse files
committed
Fix disabling of WDTs when CPU is halted.
1 parent 7790403 commit 3098897

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

tcl/target/esp32.cfg

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,20 @@ if { [info exists ESP32_ONLYCPU] } {
3131
set _ONLYCPU 3
3232
}
3333

34+
proc esp_core_halt { tgt } {
35+
#We need to disable the watchdogs here.
36+
#TIMG1 WDT
37+
$tgt mww 0x3FF5F064 0x50D83AA1
38+
$tgt mww 0x3FF5F048 0x0
39+
#TIMG2 WDT
40+
$tgt mww 0x3FF60064 0x50D83AA1
41+
$tgt mww 0x3FF60048 0x0
42+
#RTC WDT
43+
#ToDo: Figure out how to kill the RTC WDT
44+
}
45+
3446
proc configure_esp32_core { TGT } {
35-
$TGT configure -event debug-halted {
36-
#We need to disable the watchdogs here.
37-
#TIMG1 WDT
38-
mww 0x3FF5F064 0x050DB83AA1
39-
mww 0x3FF5F048 0x0
40-
#TIMG2 WDT
41-
mww 0x3FF60064 0x050DB83AA1
42-
mww 0x3FF60048 0x0
43-
#RTC WDT
44-
#ToDo: Figure out how to kill the RTC WDT
45-
}
47+
$TGT configure -event halted [list esp_core_halt $TGT]
4648
}
4749

4850
#Change the name of the CPU taps depending on if it's enabled or not. This way, the user
@@ -83,3 +85,6 @@ if { $_ONLYCPU != 1 } {
8385
}
8486
}
8587

88+
89+
#Force hw breakpoints. Once we have a memory map, we can also allow software bps.
90+
gdb_breakpoint_override hard

0 commit comments

Comments
 (0)