diff options
author | thegala | 2020-03-20 00:57:03 +0100 |
---|---|---|
committer | thegala | 2020-03-20 00:57:03 +0100 |
commit | 008f403fd9371f2650e8cb09354dd120bdd4985b (patch) | |
tree | 2d33f1578ea4cc1f7a8463e9cdc675981cdde095 | |
download | aur-008f403fd9371f2650e8cb09354dd120bdd4985b.tar.gz |
Initial commit.
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | 80-fpga-ulx3s.rules | 7 | ||||
-rw-r--r-- | Makefile | 32 | ||||
-rw-r--r-- | PKGBUILD | 34 |
4 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e243feb6ad3c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = f32c-tools + pkgdesc = ULX2S / ULX3S FPGA JTAG programmer & tools (Lattice XP2 / ECP5) + pkgver = 0698352 + pkgrel = 1 + url = https://github.com/f32c/tools + arch = any + license = NONE + depends = python + provides = ujprog + provides = f32cup + provides = ft232r_flash + options = !strip + source = git+https://github.com/f32c/tools + source = 80-fpga-ulx3s.rules + source = Makefile + sha256sums = SKIP + sha256sums = 8ca346c65ca04f8b06e6877180b2f1eed7b7dbd8ce3ee5ad2d80da7158175686 + sha256sums = df040cc999654bb8357a66df4bf4fb4d8335716b2a728a0edeecb7918be00a0a + +pkgname = f32c-tools + diff --git a/80-fpga-ulx3s.rules b/80-fpga-ulx3s.rules new file mode 100644 index 000000000000..5d801ed35f5a --- /dev/null +++ b/80-fpga-ulx3s.rules @@ -0,0 +1,7 @@ +# file: /etc/udev/rules.d/80-fpga-ulx3s.rules +# this is for usb-serial tty device +SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", \ + MODE="664", GROUP="uucp" +# this is for ujprog libusb access +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", \ + GROUP="uucp", MODE="666" diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..bb6e3f46bc83 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +SRCS = ujprog.c +CFLAGS += -Wall -D__linux__ -std=gnu99 +INSTALL_DIR= /usr/bin + +# for linux on PC (i386/amd64) +ARCHNAME = $(shell uname -m)-linux-gnu +# for linux on raspberrypi-3 +# ARCHNAME = arm-linux-gnueabihf + +#FTLIB = /usr/lib/${ARCHNAME}/libftdi.a +#USBLIB = /usr/lib/${ARCHNAME}/libusb.a +FTLIB = -lftdi1 +USBLIB = -lusb +USBLIB-1.0 = -I/usr/include/libusb-1.0/ -lusb-1.0 + +ujprog: ${SRCS} + ${CC} ${CFLAGS} ${FTLIB} ${USBLIB} ${SRCS} -o ujprog + +flash: ft232r_flash.c + ${CC} ${CFLAGS} ${USBLIB-1.0} ft232r_flash.c ${FTLIB} -o ft232r_flash + +install: ujprog + install -m 4755 ujprog ${INSTALL_DIR} + +uninstall: ujprog + rm -f /usr/bin/ujprog + +clean: + rm -f ujprog ujprog.o *~ + +depend: + mkdep ${INCLUDES} ${SRCS} diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b1c57f10a2b4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,34 @@ +pkgname=f32c-tools +pkgver=0698352 +pkgrel=1 +pkgdesc="ULX2S / ULX3S FPGA JTAG programmer & tools (Lattice XP2 / ECP5)" +arch=('any') +url='https://github.com/f32c/tools' +license=('NONE') +depends=('python') +provides=("ujprog" "f32cup" "ft232r_flash") +source=("git+https://github.com/f32c/tools" + "80-fpga-ulx3s.rules" + "Makefile") +sha256sums=('SKIP' + '8ca346c65ca04f8b06e6877180b2f1eed7b7dbd8ce3ee5ad2d80da7158175686' + 'df040cc999654bb8357a66df4bf4fb4d8335716b2a728a0edeecb7918be00a0a') +options=(!strip) + +prepare() { + cd "${srcdir}/tools/ujprog" + rm -f Makefile + ln -s ../../../Makefile Makefile + make + make flash +} + +package() { + install -Dm755 "${srcdir}/tools/ujprog/ujprog" "${pkgdir}/usr/bin/ujprog" + install -Dm755 "${srcdir}/tools/ujprog/ft232r_flash" "${pkgdir}/usr/bin/ft232r_flash" + install -Dm755 "${srcdir}/tools/f32cup/f32cup.py" "${pkgdir}/usr/bin/f32cup" + install -Dm644 "${srcdir}/tools/f32cup/f32cup.ino" "${pkgdir}/usr/share/f32c-tools/f32cup/example/f32cup.ino" + install -Dm644 "80-fpga-ulx3s.rules" "${pkgdir}/usr/lib/udev/rules.d/80-fpga-ulx3s.rules" +} + +# vim:set ts=2 sw=2 et: |