Skip to content

Commit

Permalink
Merge branch 'change-6867-new' into xvc-tcp-support
Browse files Browse the repository at this point in the history
  • Loading branch information
augustofg committed Jul 16, 2024
2 parents 5ef8e99 + b094e21 commit 938b499
Show file tree
Hide file tree
Showing 6 changed files with 774 additions and 1 deletion.
19 changes: 18 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ m4_define([PCIE_ADAPTERS],
m4_define([SERIAL_PORT_ADAPTERS],
[[[buspirate], [Bus Pirate], [BUS_PIRATE]]])

m4_define([NETWORK_ADAPTERS],
[[[xvc], [Xilinx XVC TCP], [xvc]]])

# The word 'Adapter' in "Dummy Adapter" below must begin with a capital letter
# because there is an M4 macro called 'adapter'.
m4_define([DUMMY_ADAPTER],
Expand Down Expand Up @@ -264,7 +267,8 @@ AC_ARG_ADAPTERS([
LIBFTDI_USB1_ADAPTERS
LIBGPIOD_ADAPTERS,
SERIAL_PORT_ADAPTERS,
LIBJAYLINK_ADAPTERS
LIBJAYLINK_ADAPTERS,
NETWORK_ADAPTERS
],[auto])

AC_ARG_ADAPTERS([DUMMY_ADAPTER],[no])
Expand Down Expand Up @@ -388,6 +392,10 @@ AC_ARG_ENABLE([remote-bitbang],
AS_HELP_STRING([--enable-remote-bitbang], [Enable building support for the Remote Bitbang driver]),
[build_remote_bitbang=$enableval], [build_remote_bitbang=no])

AC_ARG_ENABLE([xvc],
AS_HELP_STRING([--enable-xvc], [Enable building support for the Xilinx XVC TCP jtag driver]),
[build_xvc=$enableval], [build_xvc=yes])

AS_CASE(["${host_cpu}"],
[i?86|x86*], [],
[
Expand Down Expand Up @@ -603,6 +611,13 @@ AS_IF([test "x$build_remote_bitbang" = "xyes"], [
AC_DEFINE([BUILD_REMOTE_BITBANG], [0], [0 if you don't want the Remote Bitbang driver.])
])

AS_IF([test "x$build_xvc" = "xyes"], [
build_bitbang=yes
AC_DEFINE([BUILD_XVC], [1], [1 if you want the Xilinx XVC TCP driver.])
], [
AC_DEFINE([BUILD_XVC], [0], [0 if you don't want the Xilinx XVC TCP driver.])
])

AS_IF([test "x$build_sysfsgpio" = "xyes"], [
build_bitbang=yes
AC_DEFINE([BUILD_SYSFSGPIO], [1], [1 if you want the SysfsGPIO driver.])
Expand Down Expand Up @@ -779,6 +794,7 @@ AM_CONDITIONAL([USE_LIBJAYLINK], [test "x$use_libjaylink" = "xyes"])
AM_CONDITIONAL([RSHIM], [test "x$build_rshim" = "xyes"])
AM_CONDITIONAL([DMEM], [test "x$build_dmem" = "xyes"])
AM_CONDITIONAL([HAVE_CAPSTONE], [test "x$enable_capstone" != "xno"])
AM_CONDITIONAL([XVC], [test "x$build_xvc" = "xyes"])

AM_CONDITIONAL([INTERNAL_JIMTCL], [test "x$use_internal_jimtcl" = "xyes"])
AM_CONDITIONAL([INTERNAL_LIBJAYLINK], [test "x$use_internal_libjaylink" = "xyes"])
Expand Down Expand Up @@ -857,6 +873,7 @@ m4_foreach([adapter], [USB1_ADAPTERS,
LIBFTDI_USB1_ADAPTERS,
LIBGPIOD_ADAPTERS,
LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS, SERIAL_PORT_ADAPTERS,
NETWORK_ADAPTERS,
DUMMY_ADAPTER,
OPTIONAL_LIBRARIES],
[s=m4_format(["%-40s"], ADAPTER_DESC([adapter]))
Expand Down
26 changes: 26 additions & 0 deletions doc/openocd.texi
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ emulation model of target hardware.
@item @b{xlnx_pcie_xvc}
@* A JTAG driver exposing Xilinx Virtual Cable over PCI Express to OpenOCD as JTAG/SWD interface.

@item @b{xvc}
@* A JTAG driver using Xilinx Virtual Cable over TCP to OpenOCD as JTAG interface.

@item @b{linuxgpiod}
@* A bitbang JTAG driver using Linux GPIO through library libgpiod.

Expand Down Expand Up @@ -3675,6 +3678,29 @@ Set the emulated address and address window size. Both of these
parameters must be aligned to page size.
@end deffn

@deffn {Interface Driver} {xvc}
This driver implements bitbang mode of JTAG devices
using Xilinx Virtual Cable messages over TCP/IP.
This implementation is XVC protocol 1.0/1.1 compatible. However, 'mrd' and 'mwr'
extensions introduced in version 1.1 are not supported. Refer to:
@url{https://github.com/Xilinx/XilinxVirtualCable} for protocol specification.

Example configuration:

@example
xvc_host 192.168.3.192
xvc_port 5000
@end example
@end deffn

@deffn {Config Command} {xvc_host} @var{hostname}
Specifies the hostname of the remote debugger to connect to.
@end deffn

@deffn {Config Command} {xvc_port} @var{number}
Specifies the port of the remote process to connect to.
@end deffn

@end deffn

@section Transport Configuration
Expand Down
3 changes: 3 additions & 0 deletions src/jtag/drivers/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ endif
if AM335XGPIO
DRIVERFILES += %D%/am335xgpio.c
endif
if XVC
DRIVERFILES += %D%/xvc.c
endif

DRIVERHEADERS = \
%D%/bitbang.h \
Expand Down
Loading

0 comments on commit 938b499

Please sign in to comment.