From: Øyvind H. <go...@us...> - 2009-12-08 10:34:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 97de520bc02f96f31063175fbc9cad034e84055d (commit) via 304af6e7d87af60a4c807b940ff6102243d465a4 (commit) via eb1bc657ae10f9e21304e068ca17dc0231a9b9c0 (commit) from 456ec016c2403ed95e0b8b33534ab53ed41d7c27 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 97de520bc02f96f31063175fbc9cad034e84055d Author: Ãyvind Harboe <oyv...@zy...> Date: Fri Dec 4 16:00:43 2009 +0100 minidriver: fix inline capability of minidriver Low latency low CPU processing power systems(embedded) will benefit greatly from being able to inline certain jtag_add_xxx() fn's. The trick is that this has to be done in such a way as to allow implementing an OpenOCD API with a shared library(eventually) on a PC hosted OpenOCD. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/.gitignore b/.gitignore index 114fc05..9928129 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,10 @@ *.la *.in +# generated source files +src/jtag/minidriver_imp.h +src/jtag/jtag_minidriver.h + # editor files *.swp diff --git a/src/jtag/Makefile.am b/src/jtag/Makefile.am index da2eddd..3f132d4 100644 --- a/src/jtag/Makefile.am +++ b/src/jtag/Makefile.am @@ -9,33 +9,49 @@ SUBDIRS = DRIVERFILES = libjtag_la_LIBADD = -if MINIDRIVER +CLEANFILES = + +BUILT_SOURCES = + +BUILT_SOURCES += minidriver_imp.h +CLEANFILES += minidriver_imp.h -# for minidriver_imp.h -AM_CPPFLAGS += -I$(srcdir)/minidriver +if MINIDRIVER if ZY1000 DRIVERFILES += zy1000/zy1000.c -AM_CPPFLAGS += -I$(srcdir)/zy1000 +JTAG_MINIDRIVER_DIR = $(srcdir)/zy1000 endif if MINIDRIVER_DUMMY DRIVERFILES += minidummy/minidummy.c commands.c -AM_CPPFLAGS += -I$(srcdir)/minidummy +JTAG_MINIDRIVER_DIR = $(srcdir)/minidummy endif +MINIDRIVER_IMP_DIR = $(srcdir)/minidriver + +jtag_minidriver.h: $(JTAG_MINIDRIVER_DIR)/jtag_minidriver.h + cp $< $@ + +BUILT_SOURCES += jtag_minidriver.h + +CLEANFILES += jtag_minidriver.h + else +MINIDRIVER_IMP_DIR = $(srcdir)/drivers DRIVERFILES += commands.c SUBDIRS += drivers libjtag_la_LIBADD += $(top_builddir)/src/jtag/drivers/libocdjtagdrivers.la -# for minidriver_imp.h -AM_CPPFLAGS += -I$(srcdir)/drivers - endif + # endif // MINIDRIVER +minidriver_imp.h: $(MINIDRIVER_IMP_DIR)/minidriver_imp.h + cp $< $@ + + libjtag_la_SOURCES = \ core.c \ interface.c \ diff --git a/src/jtag/commands.c b/src/jtag/commands.c index 4e8ce40..6951f03 100644 --- a/src/jtag/commands.c +++ b/src/jtag/commands.c @@ -31,6 +31,7 @@ #include "config.h" #endif +#include <jtag/jtag.h> #include "commands.h" struct cmd_queue_page { diff --git a/src/jtag/commands.h b/src/jtag/commands.h index 86ded15..b10b545 100644 --- a/src/jtag/commands.h +++ b/src/jtag/commands.h @@ -26,8 +26,6 @@ #ifndef JTAG_COMMANDS_H #define JTAG_COMMANDS_H -#include <jtag/jtag.h> - /** * The inferred type of a scan_command_s structure, indicating whether * the command has the host scan in from the device, the host scan out diff --git a/src/jtag/core.c b/src/jtag/core.c index 373dd7e..77cf48a 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -32,7 +32,6 @@ #endif #include "jtag.h" -#include "minidriver.h" #include "interface.h" #ifdef HAVE_STRINGS_H @@ -398,18 +397,6 @@ void jtag_add_plain_ir_scan(int in_num_fields, const struct scan_field *in_field jtag_set_error(retval); } -void jtag_add_callback(jtag_callback1_t f, jtag_callback_data_t data0) -{ - interface_jtag_add_callback(f, data0); -} - -void jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0, - jtag_callback_data_t data1, jtag_callback_data_t data2, - jtag_callback_data_t data3) -{ - interface_jtag_add_callback4(f, data0, data1, data2, data3); -} - static int jtag_check_value_inner(uint8_t *captured, uint8_t *in_check_value, uint8_t *in_check_mask, int num_bits); @@ -491,20 +478,6 @@ void jtag_add_plain_dr_scan(int in_num_fields, const struct scan_field *in_field jtag_set_error(retval); } -void jtag_add_dr_out(struct jtag_tap* tap, - int num_fields, const int* num_bits, const uint32_t* value, - tap_state_t end_state) -{ - assert(end_state != TAP_RESET); - assert(end_state != TAP_INVALID); - - cmd_queue_cur_state = end_state; - - interface_jtag_add_dr_out(tap, - num_fields, num_bits, value, - end_state); -} - void jtag_add_tlr(void) { jtag_prelude(TAP_RESET); diff --git a/src/jtag/drivers/driver.c b/src/jtag/drivers/driver.c index 7fa9ead..c57386a 100644 --- a/src/jtag/drivers/driver.c +++ b/src/jtag/drivers/driver.c @@ -2,7 +2,7 @@ * Copyright (C) 2005 by Dominic Rath * * Dom...@gm... * * * - * Copyright (C) 2007,2008 Ãyvind Harboe * + * Copyright (C) 2007-2009 Ãyvind Harboe * * oyv...@zy... * * * * Copyright (C) 2009 SoftPLC Corporation * @@ -31,7 +31,9 @@ #include "config.h" #endif +#include <jtag/jtag.h> #include <jtag/interface.h> +#include <jtag/commands.h> #include <jtag/minidriver.h> #include <helper/command.h> @@ -525,3 +527,30 @@ void interface_jtag_add_callback(jtag_callback1_t callback, jtag_callback_data_t jtag_add_callback4(jtag_convert_to_callback4, data0, (jtag_callback_data_t)callback, 0, 0); } + +/* A minidriver can use use an inline versions of this API level fn */ +void jtag_add_dr_out(struct jtag_tap* tap, + int num_fields, const int* num_bits, const uint32_t* value, + tap_state_t end_state) +{ + assert(end_state != TAP_RESET); + assert(end_state != TAP_INVALID); + + cmd_queue_cur_state = end_state; + + interface_jtag_add_dr_out(tap, + num_fields, num_bits, value, + end_state); +} + +void jtag_add_callback(jtag_callback1_t f, jtag_callback_data_t data0) +{ + interface_jtag_add_callback(f, data0); +} + +void jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0, + jtag_callback_data_t data1, jtag_callback_data_t data2, + jtag_callback_data_t data3) +{ + interface_jtag_add_callback4(f, data0, data1, data2, data3); +} diff --git a/src/jtag/drivers/minidriver_imp.h b/src/jtag/drivers/minidriver_imp.h index 1efd242..76cf9dd 100644 --- a/src/jtag/drivers/minidriver_imp.h +++ b/src/jtag/drivers/minidriver_imp.h @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (C) 2005 by Dominic Rath <Dom...@gm...> * - * Copyright (C) 2007,2008 Ãyvind Harboe <oyv...@zy...> * + * Copyright (C) 2007-2009 Ãyvind Harboe <oyv...@zy...> * * Copyright (C) 2009 Zachary T Welch <zw...@su...> * * * * This program is free software; you can redistribute it and/or modify * @@ -44,4 +44,13 @@ void interface_jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3); +void jtag_add_dr_out(struct jtag_tap* tap, + int num_fields, const int* num_bits, const uint32_t* value, + tap_state_t end_state); + + +void jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0, + jtag_callback_data_t data1, jtag_callback_data_t data2, + jtag_callback_data_t data3); + #endif // MINIDRIVER_IMP_H diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index eaa0c7c..fece652 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -461,10 +461,6 @@ typedef int (*jtag_callback_t)(jtag_callback_data_t data0, * @param data3 An integer big enough to use as an @c int or a pointer. * */ -void jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0, - jtag_callback_data_t data1, jtag_callback_data_t data2, - jtag_callback_data_t data3); - /** * Run a TAP_RESET reset where the end state is TAP_RESET, @@ -688,9 +684,6 @@ void jtag_sleep(uint32_t us); * There is no jtag_add_dr_outin() version of this fn that also allows * clocking data back in. Patches gladly accepted! */ -void jtag_add_dr_out(struct jtag_tap* tap, - int num_fields, const int* num_bits, const uint32_t* value, - tap_state_t end_state); /** @@ -725,4 +718,9 @@ bool jtag_poll_get_enabled(void); */ void jtag_poll_set_enabled(bool value); + +/* The minidriver may have inline versions of some of the low + * level APIs that are used in inner loops. */ +#include <jtag/minidriver.h> + #endif /* JTAG_H */ diff --git a/src/jtag/minidriver.h b/src/jtag/minidriver.h index ea780fa..2109c75 100644 --- a/src/jtag/minidriver.h +++ b/src/jtag/minidriver.h @@ -47,7 +47,7 @@ // this header will be provided by the minidriver implementation, // and it may provide additional declarations that must be defined. -#include "minidriver_imp.h" +#include <jtag/minidriver_imp.h> int interface_jtag_add_ir_scan( int num_fields, const struct scan_field* fields, diff --git a/src/jtag/minidriver/minidriver_imp.h b/src/jtag/minidriver/minidriver_imp.h index e371514..b6cdbea 100644 --- a/src/jtag/minidriver/minidriver_imp.h +++ b/src/jtag/minidriver/minidriver_imp.h @@ -21,7 +21,7 @@ #ifndef MINIDRIVER_IMP_H #define MINIDRIVER_IMP_H -#include "jtag_minidriver.h" +#include <jtag/jtag_minidriver.h> static inline void interface_jtag_alloc_in_value32(struct scan_field *field) { @@ -41,4 +41,21 @@ static inline void interface_jtag_add_scan_check_alloc(struct scan_field *field) field->in_value = field->intmp; } +static inline void jtag_add_dr_out(struct jtag_tap* tap, + int num_fields, const int* num_bits, const uint32_t* value, + tap_state_t end_state) +{ + cmd_queue_cur_state = end_state; + + interface_jtag_add_dr_out(tap, + num_fields, num_bits, value, + end_state); +} + +#define jtag_add_callback(callback, in) interface_jtag_add_callback(callback, in) + +#define jtag_add_callback4(callback, in, data1, data2, data3) interface_jtag_add_callback4(callback, in, data1, data2, data3) + + + #endif // MINIDRIVER_IMP_H diff --git a/src/jtag/minidummy/minidummy.c b/src/jtag/minidummy/minidummy.c index e60e832..9c608cd 100644 --- a/src/jtag/minidummy/minidummy.c +++ b/src/jtag/minidummy/minidummy.c @@ -20,6 +20,7 @@ #include "config.h" #endif +#include <jtag/jtag.h> #include <target/embeddedice.h> #include <jtag/minidriver.h> #include <jtag/interface.h> commit 304af6e7d87af60a4c807b940ff6102243d465a4 Author: Ãyvind Harboe <oyv...@zy...> Date: Sat Dec 5 11:07:06 2009 +0100 zy1000: remove unecessary include Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/ecosboard.c b/src/ecosboard.c index 7d0c3d0..2e491c2 100644 --- a/src/ecosboard.c +++ b/src/ecosboard.c @@ -25,10 +25,6 @@ #include <jtag/jtag.h> #include <helper/ioutil.h> #include <helper/configuration.h> -#include <xsvf/xsvf.h> -#include <svf/svf.h> -#include <flash/nand.h> -#include <pld/pld.h> #include <server/server.h> #include <server/telnet_server.h> commit eb1bc657ae10f9e21304e068ca17dc0231a9b9c0 Author: Ãyvind Harboe <oyv...@zy...> Date: Sat Dec 5 10:50:59 2009 +0100 build: add build/src to include path This allows including generated include files. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/Makefile.am b/src/Makefile.am index ea753bb..f60feac 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,8 @@ noinst_HEADERS = \ # set the include path found by configure AM_CPPFLAGS = \ - -I$(top_srcdir)/src + -I$(top_srcdir)/src \ + -I$(top_builddir)/src libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\" diff --git a/src/flash/Makefile.am b/src/flash/Makefile.am index 646889e..9d983a8 100644 --- a/src/flash/Makefile.am +++ b/src/flash/Makefile.am @@ -3,7 +3,8 @@ SUBDIRS = \ nand AM_CPPFLAGS = \ - -I$(top_srcdir)/src + -I$(top_srcdir)/src \ + -I$(top_builddir)/src METASOURCES = AUTO noinst_LTLIBRARIES = libflash.la diff --git a/src/flash/nand/Makefile.am b/src/flash/nand/Makefile.am index a48b726..f3033b8 100644 --- a/src/flash/nand/Makefile.am +++ b/src/flash/nand/Makefile.am @@ -1,4 +1,6 @@ -AM_CPPFLAGS = -I$(top_srcdir)/src +AM_CPPFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src noinst_LTLIBRARIES = libocdflashnand.la diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am index f185081..5d0a4df 100644 --- a/src/flash/nor/Makefile.am +++ b/src/flash/nor/Makefile.am @@ -1,4 +1,6 @@ -AM_CPPFLAGS = -I$(top_srcdir)/src +AM_CPPFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src noinst_LTLIBRARIES = libocdflashnor.la libocdflashnor_la_SOURCES = \ diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am index 4f74b9a..244ada7 100644 --- a/src/helper/Makefile.am +++ b/src/helper/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ -DPKGDATADIR=\"$(pkgdatadir)\" METASOURCES = AUTO diff --git a/src/jtag/Makefile.am b/src/jtag/Makefile.am index 39b4b59..da2eddd 100644 --- a/src/jtag/Makefile.am +++ b/src/jtag/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ - -I$(top_srcdir)/src + -I$(top_srcdir)/src \ + -I$(top_builddir)/src METASOURCES = AUTO noinst_LTLIBRARIES = libjtag.la diff --git a/src/jtag/drivers/Makefile.am b/src/jtag/drivers/Makefile.am index 92a96f3..8ee5ac5 100644 --- a/src/jtag/drivers/Makefile.am +++ b/src/jtag/drivers/Makefile.am @@ -1,4 +1,6 @@ -AM_CPPFLAGS = -I$(top_srcdir)/src +AM_CPPFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src noinst_LTLIBRARIES = libocdjtagdrivers.la diff --git a/src/pld/Makefile.am b/src/pld/Makefile.am index fa40e56..3993622 100644 --- a/src/pld/Makefile.am +++ b/src/pld/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ - -I$(top_srcdir)/src + -I$(top_srcdir)/src \ + -I$(top_builddir)/src METASOURCES = AUTO noinst_LTLIBRARIES = libpld.la diff --git a/src/server/Makefile.am b/src/server/Makefile.am index de83a06..c6c946f 100644 --- a/src/server/Makefile.am +++ b/src/server/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ -DPKGDATADIR=\"$(pkgdatadir)\" METASOURCES = AUTO diff --git a/src/svf/Makefile.am b/src/svf/Makefile.am index adc415f..398f967 100644 --- a/src/svf/Makefile.am +++ b/src/svf/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ - -I$(top_srcdir)/src + -I$(top_srcdir)/src \ + -I$(top_builddir)/src METASOURCES = AUTO noinst_LTLIBRARIES = libsvf.la diff --git a/src/target/Makefile.am b/src/target/Makefile.am index f1d5d15..f1d4caa 100644 --- a/src/target/Makefile.am +++ b/src/target/Makefile.am @@ -6,7 +6,8 @@ OOCD_TRACE_FILES = endif AM_CPPFLAGS = \ - -I$(top_srcdir)/src + -I$(top_srcdir)/src \ + -I$(top_builddir)/src BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD) diff --git a/src/xsvf/Makefile.am b/src/xsvf/Makefile.am index 3e2a04e..f96331c 100644 --- a/src/xsvf/Makefile.am +++ b/src/xsvf/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ - -I$(top_srcdir)/src + -I$(top_srcdir)/src \ + -I$(top_builddir)/src METASOURCES = AUTO noinst_LTLIBRARIES = libxsvf.la ----------------------------------------------------------------------- Summary of changes: .gitignore | 4 +++ src/Makefile.am | 3 +- src/ecosboard.c | 4 --- src/flash/Makefile.am | 3 +- src/flash/nand/Makefile.am | 4 ++- src/flash/nor/Makefile.am | 4 ++- src/helper/Makefile.am | 1 + src/jtag/Makefile.am | 35 +++++++++++++++++++++++++-------- src/jtag/commands.c | 1 + src/jtag/commands.h | 2 - src/jtag/core.c | 27 -------------------------- src/jtag/drivers/Makefile.am | 4 ++- src/jtag/drivers/driver.c | 31 +++++++++++++++++++++++++++++- src/jtag/drivers/minidriver_imp.h | 11 +++++++++- src/jtag/jtag.h | 12 ++++------ src/jtag/minidriver.h | 2 +- src/jtag/minidriver/minidriver_imp.h | 19 +++++++++++++++++- src/jtag/minidummy/minidummy.c | 1 + src/pld/Makefile.am | 3 +- src/server/Makefile.am | 1 + src/svf/Makefile.am | 3 +- src/target/Makefile.am | 3 +- src/xsvf/Makefile.am | 3 +- 23 files changed, 119 insertions(+), 62 deletions(-) hooks/post-receive -- Main OpenOCD repository |