-add_help_text help "Tcl implementation of help command"
-
-
-# If a fn is unknown to Tcl, we try to execute it as an OpenOCD command
-#
-# We also support two level commands. "flash banks" is translated to
-# flash_banks
-proc unknown {args} {
- # do the name mangling from "flash banks" to "flash_banks"
- if {[llength $args]>=2} {
- set cmd_name "[lindex $args 0]_[lindex $args 1]"
- # Fix?? add a check here if this is a command?
- # we'll strip away args until we fail anyway...
- return [eval "$cmd_name [lrange $args 2 end]"]
- }
- # This really is an unknown command.
- return -code error "Unknown command: $args"
-}
-
-
-proc target_script {target_num eventname scriptname} {
- if {[string compare $eventname reset]==0} {
- set eventname post_reset
- }
-
- # This is the script we invoke
- proc "target_[set target_num]_[set eventname]" {} "script $scriptname"
-
-}
-
-add_help_text target_script "<target#> <event=reset/pre_reset/post_halt/pre_resume/gdb_program_config> <script_file>"
-
-