|
|
@ -45,17 +45,15 @@ uname_O=$(uname -o 2>/dev/null || echo not)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
find_max_prog_size() {
|
|
|
|
find_max_prog_size() {
|
|
|
|
# https://github.com/arduino/arduino-builder/issues/341
|
|
|
|
MAX_PROG_SIZE=${MAX_PROG_SIZE:-$(get_arduino_pref 'upload.maximum_size')}
|
|
|
|
PREFS=$(dump_arduino_prefs | grep "upload\.maximum_size=")
|
|
|
|
|
|
|
|
MAX_PROG_SIZE=${MAX_PROG_SIZE:-$(echo "${PREFS}" | head -n 1 | cut -d= -f2)}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
find_device_vid_pid() {
|
|
|
|
find_device_vid_pid() {
|
|
|
|
VPIDS=$(dump_arduino_prefs | grep "\.[vp]id=")
|
|
|
|
VID=${VID:-$(get_arduino_pref 'build.vid')}
|
|
|
|
VID=${VID:-$(echo "${VPIDS}" | grep build.vid= | cut -dx -f2)}
|
|
|
|
SKETCH_PID=${SKETCH_PID:-$(get_arduino_pref 'build.pid')}
|
|
|
|
SKETCH_PID=${SKETCH_PID:-$(echo "${VPIDS}" | grep build.pid= | cut -dx -f2)}
|
|
|
|
BOOTLOADER_PID=${BOOTLOADER_PID:-$(get_arduino_pref 'bootloader.pid')}
|
|
|
|
BOOTLOADER_PID=${BOOTLOADER_PID:-$(echo "${VPIDS}" | grep bootloader.pid= | cut -dx -f2)}
|
|
|
|
BOOTLOADER_VID=${BOOTLOADER_VID:-$(get_arduino_pref 'bootloader.vid')}
|
|
|
|
BOOTLOADER_VID=${BOOTLOADER_VID:-$(echo "${VPIDS}" | grep bootloader.vid= | cut -dx -f2)}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -115,8 +113,7 @@ find_bootloader_ports() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
find_bootloader_path() {
|
|
|
|
find_bootloader_path() {
|
|
|
|
BOOTLOADER_FILE=$( dump_arduino_prefs | grep "bootloader\.file=" | cut -d= -f2)
|
|
|
|
BOOTLOADER_FILE=$( get_arduino_pref 'bootloader.file' )
|
|
|
|
|
|
|
|
|
|
|
|
BOOTLOADER_FILE="${BOOTLOADER_FILE:-caterina/Caterina.hex}"
|
|
|
|
BOOTLOADER_FILE="${BOOTLOADER_FILE:-caterina/Caterina.hex}"
|
|
|
|
BOOTLOADER_PATH="${BOOTLOADER_PATH:-${BOARD_HARDWARE_PATH}/keyboardio/avr/bootloaders/${BOOTLOADER_FILE}}"
|
|
|
|
BOOTLOADER_PATH="${BOOTLOADER_PATH:-${BOARD_HARDWARE_PATH}/keyboardio/avr/bootloaders/${BOOTLOADER_FILE}}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|