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.10
.0-1000-gdb23c13d
12 PKG_VERSION
:=$(PKG_SOURCE_VERSION
)
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE_URL
:=git
://git.code.sf.net
/p
/openocd
/code
18 PKG_MIRROR_HASH
:=6f8c0ecf240427654ad5e911b44f78996da931209280f4a19c1215802ff14638
21 PKG_LICENSE_FILES
:=COPYING
23 PKG_MAINTAINER
:=Paul Fertser
<fercerpav@gmail.com
>
24 PKG_CPE_ID
:=cpe
:/a
:openocd
:open_on-chip_debugger
30 PKG_CONFIG_DEPENDS
:=CONFIG_PACKAGE_openocd_with_usb
32 include $(INCLUDE_DIR
)/package.mk
33 include $(INCLUDE_DIR
)/nls.mk
35 define Package
/openocd
38 TITLE
:=OpenOCD Utility
39 URL
:=http
://openocd.sf.net
/
40 DEPENDS
:=+PACKAGE_openocd_with_usb
:libusb-1.0 \
41 +PACKAGE_openocd_with_usb
:libusb-compat \
42 +PACKAGE_openocd_with_usb
:libftdi1 \
43 +PACKAGE_openocd_with_usb
:hidapi
46 define Package
/openocd
/config
48 config PACKAGE_openocd_with_usb
49 bool
"Build with support for USB adapters."
54 define Package
/openocd
/description
55 OpenOCD provides on-chip programming and debugging support with a
56 layered architecture of JTAG interface and TAP support including
:
58 - (X
)SVF playback to facilitate automated boundary scan and FPGA
/CPLD
60 - debug target support
(e.g. ARM
, MIPS
): single-stepping
,
61 breakpoints
/watchpoints
, gprof profiling
, etc
;
62 - flash chip drivers
(e.g. CFI
, NAND
, internal flash
);
63 - embedded TCL interpreter for easy scripting.
65 Several network interfaces are available for interacting with OpenOCD
:
66 telnet
, TCL
, and GDB. The GDB server enables OpenOCD to function
as a
67 "remote target" for source-level debugging of embedded systems using
68 the GNU GDB program
(and the others who talk GDB protocol
, e.g. IDA
73 $(call Build
/Prepare
/Default
)
74 -$(RM
) $(PKG_BUILD_DIR
)/guess-rev.sh
81 $(if
$(CONFIG_PACKAGE_openocd_with_usb
),,PKG_CONFIG
=false
) \
85 TARGET_CFLAGS
+= -DRELSTR
=\\\"-$(PKG_VERSION
)-$(PKG_RELEASE
)-OpenWrt
\\\"
89 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
)
92 define Package
/openocd
/install
93 $(INSTALL_DIR
) $(1)/usr
/bin
94 $(INSTALL_DIR
) $(1)/usr
/share
/openocd
95 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/openocd
$(1)/usr
/bin
/
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/openocd
/scripts
$(1)/usr
/share
/openocd
99 $(eval
$(call BuildPackage
,openocd
))