Re: Native USB support for JTAG ICE mkII added

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Native USB support for JTAG ICE mkII added

Thomas Fischl
As Joerg Wunsch wrote:

> So the only requirement is the availability of
> usb_get_string_simple() in the version of libusb used, thus I've now
> based the autoconf decision for using USB on the availability of that
> function.

I don't have a JTAG ICE, but I've built my own USB programmer
(http://www.fischl.de/usbasp/) and use avrdude with libusb to communicate
with it, too. I noticed that for compiling on MacOS the line

AC_CHECK_LIB([usb], [usb_get_string_simple])

in configure.ac isn't enough, because two Darwin specific frameworks are
needed: CoreFoundation and IOKit. With following modification I can compile
avrdude with libusb support on MacOS:

# USB stuff
AH_TEMPLATE([HAVE_LIBUSB],
        [Define if USB support is enabled via libusb])
AC_CHECK_LIB(usb, main, have_libusb=yes)
if test x$have_libusb = xyes; then
   case $target in
        *-*-darwin*)
                LIBS="$LIBS -lusb -framework CoreFoundation -framework IOKit"
                ;;
        *)
                LIBS="$LIBS -lusb"
                ;;
   esac
   AC_DEFINE([HAVE_LIBUSB])
fi

Thomas

--
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl


_______________________________________________
avrdude-dev mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev