From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Feb 5 03:45:27 2011 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62A3D106566C; Sat, 5 Feb 2011 03:45:27 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id B933E8FC0A; Sat, 5 Feb 2011 03:45:26 +0000 (UTC) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p151e21n016338; Sat, 5 Feb 2011 12:40:02 +1100 Received: from server.vk2pj.dyndns.org (c220-239-52-50.belrs4.nsw.optusnet.com.au [220.239.52.50]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p151dvcZ024223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 5 Feb 2011 12:39:58 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id p151du9p007188; Sat, 5 Feb 2011 12:39:56 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id p151dt7P007187; Sat, 5 Feb 2011 12:39:55 +1100 (EST) (envelope-from peter) Date: Sat, 5 Feb 2011 12:39:55 +1100 From: Peter Jeremy To: nox@FreeBSD.org Message-ID: <20110205013955.GB20095@server.vk2pj.dyndns.org> References: <201102050115.p151FgJx095498@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <201102050115.p151FgJx095498@freefall.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/154517: New port devel/mspdebug - TI MSP430 development board interface X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2011 03:45:27 -0000 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Feb-05 01:15:42 +0000, nox@FreeBSD.org wrote: >Needs more work for 7.x: Sorry, I didn't have any way to test it there. Try the following replacement shar (which fixes Makefile and files/patch-Makefile). # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # mspdebug # mspdebug/Makefile # mspdebug/distinfo # mspdebug/files # mspdebug/files/patch-Makefile # mspdebug/files/patch-bsl.c # mspdebug/files/patch-elf32.c # mspdebug/files/patch-olimex.c # mspdebug/files/patch-rf2500.c # mspdebug/files/patch-uif.c # mspdebug/files/patch-usbutil.c # mspdebug/pkg-descr # echo c - mspdebug mkdir -p mspdebug > /dev/null 2>&1 echo x - mspdebug/Makefile sed 's/^X//' >mspdebug/Makefile << '62f54ccedb42232168dd717570103d55' X# New ports collection makefile for: mspdebug X# Date created: 30 Jan 2011 X# Whom: Peter Jeremy X# X# $FreeBSD$ X# X# Based on the OpenBSD port by: Jasper Lievisse Adriaanse X XPORTNAME=3D mspdebug XPORTVERSION=3D 0.13 XCATEGORIES=3D devel XMASTER_SITES=3D SF/${PORTNAME} X XMAINTAINER=3D peterjeremy@acm.org XCOMMENT=3D Debugger for use with MSP 430 MCUs X XLICENSE=3D GPLv2 X XMAN1=3D mspdebug.1 XUSE_GMAKE=3D yes X XPLIST_FILES=3D bin/mspdebug X X.include X X.if ${OSVERSION} < 800069 XLIB_DEPENDS+=3D usb:${PORTSDIR}/devel/libusb X.endif X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/mspdebug ${PREFIX}/bin X ${INSTALL_MAN} ${WRKSRC}/mspdebug.man ${PREFIX}/man/man1/mspdebug.1 X X.include 62f54ccedb42232168dd717570103d55 echo x - mspdebug/distinfo sed 's/^X//' >mspdebug/distinfo << 'f99fcc0913256d8e68f3931eae8dfbcc' XSHA256 (mspdebug-0.13.tar.gz) =3D 7f77cbe2bab245cf50647a2bd23e803fe22e2d21= a2b0953e0551ebf3e72fc48e XSIZE (mspdebug-0.13.tar.gz) =3D 91556 f99fcc0913256d8e68f3931eae8dfbcc echo c - mspdebug/files mkdir -p mspdebug/files > /dev/null 2>&1 echo x - mspdebug/files/patch-Makefile sed 's/^X//' >mspdebug/files/patch-Makefile << '6e63685a3a2d2925bc3686d0cd6= c0e13' X--- Makefile.orig 2010-11-09 08:40:57.000000000 +1100 X+++ Makefile 2011-02-05 12:36:25.710676671 +1100 X@@ -26,17 +26,27 @@ X READLINE_LIBS =3D X else X READLINE_CFLAGS =3D -DUSE_READLINE X- READLINE_LIBS =3D -lreadline X+ READLINE_LIBS =3D -lreadline -ltermcap X endif X=20 X-# Mac OS X/MacPorts stuff X UNAME :=3D $(shell sh -c 'uname -s') X-ifeq ($(UNAME),Darwin) X- MACPORTS_CFLAGS =3D -I/opt/local/include X- MACPORTS_LDFLAGS =3D -L/opt/local/lib X+ifeq ($(UNAME),Darwin) # Mac OS X/MacPorts stuff X+ PORTS_CFLAGS =3D -I/opt/local/include X+ PORTS_LDFLAGS =3D -L/opt/local/lib X else X- MACPORTS_CFLAGS =3D X- MACPORTS_LDFLAGS =3D X+ ifeq ($(UNAME),OpenBSD) # OpenBSD Ports stuff X+ PORTS_CFLAGS =3D `pkg-config --cflags libelf libusb` X+ PORTS_LDFLAGS =3D `pkg-config --libs libelf libusb` X+ else X+ ifeq ($(UNAME),FreeBSD) # FreeBSD Ports stuff X+# This is only needed prior to FreeBSD 8.x to find libusb X+ PORTS_CFLAGS =3D -I${LOCALBASE}/include X+ PORTS_LDFLAGS =3D -L${LOCALBASE}/lib X+ else X+ PORTS_CFLAGS =3D X+ PORTS_LDFLAGS =3D X+ endif X+ endif X endif X=20 X MSPDEBUG_CFLAGS =3D -O1 -Wall -Wno-char-subscripts -ggdb X@@ -60,7 +70,7 @@ X reader.o vector.o output_util.o expr.o fet_error.o binfile.o \ X fet_db.o usbutil.o titext.o srec.o device.o coff.o opdb.o output.o \ X cmddb.o stdcmd.o prog.o flash_bsl.o X- $(CC) $(LDFLAGS) $(MACPORTS_LDFLAGS) -o $@ $^ -lusb $(READLINE_LIBS) X+ $(CC) $(LDFLAGS) $(PORTS_LDFLAGS) -o $@ $^ -lusb $(READLINE_LIBS) X=20 X .c.o: X- $(CC) $(CFLAGS) $(MACPORTS_CFLAGS) $(READLINE_CFLAGS) $(MSPDEBUG_CFLAGS)= -o $@ -c $*.c X+ $(CC) $(CFLAGS) $(PORTS_CFLAGS) $(READLINE_CFLAGS) $(MSPDEBUG_CFLAGS) -o= $@ -c $*.c 6e63685a3a2d2925bc3686d0cd6c0e13 echo x - mspdebug/files/patch-bsl.c sed 's/^X//' >mspdebug/files/patch-bsl.c << '9802d07c5d8f6fdd1f522640f59602= 28' X--- bsl.c.orig Mon Nov 8 22:40:57 2010 X+++ bsl.c Thu Dec 2 13:05:14 2010 X@@ -31,7 +31,7 @@ X #include "output.h" X #include "fet_error.h" X=20 X-#ifdef __APPLE__ X+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) X #define B460800 460800 X #endif X=20 9802d07c5d8f6fdd1f522640f5960228 echo x - mspdebug/files/patch-elf32.c sed 's/^X//' >mspdebug/files/patch-elf32.c << 'a3ac942f09e28aa939d3cfe3fd58= c6b5' X--- elf32.c.orig Wed Aug 4 04:08:43 2010 X+++ elf32.c Thu Aug 12 12:51:04 2010 X@@ -19,7 +19,7 @@ X #include X #include X #include X-#ifdef __APPLE__ X+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) X #include X #else X #include a3ac942f09e28aa939d3cfe3fd58c6b5 echo x - mspdebug/files/patch-olimex.c sed 's/^X//' >mspdebug/files/patch-olimex.c << '6a36b910c5ce323065940949d86= e8378' X--- olimex.c.orig 2010-11-09 08:40:57.000000000 +1100 X+++ olimex.c 2011-01-23 20:52:02.005008013 +1100 X@@ -20,6 +20,7 @@ X #include X #include X #include X+#include X=20 X #include "olimex.h" X #include "util.h" X@@ -66,7 +67,7 @@ X static int open_interface(struct olimex_transport *tr, X struct usb_device *dev, int ino) X { X-#if !(defined (__APPLE__) || defined(WIN32)) X+#if defined(__linux__) X int drv; X char drName[256]; X #endif X@@ -82,7 +83,7 @@ X return -1; X } X=20 X-#if !(defined(__APPLE__) || defined(WIN32)) X+#if defined(__linux__) X drv =3D usb_get_driver_np(tr->handle, tr->int_number, drName, X sizeof(drName)); X printc(__FILE__" : driver %d\n", drv); 6a36b910c5ce323065940949d86e8378 echo x - mspdebug/files/patch-rf2500.c sed 's/^X//' >mspdebug/files/patch-rf2500.c << 'f4d7e98f698abe17fa25c94360c= 102f5' X--- rf2500.c.orig 2010-11-09 08:40:57.000000000 +1100 X+++ rf2500.c 2011-01-23 20:51:40.771589070 +1100 X@@ -19,6 +19,7 @@ X #include X #include X #include X+#include X=20 X #include "rf2500.h" X #include "util.h" X@@ -67,7 +68,7 @@ X return -1; X } X=20 X-#if !(defined(__APPLE__) || defined(WIN32)) X+#if !(defined(__APPLE__) || defined(WIN32) || defined(__OpenBSD__) || def= ined(__FreeBSD__)) X if (usb_detach_kernel_driver_np(tr->handle, tr->int_number) < 0) X pr_error("rf2500: warning: can't " X "detach kernel driver"); X@@ -221,7 +222,7 @@ X #ifndef __APPLE__ X while (usb_bulk_read(tr->handle, USB_FET_IN_EP, X buf, sizeof(buf), X- 100) >=3D 0); X+ 100) > 0); X #endif X=20 X return (transport_t)tr; f4d7e98f698abe17fa25c94360c102f5 echo x - mspdebug/files/patch-uif.c sed 's/^X//' >mspdebug/files/patch-uif.c << 'b4f3352a4f860c2acf42c0f7108ced= 7d' X--- uif.c.orig Mon Nov 8 22:40:57 2010 X+++ uif.c Thu Dec 2 13:05:36 2010 X@@ -25,7 +25,9 @@ X #include X #include X=20 X+#if defined(__linux__) X #include X+#endif X #include X #include X=20 X@@ -33,7 +35,7 @@ X #include "util.h" X #include "output.h" X=20 X-#ifdef __APPLE__ X+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) X #define B460800 460800 X #define B500000 500000 X #endif X@@ -85,6 +87,7 @@ static void serial_destroy(transport_t tr_base) X free(tr); X } X=20 X+#if defined(__linux__) X static int open_olimex_iso(const char *device) X { X int fd =3D open(device, O_RDWR | O_NOCTTY); X@@ -112,6 +115,7 @@ static int open_olimex_iso(const char *device) X=20 X return fd; X } X+#endif X=20 X transport_t uif_open(const char *device, uif_type_t type) X { X@@ -138,8 +142,12 @@ transport_t uif_open(const char *device, uif_type_t ty X break; X=20 X case UIF_TYPE_OLIMEX_ISO: X+#if defined(__linux__) X printc("Trying to open Olimex (ISO) on %s...\n", device); X tr->serial_fd =3D open_olimex_iso(device); X+#else X+ printc_err("uif_open: ioctl TIOCSSERIAL not supported on this platform\= n"); X+#endif X break; X } X=20 b4f3352a4f860c2acf42c0f7108ced7d echo x - mspdebug/files/patch-usbutil.c sed 's/^X//' >mspdebug/files/patch-usbutil.c << '9a370be533e0e10cd3f3b256f9= 9d53d0' X--- usbutil.c.orig 2010-11-09 08:40:57.000000000 +1100 X+++ usbutil.c 2011-01-23 20:53:11.561100726 +1100 X@@ -17,6 +17,7 @@ X */ X=20 X #include X+#include X #include X #include "usbutil.h" X #include "util.h" 9a370be533e0e10cd3f3b256f99d53d0 echo x - mspdebug/pkg-descr sed 's/^X//' >mspdebug/pkg-descr << 'b2998e4ab3d0d37f96b600b4851c1f6f' XMSPDebug is a free debugger for use with MSP430 MCUs. It supports XFET430UIF, eZ430, RF2500 and Olimex MSP-JTAG-TINY programmers. It can be Xused as a proxy for gdb or as an independent debugger with support for Xprogramming, disassembly and reverse engineering. X XWWW: http://mspdebug.sourceforge.net/ b2998e4ab3d0d37f96b600b4851c1f6f exit --=20 Peter Jeremy --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAk1MqmsACgkQ/opHv/APuIeHDwCfQIzJfG2NxxAB8lC434gp7J4/ BgsAnjRv4JyVKLn9k8BFSnlmPFF1Fzom =7Gp9 -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD--