Merge pull request #691 from keyboardio/arduino-1.8.10

Arduino 1.8.10 broke the build
pull/692/head
Jesse Vincent 5 years ago committed by GitHub
commit b79f2ea0eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -300,6 +300,7 @@ compile () {
-build-cache "${CORE_CACHE_PATH}" \ -build-cache "${CORE_CACHE_PATH}" \
-build-path "${BUILD_PATH}" \ -build-path "${BUILD_PATH}" \
-ide-version "${ARDUINO_IDE_VERSION}" \ -ide-version "${ARDUINO_IDE_VERSION}" \
-built-in-libraries "${ARDUINO_PATH}/libraries" \
-prefs "compiler.cpp.extra_flags=-std=c++11 -Woverloaded-virtual -Wno-unused-parameter -Wno-unused-variable -Wno-ignored-qualifiers ${ARDUINO_CFLAGS} ${LOCAL_CFLAGS}" \ -prefs "compiler.cpp.extra_flags=-std=c++11 -Woverloaded-virtual -Wno-unused-parameter -Wno-unused-variable -Wno-ignored-qualifiers ${ARDUINO_CFLAGS} ${LOCAL_CFLAGS}" \
$CCACHE_ENABLE \ $CCACHE_ENABLE \
-warnings all \ -warnings all \

@ -42,25 +42,32 @@ fi
# Shamelessly stolen from git's Makefile # Shamelessly stolen from git's Makefile
uname_S=$(uname -s 2>/dev/null || echo not) uname_S=$(uname -s 2>/dev/null || echo not)
find_max_prog_size() { find_max_prog_size() {
# SKETCH and -build-path in this command are here because of a bug introduced in Arduino 1.8.10
# https://github.com/arduino/arduino-builder/issues/341
VPIDS=$("${ARDUINO_BUILDER}" \ VPIDS=$("${ARDUINO_BUILDER}" \
-hardware "${ARDUINO_PATH}/hardware" \ -hardware "${ARDUINO_PATH}/hardware" \
-hardware "${BOARD_HARDWARE_PATH}" \ -hardware "${BOARD_HARDWARE_PATH}" \
${ARDUINO_TOOLS_FLAG:+"${ARDUINO_TOOLS_FLAG}"} ${ARDUINO_TOOLS_PARAM:+"${ARDUINO_TOOLS_PARAM}"} \ ${ARDUINO_TOOLS_FLAG:+"${ARDUINO_TOOLS_FLAG}"} ${ARDUINO_TOOLS_PARAM:+"${ARDUINO_TOOLS_PARAM}"} \
-tools "${ARDUINO_PATH}/tools-builder" \ -tools "${ARDUINO_PATH}/tools-builder" \
-fqbn "${FQBN}" \ -fqbn "${FQBN}" \
-dump-prefs | grep "upload\.maximum_size=") -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)} MAX_PROG_SIZE=${MAX_PROG_SIZE:-$(echo "${VPIDS}" | grep upload.maximum_size | head -n 1 | cut -d= -f2)}
} }
find_device_vid_pid() { find_device_vid_pid() {
# SKETCH and -build-path in this command are here because of a bug introduced in Arduino 1.8.10
# https://github.com/arduino/arduino-builder/issues/341
VPIDS=$("${ARDUINO_BUILDER}" \ VPIDS=$("${ARDUINO_BUILDER}" \
-hardware "${ARDUINO_PATH}/hardware" \ -hardware "${ARDUINO_PATH}/hardware" \
-hardware "${BOARD_HARDWARE_PATH}" \ -hardware "${BOARD_HARDWARE_PATH}" \
${ARDUINO_TOOLS_FLAG:+"${ARDUINO_TOOLS_FLAG}"} ${ARDUINO_TOOLS_PARAM:+"${ARDUINO_TOOLS_PARAM}"} \ ${ARDUINO_TOOLS_FLAG:+"${ARDUINO_TOOLS_FLAG}"} ${ARDUINO_TOOLS_PARAM:+"${ARDUINO_TOOLS_PARAM}"} \
-tools "${ARDUINO_PATH}/tools-builder" \ -tools "${ARDUINO_PATH}/tools-builder" \
-fqbn "${FQBN}" \ -fqbn "${FQBN}" \
-dump-prefs | grep "\.[vp]id=") -build-path ${ARDUINO_PATH} \
-dump-prefs "${SKETCH_DIR}/${SKETCH}.ino" || grep "\.[vp]id=")
VID=${VID:-$(echo "${VPIDS}" | grep build.vid= | cut -dx -f2)} VID=${VID:-$(echo "${VPIDS}" | grep build.vid= | cut -dx -f2)}
SKETCH_PID=${SKETCH_PID:-$(echo "${VPIDS}" | grep build.pid= | cut -dx -f2)} SKETCH_PID=${SKETCH_PID:-$(echo "${VPIDS}" | grep build.pid= | cut -dx -f2)}
BOOTLOADER_PID=${BOOTLOADER_PID:-$(echo "${VPIDS}" | grep bootloader.pid= | cut -dx -f2)} BOOTLOADER_PID=${BOOTLOADER_PID:-$(echo "${VPIDS}" | grep bootloader.pid= | cut -dx -f2)}

Loading…
Cancel
Save