Skip to content

Commit 9ff79fd

Browse files
R. Diezborneoa
authored andcommitted
enable the Bus Pirate adapter by default on most systems
Also convert the Bus Pirate to the common PROCESS_ADAPTERS logic. Change-Id: Ifa8ebcee380c16d7e308ba7a75dbffdb74208285 Signed-off-by: R. Diez <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8533 Reviewed-by: Antonio Borneo <[email protected]> Reviewed-by: R. Diez <[email protected]> Tested-by: jenkins
1 parent c582cfb commit 9ff79fd

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

configure.ac

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@ AS_CASE(["${host_cpu}"],
414414
parport_use_ppdev=yes
415415
])
416416

417+
can_build_buspirate=yes
418+
417419
AS_CASE([$host],
418420
[*-cygwin*], [
419421
is_win32=yes
@@ -445,12 +447,12 @@ AS_CASE([$host],
445447
])
446448
parport_use_giveio=yes
447449
448-
AS_IF([test "x$enable_buspirate" = "xyes"], [
449-
AC_MSG_ERROR([buspirate currently not supported by MinGW32 hosts])
450+
AS_IF([test "x$ADAPTER_VAR([buspirate])" = "xyes"], [
451+
AC_MSG_ERROR([The Bus Pirate adapter is currently not supported by MinGW32 hosts.])
450452
])
451453
452454
# In case enable_buspirate=auto, make sure it will not be built.
453-
enable_buspirate=no
455+
can_build_buspirate=no
454456
455457
AC_SUBST([HOST_CPPFLAGS], ["-D__USE_MINGW_ANSI_STDIO -DFD_SETSIZE=128"])
456458
],
@@ -594,12 +596,6 @@ AS_IF([test "x$build_gw16012" = "xyes"], [
594596
AC_DEFINE([BUILD_GW16012], [0], [0 if you don't want the Gateworks GW16012 driver.])
595597
])
596598

597-
AS_IF([test "x$enable_buspirate" != "xno"], [
598-
AC_DEFINE([BUILD_BUSPIRATE], [1], [1 if you want the Buspirate JTAG driver.])
599-
], [
600-
AC_DEFINE([BUILD_BUSPIRATE], [0], [0 if you don't want the Buspirate JTAG driver.])
601-
])
602-
603599
AS_IF([test "x$use_internal_jimtcl" = "xyes"], [
604600
AS_IF([test -f "$srcdir/jimtcl/configure"], [
605601
AS_IF([test "x$use_internal_jimtcl_maintainer" = "xyes"], [
@@ -712,7 +708,7 @@ m4_define([PROCESS_ADAPTERS], [
712708
])
713709
], [
714710
AS_IF([test "x$ADAPTER_VAR([adapter])" = "xyes"], [
715-
AC_MSG_ERROR([$3 is required for [adapter] ADAPTER_DESC([adapter]).])
711+
AC_MSG_ERROR([$3 is required for [adapter] "ADAPTER_DESC([adapter])".])
716712
])
717713
ADAPTER_VAR([adapter])=no
718714
AC_DEFINE([BUILD_]ADAPTER_SYM([adapter]), [0], [0 if you do not want the ]ADAPTER_DESC([adapter]).)
@@ -729,6 +725,8 @@ PROCESS_ADAPTERS([LIBFTDI_USB1_ADAPTERS], ["x$use_libftdi" = "xyes" -a "x$use_li
729725
PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [libgpiod])
730726
PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2])
731727
PROCESS_ADAPTERS([PCIE_ADAPTERS], ["x$is_linux" = "xyes"], [Linux build])
728+
PROCESS_ADAPTERS([SERIAL_PORT_ADAPTERS], ["x$can_build_buspirate" = "xyes"],
729+
[internal error: validation should happen beforehand])
732730
PROCESS_ADAPTERS([DUMMY_ADAPTER], [true], [unused])
733731

734732
AS_IF([test "x$enable_linuxgpiod" != "xno"], [
@@ -783,7 +781,6 @@ AM_CONDITIONAL([USB_BLASTER_DRIVER], [test "x$enable_usb_blaster" != "xno" -o "x
783781
AM_CONDITIONAL([AMTJTAGACCEL], [test "x$build_amtjtagaccel" = "xyes"])
784782
AM_CONDITIONAL([GW16012], [test "x$build_gw16012" = "xyes"])
785783
AM_CONDITIONAL([REMOTE_BITBANG], [test "x$build_remote_bitbang" = "xyes"])
786-
AM_CONDITIONAL([BUSPIRATE], [test "x$enable_buspirate" != "xno"])
787784
AM_CONDITIONAL([SYSFSGPIO], [test "x$build_sysfsgpio" = "xyes"])
788785
AM_CONDITIONAL([USE_LIBUSB1], [test "x$use_libusb1" = "xyes"])
789786
AM_CONDITIONAL([IS_CYGWIN], [test "x$is_cygwin" = "xyes"])

src/jtag/drivers/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ endif
143143
if ARMJTAGEW
144144
DRIVERFILES += %D%/arm-jtag-ew.c
145145
endif
146-
if BUSPIRATE
146+
if BUS_PIRATE
147147
DRIVERFILES += %D%/buspirate.c
148148
endif
149149
if REMOTE_BITBANG

src/jtag/interfaces.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct adapter_driver *adapter_drivers[] = {
102102
#if BUILD_ARMJTAGEW == 1
103103
&armjtagew_adapter_driver,
104104
#endif
105-
#if BUILD_BUSPIRATE == 1
105+
#if BUILD_BUS_PIRATE == 1
106106
&buspirate_adapter_driver,
107107
#endif
108108
#if BUILD_REMOTE_BITBANG == 1

0 commit comments

Comments
 (0)