aboutsummaryrefslogtreecommitdiff
path: root/development/simavr
diff options
context:
space:
mode:
authorR. S. Ananda Murthy <rsamurti@gmail.com>2017-06-15 20:33:11 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-06-17 07:32:36 +0700
commit4ab69210a754422d560a19467ae0b80e5957fd21 (patch)
tree9261b538fec75faac4ad27ebdb0c0d072e826f9d /development/simavr
parentc59008b65f90ea1df35a5d4e70dd97b894280dd9 (diff)
development/simavr: Added (A lean, mean and hackable AVR simulator).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/simavr')
-rw-r--r--development/simavr/README9
-rw-r--r--development/simavr/simavr.SlackBuild92
-rw-r--r--development/simavr/simavr.info10
-rw-r--r--development/simavr/slack-desc19
4 files changed, 130 insertions, 0 deletions
diff --git a/development/simavr/README b/development/simavr/README
new file mode 100644
index 000000000000..192af90e2edb
--- /dev/null
+++ b/development/simavr/README
@@ -0,0 +1,9 @@
+simavr is a new AVR simulator for linux, or any platform that uses
+avr-gcc. It uses avr-gcc's own register definition to simplify creating
+new targets for supported AVR devices. The core was made to be small and
+compact, and hackable so allow quick prototyping of an AVR project. The
+AVR core is now stable for use with parts with <= 128KB flash, and with
+preliminary support for the bigger parts. The simulator loads ELF files
+directly, and there is even a way to specify simulation parameters
+directly in the emulated code using an .elf section. You can also
+load multipart HEX files.
diff --git a/development/simavr/simavr.SlackBuild b/development/simavr/simavr.SlackBuild
new file mode 100644
index 000000000000..508a322e2381
--- /dev/null
+++ b/development/simavr/simavr.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Slackware build script for simavr
+
+# Copyright 2014 R. S. Ananda Murthy, Mysore, India
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=simavr
+VERSION=${VERSION:-git20170615}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sed -i -e "s#\$(DESTDIR)/lib#\$(DESTDIR)/lib${LIBDIRSUFFIX}#" simavr/Makefile
+sed -i -e "s#libdir=${exec_prefix}/lib#libdir=${exec_prefix}/lib${LIBDIRSUFFIX}#" \
+ simavr/simavr.pc simavr/simavr-avr.pc
+
+make AVR_ROOT=/usr/avr RELEASE=1 build-simavr
+make PREFIX="/usr" DESTDIR="$PKG/usr" install
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README.* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a ./doc/manual/manual.pdf $PKG/usr/doc/$PRGNAM-$VERSION
+cp -r ./examples $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/simavr/simavr.info b/development/simavr/simavr.info
new file mode 100644
index 000000000000..f9f95e29c34a
--- /dev/null
+++ b/development/simavr/simavr.info
@@ -0,0 +1,10 @@
+PRGNAM="simavr"
+VERSION="git20170615"
+HOMEPAGE="https://github.com/buserror/simavr"
+DOWNLOAD="https://www.dropbox.com/s/i4jymt5o0hi3e5y/simavr-git20170615.tar.gz?dl=0"
+MD5SUM="651329385f68baedb0f74a363fa1d87d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="avr-gcc avr-libc"
+MAINTAINER="R. S. Ananda Murthy"
+EMAIL="rsamurti@gmail.com"
diff --git a/development/simavr/slack-desc b/development/simavr/slack-desc
new file mode 100644
index 000000000000..0d758df800a4
--- /dev/null
+++ b/development/simavr/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+simavr: simavr (A lean, mean and hackable AVR simulator)
+simavr:
+simavr: simavr uses avr-gcc's own register definition to simplify
+simavr: creating new targets for supported AVR devices. The core
+simavr: was made to be small and compact, and hackable so allow quick
+simavr: prototyping of an AVR project. The AVR core is now stable for
+simavr: use with parts with <= 128KB flash, and with preliminary support
+simavr: for the bigger parts. The simulator loads ELF files directly,
+simavr: and there is even a way to specify simulation parameters directly
+simavr: in the emulated code using an .elf section. You can also
+simavr: load multipart HEX files.