1a638a30f8f9c8b042113daee06ddf021b69dd16
[openocd.git] / src / jtag / startup.tcl
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 # Defines basic Tcl procs for OpenOCD JTAG module
4
5 # Executed during "init". Can be overridden
6 # by board/target/... scripts
7 proc jtag_init {} {
8 if {[catch {jtag arp_init} err]!=0} {
9 # try resetting additionally
10 init_reset startup
11 }
12 }
13
14 # This reset logic may be overridden by board/target/... scripts as needed
15 # to provide a reset that, if possible, is close to a power-up reset.
16 #
17 # Exit requirements include: (a) JTAG must be working, (b) the scan
18 # chain was validated with "jtag arp_init" (or equivalent), (c) nothing
19 # stays in reset. No TAP-specific scans were performed. It's OK if
20 # some targets haven't been reset yet; they may need TAP-specific scans.
21 #
22 # The "mode" values include: halt, init, run (from "reset" command);
23 # startup (at OpenOCD server startup, when JTAG may not yet work); and
24 # potentially more (for reset types like cold, warm, etc)
25 proc init_reset { mode } {
26 if {[using_jtag]} {
27 jtag arp_init-reset
28 }
29 }
30
31 #########
32
33 # TODO: power_restore and power_dropout are currently neither
34 # documented nor supported.
35
36 proc power_restore {} {
37 echo "Sensed power restore, running reset init and halting GDB."
38 reset init
39
40 # Halt GDB so user can deal with a detected power restore.
41 #
42 # After GDB is halted, then output is no longer forwarded
43 # to the GDB console.
44 set targets [target names]
45 foreach t $targets {
46 # New event script.
47 $t invoke-event arp_halt_gdb
48 }
49 }
50
51 add_help_text power_restore "Overridable procedure run when power restore is detected. Runs 'reset init' by default."
52
53 proc power_dropout {} {
54 echo "Sensed power dropout."
55 }
56
57 #########
58
59 # TODO: srst_deasserted and srst_asserted are currently neither
60 # documented nor supported.
61
62 proc srst_deasserted {} {
63 echo "Sensed nSRST deasserted, running reset init and halting GDB."
64 reset init
65
66 # Halt GDB so user can deal with a detected reset.
67 #
68 # After GDB is halted, then output is no longer forwarded
69 # to the GDB console.
70 set targets [target names]
71 foreach t $targets {
72 # New event script.
73 $t invoke-event arp_halt_gdb
74 }
75 }
76
77 add_help_text srst_deasserted "Overridable procedure run when srst deassert is detected. Runs 'reset init' by default."
78
79 proc srst_asserted {} {
80 echo "Sensed nSRST asserted."
81 }
82
83 # measure actual JTAG clock
84 proc measure_clk {} {
85 set start_time [ms];
86 set iterations 10000000;
87 runtest $iterations;
88 set speed [expr "$iterations.0 / ([ms] - $start_time)"]
89 echo "Running at more than $speed kHz";
90 }
91
92 add_help_text measure_clk "Runs a test to measure the JTAG clk. Useful with RCLK / RTCK."
93
94 proc default_to_jtag { f args } {
95 set current_transport [transport select]
96 if {[using_jtag]} {
97 eval $f $args
98 } {
99 error "session transport is \"$current_transport\" but your config requires JTAG"
100 }
101 }
102
103 proc jtag args {
104 eval default_to_jtag jtag $args
105 }
106
107 proc jtag_rclk args {
108 eval default_to_jtag jtag_rclk $args
109 }
110
111 proc jtag_ntrst_delay args {
112 eval default_to_jtag jtag_ntrst_delay $args
113 }
114
115 proc jtag_ntrst_assert_width args {
116 eval default_to_jtag jtag_ntrst_assert_width $args
117 }
118
119 # BEGIN MIGRATION AIDS ... these adapter operations originally had
120 # JTAG-specific names despite the fact that the operations were not
121 # specific to JTAG, or otherwise had troublesome/misleading names.
122 #
123 # FIXME phase these aids out after some releases
124 #
125 lappend _telnet_autocomplete_skip adapter_gpio_helper_with_caller
126 # Helper for deprecated driver functions that should call "adapter gpio XXX".
127
128 # Call this function as:
129 # adapter_gpio_helper_with_caller caller sig_name
130 # adapter_gpio_helper_with_caller caller sig_name gpio_num
131 # adapter_gpio_helper_with_caller caller sig_name chip_num gpio_num
132 proc adapter_gpio_helper_with_caller {caller sig_name args} {
133 echo "DEPRECATED! use 'adapter gpio $sig_name' not '$caller'"
134 switch [llength $args] {
135 0 {}
136 1 {eval adapter gpio $sig_name $args}
137 2 {eval adapter gpio $sig_name [lindex $args 1] -chip [lindex $args 0]}
138 default {return -code 1 -level 1 "$caller: syntax error"}
139 }
140 eval adapter gpio $sig_name
141 }
142
143 lappend _telnet_autocomplete_skip adapter_gpio_helper
144 # Call this function as:
145 # adapter_gpio_helper sig_name
146 # adapter_gpio_helper sig_name gpio_num
147 # adapter_gpio_helper sig_name chip_num gpio_num
148 proc adapter_gpio_helper {sig_name args} {
149 set caller [lindex [info level -1] 0]
150 eval adapter_gpio_helper_with_caller {"$caller"} $sig_name $args
151 }
152
153 lappend _telnet_autocomplete_skip adapter_gpio_jtag_nums_with_caller
154 # Helper for deprecated driver functions that implemented jtag_nums
155 proc adapter_gpio_jtag_nums_with_caller {caller tck_num tms_num tdi_num tdo_num} {
156 echo "DEPRECATED! use 'adapter gpio tck; adapter gpio tms; adapter gpio tdi; adapter gpio tdo' not '$caller'"
157 eval adapter gpio tck $tck_num
158 eval adapter gpio tms $tms_num
159 eval adapter gpio tdi $tdi_num
160 eval adapter gpio tdo $tdo_num
161 }
162
163 lappend _telnet_autocomplete_skip adapter_gpio_jtag_nums
164 # Helper for deprecated driver functions that implemented jtag_nums
165 proc adapter_gpio_jtag_nums {args} {
166 set caller [lindex [info level -1] 0]
167 eval adapter_gpio_jtag_nums_with_caller {"$caller"} $args
168 }
169
170 lappend _telnet_autocomplete_skip adapter_gpio_swd_nums_with_caller
171 # Helper for deprecated driver functions that implemented swd_nums
172 proc adapter_gpio_swd_nums_with_caller {caller swclk_num swdio_num} {
173 echo "DEPRECATED! use 'adapter gpio swclk; adapter gpio swdio' not '$caller'"
174 eval adapter gpio swclk $swclk_num
175 eval adapter gpio swdio $swdio_num
176 }
177
178 lappend _telnet_autocomplete_skip adapter_gpio_swd_nums
179 # Helper for deprecated driver functions that implemented jtag_nums
180 proc adapter_gpio_swd_nums {args} {
181 set caller [lindex [info level -1] 0]
182 eval adapter_gpio_swd_nums_with_caller {"$caller"} $args
183 }
184
185 lappend _telnet_autocomplete_skip jtag_reset
186 proc jtag_reset args {
187 echo "DEPRECATED! use 'adapter \[de\]assert' not 'jtag_reset'"
188 switch $args {
189 "0 0"
190 {eval adapter deassert trst deassert srst}
191 "0 1"
192 {eval adapter deassert trst assert srst}
193 "1 0"
194 {eval adapter assert trst deassert srst}
195 "1 1"
196 {eval adapter assert trst assert srst}
197 default
198 {return -code 1 -level 1 "jtag_reset: syntax error"}
199 }
200 }
201
202 lappend _telnet_autocomplete_skip adapter_khz
203 proc adapter_khz args {
204 echo "DEPRECATED! use 'adapter speed' not 'adapter_khz'"
205 eval adapter speed $args
206 }
207
208 lappend _telnet_autocomplete_skip adapter_name
209 proc adapter_name args {
210 echo "DEPRECATED! use 'adapter name' not 'adapter_name'"
211 eval adapter name $args
212 }
213
214 lappend _telnet_autocomplete_skip adapter_nsrst_delay
215 proc adapter_nsrst_delay args {
216 echo "DEPRECATED! use 'adapter srst delay' not 'adapter_nsrst_delay'"
217 eval adapter srst delay $args
218 }
219
220 lappend _telnet_autocomplete_skip adapter_nsrst_assert_width
221 proc adapter_nsrst_assert_width args {
222 echo "DEPRECATED! use 'adapter srst pulse_width' not 'adapter_nsrst_assert_width'"
223 eval adapter srst pulse_width $args
224 }
225
226 lappend _telnet_autocomplete_skip interface
227 proc interface args {
228 echo "DEPRECATED! use 'adapter driver' not 'interface'"
229 eval adapter driver $args
230 }
231
232 lappend _telnet_autocomplete_skip interface_transports
233 proc interface_transports args {
234 echo "DEPRECATED! use 'adapter transports' not 'interface_transports'"
235 eval adapter transports $args
236 }
237
238 lappend _telnet_autocomplete_skip interface_list
239 proc interface_list args {
240 echo "DEPRECATED! use 'adapter list' not 'interface_list'"
241 eval adapter list $args
242 }
243
244 lappend _telnet_autocomplete_skip ftdi_location
245 proc ftdi_location args {
246 echo "DEPRECATED! use 'adapter usb location' not 'ftdi_location'"
247 eval adapter usb location $args
248 }
249
250 lappend _telnet_autocomplete_skip xds110_serial
251 proc xds110_serial args {
252 echo "DEPRECATED! use 'adapter serial' not 'xds110_serial'"
253 eval adapter serial $args
254 }
255
256 lappend _telnet_autocomplete_skip xds110_supply_voltage
257 proc xds110_supply_voltage args {
258 echo "DEPRECATED! use 'xds110 supply' not 'xds110_supply_voltage'"
259 eval xds110 supply $args
260 }
261
262 proc hla {cmd args} {
263 tailcall "hla $cmd" {*}$args
264 }
265
266 lappend _telnet_autocomplete_skip "hla newtap"
267 proc "hla newtap" {args} {
268 echo "DEPRECATED! use 'swj_newdap' not 'hla newtap'"
269 eval swj_newdap $args
270 }
271
272 lappend _telnet_autocomplete_skip ftdi_device_desc
273 proc ftdi_device_desc args {
274 echo "DEPRECATED! use 'ftdi device_desc' not 'ftdi_device_desc'"
275 eval ftdi device_desc $args
276 }
277
278 lappend _telnet_autocomplete_skip ftdi_serial
279 proc ftdi_serial args {
280 echo "DEPRECATED! use 'adapter serial' not 'ftdi_serial'"
281 eval adapter serial $args
282 }
283
284 lappend _telnet_autocomplete_skip ftdi_channel
285 proc ftdi_channel args {
286 echo "DEPRECATED! use 'ftdi channel' not 'ftdi_channel'"
287 eval ftdi channel $args
288 }
289
290 lappend _telnet_autocomplete_skip ftdi_layout_init
291 proc ftdi_layout_init args {
292 echo "DEPRECATED! use 'ftdi layout_init' not 'ftdi_layout_init'"
293 eval ftdi layout_init $args
294 }
295
296 lappend _telnet_autocomplete_skip ftdi_layout_signal
297 proc ftdi_layout_signal args {
298 echo "DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'"
299 eval ftdi layout_signal $args
300 }
301
302 lappend _telnet_autocomplete_skip ftdi_set_signal
303 proc ftdi_set_signal args {
304 echo "DEPRECATED! use 'ftdi set_signal' not 'ftdi_set_signal'"
305 eval ftdi set_signal $args
306 }
307
308 lappend _telnet_autocomplete_skip ftdi_get_signal
309 proc ftdi_get_signal args {
310 echo "DEPRECATED! use 'ftdi get_signal' not 'ftdi_get_signal'"
311 eval ftdi get_signal $args
312 }
313
314 lappend _telnet_autocomplete_skip ftdi_vid_pid
315 proc ftdi_vid_pid args {
316 echo "DEPRECATED! use 'ftdi vid_pid' not 'ftdi_vid_pid'"
317 eval ftdi vid_pid $args
318 }
319
320 lappend _telnet_autocomplete_skip ftdi_tdo_sample_edge
321 proc ftdi_tdo_sample_edge args {
322 echo "DEPRECATED! use 'ftdi tdo_sample_edge' not 'ftdi_tdo_sample_edge'"
323 eval ftdi tdo_sample_edge $args
324 }
325
326 lappend _telnet_autocomplete_skip remote_bitbang_host
327 proc remote_bitbang_host args {
328 echo "DEPRECATED! use 'remote_bitbang host' not 'remote_bitbang_host'"
329 eval remote_bitbang host $args
330 }
331
332 lappend _telnet_autocomplete_skip remote_bitbang_port
333 proc remote_bitbang_port args {
334 echo "DEPRECATED! use 'remote_bitbang port' not 'remote_bitbang_port'"
335 eval remote_bitbang port $args
336 }
337
338 lappend _telnet_autocomplete_skip openjtag_device_desc
339 proc openjtag_device_desc args {
340 echo "DEPRECATED! use 'openjtag device_desc' not 'openjtag_device_desc'"
341 eval openjtag device_desc $args
342 }
343
344 lappend _telnet_autocomplete_skip openjtag_variant
345 proc openjtag_variant args {
346 echo "DEPRECATED! use 'openjtag variant' not 'openjtag_variant'"
347 eval openjtag variant $args
348 }
349
350 lappend _telnet_autocomplete_skip parport_port
351 proc parport_port args {
352 echo "DEPRECATED! use 'parport port' not 'parport_port'"
353 eval parport port $args
354 }
355
356 lappend _telnet_autocomplete_skip parport_cable
357 proc parport_cable args {
358 echo "DEPRECATED! use 'parport cable' not 'parport_cable'"
359 eval parport cable $args
360 }
361
362 lappend _telnet_autocomplete_skip parport_write_on_exit
363 proc parport_write_on_exit args {
364 echo "DEPRECATED! use 'parport write_on_exit' not 'parport_write_on_exit'"
365 eval parport write_on_exit $args
366 }
367
368 lappend _telnet_autocomplete_skip parport_toggling_time
369 proc parport_toggling_time args {
370 echo "DEPRECATED! use 'parport toggling_time' not 'parport_toggling_time'"
371 eval parport toggling_time $args
372 }
373
374 lappend _telnet_autocomplete_skip jtag_dpi_set_port
375 proc jtag_dpi_set_port args {
376 echo "DEPRECATED! use 'jtag_dpi set_port' not 'jtag_dpi_set_port'"
377 eval jtag_dpi set_port $args
378 }
379
380 lappend _telnet_autocomplete_skip jtag_dpi_set_address
381 proc jtag_dpi_set_address args {
382 echo "DEPRECATED! use 'jtag_dpi set_address' not 'jtag_dpi_set_address'"
383 eval jtag_dpi set_address $args
384 }
385
386 lappend _telnet_autocomplete_skip jtag_vpi_set_port
387 proc jtag_vpi_set_port args {
388 echo "DEPRECATED! use 'jtag_vpi set_port' not 'jtag_vpi_set_port'"
389 eval jtag_vpi set_port $args
390 }
391
392 lappend _telnet_autocomplete_skip jtag_vpi_set_address
393 proc jtag_vpi_set_address args {
394 echo "DEPRECATED! use 'jtag_vpi set_address' not 'jtag_vpi_set_address'"
395 eval jtag_vpi set_address $args
396 }
397
398 lappend _telnet_autocomplete_skip jtag_vpi_stop_sim_on_exit
399 proc jtag_vpi_stop_sim_on_exit args {
400 echo "DEPRECATED! use 'jtag_vpi stop_sim_on_exit' not 'jtag_vpi_stop_sim_on_exit'"
401 eval jtag_vpi stop_sim_on_exit $args
402 }
403
404 lappend _telnet_autocomplete_skip presto_serial
405 proc presto_serial args {
406 echo "DEPRECATED! use 'presto serial' not 'presto_serial'"
407 eval presto serial $args
408 }
409
410 lappend _telnet_autocomplete_skip xlnx_pcie_xvc_config
411 proc xlnx_pcie_xvc_config args {
412 echo "DEPRECATED! use 'xlnx_pcie_xvc config' not 'xlnx_pcie_xvc_config'"
413 eval xlnx_pcie_xvc config $args
414 }
415
416 lappend _telnet_autocomplete_skip ulink_download_firmware
417 proc ulink_download_firmware args {
418 echo "DEPRECATED! use 'ulink download_firmware' not 'ulink_download_firmware'"
419 eval ulink download_firmware $args
420 }
421
422 lappend _telnet_autocomplete_skip vsllink_usb_vid
423 proc vsllink_usb_vid args {
424 echo "DEPRECATED! use 'vsllink usb_vid' not 'vsllink_usb_vid'"
425 eval vsllink usb_vid $args
426 }
427
428 lappend _telnet_autocomplete_skip vsllink_usb_pid
429 proc vsllink_usb_pid args {
430 echo "DEPRECATED! use 'vsllink usb_pid' not 'vsllink_usb_pid'"
431 eval vsllink usb_pid $args
432 }
433
434 lappend _telnet_autocomplete_skip vsllink_usb_serial
435 proc vsllink_usb_serial args {
436 echo "DEPRECATED! use 'adapter serial' not 'vsllink_usb_serial'"
437 eval adapter serial $args
438 }
439
440 lappend _telnet_autocomplete_skip vsllink_usb_bulkin
441 proc vsllink_usb_bulkin args {
442 echo "DEPRECATED! use 'vsllink usb_bulkin' not 'vsllink_usb_bulkin'"
443 eval vsllink usb_bulkin $args
444 }
445
446 lappend _telnet_autocomplete_skip vsllink_usb_bulkout
447 proc vsllink_usb_bulkout args {
448 echo "DEPRECATED! use 'vsllink usb_bulkout' not 'vsllink_usb_bulkout'"
449 eval vsllink usb_bulkout $args
450 }
451
452 lappend _telnet_autocomplete_skip vsllink_usb_interface
453 proc vsllink_usb_interface args {
454 echo "DEPRECATED! use 'vsllink usb_interface' not 'vsllink_usb_interface'"
455 eval vsllink usb_interface $args
456 }
457
458 lappend _telnet_autocomplete_skip bcm2835gpio_jtag_nums
459 proc bcm2835gpio_jtag_nums args {
460 echo "DEPRECATED! use 'bcm2835gpio jtag_nums' not 'bcm2835gpio_jtag_nums'"
461 eval bcm2835gpio jtag_nums $args
462 }
463
464 lappend _telnet_autocomplete_skip bcm2835gpio_tck_num
465 proc bcm2835gpio_tck_num args {
466 echo "DEPRECATED! use 'bcm2835gpio tck_num' not 'bcm2835gpio_tck_num'"
467 eval bcm2835gpio tck_num $args
468 }
469
470 lappend _telnet_autocomplete_skip bcm2835gpio_tms_num
471 proc bcm2835gpio_tms_num args {
472 echo "DEPRECATED! use 'bcm2835gpio tms_num' not 'bcm2835gpio_tms_num'"
473 eval bcm2835gpio tms_num $args
474 }
475
476 lappend _telnet_autocomplete_skip bcm2835gpio_tdo_num
477 proc bcm2835gpio_tdo_num args {
478 echo "DEPRECATED! use 'bcm2835gpio tdo_num' not 'bcm2835gpio_tdo_num'"
479 eval bcm2835gpio tdo_num $args
480 }
481
482 lappend _telnet_autocomplete_skip bcm2835gpio_tdi_num
483 proc bcm2835gpio_tdi_num args {
484 echo "DEPRECATED! use 'bcm2835gpio tdi_num' not 'bcm2835gpio_tdi_num'"
485 eval bcm2835gpio tdi_num $args
486 }
487
488 lappend _telnet_autocomplete_skip bcm2835gpio_swd_nums
489 proc bcm2835gpio_swd_nums args {
490 echo "DEPRECATED! use 'bcm2835gpio swd_nums' not 'bcm2835gpio_swd_nums'"
491 eval bcm2835gpio swd_nums $args
492 }
493
494 lappend _telnet_autocomplete_skip bcm2835gpio_swclk_num
495 proc bcm2835gpio_swclk_num args {
496 echo "DEPRECATED! use 'bcm2835gpio swclk_num' not 'bcm2835gpio_swclk_num'"
497 eval bcm2835gpio swclk_num $args
498 }
499
500 lappend _telnet_autocomplete_skip bcm2835gpio_swdio_num
501 proc bcm2835gpio_swdio_num args {
502 echo "DEPRECATED! use 'bcm2835gpio swdio_num' not 'bcm2835gpio_swdio_num'"
503 eval bcm2835gpio swdio_num $args
504 }
505
506 lappend _telnet_autocomplete_skip bcm2835gpio_swdio_dir_num
507 proc bcm2835gpio_swdio_dir_num args {
508 echo "DEPRECATED! use 'bcm2835gpio swdio_dir_num' not 'bcm2835gpio_swdio_dir_num'"
509 eval bcm2835gpio swdio_dir_num $args
510 }
511
512 lappend _telnet_autocomplete_skip bcm2835gpio_srst_num
513 proc bcm2835gpio_srst_num args {
514 echo "DEPRECATED! use 'bcm2835gpio srst_num' not 'bcm2835gpio_srst_num'"
515 eval bcm2835gpio srst_num $args
516 }
517
518 lappend _telnet_autocomplete_skip bcm2835gpio_trst_num
519 proc bcm2835gpio_trst_num args {
520 echo "DEPRECATED! use 'bcm2835gpio trst_num' not 'bcm2835gpio_trst_num'"
521 eval bcm2835gpio trst_num $args
522 }
523
524 lappend _telnet_autocomplete_skip bcm2835gpio_speed_coeffs
525 proc bcm2835gpio_speed_coeffs args {
526 echo "DEPRECATED! use 'bcm2835gpio speed_coeffs' not 'bcm2835gpio_speed_coeffs'"
527 eval bcm2835gpio speed_coeffs $args
528 }
529
530 lappend _telnet_autocomplete_skip bcm2835gpio_peripheral_base
531 proc bcm2835gpio_peripheral_base args {
532 echo "DEPRECATED! use 'bcm2835gpio peripheral_base' not 'bcm2835gpio_peripheral_base'"
533 eval bcm2835gpio peripheral_base $args
534 }
535
536 lappend _telnet_autocomplete_skip linuxgpiod_jtag_nums
537 proc linuxgpiod_jtag_nums args {
538 eval adapter_gpio_jtag_nums $args
539 }
540
541 lappend _telnet_autocomplete_skip linuxgpiod_tck_num
542 proc linuxgpiod_tck_num args {
543 eval adapter_gpio_helper tck $args
544 }
545
546 lappend _telnet_autocomplete_skip linuxgpiod_tms_num
547 proc linuxgpiod_tms_num args {
548 eval adapter_gpio_helper tms $args
549 }
550
551 lappend _telnet_autocomplete_skip linuxgpiod_tdo_num
552 proc linuxgpiod_tdo_num args {
553 eval adapter_gpio_helper tdo $args
554 }
555
556 lappend _telnet_autocomplete_skip linuxgpiod_tdi_num
557 proc linuxgpiod_tdi_num args {
558 eval adapter_gpio_helper tdi $args
559 }
560
561 lappend _telnet_autocomplete_skip linuxgpiod_srst_num
562 proc linuxgpiod_srst_num args {
563 eval adapter_gpio_helper srst $args
564 }
565
566 lappend _telnet_autocomplete_skip linuxgpiod_trst_num
567 proc linuxgpiod_trst_num args {
568 eval adapter_gpio_helper trst $args
569 }
570
571 lappend _telnet_autocomplete_skip linuxgpiod_swd_nums
572 proc linuxgpiod_swd_nums args {
573 eval adapter_gpio_swd_nums $args
574 }
575
576 lappend _telnet_autocomplete_skip linuxgpiod_swclk_num
577 proc linuxgpiod_swclk_num args {
578 eval adapter_gpio_helper swclk $args
579 }
580
581 lappend _telnet_autocomplete_skip linuxgpiod_swdio_num
582 proc linuxgpiod_swdio_num args {
583 eval adapter_gpio_helper swdio $args
584 }
585
586 lappend _telnet_autocomplete_skip linuxgpiod_led_num
587 proc linuxgpiod_led_num args {
588 eval adapter_gpio_helper led $args
589 }
590
591 lappend _telnet_autocomplete_skip linuxgpiod_gpiochip
592 proc linuxgpiod_gpiochip args {
593 echo "DEPRECATED! use 'adapter <signal_name> -chip' not 'linuxgpiod_gpiochip'"
594 switch [llength $args] {
595 0 { }
596 1 {
597 foreach sig_name {tck tms tdi tdo trst srst swclk swdio swdio_dir led} {
598 eval adapter gpio $sig_name -chip $args
599 }
600 }
601 default {return -code 1 -level 1 "linuxgpiod_gpiochip: syntax error"}
602 }
603 eval adapter gpio
604 }
605
606 lappend _telnet_autocomplete_skip sysfsgpio_jtag_nums
607 proc sysfsgpio_jtag_nums args {
608 echo "DEPRECATED! use 'sysfsgpio jtag_nums' not 'sysfsgpio_jtag_nums'"
609 eval sysfsgpio jtag_nums $args
610 }
611
612 lappend _telnet_autocomplete_skip sysfsgpio_tck_num
613 proc sysfsgpio_tck_num args {
614 echo "DEPRECATED! use 'sysfsgpio tck_num' not 'sysfsgpio_tck_num'"
615 eval sysfsgpio tck_num $args
616 }
617
618 lappend _telnet_autocomplete_skip sysfsgpio_tms_num
619 proc sysfsgpio_tms_num args {
620 echo "DEPRECATED! use 'sysfsgpio tms_num' not 'sysfsgpio_tms_num'"
621 eval sysfsgpio tms_num $args
622 }
623
624 lappend _telnet_autocomplete_skip sysfsgpio_tdo_num
625 proc sysfsgpio_tdo_num args {
626 echo "DEPRECATED! use 'sysfsgpio tdo_num' not 'sysfsgpio_tdo_num'"
627 eval sysfsgpio tdo_num $args
628 }
629
630 lappend _telnet_autocomplete_skip sysfsgpio_tdi_num
631 proc sysfsgpio_tdi_num args {
632 echo "DEPRECATED! use 'sysfsgpio tdi_num' not 'sysfsgpio_tdi_num'"
633 eval sysfsgpio tdi_num $args
634 }
635
636 lappend _telnet_autocomplete_skip sysfsgpio_srst_num
637 proc sysfsgpio_srst_num args {
638 echo "DEPRECATED! use 'sysfsgpio srst_num' not 'sysfsgpio_srst_num'"
639 eval sysfsgpio srst_num $args
640 }
641
642 lappend _telnet_autocomplete_skip sysfsgpio_trst_num
643 proc sysfsgpio_trst_num args {
644 echo "DEPRECATED! use 'sysfsgpio trst_num' not 'sysfsgpio_trst_num'"
645 eval sysfsgpio trst_num $args
646 }
647
648 lappend _telnet_autocomplete_skip sysfsgpio_swd_nums
649 proc sysfsgpio_swd_nums args {
650 echo "DEPRECATED! use 'sysfsgpio swd_nums' not 'sysfsgpio_swd_nums'"
651 eval sysfsgpio swd_nums $args
652 }
653
654 lappend _telnet_autocomplete_skip sysfsgpio_swclk_num
655 proc sysfsgpio_swclk_num args {
656 echo "DEPRECATED! use 'sysfsgpio swclk_num' not 'sysfsgpio_swclk_num'"
657 eval sysfsgpio swclk_num $args
658 }
659
660 lappend _telnet_autocomplete_skip sysfsgpio_swdio_num
661 proc sysfsgpio_swdio_num args {
662 echo "DEPRECATED! use 'sysfsgpio swdio_num' not 'sysfsgpio_swdio_num'"
663 eval sysfsgpio swdio_num $args
664 }
665
666 lappend _telnet_autocomplete_skip buspirate_adc
667 proc buspirate_adc args {
668 echo "DEPRECATED! use 'buspirate adc' not 'buspirate_adc'"
669 eval buspirate adc $args
670 }
671
672 lappend _telnet_autocomplete_skip buspirate_vreg
673 proc buspirate_vreg args {
674 echo "DEPRECATED! use 'buspirate vreg' not 'buspirate_vreg'"
675 eval buspirate vreg $args
676 }
677
678 lappend _telnet_autocomplete_skip buspirate_pullup
679 proc buspirate_pullup args {
680 echo "DEPRECATED! use 'buspirate pullup' not 'buspirate_pullup'"
681 eval buspirate pullup $args
682 }
683
684 lappend _telnet_autocomplete_skip buspirate_led
685 proc buspirate_led args {
686 echo "DEPRECATED! use 'buspirate led' not 'buspirate_led'"
687 eval buspirate led $args
688 }
689
690 lappend _telnet_autocomplete_skip buspirate_speed
691 proc buspirate_speed args {
692 echo "DEPRECATED! use 'buspirate speed' not 'buspirate_speed'"
693 eval buspirate speed $args
694 }
695
696 lappend _telnet_autocomplete_skip buspirate_mode
697 proc buspirate_mode args {
698 echo "DEPRECATED! use 'buspirate mode' not 'buspirate_mode'"
699 eval buspirate mode $args
700 }
701
702 lappend _telnet_autocomplete_skip buspirate_port
703 proc buspirate_port args {
704 echo "DEPRECATED! use 'buspirate port' not 'buspirate_port'"
705 eval buspirate port $args
706 }
707
708 lappend _telnet_autocomplete_skip usb_blaster_device_desc
709 proc usb_blaster_device_desc args {
710 echo "DEPRECATED! use 'usb_blaster device_desc' not 'usb_blaster_device_desc'"
711 eval usb_blaster device_desc $args
712 }
713
714 lappend _telnet_autocomplete_skip usb_blaster_vid_pid
715 proc usb_blaster_vid_pid args {
716 echo "DEPRECATED! use 'usb_blaster vid_pid' not 'usb_blaster_vid_pid'"
717 eval usb_blaster vid_pid $args
718 }
719
720 lappend _telnet_autocomplete_skip usb_blaster_lowlevel_driver
721 proc usb_blaster_lowlevel_driver args {
722 echo "DEPRECATED! use 'usb_blaster lowlevel_driver' not 'usb_blaster_lowlevel_driver'"
723 eval usb_blaster lowlevel_driver $args
724 }
725
726 lappend _telnet_autocomplete_skip usb_blaster_pin
727 proc usb_blaster_pin args {
728 echo "DEPRECATED! use 'usb_blaster pin' not 'usb_blaster_pin'"
729 eval usb_blaster pin $args
730 }
731
732 lappend _telnet_autocomplete_skip usb_blaster_firmware
733 proc usb_blaster_firmware args {
734 echo "DEPRECATED! use 'usb_blaster firmware' not 'usb_blaster_firmware'"
735 eval usb_blaster firmware $args
736 }
737
738 lappend _telnet_autocomplete_skip ft232r_serial_desc
739 proc ft232r_serial_desc args {
740 echo "DEPRECATED! use 'adapter serial_desc' not 'ft232r_serial_desc'"
741 eval adapter serial_desc $args
742 }
743
744 lappend _telnet_autocomplete_skip ft232r_vid_pid
745 proc ft232r_vid_pid args {
746 echo "DEPRECATED! use 'ft232r vid_pid' not 'ft232r_vid_pid'"
747 eval ft232r vid_pid $args
748 }
749
750 lappend _telnet_autocomplete_skip ft232r_jtag_nums
751 proc ft232r_jtag_nums args {
752 echo "DEPRECATED! use 'ft232r jtag_nums' not 'ft232r_jtag_nums'"
753 eval ft232r jtag_nums $args
754 }
755
756 lappend _telnet_autocomplete_skip ft232r_tck_num
757 proc ft232r_tck_num args {
758 echo "DEPRECATED! use 'ft232r tck_num' not 'ft232r_tck_num'"
759 eval ft232r tck_num $args
760 }
761
762 lappend _telnet_autocomplete_skip ft232r_tms_num
763 proc ft232r_tms_num args {
764 echo "DEPRECATED! use 'ft232r tms_num' not 'ft232r_tms_num'"
765 eval ft232r tms_num $args
766 }
767
768 lappend _telnet_autocomplete_skip ft232r_tdo_num
769 proc ft232r_tdo_num args {
770 echo "DEPRECATED! use 'ft232r tdo_num' not 'ft232r_tdo_num'"
771 eval ft232r tdo_num $args
772 }
773
774 lappend _telnet_autocomplete_skip ft232r_tdi_num
775 proc ft232r_tdi_num args {
776 echo "DEPRECATED! use 'ft232r tdi_num' not 'ft232r_tdi_num'"
777 eval ft232r tdi_num $args
778 }
779
780 lappend _telnet_autocomplete_skip ft232r_srst_num
781 proc ft232r_srst_num args {
782 echo "DEPRECATED! use 'ft232r srst_num' not 'ft232r_srst_num'"
783 eval ft232r srst_num $args
784 }
785
786 lappend _telnet_autocomplete_skip ft232r_trst_num
787 proc ft232r_trst_num args {
788 echo "DEPRECATED! use 'ft232r trst_num' not 'ft232r_trst_num'"
789 eval ft232r trst_num $args
790 }
791
792 lappend _telnet_autocomplete_skip ft232r_restore_serial
793 proc ft232r_restore_serial args {
794 echo "DEPRECATED! use 'ft232r restore_serial' not 'ft232r_restore_serial'"
795 eval ft232r restore_serial $args
796 }
797
798 lappend _telnet_autocomplete_skip "aice serial"
799 proc "aice serial" {args} {
800 echo "DEPRECATED! use 'adapter serial' not 'aice serial'"
801 eval adapter serial $args
802 }
803
804 lappend _telnet_autocomplete_skip cmsis_dap_serial
805 proc cmsis_dap_serial args {
806 echo "DEPRECATED! use 'adapter serial' not 'cmsis_dap_serial'"
807 eval adapter serial $args
808 }
809
810 lappend _telnet_autocomplete_skip "ft232r serial_desc"
811 proc "ft232r serial_desc" {args} {
812 echo "DEPRECATED! use 'adapter serial' not 'ft232r serial_desc'"
813 eval adapter serial $args
814 }
815
816 lappend _telnet_autocomplete_skip "ftdi serial"
817 proc "ftdi serial" {args} {
818 echo "DEPRECATED! use 'adapter serial' not 'ftdi serial'"
819 eval adapter serial $args
820 }
821
822 lappend _telnet_autocomplete_skip hla_serial
823 proc hla_serial args {
824 echo "DEPRECATED! use 'adapter serial' not 'hla_serial'"
825 eval adapter serial $args
826 }
827
828 lappend _telnet_autocomplete_skip "jlink serial"
829 proc "jlink serial" {args} {
830 echo "DEPRECATED! use 'adapter serial' not 'jlink serial'"
831 eval adapter serial $args
832 }
833
834 lappend _telnet_autocomplete_skip kitprog_serial
835 proc kitprog_serial args {
836 echo "DEPRECATED! use 'adapter serial' not 'kitprog_serial'"
837 eval adapter serial $args
838 }
839
840 lappend _telnet_autocomplete_skip "presto serial"
841 proc "presto serial" {args} {
842 echo "DEPRECATED! use 'adapter serial' not 'presto serial'"
843 eval adapter serial $args
844 }
845
846 lappend _telnet_autocomplete_skip "st-link serial"
847 proc "st-link serial" {args} {
848 echo "DEPRECATED! use 'adapter serial' not 'st-link serial'"
849 eval adapter serial $args
850 }
851
852 lappend _telnet_autocomplete_skip "vsllink usb_serial"
853 proc "vsllink usb_serial" {args} {
854 echo "DEPRECATED! use 'adapter serial' not 'vsllink usb_serial'"
855 eval adapter serial $args
856 }
857
858 lappend _telnet_autocomplete_skip "xds110 serial"
859 proc "xds110 serial" {args} {
860 echo "DEPRECATED! use 'adapter serial' not 'xds110 serial'"
861 eval adapter serial $args
862 }
863
864 lappend _telnet_autocomplete_skip linuxgpiod
865 # linuxgpiod command completely removed, this is required for the sub-commands to work
866 proc linuxgpiod {subcommand args} {
867 eval {"linuxgpiod $subcommand"} $args
868 }
869
870 lappend _telnet_autocomplete_skip "linuxgpiod tck_num"
871 proc "linuxgpiod tck_num" {args} {
872 eval adapter_gpio_helper tck $args
873 }
874
875 lappend _telnet_autocomplete_skip "linuxgpiod tms_num"
876 proc "linuxgpiod tms_num" {args} {
877 eval adapter_gpio_helper tms $args
878 }
879
880 lappend _telnet_autocomplete_skip "linuxgpiod tdi_num"
881 proc "linuxgpiod tdi_num" {args} {
882 eval adapter_gpio_helper tdi $args
883 }
884
885 lappend _telnet_autocomplete_skip "linuxgpiod tdo_num"
886 proc "linuxgpiod tdo_num" {args} {
887 eval adapter_gpio_helper tdo $args
888 }
889
890 lappend _telnet_autocomplete_skip "linuxgpiod trst_num"
891 proc "linuxgpiod trst_num" {args} {
892 eval adapter_gpio_helper trst $args
893 }
894
895 lappend _telnet_autocomplete_skip "linuxgpiod srst_num"
896 proc "linuxgpiod srst_num" {args} {
897 eval adapter_gpio_helper srst $args
898 }
899
900 lappend _telnet_autocomplete_skip "linuxgpiod swclk_num"
901 proc "linuxgpiod swclk_num" {args} {
902 eval adapter_gpio_helper swclk $args
903 }
904
905 lappend _telnet_autocomplete_skip "linuxgpiod swdio_num"
906 proc "linuxgpiod swdio_num" {args} {
907 eval adapter_gpio_helper swdio $args
908 }
909
910 lappend _telnet_autocomplete_skip "linuxgpiod swdio_dir_num"
911 proc "linuxgpiod swdio_dir_num" {args} {
912 eval adapter_gpio_helper swdio_dir $args
913 }
914
915 lappend _telnet_autocomplete_skip "linuxgpiod led_num"
916 proc "linuxgpiod led_num" {args} {
917 eval adapter_gpio_helper led $args
918 }
919
920 lappend _telnet_autocomplete_skip "linuxgpiod gpiochip"
921 proc "linuxgpiod gpiochip" {num} {
922 echo "DEPRECATED! use 'adapter <signal_name> -chip' not 'linuxgpiod gpiochip'"
923 foreach sig_name {tck tms tdi tdo trst srst swclk swdio swdio_dir led} {
924 eval adapter gpio $sig_name -chip $num
925 }
926 eval adapter gpio
927 }
928
929 lappend _telnet_autocomplete_skip "linuxgpiod jtag_nums"
930 proc "linuxgpiod jtag_nums" {tck_num tms_num tdi_num tdo_num} {
931 echo "DEPRECATED! use 'adapter gpio tck; adapter gpio tms; adapter gpio tdi; adapter gpio tdo' not 'linuxgpiod jtag_nums'"
932 eval adapter gpio tck $tck_num
933 eval adapter gpio tms $tms_num
934 eval adapter gpio tdi $tdi_num
935 eval adapter gpio tdo $tdo_num
936 }
937
938 lappend _telnet_autocomplete_skip "linuxgpiod swd_nums"
939 proc "linuxgpiod swd_nums" {swclk swdio} {
940 echo "DEPRECATED! use 'adapter gpio swclk; adapter gpio swdio' not 'linuxgpiod jtag_nums'"
941 eval adapter gpio swclk $swclk
942 eval adapter gpio swdio $swdio
943 }
944
945 lappend _telnet_autocomplete_skip "am335xgpio jtag_nums"
946 proc "am335xgpio jtag_nums" {tck_num tms_num tdi_num tdo_num} {
947 echo "DEPRECATED! use 'adapter gpio tck; adapter gpio tms; adapter gpio tdi; adapter gpio tdo' not 'am335xgpio jtag_nums'"
948 eval adapter gpio tck [expr {$tck_num % 32}] -chip [expr {$tck_num / 32}]
949 eval adapter gpio tms [expr {$tms_num % 32}] -chip [expr {$tms_num / 32}]
950 eval adapter gpio tdi [expr {$tdi_num % 32}] -chip [expr {$tdi_num / 32}]
951 eval adapter gpio tdo [expr {$tdo_num % 32}] -chip [expr {$tdo_num / 32}]
952 }
953
954 lappend _telnet_autocomplete_skip "am335xgpio tck_num"
955 proc "am335xgpio tck_num" {num} {
956 echo "DEPRECATED! use 'adapter gpio tck' not 'am335xgpio tck_num'"
957 eval adapter gpio tck [expr {$num % 32}] -chip [expr {$num / 32}]
958 }
959
960 lappend _telnet_autocomplete_skip "am335xgpio tms_num"
961 proc "am335xgpio tms_num" {num} {
962 echo "DEPRECATED! use 'adapter gpio tms' not 'am335xgpio tms_num'"
963 eval adapter gpio tms [expr {$num % 32}] -chip [expr {$num / 32}]
964 }
965
966 lappend _telnet_autocomplete_skip "am335xgpio tdi_num"
967 proc "am335xgpio tdi_num" {num} {
968 echo "DEPRECATED! use 'adapter gpio tdi' not 'am335xgpio tdi_num'"
969 eval adapter gpio tdi [expr {$num % 32}] -chip [expr {$num / 32}]
970 }
971
972 lappend _telnet_autocomplete_skip "am335xgpio tdo_num"
973 proc "am335xgpio tdo_num" {num} {
974 echo "DEPRECATED! use 'adapter gpio tdo' not 'am335xgpio tdo_num'"
975 eval adapter gpio tdo [expr {$num % 32}] -chip [expr {$num / 32}]
976 }
977
978 lappend _telnet_autocomplete_skip "am335xgpio swd_nums"
979 proc "am335xgpio swd_nums" {swclk swdio} {
980 echo "DEPRECATED! use 'adapter gpio swclk; adapter gpio swdio' not 'am335xgpio jtag_nums'"
981 eval adapter gpio swclk [expr {$swclk % 32}] -chip [expr {$swclk / 32}]
982 eval adapter gpio swdio [expr {$swdio % 32}] -chip [expr {$swdio / 32}]
983 }
984
985 lappend _telnet_autocomplete_skip "am335xgpio swclk_num"
986 proc "am335xgpio swclk_num" {num} {
987 echo "DEPRECATED! use 'adapter gpio swclk' not 'am335xgpio swclk_num'"
988 eval adapter gpio swclk [expr {$num % 32}] -chip [expr {$num / 32}]
989 }
990
991 lappend _telnet_autocomplete_skip "am335xgpio swdio_num"
992 proc "am335xgpio swdio_num" {num} {
993 echo "DEPRECATED! use 'adapter gpio swdio' not 'am335xgpio swdio_num'"
994 eval adapter gpio swdio [expr {$num % 32}] -chip [expr {$num / 32}]
995 }
996
997 lappend _telnet_autocomplete_skip "am335xgpio swdio_dir_num"
998 proc "am335xgpio swdio_dir_num" {num} {
999 echo "DEPRECATED! use 'adapter gpio swdio_dir' not 'am335xgpio swdio_dir_num'"
1000 eval adapter gpio swdio_dir [expr {$num % 32}] -chip [expr {$num / 32}]
1001 }
1002
1003 lappend _telnet_autocomplete_skip "am335xgpio swdio_dir_output_state"
1004 proc "am335xgpio swdio_dir_output_state" {state} {
1005 echo "DEPRECATED! use 'adapter gpio swdio_dir -active-high' or 'adapter gpio swdio_dir -active-low', not 'am335xgpio swdio_dir_output_state'"
1006 switch $state {
1007 "high"
1008 {eval adapter gpio swdio_dir -active-high}
1009 "low"
1010 {eval adapter gpio swdio_dir -active-low}
1011 default
1012 {return -code 1 -level 1 "am335xgpio swdio_dir_output_state: syntax error"}
1013 }
1014 }
1015
1016 lappend _telnet_autocomplete_skip "am335xgpio srst_num"
1017 proc "am335xgpio srst_num" {num} {
1018 echo "DEPRECATED! use 'adapter gpio srst' not 'am335xgpio srst_num'"
1019 eval adapter gpio srst [expr {$num % 32}] -chip [expr {$num / 32}]
1020 }
1021
1022 lappend _telnet_autocomplete_skip "am335xgpio trst_num"
1023 proc "am335xgpio trst_num" {num} {
1024 echo "DEPRECATED! use 'adapter gpio trst' not 'am335xgpio trst_num'"
1025 eval adapter gpio trst [expr {$num % 32}] -chip [expr {$num / 32}]
1026 }
1027
1028 lappend _telnet_autocomplete_skip "am335xgpio led_num"
1029 proc "am335xgpio led_num" {num} {
1030 echo "DEPRECATED! use 'adapter gpio led' not 'am335xgpio led_num'"
1031 eval adapter gpio led [expr {$num % 32}] -chip [expr {$num / 32}]
1032 }
1033
1034 lappend _telnet_autocomplete_skip "am335xgpio led_on_state"
1035 proc "am335xgpio led_on_state" {state} {
1036 echo "DEPRECATED! use 'adapter gpio led -active-high' or 'adapter gpio led -active-low', not 'am335xgpio led_on_state'"
1037 switch $state {
1038 "high"
1039 {eval adapter gpio led -active-high}
1040 "low"
1041 {eval adapter gpio led -active-low}
1042 default
1043 {return -code 1 -level 1 "am335xgpio led_on_state: syntax error"}
1044 }
1045 }
1046
1047 # END MIGRATION AIDS

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)