diff options
| author | Sudar Muthu <sudar@sudarmuthu.com> | 2020-09-03 07:22:54 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-03 07:22:54 +0530 |
| commit | e6881e2a43f02e0abf22bf28abc46b3c2e406d84 (patch) | |
| tree | 78df2b3c6e1fc185f13199add4f784026c58f6b6 /tests/script/bootstrap/samd.sh | |
| parent | 6f786a96b0acfb0c9b2d2f4e39911d2803088729 (diff) | |
| parent | 2329d19b97a3a3a115b6a414a6235f5d398bae2b (diff) | |
Merge pull request #640 from tuna-f1sh/travis
Fix Travis CI, add SAMD test support, support GNU grep on macOS
Diffstat (limited to 'tests/script/bootstrap/samd.sh')
| -rw-r--r-- | tests/script/bootstrap/samd.sh | 46 |
1 files changed, 46 insertions, 0 deletions
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" |
