Merge pull request #1116 from allan/msp430

msp430
This commit is contained in:
Juan RP 2015-03-27 05:03:44 +01:00
commit 42191e0030
2 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,70 @@
# Template file for 'msp430-toolchain'
pkgname=msp430-toolchain
version=3.02.03.00
revision=1
short_desc="Toolchain for the TI MSP430 microprocessor"
maintainer="allan <mail@may.mooo.com>"
homepage="http://www.ti.com/tool/msp430-gcc-opensource"
license="GPL-2"
distfiles="http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/latest/exports/msp430-gcc-source.tar.bz2
http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/latest/exports/msp430-gcc-support-files.zip"
checksum="67179535e68951bfb82f8bb1bf099a716e921f11b1ad773c87a08b6054ed31b0
303b743fae597c8861c6bd85bb52d9b4ad51d6537bbc3f010b2e09c6a624651e"
nocross=yes
nostrip=yes
create_wrksrc=yes
hostmakedepends="unzip expect flex"
makedepends="tk-devel ncurses-devel"
_prefix=/usr/msp430
_target=msp430-none-elf
do_configure() {
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
mkdir obj-msp
cd obj-msp
../sources/tools/configure \
--prefix=$_prefix \
--enable-languages=c \
--program-prefix="msp430-" \
--disable-nls \
--enable-gold \
--target=$_target
}
do_build() {
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
cd obj-msp
sed -i 's:^prefix =.*:prefix = '${DESTDIR}'/@prefix@:' \
../sources/tools/libgloss/Makefile.in
sed -i 's:^LIBEXPAT .*:LIBEXPAT = @LIBEXPAT@ @BDYNAMIC@:' \
../sources/tools/gdb/Makefile.in
make ${makejobs} DESTDIR=${DESTDIR} all
}
do_install() {
cd obj-msp
sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
msp430-none-elf/libgloss/msp430/Makefile
sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
msp430-none-elf/430/libgloss/msp430/Makefile
sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
msp430-none-elf/large/libgloss/msp430/Makefile
make DESTDIR=${DESTDIR} prefix=${_prefix} install
# copy msp430-gcc-support-files.zip
cp ${wrksrc}/msp430-gcc-support-files/*.h \
${DESTDIR}/${_prefix}/${_target}/include/
cp ${wrksrc}/msp430-gcc-support-files/*.ld \
${DESTDIR}/${_prefix}/${_target}/lib/430/
mkdir -p ${DESTDIR}/usr/bin
cd ${DESTDIR}/${_prefix}/bin
for i in *
do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
done
}

12
srcpkgs/mspdebug/template Normal file
View File

@ -0,0 +1,12 @@
# Template file for 'mspdebug'
pkgname="mspdebug"
version=0.23
revision=1
build_style=gnu-makefile
short_desc="Debugger for MSP430 MCUs"
maintainer="allan <mail@may.mooo.com>"
license="GPL-2"
homepage="http://mspdebug.sourceforge.net"
distfiles="$SOURCEFORGE_SITE/$pkgname/${pkgname}-$version.tar.gz"
checksum=e5fe5b098c5d0ee1d9766be5531126eca4690c76d59e57112b5f3332b9da3a54
makedepends="readline-devel libusb-compat-devel"