@ -53,7 +53,7 @@ find_max_prog_size() {
${ARDUINO_TOOLS_FLAG:+"${ARDUINO_TOOLS_FLAG}"} ${ARDUINO_TOOLS_PARAM:+"${ARDUINO_TOOLS_PARAM}"} \
-tools "${ARDUINO_PATH}/tools-builder" \
-fqbn "${FQBN}" \
-build-path ${ARDUINO_PATH} \
-build-path " ${ARDUINO_PATH}" \
-dump-prefs "${SKETCH_DIR}/${SKETCH}.ino" | grep "upload\.maximum_size=")
MAX_PROG_SIZE=${MAX_PROG_SIZE:-$(echo "${VPIDS}" | grep upload.maximum_size | head -n 1 | cut -d= -f2)}
}
@ -67,7 +67,7 @@ find_device_vid_pid() {
${ARDUINO_TOOLS_FLAG:+"${ARDUINO_TOOLS_FLAG}"} ${ARDUINO_TOOLS_PARAM:+"${ARDUINO_TOOLS_PARAM}"} \
-tools "${ARDUINO_PATH}/tools-builder" \
-fqbn "${FQBN}" \
-build-path ${ARDUINO_PATH} \
-build-path " ${ARDUINO_PATH}" \
-dump-prefs "${SKETCH_DIR}/${SKETCH}.ino" | grep "\.[vp]id=")
VID=${VID:-$(echo "${VPIDS}" | grep build.vid= | cut -dx -f2)}
SKETCH_PID=${SKETCH_PID:-$(echo "${VPIDS}" | grep build.pid= | cut -dx -f2)}
@ -103,7 +103,7 @@ find_bootloader_path() {
${ARDUINO_TOOLS_FLAG:+"${ARDUINO_TOOLS_FLAG}"} ${ARDUINO_TOOLS_PARAM:+"${ARDUINO_TOOLS_PARAM}"} \
-tools "${ARDUINO_PATH}/tools-builder" \
-fqbn "${FQBN}" \
-build-path ${ARDUINO_PATH} \
-build-path " ${ARDUINO_PATH}" \
-dump-prefs "${SKETCH_DIR}/${SKETCH}.ino" | grep "bootloader\.file=" | cut -d= -f2)
BOOTLOADER_FILE="${BOOTLOADER_FILE:-caterina/Caterina.hex}"