package/openocd: allow CMSIS-DAP support
authorMatt Wood <mattwood2000@gmail.com>
Mon, 7 Jan 2019 17:12:19 +0000 (12:12 -0500)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 6 Feb 2019 11:00:13 +0000 (12:00 +0100)
In commit aa441aa84c38ad5319c4ff7fb27c84530e19c204 ("openocd: bump to
version 0.8.0"), some logic in openocd.mk was added to enable
CMSIS-DAP when BR2_PACKAGE_OPENOCD_CMSIS_DAP is enabled, but this
option was not created, because hidapi was not packaged in
Buildroot. This package now exists, so we can create
BR2_PACKAGE_OPENOCD_CMSIS_DAP and really make it possible to build
CMSIS DAP support.

Signed-off-by: Matt Wood <mattwood2000@gmail.com>
[Thomas:
 - rework commit log
 - add missing "depends on" in Config.in]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/openocd/Config.in
package/openocd/openocd.mk

index 6cba7a04c869741a481f63d33d6ae03fa1ae90ab..d8af37b7f979e9844fabb1f4369de42271b55d8f 100644 (file)
@@ -9,6 +9,17 @@ if BR2_PACKAGE_OPENOCD
 
 comment "Adapters"
 
+config BR2_PACKAGE_OPENOCD_CMSIS_DAP
+       bool "CMSIS-DAP compliant debuggers"
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
+       depends on BR2_PACKAGE_HAS_UDEV # hidapi
+       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # hidapi
+       select BR2_PACKAGE_LIBUSB
+       select BR2_PACKAGE_HIDAPI
+       help
+          Enable support for CMSIS-DAP compliant debuggers (i.e
+          Atmel/Microchip EDBG, etc.)
+
 config BR2_PACKAGE_OPENOCD_FTDI
        bool "MPSSE mode of FTDI based devices"
        depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
index ca13d99366c1451cc9aaf7c3e6c20fe4c5a396a4..d35ed77cd1bf8ddb77a3ffb9dc7049ce7df6a00c 100644 (file)
@@ -35,7 +35,8 @@ OPENOCD_DEPENDENCIES = \
        $(if $(BR2_PACKAGE_LIBFTDI1),libftdi1) \
        $(if $(BR2_PACKAGE_LIBUSB),libusb) \
        $(if $(BR2_PACKAGE_LIBUSB_COMPAT),libusb-compat) \
-       $(if $(BR2_PACKAGE_LIBHID),libhid)
+       $(if $(BR2_PACKAGE_LIBHID),libhid) \
+       $(if $(BR2_PACKAGE_HIDAPI),hidapi)
 
 # Adapters
 OPENOCD_CONF_OPTS += \