All the HLA transports (hla_swd and hla_jtag) register the same
set of commands. Such commands are mainly aimed at handling JTAG
compatibility that is required for the transport hla_jtag only.
Split per transport the command registration and limit the
commands to only those required by the transport itself.
Replace the command "hla newtap" with the transport specific
"swd newdap" or "jtag newtap".
Deprecate the command "hla".
Change-Id: I79c78fa97b707482608516d3824151a4d07644c0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4877
Tested-by: jenkins
}
static const struct command_registration
}
static const struct command_registration
-hl_transport_stlink_subcommand_handlers[] = {
+hl_swd_transport_subcommand_handlers[] = {
.mode = COMMAND_CONFIG,
.jim_handler = jim_hl_newtap,
.mode = COMMAND_CONFIG,
.jim_handler = jim_hl_newtap,
- .help = "Create a new TAP instance named basename.tap_type, "
- "and appends it to the scan chain.",
- .usage = "basename tap_type '-irlen' count "
- "['-expected_id' number] ",
+ .help = "declare a new SWD DAP",
+ COMMAND_REGISTRATION_DONE
+};
+static const struct command_registration hl_swd_transport_command_handlers[] = {
+ {
+ .name = "swd",
+ .mode = COMMAND_ANY,
+ .help = "SWD command group",
+ .usage = "",
+ .chain = hl_swd_transport_subcommand_handlers,
+ },
COMMAND_REGISTRATION_DONE
};
static const struct command_registration
hl_transport_jtag_subcommand_handlers[] = {
{
COMMAND_REGISTRATION_DONE
};
static const struct command_registration
hl_transport_jtag_subcommand_handlers[] = {
{
- .chain = hl_transport_stlink_subcommand_handlers,
+ .name = "newtap",
+ .mode = COMMAND_CONFIG,
+ .jim_handler = jim_hl_newtap,
+ .help = "Create a new TAP instance named basename.tap_type, "
+ "and appends it to the scan chain.",
+ .usage = "basename tap_type '-irlen' count "
+ "['-expected_id' number] ",
COMMAND_REGISTRATION_DONE
};
COMMAND_REGISTRATION_DONE
};
-static const struct command_registration stlink_transport_command_handlers[] = {
-
- {
- .name = "hla",
- .mode = COMMAND_ANY,
- .help = "perform hl adapter actions",
- .usage = "",
- .chain = hl_transport_stlink_subcommand_handlers,
- },
+static const struct command_registration hl_jtag_transport_command_handlers[] = {
{
.name = "jtag",
.mode = COMMAND_ANY,
{
.name = "jtag",
.mode = COMMAND_ANY,
+ .help = "perform jtag tap actions",
.usage = "",
.chain = hl_transport_jtag_subcommand_handlers,
},
.usage = "",
.chain = hl_transport_jtag_subcommand_handlers,
},
COMMAND_REGISTRATION_DONE
};
COMMAND_REGISTRATION_DONE
};
-static int hl_transport_register_commands(struct command_context *cmd_ctx)
-{
- return register_commands(cmd_ctx, NULL,
- stlink_transport_command_handlers);
-}
static int hl_transport_init(struct command_context *cmd_ctx)
{
static int hl_transport_init(struct command_context *cmd_ctx)
{
return hl_interface_init_target(t);
}
return hl_interface_init_target(t);
}
-static int hl_transport_select(struct command_context *ctx)
+static int hl_jtag_transport_select(struct command_context *cmd_ctx)
- LOG_DEBUG("hl_transport_select");
-
- int retval;
+ LOG_DEBUG("hl_jtag_transport_select");
/* NOTE: interface init must already have been done.
* That works with only C code ... no Tcl glue required.
*/
/* NOTE: interface init must already have been done.
* That works with only C code ... no Tcl glue required.
*/
- retval = hl_transport_register_commands(ctx);
-
- if (retval != ERROR_OK)
- return retval;
+ return register_commands(cmd_ctx, NULL,
+ hl_jtag_transport_command_handlers);
+}
+static int hl_swd_transport_select(struct command_context *cmd_ctx)
+{
+ LOG_DEBUG("hl_swd_transport_select");
+ return register_commands(cmd_ctx, NULL,
+ hl_swd_transport_command_handlers);
}
static struct transport hl_swd_transport = {
.name = "hla_swd",
}
static struct transport hl_swd_transport = {
.name = "hla_swd",
- .select = hl_transport_select,
+ .select = hl_swd_transport_select,
.init = hl_transport_init,
.override_target = hl_interface_override_target,
};
static struct transport hl_jtag_transport = {
.name = "hla_jtag",
.init = hl_transport_init,
.override_target = hl_interface_override_target,
};
static struct transport hl_jtag_transport = {
.name = "hla_jtag",
- .select = hl_transport_select,
+ .select = hl_jtag_transport_select,
.init = hl_transport_init,
.override_target = hl_interface_override_target,
};
.init = hl_transport_init,
.override_target = hl_interface_override_target,
};
eval xds110 supply $args
}
eval xds110 supply $args
}
+proc hla {cmd args} {
+ tailcall "hla $cmd" {*}$args
+}
+
+proc "hla newtap" {args} {
+ echo "DEPRECATED! use 'swj_newdap' not 'hla newtap'"
+ eval swj_newdap $args
+}
+
}
proc swj_newdap {chip tag args} {
}
proc swj_newdap {chip tag args} {
- if [using_hla] {
- eval hla newtap $chip $tag $args
- } elseif [using_jtag] {
eval jtag newtap $chip $tag $args
} elseif [using_swd] {
eval swd newdap $chip $tag $args
eval jtag newtap $chip $tag $args
} elseif [using_swd] {
eval swd newdap $chip $tag $args
+ } else {
+ echo "Error: transport '[ transport select ]' not supported by swj_newdap"
+ shutdown
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)