From: oharboe at B. <oh...@ma...> - 2009-04-21 13:37:18
|
Author: oharboe Date: 2009-04-21 13:37:15 +0200 (Tue, 21 Apr 2009) New Revision: 1495 Modified: trunk/configure.in trunk/src/jtag/arm-jtag-ew.c trunk/src/jtag/ft2232.c trunk/src/jtag/jlink.c trunk/src/jtag/jtag.h Log: Zach Welch <zw...@su...> add --enable-verbose* options Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-04-21 11:35:58 UTC (rev 1494) +++ trunk/configure.in 2009-04-21 11:37:15 UTC (rev 1495) @@ -189,7 +189,52 @@ AS_HELP_STRING([--disable-werror], [Do not treat warnings as errors]), [gcc_werror=$enableval], [gcc_werror=$gcc_warnings]) +# set default verbose options, overridden by following options +debug_jtag_io=no +debug_usb_io=no +debug_usb_comms=no +AC_ARG_ENABLE(verbose, + AS_HELP_STRING([--enable-verbose], + [Enable verbose JTAG I/O messages (for debugging).]), + [ + debug_jtag_io=$enableval + debug_usb_io=$enableval + debug_usb_comms=$enableval + ], []) + +AC_ARG_ENABLE(verbose_jtag_io, + AS_HELP_STRING([--enable-verbose-jtag-io], + [Enable verbose JTAG I/O messages (for debugging).]), + [debug_jtag_io=$enableval], []) +AC_ARG_ENABLE(verbose_usb_io, + AS_HELP_STRING([--enable-verbose-usb-io], + [Enable verbose USB I/O messages (for debugging)]), + [debug_usb_io=$enableval], []) +AC_ARG_ENABLE(verbose_usb_comms, + AS_HELP_STRING([--enable-verbose-usb-comms], + [Enable verbose USB communication messages (for debugging)]), + [debug_usb_comms=$enableval], []) + +AC_MSG_CHECKING([whether to enable verbose JTAB I/O messages]); +AC_MSG_RESULT($debug_jtag_io) +if test $debug_jtag_io = yes; then + AC_DEFINE([_DEBUG_JTAG_IO_],[1], [Print verbose JTAG I/O messages]) +fi + +AC_MSG_CHECKING([whether to enable verbose USB I/O messages]); +AC_MSG_RESULT($debug_usb_io) +if test $debug_usb_io = yes; then + AC_DEFINE([_DEBUG_USB_IO_],[1], [Print verbose USB I/O messages]) +fi + +AC_MSG_CHECKING([whether to enable verbose USB communication messages]); +AC_MSG_RESULT($debug_usb_comms) +if test $debug_usb_comms = yes; then + AC_DEFINE([_DEBUG_USB_COMMS_],[1], [Print verbose USB communication messages]) +fi + + AC_ARG_ENABLE(parport, AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]), [build_parport=$enableval], [build_parport=no]) Modified: trunk/src/jtag/arm-jtag-ew.c =================================================================== --- trunk/src/jtag/arm-jtag-ew.c 2009-04-21 11:35:58 UTC (rev 1494) +++ trunk/src/jtag/arm-jtag-ew.c 2009-04-21 11:37:15 UTC (rev 1495) @@ -35,19 +35,6 @@ #include "log.h" -/* enable this to debug communication - */ -#if 1 -#define _DEBUG_USB_COMMS_ -#define _DEBUG_JTAG_IO_ -#endif - -#ifdef _DEBUG_JTAG_IO_ -#define DEBUG_JTAG_IO(expr ...) LOG_DEBUG(expr) -#else -#define DEBUG_JTAG_IO(expr ...) -#endif - #define USB_VID 0x15ba #define USB_PID 0x001e Modified: trunk/src/jtag/ft2232.c =================================================================== --- trunk/src/jtag/ft2232.c 2009-04-21 11:35:58 UTC (rev 1494) +++ trunk/src/jtag/ft2232.c 2009-04-21 11:37:15 UTC (rev 1495) @@ -58,18 +58,6 @@ #include <ftdi.h> #endif -/* enable this to debug io latency - */ -#if 0 -#define _DEBUG_USB_IO_ -#endif - -/* enable this to debug communication - */ -#if 0 -#define _DEBUG_USB_COMMS_ -#endif - static int ft2232_execute_queue(void); static int ft2232_speed(int speed); Modified: trunk/src/jtag/jlink.c =================================================================== --- trunk/src/jtag/jlink.c 2009-04-21 11:35:58 UTC (rev 1494) +++ trunk/src/jtag/jlink.c 2009-04-21 11:37:15 UTC (rev 1495) @@ -34,18 +34,6 @@ #include "log.h" -/* enable this to debug communication - */ -#if 0 -#define _DEBUG_USB_COMMS_ -#endif - -#ifdef _DEBUG_JTAG_IO_ -#define DEBUG_JTAG_IO(expr ...) LOG_DEBUG(expr) -#else -#define DEBUG_JTAG_IO(expr ...) -#endif - #define VID 0x1366 #define PID 0x0101 Modified: trunk/src/jtag/jtag.h =================================================================== --- trunk/src/jtag/jtag.h 2009-04-21 11:35:58 UTC (rev 1494) +++ trunk/src/jtag/jtag.h 2009-04-21 11:37:15 UTC (rev 1495) @@ -30,8 +30,10 @@ #include "command.h" -#if 0 -#define _DEBUG_JTAG_IO_ +#ifdef _DEBUG_JTAG_IO_ +#define DEBUG_JTAG_IO(expr ...) LOG_DEBUG(expr) +#else +#define DEBUG_JTAG_IO(expr ...) #endif #ifndef DEBUG_JTAG_IOZ |