summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jtag/Makefile.am11
-rw-r--r--src/jtag/jtag.c20
2 files changed, 19 insertions, 12 deletions
diff --git a/src/jtag/Makefile.am b/src/jtag/Makefile.am
index fa5861a5..6be4db04 100644
--- a/src/jtag/Makefile.am
+++ b/src/jtag/Makefile.am
@@ -51,14 +51,15 @@ else
ECOSBOARDFILES =
endif
-if MINIDUMMY
-MINIDUMMYFILES = minidummy.c
+if MINIDRIVER_DUMMY
+MINIDUMMYFILES = minidummy.c commands.c
+AM_CPPFLAGS += -I$(srcdir)/minidummy
else
MINIDUMMYFILES =
endif
if MINIDRIVER
-DRIVERFILES =
+DRIVERFILES = $(MINIDUMMYFILES)
else
DRIVERFILES = jtag_driver.c commands.c
endif
@@ -137,7 +138,6 @@ libjtag_la_SOURCES = \
$(PRESTOFILES) \
$(USBPROGFILES) \
$(ECOSBOARDFILES) \
- $(MINIDUMMYFILES) \
$(JLINKFILES) \
$(RLINKFILES) \
$(VSLLINKFILES) \
@@ -153,6 +153,7 @@ noinst_HEADERS = \
rlink/dtc_cmd.h \
rlink/ep1_cmd.h \
rlink/rlink.h \
- rlink/st7.h
+ rlink/st7.h \
+ minidummy/jtag_minidriver.h
MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 68214455..8bc19112 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -97,11 +97,9 @@ static bool hasKHz = false;
#if BUILD_ECOSBOARD == 1
extern jtag_interface_t zy1000_interface;
-#endif
-
-#if BUILD_MINIDUMMY == 1
+#elif defined(BUILD_MINIDRIVER_DUMMY)
extern jtag_interface_t minidummy_interface;
-#endif
+#else // standard drivers
#if BUILD_PARPORT == 1
extern jtag_interface_t parport_interface;
#endif
@@ -157,14 +155,21 @@ static bool hasKHz = false;
#if BUILD_ARMJTAGEW == 1
extern jtag_interface_t armjtagew_interface;
#endif
+#endif // standard drivers
+/**
+ * The list of built-in JTAG interfaces, containing entries for those
+ * drivers that were enabled by the @c configure script.
+ *
+ * The list should be defined to contain either one minidriver interface
+ * or some number of standard driver interfaces, never both.
+ */
jtag_interface_t *jtag_interfaces[] = {
#if BUILD_ECOSBOARD == 1
&zy1000_interface,
-#endif
-#if BUILD_MINIDUMMY == 1
+#elif defined(BUILD_MINIDRIVER_DUMMY)
&minidummy_interface,
-#endif
+#else // standard drivers
#if BUILD_PARPORT == 1
&parport_interface,
#endif
@@ -207,6 +212,7 @@ jtag_interface_t *jtag_interfaces[] = {
#if BUILD_ARMJTAGEW == 1
&armjtagew_interface,
#endif
+#endif // standard drivers
NULL,
};