2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
15 PKG_SOURCE_URL:=git://git.code.sf.net/p/openocd/code
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_VERSION:=$(PKG_VERSION)
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
20 PKG_LICENSE_FILES:=COPYING
22 PKG_MAINTAINER:=Paul Fertser <fercerpav@gmail.com>
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/nls.mk
31 define Package/openocd
34 TITLE:=OpenOCD Utility
35 URL:=http://openocd.sf.net/
36 DEPENDS:=+libusb-1.0 +libusb-compat +libftdi1 +hidapi
39 define Package/openocd/description
40 OpenOCD provides on-chip programming and debugging support with a
41 layered architecture of JTAG interface and TAP support including:
43 - (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
45 - debug target support (e.g. ARM, MIPS): single-stepping,
46 breakpoints/watchpoints, gprof profiling, etc;
47 - flash chip drivers (e.g. CFI, NAND, internal flash);
48 - embedded TCL interpreter for easy scripting.
50 Several network interfaces are available for interacting with OpenOCD:
51 telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
52 "remote target" for source-level debugging of embedded systems using
53 the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
63 --enable-usb_blaster_libftdi \
64 --enable-openjtag_ftdi \
65 --enable-presto_libftdi
69 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
72 define Package/openocd/install
73 $(INSTALL_DIR) $(1)/usr/bin
74 $(INSTALL_DIR) $(1)/usr/share/openocd
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openocd $(1)/usr/bin/
76 $(CP) $(PKG_INSTALL_DIR)/usr/share/openocd/scripts $(1)/usr/share/openocd
79 $(eval $(call BuildPackage,openocd))