aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/remote_bitbang/remote_bitbang_sysfsgpio.c4
-rw-r--r--doc/openocd.texi14
-rw-r--r--src/jtag/drivers/remote_bitbang.c17
-rw-r--r--src/jtag/startup.tcl12
4 files changed, 35 insertions, 12 deletions
diff --git a/contrib/remote_bitbang/remote_bitbang_sysfsgpio.c b/contrib/remote_bitbang/remote_bitbang_sysfsgpio.c
index 5c717ce..6cf30c3 100644
--- a/contrib/remote_bitbang/remote_bitbang_sysfsgpio.c
+++ b/contrib/remote_bitbang/remote_bitbang_sysfsgpio.c
@@ -30,12 +30,12 @@
socat TCP6-LISTEN:7777,fork EXEC:"sudo ./remote_bitbang_sysfsgpio tck 11 tms 25 tdo 9 tdi 10"
On host run:
- openocd -c "interface remote_bitbang; remote_bitbang_host raspberrypi; remote_bitbang_port 7777" \
+ openocd -c "interface remote_bitbang; remote_bitbang host raspberrypi; remote_bitbang port 7777" \
-f target/stm32f1x.cfg
Or if you want to test UNIX sockets, run both on Raspberry Pi:
socat UNIX-LISTEN:/tmp/remotebitbang-socket,fork EXEC:"sudo ./remote_bitbang_sysfsgpio tck 11 tms 25 tdo 9 tdi 10"
- openocd -c "interface remote_bitbang; remote_bitbang_host /tmp/remotebitbang-socket" -f target/stm32f1x.cfg
+ openocd -c "interface remote_bitbang; remote_bitbang host /tmp/remotebitbang-socket" -f target/stm32f1x.cfg
*/
#include <sys/types.h>
diff --git a/doc/openocd.texi b/doc/openocd.texi
index c3963d6..0d7719d 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -2694,14 +2694,14 @@ instead of directly driving JTAG.
The remote_bitbang driver is useful for debugging software running on
processors which are being simulated.
-@deffn {Config Command} {remote_bitbang_port} number
+@deffn {Config Command} {remote_bitbang port} number
Specifies the TCP port of the remote process to connect to or 0 to use UNIX
sockets instead of TCP.
@end deffn
-@deffn {Config Command} {remote_bitbang_host} hostname
+@deffn {Config Command} {remote_bitbang host} hostname
Specifies the hostname of the remote process to connect to using TCP, or the
-name of the UNIX socket to use if remote_bitbang_port is 0.
+name of the UNIX socket to use if remote_bitbang port is 0.
@end deffn
For example, to connect remotely via TCP to the host foobar you might have
@@ -2709,8 +2709,8 @@ something like:
@example
adapter driver remote_bitbang
-remote_bitbang_port 3335
-remote_bitbang_host foobar
+remote_bitbang port 3335
+remote_bitbang host foobar
@end example
To connect to another process running locally via UNIX sockets with socket
@@ -2718,8 +2718,8 @@ named mysocket:
@example
adapter driver remote_bitbang
-remote_bitbang_port 0
-remote_bitbang_host mysocket
+remote_bitbang port 0
+remote_bitbang host mysocket
@end example
@end deffn
diff --git a/src/jtag/drivers/remote_bitbang.c b/src/jtag/drivers/remote_bitbang.c
index 6d1f48b..ce1a065 100644
--- a/src/jtag/drivers/remote_bitbang.c
+++ b/src/jtag/drivers/remote_bitbang.c
@@ -340,9 +340,9 @@ COMMAND_HANDLER(remote_bitbang_handle_remote_bitbang_host_command)
return ERROR_COMMAND_SYNTAX_ERROR;
}
-static const struct command_registration remote_bitbang_command_handlers[] = {
+static const struct command_registration remote_bitbang_subcommand_handlers[] = {
{
- .name = "remote_bitbang_port",
+ .name = "port",
.handler = remote_bitbang_handle_remote_bitbang_port_command,
.mode = COMMAND_CONFIG,
.help = "Set the port to use to connect to the remote jtag.\n"
@@ -350,7 +350,7 @@ static const struct command_registration remote_bitbang_command_handlers[] = {
.usage = "port_number",
},
{
- .name = "remote_bitbang_host",
+ .name = "host",
.handler = remote_bitbang_handle_remote_bitbang_host_command,
.mode = COMMAND_CONFIG,
.help = "Set the host to use to connect to the remote jtag.\n"
@@ -360,6 +360,17 @@ static const struct command_registration remote_bitbang_command_handlers[] = {
COMMAND_REGISTRATION_DONE,
};
+static const struct command_registration remote_bitbang_command_handlers[] = {
+ {
+ .name = "remote_bitbang",
+ .mode = COMMAND_ANY,
+ .help = "perform remote_bitbang management",
+ .chain = remote_bitbang_subcommand_handlers,
+ .usage = "",
+ },
+ COMMAND_REGISTRATION_DONE
+};
+
static int remote_bitbang_execute_queue(void)
{
/* safety: the send buffer must be empty, no leftover characters from
diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl
index f2e4ec3..02a3626 100644
--- a/src/jtag/startup.tcl
+++ b/src/jtag/startup.tcl
@@ -261,6 +261,18 @@ proc ftdi_tdo_sample_edge args {
eval ftdi tdo_sample_edge $args
}
+lappend _telnet_autocomplete_skip remote_bitbang_host
+proc remote_bitbang_host args {
+ echo "DEPRECATED! use 'remote_bitbang host' not 'remote_bitbang_host'"
+ eval remote_bitbang host $args
+}
+
+lappend _telnet_autocomplete_skip remote_bitbang_port
+proc remote_bitbang_port args {
+ echo "DEPRECATED! use 'remote_bitbang port' not 'remote_bitbang_port'"
+ eval remote_bitbang port $args
+}
+
lappend _telnet_autocomplete_skip openjtag_device_desc
proc openjtag_device_desc args {
echo "DEPRECATED! use 'openjtag device_desc' not 'openjtag_device_desc'"