aboutsummaryrefslogtreecommitdiff
path: root/utils/openocd
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2015-01-18 02:20:57 +0300
committerPaul Fertser <fercerpav@gmail.com>2015-02-01 21:18:00 +0300
commit361c32067813e890a0dd9c116454773c61ec2621 (patch)
tree6c4c80c01e7e8bc9c4b9c0109716944a53dd590e /utils/openocd
parentd045b028838f817a39ecf1b4b4753b69196cf485 (diff)
openocd: add OpenOCD, a tool to work with on-chip debug and JTAG
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'utils/openocd')
-rw-r--r--utils/openocd/Makefile77
1 files changed, 77 insertions, 0 deletions
diff --git a/utils/openocd/Makefile b/utils/openocd/Makefile
new file mode 100644
index 000000000..929574b90
--- /dev/null
+++ b/utils/openocd/Makefile
@@ -0,0 +1,77 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=openocd
+PKG_VERSION:=v0.8.0-258-gd537cfa
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://git.code.sf.net/p/openocd/code
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_MAINTAINER:=Paul Fertser <fercerpav@gmail.com>
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/openocd
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=OpenOCD Utility
+ URL:=http://openocd.sf.net/
+ DEPENDS:=+libusb-1.0 +libftdi +hidapi
+endef
+
+define Package/openocd/description
+OpenOCD provides on-chip programming and debugging support with a
+layered architecture of JTAG interface and TAP support including:
+
+- (X)SVF playback to faciliate automated boundary scan and FPGA/CPLD
+ programming;
+- debug target support (e.g. ARM, MIPS): single-stepping,
+ breakpoints/watchpoints, gprof profiling, etc;
+- flash chip drivers (e.g. CFI, NAND, internal flash);
+- embedded TCL interpreter for easy scripting.
+
+Several network interfaces are available for interacting with OpenOCD:
+telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
+"remote target" for source-level debugging of embedded systems using
+the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
+Pro).
+endef
+
+CONFIGURE_ARGS += \
+ --prefix="/usr" \
+ --disable-werror \
+ --enable-dummy \
+ --enable-sysfsgpio \
+ --enable-usb_blaster_libftdi \
+ --enable-openjtag_ftdi \
+ --enable-presto_libftdi
+
+define Build/Compile
+ +$(MAKE_VARS) \
+ $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
+endef
+
+define Package/openocd/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/share/openocd
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openocd $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/openocd/scripts $(1)/usr/share/openocd
+endef
+
+$(eval $(call BuildPackage,openocd))