From bb83186214fae6b75caf58a7f034ccc669fa0688 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Mon, 24 Feb 2020 13:15:14 -0800 Subject: [PATCH] Get the device prober on macOS to pass in the vid and pid we want --- etc/kaleidoscope-builder.conf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/etc/kaleidoscope-builder.conf b/etc/kaleidoscope-builder.conf index bb34669a..32a417e0 100644 --- a/etc/kaleidoscope-builder.conf +++ b/etc/kaleidoscope-builder.conf @@ -125,7 +125,7 @@ if [ "${uname_S}" = "Darwin" ]; then find_device_port() { DIR=$(dirname "$0") DEVICE_PORT_PROBER="${DIR}/find-device-port-macos" - DEVICE_PORT="$(perl ${DEVICE_PORT_PROBER})" + DEVICE_PORT="$(perl ${DEVICE_PORT_PROBER} ${VID} ${SKETCH_PID})" } reset_device_cmd() { @@ -139,9 +139,15 @@ if [ "${uname_S}" = "Darwin" ]; then MD5="md5" find_bootloader_ports() { + find_device_vid_pid DIR=$(dirname "$0") + BOOTLOADER_VID="${BOOTLOADER_VID:-${VID}}" DEVICE_PORT_PROBER="${DIR}/find-device-port-macos" - DEVICE_PORT_BOOTLOADER="$(perl ${DEVICE_PORT_PROBER})" + if [[ "${DEVICE_PORT_BOOTLOADER}" = "" ]]; then + DEVICE_PORT_BOOTLOADER="$(perl ${DEVICE_PORT_PROBER} ${BOOTLOADER_VID} ${BOOTLOADER_PID})" + else + echo "DEVICE_PORT_BOOTLOADER=\"${DEVICE_PORT_BOOTLOADER}\" predefined." + fi } elif [ "${uname_S}" = "FreeBSD" ]; then