Merge branch 'dsp5680xx_cherry' of git://repo.or.cz/openocd/dsp568013 into HEAD
[openocd.git] / src / helper / startup.tcl
1 # Defines basic Tcl procs that must exist for OpenOCD scripts to work.
2 #
3 # Embedded into OpenOCD executable
4 #
5
6
7 # We need to explicitly redirect this to the OpenOCD command
8 # as Tcl defines the exit proc
9 proc exit {} {
10 ocd_throw exit
11 }
12
13 # All commands are registered with an 'ocd_' prefix, while the "real"
14 # command is a wrapper that calls this function. Its primary purpose is
15 # to discard 'handler' command output,
16 proc ocd_bouncer {name args} {
17 set cmd [format "ocd_%s" $name]
18 set type [eval ocd_command type $cmd $args]
19 if {$type == "native"} {
20 return [eval $cmd $args]
21 } else {if {$type == "simple"} {
22 if {[catch {eval $cmd $args}] == 0} {
23 return ""
24 } else {
25 # 'classic' commands output error message as part of progress output
26 set errmsg ""
27 }
28 } else {if {$type == "group"} {
29 catch {eval ocd_usage $name $args}
30 set errmsg [format "%s: command requires more arguments" \
31 [concat $name " " $args]]
32 } else {
33 set errmsg [format "Unknown command type: %s" $type]
34 }}}
35 return -code error $errmsg
36 }
37
38 # Try flipping / and \ to find file if the filename does not
39 # match the precise spelling
40 proc find {filename} {
41 if {[catch {ocd_find $filename} t]==0} {
42 return $t
43 }
44 if {[catch {ocd_find [string map {\ /} $filename} t]==0} {
45 return $t
46 }
47 if {[catch {ocd_find [string map {/ \\} $filename} t]==0} {
48 return $t
49 }
50 # make sure error message matches original input string
51 return -code error "Can't find $filename"
52 }
53 add_usage_text find "<file>"
54 add_help_text find "print full path to file according to OpenOCD search rules"
55
56 # Find and run a script
57 proc script {filename} {
58 uplevel #0 source [find $filename]
59 }
60 add_help_text script "filename of OpenOCD script (tcl) to run"
61 add_usage_text script "<file>"
62
63 #########
64

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)