|
|
|
@ -95,6 +95,20 @@ find_bootloader_ports() {
|
|
|
|
|
DEVICE_PORT_BOOTLOADER="$(perl ${DEVICE_PORT_PROBER} ${BOOTLOADER_VID} ${BOOTLOADER_PID})"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
find_bootloader_path() {
|
|
|
|
|
BOOTLOADER_FILE=$("${ARDUINO_BUILDER}" \
|
|
|
|
|
-hardware "${ARDUINO_PATH}/hardware" \
|
|
|
|
|
-hardware "${BOARD_HARDWARE_PATH}" \
|
|
|
|
|
${ARDUINO_TOOLS_FLAG:+"${ARDUINO_TOOLS_FLAG}"} ${ARDUINO_TOOLS_PARAM:+"${ARDUINO_TOOLS_PARAM}"} \
|
|
|
|
|
-tools "${ARDUINO_PATH}/tools-builder" \
|
|
|
|
|
-fqbn "${FQBN}" \
|
|
|
|
|
-build-path ${ARDUINO_PATH} \
|
|
|
|
|
-dump-prefs "${SKETCH_DIR}/${SKETCH}.ino" | grep "bootloader\.file=" | cut -d= -f2)
|
|
|
|
|
|
|
|
|
|
BOOTLOADER_FILE="${BOOTLOADER_FILE:-caterina/Caterina.hex}"
|
|
|
|
|
BOOTLOADER_PATH="${BOOTLOADER_PATH:-${BOARD_HARDWARE_PATH}/keyboardio/avr/bootloaders/${BOOTLOADER_FILE}}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MD5="md5sum"
|
|
|
|
|
|
|
|
|
|
if [ "${uname_S}" = "Darwin" ]; then
|
|
|
|
@ -188,11 +202,10 @@ AVRDUDE_CONF="${AVRDUDE_CONF:-${ARDUINO_TOOLS_PATH}/avr/etc/avrdude.conf}"
|
|
|
|
|
######
|
|
|
|
|
|
|
|
|
|
BOARD_HARDWARE_PATH="${BOARD_HARDWARE_PATH:-${ARDUINO_LOCAL_LIB_PATH}/hardware}"
|
|
|
|
|
BOOTLOADER_PATH="${BOOTLOADER_PATH:-${BOARD_HARDWARE_PATH}/keyboardio/avr/bootloaders/caterina/Caterina.hex}"
|
|
|
|
|
|
|
|
|
|
if [ ! -z "${ARDUINO_TOOLS_PATH}" ]; then
|
|
|
|
|
ARDUINO_TOOLS_PARAM="${ARDUINO_TOOLS_PATH}"
|
|
|
|
|
ARDUINO_TOOLS_FLAG="-tools"
|
|
|
|
|
ARDUINO_TOOLS_FLAG="-tools"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ ! -z "${AVR_GCC_PREFIX}" ]; then
|
|
|
|
|