Date: Sun, 31 May 2009 16:18:43 +0200 From: CeDeROM <tomek.cedro@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Florent Thoumie <flz@FreeBSD.org> Subject: ports/135094: [new port] devel/openocd Message-ID: <3fcfb0ba0905310718x5b3b97ccs4713a8332aac0e06@mail.gmail.com> Resent-Message-ID: <200905311450.n4VEo1bT045557@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 135094 >Category: ports >Synopsis: [New port] devel/openocd - The Open On-Chip Debugger (OpenOCD) >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 31 14:50:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Tomek Cedro >Release: FreeBSD 7.2-RELEASE i386 >Organization: Tomek Cedro >Environment: System: FreeBSD amd64.home.aster.pl 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 UTC 2009 root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: [New port] devel/openocd - The Open On-Chip Debugger (OpenOCD) aims to provide debugging, in-system programming and boundary-scan testing for embedded target devices. >How-To-Repeat: >Fix: # 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: # # /usr/ports/devel/openocd # /usr/ports/devel/openocd/distinfo # /usr/ports/devel/openocd/Makefile # /usr/ports/devel/openocd/pkg-descr # /usr/ports/devel/openocd/pkg-plist # /usr/ports/devel/openocd/files # /usr/ports/devel/openocd/files/patch-openocd.c # /usr/ports/devel/openocd/pkg-message # echo c - /usr/ports/devel/openocd mkdir -p /usr/ports/devel/openocd > /dev/null 2>&1 echo x - /usr/ports/devel/openocd/distinfo sed 's/^X//' >/usr/ports/devel/openocd/distinfo << '3afeb637222531d093b8e5b2729bcff1' XMD5 (openocd-0.1.0.tar.gz) = 994b603d280ab85b5f255342c1d6b66c XSHA256 (openocd-0.1.0.tar.gz) = e468c907355727f7aede5623afd77721eb75abe7686af7f2f388f41a7c0f2911 XSIZE (openocd-0.1.0.tar.gz) = 985328 3afeb637222531d093b8e5b2729bcff1 echo x - /usr/ports/devel/openocd/Makefile sed 's/^X//' >/usr/ports/devel/openocd/Makefile << '88d611a1eb1fabe2051a56e779ff5244' X# New ports collection makefile for: openocd X# Date created: 31 May 2009 X# Whom: Tomek CeDeROM Cedro (http://www.tomek.cedro.info) X# X# $FreeBSD$ X# X XPORTNAME= openocd XPORTVERSION= 0.1.0 XCATEGORIES= devel XMASTER_SITES= ${MASTER_SITE_BERLIOS} XMASTER_SITE_SUBDIR= openocd X XMAINTAINER= tomek.cedro@gmail.com XCOMMENT= Open On-Chip Debugger X XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/ XMAN1= openocd.1 XINFO= ${PORTNAME} XUSE_GMAKE= yes XCFLAGS+= -I${PREFIX}/include -I${LOCALBASE}/include -L${PREFIX}/lib -L${LOCALBASE}/lib X XGNU_CONFIGURE= yes XCONFIGURE_ARGS= --enable-release XOPTIONS= DUMMY "Dummy driver support" on \ X FT2232 "FT2232 based USB devices (using libftdi)" on \ X RLINK "Raisonance RLink JTAG Programmer" on\ X JLINK "Segger J-Link JTAG Programmer" on\ X VSLLINK "Versaloon-Link JTAG Programmer" on\ X USBPROG "usbprog JTAG Programmer" on\ X PRESTO "ASIX Presto Programmer (using libftdi)" on\ X AT91RM9200 "AT91RM9200 based SBCs" on\ X EP93XX "EP93xx based SBCs" on X#Below are the interfaces that need source rewitre to work with FreeBSD X# They are hidden because they break a build. Patches are welcome :-) X# Type: make WITH_{OPTION}=1 to try the broken build (ie: make WITH_PARPORT=1) X# PARPORT "Enable building the pc parallel port driver" off\ X# Parport: parport.c:68:20: error: sys/io.h: No such file or directory X# AMTJTAGACCEL "Amontec JTAG-Accelerator driver" off \ X# Amtjtagaccel: amt_jtagaccel.c:45:20: error: sys/io.h: No such file or directory X# ECOSBOARD "eCosBoard based JTAG debugger" off\ X# Ecosboard: replacements.h:36:28: error: pkgconf/system.h: No such file or directory X# OOCDTRACE "OpenOCD+trace ETM capture device" off\ X# Oocdtrace: ocd_trace.c:127: error: 'B2500000' undeclared (first use in this function) X# GW16012 "Gateworks GW16012 JTAG Programmer" off\ X# Gw16012: gw16012.c:67:20: error: sys/io.h: No such file or directory X# HTTPD "Enable builtin httpd server" off\ X# microhttpd does not link properly, used by some Zyli cable X# IOUTIL "Enable ioutil functions" off X X.include <bsd.port.options.mk> X X.if defined(WITH_DUMMY) XCONFIGURE_ARGS+= --enable-dummy X.else XCONFIGURE_ARGS+= --disable-dummy X.endif X X.if defined(WITH_FT2232) XCONFIGURE_ARGS+= --enable-ft2232_libftdi XLIB_DEPENDS+= ftdi:${PORTSDIR}/devel/libftdi X.else XCONFIGURE_ARGS+= --disable-ft2232_libftdi X.endif X X.if defined(WITH_PARPORT) XCONFIGURE_ARGS+= --enable-parport X.else XCONFIGURE_ARGS+= --disable-parport X.endif X X.if defined(WITH_AMTJTAGACCEL) XCONFIGURE_ARGS+= --enable-amtjtagaccel XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-amtjtagaccel X.endif X X.if defined(WITH_ECOSBOARD) XCONFIGURE_ARGS+= --enable-ecosboard XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-ecosboard X.endif X X.if defined(WITH_RLINK) XCONFIGURE_ARGS+= --enable-rlink XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-rlink X.endif X X.if defined(WITH_JLINK) XCONFIGURE_ARGS+= --enable-jlink XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-jlink X.endif X X.if defined(WITH_VSLLINK) XCONFIGURE_ARGS+= --enable-vsllink XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-vsllink X.endif X X.if defined(WITH_OOCDTRACE) XCONFIGURE_ARGS+= --enable-oocd_trace XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-oocd_trace X.endif X X.if defined(WITH_USBPROG) XCONFIGURE_ARGS+= --enable-usbprog XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-usbprog X.endif X X.if defined(WITH_PRESTO) XCONFIGURE_ARGS+= --enable-presto_libftdi XLIB_DEPENDS+= ftdi:${PORTSDIR}/devel/libftdi X.else XCONFIGURE_ARGS+= --disable-presto_libftdi X.endif X X.if defined(WITH_GW16012) XCONFIGURE_ARGS+= --enable-gw16012 XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-gw16012 X.endif X X.if defined(WITH_AT91RM9200) XCONFIGURE_ARGS+= --enable-at91rm9200 XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-at91rm9200 X.endif X X.if defined(WITH_EP93XX) XCONFIGURE_ARGS+= --enable-ep93xx XLIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb X.else XCONFIGURE_ARGS+= --disable-ep93xx X.endif X X.if defined(WITH_HTTPD) XCONFIGURE_ARGS+= --enable-httpd XLIB_DEPENDS+= microhttpd:${PORTSDIR}/www/libmicrohttpd X.else XCONFIGURE_ARGS+= --disable-httpd X.endif X X.if defined(WITH_IOUTIL) XCONFIGURE_ARGS+= --enable-ioutil X.else XCONFIGURE_ARGS+= --disable-ioutil X.endif X Xpost-install: X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.mk> 88d611a1eb1fabe2051a56e779ff5244 echo x - /usr/ports/devel/openocd/pkg-descr sed 's/^X//' >/usr/ports/devel/openocd/pkg-descr << 'eacd5d8b52ed17b989af8d0f6d332e8a' XThe Open On-Chip Debugger (OpenOCD) aims to provide debugging, in-system Xprogramming and boundary-scan testing for embedded target devices. OpenOCD uses Xa "hardware interface dongle" to communicate with the JTAG (IEEE 1149.1) Xcompliant taps on your target board. OpenOCD currently supports many types Xof hardware dongles: USB based, parallel port based, and other standalone boxes Xthat run OpenOCD internally. It allows ARM7 (ARM7TDMI and ARM720t), XARM9 (ARM920T, ARM922T, ARM926EJ-S, ARM966E-S), XScale (PXA25x, IXP42x) and XCortex-M3 (Luminary Stellaris LM3 and ST STM32) based cores to be debugged Xvia the GDB protocol. Flash writing is supported for external CFI compatible XNOR flashes (Intel and AMD/Spansion command set) and several internal flashes X(LPC2000, AT91SAM7, STR7x, STR9x, LM3, and STM32x). Preliminary support for Xvarious NAND flash controllers (LPC3180, Orion, S3C24xx, more) controller is Xincluded. X XWWW: http://openocd.berlios.de/ eacd5d8b52ed17b989af8d0f6d332e8a echo x - /usr/ports/devel/openocd/pkg-plist sed 's/^X//' >/usr/ports/devel/openocd/pkg-plist << '8d321b66b84ec001e4d3f5bb4abf6c26' Xbin/openocd Xlib/openocd/board/arm_evaluator7t.cfg Xlib/openocd/board/at91rm9200-dk.cfg Xlib/openocd/board/eir.cfg Xlib/openocd/board/hammer.cfg Xlib/openocd/board/iar_str912_sk.cfg Xlib/openocd/board/imx27ads.cfg Xlib/openocd/board/imx31pdk.cfg Xlib/openocd/board/logicpd_imx27.cfg Xlib/openocd/board/olimex_sam7_ex256.cfg Xlib/openocd/board/pic-p32mx.cfg Xlib/openocd/board/stm3210e_eval.cfg Xlib/openocd/board/stm32f10x_128k_eval.cfg Xlib/openocd/board/x300t.cfg Xlib/openocd/ecos/at91eb40a.elf Xlib/openocd/interface/arm-usb-ocd.cfg Xlib/openocd/interface/at91rm9200.cfg Xlib/openocd/interface/calao-usb-a9260-c01.cfg Xlib/openocd/interface/calao-usb-a9260-c02.cfg Xlib/openocd/interface/calao-usb-a9260.cfg Xlib/openocd/interface/chameleon.cfg Xlib/openocd/interface/dummy.cfg Xlib/openocd/interface/flyswatter.cfg Xlib/openocd/interface/jlink.cfg Xlib/openocd/interface/jtagkey-tiny.cfg Xlib/openocd/interface/jtagkey.cfg Xlib/openocd/interface/luminary-libftdi.cfg Xlib/openocd/interface/luminary-lm3s811.cfg Xlib/openocd/interface/luminary.cfg Xlib/openocd/interface/olimex-arm-usb-ocd.cfg Xlib/openocd/interface/olimex-jtag-tiny-a.cfg Xlib/openocd/interface/openocd-usb.cfg Xlib/openocd/interface/parport.cfg Xlib/openocd/interface/parport_dlc5.cfg Xlib/openocd/interface/rlink.cfg Xlib/openocd/interface/signalyzer.cfg Xlib/openocd/interface/stm32-stick.cfg Xlib/openocd/interface/str9-comstick.cfg Xlib/openocd/interface/turtelizer2.cfg Xlib/openocd/target/aduc702x.cfg Xlib/openocd/target/at91eb40a.cfg Xlib/openocd/target/at91r40008.cfg Xlib/openocd/target/at91rm9200.cfg Xlib/openocd/target/at91sam9260.cfg Xlib/openocd/target/at91sam9260minimal.cfg Xlib/openocd/target/epc9301.cfg Xlib/openocd/target/imote2.cfg Xlib/openocd/target/imx27.cfg Xlib/openocd/target/imx31.cfg Xlib/openocd/target/ipx42x.cfg Xlib/openocd/target/is5114.cfg Xlib/openocd/target/lm3s3748.cfg Xlib/openocd/target/lm3s6965.cfg Xlib/openocd/target/lm3s811.cfg Xlib/openocd/target/lpc2129.cfg Xlib/openocd/target/lpc2148.cfg Xlib/openocd/target/lpc2148_2mhz.cfg Xlib/openocd/target/lpc2148_rclk.cfg Xlib/openocd/target/lpc2294.cfg Xlib/openocd/target/netx500.cfg Xlib/openocd/target/nslu2.cfg Xlib/openocd/target/omap5912.cfg Xlib/openocd/target/pic32mx.cfg Xlib/openocd/target/pxa255.cfg Xlib/openocd/target/pxa255_sst.cfg Xlib/openocd/target/pxa270.cfg Xlib/openocd/target/sam7se512.cfg Xlib/openocd/target/sam7x256.cfg Xlib/openocd/target/samsung_s3c2410.cfg Xlib/openocd/target/samsung_s3c2440.cfg Xlib/openocd/target/samsung_s3c4510.cfg Xlib/openocd/target/samsung_s3c6410.cfg Xlib/openocd/target/sharp_lh79532.cfg Xlib/openocd/target/smdk6410.cfg Xlib/openocd/target/smp8634.cfg Xlib/openocd/target/stm32.cfg Xlib/openocd/target/stm32stick.cfg Xlib/openocd/target/str710.cfg Xlib/openocd/target/str730.cfg Xlib/openocd/target/str750.cfg Xlib/openocd/target/str910-eval.cfg Xlib/openocd/target/str912.cfg Xlib/openocd/target/str9comstick.cfg Xlib/openocd/target/test_reset_syntax_error.cfg Xlib/openocd/target/test_syntax_error.cfg Xlib/openocd/target/wi-9c.cfg Xlib/openocd/target/xba_revA3.cfg Xlib/openocd/target/zy1000.cfg Xlib/openocd/tcl/bitsbytes.tcl Xlib/openocd/tcl/chip/atmel/at91/aic.tcl Xlib/openocd/tcl/chip/atmel/at91/at91sam7x128.tcl Xlib/openocd/tcl/chip/atmel/at91/at91sam7x256.tcl Xlib/openocd/tcl/chip/atmel/at91/pmc.tcl Xlib/openocd/tcl/chip/atmel/at91/rtt.tcl Xlib/openocd/tcl/chip/atmel/at91/usarts.tcl Xlib/openocd/tcl/chip/st/stm32/stm32.tcl Xlib/openocd/tcl/chip/st/stm32/stm32_rcc.tcl Xlib/openocd/tcl/chip/st/stm32/stm32_regs.tcl Xlib/openocd/tcl/cpu/arm/arm7tdmi.tcl Xlib/openocd/tcl/cpu/arm/arm920.tcl Xlib/openocd/tcl/cpu/arm/arm946.tcl Xlib/openocd/tcl/cpu/arm/arm966.tcl Xlib/openocd/tcl/cpu/arm/cortex_m3.tcl Xlib/openocd/tcl/memory.tcl Xlib/openocd/tcl/mmr_helpers.tcl Xlib/openocd/tcl/readable.tcl Xlib/openocd/xscale/debug_handler.bin Xshare/openocd/contrib/libdcc/README Xshare/openocd/contrib/libdcc/dcc_stdio.c Xshare/openocd/contrib/libdcc/dcc_stdio.h Xshare/openocd/contrib/libdcc/example.c Xshare/openocd/contrib/openocd.udev X@dirrm share/openocd/contrib/libdcc X@dirrm share/openocd/contrib X@dirrm share/openocd X@dirrm lib/openocd/xscale X@dirrm lib/openocd/tcl/cpu/arm X@dirrm lib/openocd/tcl/cpu X@dirrm lib/openocd/tcl/chip/st/stm32 X@dirrm lib/openocd/tcl/chip/st X@dirrm lib/openocd/tcl/chip/atmel/at91 X@dirrm lib/openocd/tcl/chip/atmel X@dirrm lib/openocd/tcl/chip X@dirrm lib/openocd/tcl X@dirrm lib/openocd/target X@dirrm lib/openocd/interface X@dirrm lib/openocd/ecos X@dirrm lib/openocd/board X@dirrm lib/openocd 8d321b66b84ec001e4d3f5bb4abf6c26 echo c - /usr/ports/devel/openocd/files mkdir -p /usr/ports/devel/openocd/files > /dev/null 2>&1 echo x - /usr/ports/devel/openocd/files/patch-openocd.c sed 's/^X//' >/usr/ports/devel/openocd/files/patch-openocd.c << '529dd6dcb3ebb9c3156bbe7df2145ffc' X--- src/openocd.c 2009-01-20 05:04:36.000000000 +0100 X+++ src/openocd.c 2009-05-19 23:12:06.000000000 +0200 X@@ -56,12 +56,6 @@ X #include <unistd.h> X #include <errno.h> X X-#ifdef _WIN32 X-#include <malloc.h> X-#else X-#include <alloca.h> X-#endif X- X #include "replacements.h" X X void print_version(void) X 529dd6dcb3ebb9c3156bbe7df2145ffc echo x - /usr/ports/devel/openocd/pkg-message sed 's/^X//' >/usr/ports/devel/openocd/pkg-message << '25d2c5af5cbf4af798994ca1a8d2288f' X=============================================================================== X XNow You can use OpenOCD. Handbook is at: http://openocd.berlios.de/doc/html/ X XTo allow an ordinary user acces to the hotplug USB interface add him Xto the operator group and add these lines to the following files: X X/etc/devfs.rules: X[localrules=10] X add path 'ugen*' mode 0660 group operator X X/etc/rc.conf: Xdevfs_system_ruleset="localrules" X X=============================================================================== 25d2c5af5cbf4af798994ca1a8d2288f exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3fcfb0ba0905310718x5b3b97ccs4713a8332aac0e06>