Merge pull request #698 from keyboardio/builder/bootloader-path

kaleidoscope-builder: Pull the bootloader file from boards.txt
pull/699/head
Jesse Vincent 5 years ago committed by GitHub
commit 03b088fb89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -216,6 +216,8 @@ hex_with_bootloader () {
compile compile
fi fi
find_bootloader_path
awk '/^:00000001FF/ == 0' "${HEX_FILE_PATH}" > "${HEX_FILE_WITH_BOOTLOADER_PATH}" awk '/^:00000001FF/ == 0' "${HEX_FILE_PATH}" > "${HEX_FILE_WITH_BOOTLOADER_PATH}"
echo "Using ${BOOTLOADER_PATH}" echo "Using ${BOOTLOADER_PATH}"
${MD5} "${BOOTLOADER_PATH}" ${MD5} "${BOOTLOADER_PATH}"

@ -95,6 +95,20 @@ find_bootloader_ports() {
DEVICE_PORT_BOOTLOADER="$(perl ${DEVICE_PORT_PROBER} ${BOOTLOADER_VID} ${BOOTLOADER_PID})" 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" MD5="md5sum"
if [ "${uname_S}" = "Darwin" ]; then if [ "${uname_S}" = "Darwin" ]; then
@ -188,7 +202,6 @@ AVRDUDE_CONF="${AVRDUDE_CONF:-${ARDUINO_TOOLS_PATH}/avr/etc/avrdude.conf}"
###### ######
BOARD_HARDWARE_PATH="${BOARD_HARDWARE_PATH:-${ARDUINO_LOCAL_LIB_PATH}/hardware}" 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 if [ ! -z "${ARDUINO_TOOLS_PATH}" ]; then
ARDUINO_TOOLS_PARAM="${ARDUINO_TOOLS_PATH}" ARDUINO_TOOLS_PARAM="${ARDUINO_TOOLS_PATH}"

Loading…
Cancel
Save