helper: fix build with mingw gcc 12.1.0
[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 # Try flipping / and \ to find file if the filename does not
7 # match the precise spelling
8 proc find {filename} {
9 if {[catch {ocd_find $filename} t]==0} {
10 return $t
11 }
12 if {[catch {ocd_find [string map {\ /} $filename} t]==0} {
13 return $t
14 }
15 if {[catch {ocd_find [string map {/ \\} $filename} t]==0} {
16 return $t
17 }
18 # make sure error message matches original input string
19 return -code error "Can't find $filename"
20 }
21 add_usage_text find "<file>"
22 add_help_text find "print full path to file according to OpenOCD search rules"
23
24 # Find and run a script
25 proc script {filename} {
26 uplevel #0 [list source [find $filename]]
27 }
28 add_help_text script "filename of OpenOCD script (tcl) to run"
29 add_usage_text script "<file>"
30
31 # Run a list of post-init commands
32 # Each command should be added with 'lappend post_init_commands command'
33 lappend _telnet_autocomplete_skip _run_post_init_commands
34 proc _run_post_init_commands {} {
35 if {[info exists ::post_init_commands]} {
36 foreach cmd $::post_init_commands {
37 eval $cmd
38 }
39 }
40 }
41
42 # Run a list of pre-shutdown commands
43 # Each command should be added with 'lappend pre_shutdown_commands command'
44 lappend _telnet_autocomplete_skip _run_pre_shutdown_commands
45 proc _run_pre_shutdown_commands {} {
46 if {[info exists ::pre_shutdown_commands]} {
47 foreach cmd $::pre_shutdown_commands {
48 eval $cmd
49 }
50 }
51 }
52
53 #########

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)