aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/target/startup.tcl4
-rw-r--r--src/target/target.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/target/startup.tcl b/src/target/startup.tcl
index 425e1ecf..02cefb09 100644
--- a/src/target/startup.tcl
+++ b/src/target/startup.tcl
@@ -159,3 +159,7 @@ proc armv4_5 params {
# By default(classic) the config scripts will set up the target configuration
proc init_targets {} {
}
+
+# Additionally board config scripts can define a procedure init_board that will be executed after init and init_targets
+proc init_board {} {
+}
diff --git a/src/target/target.c b/src/target/target.c
index 5b2117df..f8326ea7 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -1033,6 +1033,10 @@ COMMAND_HANDLER(handle_target_init_command)
if (ERROR_OK != retval)
return retval;
+ retval = command_run_line(CMD_CTX, "init_board");
+ if (ERROR_OK != retval)
+ return retval;
+
LOG_DEBUG("Initializing targets...");
return target_init(CMD_CTX);
}