diff --git a/src/target/startup.tcl b/src/target/startup.tcl index 425e1ecfb..02cefb09b 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 5b2117df7..f8326ea72 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); }