build: fix build with --enable-minidriver-dummy 11/5911/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 1 Nov 2020 14:39:23 +0000 (15:39 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 7 Nov 2020 20:53:39 +0000 (20:53 +0000)
Commit 462c01206692 ("Add complete JTAG debug logging.") breaks
the build for minidriver, that is enabled either on zy1000 build
and on minidriver-dummy build. The check on BUILD_ZY1000 was added
to pass the auto-build in jenkins. While the build issue with
minidriver-dummy was known, as reported in the comment, it was not
addressed and got ignored for slightly more than one year.

Use the macro HAVE_JTAG_MINIDRIVER_H in place of BUILD_ZY1000 to
take in account both builds that require the minidriver.
Fix also the build in case configure enables the HLA drivers due
to autodetection of libusb. The HLA drivers would not be in the
build and the function transport_is_hla() would be missing.

Change-Id: I1d85c5fa247bf4a85aba29b233c0b573b46665bc
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5911
Tested-by: jenkins
src/jtag/core.c
src/transport/transport.h

index f0f74eb808d7c2016dbb40662e6bee7cbe9a54f9..5abf832f8502710e4b139fb8f545f24ab3d0ac51 100644 (file)
@@ -953,12 +953,12 @@ int default_interface_jtag_execute_queue(void)
 
        int result = jtag->jtag_ops->execute_queue();
 
-#if !BUILD_ZY1000
+#if !HAVE_JTAG_MINIDRIVER_H
        /* Only build this if we use a regular driver with a command queue.
         * Otherwise jtag_command_queue won't be found at compile/link time. Its
         * definition is in jtag/commands.c, which is only built/linked by
         * jtag/Makefile.am if MINIDRIVER_DUMMY || !MINIDRIVER, but those variables
-        * aren't accessible here. */
+        * aren't accessible here. Use HAVE_JTAG_MINIDRIVER_H */
        struct jtag_command *cmd = jtag_command_queue;
        while (debug_level >= LOG_LVL_DEBUG_IO && cmd) {
                switch (cmd->type) {
index e04f78063529996396b3f7a4a81d07b85d6ff762..6bf6aaced9ca3e3173e59ba107f7e33cf9faddd1 100644 (file)
@@ -98,7 +98,7 @@ bool transport_is_dapdirect_jtag(void);
 bool transport_is_dapdirect_swd(void);
 bool transport_is_swim(void);
 
-#if BUILD_HLADAPTER
+#if BUILD_HLADAPTER && !HAVE_JTAG_MINIDRIVER_H
 bool transport_is_hla(void);
 #else
 static inline bool transport_is_hla(void)

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)