diff options
author | John Whittington | 2018-01-29 12:11:14 +0000 |
---|---|---|
committer | John Whittington | 2018-02-13 14:21:44 +0000 |
commit | 4006e57b687558e3ec1309e39111fcb0b85421c2 (patch) | |
tree | e65991f7782fe70dbab740ed60b3a5aeff505464 | |
download | aur-4006e57b687558e3ec1309e39111fcb0b85421c2.tar.gz |
Initial commit - based upon arduino-avr-core
Move to packages folder in /usr/share/arduino
Add SRCINFO and optdepends comments
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | platform.patch | 81 |
3 files changed, 146 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9e9b01a12a1a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = arduino-samd-core + pkgdesc = Arduino support for SAMD21 series ARM 32 bit microcontrollers (used on Arduino M0 Pro, MKR1000, Arduino Zero etc.) + pkgver = 1.6.16 + pkgrel = 1 + url = https://github.com/arduino/ArduinoCore-samd + arch = any + license = GPL + depends = arm-none-eabi-gcc + depends = openocd + optdepends = arduino: Arduino IDE: IDE + optdepends = avr-dude: M0 uploading support + optdepends = bossa: Zero uploading support + options = !strip + source = https://github.com/arduino/ArduinoCore-samd/archive/1.6.16.tar.gz + source = https://downloads.arduino.cc/CMSIS-4.5.0.tar.bz2 + source = https://downloads.arduino.cc/CMSIS-Atmel-1.0.0.tar.bz2 + source = platform.patch + sha512sums = 598328e828163c2a44d8ac97e627de6fd0451b548dde11b41d97b4d0e3f5e5604d96fba272c7ac601b233c1999e47a2cd04f089acfb0e024a6229672e36cde53 + sha512sums = 97af9c847c0fec6abfe4769910351f1d85aa19d09b4eea88a3852b3d3f196c7f02b16e0fc9686bcff3d94f8cfae512ab7e550f8fa1abb8db87da7e95c56f5502 + sha512sums = e7286a162f63c0de23db684ebe58b79aade01c47f522b52838cb6adc937daa8a4403de9fdca69c9bae855e27d840843814874b7b18a1b0d360553057f28cd0fc + sha512sums = ffba11449577f8a7951672725504fd637e5e5a563bfe17ec39cfb6d973c41610a63bb0e8b71d2a6fefe88be169d9dec0dcca281866468738d90cfb712bcc1f68 + +pkgname = arduino-samd-core + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..037e0d095834 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: john <aur {at} jbrengineering {dot} co {dot} uk> + +pkgname=arduino-samd-core +pkgver=1.6.16 +pkgrel=1 +pkgdesc="Arduino support for SAMD21 series ARM 32 bit microcontrollers (used on Arduino M0 Pro, MKR1000, Arduino Zero etc.)" +arch=('any') +url="https://github.com/arduino/ArduinoCore-samd" +license=('GPL') +depends=('arm-none-eabi-gcc' + 'openocd') +makedepends=('') +optdepends=('arduino: Arduino IDE: IDE' + 'avr-dude: M0 uploading support' + 'bossa: Zero uploading support') +options=(!strip) +source=("https://github.com/arduino/ArduinoCore-samd/archive/1.6.16.tar.gz" + "https://downloads.arduino.cc/CMSIS-4.5.0.tar.bz2" + "https://downloads.arduino.cc/CMSIS-Atmel-1.0.0.tar.bz2" + "platform.patch") +sha512sums=('598328e828163c2a44d8ac97e627de6fd0451b548dde11b41d97b4d0e3f5e5604d96fba272c7ac601b233c1999e47a2cd04f089acfb0e024a6229672e36cde53' + '97af9c847c0fec6abfe4769910351f1d85aa19d09b4eea88a3852b3d3f196c7f02b16e0fc9686bcff3d94f8cfae512ab7e550f8fa1abb8db87da7e95c56f5502' + 'e7286a162f63c0de23db684ebe58b79aade01c47f522b52838cb6adc937daa8a4403de9fdca69c9bae855e27d840843814874b7b18a1b0d360553057f28cd0fc' + 'ffba11449577f8a7951672725504fd637e5e5a563bfe17ec39cfb6d973c41610a63bb0e8b71d2a6fefe88be169d9dec0dcca281866468738d90cfb712bcc1f68') + +prepare() +{ + # Prepare arduino samd core to be used with internal toolchains + cd "${srcdir}/ArduinoCore-samd-1.6.16" + patch -Np1 -i "${srcdir}/platform.patch" +} + +package() { + # Copy to archlinux arduino folder, within the packages sub directory structured as Arduino IDE + install -dm755 "${pkgdir}/usr/share/arduino/packages/arduino/hardware/samd" + install -dm755 "${pkgdir}/usr/share/arduino/packages/arduino/tools/CMSIS/4.5.0/" + install -dm755 "${pkgdir}/usr/share/arduino/packages/arduino/tools/CMSIS-Atmel/1.0.0/" + cp -a "${srcdir}/ArduinoCore-samd-1.6.16/"* "${pkgdir}/usr/share/arduino/packages/arduino/hardware/samd" + cp -a "${srcdir}/CMSIS/"* "${pkgdir}/usr/share/arduino/packages/arduino/tools/CMSIS/4.5.0/" + cp -a "${srcdir}/CMSIS-Atmel/"* "${pkgdir}/usr/share/arduino/packages/arduino/tools/CMSIS-Atmel/1.0.0/" +} diff --git a/platform.patch b/platform.patch new file mode 100644 index 000000000000..f67dd14fb84b --- /dev/null +++ b/platform.patch @@ -0,0 +1,81 @@ +From 321c218002f989dc7cb693bdabb69b6dd94589ce Mon Sep 17 00:00:00 2001 +From: John Whittington <git@jbrengineering.co.uk> +Date: Mon, 29 Jan 2018 11:23:45 +0000 +Subject: [PATCH] Patch toolchain and CMSIS path for arch + +--- + platform.txt | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/platform.txt b/platform.txt +index 03f054f..a22fa1a 100644 +--- a/platform.txt ++++ b/platform.txt +@@ -19,7 +19,7 @@ + # For more info: + # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification + +-name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards ++name=Arch Linux Arduino SAMD (32-bits ARM Cortex-M0+) Boards + version=1.6.16 + + # Compile variables +@@ -31,7 +31,7 @@ compiler.warning_flags.default= + compiler.warning_flags.more=-Wall + compiler.warning_flags.all=-Wall -Wextra + +-compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ ++compiler.path=/usr/bin/ + compiler.c.cmd=arm-none-eabi-gcc + compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD + compiler.c.elf.cmd=arm-none-eabi-gcc +@@ -64,8 +64,8 @@ compiler.S.extra_flags= + compiler.ar.extra_flags= + compiler.elf2hex.extra_flags= + +-compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.1.0.path}/CMSIS/Device/ATMEL/" +-compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math ++compiler.arm.cmsis.c.flags="-I/usr/share/arduino/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/" "-I/usr/share/arduino/packages/arduino/tools/CMSIS-Atmel/1.0.0/CMSIS/Device/ATMEL/" ++compiler.arm.cmsis.ldflags="-L/usr/share/arduino/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Lib/GCC/" -larm_cortexM0l_math + + # USB Flags + # --------- +@@ -117,7 +117,7 @@ recipe.size.regex=\.text\s+([0-9]+).* + # + # AVRDUDE + # +-tools.avrdude.path={runtime.tools.avrdude.path} ++tools.avrdude.path=/usr + tools.avrdude.cmd={path}/bin/avrdude + tools.avrdude.config.path={path}/etc/avrdude.conf + +@@ -131,7 +131,7 @@ tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if op + # + # BOSSA + # +-tools.bossac.path={runtime.tools.bossac-1.7.0.path} ++tools.bossac.path=/usr/bin/ + tools.bossac.cmd=bossac + tools.bossac.cmd.windows=bossac.exe + +@@ -148,7 +148,7 @@ tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port + # OpenOCD sketch upload + # + +-tools.openocd.path={runtime.tools.openocd-0.9.0-arduino6-static.path} ++tools.openocd.path=/usr/ + tools.openocd.cmd=bin/openocd + tools.openocd.cmd.windows=bin/openocd.exe + +@@ -177,7 +177,7 @@ tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/ + # FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences + # + +-tools.openocd-withbootsize.path={runtime.tools.openocd-0.9.0-arduino6-static.path} ++tools.openocd-withbootsize.path=/usr/ + tools.openocd-withbootsize.cmd=bin/openocd + tools.openocd-withbootsize.cmd.windows=bin/openocd.exe + +-- +2.16.1 + |