aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Common.mk6
-rw-r--r--HISTORY.md1
-rw-r--r--Sam.mk10
-rwxr-xr-xtests/script/bootstrap.sh1
-rw-r--r--tests/script/bootstrap/arduino.sh8
-rw-r--r--tests/script/bootstrap/samd.sh46
-rwxr-xr-xtests/script/runtests.sh2
7 files changed, 69 insertions, 5 deletions
diff --git a/Common.mk b/Common.mk
index 5421b96..65dc126 100644
--- a/Common.mk
+++ b/Common.mk
@@ -78,7 +78,11 @@ ifneq ($(TEST),)
MPIDE_DIR = $(DEPENDENCIES_MPIDE_DIR)
endif
- DEPENDENCIES_ARDUINO_DIR = $(DEPENDENCIES_DIR)/arduino-1.0.6
+ ifndef ARDUINO_IDE_DIR
+ ARDUINO_IDE_DIR := $(shell basename $(basename $(basename $(lastword $(wildcard $(DEPENDENCIES_DIR)/arduino*)))))
+ # ARDUINO_IDE_DIR := arduino
+ endif
+ DEPENDENCIES_ARDUINO_DIR = $(DEPENDENCIES_DIR)/$(ARDUINO_IDE_DIR)
ifeq ($(ARDUINO_DIR),)
ARDUINO_DIR = $(DEPENDENCIES_ARDUINO_DIR)
endif
diff --git a/HISTORY.md b/HISTORY.md
index 8950c7e..0641531 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -12,6 +12,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
- Fix: recognize serial monitors with full path in MONITOR_CMD
- Fix: Grab USB_PRODUCT and USB_MANUFACTURER from boards.txt for 32u4 boards (issue #594).
- Fix: Show the configuration when ARDUINO_QUIET=0
+- Fix: Travis build and bring Arduino IDE upto date
- Tweak: Move chip erase flag from set_fuses to ispload to prevent sketch being nuked when setting fuses
- Tweak: Set ARDMK_VERSION to 1.6 (https://github.com/sej7278)
- Tweak: Move non-standard-related items from CxxFLAGS_STD to CxxFLAGS (issue #523) (https://github.com/sej7278)
diff --git a/Sam.mk b/Sam.mk
index f11554f..2aa3078 100644
--- a/Sam.mk
+++ b/Sam.mk
@@ -31,6 +31,16 @@ ifndef COMMON_INCLUDED
include $(ARDMK_DIR)/Common.mk
endif
+ifneq ($(TEST),)
+ CORE_VER = 1.8.6
+ CMSIS_VER = 4.5.0
+ CMSIS_ATMEL_VER = 1.2.0
+ ALTERNATE_CORE_PATH = $(DEPENDENCIES_DIR)/samd
+ CMSIS_DIR = $(DEPENDENCIES_DIR)/CMSIS/CMSIS
+ CMSIS_ATMEL_DIR = $(DEPENDENCIES_DIR)/CMSIS-Atmel/CMSIS
+ ARM_TOOLS_DIR = $(basename $(basename $(firstword $(wildcard $(DEPENDENCIES_DIR)/gcc-arm-none-eabi*))))
+endif
+
ifndef ARDUINO_PACKAGE_DIR
# attempt to find based on Linux, macOS and Windows default
ARDUINO_PACKAGE_DIR := $(firstword \
diff --git a/tests/script/bootstrap.sh b/tests/script/bootstrap.sh
index 083bf5d..0dbd7b2 100755
--- a/tests/script/bootstrap.sh
+++ b/tests/script/bootstrap.sh
@@ -7,3 +7,4 @@ pushd $SCRIPTS_DIR/..
source $SCRIPTS_DIR/bootstrap/chipkit.sh
source $SCRIPTS_DIR/bootstrap/arduino.sh
+source $SCRIPTS_DIR/bootstrap/samd.sh
diff --git a/tests/script/bootstrap/arduino.sh b/tests/script/bootstrap/arduino.sh
index 7c2c9ac..371c0ef 100644
--- a/tests/script/bootstrap/arduino.sh
+++ b/tests/script/bootstrap/arduino.sh
@@ -8,7 +8,8 @@ if [ -z "$ARDUINO_DIR" ] || ! test -e $ARDUINO_DIR || [ $OS == "cygwin" ]; then
echo "Installing Arduino..."
- ARDUINO_BASENAME="arduino-1.0.6"
+ ARDUINO_BASENAME="arduino-1.8.11"
+
if [ $OS == "cygwin" ]; then
ARDUINO_FILE="$ARDUINO_BASENAME-windows".zip
EXTRACT_COMMAND="unzip -q"
@@ -16,8 +17,8 @@ if [ -z "$ARDUINO_DIR" ] || ! test -e $ARDUINO_DIR || [ $OS == "cygwin" ]; then
ARDUINO_FILE="$ARDUINO_BASENAME-macosx".zip
EXTRACT_COMMAND="unzip -q"
else
- ARDUINO_FILE="$ARDUINO_BASENAME-linux64".tgz
- EXTRACT_COMMAND="tar -xzf"
+ ARDUINO_FILE="$ARDUINO_BASENAME-linux64".tar.xz
+ EXTRACT_COMMAND="tar -xf"
fi
ARDUINO_URL=http://arduino.cc/download.php?f=/$ARDUINO_FILE
@@ -33,6 +34,7 @@ if [ -z "$ARDUINO_DIR" ] || ! test -e $ARDUINO_DIR || [ $OS == "cygwin" ]; then
then
echo "Installing Arduino to local folder..."
$EXTRACT_COMMAND $ARDUINO_FILE
+ mv $ARDUINO_BASENAME arduino
echo "Arduino installed"
fi
diff --git a/tests/script/bootstrap/samd.sh b/tests/script/bootstrap/samd.sh
new file mode 100644
index 0000000..fdd50f5
--- /dev/null
+++ b/tests/script/bootstrap/samd.sh
@@ -0,0 +1,46 @@
+set -e
+BOOTSTRAP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+source $BOOTSTRAP_DIR/common.sh
+
+echo "Installing dependencies for building for the SAMD boards"
+
+# these extract to dirs without versions...
+SAMD_PACKAGE="samd-1.8.6"
+CMSIS_PACKAGE="CMSIS-4.5.0"
+CMSIS_ATMEL_PACKAGE="CMSIS-Atmel-1.2.0"
+
+if [ $OS == "mac" ]; then
+ TOOLCHAIN_PACKAGE="gcc-arm-none-eabi-7-2017-q4-major-mac"
+else
+ TOOLCHAIN_PACKAGE="gcc-arm-none-eabi-7-2017-q4-major-linux"
+fi
+
+ARDUINO_URL=https://downloads.arduino.cc
+TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4
+
+EXTRACT_COMMAND="tar -xjf"
+
+_pushd $DEPENDENCIES_FOLDER
+if ! test -e $SAMD_PACKAGE
+then
+ echo "Downloading SAMD packages..."
+ download $ARDUINO_URL/cores/$SAMD_PACKAGE.tar.bz2 $SAMD_PACKAGE.tar.bz2
+ download $ARDUINO_URL/$CMSIS_PACKAGE.tar.bz2 $CMSIS_PACKAGE.tar.bz2
+ download $ARDUINO_URL/$CMSIS_ATMEL_PACKAGE.tar.bz2 $CMSIS_ATMEL_PACKAGE.tar.bz2
+ download $TOOLCHAIN_URL/$TOOLCHAIN_PACKAGE.tar.bz2 $TOOLCHAIN_PACKAGE.tar.bz2
+fi
+
+if ! test -d $SAMD_PACKAGE
+then
+ echo "Installing packages to local folder..."
+ $EXTRACT_COMMAND $SAMD_PACKAGE.tar.bz2
+ $EXTRACT_COMMAND $CMSIS_PACKAGE.tar.bz2
+ $EXTRACT_COMMAND $CMSIS_ATMEL_PACKAGE.tar.bz2
+ $EXTRACT_COMMAND $TOOLCHAIN_PACKAGE.tar.bz2
+ echo "SAMD support installed"
+fi
+
+_popd
+
+echo
+echo "${bldgreen}SAMD dependencies installed.$txtrst"
diff --git a/tests/script/runtests.sh b/tests/script/runtests.sh
index fd05c30..ba75fe4 100755
--- a/tests/script/runtests.sh
+++ b/tests/script/runtests.sh
@@ -7,7 +7,7 @@ failures=()
# These examples cannot be tested easily at the moment as they require
# alternate cores. The MakefileExample doesn't actually contain any source code
# to compile.
-NON_TESTABLE_EXAMPLES=(ATtinyBlink MakefileExample TinySoftWareSerial BlinkOpenCM BlinkOpenCR BlinkTeensy BlinkNetworkRPi BlinkInAVRC MZeroBlink ZeroBlink DueBlink)
+NON_TESTABLE_EXAMPLES=(ATtinyBlink MakefileExample TinySoftWareSerial BlinkOpenCM BlinkOpenCR BlinkTeensy BlinkNetworkRPi BlinkInAVRC DueBlink)
for dir in $TESTS_DIR/*/
do