Commit 548bb19a authored by ntfreak's avatar ntfreak
Browse files

- added jlink support, based on Jürgen Stuber patch

git-svn-id: svn://svn.berlios.de/openocd/trunk@658 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent f1e72cf0
......@@ -99,6 +99,10 @@ AC_ARG_ENABLE(oocd_trace,
AS_HELP_STRING([--enable-oocd_trace], [Enable building support for the OpenOCD+trace ETM capture device]),
[build_oocd_trace=$enableval], [build_oocd_trace=no])
AC_ARG_ENABLE(jlink,
AS_HELP_STRING([--enable-jlink], [Enable building support for the Segger J-Link JTAG Programmer]),
[build_jlink=$enableval], [build_jlink=no])
AC_ARG_WITH(ftd2xx,
[AS_HELP_STRING(--with-ftd2xx,
[Where libftd2xx can be found <default=search>])],
......@@ -251,6 +255,12 @@ else
AC_DEFINE(BUILD_OOCD_TRACE, 0, [0 if you don't want the OpenOCD+trace ETM capture driver.])
fi
if test $build_jlink = yes; then
AC_DEFINE(BUILD_JLINK, 1, [1 if you want the J-Link JTAG driver.])
else
AC_DEFINE(BUILD_JLINK, 0, [0 if you don't want the J-Link JTAG driver.])
fi
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(openocd, 1.0)
......@@ -269,6 +279,7 @@ AM_CONDITIONAL(PRESTO_LIBFTDI, test $build_presto_libftdi = yes)
AM_CONDITIONAL(PRESTO_FTD2XX, test $build_presto_ftd2xx = yes)
AM_CONDITIONAL(USBPROG, test $build_usbprog = yes)
AM_CONDITIONAL(OOCD_TRACE, test $build_oocd_trace = yes)
AM_CONDITIONAL(JLINK, test $build_jlink = yes)
AM_CONDITIONAL(IS_CYGWIN, test $is_cygwin = yes)
AM_CONDITIONAL(IS_MINGW, test $is_mingw = yes)
AM_CONDITIONAL(IS_WIN32, test $is_win32 = yes)
......
......@@ -176,6 +176,8 @@ build properly.}
@option{--enable-presto_libftdi}
@item
@option{--enable-presto_ftd2xx}
@item
@option{--enable-jlink}
@end itemize
If you want to access the parallel port using the PPDEV interface you have to specify
......@@ -259,7 +261,7 @@ Set to <@var{enable}> to cause OpenOCD to send the memory configuration to gdb w
requested. gdb will then know when to set hardware breakpoints, and program flash
using the gdb load command. @option{gdb_flash_program enable} will also need enabling
for flash programming to work.
Default behaviour is <@var{disable}>
Default behaviour is <@var{enable}>
@item @b{gdb_flash_program} <@var{enable|disable}>
@cindex gdb_flash_program
Set to <@var{enable}> to cause OpenOCD to program the flash memory when a
......@@ -312,6 +314,10 @@ usbprog is a freely programmable USB adapter.
@item @b{gw16012}
Gateworks GW16012 JTAG programmer.
@end itemize
@itemize @minus
@item @b{jlink}
Segger jlink usb adapter
@end itemize
@end itemize
@itemize @bullet
......@@ -326,6 +332,7 @@ is optional, in which case the reset speed is used.
@item wiggler: maximum speed / @var{number}
@item ft2232: 6MHz / (@var{number}+1)
@item amt jtagaccel: 8 / 2**@var{number}
@item jlink: maximum speed in kHz (0-12000), 0 will use RTCK
@end itemize
Note: Make sure the jtag clock is no more than @math{1/6th × CPU-Clock}. This is
......
......@@ -44,8 +44,12 @@ endif
if USBPROG
LIBUSB = -lusb
else
if JLINK
LIBUSB = -lusb
else
LIBUSB =
endif
endif
if IS_WIN32
if FTD2XXDIR
......
......@@ -93,7 +93,13 @@ else
USBPROGFILES =
endif
if JLINK
JLINKFILES = jlink.c
else
JLINKFILES =
endif
libjtag_a_SOURCES = jtag.c $(BITBANGFILES) $(PARPORTFILES) $(DUMMYFILES) $(FT2232FILES) $(AMTJTAGACCELFILES) $(EP93XXFILES) \
$(AT91RM9200FILES) $(GW16012FILES) $(BITQFILES) $(PRESTOFILES) $(USBPROGFILES) $(ECOSBOARDFILES)
$(AT91RM9200FILES) $(GW16012FILES) $(BITQFILES) $(PRESTOFILES) $(USBPROGFILES) $(ECOSBOARDFILES) $(JLINKFILES)
noinst_HEADERS = bitbang.h jtag.h
This diff is collapsed.
......@@ -193,6 +193,10 @@ static int hasKHz = 0;
extern jtag_interface_t usbprog_interface;
#endif
#if BUILD_JLINK == 1
extern jtag_interface_t jlink_interface;
#endif
jtag_interface_t *jtag_interfaces[] = {
#if BUILD_ECOSBOARD == 1
&eCosBoard_interface,
......@@ -226,6 +230,9 @@ jtag_interface_t *jtag_interfaces[] = {
#endif
#if BUILD_USBPROG == 1
&usbprog_interface,
#endif
#if BUILD_JLINK == 1
&jlink_interface,
#endif
NULL,
};
......
......@@ -32,5 +32,5 @@ nobase_dist_pkglib_DATA = xscale/debug_handler.bin event/at91eb40a_reset.script
target/lm3s811.cfg interface/luminary.cfg interface/luminary-lm3s811.cfg interface/stm32-stick.cfg \
interface/calao-usb-a9260-c01.cfg interface/calao-usb-a9260-c02.cfg \
interface/calao-usb-a9260.cfg target/at91sam9260minimal.cfg event/lpc2148_reset.script \
interface/chameleon.cfg interface/at91rm9200.cfg
interface/chameleon.cfg interface/at91rm9200.cfg interface/jlink.cfg
# jlink interface
interface jlink
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment