[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MacOS Support of Atmel-ICE in PDI mode with LIBHIDAPI (bug)
From: |
Brian Good |
Subject: |
MacOS Support of Atmel-ICE in PDI mode with LIBHIDAPI (bug) |
Date: |
Thu, 25 Mar 2021 09:40:59 -0400 |
I am a Mac user with an Atmel-ICE in PDI mode. Previously I used the signed
KEXT file to access the Atmel-ICE, but when I upgraded to MacOS Big Sur, this
no longer worked. After much searching, I realized avrdude has support for my
configuration via LIBHIDAPI in the most current code. When I attempted to use
that new code, I found a bug. So here is the bug and a question:
a) Bug
When you install LIBHIDAPI and then build avrdude from the latest version (on a
Mac), the HID code is not used. In looking through the code, I see that in
ac_cfg.h, the variable HAVE_LIBHIDAPI is not set even though configure finds
the library successfully. I realized that this is because in configure.ac, the
required AC_DEFINE command is missing. Below is a code snippet. The added
line is the AC_DEFINE (line 182 in my version of the code).
My version of the code is the latest avrdude I could locate. It compiles as
6.3-20210108 and I obtained it from GitHub (github.com/facchinm/avrdude.git).
Updated code below (one line added):
AH_TEMPLATE([HAVE_LIBHIDAPI],
[Define if HID support is enabled via libhidapi])
for _hidapi_lib in hidapi hidapi-hidraw hidapi-libusb; do
PKG_CHECK_MODULES([hidapi],[$_hidapi_lib],[have_libhidapi=yes],[true])
done
if test x$have_libhidapi = xyes; then
case $target in
*-*-darwin*)
LIBHIDAPI="-lhidapi -iframework CoreFoundation -framework IOKit"
;;
*)
LIBHIDAPI="$ac_cv_lib_hid_init"
;;
esac
AC_DEFINE([HAVE_LIBHIDAPI]) // Added to set define in ac_conf.h
fi
AC_SUBST(LIBHIDAPI, $LIBHIDAPI)
b) Question
Now my newbie question. It is completely not clear to me where to locate the
latest build of avrdude. When I go to the savannah.nongnu.org
<http://savannah.nongnu.org/> location, all I can see are the completed
releases (6.3 is the latest). When I go to GitHub (at the location mentioned
above), I find newer code but THAT code has a comment in it that it is not as
up to date as what I can find at savannah.nongnu.org
<http://savannah.nongnu.org/>. So I’m a bit perplexed there.
Thanks for your help and for a great product.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- MacOS Support of Atmel-ICE in PDI mode with LIBHIDAPI (bug),
Brian Good <=