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
11 PKG_SOURCE_VERSION
:=v0.12
.0
15 PKG_SOURCE_URL
:=https
://git.code.sf.net
/p
/openocd
/code
16 PKG_MIRROR_HASH
:=a8e0d311b6ebecb6d43b7c75ec59ec3efb0b0a2e424a959a2667975d4acb0829
18 PKG_LICENSE
:=GPL-2.0
-only
19 PKG_LICENSE_FILES
:=COPYING
21 PKG_MAINTAINER
:=Paul Fertser
<fercerpav@gmail.com
>
22 PKG_CPE_ID
:=cpe
:/a
:openocd
:open_on-chip_debugger
28 PKG_CONFIG_DEPENDS
:=CONFIG_PACKAGE_openocd_with_usb
30 include $(INCLUDE_DIR
)/package.mk
31 include $(INCLUDE_DIR
)/nls.mk
33 define Package
/openocd
36 TITLE
:=OpenOCD Utility
37 URL
:=http
://openocd.sf.net
/
38 DEPENDS
:=+libusb-1.0 \
45 define Package
/openocd
/description
46 OpenOCD provides on-chip programming and debugging support with a
47 layered architecture of JTAG interface and TAP support including
:
49 - (X
)SVF playback to facilitate automated boundary scan and FPGA
/CPLD
51 - debug target support
(e.g. ARM
, MIPS
): single-stepping
,
52 breakpoints
/watchpoints
, gprof profiling
, etc
;
53 - flash chip drivers
(e.g. CFI
, NAND
, internal flash
);
54 - embedded TCL interpreter for easy scripting.
56 Several network interfaces are available for interacting with OpenOCD
:
57 telnet
, TCL
, and GDB. The GDB server enables OpenOCD to function
as a
58 "remote target" for source-level debugging of embedded systems using
59 the GNU GDB program
(and the others who talk GDB protocol
, e.g. IDA
64 $(call Build
/Prepare
/Default
)
65 -$(RM
) $(PKG_BUILD_DIR
)/guess-rev.sh
66 -$(RM
) $(PKG_BUILD_DIR
)/jimtcl
/configure.ac
77 ifeq ($(CONFIG_TARGET_bcm27xx
),y
)
78 CONFIGURE_ARGS
+= --enable-bcm2835gpio
81 TARGET_CFLAGS
+= -DRELSTR
=\\\"-$(PKG_VERSION
)-$(PKG_RELEASE
)-OpenWrt
\\\"
85 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
)
88 define Package
/openocd
/install
89 $(INSTALL_DIR
) $(1)/usr
/bin
90 $(INSTALL_DIR
) $(1)/usr
/share
/openocd
91 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/openocd
$(1)/usr
/bin
/
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/openocd
/scripts
$(1)/usr
/share
/openocd
95 $(eval
$(call BuildPackage
,openocd
))