1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2005 by Dominic Rath <Dominic.Rath@gmx.de>
4 * Copyright (C) 2007-2010 Øyvind Harboe <oyvind.harboe@zylin.com>
5 * Copyright (C) 2009 SoftPLC Corporation, http://softplc.com, Dick Hollenbeck <dick@softplc.com>
6 * Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net>
7 * Copyright (C) 2018 Pengutronix, Oleksij Rempel <kernel@pengutronix.de>
16 #include "minidriver.h"
17 #include "interface.h"
18 #include "interfaces.h"
19 #include <transport/transport.h>
27 * Holds support for configuring debug adapters from TCl scripts.
30 struct adapter_driver
*adapter_driver
;
31 const char * const jtag_only
[] = { "jtag", NULL
};
34 * Adapter configuration
42 /* speed to fallback to when RCLK is requested but not supported */
43 static int rclk_fallback_speed_khz
;
44 static enum {CLOCK_MODE_UNSELECTED
, CLOCK_MODE_KHZ
, CLOCK_MODE_RCLK
} clock_mode
;
46 static bool adapter_initialized
;
48 bool is_adapter_initialized(void)
50 return adapter_initialized
;
54 * Do low-level setup like initializing registers, output signals,
57 int adapter_init(struct command_context
*cmd_ctx
)
59 if (is_adapter_initialized())
62 if (!adapter_driver
) {
63 /* nothing was previously specified by "adapter driver" command */
64 LOG_ERROR("Debug Adapter has to be specified, "
65 "see \"adapter driver\" command");
66 return ERROR_JTAG_INVALID_INTERFACE
;
70 retval
= adapter_driver
->init();
71 if (retval
!= ERROR_OK
)
73 adapter_initialized
= true;
75 if (!adapter_driver
->speed
) {
76 LOG_INFO("This adapter doesn't support configurable speed");
80 if (clock_mode
== CLOCK_MODE_UNSELECTED
) {
81 LOG_ERROR("An adapter speed is not selected in the init script."
82 " Insert a call to \"adapter speed\" or \"jtag_rclk\" to proceed.");
83 return ERROR_JTAG_INIT_FAILED
;
86 int requested_khz
= jtag_get_speed_khz();
87 int actual_khz
= requested_khz
;
88 int jtag_speed_var
= 0;
89 retval
= jtag_get_speed(&jtag_speed_var
);
90 if (retval
!= ERROR_OK
)
92 retval
= adapter_driver
->speed(jtag_speed_var
);
93 if (retval
!= ERROR_OK
)
95 retval
= jtag_get_speed_readable(&actual_khz
);
96 if (retval
!= ERROR_OK
)
97 LOG_INFO("adapter-specific clock speed value %d", jtag_speed_var
);
98 else if (actual_khz
) {
99 /* Adaptive clocking -- JTAG-specific */
100 if ((clock_mode
== CLOCK_MODE_RCLK
)
101 || ((clock_mode
== CLOCK_MODE_KHZ
) && !requested_khz
)) {
102 LOG_INFO("RCLK (adaptive clock speed) not supported - fallback to %d kHz"
105 LOG_INFO("clock speed %d kHz", actual_khz
);
107 LOG_INFO("RCLK (adaptive clock speed)");
112 int adapter_quit(void)
114 if (is_adapter_initialized() && adapter_driver
->quit
) {
115 /* close the JTAG interface */
116 int result
= adapter_driver
->quit();
117 if (result
!= ERROR_OK
)
118 LOG_ERROR("failed: %d", result
);
121 struct jtag_tap
*t
= jtag_all_taps();
123 struct jtag_tap
*n
= t
->next_tap
;
131 unsigned jtag_get_speed_khz(void)
136 static int adapter_khz_to_speed(unsigned khz
, int *speed
)
138 LOG_DEBUG("convert khz to interface specific speed value");
140 if (!is_adapter_initialized())
142 LOG_DEBUG("have interface set up");
143 if (!adapter_driver
->khz
) {
144 LOG_ERROR("Translation from khz to jtag_speed not implemented");
148 int retval
= adapter_driver
->khz(jtag_get_speed_khz(), &speed_div1
);
149 if (retval
!= ERROR_OK
)
155 static int jtag_rclk_to_speed(unsigned fallback_speed_khz
, int *speed
)
157 int retval
= adapter_khz_to_speed(0, speed
);
158 if ((retval
!= ERROR_OK
) && fallback_speed_khz
) {
159 LOG_DEBUG("trying fallback speed...");
160 retval
= adapter_khz_to_speed(fallback_speed_khz
, speed
);
165 static int jtag_set_speed(int speed
)
167 /* this command can be called during CONFIG,
168 * in which case jtag isn't initialized */
169 return is_adapter_initialized() ? adapter_driver
->speed(speed
) : ERROR_OK
;
172 int jtag_config_khz(unsigned khz
)
174 LOG_DEBUG("handle jtag khz");
175 clock_mode
= CLOCK_MODE_KHZ
;
177 int retval
= adapter_khz_to_speed(khz
, &speed
);
178 return (retval
!= ERROR_OK
) ? retval
: jtag_set_speed(speed
);
181 int jtag_config_rclk(unsigned fallback_speed_khz
)
183 LOG_DEBUG("handle jtag rclk");
184 clock_mode
= CLOCK_MODE_RCLK
;
185 rclk_fallback_speed_khz
= fallback_speed_khz
;
187 int retval
= jtag_rclk_to_speed(fallback_speed_khz
, &speed
);
188 return (retval
!= ERROR_OK
) ? retval
: jtag_set_speed(speed
);
191 int jtag_get_speed(int *speed
)
193 switch (clock_mode
) {
195 adapter_khz_to_speed(jtag_get_speed_khz(), speed
);
197 case CLOCK_MODE_RCLK
:
198 jtag_rclk_to_speed(rclk_fallback_speed_khz
, speed
);
201 LOG_ERROR("BUG: unknown jtag clock mode");
207 int jtag_get_speed_readable(int *khz
)
209 int jtag_speed_var
= 0;
210 int retval
= jtag_get_speed(&jtag_speed_var
);
211 if (retval
!= ERROR_OK
)
213 if (!is_adapter_initialized())
215 if (!adapter_driver
->speed_div
) {
216 LOG_ERROR("Translation from jtag_speed to khz not implemented");
219 return adapter_driver
->speed_div(jtag_speed_var
, khz
);
224 * 2 * 7 chars: max 7 ports
225 * 1 char: test for overflow
229 #define USB_MAX_LOCATION_LENGTH 16
231 #ifdef HAVE_LIBUSB_GET_PORT_NUMBERS
232 static void adapter_usb_set_location(const char *location
)
234 if (strnlen(location
, USB_MAX_LOCATION_LENGTH
) == USB_MAX_LOCATION_LENGTH
)
235 LOG_WARNING("usb location string is too long!!");
237 free(adapter_config
.usb_location
);
239 adapter_config
.usb_location
= strndup(location
, USB_MAX_LOCATION_LENGTH
);
241 #endif /* HAVE_LIBUSB_GET_PORT_NUMBERS */
243 const char *adapter_usb_get_location(void)
245 return adapter_config
.usb_location
;
248 bool adapter_usb_location_equal(uint8_t dev_bus
, uint8_t *port_path
, size_t path_len
)
250 size_t path_step
, string_length
;
254 if (!adapter_usb_get_location())
257 /* strtok need non const char */
258 loc
= strndup(adapter_usb_get_location(), USB_MAX_LOCATION_LENGTH
);
259 string_length
= strnlen(loc
, USB_MAX_LOCATION_LENGTH
);
261 ptr
= strtok(loc
, "-");
263 LOG_WARNING("no '-' in usb path\n");
267 string_length
-= strnlen(ptr
, string_length
);
268 /* check bus mismatch */
269 if (atoi(ptr
) != dev_bus
)
273 while (path_step
< path_len
) {
274 ptr
= strtok(NULL
, ".");
276 /* no more tokens in path */
280 /* path mismatch at some step */
281 if (path_step
< path_len
&& atoi(ptr
) != port_path
[path_step
])
285 string_length
-= strnlen(ptr
, string_length
) + 1;
288 /* walked the full path, all elements match */
289 if (path_step
== path_len
&& !string_length
)
297 static int jim_adapter_name(Jim_Interp
*interp
, int argc
, Jim_Obj
* const *argv
)
299 struct jim_getopt_info goi
;
300 jim_getopt_setup(&goi
, interp
, argc
-1, argv
+ 1);
302 /* return the name of the interface */
303 /* TCL code might need to know the exact type... */
304 /* FUTURE: we allow this as a means to "set" the interface. */
306 Jim_WrongNumArgs(goi
.interp
, 1, goi
.argv
-1, "(no params)");
309 const char *name
= adapter_driver
? adapter_driver
->name
: NULL
;
310 Jim_SetResultString(goi
.interp
, name
? name
: "undefined", -1);
314 COMMAND_HANDLER(adapter_transports_command
)
319 retval
= CALL_COMMAND_HANDLER(transport_list_parse
, &transports
);
320 if (retval
!= ERROR_OK
)
323 retval
= allow_transports(CMD_CTX
, (const char **)transports
);
325 if (retval
!= ERROR_OK
) {
326 for (unsigned i
= 0; transports
[i
]; i
++)
333 COMMAND_HANDLER(handle_adapter_list_command
)
335 if (strcmp(CMD_NAME
, "list") == 0 && CMD_ARGC
> 0)
336 return ERROR_COMMAND_SYNTAX_ERROR
;
338 command_print(CMD
, "The following debug adapters are available:");
339 for (unsigned i
= 0; adapter_drivers
[i
]; i
++) {
340 const char *name
= adapter_drivers
[i
]->name
;
341 command_print(CMD
, "%u: %s", i
+ 1, name
);
347 COMMAND_HANDLER(handle_adapter_driver_command
)
351 /* check whether the interface is already configured */
352 if (adapter_driver
) {
353 LOG_WARNING("Interface already configured, ignoring");
357 /* interface name is a mandatory argument */
358 if (CMD_ARGC
!= 1 || CMD_ARGV
[0][0] == '\0')
359 return ERROR_COMMAND_SYNTAX_ERROR
;
361 for (unsigned i
= 0; adapter_drivers
[i
]; i
++) {
362 if (strcmp(CMD_ARGV
[0], adapter_drivers
[i
]->name
) != 0)
365 if (adapter_drivers
[i
]->commands
) {
366 retval
= register_commands(CMD_CTX
, NULL
,
367 adapter_drivers
[i
]->commands
);
368 if (retval
!= ERROR_OK
)
372 adapter_driver
= adapter_drivers
[i
];
374 return allow_transports(CMD_CTX
, adapter_driver
->transports
);
377 /* no valid interface was found (i.e. the configuration option,
378 * didn't match one of the compiled-in interfaces
380 LOG_ERROR("The specified debug interface was not found (%s)",
382 CALL_COMMAND_HANDLER(handle_adapter_list_command
);
383 return ERROR_JTAG_INVALID_INTERFACE
;
386 COMMAND_HANDLER(handle_reset_config_command
)
391 /* Original versions cared about the order of these tokens:
392 * reset_config signals [combination [trst_type [srst_type]]]
393 * They also clobbered the previous configuration even on error.
395 * Here we don't care about the order, and only change values
396 * which have been explicitly specified.
398 for (; CMD_ARGC
; CMD_ARGC
--, CMD_ARGV
++) {
403 m
= RESET_SRST_NO_GATING
;
404 if (strcmp(*CMD_ARGV
, "srst_gates_jtag") == 0)
405 /* default: don't use JTAG while SRST asserted */;
406 else if (strcmp(*CMD_ARGV
, "srst_nogate") == 0)
407 tmp
= RESET_SRST_NO_GATING
;
411 LOG_ERROR("extra reset_config %s spec (%s)",
412 "gating", *CMD_ARGV
);
413 return ERROR_COMMAND_SYNTAX_ERROR
;
419 m
= RESET_HAS_TRST
| RESET_HAS_SRST
;
420 if (strcmp(*CMD_ARGV
, "none") == 0)
422 else if (strcmp(*CMD_ARGV
, "trst_only") == 0)
423 tmp
= RESET_HAS_TRST
;
424 else if (strcmp(*CMD_ARGV
, "srst_only") == 0)
425 tmp
= RESET_HAS_SRST
;
426 else if (strcmp(*CMD_ARGV
, "trst_and_srst") == 0)
427 tmp
= RESET_HAS_TRST
| RESET_HAS_SRST
;
431 LOG_ERROR("extra reset_config %s spec (%s)",
432 "signal", *CMD_ARGV
);
433 return ERROR_COMMAND_SYNTAX_ERROR
;
438 /* combination (options for broken wiring) */
439 m
= RESET_SRST_PULLS_TRST
| RESET_TRST_PULLS_SRST
;
440 if (strcmp(*CMD_ARGV
, "separate") == 0)
441 /* separate reset lines - default */;
442 else if (strcmp(*CMD_ARGV
, "srst_pulls_trst") == 0)
443 tmp
|= RESET_SRST_PULLS_TRST
;
444 else if (strcmp(*CMD_ARGV
, "trst_pulls_srst") == 0)
445 tmp
|= RESET_TRST_PULLS_SRST
;
446 else if (strcmp(*CMD_ARGV
, "combined") == 0)
447 tmp
|= RESET_SRST_PULLS_TRST
| RESET_TRST_PULLS_SRST
;
451 LOG_ERROR("extra reset_config %s spec (%s)",
452 "combination", *CMD_ARGV
);
453 return ERROR_COMMAND_SYNTAX_ERROR
;
458 /* trst_type (NOP without HAS_TRST) */
459 m
= RESET_TRST_OPEN_DRAIN
;
460 if (strcmp(*CMD_ARGV
, "trst_open_drain") == 0)
461 tmp
|= RESET_TRST_OPEN_DRAIN
;
462 else if (strcmp(*CMD_ARGV
, "trst_push_pull") == 0)
463 /* push/pull from adapter - default */;
467 LOG_ERROR("extra reset_config %s spec (%s)",
468 "trst_type", *CMD_ARGV
);
469 return ERROR_COMMAND_SYNTAX_ERROR
;
474 /* srst_type (NOP without HAS_SRST) */
475 m
= RESET_SRST_PUSH_PULL
;
476 if (strcmp(*CMD_ARGV
, "srst_push_pull") == 0)
477 tmp
|= RESET_SRST_PUSH_PULL
;
478 else if (strcmp(*CMD_ARGV
, "srst_open_drain") == 0)
479 /* open drain from adapter - default */;
483 LOG_ERROR("extra reset_config %s spec (%s)",
484 "srst_type", *CMD_ARGV
);
485 return ERROR_COMMAND_SYNTAX_ERROR
;
490 /* connect_type - only valid when srst_nogate */
491 m
= RESET_CNCT_UNDER_SRST
;
492 if (strcmp(*CMD_ARGV
, "connect_assert_srst") == 0)
493 tmp
|= RESET_CNCT_UNDER_SRST
;
494 else if (strcmp(*CMD_ARGV
, "connect_deassert_srst") == 0)
495 /* connect normally - default */;
499 LOG_ERROR("extra reset_config %s spec (%s)",
500 "connect_type", *CMD_ARGV
);
501 return ERROR_COMMAND_SYNTAX_ERROR
;
506 /* caller provided nonsense; fail */
507 LOG_ERROR("unknown reset_config flag (%s)", *CMD_ARGV
);
508 return ERROR_COMMAND_SYNTAX_ERROR
;
511 /* Remember the bits which were specified (mask)
512 * and their new values (new_cfg).
518 /* clear previous values of those bits, save new values */
520 int old_cfg
= jtag_get_reset_config();
524 jtag_set_reset_config(new_cfg
);
526 new_cfg
= jtag_get_reset_config();
529 * Display the (now-)current reset mode
533 /* minimal JTAG has neither SRST nor TRST (so that's the default) */
534 switch (new_cfg
& (RESET_HAS_TRST
| RESET_HAS_SRST
)) {
536 modes
[0] = "srst_only";
539 modes
[0] = "trst_only";
541 case RESET_TRST_AND_SRST
:
542 modes
[0] = "trst_and_srst";
549 /* normally SRST and TRST are decoupled; but bugs happen ... */
550 switch (new_cfg
& (RESET_SRST_PULLS_TRST
| RESET_TRST_PULLS_SRST
)) {
551 case RESET_SRST_PULLS_TRST
:
552 modes
[1] = "srst_pulls_trst";
554 case RESET_TRST_PULLS_SRST
:
555 modes
[1] = "trst_pulls_srst";
557 case RESET_SRST_PULLS_TRST
| RESET_TRST_PULLS_SRST
:
558 modes
[1] = "combined";
561 modes
[1] = "separate";
565 /* TRST-less connectors include Altera, Xilinx, and minimal JTAG */
566 if (new_cfg
& RESET_HAS_TRST
) {
567 if (new_cfg
& RESET_TRST_OPEN_DRAIN
)
568 modes
[3] = " trst_open_drain";
570 modes
[3] = " trst_push_pull";
574 /* SRST-less connectors include TI-14, Xilinx, and minimal JTAG */
575 if (new_cfg
& RESET_HAS_SRST
) {
576 if (new_cfg
& RESET_SRST_NO_GATING
)
577 modes
[2] = " srst_nogate";
579 modes
[2] = " srst_gates_jtag";
581 if (new_cfg
& RESET_SRST_PUSH_PULL
)
582 modes
[4] = " srst_push_pull";
584 modes
[4] = " srst_open_drain";
586 if (new_cfg
& RESET_CNCT_UNDER_SRST
)
587 modes
[5] = " connect_assert_srst";
589 modes
[5] = " connect_deassert_srst";
596 command_print(CMD
, "%s %s%s%s%s%s",
598 modes
[2], modes
[3], modes
[4], modes
[5]);
603 COMMAND_HANDLER(handle_adapter_srst_delay_command
)
606 return ERROR_COMMAND_SYNTAX_ERROR
;
609 COMMAND_PARSE_NUMBER(uint
, CMD_ARGV
[0], delay
);
611 jtag_set_nsrst_delay(delay
);
613 command_print(CMD
, "adapter srst delay: %u", jtag_get_nsrst_delay());
617 COMMAND_HANDLER(handle_adapter_srst_pulse_width_command
)
620 return ERROR_COMMAND_SYNTAX_ERROR
;
623 COMMAND_PARSE_NUMBER(uint
, CMD_ARGV
[0], width
);
625 jtag_set_nsrst_assert_width(width
);
627 command_print(CMD
, "adapter srst pulse_width: %u", jtag_get_nsrst_assert_width());
631 COMMAND_HANDLER(handle_adapter_speed_command
)
634 return ERROR_COMMAND_SYNTAX_ERROR
;
636 int retval
= ERROR_OK
;
639 COMMAND_PARSE_NUMBER(uint
, CMD_ARGV
[0], khz
);
641 retval
= jtag_config_khz(khz
);
642 if (retval
!= ERROR_OK
)
646 int cur_speed
= jtag_get_speed_khz();
647 retval
= jtag_get_speed_readable(&cur_speed
);
648 if (retval
!= ERROR_OK
)
652 command_print(CMD
, "adapter speed: %d kHz", cur_speed
);
654 command_print(CMD
, "adapter speed: RCLK - adaptive");
659 COMMAND_HANDLER(handle_adapter_reset_de_assert
)
662 VALUE_UNDEFINED
= -1,
667 enum values srst
= VALUE_UNDEFINED
;
668 enum values trst
= VALUE_UNDEFINED
;
669 enum reset_types jtag_reset_config
= jtag_get_reset_config();
673 if (transport_is_jtag()) {
674 if (jtag_reset_config
& RESET_HAS_TRST
)
675 signal
= jtag_get_trst() ? "asserted" : "deasserted";
677 signal
= "not present";
678 command_print(CMD
, "trst %s", signal
);
681 if (jtag_reset_config
& RESET_HAS_SRST
)
682 signal
= jtag_get_srst() ? "asserted" : "deasserted";
684 signal
= "not present";
685 command_print(CMD
, "srst %s", signal
);
690 if (CMD_ARGC
!= 1 && CMD_ARGC
!= 3)
691 return ERROR_COMMAND_SYNTAX_ERROR
;
693 value
= (strcmp(CMD_NAME
, "assert") == 0) ? VALUE_ASSERT
: VALUE_DEASSERT
;
694 if (strcmp(CMD_ARGV
[0], "srst") == 0)
696 else if (strcmp(CMD_ARGV
[0], "trst") == 0)
699 return ERROR_COMMAND_SYNTAX_ERROR
;
702 if (strcmp(CMD_ARGV
[1], "assert") == 0)
703 value
= VALUE_ASSERT
;
704 else if (strcmp(CMD_ARGV
[1], "deassert") == 0)
705 value
= VALUE_DEASSERT
;
707 return ERROR_COMMAND_SYNTAX_ERROR
;
709 if (strcmp(CMD_ARGV
[2], "srst") == 0 && srst
== VALUE_UNDEFINED
)
711 else if (strcmp(CMD_ARGV
[2], "trst") == 0 && trst
== VALUE_UNDEFINED
)
714 return ERROR_COMMAND_SYNTAX_ERROR
;
717 if (trst
== VALUE_UNDEFINED
) {
718 if (transport_is_jtag())
719 trst
= jtag_get_trst() ? VALUE_ASSERT
: VALUE_DEASSERT
;
721 trst
= VALUE_DEASSERT
; /* unused, safe value */
724 if (srst
== VALUE_UNDEFINED
) {
725 if (jtag_reset_config
& RESET_HAS_SRST
)
726 srst
= jtag_get_srst() ? VALUE_ASSERT
: VALUE_DEASSERT
;
728 srst
= VALUE_DEASSERT
; /* unused, safe value */
731 if (trst
== VALUE_ASSERT
&& !transport_is_jtag()) {
732 LOG_ERROR("transport has no trst signal");
736 if (srst
== VALUE_ASSERT
&& !(jtag_reset_config
& RESET_HAS_SRST
)) {
737 LOG_ERROR("adapter has no srst signal");
741 return adapter_resets((trst
== VALUE_DEASSERT
) ? TRST_DEASSERT
: TRST_ASSERT
,
742 (srst
== VALUE_DEASSERT
) ? SRST_DEASSERT
: SRST_ASSERT
);
745 #ifdef HAVE_LIBUSB_GET_PORT_NUMBERS
746 COMMAND_HANDLER(handle_usb_location_command
)
749 adapter_usb_set_location(CMD_ARGV
[0]);
751 command_print(CMD
, "adapter usb location: %s", adapter_usb_get_location());
755 #endif /* HAVE_LIBUSB_GET_PORT_NUMBERS */
757 static const struct command_registration adapter_usb_command_handlers
[] = {
758 #ifdef HAVE_LIBUSB_GET_PORT_NUMBERS
761 .handler
= &handle_usb_location_command
,
762 .mode
= COMMAND_CONFIG
,
763 .help
= "display or set the USB bus location of the USB device",
764 .usage
= "[<bus>-port[.port]...]",
766 #endif /* HAVE_LIBUSB_GET_PORT_NUMBERS */
767 COMMAND_REGISTRATION_DONE
770 static const struct command_registration adapter_srst_command_handlers
[] = {
773 .handler
= handle_adapter_srst_delay_command
,
775 .help
= "delay after deasserting SRST in ms",
776 .usage
= "[milliseconds]",
779 .name
= "pulse_width",
780 .handler
= handle_adapter_srst_pulse_width_command
,
782 .help
= "SRST assertion pulse width in ms",
783 .usage
= "[milliseconds]",
785 COMMAND_REGISTRATION_DONE
788 static const struct command_registration adapter_command_handlers
[] = {
791 .handler
= handle_adapter_driver_command
,
792 .mode
= COMMAND_CONFIG
,
793 .help
= "Select a debug adapter driver",
794 .usage
= "driver_name",
798 .handler
= handle_adapter_speed_command
,
800 .help
= "With an argument, change to the specified maximum "
801 "jtag speed. For JTAG, 0 KHz signifies adaptive "
803 "With or without argument, display current setting.",
808 .handler
= handle_adapter_list_command
,
810 .help
= "List all built-in debug adapter drivers",
816 .jim_handler
= jim_adapter_name
,
817 .help
= "Returns the name of the currently "
818 "selected adapter (driver)",
823 .help
= "srst adapter command group",
825 .chain
= adapter_srst_command_handlers
,
828 .name
= "transports",
829 .handler
= adapter_transports_command
,
830 .mode
= COMMAND_CONFIG
,
831 .help
= "Declare transports the adapter supports.",
832 .usage
= "transport ...",
837 .help
= "usb adapter command group",
839 .chain
= adapter_usb_command_handlers
,
843 .handler
= handle_adapter_reset_de_assert
,
844 .mode
= COMMAND_EXEC
,
845 .help
= "Controls SRST and TRST lines.",
846 .usage
= "|deassert [srst|trst [assert|deassert srst|trst]]",
850 .handler
= handle_adapter_reset_de_assert
,
851 .mode
= COMMAND_EXEC
,
852 .help
= "Controls SRST and TRST lines.",
853 .usage
= "|assert [srst|trst [deassert|assert srst|trst]]",
855 COMMAND_REGISTRATION_DONE
858 static const struct command_registration interface_command_handlers
[] = {
862 .help
= "adapter command group",
864 .chain
= adapter_command_handlers
,
867 .name
= "reset_config",
868 .handler
= handle_reset_config_command
,
870 .help
= "configure adapter reset behavior",
871 .usage
= "[none|trst_only|srst_only|trst_and_srst] "
872 "[srst_pulls_trst|trst_pulls_srst|combined|separate] "
873 "[srst_gates_jtag|srst_nogate] "
874 "[trst_push_pull|trst_open_drain] "
875 "[srst_push_pull|srst_open_drain] "
876 "[connect_deassert_srst|connect_assert_srst]",
878 COMMAND_REGISTRATION_DONE
882 * Register the commands which deal with arbitrary debug adapter drivers.
884 * @todo Remove internal assumptions that all debug adapters use JTAG for
885 * transport. Various types and data structures are not named generically.
887 int interface_register_commands(struct command_context
*ctx
)
889 return register_commands(ctx
, NULL
, interface_command_handlers
);
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)