jtag/drivers/kitprog: Restructure commands 67/7967/3
authorMarc Schink <dev@zapb.de>
Tue, 7 Nov 2023 16:14:09 +0000 (17:14 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 18 Nov 2023 11:29:06 +0000 (11:29 +0000)
Use a command group 'kitprog' with subcommands instead of individual
commands with 'kitprog_' prefix.

The old command is still available to ensure backwards compatibility,
but is marked as deprecated.

Change-Id: I7f0d447939819ffc488a3d7a8de672b58887127f
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7967
Reviewed-by: Bohdan Tymkiv <bohdan200@gmail.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
doc/openocd.texi
src/jtag/drivers/kitprog.c
src/jtag/startup.tcl

index 40b3c5d1dd03f664a9bf0bf4968b61c1136fdd94..5d73fd1744228636e0d5a4ba9e47ccac03152376 100644 (file)
@@ -2991,7 +2991,7 @@ This driver is for Cypress Semiconductor's KitProg adapters. The KitProg is an
 SWD-only adapter that is designed to be used with Cypress's PSoC and PRoC device
 families, but it is possible to use it with some other devices. If you are using
 this adapter with a PSoC or a PRoC, you may need to add
-@command{kitprog_init_acquire_psoc} or @command{kitprog acquire_psoc} to your
+@command{kitprog init_acquire_psoc} or @command{kitprog acquire_psoc} to your
 configuration script.
 
 Note that this driver is for the proprietary KitProg protocol, not the CMSIS-DAP
@@ -3012,14 +3012,14 @@ versions only implement "SWD line reset". Second, due to a firmware quirk, an
 SWD sequence must be sent after every target reset in order to re-establish
 communications with the target.
 @item Due in part to the limitation above, KitProg devices with firmware below
-version 2.14 will need to use @command{kitprog_init_acquire_psoc} in order to
+version 2.14 will need to use @command{kitprog init_acquire_psoc} in order to
 communicate with PSoC 5LP devices. This is because, assuming debug is not
 disabled on the PSoC, the PSoC 5LP needs its JTAG interface switched to SWD
 mode before communication can begin, but prior to firmware 2.14, "JTAG to SWD"
 could only be sent with an acquisition sequence.
 @end itemize
 
-@deffn {Config Command} {kitprog_init_acquire_psoc}
+@deffn {Config Command} {kitprog init_acquire_psoc}
 Indicate that a PSoC acquisition sequence needs to be run during adapter init.
 Please be aware that the acquisition sequence hard-resets the target.
 @end deffn
index e126a9c22b67bc2d5fbc32e00d50c1e95936800e..c0d2adc100a079c1160e88d071e348fcf07166eb 100644 (file)
@@ -879,6 +879,13 @@ static const struct command_registration kitprog_subcommand_handlers[] = {
                .usage = "",
                .help = "try to acquire a PSoC",
        },
+       {
+               .name = "init_acquire_psoc",
+               .handler = &kitprog_handle_init_acquire_psoc_command,
+               .mode = COMMAND_CONFIG,
+               .help = "try to acquire a PSoC during init",
+               .usage = "",
+       },
        COMMAND_REGISTRATION_DONE
 };
 
@@ -890,13 +897,6 @@ static const struct command_registration kitprog_command_handlers[] = {
                .usage = "<cmd>",
                .chain = kitprog_subcommand_handlers,
        },
-       {
-               .name = "kitprog_init_acquire_psoc",
-               .handler = &kitprog_handle_init_acquire_psoc_command,
-               .mode = COMMAND_CONFIG,
-               .help = "try to acquire a PSoC during init",
-               .usage = "",
-       },
        COMMAND_REGISTRATION_DONE
 };
 
index 597a49e958e625bc41e59a6c926b1835ca628b2a..4eca67771dee2603025790bb0af5df177fd338f7 100644 (file)
@@ -1126,6 +1126,12 @@ proc "cmsis_dap_usb" {args} {
        eval cmsis-dap usb $args
 }
 
+lappend _telnet_autocomplete_skip "kitprog_init_acquire_psoc"
+proc "kitprog_init_acquire_psoc" {} {
+       echo "DEPRECATED! use 'kitprog init_acquire_psoc', not 'kitprog_init_acquire_psoc'"
+       eval kitprog init_acquire_psoc
+}
+
 lappend _telnet_autocomplete_skip "pld device"
 proc "pld device" {driver tap_name {opt 0}} {
        echo "DEPRECATED! use 'pld create ...', not 'pld device ...'"

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)