aboutsummaryrefslogtreecommitdiff
path: root/src/target/startup.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/startup.tcl')
-rw-r--r--src/target/startup.tcl15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/target/startup.tcl b/src/target/startup.tcl
index 56fcbaa7..033e9c9c 100644
--- a/src/target/startup.tcl
+++ b/src/target/startup.tcl
@@ -164,6 +164,21 @@ proc armv4_5 params {
proc init_targets {} {
}
+proc set_default_target_event {t e s} {
+ if {[$t cget -event $e] == ""} {
+ $t configure -event $e $s
+ }
+}
+
+proc init_target_events {} {
+ set targets [target names]
+
+ foreach t $targets {
+ set_default_target_event $t gdb-flash-erase-start "reset init"
+ set_default_target_event $t gdb-flash-write-end "reset halt"
+ }
+}
+
# Additionally board config scripts can define a procedure init_board that will be executed after init and init_targets
proc init_board {} {
}