@@ -137,16 +137,19 @@ m4_define([USB1_ADAPTERS],
137137 [ [ ft232r] , [ Bitbang mode of FT232R based devices] , [ FT232R] ] ,
138138 [ [ vsllink] , [ Versaloon-Link JTAG Programmer] , [ VSLLINK] ] ,
139139 [ [ xds110] , [ TI XDS110 Debug Probe] , [ XDS110] ] ,
140- [ [ cmsis_dap_v2] , [ CMSIS-DAP v2 Compliant Debugger] , [ CMSIS_DAP_USB] ] ,
141140 [ [ osbdm] , [ OSBDM (JTAG only) Programmer] , [ OSBDM] ] ,
142141 [ [ opendous] , [ eStick/opendous JTAG Programmer] , [ OPENDOUS] ] ,
143142 [ [ armjtagew] , [ Olimex ARM-JTAG-EW Programmer] , [ ARMJTAGEW] ] ,
144143 [ [ rlink] , [ Raisonance RLink JTAG Programmer] , [ RLINK] ] ,
145144 [ [ usbprog] , [ USBProg JTAG Programmer] , [ USBPROG] ] ,
146- [ [ esp_usb_jtag] , [ Espressif JTAG Programmer] , [ ESP_USB_JTAG] ] ] )
145+ [ [ esp_usb_jtag] , [ Espressif JTAG Programmer] , [ ESP_USB_JTAG] ] ,
146+ [ [ cmsis_dap_v2] , [ CMSIS-DAP v2 compliant dongle (USB bulk)] , [ CMSIS_DAP_USB] ] ] )
147+
148+ # Please keep cmsis_dap_v2 the last in USB1_ADAPTERS
149+ # and cmsis_dap the first in HIDAPI_ADAPTERS
147150
148151m4_define ( [ HIDAPI_ADAPTERS] ,
149- [ [ [ cmsis_dap] , [ CMSIS-DAP Compliant Debugger ] , [ CMSIS_DAP_HID] ] ,
152+ [ [ [ cmsis_dap] , [ CMSIS-DAP v1 compliant dongle (HID) ] , [ CMSIS_DAP_HID] ] ,
150153 [ [ nulink] , [ Nu-Link Programmer] , [ HLADAPTER_NULINK] ] ] )
151154
152155m4_define ( [ HIDAPI_USB1_ADAPTERS] ,
@@ -162,6 +165,9 @@ m4_define([LIBFTDI_USB1_ADAPTERS],
162165m4_define ( [ LIBGPIOD_ADAPTERS] ,
163166 [ [ [ linuxgpiod] , [ Linux GPIO bitbang through libgpiod] , [ LINUXGPIOD] ] ] )
164167
168+ m4_define ( [ REMOTE_BITBANG_ADAPTER] ,
169+ [ [ [ remote_bitbang] , [ Remote Bitbang driver] , [ REMOTE_BITBANG] ] ] )
170+
165171m4_define ( [ LIBJAYLINK_ADAPTERS] ,
166172 [ [ [ jlink] , [ SEGGER J-Link Programmer] , [ JLINK] ] ] )
167173
@@ -176,6 +182,15 @@ m4_define([LINUXSPIDEV_ADAPTER],
176182m4_define ( [ VDEBUG_ADAPTER] ,
177183 [ [ [ vdebug] , [ Cadence Virtual Debug Interface] , [ VDEBUG] ] ] )
178184
185+ m4_define ( [ JTAG_DPI_ADAPTER] ,
186+ [ [ [ jtag_dpi] , [ JTAG DPI Adapter] , [ JTAG_DPI] ] ] )
187+
188+ m4_define ( [ JTAG_VPI_ADAPTER] ,
189+ [ [ [ jtag_vpi] , [ JTAG VPI Adapter] , [ JTAG_VPI] ] ] )
190+
191+ m4_define ( [ RSHIM_ADAPTER] ,
192+ [ [ [ rshim] , [ BlueField SoC via rshim] , [ RSHIM] ] ] )
193+
179194# The word 'Adapter' in "Dummy Adapter" below must begin with a capital letter
180195# because there is an M4 macro called 'adapter'.
181196m4_define ( [ DUMMY_ADAPTER] ,
@@ -274,10 +289,6 @@ AS_IF([test "x$debug_malloc" = "xyes" -a "x$have_glibc" = "xyes"], [
274289 AC_DEFINE ( [ _DEBUG_FREE_SPACE_] ,[ 1] , [ Include malloc free space in logging] )
275290] )
276291
277- AC_ARG_ENABLE ( [ rshim] ,
278- AS_HELP_STRING ( [ --enable-rshim] , [ Enable building the rshim driver] ) ,
279- [ build_rshim=$enableval] , [ build_rshim=no] )
280-
281292AC_ARG_ENABLE ( [ dmem] ,
282293 AS_HELP_STRING ( [ --enable-dmem] , [ Enable building the dmem driver] ) ,
283294 [ build_dmem=$enableval] , [ build_dmem=no] )
@@ -302,10 +313,14 @@ AC_ARG_ADAPTERS([
302313 LIBFTDI_ADAPTERS,
303314 LIBFTDI_USB1_ADAPTERS,
304315 LIBGPIOD_ADAPTERS,
316+ REMOTE_BITBANG_ADAPTER,
305317 LINUXSPIDEV_ADAPTER,
306318 SERIAL_PORT_ADAPTERS,
307319 DUMMY_ADAPTER,
308320 VDEBUG_ADAPTER,
321+ JTAG_DPI_ADAPTER,
322+ JTAG_VPI_ADAPTER,
323+ RSHIM_ADAPTER,
309324 PCIE_ADAPTERS,
310325 LIBJAYLINK_ADAPTERS
311326 ] ,[ auto] )
@@ -324,14 +339,6 @@ AC_ARG_ENABLE([parport_giveio],
324339 [ Enable use of giveio for parport (for CygWin only)] ) ,
325340 [ parport_use_giveio=$enableval] , [ parport_use_giveio=] )
326341
327- AC_ARG_ENABLE ( [ jtag_vpi] ,
328- AS_HELP_STRING ( [ --enable-jtag_vpi] , [ Enable building support for JTAG VPI] ) ,
329- [ build_jtag_vpi=$enableval] , [ build_jtag_vpi=no] )
330-
331- AC_ARG_ENABLE ( [ jtag_dpi] ,
332- AS_HELP_STRING ( [ --enable-jtag_dpi] , [ Enable building support for JTAG DPI] ) ,
333- [ build_jtag_dpi=$enableval] , [ build_jtag_dpi=no] )
334-
335342AC_ARG_ENABLE ( [ amtjtagaccel] ,
336343 AS_HELP_STRING ( [ --enable-amtjtagaccel] , [ Enable building the Amontec JTAG-Accelerator driver] ) ,
337344 [ build_amtjtagaccel=$enableval] , [ build_amtjtagaccel=no] )
@@ -377,19 +384,24 @@ AC_ARG_ENABLE([sysfsgpio],
377384 AS_HELP_STRING ( [ --enable-sysfsgpio] , [ Enable building support for programming driven via sysfs gpios.] ) ,
378385 [ build_sysfsgpio=$enableval] , [ build_sysfsgpio=no] )
379386
387+ can_build_rshim=no
388+
380389AS_CASE ( [ $host_os] ,
381390 [ linux*] , [
382391 is_linux=yes
392+ can_build_rshim=yes
383393 ] ,
384394 [
385395 AS_IF ( [ test "x$build_sysfsgpio" = "xyes"] , [
386396 AC_MSG_ERROR ( [ sysfsgpio is only available on linux] )
387397 ] )
388398
389- AS_CASE ( [ $host_os] , [ freebsd*] , [ ] ,
399+ AS_CASE ( [ $host_os] , [ freebsd*] , [
400+ can_build_rshim=yes
401+ ] ,
390402 [
391- AS_IF ( [ test "x$build_rshim " = "xyes"] , [
392- AC_MSG_ERROR ( [ build_rshim is only available on linux or freebsd] )
403+ AS_IF ( [ test "x$enable_rshim " = "xyes"] , [
404+ AC_MSG_ERROR ( [ rshim is only available on linux or freebsd] )
393405 ] )
394406 ] )
395407
@@ -398,10 +410,6 @@ AS_CASE([$host_os],
398410 ] )
399411] )
400412
401- AC_ARG_ENABLE ( [ remote-bitbang] ,
402- AS_HELP_STRING ( [ --enable-remote-bitbang] , [ Enable building support for the Remote Bitbang driver] ) ,
403- [ build_remote_bitbang=$enableval] , [ build_remote_bitbang=yes] )
404-
405413AS_CASE ( [ "${host_cpu}"] ,
406414 [ i?86|x86*] , [ ] ,
407415 [
@@ -499,12 +507,6 @@ AS_IF([test "x$build_parport" = "xyes"], [
499507 AC_DEFINE ( [ BUILD_PARPORT] , [ 0] , [ 0 if you don't want parport.] )
500508] )
501509
502- AS_IF ( [ test "x$build_rshim" = "xyes"] , [
503- AC_DEFINE ( [ BUILD_RSHIM] , [ 1] , [ 1 if you want to debug BlueField SoC via rshim.] )
504- ] , [
505- AC_DEFINE ( [ BUILD_RSHIM] , [ 0] , [ 0 if you don't want to debug BlueField SoC via rshim.] )
506- ] )
507-
508510AS_IF ( [ test "x$build_dmem" = "xyes"] , [
509511 AC_DEFINE ( [ BUILD_DMEM] , [ 1] , [ 1 if you want to debug via Direct Mem.] )
510512] , [
@@ -562,19 +564,6 @@ AS_IF([test "x$parport_use_giveio" = "xyes"], [
562564 AC_DEFINE ( [ PARPORT_USE_GIVEIO] , [ 0] , [ 0 if you don't want parport to use giveio.] )
563565] )
564566
565- AS_IF ( [ test "x$build_jtag_vpi" = "xyes"] , [
566- AC_DEFINE ( [ BUILD_JTAG_VPI] , [ 1] , [ 1 if you want JTAG VPI.] )
567- ] , [
568- AC_DEFINE ( [ BUILD_JTAG_VPI] , [ 0] , [ 0 if you don't want JTAG VPI.] )
569- ] )
570-
571- AS_IF ( [ test "x$build_jtag_dpi" = "xyes"] , [
572- AC_DEFINE ( [ BUILD_JTAG_DPI] , [ 1] , [ 1 if you want JTAG DPI.] )
573- ] , [
574- AC_DEFINE ( [ BUILD_JTAG_DPI] , [ 0] , [ 0 if you don't want JTAG DPI.] )
575- ] )
576-
577-
578567AS_IF ( [ test "x$build_amtjtagaccel" = "xyes"] , [
579568 AC_DEFINE ( [ BUILD_AMTJTAGACCEL] , [ 1] , [ 1 if you want the Amontec JTAG-Accelerator driver.] )
580569] , [
@@ -596,13 +585,6 @@ PKG_CHECK_MODULES([JIMTCL], [jimtcl >= 0.79], [
596585 ] )
597586] )
598587
599- AS_IF ( [ test "x$build_remote_bitbang" = "xyes"] , [
600- build_bitbang=yes
601- AC_DEFINE ( [ BUILD_REMOTE_BITBANG] , [ 1] , [ 1 if you want the Remote Bitbang driver.] )
602- ] , [
603- AC_DEFINE ( [ BUILD_REMOTE_BITBANG] , [ 0] , [ 0 if you don't want the Remote Bitbang driver.] )
604- ] )
605-
606588AS_IF ( [ test "x$build_sysfsgpio" = "xyes"] , [
607589 build_bitbang=yes
608590 AC_DEFINE ( [ BUILD_SYSFSGPIO] , [ 1] , [ 1 if you want the SysfsGPIO driver.] )
@@ -701,18 +683,27 @@ PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libu
701683PROCESS_ADAPTERS([ LIBFTDI_ADAPTERS] , [ "x$use_libftdi" = "xyes"] , [ libftdi] )
702684PROCESS_ADAPTERS([ LIBFTDI_USB1_ADAPTERS] , [ "x$use_libftdi" = "xyes" -a "x$use_libusb1" = "xyes"] , [ libftdi and libusb-1.x] )
703685PROCESS_ADAPTERS([ LIBGPIOD_ADAPTERS] , [ "x$use_libgpiod" = "xyes"] , [ Linux libgpiod] )
686+ PROCESS_ADAPTERS([ REMOTE_BITBANG_ADAPTER] , [ true] , [ unused] )
704687PROCESS_ADAPTERS([ LIBJAYLINK_ADAPTERS] , [ "x$use_libjaylink" = "xyes"] , [ libjaylink-0.2] )
705688PROCESS_ADAPTERS([ PCIE_ADAPTERS] , [ "x$is_linux" = "xyes"] , [ Linux build] )
706689PROCESS_ADAPTERS([ SERIAL_PORT_ADAPTERS] , [ "x$can_build_buspirate" = "xyes"] ,
707690 [ internal error: validation should happen beforehand] )
708691PROCESS_ADAPTERS([ LINUXSPIDEV_ADAPTER] , [ "x$is_linux" = "xyes"] , [ Linux spidev] )
709692PROCESS_ADAPTERS([ VDEBUG_ADAPTER] , [ true] , [ unused] )
693+ PROCESS_ADAPTERS([ JTAG_DPI_ADAPTER] , [ true] , [ unused] )
694+ PROCESS_ADAPTERS([ JTAG_VPI_ADAPTER] , [ true] , [ unused] )
695+ PROCESS_ADAPTERS([ RSHIM_ADAPTER] , [ "x$can_build_rshim" = "xyes"] ,
696+ [ internal error: validation should happen beforehand] )
710697PROCESS_ADAPTERS([ DUMMY_ADAPTER] , [ true] , [ unused] )
711698
712699AS_IF ( [ test "x$enable_linuxgpiod" != "xno"] , [
713700 build_bitbang=yes
714701] )
715702
703+ AS_IF ( [ test "x$enable_remote_bitbang" != "xno"] , [
704+ build_bitbang=yes
705+ ] )
706+
716707AS_IF ( [ test "x$enable_stlink" != "xno" -o "x$enable_ti_icdi" != "xno" -o "x$enable_nulink" != "xno"] , [
717708 AC_DEFINE ( [ BUILD_HLADAPTER] , [ 1] , [ 1 if you want the High Level JTAG driver.] )
718709 AM_CONDITIONAL([ HLADAPTER] , [ true] )
@@ -743,12 +734,9 @@ AM_CONDITIONAL([BCM2835GPIO], [test "x$build_bcm2835gpio" = "xyes"])
743734AM_CONDITIONAL([ IMX_GPIO] , [ test "x$build_imx_gpio" = "xyes"] )
744735AM_CONDITIONAL([ AM335XGPIO] , [ test "x$build_am335xgpio" = "xyes"] )
745736AM_CONDITIONAL([ BITBANG] , [ test "x$build_bitbang" = "xyes"] )
746- AM_CONDITIONAL([ JTAG_VPI] , [ test "x$build_jtag_vpi" = "xyes"] )
747- AM_CONDITIONAL([ JTAG_DPI] , [ test "x$build_jtag_dpi" = "xyes"] )
748737AM_CONDITIONAL([ USB_BLASTER_DRIVER] , [ test "x$enable_usb_blaster" != "xno" -o "x$enable_usb_blaster_2" != "xno"] )
749738AM_CONDITIONAL([ AMTJTAGACCEL] , [ test "x$build_amtjtagaccel" = "xyes"] )
750739AM_CONDITIONAL([ GW16012] , [ test "x$build_gw16012" = "xyes"] )
751- AM_CONDITIONAL([ REMOTE_BITBANG] , [ test "x$build_remote_bitbang" = "xyes"] )
752740AM_CONDITIONAL([ SYSFSGPIO] , [ test "x$build_sysfsgpio" = "xyes"] )
753741AM_CONDITIONAL([ USE_LIBUSB1] , [ test "x$use_libusb1" = "xyes"] )
754742AM_CONDITIONAL([ IS_CYGWIN] , [ test "x$is_cygwin" = "xyes"] )
@@ -760,7 +748,6 @@ AM_CONDITIONAL([USE_LIBFTDI], [test "x$use_libftdi" = "xyes"])
760748AM_CONDITIONAL([ USE_LIBGPIOD] , [ test "x$use_libgpiod" = "xyes"] )
761749AM_CONDITIONAL([ USE_HIDAPI] , [ test "x$use_hidapi" = "xyes"] )
762750AM_CONDITIONAL([ USE_LIBJAYLINK] , [ test "x$use_libjaylink" = "xyes"] )
763- AM_CONDITIONAL([ RSHIM] , [ test "x$build_rshim" = "xyes"] )
764751AM_CONDITIONAL([ DMEM] , [ test "x$build_dmem" = "xyes"] )
765752AM_CONDITIONAL([ HAVE_CAPSTONE] , [ test "x$enable_capstone" != "xno"] )
766753
@@ -839,18 +826,22 @@ AS_IF([test "x$use_internal_jimtcl" = "xyes"], [
839826echo
840827echo
841828echo OpenOCD configuration summary
842- echo --------------------------------------------------
829+ echo ---------------------------------------------------
843830m4_foreach ( [ adapter] , [ USB1_ADAPTERS,
844831 HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
845832 LIBFTDI_USB1_ADAPTERS,
846833 LIBGPIOD_ADAPTERS,
834+ REMOTE_BITBANG_ADAPTER,
847835 LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS, SERIAL_PORT_ADAPTERS,
848836 LINUXSPIDEV_ADAPTER,
849837 VDEBUG_ADAPTER,
838+ JTAG_DPI_ADAPTER,
839+ JTAG_VPI_ADAPTER,
840+ RSHIM_ADAPTER,
850841 DUMMY_ADAPTER,
851842 OPTIONAL_LIBRARIES,
852843 COVERAGE] ,
853- [ s=m4_format ( [ "%-40s "] , ADAPTER_DESC ( [ adapter] ))
844+ [ s=m4_format ( [ "%-41s "] , ADAPTER_DESC ( [ adapter] ))
854845 AS_CASE ( [ $ADAPTER_VAR([ adapter] )] ,
855846 [ auto] , [
856847 echo "$s"yes '(auto)'
0 commit comments